Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

marimo

Package Overview
Dependencies
Maintainers
2
Versions
374
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marimo - npm Package Compare versions

Comparing version
0.19.7
to
0.19.8
+1
marimo/_cli/tools/__init__.py
# Copyright 2026 Marimo. All rights reserved.
# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
import asyncio
import json
import subprocess
import threading
from contextlib import AbstractContextManager
from functools import partial
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import TYPE_CHECKING, Any, Optional
import click
from marimo._cli.parse_args import parse_args
from marimo._cli.print import echo, green, red
from marimo._dependencies.dependencies import DependencyManager
from marimo._server.export import run_app_then_export_as_html
from marimo._server.file_router import flatten_files
from marimo._server.files.directory_scanner import DirectoryScanner
from marimo._server.utils import asyncio_run
from marimo._utils.http import HTTPException, HTTPStatus
from marimo._utils.marimo_path import MarimoPath
from marimo._utils.paths import marimo_package_path, maybe_make_dirs
if TYPE_CHECKING:
from collections.abc import Iterable
from types import TracebackType
_sandbox_message = (
"Render notebooks in an isolated environment, with dependencies tracked "
"via PEP 723 inline metadata. If already declared, dependencies will "
"install automatically. Requires uv. Only applies when --execute is used."
)
def _split_paths_and_args(
name: str, args: tuple[str, ...]
) -> tuple[list[str], tuple[str, ...]]:
paths = [name]
for index, arg in enumerate(args):
if arg == "--":
return paths, args[index + 1 :]
paths.append(arg)
return paths, ()
def _collect_notebooks(paths: Iterable[Path]) -> list[MarimoPath]:
notebooks: dict[str, MarimoPath] = {}
for path in paths:
if path.is_dir():
scanner = DirectoryScanner(str(path), include_markdown=True)
try:
file_infos = scanner.scan()
except HTTPException as e:
if e.status_code != HTTPStatus.REQUEST_TIMEOUT:
raise
# Match server behavior: use partial results on scan timeout.
file_infos = scanner.partial_results
for file_info in flatten_files(file_infos):
if not file_info.is_marimo_file or file_info.is_directory:
continue
absolute_path = str(Path(path) / file_info.path)
notebooks[absolute_path] = MarimoPath(absolute_path)
else:
notebooks[str(path)] = MarimoPath(str(path))
return [notebooks[k] for k in sorted(notebooks)]
async def _render_html(
marimo_path: MarimoPath,
*,
execute: bool,
include_code: bool,
args: tuple[str, ...],
asset_url: str | None = None,
venv_python: str | None = None,
) -> str:
if not execute:
from marimo._server.export import export_as_html_without_execution
result = await export_as_html_without_execution(
marimo_path, include_code=True, asset_url=asset_url
)
return result.text
if venv_python is None:
cli_args = parse_args(args) if args else {}
result = await run_app_then_export_as_html(
marimo_path,
include_code=include_code,
cli_args=cli_args,
argv=list(args),
asset_url=asset_url,
)
return result.text
payload = {
"path": marimo_path.absolute_name,
"include_code": include_code,
"args": list(args),
"asset_url": asset_url,
}
# Render in a separate process so we can use a sandboxed venv without polluting the current environment.
return await asyncio.to_thread(
_render_html_in_subprocess,
venv_python,
payload,
)
def _render_html_in_subprocess(
venv_python: str, payload: dict[str, Any]
) -> str:
"""Render a notebook to HTML in a separate Python process."""
script = r"""
import asyncio
import json
import sys
from marimo._cli.parse_args import parse_args
from marimo._server.export import run_app_then_export_as_html
from marimo._utils.marimo_path import MarimoPath
payload = json.loads(sys.argv[1])
path = MarimoPath(payload["path"])
include_code = bool(payload.get("include_code", False))
args = payload.get("args") or []
asset_url = payload.get("asset_url")
cli_args = parse_args(tuple(args)) if args else {}
result = asyncio.run(
run_app_then_export_as_html(
path,
include_code=include_code,
cli_args=cli_args,
argv=list(args),
asset_url=asset_url,
)
)
sys.stdout.write(result.text)
"""
result = subprocess.run(
[venv_python, "-c", script, json.dumps(payload)],
capture_output=True,
text=True,
)
if result.returncode != 0:
stderr = result.stderr.strip()
raise click.ClickException(
"Failed to render notebook in sandbox.\n\n"
f"Command:\n\n {venv_python} -c <script>\n\n"
f"Stderr:\n\n{stderr}"
)
return result.stdout
class _ThumbnailRequestHandler(SimpleHTTPRequestHandler):
def do_GET(self) -> None: # noqa: N802
if self.path.split("?", 1)[0] == "/__marimo_thumbnail__.html":
html = getattr(self.server, "thumbnail_html", "")
self.send_response(200)
self.send_header("Content-Type", "text/html; charset=utf-8")
self.send_header("Cache-Control", "no-store")
self.end_headers()
self.wfile.write(html.encode("utf-8"))
return
return super().do_GET()
def log_message(self, format: str, *args: Any) -> None: # noqa: A002
# Silence noisy server logs for CLI usage.
del format
del args
return
class _ThumbnailHTTPServer(ThreadingHTTPServer):
# Set by _ThumbnailAssetServer to serve a fresh HTML document per notebook.
thumbnail_html: str
class _ThumbnailAssetServer(AbstractContextManager["_ThumbnailAssetServer"]):
def __init__(self, *, directory: Path) -> None:
self._directory = directory
self._server: _ThumbnailHTTPServer | None = None
self._thread: threading.Thread | None = None
@property
def base_url(self) -> str:
assert self._server is not None
host, port = self._server.server_address[:2]
if isinstance(host, bytes):
host = host.decode("utf-8")
return f"http://{host}:{port}"
@property
def page_url(self) -> str:
return f"{self.base_url}/__marimo_thumbnail__.html"
def set_html(self, html: str) -> None:
assert self._server is not None
self._server.thumbnail_html = html
def __enter__(self) -> _ThumbnailAssetServer:
if not self._directory.is_dir():
raise click.ClickException(
f"Static assets not found at {self._directory}"
)
handler = partial(
_ThumbnailRequestHandler, directory=str(self._directory)
)
self._server = _ThumbnailHTTPServer(("127.0.0.1", 0), handler)
self._server.thumbnail_html = ""
self._thread = threading.Thread(
target=self._server.serve_forever, daemon=True
)
self._thread.start()
return self
def __exit__(
self,
exc_type: type[BaseException] | None,
exc: BaseException | None,
tb: TracebackType | None,
) -> None:
del exc_type
del exc
del tb
if self._server is not None:
self._server.shutdown()
self._server.server_close()
self._server = None
if self._thread is not None:
self._thread.join(timeout=1)
self._thread = None
return None
class _SandboxVenvPool:
def __init__(self) -> None:
self._envs: dict[tuple[str, ...], tuple[str, str]] = {}
def get_python(self, notebook_path: str) -> str:
"""Return a venv python path for the notebook's sandbox requirements."""
from marimo._cli.sandbox import (
build_sandbox_venv,
get_sandbox_requirements,
)
requirements = tuple(get_sandbox_requirements(notebook_path))
existing = self._envs.get(requirements)
if existing is not None:
return existing[1]
sandbox_dir, venv_python = build_sandbox_venv(notebook_path)
self._envs[requirements] = (sandbox_dir, venv_python)
return venv_python
def close(self) -> None:
"""Clean up any sandbox environments we created."""
from marimo._cli.sandbox import cleanup_sandbox_dir
for sandbox_dir, _ in self._envs.values():
cleanup_sandbox_dir(sandbox_dir)
self._envs.clear()
async def _generate_thumbnails(
*,
notebooks: list[MarimoPath],
width: int,
height: int,
scale: int,
timeout_ms: int,
output: Optional[Path],
overwrite: bool,
include_code: bool,
execute: bool,
notebook_args: tuple[str, ...],
continue_on_error: bool,
sandbox: bool,
) -> None:
from marimo._metadata.opengraph import default_opengraph_image
failures: list[tuple[MarimoPath, Exception]] = []
try:
from playwright.async_api import ( # type: ignore[import-not-found]
async_playwright,
)
except ModuleNotFoundError as e:
if getattr(e, "name", None) == "playwright":
raise click.ClickException(
"Playwright is required to generate thumbnails.\n\n"
" Tip: Install dependencies with:\n\n"
" pip install 'nbconvert[webpdf]'\n\n"
" and install Chromium with:\n\n"
" python -m playwright install chromium"
) from None
raise
if sandbox and not DependencyManager.which("uv"):
raise click.ClickException(
"uv is required for --sandbox thumbnail generation.\n\n"
" Tip: Install uv from https://github.com/astral-sh/uv"
)
static_dir = marimo_package_path() / "_static"
sandbox_pool: _SandboxVenvPool | None = (
_SandboxVenvPool() if sandbox else None
)
try:
with _ThumbnailAssetServer(directory=static_dir) as server:
async with async_playwright() as playwright:
browser = await playwright.chromium.launch()
context = await browser.new_context(
viewport={"width": width, "height": height},
device_scale_factor=scale,
)
page = await context.new_page()
await page.emulate_media(reduced_motion="reduce")
for index, notebook in enumerate(notebooks):
try:
notebook_dir = notebook.path.parent
out_path = (
output
if output is not None
else notebook_dir
/ default_opengraph_image(str(notebook.path))
)
if out_path.exists() and not overwrite:
echo(
red("skip")
+ f": {notebook.short_name} (exists, use --overwrite)"
)
continue
maybe_make_dirs(out_path)
echo(f"Rendering {notebook.short_name}...")
venv_python = (
sandbox_pool.get_python(str(notebook.path))
if sandbox_pool is not None
else None
)
html = await _render_html(
notebook,
execute=execute,
include_code=include_code,
args=notebook_args,
asset_url=server.base_url,
venv_python=venv_python,
)
server.set_html(html)
echo(f"Screenshotting -> {out_path}...")
page_url = f"{server.page_url}?v={index}"
await page.goto(page_url, wait_until="load")
# Hide chrome and watermarks marked for print so thumbnails stay focused on notebook content.
await page.add_style_tag(
content=(
'.print\\:hidden,[data-testid="watermark"]{display:none !important;}'
)
)
# Nb renderer starts cell contents as invisible for a short period to avoid flicker
# --> we wait for the first cell container to be visible before snapshotting.
await page.wait_for_function(
r"""
() => {
const root = document.getElementById("root");
if (!root) return false;
const cell = document.querySelector('div[id^="cell-"]');
if (cell) {
const style = window.getComputedStyle(cell);
return style.visibility !== "hidden" && style.display !== "none";
}
return root.childElementCount > 0;
}
""",
timeout=30_000,
)
await page.wait_for_timeout(timeout_ms)
await page.screenshot(
path=str(out_path), full_page=False
)
echo(green("ok") + f": {out_path}")
except Exception as e:
failures.append((notebook, e))
echo(red("error") + f": {notebook.short_name}: {e}")
if not continue_on_error:
raise
await context.close()
await browser.close()
finally:
if sandbox_pool is not None:
sandbox_pool.close()
if failures:
raise click.ClickException(
f"Failed to generate thumbnails for {len(failures)} notebooks."
)
@click.command(
"thumbnail", help="Generate OpenGraph thumbnails for notebooks."
)
@click.argument(
"name",
type=click.Path(
exists=True, file_okay=True, dir_okay=True, path_type=Path
),
)
@click.option(
"--width",
type=int,
default=1200,
show_default=True,
help="Viewport width for the screenshot.",
)
@click.option(
"--height",
type=int,
default=630,
show_default=True,
help="Viewport height for the screenshot.",
)
@click.option(
"--scale",
type=click.IntRange(min=1, max=4),
default=2,
show_default=True,
help=(
"Device scale factor for screenshots. Output resolution will be "
"`width*scale` x `height*scale`."
),
)
@click.option(
"--timeout-ms",
type=int,
default=1500,
show_default=True,
help="Additional time to wait after page load before screenshot.",
)
@click.option(
"--output",
type=click.Path(path_type=Path),
default=None,
help=(
"Output filename. If omitted, writes to "
"`<notebook_dir>/__marimo__/assets/<notebook_stem>/opengraph.png`."
),
)
@click.option(
"--overwrite/--no-overwrite",
default=False,
show_default=True,
help="Overwrite existing thumbnails.",
)
@click.option(
"--include-code/--no-include-code",
default=False,
show_default=True,
help="Whether to include code in the rendered HTML before screenshot.",
)
@click.option(
"--execute/--no-execute",
default=False,
show_default=True,
help=(
"Execute notebooks and include their outputs in thumbnails. "
"In --no-execute mode (default), thumbnails are generated from notebook "
"structure without running code (and will not include outputs)."
),
)
@click.option(
"--sandbox/--no-sandbox",
is_flag=True,
default=None,
show_default=False,
type=bool,
help=_sandbox_message,
)
@click.option(
"--continue-on-error/--fail-fast",
default=True,
show_default=True,
help="Continue processing other notebooks if one notebook fails.",
)
@click.argument("args", nargs=-1, type=click.UNPROCESSED)
def thumbnail(
name: Path,
width: int,
height: int,
scale: int,
timeout_ms: int,
output: Optional[Path],
overwrite: bool,
include_code: bool,
execute: bool,
sandbox: Optional[bool],
continue_on_error: bool,
args: tuple[str, ...],
) -> None:
"""Generate thumbnails for one or more notebooks (or directories)."""
try:
DependencyManager.playwright.require("for thumbnail generation")
except ModuleNotFoundError as e:
if getattr(e, "name", None) == "playwright":
raise click.ClickException(
"Playwright is required for thumbnail generation.\n\n"
" Tip: Install with:\n\n"
" python -m pip install playwright\n\n"
" and install Chromium with:\n\n"
" python -m playwright install chromium"
) from None
raise
paths, notebook_args = _split_paths_and_args(str(name), args)
notebooks = _collect_notebooks([Path(p) for p in paths])
if not notebooks:
raise click.ClickException("No marimo notebooks found.")
if output is not None and len(notebooks) > 1:
raise click.UsageError(
"--output can only be used when generating thumbnail for a single notebook."
)
from marimo._cli.sandbox import resolve_sandbox_mode
if not execute and sandbox:
raise click.UsageError("--sandbox requires --execute.")
sandbox_mode = (
resolve_sandbox_mode(sandbox=sandbox, name=str(name))
if execute
else None
)
asyncio_run(
_generate_thumbnails(
notebooks=notebooks,
width=width,
height=height,
scale=scale,
timeout_ms=timeout_ms,
output=output,
overwrite=overwrite,
include_code=include_code,
execute=execute,
notebook_args=notebook_args,
continue_on_error=continue_on_error,
sandbox=sandbox_mode is not None,
)
)
---
name: Debugger
description: An expert debugging assistant that helps solve complex issues by actively using Java debugging capabilities
tools: ['get_terminal_output', 'list_dir', 'file_search', 'run_in_terminal', 'grep_search', 'get_errors', 'read_file', 'semantic_search', 'java_debugger']
handoffs:
- label: Implement Fix
agent: Agent
prompt: Implement the suggested fix
- label: Show Root Cause in Editor
agent: Agent
prompt: Open the file with the root cause issue in the editor and highlight the relevant lines
showContinueOn: false
send: true
---
You are a DEBUGGING AGENT that systematically investigates issues using runtime inspection and strategic breakpoints.
Your SOLE responsibility is to identify the root cause and recommend fixes, NOT to implement them.
<stopping_rules>
STOP IMMEDIATELY once you have:
- Identified the root cause with concrete runtime evidence
- Recommended specific fixes
- Cleaned up all breakpoints
If you catch yourself about to implement code changes, STOP. Debugging identifies issues; implementation fixes them.
</stopping_rules>
<workflow>
Your iterative debugging workflow:
## 1. Locate the Issue
1. Use semantic_search or grep_search to find relevant code
2. Read files with `showLineNumbers=true` to identify exact line numbers
3. **Focus on user code only** - DO NOT read or inspect files from JAR dependencies
## 2. Set Breakpoint & Reproduce
1. **Set ONE strategic breakpoint** on executable code (not comments, signatures, imports, braces)
- Known failure location → Set at error line
- Logic flow investigation → Set at method entry
- Data corruption → Set where data first appears incorrect
2. **Verify** `markerExists=true` in response; if false, try different line
3. **Check if breakpoint is already hit (ONE TIME ONLY)**:
- Use `debugger(action="get_state")` ONCE to check if a thread is already stopped at this breakpoint
- If already stopped at the breakpoint → proceed directly to inspection (skip steps 4-5)
- If not stopped OR session not active → continue to step 4
- DO NOT repeatedly check state - check once and move on
4. **Instruct user to reproduce via IDE actions, then STOP IMMEDIATELY**:
- Tell user what to do: "Click the 'Calculate' button", "Right-click and select 'Refactor'", "Open the preferences dialog"
- DO NOT use CLI commands like running tests via terminal
- If debug session is not active, include starting the application in debug mode
- **STOP YOUR TURN immediately after giving instructions** - do not continue with more tool calls or state checks
- Wait for the user to confirm the breakpoint was hit
## 3. Inspect & Navigate
1. When breakpoint hits, use `get_variables`, `get_stack_trace`, `evaluate_expression`
2. **Use stepping carefully to stay in user code**:
- Use `step_over` to execute current line (preferred - keeps you in user code)
- Use `step_into` ONLY when entering user's own methods (not library/JAR methods)
- Use `step_out` to return from current method
- **NEVER step into JAR/library code** - if about to enter library code, use `step_over` instead
3. If you need earlier/different state:
- Remove current breakpoint
- Set new breakpoint upstream in user code
- Ask user to reproduce again
4. **Keep max 1-2 active breakpoints** at any time
## 4. Present Findings
Once you have sufficient runtime evidence:
1. State root cause directly with concrete evidence
2. Recommend specific fixes with [file](path) links and `symbol` references
3. Remove all breakpoints: `debugger(action="remove_breakpoint")`
4. STOP - handoffs will handle next steps
**DO NOT**:
- Re-read files you've already examined
- Re-validate the same conclusion
- Ask for multiple reproduction runs of the same scenario
- Implement the fix yourself
</workflow>
<findings_format>
Present your findings concisely:
```markdown
## Root Cause
{One-sentence summary of what's wrong}
{2-3 sentences explaining the issue with concrete evidence from debugging}
## Recommended Fixes
1. {Specific actionable fix with [file](path) and `symbol` references}
2. {Alternative or complementary fix}
3. {…}
```
IMPORTANT: DON'T show code blocks in findings, just describe the changes clearly.
</findings_format>
## Debugger Tool Operations
- **get_state** - Check debug session status and thread state
- **get_variables** - Inspect variables/objects (use `depth` param for nested inspection)
- **get_stack_trace** - View call stack with source locations
- **evaluate_expression** - Test expressions in current scope
- **set_breakpoint** - Add breakpoint (returns `markerExists`, `registered`, `enabled` status)
- **remove_breakpoint** - Remove breakpoint by file/line
- **list_breakpoints** - List all active breakpoints
- **step_over** - Execute current line, move to next
- **step_into** - Enter method call
- **step_out** - Exit current method
- **continue** - Resume until next breakpoint
- **suspend** - Pause execution
## Key Principles
- **One breakpoint at a time** - Add more only if absolutely necessary
- **Step > Breakpoint** - Prefer stepping through code over setting multiple breakpoints
- **Evidence-based** - Use concrete runtime data, not assumptions
- **Be decisive** - Once you have evidence, form conclusion and present findings
- **Don't repeat** - Trust your observations; don't re-validate the same thing
- **User code only** - Never inspect or debug into JAR files; focus on user's source code
- **IDE-based reproduction** - Instruct users to reproduce via IDE actions, not CLI commands
- **Wait for user** - After asking user to trigger/reproduce, STOP your turn and wait for their response
## Example Debugging Session
```
User: "My application crashes with a NullPointerException in calculateTotal()"
Agent: Let me find the code...
[semantic_search → read_file with showLineNumbers=true → finds Calculator.java]
[debugger(action="set_breakpoint", file="Calculator.java", line=42) - at calculateTotal() entry]
Breakpoint set at calculateTotal(). Please start the application in debug mode and trigger the issue by clicking the "Calculate Total" button.
User: "It hit the breakpoint"
Agent: [debugger(action="get_state") - confirms session active]
[debugger(action="get_variables", depth=1)]
→ 'items' is null
[debugger(action="get_stack_trace")]
→ called from initializeCart()
Let me check where items gets initialized...
[debugger(action="remove_breakpoint", file="Calculator.java", line=42)]
[debugger(action="set_breakpoint", file="Calculator.java", line=25) - at initializeCart()]
Please trigger the issue again.
User: "Done"
Agent: [debugger(action="get_variables")]
→ dataSource.fetchItems() returned null (connection timeout)
[debugger(action="step_over")]
→ null assigned to items
[debugger(action="remove_breakpoint", file="Calculator.java", line=25)]
## Root Cause
The data source returns null on connection timeout, which propagates to calculateTotal() causing the NPE.
## Recommended Fixes
1. Add timeout error handling in [DataSource.fetchItems()](src/DataSource.java#L45) to throw `DataSourceException` instead of returning null
2. Add null validation in [Calculator.initializeCart()](src/Calculator.java#L25) with meaningful error message
3. Consider adding retry logic with exponential backoff for transient connection failures
```

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
from marimo._metadata.opengraph import (
DEFAULT_OPENGRAPH_PLACEHOLDER_IMAGE_GENERATOR,
OpenGraphMetadata,
default_opengraph_image,
resolve_opengraph_metadata,
)
__all__ = [
"DEFAULT_OPENGRAPH_PLACEHOLDER_IMAGE_GENERATOR",
"OpenGraphMetadata",
"default_opengraph_image",
"resolve_opengraph_metadata",
]
# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
import ast
import asyncio
import importlib
import inspect
import re
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Callable, Literal, cast
from urllib.parse import urlparse
import msgspec
from marimo import _loggers
from marimo._utils.paths import normalize_path
from marimo._utils.scripts import read_pyproject_from_script
LOGGER = _loggers.marimo_logger()
DEFAULT_OPENGRAPH_IMAGE_FILENAME = "opengraph.png"
_WORD_SPLIT_RE = re.compile(r"[_-]+")
_MARIMO_GREEN = "#59b39a"
class OpenGraphMetadata(msgspec.Struct, rename="camel"):
"""OpenGraph-style metadata for a notebook.
The `image` field may be either:
- a relative path (typically under `__marimo__/`), or
- an absolute HTTPS URL.
"""
title: str | None = None
description: str | None = None
image: str | None = None
@dataclass(frozen=True)
class OpenGraphConfig:
"""Declarative configuration for resolving notebook OpenGraph metadata."""
title: str | None = None
description: str | None = None
image: str | None = None
generator: str | None = None
def _maybe_str(value: Any) -> str | None:
return value if isinstance(value, str) else None
def is_https_url(value: str) -> bool:
"""Return True if value is an absolute HTTPS URL."""
try:
parsed = urlparse(value)
except Exception:
return False
return parsed.scheme == "https" and bool(parsed.netloc)
def _normalize_opengraph_image(value: str | None) -> str | None:
"""Normalize an opengraph image value to a safe path (typically under `__marimo__/`) or HTTPS URL."""
if value is None:
return None
if is_https_url(value):
return value
# Disallow URLs with other schemes (e.g. http, data, file).
parsed = urlparse(value)
if parsed.scheme:
return None
path = Path(value)
if path.is_absolute():
return None
return value
OpenGraphMode = Literal["run", "edit"]
@dataclass(frozen=True)
class OpenGraphContext:
"""Context passed to OpenGraph generator functions."""
filepath: str
# File router key (often a workspace-relative path); may be None.
file_key: str | None = None
# Server base URL (e.g. http://localhost:2718); may be None in CLI contexts.
base_url: str | None = None
mode: OpenGraphMode | None = None
OpenGraphGeneratorReturn = OpenGraphMetadata | dict[str, Any] | None
OpenGraphGenerator = Callable[..., OpenGraphGeneratorReturn]
OpenGraphGeneratorArity = Literal[0, 1, 2]
@dataclass(frozen=True)
class OpenGraphGeneratorSpec:
fn: OpenGraphGenerator
arity: OpenGraphGeneratorArity
def read_opengraph_from_pyproject(
pyproject: dict[str, Any],
) -> OpenGraphConfig | None:
"""Extract OpenGraph metadata from a parsed PEP 723 pyproject dict."""
tool = pyproject.get("tool")
if not isinstance(tool, dict):
return None
marimo = tool.get("marimo")
if not isinstance(marimo, dict):
return None
opengraph = marimo.get("opengraph")
if not isinstance(opengraph, dict):
return None
config = OpenGraphConfig(
title=_maybe_str(opengraph.get("title")),
description=_maybe_str(opengraph.get("description")),
image=_normalize_opengraph_image(_maybe_str(opengraph.get("image"))),
generator=_maybe_str(opengraph.get("generator")),
)
if (
config.title is None
and config.description is None
and config.image is None
and config.generator is None
):
return None
return config
def read_opengraph_from_file(filepath: str) -> OpenGraphConfig | None:
"""Read OpenGraph metadata from a notebook's PEP 723 header."""
try:
script = Path(filepath).read_text(encoding="utf-8")
project = read_pyproject_from_script(script) or {}
except Exception:
# Parsing errors are treated as "no metadata" so that listing and thumbnail generation don't spam warnings on malformed headers.
return None
return read_opengraph_from_pyproject(project)
def _title_case(text: str) -> str:
return text[:1].upper() + text[1:].lower()
def derive_title_from_path(filepath: str) -> str:
stem = Path(filepath).stem
return " ".join(
_title_case(part) for part in _WORD_SPLIT_RE.split(stem) if part
)
def default_opengraph_image(filepath: str) -> str:
"""Return the default relative image path for a given notebook."""
stem = Path(filepath).stem
return f"__marimo__/assets/{stem}/{DEFAULT_OPENGRAPH_IMAGE_FILENAME}"
def _default_image_exists(filepath: str) -> bool:
notebook_dir = normalize_path(Path(filepath)).parent
return (notebook_dir / default_opengraph_image(filepath)).is_file()
def _merge_opengraph_metadata(
parent: OpenGraphMetadata,
override: OpenGraphMetadata | None,
) -> OpenGraphMetadata:
"""Merge two metadata objects with override values taking precedence."""
if override is None:
return parent
def coalesce(a: Any, b: Any) -> Any:
return a if a is not None else b
return OpenGraphMetadata(
title=coalesce(override.title, parent.title),
description=coalesce(override.description, parent.description),
image=coalesce(override.image, parent.image),
)
def _coerce_opengraph_metadata(value: Any) -> OpenGraphMetadata | None:
"""Coerce a generator return value into OpenGraphMetadata."""
if value is None:
return None
if isinstance(value, OpenGraphMetadata):
return value
if isinstance(value, dict):
image = _maybe_str(value.get("image"))
if image is None:
image = _maybe_str(value.get("imageUrl"))
return OpenGraphMetadata(
title=_maybe_str(value.get("title")),
description=_maybe_str(value.get("description")),
image=_normalize_opengraph_image(image),
)
return None
def _parse_generator_signature(
fn: OpenGraphGenerator, *, generator: str
) -> OpenGraphGeneratorSpec | None:
"""Validate a generator signature and return a normalized call spec."""
if asyncio.iscoroutinefunction(fn):
LOGGER.warning(
"OpenGraph generator must be synchronous: %s", generator
)
return None
try:
sig = inspect.signature(fn)
except Exception as e:
LOGGER.warning(
"Failed to inspect OpenGraph generator signature (%s): %s",
generator,
e,
)
return None
params = tuple(sig.parameters.values())
unsupported = tuple(
param
for param in params
if param.kind
in (
inspect.Parameter.VAR_POSITIONAL,
inspect.Parameter.VAR_KEYWORD,
inspect.Parameter.KEYWORD_ONLY,
)
)
if unsupported:
LOGGER.warning(
"OpenGraph generator signature must use 0-2 positional args: %s",
generator,
)
return None
positional = tuple(
param
for param in params
if param.kind
in (
inspect.Parameter.POSITIONAL_ONLY,
inspect.Parameter.POSITIONAL_OR_KEYWORD,
)
)
if len(positional) > 2:
LOGGER.warning(
"OpenGraph generator signature must accept at most 2 args: %s",
generator,
)
return None
arity = cast(OpenGraphGeneratorArity, len(positional))
return OpenGraphGeneratorSpec(fn=fn, arity=arity)
def _load_generator_from_module(
module_spec: str, name: str, *, generator: str
) -> OpenGraphGeneratorSpec | None:
try:
module = importlib.import_module(module_spec)
except Exception as e:
LOGGER.warning("Failed to import OpenGraph generator module: %s", e)
return None
attr = getattr(module, name, None)
if attr is None:
LOGGER.warning(
"OpenGraph generator %s not found in module %s", name, module_spec
)
return None
if not callable(attr):
LOGGER.warning("OpenGraph generator is not callable: %s", generator)
return None
return _parse_generator_signature(
cast(OpenGraphGenerator, attr), generator=generator
)
def _load_generator_from_notebook_source(
notebook_path: str, name: str
) -> OpenGraphGeneratorSpec | None:
"""Load a generator function from the notebook source without executing it.
We compile and exec a small synthetic module containing only:
- import statements (so the generator can import deps)
- the named function definition
"""
try:
source = Path(notebook_path).read_text(encoding="utf-8")
except Exception as e:
LOGGER.warning(
"Failed to read notebook when loading OpenGraph generator: %s", e
)
return None
try:
module_ast = ast.parse(source, filename=notebook_path)
except Exception as e:
LOGGER.warning(
"Failed to parse notebook when loading OpenGraph generator: %s", e
)
return None
def is_setup_expr(expr: ast.expr) -> bool:
if isinstance(expr, ast.Attribute):
return (
isinstance(expr.value, ast.Name)
and expr.value.id == "app"
and expr.attr == "setup"
)
if isinstance(expr, ast.Call):
return is_setup_expr(expr.func)
return False
imports: list[ast.stmt] = []
setup: list[ast.stmt] = []
target: ast.FunctionDef | ast.AsyncFunctionDef | None = None
for node in module_ast.body:
if isinstance(node, (ast.Import, ast.ImportFrom)):
imports.append(node)
elif isinstance(node, ast.With) and len(node.items) == 1:
context_expr = node.items[0].context_expr
if is_setup_expr(context_expr):
# Inline the setup block body so that dependencies imported under `with app.setup:`
# are available to the generator, without invoking marimo's setup cell registration.
setup.extend(node.body)
elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
if node.name == name:
target = node
if target is None:
LOGGER.warning(
"OpenGraph generator %s not found in notebook %s",
name,
notebook_path,
)
return None
# Ignore decorators so we don't execute notebook/app registration logic.
# Metadata generators are treated as plain Python functions.
if getattr(target, "decorator_list", None):
target.decorator_list = []
extracted = ast.Module(body=[*imports, *setup, target], type_ignores=[])
ast.fix_missing_locations(extracted)
namespace: dict[str, Any] = {}
try:
exec(compile(extracted, notebook_path, "exec"), namespace)
except Exception as e:
LOGGER.warning("Failed to exec OpenGraph generator stub: %s", e)
return None
fn = namespace.get(name)
if not callable(fn):
LOGGER.warning(
"OpenGraph generator %s is not callable (in %s)",
name,
notebook_path,
)
return None
return _parse_generator_signature(
cast(OpenGraphGenerator, fn), generator=name
)
def _load_opengraph_generator(
generator: str, *, notebook_path: str
) -> OpenGraphGeneratorSpec | None:
"""Resolve a generator string into a callable.
Supported forms:
- "module.submodule:function"
- "module.submodule.function"
- "function_name" (loaded from notebook source via AST extraction)
"""
value = generator.strip()
if not value:
return None
module_spec: str | None
name: str
if ":" in value:
module_spec, name = value.split(":", 1)
module_spec = module_spec.strip()
name = name.strip()
elif "." in value:
module_spec, name = value.rsplit(".", 1)
module_spec = module_spec.strip()
name = name.strip()
else:
return _load_generator_from_notebook_source(notebook_path, value)
if not module_spec or not name:
return None
# Disallow filesystem-based generator specs to keep behavior predictable
if (
module_spec.endswith(".py")
or "/" in module_spec
or "\\" in module_spec
):
LOGGER.warning(
"OpenGraph generator must be importable as a Python module: %s",
generator,
)
return None
return _load_generator_from_module(module_spec, name, generator=generator)
def _call_opengraph_generator(
spec: OpenGraphGeneratorSpec,
*,
context: OpenGraphContext,
parent: OpenGraphMetadata,
) -> OpenGraphGeneratorReturn:
"""Invoke a generator with a stable calling convention."""
if spec.arity == 2:
return spec.fn(context, parent)
if spec.arity == 1:
return spec.fn(context)
return spec.fn()
def _run_opengraph_generator(
generator: str,
*,
context: OpenGraphContext,
parent: OpenGraphMetadata,
) -> OpenGraphMetadata | None:
spec = _load_opengraph_generator(generator, notebook_path=context.filepath)
if spec is None:
return None
try:
result = _call_opengraph_generator(
spec, context=context, parent=parent
)
except Exception as e:
LOGGER.warning("OpenGraph generator raised: %s", e)
return None
if inspect.isawaitable(result):
# Avoid "coroutine was never awaited" warnings.
close = getattr(result, "close", None)
if callable(close):
try:
close()
except Exception:
pass
LOGGER.warning(
"OpenGraph generator returned an awaitable (must be sync): %s",
generator,
)
return None
dynamic = _coerce_opengraph_metadata(result)
if dynamic is None:
LOGGER.warning(
"OpenGraph generator returned unsupported value: %s", type(result)
)
return None
return dynamic
def resolve_opengraph_metadata(
filepath: str,
*,
app_title: str | None = None,
context: OpenGraphContext | None = None,
) -> OpenGraphMetadata:
"""Resolve OpenGraph metadata from config, defaults, and a generator hook."""
declared = read_opengraph_from_file(filepath) or OpenGraphConfig()
title = declared.title or app_title or derive_title_from_path(filepath)
description = declared.description
image = _normalize_opengraph_image(declared.image)
if image is None and _default_image_exists(filepath):
image = default_opengraph_image(filepath)
resolved = OpenGraphMetadata(
title=title,
description=description,
image=image,
)
if declared.generator:
ctx = context or OpenGraphContext(filepath=filepath)
dynamic = _run_opengraph_generator(
declared.generator, context=ctx, parent=resolved
)
resolved = _merge_opengraph_metadata(resolved, dynamic)
return resolved
def _xml_escape(text: str) -> str:
return (
text.replace("&", "&amp;")
.replace("<", "&lt;")
.replace(">", "&gt;")
.replace('"', "&quot;")
.replace("'", "&apos;")
)
def _wrap_title_lines(title: str, *, max_chars: int = 32) -> list[str]:
words = title.split()
if not words:
return ["marimo"]
lines: list[str] = []
current: list[str] = []
current_len = 0
for word in words:
extra = (1 if current else 0) + len(word)
if current and current_len + extra > max_chars:
lines.append(" ".join(current))
current = [word]
current_len = len(word)
else:
current.append(word)
current_len += extra
if current:
lines.append(" ".join(current))
# Keep the placeholder compact.
if len(lines) > 3:
lines = lines[:3]
lines[-1] = lines[-1].rstrip(".") + "..."
return lines
@dataclass(frozen=True)
class OpenGraphImage:
content: bytes
media_type: str
@dataclass(frozen=True)
class DefaultOpenGraphPlaceholderImageGenerator:
"""Generate a deterministic placeholder thumbnail image."""
width: int = 1200
height: int = 630
def __call__(self, title: str) -> OpenGraphImage:
svg = self._render_svg(title)
return OpenGraphImage(
content=svg.encode("utf-8"),
media_type="image/svg+xml",
)
def _render_svg(self, title: str) -> str:
accent = _MARIMO_GREEN
lines = _wrap_title_lines(title)
escaped = [_xml_escape(line) for line in lines]
# Center the title inside an inset card.
card_x = 48
card_y = 48
card_w = self.width - 2 * card_x
card_h = self.height - 2 * card_y
stripe_w = 16
line_height = 72
block_height = line_height * len(escaped)
start_y = card_y + int((card_h - block_height) / 2) + 56
text_x = card_x + stripe_w + 36
text_nodes: list[str] = []
for i, line in enumerate(escaped):
y = start_y + i * line_height
text_nodes.append(
f'<text x="{text_x}" y="{y}" font-size="60">{line}</text>'
)
text_svg = "\n ".join(text_nodes)
return f"""<svg xmlns="http://www.w3.org/2000/svg" width="{self.width}" height="{self.height}" viewBox="0 0 {self.width} {self.height}">
<defs>
<clipPath id="card">
<rect x="{card_x}" y="{card_y}" width="{card_w}" height="{card_h}" rx="24" />
</clipPath>
</defs>
<rect width="{self.width}" height="{self.height}" fill="#f8fafc"/>
<rect x="{card_x}" y="{card_y}" width="{card_w}" height="{card_h}" rx="24" fill="#ffffff" stroke="#e2e8f0" stroke-width="2"/>
<rect x="{card_x}" y="{card_y}" width="{stripe_w}" height="{card_h}" fill="{accent}" clip-path="url(#card)"/>
<g fill="#0f172a" font-family="ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial" font-weight="700">
{text_svg}
</g>
<text x="{text_x}" y="{card_y + card_h - 32}" fill="#64748b" font-family="ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial" font-size="22" font-weight="600">
marimo
</text>
</svg>
"""
DEFAULT_OPENGRAPH_PLACEHOLDER_IMAGE_GENERATOR = (
DefaultOpenGraphPlaceholderImageGenerator()
)
import marimo
app = marimo.App()
@app.cell
def _():
import marimo as mo
import pandas as pd
return mo, pd
@app.cell
def _(mo):
data_version, set_data_version = mo.state(0)
return data_version, set_data_version
@app.cell
def _():
data = [
{"id": 1, "status": "pending", "value": 10},
{"id": 2, "status": "pending", "value": 20},
{"id": 3, "status": "pending", "value": 30},
{"id": 4, "status": "pending", "value": 40},
]
return (data,)
@app.cell
def _(data, data_version, mo, pd):
_ = data_version()
df = pd.DataFrame(data)
table = mo.ui.table(df, selection="single", page_size=3)
mo.output.replace(table)
return (table,)
@app.cell
def _(mo):
approve_btn = mo.ui.run_button(label="Approve")
mo.output.replace(approve_btn)
return (approve_btn,)
@app.cell
def _(approve_btn, data, set_data_version, table):
import time
if approve_btn.value:
_sel = table.value
if _sel is not None and len(_sel) > 0:
_id = _sel.iloc[0]["id"]
for item in data:
if item["id"] == _id:
item["status"] = "approved"
break
set_data_version(time.time())
return
if __name__ == "__main__":
app.run()
import marimo
__generated_with = "0.19.6"
app = marimo.App(width="medium")
@app.cell
def _():
import marimo as mo
return (mo,)
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
# Incrementing functions
Bug from [#704](https://github.com/marimo-team/marimo/discussions/704)
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""
\begin{align}
B' &=-\nabla \times E,\\
E' &=\nabla \times B - 4\pi j\\
e^{\pi i} + 1 = 0
\end{align}
""")
return
if __name__ == "__main__":
app.run()
---
title: Latex
marimo-version: 0.19.6
header: |-
# Copyright 2026 Marimo. All rights reserved.
---
```python {.marimo}
import marimo as mo
```
# LaTeX Smoke Test
This notebook tests various LaTeX writing styles and configurations.
<!---->
## 1. Inline Math Delimiters
Different ways to write inline math:
<!---->
- Dollar signs: The equation $E = mc^2$ is famous.
- Backslash parens: The equation \(E = mc^2\) also works.
- With spaces: $ a + b = c $ (spaces around content).
- Complex inline: $\frac{x^2}{y^2} + \sqrt{z}$ in a sentence.
<!---->
## 2. Display Math Delimiters
Different ways to write display/block math:
<!---->
Double dollar signs:
$$
f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$
<!---->
Backslash brackets:
\[
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
\]
<!---->
Inline display (no newlines): \[ x^2 + y^2 = z^2 \]
<!---->
## 3. LaTeX Environments
<!---->
### Align environment (multi-line equations):
\begin{align}
B' &= -\nabla \times E \\
E' &= \nabla \times B - 4\pi j \\
e^{\pi i} + 1 &= 0
\end{align}
<!---->
### Equation environment:
\begin{equation}
\mathcal{L} = \int_\Omega \left( \frac{1}{2} |\nabla u|^2 - f u \right) dx
\end{equation}
<!---->
### Matrix environments:
Regular matrix: $\begin{matrix} a & b \\ c & d \end{matrix}$
Parentheses: $\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$
Brackets: $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$
Determinant: $\begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc$
<!---->
### Cases environment:
$$
|x| = \begin{cases}
x & \text{if } x \geq 0 \\
-x & \text{if } x < 0
\end{cases}
$$
<!---->
## 4. Greek Letters and Symbols
<!---->
- Lowercase: $\alpha, \beta, \gamma, \delta, \epsilon, \zeta, \eta, \theta$
- More: $\iota, \kappa, \lambda, \mu, \nu, \xi, \pi, \rho, \sigma, \tau$
- And: $\upsilon, \phi, \chi, \psi, \omega$
- Uppercase: $\Gamma, \Delta, \Theta, \Lambda, \Xi, \Pi, \Sigma, \Phi, \Psi, \Omega$
- Operators: $\partial, \nabla, \infty, \forall, \exists, \emptyset$
- Relations: $\leq, \geq, \neq, \approx, \equiv, \sim, \propto$
- Arrows: $\leftarrow, \rightarrow, \leftrightarrow, \Rightarrow, \Leftrightarrow$
<!---->
## 5. Common Mathematical Expressions
<!---->
### Fractions and roots:
$$\frac{a}{b}, \quad \frac{x+1}{x-1}, \quad \dfrac{\partial f}{\partial x}$$
$$\sqrt{x}, \quad \sqrt[3]{x}, \quad \sqrt{x^2 + y^2}$$
<!---->
### Subscripts and superscripts:
$$x_i, \quad x^2, \quad x_i^2, \quad x_{i,j}^{(n)}, \quad e^{i\pi}$$
<!---->
### Sums, products, integrals, limits:
$$\sum_{i=1}^{n} x_i, \quad \prod_{i=1}^{n} x_i, \quad \int_a^b f(x)\,dx, \quad \lim_{x \to \infty} f(x)$$
$$\iint_D f(x,y)\,dx\,dy, \quad \oint_C \vec{F} \cdot d\vec{r}$$
<!---->
### Brackets and delimiters:
$$\left( \frac{a}{b} \right), \quad \left[ \frac{a}{b} \right], \quad \left\{ \frac{a}{b} \right\}$$
$$\left\langle \psi | \phi \right\rangle, \quad \left\| \vec{v} \right\|, \quad \left\lfloor x \right\rfloor, \quad \left\lceil x \right\rceil$$
<!---->
## 6. Chemistry (mhchem)
Using the mhchem extension for chemical equations:
<!---->
- Water: $\ce{H2O}$
- Sulfuric acid: $\ce{H2SO4}$
- Chemical reaction: $\ce{2H2 + O2 -> 2H2O}$
- Equilibrium: $\ce{N2 + 3H2 <=> 2NH3}$
- Isotopes: $\ce{^{14}C}$, $\ce{^{238}U}$
<!---->
## 7. Edge Cases
<!---->
### Math in lists:
1. First item: $a^2 + b^2 = c^2$
2. Second item: $\sin^2\theta + \cos^2\theta = 1$
3. Third item: $e^{i\theta} = \cos\theta + i\sin\theta$
- Bullet with math: $\vec{F} = m\vec{a}$
- Another: $\nabla \cdot \vec{E} = \frac{\rho}{\epsilon_0}$
<!---->
### Multiple inline math in one paragraph:
The function $f(x) = x^2$ has derivative $f'(x) = 2x$ and second derivative $f''(x) = 2$.
At $x = 0$, we have $f(0) = 0$, $f'(0) = 0$, and $f''(0) = 2 > 0$, so $x = 0$ is a local minimum.
<!---->
### Special characters that need escaping:
- Percent: $100\%$ confidence
- Ampersand in align: handled by environment
- Backslash: $\backslash$
- Tilde: $\tilde{x}$, $\widetilde{xyz}$
- Hat: $\hat{x}$, $\widehat{xyz}$
- Bar: $\bar{x}$, $\overline{xyz}$
<!---->
## 8. Real-World Examples
<!---->
### Euler's identity (the most beautiful equation):
$$e^{i\pi} + 1 = 0$$
<!---->
### Quadratic formula:
The solutions to $ax^2 + bx + c = 0$ are:
$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
<!---->
### Gaussian integral:
$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$
<!---->
### Maxwell's equations:
\begin{align}
\nabla \cdot \vec{E} &= \frac{\rho}{\epsilon_0} \\
\nabla \cdot \vec{B} &= 0 \\
\nabla \times \vec{E} &= -\frac{\partial \vec{B}}{\partial t} \\
\nabla \times \vec{B} &= \mu_0 \vec{J} + \mu_0 \epsilon_0 \frac{\partial \vec{E}}{\partial t}
\end{align}
<!---->
### Schrödinger equation:
$$i\hbar\frac{\partial}{\partial t}\Psi(\vec{r},t) = \hat{H}\Psi(\vec{r},t) = \left[-\frac{\hbar^2}{2m}\nabla^2 + V(\vec{r},t)\right]\Psi(\vec{r},t)$$
<!---->
### Bayes' theorem:
$$P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}$$
<!---->
### Taylor series:
$$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots$$
import{t as e}from"./save-worker-CtJsIYIM.js";var t=e(((e,t)=>{t.exports={}}));export default t();
import{t as e}from"./worker-BPV9SmHz.js";var t=e(((e,t)=>{t.exports={}}));export default t();

Sorry, the diff of this file is too big to display

var Ue=Object.defineProperty;var Ke=(t,e,s)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var ne=(t,e,s)=>Ke(t,typeof e!="symbol"?e+"":e,s);import{s as me}from"./chunk-LvLJmgfZ.js";import{t as We}from"./react-Bj1aDYRI.js";import{Cn as h,ft as He,w as Me}from"./cells-DPp5cDaO.js";import{D as oe,P as p,R as d,T as v,_ as ue,i as Qe,k as m,m as Ge}from"./zod-H_cgTO0M.js";import{t as be}from"./compiler-runtime-B3qBwwSJ.js";import{S as Ve}from"./_Uint8Array-BGESiCQL.js";import{t as re}from"./assertNever-CBU83Y6o.js";import{r as ze,t as Je}from"./_baseEach-BhAgFun2.js";import{f as Ye}from"./hotkeys-BHHWjLlp.js";import{t as Xe}from"./jsx-runtime-ZmTK25f3.js";import{t as ie}from"./button-CZ3Cs4qb.js";import{t as fe}from"./cn-BKtXLv3a.js";import{t as Ze}from"./circle-plus-haI9GLDP.js";import{a as ae,c as ge,o as et,p as tt,r as st,t as nt}from"./dropdown-menu-ldcmQvIV.js";import{n as ot}from"./DeferredRequestRegistry-CMf25YiV.js";import{o as rt,r as it}from"./input-DUrq2DiR.js";import{a as at,c as ct,d as lt,g as dt,l as ht,o as pt,p as mt,s as ut,u as bt}from"./textarea-CRI7xDBj.js";import{c as ft,i as gt,n as yt,r as _t,s as St,t as wt}from"./select-BVdzZKAh.js";import{a as xt,c as kt,l as $t,n as Ct,r as At,t as jt}from"./dialog-eb-NieZw.js";import{n as vt}from"./ImperativeModal-BNN1HA7x.js";import{t as Rt}from"./links-7AQBmdyV.js";import{n as It}from"./useAsyncData-BMGLSTg8.js";import{o as Tt}from"./focus-C1YokgL7.js";import{o as Dt,t as qt,u as i}from"./form-BidPUZUn.js";import{t as Lt}from"./request-registry-C5_pVc8Y.js";import{n as Pt,t as Nt}from"./write-secret-modal-1fGKmd5H.js";function Ft(t,e,s,o){for(var n=-1,a=t==null?0:t.length;++n<a;){var c=t[n];e(o,c,s(c),t)}return o}var Et=Ft;function Bt(t,e,s,o){return Je(t,function(n,a,c){e(o,n,s(n),c)}),o}var Ot=Bt;function Ut(t,e){return function(s,o){var n=Ve(s)?Et:Ot,a=e?e():{};return n(s,t,ze(o,2),a)}}var Kt=Ut(function(t,e,s){t[s?0:1].push(e)},function(){return[[],[]]});function k(){return d().optional().describe(i.of({label:"Password",inputType:"password",placeholder:"password",optionRegex:".*password.*"}))}function ce(t,e){let s=d();return s=e?s.nonempty():s.optional(),s=s.describe(i.of({label:t||"Token",inputType:"password",placeholder:"token",optionRegex:".*token.*"})),s}function G(){return d().optional().describe(i.of({label:"Warehouse Name",placeholder:"warehouse",optionRegex:".*warehouse.*"}))}function le(t,e){let s=d();return s=e?s.nonempty():s.optional(),s.describe(i.of({label:t||"URI",optionRegex:".*uri.*"}))}function x(t){return d().nonempty().describe(i.of({label:t||"Host",placeholder:"localhost",optionRegex:".*host.*"}))}function w(){return d().describe(i.of({label:"Database",placeholder:"db name",optionRegex:".*database.*"}))}function Wt(){return d().describe(i.of({label:"Schema",placeholder:"schema name",optionRegex:".*schema.*"}))}function $(){return d().nonempty().describe(i.of({label:"Username",placeholder:"username",optionRegex:".*username.*"}))}function C(t){let e=Qe().describe(i.of({label:"Port",inputType:"number",placeholder:t==null?void 0:t.toString()})).transform(Number).refine(s=>s>=0&&s<=65535,{message:"Port must be between 0 and 65535"});return t===void 0?e:e.default(t)}function ye(){return v().default(!1).describe(i.of({label:"Read Only"}))}const _e=p({type:m("postgres"),host:x(),port:C(5432).optional(),database:w(),username:$(),password:k(),ssl:v().default(!1).describe(i.of({label:"Use SSL"}))}).describe(i.of({direction:"two-columns"})),Se=p({type:m("mysql"),host:x(),port:C(3306),database:w(),username:$(),password:k(),ssl:v().default(!1).describe(i.of({label:"Use SSL"}))}).describe(i.of({direction:"two-columns"})),we=p({type:m("sqlite"),database:w().describe(i.of({label:"Database Path"}))}).describe(i.of({direction:"two-columns"})),xe=p({type:m("duckdb"),database:w().describe(i.of({label:"Database Path"})),read_only:ye()}).describe(i.of({direction:"two-columns"})),ke=p({type:m("motherduck"),database:w().default("my_db").describe(i.of({label:"Database Name"})),token:ce()}).describe(i.of({direction:"two-columns"})),$e=p({type:m("snowflake"),account:d().nonempty().describe(i.of({label:"Account",optionRegex:".*snowflake.*"})),warehouse:d().optional().describe(i.of({label:"Warehouse",optionRegex:".*snowflake.*"})),database:w(),schema:d().optional().describe(i.of({label:"Schema",optionRegex:".*snowflake.*"})),username:$(),password:k(),role:d().optional().describe(i.of({label:"Role"}))}).describe(i.of({direction:"two-columns"})),Ce=p({type:m("bigquery"),project:d().nonempty().describe(i.of({label:"Project ID",optionRegex:".*bigquery.*"})),dataset:d().nonempty().describe(i.of({label:"Dataset",optionRegex:".*bigquery.*"})),credentials_json:d().describe(i.of({label:"Credentials JSON",inputType:"textarea"}))}).describe(i.of({direction:"two-columns"})),Ae=p({type:m("clickhouse_connect"),host:x(),port:C(8123).optional(),username:$(),password:k(),secure:v().default(!1).describe(i.of({label:"Use HTTPs"})),proxy_path:d().optional().describe(i.of({label:"Proxy Path",placeholder:"/clickhouse"}))}).describe(i.of({direction:"two-columns"})),je=p({type:m("timeplus"),host:x().default("localhost"),port:C(8123).optional(),username:$().default("default"),password:k().default("")}).describe(i.of({direction:"two-columns"})),ve=p({type:m("chdb"),database:w().describe(i.of({label:"Database Path"})),read_only:ye()}).describe(i.of({direction:"two-columns"})),Re=p({type:m("trino"),host:x(),port:C(8080),database:w(),schema:Wt().optional(),username:$(),password:k(),async_support:v().default(!1).describe(i.of({label:"Async Support"}))}).describe(i.of({direction:"two-columns"})),Ie=p({type:m("iceberg"),name:d().describe(i.of({label:"Catalog Name"})),catalog:oe("type",[p({type:m("REST"),warehouse:G(),uri:d().optional().describe(i.of({label:"URI",placeholder:"https://",optionRegex:".*uri.*"})),token:ce()}),p({type:m("SQL"),warehouse:G(),uri:d().optional().describe(i.of({label:"URI",placeholder:"jdbc:iceberg://host:port/database",optionRegex:".*uri.*"}))}),p({type:m("Hive"),warehouse:G(),uri:le()}),p({type:m("Glue"),warehouse:G(),uri:le()}),p({type:m("DynamoDB"),"dynamodb.profile-name":d().optional().describe(i.of({label:"Profile Name"})),"dynamodb.region":d().optional().describe(i.of({label:"Region"})),"dynamodb.access-key-id":d().optional().describe(i.of({label:"Access Key ID"})),"dynamodb.secret-access-key":d().optional().describe(i.of({label:"Secret Access Key",inputType:"password"})),"dynamodb.session-token":d().optional().describe(i.of({label:"Session Token",inputType:"password"}))})]).default({type:"REST",token:void 0}).describe(i.of({special:"tabs"}))}),Te=p({type:m("datafusion"),sessionContext:v().optional().describe(i.of({label:"Use Session Context"}))}),De=p({type:m("pyspark"),host:x().optional(),port:C().optional()}),qe=p({type:m("redshift"),host:x(),port:C(5439),connectionType:oe("type",[p({type:m("IAM credentials"),region:d().describe(i.of({label:"Region"})),aws_access_key_id:d().nonempty().describe(i.of({label:"AWS Access Key ID",inputType:"password",optionRegex:".*aws_access_key_id.*"})),aws_secret_access_key:d().nonempty().describe(i.of({label:"AWS Secret Access Key",inputType:"password",optionRegex:".*aws_secret_access_key.*"})),aws_session_token:d().optional().describe(i.of({label:"AWS Session Token",inputType:"password",optionRegex:".*aws_session_token.*"}))}),p({type:m("DB credentials"),user:$(),password:k()})]).default({type:"IAM credentials",aws_access_key_id:"",aws_secret_access_key:"",region:""}),database:w()}).describe(i.of({direction:"two-columns"})),Le=p({type:m("databricks"),access_token:ce("Access Token",!0),server_hostname:x("Server Hostname"),http_path:le("HTTP Path",!0),catalog:d().optional().describe(i.of({label:"Catalog"})),schema:d().optional().describe(i.of({label:"Schema"}))}).describe(i.of({direction:"two-columns"})),Pe=p({type:m("supabase"),host:x(),port:C(5432).optional(),database:w(),username:$(),password:k(),disable_client_pooling:v().default(!1).describe(i.of({label:"Disable Client-Side Pooling"}))}).describe(i.of({direction:"two-columns"})),Ht=oe("type",[_e,Se,we,xe,ke,$e,Ce,Ae,je,ve,Re,Ie,Te,De,qe,Le,Pe]);var de="env:";function tn(t){return t}function V(t){return typeof t=="string"?t.startsWith(de):!1}function he(t){return`${de}${t}`}function Mt(t){return t.replace(de,"")}const Ne={sqlmodel:"SQLModel",sqlalchemy:"SQLAlchemy",duckdb:"DuckDB",clickhouse_connect:"ClickHouse Connect",chdb:"chDB",pyiceberg:"PyIceberg",ibis:"Ibis",motherduck:"MotherDuck",redshift:"Redshift",databricks:"Databricks"};var y=class{constructor(t,e,s){this.connection=t,this.orm=e,this.secrets=s}get imports(){let t=new Set(this.generateImports());switch(this.orm){case"sqlalchemy":t.add("import sqlalchemy");break;case"sqlmodel":t.add("import sqlmodel");break;case"duckdb":t.add("import duckdb");break;case"ibis":t.add("import ibis");break}return t}},Qt=t=>`_${t}`,Gt=class{constructor(){ne(this,"secrets",{})}get imports(){return Object.keys(this.secrets).length===0?new Set:new Set(["import os"])}print(t,e,s){if(t=Qt(t),V(e)){let o=Mt(e),n=s?`os.environ.get("${o}", "${s}")`:`os.environ.get("${o}")`;return this.secrets[t]=n,t}if(s!=null){let o=`os.environ.get("${e}", "${s}")`;return this.secrets[t]=o,t}return typeof e=="number"||typeof e=="number"?`${e}`:typeof e=="boolean"?U(e):e?`"${e}"`:""}printInFString(t,e,s){if(e===void 0)return"";if(typeof e=="number")return`${e}`;if(typeof e=="boolean")return U(e);let o=this.print(t,e,s);return o.startsWith('"')&&o.endsWith('"')?o.slice(1,-1):`{${o}}`}printPassword(t,e,s,o){let n=s?this.printInFString.bind(this):this.print.bind(this);return V(t)?n(o||"password",t):n(o||"password",e,t)}getSecrets(){return this.secrets}formatSecrets(){return Object.keys(this.secrets).length===0?"":Object.entries(this.secrets).map(([t,e])=>`${t} = ${e}`).join(`
`)}},Vt=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.connection.ssl?", connect_args={'sslmode': 'require'}":"",e=this.secrets.printPassword(this.connection.password,"POSTGRES_PASSWORD",!0);return h(`
DATABASE_URL = f"postgresql://${this.secrets.printInFString("username",this.connection.username)}:${e}@${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}/${this.secrets.printInFString("database",this.connection.database)}"
engine = ${this.orm}.create_engine(DATABASE_URL${t})
`)}},zt=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.connection.ssl?", connect_args={'ssl': {'ssl-mode': 'preferred'}}":"",e=this.secrets.printPassword(this.connection.password,"MYSQL_PASSWORD",!0),s=this.secrets.printInFString("database",this.connection.database);return h(`
DATABASE_URL = f"mysql+pymysql://${this.secrets.printInFString("username",this.connection.username)}:${e}@${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}/${s}"
engine = ${this.orm}.create_engine(DATABASE_URL${t})
`)}},Jt=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.connection.database?this.secrets.printInFString("database",this.connection.database):"";return h(`
${t.startsWith("{")&&t.endsWith("}")?`DATABASE_URL = f"sqlite:///${t}"`:`DATABASE_URL = "sqlite:///${t}"`}
engine = ${this.orm}.create_engine(DATABASE_URL)
`)}},Yt=class extends y{generateImports(){return["from snowflake.sqlalchemy import URL"]}generateConnectionCode(){let t=this.secrets.printPassword(this.connection.password,"SNOWFLAKE_PASSWORD",!1),e={account:this.secrets.print("account",this.connection.account),user:this.secrets.print("user",this.connection.username),database:this.secrets.print("database",this.connection.database),warehouse:this.connection.warehouse?this.secrets.print("warehouse",this.connection.warehouse):void 0,schema:this.connection.schema?this.secrets.print("schema",this.connection.schema):void 0,role:this.connection.role?this.secrets.print("role",this.connection.role):void 0,password:t};return h(`
engine = ${this.orm}.create_engine(
URL(
${z(e,s=>` ${s}`)},
)
)
`)}},Xt=class extends y{generateImports(){return["import json"]}generateConnectionCode(){let t=this.secrets.printInFString("project",this.connection.project),e=this.secrets.printInFString("dataset",this.connection.dataset);return h(`
credentials = json.loads("""${this.connection.credentials_json}""")
engine = ${this.orm}.create_engine(f"bigquery://${t}/${e}", credentials_info=credentials)
`)}},Zt=class extends y{generateImports(){return[]}generateConnectionCode(){return h(`
DATABASE_URL = "${this.secrets.printInFString("database",this.connection.database||":memory:")}"
engine = ${this.orm}.connect(DATABASE_URL, read_only=${U(this.connection.read_only)})
`)}},es=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.secrets.printInFString("database",this.connection.database);return this.connection.token?h(`
conn = duckdb.connect("md:${t}", config={"motherduck_token": ${this.secrets.printPassword(this.connection.token,"MOTHERDUCK_TOKEN",!1)}})
`):h(`
conn = duckdb.connect("md:${t}")
`)}},ts=class extends y{generateImports(){return["import clickhouse_connect"]}generateConnectionCode(){let t=this.secrets.printPassword(this.connection.password,"CLICKHOUSE_PASSWORD",!1),e={host:this.secrets.print("host",this.connection.host),user:this.secrets.print("user",this.connection.username),secure:this.secrets.print("secure",this.connection.secure),port:this.connection.port?this.secrets.print("port",this.connection.port):void 0,password:this.connection.password?t:void 0,proxy_path:this.connection.proxy_path?this.secrets.print("proxy_path",this.connection.proxy_path):void 0};return h(`
engine = ${this.orm}.get_client(
${z(e,s=>` ${s}`)},
)
`)}},ss=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.secrets.printPassword(this.connection.password,"TIMEPLUS_PASSWORD",!0);return h(`
DATABASE_URL = f"timeplus://${this.secrets.printInFString("username",this.connection.username)}:${t}@${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}"
engine = ${this.orm}.create_engine(DATABASE_URL)
`)}},ns=class extends y{generateImports(){return["import chdb"]}generateConnectionCode(){let t=this.secrets.print("database",this.connection.database)||'""';return h(`
engine = ${this.orm}.connect(${t}, read_only=${U(this.connection.read_only)})
`)}},os=class extends y{generateImports(){return this.connection.async_support?["import aiotrino"]:["import trino.sqlalchemy"]}generateConnectionCode(){let t=this.connection.async_support?"aiotrino":"trino",e=this.connection.schema?`/${this.connection.schema}`:"",s=this.secrets.printInFString("username",this.connection.username),o=this.secrets.printInFString("host",this.connection.host),n=this.secrets.printInFString("port",this.connection.port),a=this.secrets.printInFString("database",this.connection.database),c=this.secrets.printPassword(this.connection.password,"TRINO_PASSWORD",!0);return h(`
engine = ${this.orm}.create_engine(f"${t}://${s}:${c}@${o}:${n}/${a}${e}")
`)}},rs=class extends y{generateImports(){switch(this.connection.catalog.type){case"REST":return["from pyiceberg.catalog.rest import RestCatalog"];case"SQL":return["from pyiceberg.catalog.sql import SqlCatalog"];case"Hive":return["from pyiceberg.catalog.hive import HiveCatalog"];case"Glue":return["from pyiceberg.catalog.glue import GlueCatalog"];case"DynamoDB":return["from pyiceberg.catalog.dynamodb import DynamoDBCatalog"];default:re(this.connection.catalog)}}generateConnectionCode(){let t={...this.connection.catalog};t=Object.fromEntries(Object.entries(t).filter(([o,n])=>n!=null&&n!==""&&o!=="type"));for(let[o,n]of Object.entries(t))V(n)?t[o]=this.secrets.print(o,n):typeof n=="string"&&(t[o]=`"${n}"`);let e=ms(t,o=>` ${o}`),s=`"${this.connection.name}"`;switch(this.connection.catalog.type){case"REST":return h(`
catalog = RestCatalog(
${s},
**{
${e}
},
)
`);case"SQL":return h(`
catalog = SqlCatalog(
${s},
**{
${e}
},
)
`);case"Hive":return h(`
catalog = HiveCatalog(
${s},
**{
${e}
},
)
`);case"Glue":return h(`
catalog = GlueCatalog(
${s},
**{
${e}
},
)
`);case"DynamoDB":return h(`
catalog = DynamoDBCatalog(
${s},
**{
${e}
},
)
`);default:re(this.connection.catalog)}}},is=class extends y{generateImports(){return["from datafusion import SessionContext"]}generateConnectionCode(){return this.connection.sessionContext?h(`
ctx = SessionContext()
# Sample table
_ = ctx.from_pydict({"a": [1, 2, 3]}, "my_table")
con = ibis.datafusion.connect(ctx)
`):h(`
con = ibis.datafusion.connect()
`)}},as=class extends y{generateImports(){return["from pyspark.sql import SparkSession"]}generateConnectionCode(){return this.connection.host||this.connection.port?h(`
session = SparkSession.builder.remote(f"sc://${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}").getOrCreate()
con = ibis.pyspark.connect(session)
`):h(`
con = ibis.pyspark.connect()
`)}},cs=class extends y{generateImports(){return["import redshift_connector"]}generateConnectionCode(){let t=this.secrets.print("host",this.connection.host),e=this.secrets.print("port",this.connection.port),s=this.secrets.print("database",this.connection.database);if(this.connection.connectionType.type==="IAM credentials"){let a=this.secrets.print("aws_access_key_id",this.connection.connectionType.aws_access_key_id),c=this.secrets.print("aws_secret_access_key",this.connection.connectionType.aws_secret_access_key),l=this.connection.connectionType.aws_session_token?this.secrets.print("aws_session_token",this.connection.connectionType.aws_session_token):void 0;return h(`
con = redshift_connector.connect(
${z({iam:!0,host:t,port:e,region:`"${this.connection.connectionType.region}"`,database:s,access_key_id:a,secret_access_key:c,...l&&{session_token:l}},b=>` ${b}`)},
)
`)}let o=this.connection.connectionType.user?this.secrets.print("user",this.connection.connectionType.user):void 0,n=this.connection.connectionType.password?this.secrets.printPassword(this.connection.connectionType.password,"REDSHIFT_PASSWORD",!1):void 0;return h(`
con = redshift_connector.connect(
${z({host:t,port:e,database:s,...o&&{user:o},...n&&{password:n}},a=>` ${a}`)},
)
`)}},ls=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.orm!=="ibis",e=this.secrets.printPassword(this.connection.access_token,"DATABRICKS_ACCESS_TOKEN",t,"access_token"),s=this.secrets.printPassword(this.connection.server_hostname,"DATABRICKS_SERVER_HOSTNAME",t,"server_hostname"),o=this.secrets.printPassword(this.connection.http_path,"DATABRICKS_HTTP_PATH",t,"http_path"),n=this.connection.catalog?this.secrets.printInFString("catalog",this.connection.catalog):void 0,a=this.connection.schema?this.secrets.printInFString("schema",this.connection.schema):void 0,c=`databricks://token:${e}@${s}?http_path=${o}`;return n&&(c+=`&catalog=${n}`),a&&(c+=`&schema=${a}`),this.orm==="ibis"?h(`
engine = ibis.databricks.connect(
server_hostname=${s},
http_path=${o},${n?`
catalog=${n},`:""}${a?`
schema=${a},`:""}
access_token=${e}
)
`):h(`
DATABASE_URL = f"${c}"
engine = ${this.orm}.create_engine(DATABASE_URL)
`)}},ds=class extends y{generateImports(){return this.connection.disable_client_pooling?["from sqlalchemy.pool import NullPool"]:[]}generateConnectionCode(){let t=this.secrets.printPassword(this.connection.password,"SUPABASE_PASSWORD",!0),e=this.secrets.printInFString("username",this.connection.username),s=this.secrets.printInFString("host",this.connection.host),o=this.secrets.printInFString("port",this.connection.port),n=this.secrets.printInFString("database",this.connection.database),a=this.connection.disable_client_pooling?", poolclass=NullPool":"";return h(`
DATABASE_URL = f"postgresql+psycopg2://${e}:${t}@${s}:${o}/${n}?sslmode=require"
engine = ${this.orm}.create_engine(DATABASE_URL${a})
`)}},hs=class{constructor(){ne(this,"secrets",new Gt)}createGenerator(t,e){switch(t.type){case"postgres":return new Vt(t,e,this.secrets);case"mysql":return new zt(t,e,this.secrets);case"sqlite":return new Jt(t,e,this.secrets);case"snowflake":return new Yt(t,e,this.secrets);case"bigquery":return new Xt(t,e,this.secrets);case"duckdb":return new Zt(t,e,this.secrets);case"motherduck":return new es(t,e,this.secrets);case"clickhouse_connect":return new ts(t,e,this.secrets);case"timeplus":return new ss(t,e,this.secrets);case"chdb":return new ns(t,e,this.secrets);case"trino":return new os(t,e,this.secrets);case"iceberg":return new rs(t,e,this.secrets);case"datafusion":return new is(t,e,this.secrets);case"pyspark":return new as(t,e,this.secrets);case"redshift":return new cs(t,e,this.secrets);case"databricks":return new ls(t,e,this.secrets);case"supabase":return new ds(t,e,this.secrets);default:re(t)}}};function ps(t,e){if(!(e in Ne))throw Error(`Unsupported library: ${e}`);Ht.parse(t);let s=new hs,o=s.createGenerator(t,e),n=o.generateConnectionCode(),a=s.secrets,c=[...new Set([...a.imports,...o.imports])].sort();c.push("");let l=a.formatSecrets();return l&&c.push(l),c.push(n.trim()),c.join(`
`)}function U(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function z(t,e){return Object.entries(t).filter(([,s])=>s!=null&&s!=="").map(([s,o])=>e(typeof o=="boolean"?`${s}=${U(o)}`:`${s}=${o}`)).join(`,
`)}function ms(t,e){return Object.entries(t).filter(([,s])=>s!=null&&s!=="").map(([s,o])=>{let n=`"${s}"`;return e(typeof o=="boolean"?`${n}: ${U(o)}`:`${n}: ${o}`)}).join(`,
`)}var us=be(),K=me(We(),1),r=me(Xe(),1),Fe=(0,K.createContext)({providerNames:[],secretKeys:[],loading:!1,error:void 0,refreshSecrets:Ye.NOOP});const bs=()=>(0,K.use)(Fe),fs=t=>{let e=(0,us.c)(14),{children:s}=t,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0];let{data:n,isPending:a,error:c,refetch:l}=It(ws,o),b;e[1]===(n==null?void 0:n.secretKeys)?b=e[2]:(b=(n==null?void 0:n.secretKeys)||[],e[1]=n==null?void 0:n.secretKeys,e[2]=b);let u;e[3]===(n==null?void 0:n.providerNames)?u=e[4]:(u=(n==null?void 0:n.providerNames)||[],e[3]=n==null?void 0:n.providerNames,e[4]=u);let f;e[5]!==c||e[6]!==a||e[7]!==l||e[8]!==b||e[9]!==u?(f={secretKeys:b,providerNames:u,loading:a,error:c,refreshSecrets:l},e[5]=c,e[6]=a,e[7]=l,e[8]=b,e[9]=u,e[10]=f):f=e[10];let _;return e[11]!==s||e[12]!==f?(_=(0,r.jsx)(Fe,{value:f,children:s}),e[11]=s,e[12]=f,e[13]=_):_=e[13],_},gs={isMatch:t=>{if(t instanceof ue||t instanceof Ge){let{optionRegex:e}=i.parse(t.description||"");return!!e}return!1},Component:({schema:t,form:e,path:s})=>{let{secretKeys:o,providerNames:n,refreshSecrets:a}=bs(),{openModal:c,closeModal:l}=vt(),{label:b,description:u,optionRegex:f=""}=i.parse(t.description||""),[_,A]=Kt(o,g=>new RegExp(f,"i").test(g));return(0,r.jsx)(ct,{control:e.control,name:s,render:({field:g})=>(0,r.jsxs)(ht,{children:[(0,r.jsx)(bt,{children:b}),(0,r.jsx)(pt,{children:u}),(0,r.jsx)(at,{children:(0,r.jsxs)("div",{className:"flex gap-2",children:[t instanceof ue?(0,r.jsx)(it,{...g,value:g.value,onChange:g.onChange,className:fe("flex-1")}):(0,r.jsx)(rt,{...g,value:g.value,onChange:g.onChange,className:"flex-1"}),(0,r.jsxs)(nt,{children:[(0,r.jsx)(tt,{asChild:!0,children:(0,r.jsx)(ie,{variant:"outline",size:"icon",className:fe(V(g.value)&&"bg-accent"),children:(0,r.jsx)(ot,{className:"h-3 w-3"})})}),(0,r.jsxs)(st,{align:"end",className:"max-h-60 overflow-y-auto",children:[(0,r.jsxs)(ae,{onSelect:()=>{c((0,r.jsx)(Nt,{providerNames:n,onSuccess:S=>{a(),g.onChange(he(S)),l()},onClose:l}))},children:[(0,r.jsx)(Ze,{className:"mr-2 h-3.5 w-3.5"}),"Create a new secret"]}),_.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ge,{}),(0,r.jsx)(et,{children:"Recommended"})]}),_.map(S=>(0,r.jsx)(ae,{onSelect:()=>g.onChange(he(S)),children:S},S)),A.length>0&&(0,r.jsx)(ge,{}),A.map(S=>(0,r.jsx)(ae,{onSelect:()=>g.onChange(he(S)),children:S},S))]})]})]})}),(0,r.jsx)(lt,{})]})})}};function ys(t){return t.provider!=="env"}function _s(t){return t.name}function Ss(t){return t.keys}async function ws(){let t=await Lt.request({}),e=Pt(t.secrets).filter(ys).map(_s);return{secretKeys:t.secrets.flatMap(Ss).sort(),providerNames:e}}var W=be(),Ee=[{name:"PostgreSQL",schema:_e,color:"#336791",logo:"postgres",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"MySQL",schema:Se,color:"#00758F",logo:"mysql",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"SQLite",schema:we,color:"#003B57",logo:"sqlite",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"DuckDB",schema:xe,color:"#FFD700",logo:"duckdb",connectionLibraries:{libraries:["duckdb"],preferred:"duckdb"}},{name:"MotherDuck",schema:ke,color:"#ff9538",logo:"motherduck",connectionLibraries:{libraries:["duckdb"],preferred:"duckdb"}},{name:"Snowflake",schema:$e,color:"#29B5E8",logo:"snowflake",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"ClickHouse",schema:Ae,color:"#2C2C1D",logo:"clickhouse",connectionLibraries:{libraries:["clickhouse_connect"],preferred:"clickhouse_connect"}},{name:"Timeplus",schema:je,color:"#B83280",logo:"timeplus",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"BigQuery",schema:Ce,color:"#4285F4",logo:"bigquery",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"ClickHouse Embedded",schema:ve,color:"#f2b611",logo:"clickhouse",connectionLibraries:{libraries:["chdb"],preferred:"chdb"}},{name:"Trino",schema:Re,color:"#d466b6",logo:"trino",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"DataFusion",schema:Te,color:"#202A37",logo:"datafusion",connectionLibraries:{libraries:["ibis"],preferred:"ibis"}},{name:"PySpark",schema:De,color:"#1C5162",logo:"pyspark",connectionLibraries:{libraries:["ibis"],preferred:"ibis"}},{name:"Redshift",schema:qe,color:"#522BAE",logo:"redshift",connectionLibraries:{libraries:["redshift"],preferred:"redshift"}},{name:"Databricks",schema:Le,color:"#c41e0c",logo:"databricks",connectionLibraries:{libraries:["sqlalchemy","sqlmodel","ibis"],preferred:"sqlalchemy"}},{name:"Supabase",schema:Pe,color:"#238F5F",logo:"supabase",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}}],Be=[{name:"Iceberg",schema:Ie,color:"#000000",logo:"iceberg",connectionLibraries:{libraries:["pyiceberg"],preferred:"pyiceberg"}}],xs=t=>{let e=(0,W.c)(14),{onSelect:s}=t,o;e[0]===s?o=e[1]:(o=_=>{let{name:A,schema:g,color:S,logo:R}=_;return(0,r.jsxs)("button",{type:"button",className:"py-3 flex flex-col items-center justify-center gap-1 transition-all hover:scale-105 hover:brightness-110 rounded shadow-sm-solid hover:shadow-md-solid",style:{backgroundColor:S},onClick:()=>s(g),children:[(0,r.jsx)(He,{name:R,className:"w-8 h-8 text-white brightness-0 invert dark:invert"}),(0,r.jsx)("span",{className:"text-white font-medium text-lg",children:A})]},A)},e[0]=s,e[1]=o);let n=o,a;e[2]===n?a=e[3]:(a=Ee.map(n),e[2]=n,e[3]=a);let c;e[4]===a?c=e[5]:(c=(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:a}),e[4]=a,e[5]=c);let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,r.jsxs)("h4",{className:"font-semibold text-muted-foreground text-lg flex items-center gap-4",children:["Data Catalogs",(0,r.jsx)("hr",{className:"flex-1"})]}),e[6]=l):l=e[6];let b;e[7]===n?b=e[8]:(b=Be.map(n),e[7]=n,e[8]=b);let u;e[9]===b?u=e[10]:(u=(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:b}),e[9]=b,e[10]=u);let f;return e[11]!==c||e[12]!==u?(f=(0,r.jsxs)(r.Fragment,{children:[c,l,u]}),e[11]=c,e[12]=u,e[13]=f):f=e[13],f},ks=[gs],$s=t=>{var pe;let e=(0,W.c)(49),{schema:s,onSubmit:o,onBack:n}=t,a;e[0]===s?a=e[1]:(a=Dt(s),e[0]=s,e[1]=a);let c=s,l;e[2]===c?l=e[3]:(l=mt(c),e[2]=c,e[3]=l);let b;e[4]!==a||e[5]!==l?(b={defaultValues:a,resolver:l,reValidateMode:"onChange"},e[4]=a,e[5]=l,e[6]=b):b=e[6];let u=dt(b),f=(pe=[...Ee,...Be].find(j=>j.schema===s))==null?void 0:pe.connectionLibraries,[_,A]=(0,K.useState)((f==null?void 0:f.preferred)??"sqlalchemy"),{createNewCell:g}=Me(),S=Tt(),R;e[7]!==g||e[8]!==S?(R=j=>{g({code:j,before:!1,cellId:S??"__end__",skipIfCodeExists:!0})},e[7]=g,e[8]=S,e[9]=R):R=e[9];let J=R,H;e[10]!==J||e[11]!==o||e[12]!==_?(H=j=>{J(ps(j,_)),o()},e[10]=J,e[11]=o,e[12]=_,e[13]=H):H=e[13];let Y=H,I;e[14]!==u||e[15]!==Y?(I=u.handleSubmit(Y),e[14]=u,e[15]=Y,e[16]=I):I=e[16];let M;e[17]===Symbol.for("react.memo_cache_sentinel")?(M=(0,r.jsx)(ut,{}),e[17]=M):M=e[17];let T;e[18]!==u||e[19]!==s?(T=(0,r.jsx)(fs,{children:(0,r.jsx)(qt,{schema:s,form:u,renderers:ks,children:M})}),e[18]=u,e[19]=s,e[20]=T):T=e[20];let D;e[21]===n?D=e[22]:(D=(0,r.jsx)(ie,{type:"button",variant:"outline",onClick:n,children:"Back"}),e[21]=n,e[22]=D);let X=!u.formState.isValid,q;e[23]===X?q=e[24]:(q=(0,r.jsx)(ie,{type:"submit",disabled:X,children:"Add"}),e[23]=X,e[24]=q);let L;e[25]!==D||e[26]!==q?(L=(0,r.jsxs)("div",{className:"flex gap-2",children:[D,q]}),e[25]=D,e[26]=q,e[27]=L):L=e[27];let Z=wt,P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=j=>A(j),e[28]=P):P=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=(0,r.jsxs)("div",{className:"flex flex-col gap-1 items-end",children:[(0,r.jsx)(St,{children:(0,r.jsx)(ft,{placeholder:"Select a library"})}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:"Preferred connection library"})]}),e[29]=N):N=e[29];let ee=yt,te=_t,se=f==null?void 0:f.libraries.map(js),F;e[30]!==te||e[31]!==se?(F=(0,r.jsx)(te,{children:se}),e[30]=te,e[31]=se,e[32]=F):F=e[32];let E;e[33]!==ee||e[34]!==F?(E=(0,r.jsx)(ee,{children:F}),e[33]=ee,e[34]=F,e[35]=E):E=e[35];let B;e[36]!==Z||e[37]!==_||e[38]!==P||e[39]!==N||e[40]!==E?(B=(0,r.jsx)("div",{children:(0,r.jsxs)(Z,{value:_,onValueChange:P,children:[N,E]})}),e[36]=Z,e[37]=_,e[38]=P,e[39]=N,e[40]=E,e[41]=B):B=e[41];let O;e[42]!==L||e[43]!==B?(O=(0,r.jsxs)("div",{className:"flex gap-2 justify-between",children:[L,B]}),e[42]=L,e[43]=B,e[44]=O):O=e[44];let Q;return e[45]!==T||e[46]!==O||e[47]!==I?(Q=(0,r.jsxs)("form",{onSubmit:I,className:"space-y-4",children:[T,O]}),e[45]=T,e[46]=O,e[47]=I,e[48]=Q):Q=e[48],Q},Cs=t=>{let e=(0,W.c)(5),{onSubmit:s}=t,[o,n]=(0,K.useState)(null);if(!o){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,r.jsx)(xs,{onSelect:n}),e[0]=l):l=e[0],l}let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=()=>n(null),e[1]=a):a=e[1];let c;return e[2]!==s||e[3]!==o?(c=(0,r.jsx)($s,{schema:o,onSubmit:s,onBack:a}),e[2]=s,e[3]=o,e[4]=c):c=e[4],c};const As=t=>{let e=(0,W.c)(6),{children:s}=t,[o,n]=(0,K.useState)(!1),a;e[0]===s?a=e[1]:(a=(0,r.jsx)($t,{asChild:!0,children:s}),e[0]=s,e[1]=a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)(Oe,{onClose:()=>n(!1)}),e[2]=c):c=e[2];let l;return e[3]!==o||e[4]!==a?(l=(0,r.jsxs)(jt,{open:o,onOpenChange:n,children:[a,c]}),e[3]=o,e[4]=a,e[5]=l):l=e[5],l},Oe=t=>{let e=(0,W.c)(4),{onClose:s}=t,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(kt,{children:"Add Connection"}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsxs)(xt,{className:"mb-4",children:[o,(0,r.jsxs)(At,{children:["Connect to your database or data catalog to query data directly from your notebook. Learn more about how to connect to your database in our"," ",(0,r.jsx)(Rt,{href:"https://docs.marimo.io/guides/working_with_data/sql/#connecting-to-a-custom-database",children:"docs."})]})]}),e[1]=n):n=e[1];let a;return e[2]===s?a=e[3]:(a=(0,r.jsxs)(Ct,{className:"max-h-[75vh] overflow-y-auto",children:[n,(0,r.jsx)(Cs,{onSubmit:()=>s()})]}),e[2]=s,e[3]=a),a};function js(t){return(0,r.jsx)(gt,{value:t,children:Ne[t]},t)}export{Oe as n,As as t};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import{s as m}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-Bj1aDYRI.js";import{t as x}from"./compiler-runtime-B3qBwwSJ.js";import{t as b}from"./jsx-runtime-ZmTK25f3.js";import{n as y,t as o}from"./cn-BKtXLv3a.js";var n=x(),v=m(p(),1),f=m(b(),1),w=y("relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11",{variants:{variant:{default:"bg-background text-foreground",destructive:"text-destructive border-destructive/50 dark:border-destructive [&>svg]:text-destructive text-destructive",info:"bg-(--sky-2) border-(--sky-7) text-(--sky-11)",warning:"bg-(--yellow-2) border-(--yellow-7) text-(--yellow-11) [&>svg]:text-(--yellow-11)"}},defaultVariants:{variant:"default"}}),u=v.forwardRef((l,i)=>{let e=(0,n.c)(11),r,t,a;e[0]===l?(r=e[1],t=e[2],a=e[3]):({className:r,variant:a,...t}=l,e[0]=l,e[1]=r,e[2]=t,e[3]=a);let s;e[4]!==r||e[5]!==a?(s=o(w({variant:a}),r),e[4]=r,e[5]=a,e[6]=s):s=e[6];let d;return e[7]!==t||e[8]!==i||e[9]!==s?(d=(0,f.jsx)("div",{ref:i,role:"alert",className:s,...t}),e[7]=t,e[8]=i,e[9]=s,e[10]=d):d=e[10],d});u.displayName="Alert";var c=v.forwardRef((l,i)=>{let e=(0,n.c)(11),r,t,a;e[0]===l?(r=e[1],t=e[2],a=e[3]):({className:t,children:r,...a}=l,e[0]=l,e[1]=r,e[2]=t,e[3]=a);let s;e[4]===t?s=e[5]:(s=o("mb-1 font-medium leading-none tracking-tight",t),e[4]=t,e[5]=s);let d;return e[6]!==r||e[7]!==a||e[8]!==i||e[9]!==s?(d=(0,f.jsx)("h5",{ref:i,className:s,...a,children:r}),e[6]=r,e[7]=a,e[8]=i,e[9]=s,e[10]=d):d=e[10],d});c.displayName="AlertTitle";var g=v.forwardRef((l,i)=>{let e=(0,n.c)(9),r,t;e[0]===l?(r=e[1],t=e[2]):({className:r,...t}=l,e[0]=l,e[1]=r,e[2]=t);let a;e[3]===r?a=e[4]:(a=o("text-sm [&_p]:leading-relaxed",r),e[3]=r,e[4]=a);let s;return e[5]!==t||e[6]!==i||e[7]!==a?(s=(0,f.jsx)("div",{ref:i,className:a,...t}),e[5]=t,e[6]=i,e[7]=a,e[8]=s):s=e[8],s});g.displayName="AlertDescription";export{g as n,c as r,u as t};
import{s as E}from"./chunk-LvLJmgfZ.js";import{t as Te}from"./react-Bj1aDYRI.js";import{t as P}from"./compiler-runtime-B3qBwwSJ.js";import{r as N}from"./useEventListener-Cb-RVVEn.js";import{t as $e}from"./jsx-runtime-ZmTK25f3.js";import{n as R}from"./button-CZ3Cs4qb.js";import{t as p}from"./cn-BKtXLv3a.js";import{E as M,S as ke,T as ze,_ as h,a as Be,b as He,d as We,f as b,i as qe,m as Ke,r as Le,s as Ue,t as Ve,u as Ye,w as v,x as w,y as Ze}from"./Combination-BAEdC-rz.js";var i=E(Te(),1),l=E($e(),1),j="Dialog",[S,T]=M(j),[Ge,f]=S(j),$=t=>{let{__scopeDialog:r,children:e,open:a,defaultOpen:o,onOpenChange:n,modal:s=!0}=t,c=i.useRef(null),d=i.useRef(null),[u,x]=ke({prop:a,defaultProp:o??!1,onChange:n,caller:j});return(0,l.jsx)(Ge,{scope:r,triggerRef:c,contentRef:d,contentId:b(),titleId:b(),descriptionId:b(),open:u,onOpenChange:x,onOpenToggle:i.useCallback(()=>x(Se=>!Se),[x]),modal:s,children:e})};$.displayName=j;var k="DialogTrigger",z=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(k,e),n=N(r,o.triggerRef);return(0,l.jsx)(h.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":O(o.open),...a,ref:n,onClick:v(t.onClick,o.onOpenToggle)})});z.displayName=k;var A="DialogPortal",[Je,B]=S(A,{forceMount:void 0}),H=t=>{let{__scopeDialog:r,forceMount:e,children:a,container:o}=t,n=f(A,r);return(0,l.jsx)(Je,{scope:r,forceMount:e,children:i.Children.map(a,s=>(0,l.jsx)(w,{present:e||n.open,children:(0,l.jsx)(We,{asChild:!0,container:o,children:s})}))})};H.displayName=A;var _="DialogOverlay",W=i.forwardRef((t,r)=>{let e=B(_,t.__scopeDialog),{forceMount:a=e.forceMount,...o}=t,n=f(_,t.__scopeDialog);return n.modal?(0,l.jsx)(w,{present:a||n.open,children:(0,l.jsx)(Xe,{...o,ref:r})}):null});W.displayName=_;var Qe=Ze("DialogOverlay.RemoveScroll"),Xe=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(_,e);return(0,l.jsx)(Ve,{as:Qe,allowPinchZoom:!0,shards:[o.contentRef],children:(0,l.jsx)(h.div,{"data-state":O(o.open),...a,ref:r,style:{pointerEvents:"auto",...a.style}})})}),y="DialogContent",q=i.forwardRef((t,r)=>{let e=B(y,t.__scopeDialog),{forceMount:a=e.forceMount,...o}=t,n=f(y,t.__scopeDialog);return(0,l.jsx)(w,{present:a||n.open,children:n.modal?(0,l.jsx)(er,{...o,ref:r}):(0,l.jsx)(rr,{...o,ref:r})})});q.displayName=y;var er=i.forwardRef((t,r)=>{let e=f(y,t.__scopeDialog),a=i.useRef(null),o=N(r,e.contentRef,a);return i.useEffect(()=>{let n=a.current;if(n)return Le(n)},[]),(0,l.jsx)(K,{...t,ref:o,trapFocus:e.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:v(t.onCloseAutoFocus,n=>{var s;n.preventDefault(),(s=e.triggerRef.current)==null||s.focus()}),onPointerDownOutside:v(t.onPointerDownOutside,n=>{let s=n.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&n.preventDefault()}),onFocusOutside:v(t.onFocusOutside,n=>n.preventDefault())})}),rr=i.forwardRef((t,r)=>{let e=f(y,t.__scopeDialog),a=i.useRef(!1),o=i.useRef(!1);return(0,l.jsx)(K,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var s,c;(s=t.onCloseAutoFocus)==null||s.call(t,n),n.defaultPrevented||(a.current||((c=e.triggerRef.current)==null||c.focus()),n.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:n=>{var c,d;(c=t.onInteractOutside)==null||c.call(t,n),n.defaultPrevented||(a.current=!0,n.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let s=n.target;(d=e.triggerRef.current)!=null&&d.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&o.current&&n.preventDefault()}})}),K=i.forwardRef((t,r)=>{let{__scopeDialog:e,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:n,...s}=t,c=f(y,e),d=i.useRef(null),u=N(r,d);return Be(),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qe,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:n,children:(0,l.jsx)(Ke,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":O(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ar,{titleId:c.titleId}),(0,l.jsx)(nr,{contentRef:d,descriptionId:c.descriptionId})]})]})}),C="DialogTitle",L=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(C,e);return(0,l.jsx)(h.h2,{id:o.titleId,...a,ref:r})});L.displayName=C;var U="DialogDescription",V=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(U,e);return(0,l.jsx)(h.p,{id:o.descriptionId,...a,ref:r})});V.displayName=U;var Y="DialogClose",Z=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(Y,e);return(0,l.jsx)(h.button,{type:"button",...a,ref:r,onClick:v(t.onClick,()=>o.onOpenChange(!1))})});Z.displayName=Y;function O(t){return t?"open":"closed"}var G="DialogTitleWarning",[tr,J]=ze(G,{contentName:y,titleName:C,docsSlug:"dialog"}),ar=({titleId:t})=>{let r=J(G),e=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return i.useEffect(()=>{t&&(document.getElementById(t)||console.error(e))},[e,t]),null},or="DialogDescriptionWarning",nr=({contentRef:t,descriptionId:r})=>{let e=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${J(or).contentName}}.`;return i.useEffect(()=>{var o;let a=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");r&&a&&(document.getElementById(r)||console.warn(e))},[e,t,r]),null},Q=$,X=z,ee=H,re=W,te=q,ae=L,oe=V,I=Z,ne="AlertDialog",[sr,Cr]=M(ne,[T]),m=T(),se=t=>{let{__scopeAlertDialog:r,...e}=t,a=m(r);return(0,l.jsx)(Q,{...a,...e,modal:!0})};se.displayName=ne;var lr="AlertDialogTrigger",le=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(X,{...o,...a,ref:r})});le.displayName=lr;var ir="AlertDialogPortal",ie=t=>{let{__scopeAlertDialog:r,...e}=t,a=m(r);return(0,l.jsx)(ee,{...a,...e})};ie.displayName=ir;var cr="AlertDialogOverlay",ce=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(re,{...o,...a,ref:r})});ce.displayName=cr;var D="AlertDialogContent",[dr,ur]=sr(D),fr=He("AlertDialogContent"),de=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,children:a,...o}=t,n=m(e),s=i.useRef(null),c=N(r,s),d=i.useRef(null);return(0,l.jsx)(tr,{contentName:D,titleName:ue,docsSlug:"alert-dialog",children:(0,l.jsx)(dr,{scope:e,cancelRef:d,children:(0,l.jsxs)(te,{role:"alertdialog",...n,...o,ref:c,onOpenAutoFocus:v(o.onOpenAutoFocus,u=>{var x;u.preventDefault(),(x=d.current)==null||x.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[(0,l.jsx)(fr,{children:a}),(0,l.jsx)(mr,{contentRef:s})]})})})});de.displayName=D;var ue="AlertDialogTitle",fe=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(ae,{...o,...a,ref:r})});fe.displayName=ue;var pe="AlertDialogDescription",me=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(oe,{...o,...a,ref:r})});me.displayName=pe;var pr="AlertDialogAction",ge=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(I,{...o,...a,ref:r})});ge.displayName=pr;var ye="AlertDialogCancel",xe=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,{cancelRef:o}=ur(ye,e),n=m(e),s=N(r,o);return(0,l.jsx)(I,{...n,...a,ref:s})});xe.displayName=ye;var mr=({contentRef:t})=>{let r=`\`${D}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${D}\` by passing a \`${pe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${D}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{var e;document.getElementById((e=t.current)==null?void 0:e.getAttribute("aria-describedby"))||console.warn(r)},[r,t]),null},gr=se,yr=le,ve=ie,De=ce,Ne=de,F=ge,he=xe,je=fe,_e=me,xr=P();function Re(){let t=(0,xr.c)(3),[r,e]=(0,i.useState)(null),a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{e(document.activeElement)},t[0]=a):a=t[0];let o=a,n;return t[1]===r?n=t[2]:(n={onOpenAutoFocus:o,onCloseAutoFocus:s=>{document.activeElement===document.body&&(r instanceof HTMLElement&&r.focus(),s.preventDefault())}},t[1]=r,t[2]=n),n}var g=P(),vr=gr,Dr=yr,be=Ue(({children:t,...r})=>(0,l.jsx)(ve,{...r,children:(0,l.jsx)(Ye,{children:(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-start sm:top-[15%]",children:t})})}));be.displayName=ve.displayName;var we=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;if(e[0]!==t){let{className:c,children:d,...u}=t;a=c,o=u,e[0]=t,e[1]=a,e[2]=o}else a=e[1],o=e[2];let n;e[3]===a?n=e[4]:(n=p("fixed inset-0 z-50 bg-background/80 backdrop-blur-xs transition-opacity animate-in fade-in",a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(De,{className:n,...o,ref:r}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});we.displayName=De.displayName;var Ae=i.forwardRef((t,r)=>{let e=(0,g.c)(11),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n=Re(),s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.jsx)(we,{}),e[3]=s):s=e[3];let c;e[4]===a?c=e[5]:(c=p("fixed z-50 grid w-full max-w-2xl scale-100 gap-4 border bg-background p-6 opacity-100 shadow-sm animate-in fade-in-90 slide-in-from-bottom-10 sm:rounded-lg sm:zoom-in-90 sm:slide-in-from-bottom-0 md:w-full",a),e[4]=a,e[5]=c);let d;return e[6]!==o||e[7]!==r||e[8]!==n||e[9]!==c?(d=(0,l.jsxs)(be,{children:[s,(0,l.jsx)(Ne,{ref:r,className:c,...n,...o})]}),e[6]=o,e[7]=r,e[8]=n,e[9]=c,e[10]=d):d=e[10],d});Ae.displayName=Ne.displayName;var Ce=t=>{let r=(0,g.c)(8),e,a;r[0]===t?(e=r[1],a=r[2]):({className:e,...a}=t,r[0]=t,r[1]=e,r[2]=a);let o;r[3]===e?o=r[4]:(o=p("flex flex-col space-y-2 text-center sm:text-left",e),r[3]=e,r[4]=o);let n;return r[5]!==a||r[6]!==o?(n=(0,l.jsx)("div",{className:o,...a}),r[5]=a,r[6]=o,r[7]=n):n=r[7],n};Ce.displayName="AlertDialogHeader";var Oe=t=>{let r=(0,g.c)(8),e,a;r[0]===t?(e=r[1],a=r[2]):({className:e,...a}=t,r[0]=t,r[1]=e,r[2]=a);let o;r[3]===e?o=r[4]:(o=p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),r[3]=e,r[4]=o);let n;return r[5]!==a||r[6]!==o?(n=(0,l.jsx)("div",{className:o,...a}),r[5]=a,r[6]=o,r[7]=n):n=r[7],n};Oe.displayName="AlertDialogFooter";var Ie=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p("text-lg font-semibold",a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(je,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Ie.displayName=je.displayName;var Fe=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p("text-muted-foreground",a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(_e,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Fe.displayName=_e.displayName;var Ee=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p(R(),a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(F,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Ee.displayName=F.displayName;var Pe=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p(R({variant:"destructive"}),a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(F,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Pe.displayName="AlertDialogDestructiveAction";var Me=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p(R({variant:"secondary"}),"mt-2 sm:mt-0",a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(he,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Me.displayName=he.displayName;export{Q as _,Fe as a,Ce as c,Re as d,I as f,ee as g,re as h,Ae as i,Ie as l,oe as m,Ee as n,Pe as o,te as p,Me as r,Oe as s,vr as t,Dr as u,ae as v,X as y};
import{s as a}from"./chunk-LvLJmgfZ.js";import{t as u}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import"./compiler-runtime-B3qBwwSJ.js";import{d}from"./hotkeys-BHHWjLlp.js";import{t as f}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./Combination-BAEdC-rz.js";import{t as c}from"./copy-icon-v8ME_JKB.js";import{n as h}from"./error-banner-B9ts0mNl.js";import{t as g}from"./esm-Bmu2DhPy.js";import"./dist-tLOz534J.js";import"./dist-C5H5qIvq.js";import"./dist-B62Xo7-b.js";import"./dist-BpuNldXk.js";import"./dist-8kKeYgOg.js";import"./dist-BZWmfQbq.js";import"./dist-DLgWirXg.js";import"./dist-CF4gkF4y.js";import"./dist-CNW1zLeq.js";import{n as v,t as m}from"./esm-D82gQH1f.js";var j=a(u(),1),t=a(f(),1);const p={python:"py",javascript:"js",typescript:"ts",shell:"sh",bash:"sh"};function e(o){return o?o in m:!1}var x=({language:o,showCopyButton:n,extensions:r=[],...s})=>{o=p[o||""]||o;let i=e(o);i||d.warn(`Language ${o} not found in CodeMirror.`);let l=(0,j.useMemo)(()=>e(o)?[v(o),...r].filter(Boolean):r,[o,r]);return(0,t.jsxs)("div",{className:"relative w-full group hover-actions-parent",children:[!i&&(0,t.jsx)(h,{className:"mb-1 rounded-sm",error:`Language ${o} not supported.
Supported languages are: ${Object.keys(m).join(", ")}`}),n&&i&&(0,t.jsx)(c,{tooltip:!1,buttonClassName:"absolute top-2 right-2 z-10 hover-action",className:"h-4 w-4 text-muted-foreground",value:s.value||"",toastTitle:"Copied to clipboard"}),(0,t.jsx)(g,{...s,extensions:l})]})};export{p as LANGUAGE_MAP,x as default};
import{t as a}from"./apl-DHQPYmx2.js";export{a as apl};
var l={"+":["conjugate","add"],"\u2212":["negate","subtract"],"\xD7":["signOf","multiply"],"\xF7":["reciprocal","divide"],"\u2308":["ceiling","greaterOf"],"\u230A":["floor","lesserOf"],"\u2223":["absolute","residue"],"\u2373":["indexGenerate","indexOf"],"?":["roll","deal"],"\u22C6":["exponentiate","toThePowerOf"],"\u235F":["naturalLog","logToTheBase"],"\u25CB":["piTimes","circularFuncs"],"!":["factorial","binomial"],"\u2339":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"\u2264":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"\u2265":[null,"greaterThanOrEqual"],"\u2260":[null,"notEqual"],"\u2261":["depth","match"],"\u2262":[null,"notMatch"],"\u2208":["enlist","membership"],"\u2377":[null,"find"],"\u222A":["unique","union"],"\u2229":[null,"intersection"],"\u223C":["not","without"],"\u2228":[null,"or"],"\u2227":[null,"and"],"\u2371":[null,"nor"],"\u2372":[null,"nand"],"\u2374":["shapeOf","reshape"],",":["ravel","catenate"],"\u236A":[null,"firstAxisCatenate"],"\u233D":["reverse","rotate"],"\u2296":["axis1Reverse","axis1Rotate"],"\u2349":["transpose",null],"\u2191":["first","take"],"\u2193":[null,"drop"],"\u2282":["enclose","partitionWithAxis"],"\u2283":["diclose","pick"],"\u2337":[null,"index"],"\u234B":["gradeUp",null],"\u2352":["gradeDown",null],"\u22A4":["encode",null],"\u22A5":["decode",null],"\u2355":["format","formatByExample"],"\u234E":["execute",null],"\u22A3":["stop","left"],"\u22A2":["pass","right"]},a=/[\.\/⌿⍀¨⍣]/,r=/⍬/,i=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,u=/←/,o=/[⍝#].*$/,s=function(n){var t=!1;return function(e){return t=e,e===n?t==="\\":!0}};const p={name:"apl",startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(n,t){var e;return n.eatSpace()?null:(e=n.next(),e==='"'||e==="'"?(n.eatWhile(s(e)),n.next(),t.prev=!0,"string"):/[\[{\(]/.test(e)?(t.prev=!1,null):/[\]}\)]/.test(e)?(t.prev=!0,null):r.test(e)?(t.prev=!1,"atom"):/[¯\d]/.test(e)?(t.func?(t.func=!1,t.prev=!1):t.prev=!0,n.eatWhile(/[\w\.]/),"number"):a.test(e)||u.test(e)?"operator":i.test(e)?(t.func=!0,t.prev=!1,l[e]?"variableName.function.standard":"variableName.function"):o.test(e)?(n.skipToEnd(),"comment"):e==="\u2218"&&n.peek()==="."?(n.next(),"variableName.function"):(n.eatWhile(/[\w\$_]/),t.prev=!0,"keyword"))}};export{p as t};
import{s as z}from"./chunk-LvLJmgfZ.js";import{l as X}from"./useEvent-BhXAndur.js";import{t as Z}from"./react-Bj1aDYRI.js";import{St as D}from"./cells-DPp5cDaO.js";import{t as E}from"./compiler-runtime-B3qBwwSJ.js";import{G as $,S as ee,c as te,i as se,l as le,n as ae,u as oe}from"./ai-model-dropdown-Dk2SdB3C.js";import{C as ne,v as re,w as Q}from"./utils-YqBXNpsM.js";import{S as ie}from"./config-Q0O7_stz.js";import{t as ce}from"./jsx-runtime-ZmTK25f3.js";import{t as de}from"./button-CZ3Cs4qb.js";import{l as R}from"./once-Bul8mtFs.js";import{r as U}from"./requests-B4FYHTZl.js";import{t as he}from"./createLucideIcon-BCdY6lG5.js";import{t as me}from"./x-ZP5cObgf.js";import{r as I}from"./input-DUrq2DiR.js";import{t as B}from"./settings-OBbrbhij.js";import{a as L,c as M,d as A,g as xe,i as pe,l as F,o as P,p as fe,u as S}from"./textarea-CRI7xDBj.js";import{t as ue}from"./use-toast-BDYuj3zG.js";import{l as Y}from"./select-BVdzZKAh.js";import{t as G}from"./tooltip-CMQz28hC.js";import{o as je}from"./alert-dialog-BW4srmS0.js";import{c as ve,l as ge,n as be,t as K}from"./dialog-eb-NieZw.js";import{i as we,r as ye,t as Ne}from"./popover-CH1FzjxU.js";import{n as Ce}from"./useDebounce-7iEVSqwM.js";import{n as ke}from"./ImperativeModal-BNN1HA7x.js";import{t as O}from"./kbd-Cm6Ba9qg.js";import{t as _e}from"./links-7AQBmdyV.js";import{t as V}from"./Inputs-GV-aQbOR.js";var Se=he("power-off",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Te=E(),s=z(ce(),1);const Le=t=>{let e=(0,Te.c)(15),{description:a,disabled:f,tooltip:r}=t,i=f===void 0?!1:f,u=r===void 0?"Shutdown":r,{openConfirm:b,closeModal:l}=ke(),{sendShutdown:o}=U(),w;e[0]===o?w=e[1]:(w=()=>{o(),setTimeout(Me,200)},e[0]=o,e[1]=w);let j=w;if(ie())return null;let m=i?"disabled":"red",c;e[2]!==l||e[3]!==a||e[4]!==j||e[5]!==b?(c=h=>{h.stopPropagation(),b({title:"Shutdown",description:a,variant:"destructive",confirmAction:(0,s.jsx)(je,{onClick:()=>{j(),l()},"aria-label":"Confirm Shutdown",children:"Shutdown"})})},e[2]=l,e[3]=a,e[4]=j,e[5]=b,e[6]=c):c=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(me,{strokeWidth:1}),e[7]=n):n=e[7];let d;e[8]!==i||e[9]!==m||e[10]!==c?(d=(0,s.jsx)(V,{"aria-label":"Shutdown","data-testid":"shutdown-button",shape:"circle",size:"small",color:m,className:"h-[27px] w-[27px]",disabled:i,onClick:c,children:n}),e[8]=i,e[9]=m,e[10]=c,e[11]=d):d=e[11];let x;return e[12]!==d||e[13]!==u?(x=(0,s.jsx)(G,{content:u,children:d}),e[12]=d,e[13]=u,e[14]=x):x=e[14],x};function Me(){window.close()}var J=E(),W=z(Z(),1),Ae=100;const Fe=()=>{let t=(0,J.c)(37),[e,a]=re(),{saveAppConfig:f}=U(),r=(0,W.useId)(),i=(0,W.useId)(),u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=fe(ne),t[0]=u):u=t[0];let b;t[1]===e?b=t[2]:(b={resolver:u,defaultValues:e},t[1]=e,t[2]=b);let l=xe(b),o;t[3]!==f||t[4]!==a?(o=async p=>{await f({config:p}).then(()=>{a(p)}).catch(()=>{a(p)})},t[3]=f,t[4]=a,t[5]=o):o=t[5];let w=o,j;t[6]===w?j=t[7]:(j=p=>{w(p)},t[6]=w,t[7]=j);let m=Ce(j,Ae),c;t[8]===e.width?c=t[9]:(c=[e.width],t[8]=e.width,t[9]=c),(0,W.useEffect)(Pe,c);let n;t[10]!==m||t[11]!==l?(n=l.handleSubmit(m),t[10]=m,t[11]=l,t[12]=n):n=t[12];let d;t[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsxs)("div",{children:[(0,s.jsx)(oe,{children:"Notebook Settings"}),(0,s.jsx)(le,{children:"Configure how your notebook or application looks and behaves."})]}),t[13]=d):d=t[13];let x;t[14]===l.control?x=t[15]:(x=(0,s.jsxs)(H,{title:"Display",children:[(0,s.jsx)(M,{control:l.control,name:"width",render:He}),(0,s.jsx)(M,{control:l.control,name:"app_title",render:Ee})]}),t[14]=l.control,t[15]=x);let h;t[16]===l.control?h=t[17]:(h=(0,s.jsxs)(H,{title:"Custom Files",children:[(0,s.jsx)(M,{control:l.control,name:"css_file",render:Ie}),(0,s.jsx)(M,{control:l.control,name:"html_head_file",render:Oe})]}),t[16]=l.control,t[17]=h);let y;t[18]===l.control?y=t[19]:(y=(0,s.jsx)(H,{title:"Data",children:(0,s.jsx)(M,{control:l.control,name:"sql_output",render:ze})}),t[18]=l.control,t[19]=y);let N;t[20]!==r||t[21]!==i?(N=p=>{let{field:_}=p;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-col gap-2",children:[(0,s.jsx)(L,{children:(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(D,{id:r,"data-testid":"html-checkbox",checked:_.value.includes("html"),onCheckedChange:()=>{_.onChange(R(_.value,"html"))}}),(0,s.jsx)(S,{htmlFor:r,children:"HTML"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(D,{id:i,"data-testid":"ipynb-checkbox",checked:_.value.includes("ipynb"),onCheckedChange:()=>{_.onChange(R(_.value,"ipynb"))}}),(0,s.jsx)(S,{htmlFor:i,children:"IPYNB"})]})]})}),(0,s.jsx)(A,{})]}),(0,s.jsxs)(P,{children:["When enabled, marimo will periodically save this notebook in your selected formats (HTML, IPYNB) to a folder named"," ",(0,s.jsx)(O,{className:"inline",children:"__marimo__"})," next to your notebook file."]})]})},t[20]=r,t[21]=i,t[22]=N):N=t[22];let v;t[23]!==l.control||t[24]!==N?(v=(0,s.jsx)(H,{title:"Exporting outputs",children:(0,s.jsx)(M,{control:l.control,name:"auto_download",render:N})}),t[23]=l.control,t[24]=N,t[25]=v):v=t[25];let C;t[26]!==v||t[27]!==x||t[28]!==h||t[29]!==y?(C=(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-4",children:[x,h,y,v]}),t[26]=v,t[27]=x,t[28]=h,t[29]=y,t[30]=C):C=t[30];let g;t[31]!==C||t[32]!==n?(g=(0,s.jsxs)("form",{onChange:n,className:"flex flex-col gap-6",children:[d,C]}),t[31]=C,t[32]=n,t[33]=g):g=t[33];let k;return t[34]!==l||t[35]!==g?(k=(0,s.jsx)(pe,{...l,children:g}),t[34]=l,t[35]=g,t[36]=k):k=t[36],k};var H=t=>{let e=(0,J.c)(5),{title:a,children:f}=t,r;e[0]===a?r=e[1]:(r=(0,s.jsx)("h3",{className:"text-base font-semibold mb-1",children:a}),e[0]=a,e[1]=r);let i;return e[2]!==f||e[3]!==r?(i=(0,s.jsxs)("div",{className:"flex flex-col gap-y-2",children:[r,f]}),e[2]=f,e[3]=r,e[4]=i):i=e[4],i};function Pe(){window.dispatchEvent(new Event("resize"))}function qe(t){return(0,s.jsx)("option",{value:t,children:t},t)}function He(t){let{field:e}=t;return(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"Width"}),(0,s.jsx)(L,{children:(0,s.jsx)(Y,{"data-testid":"app-width-select",onChange:a=>e.onChange(a.target.value),value:e.value,disabled:e.disabled,className:"inline-flex mr-2",children:ee().map(qe)})}),(0,s.jsx)(A,{})]})}function Ee(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"App title"}),(0,s.jsx)(L,{children:(0,s.jsx)(I,{...e,value:e.value??"",onChange:a=>{e.onChange(a.target.value),Q.safeParse(a.target.value).success&&(document.title=a.target.value)}})}),(0,s.jsx)(A,{})]}),(0,s.jsx)(P,{children:"The application title is put in the title tag in the HTML code and typically displayed in the title bar of the browser window."})]})}function Ie(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{className:"shrink-0",children:"Custom CSS"}),(0,s.jsx)(L,{children:(0,s.jsx)(I,{...e,value:e.value??"",placeholder:"custom.css",onChange:a=>{e.onChange(a.target.value),Q.safeParse(a.target.value).success&&(document.title=a.target.value)}})}),(0,s.jsx)(A,{})]}),(0,s.jsx)(P,{children:"A filepath to a custom css file to be injected into the notebook."})]})}function Oe(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{className:"shrink-0",children:"HTML Head"}),(0,s.jsx)(L,{children:(0,s.jsx)(I,{...e,value:e.value??"",placeholder:"head.html",onChange:a=>{e.onChange(a.target.value)}})}),(0,s.jsx)(A,{})]}),(0,s.jsxs)(P,{children:["A filepath to an HTML file to be injected into the"," ",(0,s.jsx)(O,{className:"inline",children:"<head/>"})," section of the notebook. Use this to add analytics, custom fonts, meta tags, or external scripts."]})]})}function We(t){return(0,s.jsx)("option",{value:t.value,children:t.label},t.value)}function ze(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"SQL Output Type"}),(0,s.jsx)(L,{children:(0,s.jsx)(Y,{"data-testid":"sql-output-select",onChange:a=>{e.onChange(a.target.value),ue({title:"Kernel Restart Required",description:"This change requires a kernel restart to take effect."})},value:e.value,disabled:e.disabled,className:"inline-flex mr-2",children:te.map(We)})}),(0,s.jsx)(A,{})]}),(0,s.jsxs)(P,{children:["The Python type returned by a SQL cell. For best performance with large datasets, we recommend using"," ",(0,s.jsx)(O,{className:"inline",children:"native"}),". See the"," ",(0,s.jsx)(_e,{href:"https://docs.marimo.io/guides/working_with_data/sql",children:"SQL guide"})," ","for more information."]})]})}var De=E();const Qe=t=>{let e=(0,De.c)(32),{showAppConfig:a,disabled:f,tooltip:r}=t,i=a===void 0?!0:a,u=f===void 0?!1:f,b=r===void 0?"Settings":r,[l,o]=X(ae),w=u?"disabled":"hint-green",j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=(0,s.jsx)(B,{strokeWidth:1.8}),e[0]=j):j=e[0];let m;e[1]===b?m=e[2]:(m=(0,s.jsx)(G,{content:b,children:j}),e[1]=b,e[2]=m);let c;e[3]!==u||e[4]!==w||e[5]!==m?(c=(0,s.jsx)(V,{"aria-label":"Config","data-testid":"app-config-button",shape:"circle",size:"small",className:"h-[27px] w-[27px]",disabled:u,color:w,children:m}),e[3]=u,e[4]=w,e[5]=m,e[6]=c):c=e[6];let n=c,d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsxs)(be,{className:"w-[90vw] h-[90vh] overflow-hidden sm:max-w-5xl top-[5vh] p-0",children:[(0,s.jsx)($,{children:(0,s.jsx)(ve,{children:"User settings"})}),(0,s.jsx)(se,{})]}),e[7]=d):d=e[7];let x=d;if(!i){let T;e[8]===n?T=e[9]:(T=(0,s.jsx)(ge,{children:n}),e[8]=n,e[9]=T);let q;return e[10]!==o||e[11]!==l||e[12]!==T?(q=(0,s.jsxs)(K,{open:l,onOpenChange:o,children:[T,x]}),e[10]=o,e[11]=l,e[12]=T,e[13]=q):q=e[13],q}let h;e[14]===n?h=e[15]:(h=(0,s.jsx)(we,{asChild:!0,children:n}),e[14]=n,e[15]=h);let y,N;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=(0,s.jsx)(Fe,{}),N=(0,s.jsx)("div",{className:"h-px bg-border my-2"}),e[16]=y,e[17]=N):(y=e[16],N=e[17]);let v;e[18]===o?v=e[19]:(v=()=>o(!0),e[18]=o,e[19]=v);let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=(0,s.jsx)(B,{strokeWidth:1.8,className:"w-4 h-4 mr-2"}),e[20]=C):C=e[20];let g;e[21]===v?g=e[22]:(g=(0,s.jsxs)(ye,{className:"w-[650px] overflow-auto max-h-[80vh] max-w-[80vw]",align:"end",side:"bottom",onFocusOutside:Re,children:[y,N,(0,s.jsxs)(de,{onClick:v,variant:"link",className:"px-0",children:[C,"User settings"]})]}),e[21]=v,e[22]=g);let k;e[23]!==g||e[24]!==h?(k=(0,s.jsxs)(Ne,{children:[h,g]}),e[23]=g,e[24]=h,e[25]=k):k=e[25];let p;e[26]!==o||e[27]!==l?(p=(0,s.jsx)(K,{open:l,onOpenChange:o,children:x}),e[26]=o,e[27]=l,e[28]=p):p=e[28];let _;return e[29]!==k||e[30]!==p?(_=(0,s.jsxs)(s.Fragment,{children:[k,p]}),e[29]=k,e[30]=p,e[31]=_):_=e[31],_};function Re(t){return t.preventDefault()}export{Le as n,Se as r,Qe as t};
import{r as P,t as an}from"./path-D7fidI_g.js";import{a as Q,c as cn,d as _,f as q,i,l as H,n as on,p as sn,r as rn,s as tn,t as en,u as un}from"./math-BJjKGmt3.js";function yn(o){return o.innerRadius}function ln(o){return o.outerRadius}function fn(o){return o.startAngle}function pn(o){return o.endAngle}function xn(o){return o&&o.padAngle}function gn(o,h,C,b,v,d,F,e){var D=C-o,a=b-h,n=F-v,p=e-d,t=p*D-n*a;if(!(t*t<1e-12))return t=(n*(h-d)-p*(o-v))/t,[o+t*D,h+t*a]}function X(o,h,C,b,v,d,F){var e=o-C,D=h-b,a=(F?d:-d)/q(e*e+D*D),n=a*D,p=-a*e,t=o+n,c=h+p,y=C+n,l=b+p,I=(t+y)/2,s=(c+l)/2,x=y-t,f=l-c,T=x*x+f*f,k=v-d,A=t*l-y*c,E=(f<0?-1:1)*q(cn(0,k*k*T-A*A)),O=(A*f-x*E)/T,R=(-A*x-f*E)/T,S=(A*f+x*E)/T,g=(-A*x+f*E)/T,m=O-I,r=R-s,u=S-I,L=g-s;return m*m+r*r>u*u+L*L&&(O=S,R=g),{cx:O,cy:R,x01:-n,y01:-p,x11:O*(v/k-1),y11:R*(v/k-1)}}function mn(){var o=yn,h=ln,C=P(0),b=null,v=fn,d=pn,F=xn,e=null,D=an(a);function a(){var n,p,t=+o.apply(this,arguments),c=+h.apply(this,arguments),y=v.apply(this,arguments)-tn,l=d.apply(this,arguments)-tn,I=en(l-y),s=l>y;if(e||(e=n=D()),c<t&&(p=c,c=t,t=p),!(c>1e-12))e.moveTo(0,0);else if(I>sn-1e-12)e.moveTo(c*Q(y),c*_(y)),e.arc(0,0,c,y,l,!s),t>1e-12&&(e.moveTo(t*Q(l),t*_(l)),e.arc(0,0,t,l,y,s));else{var x=y,f=l,T=y,k=l,A=I,E=I,O=F.apply(this,arguments)/2,R=O>1e-12&&(b?+b.apply(this,arguments):q(t*t+c*c)),S=H(en(c-t)/2,+C.apply(this,arguments)),g=S,m=S,r,u;if(R>1e-12){var L=rn(R/t*_(O)),J=rn(R/c*_(O));(A-=L*2)>1e-12?(L*=s?1:-1,T+=L,k-=L):(A=0,T=k=(y+l)/2),(E-=J*2)>1e-12?(J*=s?1:-1,x+=J,f-=J):(E=0,x=f=(y+l)/2)}var Z=c*Q(x),j=c*_(x),M=t*Q(k),N=t*_(k);if(S>1e-12){var U=c*Q(f),W=c*_(f),Y=t*Q(T),G=t*_(T),w;if(I<un)if(w=gn(Z,j,Y,G,U,W,M,N)){var K=Z-w[0],z=j-w[1],B=U-w[0],$=W-w[1],V=1/_(on((K*B+z*$)/(q(K*K+z*z)*q(B*B+$*$)))/2),nn=q(w[0]*w[0]+w[1]*w[1]);g=H(S,(t-nn)/(V-1)),m=H(S,(c-nn)/(V+1))}else g=m=0}E>1e-12?m>1e-12?(r=X(Y,G,Z,j,c,m,s),u=X(U,W,M,N,c,m,s),e.moveTo(r.cx+r.x01,r.cy+r.y01),m<S?e.arc(r.cx,r.cy,m,i(r.y01,r.x01),i(u.y01,u.x01),!s):(e.arc(r.cx,r.cy,m,i(r.y01,r.x01),i(r.y11,r.x11),!s),e.arc(0,0,c,i(r.cy+r.y11,r.cx+r.x11),i(u.cy+u.y11,u.cx+u.x11),!s),e.arc(u.cx,u.cy,m,i(u.y11,u.x11),i(u.y01,u.x01),!s))):(e.moveTo(Z,j),e.arc(0,0,c,x,f,!s)):e.moveTo(Z,j),!(t>1e-12)||!(A>1e-12)?e.lineTo(M,N):g>1e-12?(r=X(M,N,U,W,t,-g,s),u=X(Z,j,Y,G,t,-g,s),e.lineTo(r.cx+r.x01,r.cy+r.y01),g<S?e.arc(r.cx,r.cy,g,i(r.y01,r.x01),i(u.y01,u.x01),!s):(e.arc(r.cx,r.cy,g,i(r.y01,r.x01),i(r.y11,r.x11),!s),e.arc(0,0,t,i(r.cy+r.y11,r.cx+r.x11),i(u.cy+u.y11,u.cx+u.x11),s),e.arc(u.cx,u.cy,g,i(u.y11,u.x11),i(u.y01,u.x01),!s))):e.arc(0,0,t,k,T,s)}if(e.closePath(),n)return e=null,n+""||null}return a.centroid=function(){var n=(+o.apply(this,arguments)+ +h.apply(this,arguments))/2,p=(+v.apply(this,arguments)+ +d.apply(this,arguments))/2-un/2;return[Q(p)*n,_(p)*n]},a.innerRadius=function(n){return arguments.length?(o=typeof n=="function"?n:P(+n),a):o},a.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:P(+n),a):h},a.cornerRadius=function(n){return arguments.length?(C=typeof n=="function"?n:P(+n),a):C},a.padRadius=function(n){return arguments.length?(b=n==null?null:typeof n=="function"?n:P(+n),a):b},a.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:P(+n),a):v},a.endAngle=function(n){return arguments.length?(d=typeof n=="function"?n:P(+n),a):d},a.padAngle=function(n){return arguments.length?(F=typeof n=="function"?n:P(+n),a):F},a.context=function(n){return arguments.length?(e=n??null,a):e},a}export{mn as t};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as r}from"./chunk-O7ZBX7Z2-CFqB9i7k.js";export{r as createArchitectureServices};

Sorry, the diff of this file is too big to display

Array.prototype.slice;function t(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}export{t};
import{t}from"./createLucideIcon-BCdY6lG5.js";var r=t("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);export{r as t};
import{t as r}from"./asciiarmor-fnQAw8T8.js";export{r as asciiArmor};
function a(e){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?"error":null}const o={name:"asciiarmor",token:function(e,t){var r;if(t.state=="top")return e.sol()&&(r=e.match(/^-----BEGIN (.*)?-----\s*$/))?(t.state="headers",t.type=r[1],"tag"):a(e);if(t.state=="headers"){if(e.sol()&&e.match(/^\w+:/))return t.state="header","atom";var s=a(e);return s&&(t.state="body"),s}else{if(t.state=="header")return e.skipToEnd(),t.state="headers","string";if(t.state=="body")return e.sol()&&(r=e.match(/^-----END (.*)?-----\s*$/))?r[1]==t.type?(t.state="end","tag"):"error":e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error");if(t.state=="end")return a(e)}},blankLine:function(e){e.state=="headers"&&(e.state="body")},startState:function(){return{state:"top",type:null}}};export{o as t};
function s(i){for(var u={},A=i.split(" "),T=0;T<A.length;++T)u[A[T]]=!0;return u}var a={keywords:s("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS"),cmipVerbs:s("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),compareTypes:s("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION"),status:s("current deprecated mandatory obsolete"),tags:s("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL"),storage:s("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminString TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64"),modifier:s("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED"),accessTypes:s("not-accessible accessible-for-notify read-only read-create read-write"),multiLineStrings:!0};function L(i){var u=i.keywords||a.keywords,A=i.cmipVerbs||a.cmipVerbs,T=i.compareTypes||a.compareTypes,c=i.status||a.status,O=i.tags||a.tags,d=i.storage||a.storage,C=i.modifier||a.modifier,R=i.accessTypes||a.accessTypes,f=i.multiLineStrings||a.multiLineStrings,g=i.indentStatements!==!1,p=/[\|\^]/,E;function D(e,n){var t=e.next();if(t=='"'||t=="'")return n.tokenize=y(t),n.tokenize(e,n);if(/[\[\]\(\){}:=,;]/.test(t))return E=t,"punctuation";if(t=="-"&&e.eat("-"))return e.skipToEnd(),"comment";if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(p.test(t))return e.eatWhile(p),"operator";e.eatWhile(/[\w\-]/);var r=e.current();return u.propertyIsEnumerable(r)?"keyword":A.propertyIsEnumerable(r)?"variableName":T.propertyIsEnumerable(r)?"atom":c.propertyIsEnumerable(r)?"comment":O.propertyIsEnumerable(r)?"typeName":d.propertyIsEnumerable(r)||C.propertyIsEnumerable(r)||R.propertyIsEnumerable(r)?"modifier":"variableName"}function y(e){return function(n,t){for(var r=!1,S,m=!1;(S=n.next())!=null;){if(S==e&&!r){var I=n.peek();I&&(I=I.toLowerCase(),(I=="b"||I=="h"||I=="o")&&n.next()),m=!0;break}r=!r&&S=="\\"}return(m||!(r||f))&&(t.tokenize=null),"string"}}function l(e,n,t,r,S){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=S}function N(e,n,t){var r=e.indented;return e.context&&e.context.type=="statement"&&(r=e.context.indented),e.context=new l(r,n,t,null,e.context)}function o(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}return{name:"asn1",startState:function(){return{tokenize:null,context:new l(-2,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align??(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;E=null;var r=(n.tokenize||D)(e,n);if(r=="comment")return r;if(t.align??(t.align=!0),(E==";"||E==":"||E==",")&&t.type=="statement")o(n);else if(E=="{")N(n,e.column(),"}");else if(E=="[")N(n,e.column(),"]");else if(E=="(")N(n,e.column(),")");else if(E=="}"){for(;t.type=="statement";)t=o(n);for(t.type=="}"&&(t=o(n));t.type=="statement";)t=o(n)}else E==t.type?o(n):g&&((t.type=="}"||t.type=="top")&&E!=";"||t.type=="statement"&&E=="newstatement")&&N(n,e.column(),"statement");return n.startOfLine=!1,r},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"--"}}}}export{L as t};
import{t as a}from"./asn1-5lb7I37s.js";export{a as asn1};
var n=["exten","same","include","ignorepat","switch"],r=["#include","#exec"],o="addqueuemember.adsiprog.aelsub.agentlogin.agentmonitoroutgoing.agi.alarmreceiver.amd.answer.authenticate.background.backgrounddetect.bridge.busy.callcompletioncancel.callcompletionrequest.celgenuserevent.changemonitor.chanisavail.channelredirect.chanspy.clearhash.confbridge.congestion.continuewhile.controlplayback.dahdiacceptr2call.dahdibarge.dahdiras.dahdiscan.dahdisendcallreroutingfacility.dahdisendkeypadfacility.datetime.dbdel.dbdeltree.deadagi.dial.dictate.directory.disa.dumpchan.eagi.echo.endwhile.exec.execif.execiftime.exitwhile.extenspy.externalivr.festival.flash.followme.forkcdr.getcpeid.gosub.gosubif.goto.gotoif.gotoiftime.hangup.iax2provision.ices.importvar.incomplete.ivrdemo.jabberjoin.jabberleave.jabbersend.jabbersendgroup.jabberstatus.jack.log.macro.macroexclusive.macroexit.macroif.mailboxexists.meetme.meetmeadmin.meetmechanneladmin.meetmecount.milliwatt.minivmaccmess.minivmdelete.minivmgreet.minivmmwi.minivmnotify.minivmrecord.mixmonitor.monitor.morsecode.mp3player.mset.musiconhold.nbscat.nocdr.noop.odbc.odbc.odbcfinish.originate.ospauth.ospfinish.osplookup.ospnext.page.park.parkandannounce.parkedcall.pausemonitor.pausequeuemember.pickup.pickupchan.playback.playtones.privacymanager.proceeding.progress.queue.queuelog.raiseexception.read.readexten.readfile.receivefax.receivefax.receivefax.record.removequeuemember.resetcdr.retrydial.return.ringing.sayalpha.saycountedadj.saycountednoun.saycountpl.saydigits.saynumber.sayphonetic.sayunixtime.senddtmf.sendfax.sendfax.sendfax.sendimage.sendtext.sendurl.set.setamaflags.setcallerpres.setmusiconhold.sipaddheader.sipdtmfmode.sipremoveheader.skel.slastation.slatrunk.sms.softhangup.speechactivategrammar.speechbackground.speechcreate.speechdeactivategrammar.speechdestroy.speechloadgrammar.speechprocessingsound.speechstart.speechunloadgrammar.stackpop.startmusiconhold.stopmixmonitor.stopmonitor.stopmusiconhold.stopplaytones.system.testclient.testserver.transfer.tryexec.trysystem.unpausemonitor.unpausequeuemember.userevent.verbose.vmauthenticate.vmsayname.voicemail.voicemailmain.wait.waitexten.waitfornoise.waitforring.waitforsilence.waitmusiconhold.waituntil.while.zapateller".split(".");function s(e,t){var a="",i=e.next();if(t.blockComment)return i=="-"&&e.match("-;",!0)?t.blockComment=!1:e.skipTo("--;")?(e.next(),e.next(),e.next(),t.blockComment=!1):e.skipToEnd(),"comment";if(i==";")return e.match("--",!0)&&!e.match("-",!1)?(t.blockComment=!0,"comment"):(e.skipToEnd(),"comment");if(i=="[")return e.skipTo("]"),e.eat("]"),"header";if(i=='"')return e.skipTo('"'),"string";if(i=="'")return e.skipTo("'"),"string.special";if(i=="#"&&(e.eatWhile(/\w/),a=e.current(),r.indexOf(a)!==-1))return e.skipToEnd(),"strong";if(i=="$"&&e.peek()=="{")return e.skipTo("}"),e.eat("}"),"variableName.special";if(e.eatWhile(/\w/),a=e.current(),n.indexOf(a)!==-1){switch(t.extenStart=!0,a){case"same":t.extenSame=!0;break;case"include":case"switch":case"ignorepat":t.extenInclude=!0;break;default:break}return"atom"}}const c={name:"asterisk",startState:function(){return{blockComment:!1,extenStart:!1,extenSame:!1,extenInclude:!1,extenExten:!1,extenPriority:!1,extenApplication:!1}},token:function(e,t){var a="";if(e.eatSpace())return null;if(t.extenStart)return e.eatWhile(/[^\s]/),a=e.current(),/^=>?$/.test(a)?(t.extenExten=!0,t.extenStart=!1,"strong"):(t.extenStart=!1,e.skipToEnd(),"error");if(t.extenExten)return t.extenExten=!1,t.extenPriority=!0,e.eatWhile(/[^,]/),t.extenInclude&&(t.extenInclude=(e.skipToEnd(),t.extenPriority=!1,!1)),t.extenSame&&(t.extenPriority=!1,t.extenSame=!1,t.extenApplication=!0),"tag";if(t.extenPriority)return t.extenPriority=!1,t.extenApplication=!0,e.next(),t.extenSame?null:(e.eatWhile(/[^,]/),"number");if(t.extenApplication){if(e.eatWhile(/,/),a=e.current(),a===",")return null;if(e.eatWhile(/\w/),a=e.current().toLowerCase(),t.extenApplication=!1,o.indexOf(a)!==-1)return"def"}else return s(e,t);return null},languageData:{commentTokens:{line:";",block:{open:";--",close:"--;"}}}};export{c as asterisk};
import{s as i}from"./chunk-LvLJmgfZ.js";import{t as d}from"./react-Bj1aDYRI.js";import{t as l}from"./compiler-runtime-B3qBwwSJ.js";import{t as u}from"./jsx-runtime-ZmTK25f3.js";import{n as f,t as g}from"./cn-BKtXLv3a.js";var b=l();d();var c=i(u(),1),m=f("inline-flex items-center border rounded-full px-2 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary hover:bg-primary/60 border-transparent text-primary-foreground",defaultOutline:"bg-(--blue-2) border-(--blue-8) text-(--blue-11)",secondary:"bg-secondary hover:bg-secondary/80 border-transparent text-secondary-foreground",destructive:"bg-(--red-2) border-(--red-6) text-(--red-9) hover:bg-(--red-3)",success:"bg-(--grass-2) border-(--grass-5) text-(--grass-9) hover:bg-(--grass-3)",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),p=n=>{let r=(0,b.c)(10),e,t,a;r[0]===n?(e=r[1],t=r[2],a=r[3]):({className:e,variant:a,...t}=n,r[0]=n,r[1]=e,r[2]=t,r[3]=a);let o;r[4]!==e||r[5]!==a?(o=g(m({variant:a}),e),r[4]=e,r[5]=a,r[6]=o):o=r[6];let s;return r[7]!==t||r[8]!==o?(s=(0,c.jsx)("div",{className:o,...t}),r[7]=t,r[8]=o,r[9]=s):s=r[9],s};export{p as t};
function s(n){return new Promise((o,l)=>{let r=new FileReader;r.onload=e=>{var t;o((t=e.target)==null?void 0:t.result)},r.onerror=e=>{l(Error(`Failed to read blob: ${e.type}`))},r.readAsDataURL(n)})}function b(n){var d;let[o,l]=n.split(",",2),r=(d=/^data:(.+);base64$/.exec(o))==null?void 0:d[1],e=atob(l),t=e.length,i=new Uint8Array(t);for(let a=0;a<t;a++)i[a]=e.charCodeAt(a);return new Blob([i],{type:r})}export{s as n,b as t};

Sorry, the diff of this file is too big to display

import{t as a}from"./createLucideIcon-BCdY6lG5.js";var e=a("bot-message-square",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z",key:"11gyqh"}],["path",{d:"M9 11v2",key:"1ueba0"}]]);export{e as t};
var r="><+-.,[]".split("");const o={name:"brainfuck",startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(n,t){if(n.eatSpace())return null;n.sol()&&(t.commentLine=!1);var e=n.next().toString();if(r.indexOf(e)!==-1){if(t.commentLine===!0)return n.eol()&&(t.commentLine=!1),"comment";if(e==="]"||e==="[")return e==="["?t.left++:t.right++,"bracket";if(e==="+"||e==="-")return"keyword";if(e==="<"||e===">")return"atom";if(e==="."||e===",")return"def"}else return t.commentLine=!0,n.eol()&&(t.commentLine=!1),"comment";n.eol()&&(t.commentLine=!1)}};export{o as t};
import{t as r}from"./brainfuck-D30bRgvC.js";export{r as brainfuck};
import{s as S}from"./chunk-LvLJmgfZ.js";import{t as m}from"./react-Bj1aDYRI.js";var n=S(m());function k(e,u){var r=(0,n.useRef)(null),c=(0,n.useRef)(null);c.current=u;var t=(0,n.useRef)(null);(0,n.useEffect)(function(){f()});var f=(0,n.useCallback)(function(){var i=t.current,s=c.current,o=i||(s?s instanceof Element?s:s.current:null);r.current&&r.current.element===o&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:o,subscriber:e,cleanup:o?e(o):void 0})},[e]);return(0,n.useEffect)(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),(0,n.useCallback)(function(i){t.current=i,f()},[f])}function g(e,u,r){return e[u]?e[u][0]?e[u][0][r]:e[u][r]:u==="contentBoxSize"?e.contentRect[r==="inlineSize"?"width":"height"]:void 0}function B(e){e===void 0&&(e={});var u=e.onResize,r=(0,n.useRef)(void 0);r.current=u;var c=e.round||Math.round,t=(0,n.useRef)(),f=(0,n.useState)({width:void 0,height:void 0}),i=f[0],s=f[1],o=(0,n.useRef)(!1);(0,n.useEffect)(function(){return o.current=!1,function(){o.current=!0}},[]);var a=(0,n.useRef)({width:void 0,height:void 0}),h=k((0,n.useCallback)(function(v){return(!t.current||t.current.box!==e.box||t.current.round!==c)&&(t.current={box:e.box,round:c,instance:new ResizeObserver(function(z){var b=z[0],x=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",p=g(b,x,"inlineSize"),w=g(b,x,"blockSize"),l=p?c(p):void 0,d=w?c(w):void 0;if(a.current.width!==l||a.current.height!==d){var R={width:l,height:d};a.current.width=l,a.current.height=d,r.current?r.current(R):o.current||s(R)}})}),t.current.instance.observe(v,{box:e.box}),function(){t.current&&t.current.instance.unobserve(v)}},[e.box,c]),e.ref);return(0,n.useMemo)(function(){return{ref:h,width:i.width,height:i.height}},[h,i.width,i.height])}export{B as t};
import{s as k}from"./chunk-LvLJmgfZ.js";import{t as R}from"./react-Bj1aDYRI.js";import{t as j}from"./compiler-runtime-B3qBwwSJ.js";import{l as I}from"./hotkeys-BHHWjLlp.js";import{n as S,t as K}from"./useEventListener-Cb-RVVEn.js";import{t as O}from"./jsx-runtime-ZmTK25f3.js";import{n as A,t as d}from"./cn-BKtXLv3a.js";var a=k(R(),1),w=k(O(),1),D=Symbol.for("react.lazy"),h=a.use;function P(e){return typeof e=="object"&&!!e&&"then"in e}function C(e){return typeof e=="object"&&!!e&&"$$typeof"in e&&e.$$typeof===D&&"_payload"in e&&P(e._payload)}function N(e){let r=$(e),t=a.forwardRef((n,o)=>{let{children:i,...l}=n;C(i)&&typeof h=="function"&&(i=h(i._payload));let s=a.Children.toArray(i),u=s.find(H);if(u){let p=u.props.children,c=s.map(g=>g===u?a.Children.count(p)>1?a.Children.only(null):a.isValidElement(p)?p.props.children:null:g);return(0,w.jsx)(r,{...l,ref:o,children:a.isValidElement(p)?a.cloneElement(p,void 0,c):null})}return(0,w.jsx)(r,{...l,ref:o,children:i})});return t.displayName=`${e}.Slot`,t}var _=N("Slot");function $(e){let r=a.forwardRef((t,n)=>{let{children:o,...i}=t;if(C(o)&&typeof h=="function"&&(o=h(o._payload)),a.isValidElement(o)){let l=W(o),s=V(i,o.props);return o.type!==a.Fragment&&(s.ref=n?S(n,l):l),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var z=Symbol("radix.slottable");function H(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z}function V(e,r){let t={...r};for(let n in r){let o=e[n],i=r[n];/^on[A-Z]/.test(n)?o&&i?t[n]=(...l)=>{let s=i(...l);return o(...l),s}:o&&(t[n]=o):n==="style"?t[n]={...o,...i}:n==="className"&&(t[n]=[o,i].filter(Boolean).join(" "))}return{...e,...t}}function W(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const E={stopPropagation:e=>r=>{r.stopPropagation(),e&&e(r)},onEnter:e=>r=>{r.key==="Enter"&&e&&e(r)},preventFocus:e=>{e.preventDefault()},fromInput:e=>{let r=e.target;return r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.tagName.startsWith("MARIMO")||r.isContentEditable||E.fromCodeMirror(e)},fromCodeMirror:e=>e.target.closest(".cm-editor")!==null,shouldIgnoreKeyboardEvent(e){return e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement||e.target instanceof HTMLElement&&(e.target.isContentEditable||e.target.tagName==="BUTTON"||e.target.closest("[role='textbox']")!==null||e.target.closest("[contenteditable='true']")!==null||e.target.closest(".cm-editor")!==null)},hasModifier:e=>e.ctrlKey||e.metaKey||e.altKey||e.shiftKey,isMetaOrCtrl:e=>e.metaKey||e.ctrlKey};var L=j(),f="active:shadow-none",T=A(d("disabled:opacity-50 disabled:pointer-events-none","inline-flex items-center justify-center rounded-md text-sm font-medium focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background"),{variants:{variant:{default:d("bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs border border-primary",f),destructive:d("border shadow-xs","bg-(--red-9) hover:bg-(--red-10) dark:bg-(--red-6) dark:hover:bg-(--red-7)","text-(--red-1) dark:text-(--red-12)","border-(--red-11)",f),success:d("border shadow-xs","bg-(--grass-9) hover:bg-(--grass-10) dark:bg-(--grass-6) dark:hover:bg-(--grass-7)","text-(--grass-1) dark:text-(--grass-12)","border-(--grass-11)",f),warn:d("border shadow-xs","bg-(--yellow-9) hover:bg-(--yellow-10) dark:bg-(--yellow-6) dark:hover:bg-(--yellow-7)","text-(--yellow-12)","border-(--yellow-11)",f),action:d("bg-action text-action-foreground shadow-xs","hover:bg-action-hover border border-action",f),outline:d("border border-slate-300 shadow-xs","hover:bg-accent hover:text-accent-foreground","hover:border-primary","aria-selected:text-accent-foreground aria-selected:border-primary",f),secondary:d("bg-secondary text-secondary-foreground hover:bg-secondary/80","border border-input shadow-xs",f),text:d("opacity-80 hover:opacity-100","active:opacity-100"),ghost:d("border border-transparent","hover:bg-accent hover:text-accent-foreground hover:shadow-xs",f,"active:text-accent-foreground"),link:"underline-offset-4 hover:underline text-link",linkDestructive:"underline-offset-4 hover:underline text-destructive underline-destructive",outlineDestructive:"border border-destructive text-destructive hover:bg-destructive/10"},size:{default:"h-10 py-2 px-4",xs:"h-7 px-2 rounded-md text-xs",sm:"h-9 px-3 rounded-md",lg:"h-11 px-8 rounded-md",icon:"h-6 w-6 mb-0"},disabled:{true:"opacity-50 pointer-events-none"}},defaultVariants:{variant:"default",size:"sm"}}),M=a.forwardRef((e,r)=>{let t=(0,L.c)(7),{className:n,variant:o,size:i,asChild:l,keyboardShortcut:s,...u}=e,p=l===void 0?!1:l,c=a.useRef(null),g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>c.current,t[0]=g):g=t[0],a.useImperativeHandle(r,g);let b;t[1]===s?b=t[2]:(b=y=>{s&&(E.shouldIgnoreKeyboardEvent(y)||I(s)(y)&&(y.preventDefault(),y.stopPropagation(),c!=null&&c.current&&!c.current.disabled&&c.current.click()))},t[1]=s,t[2]=b),K(document,"keydown",b);let v=p?_:"button",x=d(T({variant:o,size:i,className:n,disabled:u.disabled}),n),m;return t[3]!==v||t[4]!==u||t[5]!==x?(m=(0,w.jsx)(v,{className:x,ref:c,...u}),t[3]=v,t[4]=u,t[5]=x,t[6]=m):m=t[6],m});M.displayName="Button";export{N as a,_ as i,T as n,E as r,M as t};

Sorry, the diff of this file is too big to display

import{s as z}from"./chunk-LvLJmgfZ.js";import{u as O}from"./useEvent-BhXAndur.js";import{t as A}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import{t as B}from"./compiler-runtime-B3qBwwSJ.js";import{t as R}from"./jsx-runtime-ZmTK25f3.js";import{t as P}from"./button-CZ3Cs4qb.js";import{t as G}from"./cn-BKtXLv3a.js";import{r as H}from"./requests-B4FYHTZl.js";import{t as _}from"./database-zap-k4ePIFAU.js";import{t as S}from"./spinner-DA8-7wQv.js";import{t as F}from"./refresh-cw-Dx8TEWFP.js";import{t as K}from"./trash-2-DDsWrxuJ.js";import{t as D}from"./use-toast-BDYuj3zG.js";import"./Combination-BAEdC-rz.js";import{a as q,c as J,i as Q,l as U,n as V,o as W,r as X,s as Y,t as Z,u as ee}from"./alert-dialog-BW4srmS0.js";import{t as se}from"./context-BfYAMNLF.js";import{r as m}from"./numbers-D7O23mOZ.js";import{n as te}from"./useAsyncData-BMGLSTg8.js";import{t as E}from"./empty-state-B8Cxr9nj.js";import{t as ae}from"./requests-De5yEBc8.js";var ie=B(),I=z(A(),1),s=z(R(),1);const re=i=>{let e=(0,ie.c)(27),{children:t,title:l,description:r,onConfirm:a,confirmText:c,cancelText:o,destructive:n}=i,y=c===void 0?"Continue":c,u=o===void 0?"Cancel":o,p=n===void 0?!1:n,[j,k]=I.useState(!1),f;e[0]===a?f=e[1]:(f=()=>{a(),k(!1)},e[0]=a,e[1]=f);let v=f,h=p?W:V,x;e[2]===t?x=e[3]:(x=(0,s.jsx)(ee,{asChild:!0,children:t}),e[2]=t,e[3]=x);let d;e[4]===l?d=e[5]:(d=(0,s.jsx)(U,{children:l}),e[4]=l,e[5]=d);let g;e[6]===r?g=e[7]:(g=(0,s.jsx)(q,{children:r}),e[6]=r,e[7]=g);let N;e[8]!==d||e[9]!==g?(N=(0,s.jsxs)(J,{children:[d,g]}),e[8]=d,e[9]=g,e[10]=N):N=e[10];let b;e[11]===u?b=e[12]:(b=(0,s.jsx)(X,{children:u}),e[11]=u,e[12]=b);let C;e[13]!==h||e[14]!==y||e[15]!==v?(C=(0,s.jsx)(h,{onClick:v,children:y}),e[13]=h,e[14]=y,e[15]=v,e[16]=C):C=e[16];let w;e[17]!==C||e[18]!==b?(w=(0,s.jsxs)(Y,{children:[b,C]}),e[17]=C,e[18]=b,e[19]=w):w=e[19];let $;e[20]!==w||e[21]!==N?($=(0,s.jsxs)(Q,{children:[N,w]}),e[20]=w,e[21]=N,e[22]=$):$=e[22];let M;return e[23]!==j||e[24]!==$||e[25]!==x?(M=(0,s.jsxs)(Z,{open:j,onOpenChange:k,children:[x,$]}),e[23]=j,e[24]=$,e[25]=x,e[26]=M):M=e[26],M};function L(i,e){if(i===0||i===-1)return"0 B";let t=1024,l=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(i)/Math.log(t));return`${m(i/t**r,e)} ${l[r]}`}function le(i,e){if(i===0)return"0s";if(i<.001)return`${m(i*1e6,e)}\xB5s`;if(i<1)return`${m(i*1e3,e)}ms`;if(i<60)return`${m(i,e)}s`;let t=Math.floor(i/60),l=i%60;if(t<60)return l>0?`${t}m ${m(l,e)}s`:`${t}m`;let r=Math.floor(t/60),a=t%60;return a>0?`${r}h ${a}m`:`${r}h`}var oe=B(),ce=()=>{let{clearCache:i,getCacheInfo:e}=H(),t=O(ae),[l,r]=(0,I.useState)(!1),{locale:a}=se(),{isPending:c,isFetching:o,refetch:n}=te(async()=>{await e(),await new Promise(d=>setTimeout(d,500))},[]),y=async()=>{try{r(!0),await i(),D({title:"Cache purged",description:"All cached data has been cleared"}),n()}catch(d){D({title:"Error",description:d instanceof Error?d.message:"Failed to purge cache",variant:"danger"})}finally{r(!1)}};if(c&&!t)return(0,s.jsx)(S,{size:"medium",centered:!0});let u=(0,s.jsxs)(P,{variant:"outline",size:"sm",onClick:n,disabled:o,children:[o?(0,s.jsx)(S,{size:"small",className:"w-4 h-4 mr-2"}):(0,s.jsx)(F,{className:"w-4 h-4 mr-2"}),"Refresh"]});if(!t)return(0,s.jsx)(E,{title:"No cache data",description:"Cache information is not available.",icon:(0,s.jsx)(_,{}),action:u});let p=t.hits,j=t.misses,k=t.time,f=t.disk_total,v=t.disk_to_free,h=p+j,x=h>0?p/h*100:0;return h===0?(0,s.jsx)(E,{title:"No cache activity",description:"The cache has not been used yet. Cached functions will appear here once they are executed.",icon:(0,s.jsx)(_,{}),action:u}):(0,s.jsx)("div",{className:"flex flex-col h-full overflow-auto",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4 p-4 h-full",children:[(0,s.jsx)("div",{className:"flex items-center justify-end",children:(0,s.jsx)(P,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:n,disabled:o,children:(0,s.jsx)(F,{className:G("h-4 w-4 text-muted-foreground hover:text-foreground",o&&"animate-[spin_0.5s]")})})}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Statistics"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(T,{label:"Time saved",value:le(k,a),description:"Total execution time saved"}),(0,s.jsx)(T,{label:"Hit rate",value:h>0?`${m(x,a)}%`:"\u2014",description:`${m(p,a)} hits / ${m(h,a)} total`}),(0,s.jsx)(T,{label:"Cache hits",value:m(p,a),description:"Successful cache retrievals"}),(0,s.jsx)(T,{label:"Cache misses",value:m(j,a),description:"Cache not found"})]})]}),f>0&&(0,s.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Storage"}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3",children:(0,s.jsx)(T,{label:"Disk usage",value:L(f,a),description:v>0?`${L(v,a)} can be freed`:"Cache storage on disk"})})]}),(0,s.jsx)("div",{className:"my-auto"}),(0,s.jsx)("div",{className:"pt-2 border-t",children:(0,s.jsx)(re,{title:"Purge cache?",description:"This will permanently delete all cached data. This action cannot be undone.",confirmText:"Purge",destructive:!0,onConfirm:y,children:(0,s.jsxs)(P,{variant:"outlineDestructive",size:"xs",disabled:l,className:"w-full",children:[l?(0,s.jsx)(S,{size:"small",className:"w-3 h-3 mr-2"}):(0,s.jsx)(K,{className:"w-3 h-3 mr-2"}),"Purge Cache"]})})})]})})},T=i=>{let e=(0,oe.c)(10),{label:t,value:l,description:r}=i,a;e[0]===t?a=e[1]:(a=(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t}),e[0]=t,e[1]=a);let c;e[2]===l?c=e[3]:(c=(0,s.jsx)("span",{className:"text-lg font-semibold",children:l}),e[2]=l,e[3]=c);let o;e[4]===r?o=e[5]:(o=r&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:r}),e[4]=r,e[5]=o);let n;return e[6]!==a||e[7]!==c||e[8]!==o?(n=(0,s.jsxs)("div",{className:"flex flex-col gap-1 p-3 rounded-lg border bg-card",children:[a,c,o]}),e[6]=a,e[7]=c,e[8]=o,e[9]=n):n=e[9],n},ne=ce;export{ne as default};
import{s as i}from"./chunk-LvLJmgfZ.js";import{t as u}from"./react-Bj1aDYRI.js";import{t as w}from"./compiler-runtime-B3qBwwSJ.js";import{t as y}from"./jsx-runtime-ZmTK25f3.js";import{t as d}from"./cn-BKtXLv3a.js";var c=w(),m=i(u(),1),f=i(y(),1),n=m.forwardRef((t,o)=>{let r=(0,c.c)(9),a,e;r[0]===t?(a=r[1],e=r[2]):({className:a,...e}=t,r[0]=t,r[1]=a,r[2]=e);let s;r[3]===a?s=r[4]:(s=d("rounded-xl border bg-card text-card-foreground shadow",a),r[3]=a,r[4]=s);let l;return r[5]!==e||r[6]!==o||r[7]!==s?(l=(0,f.jsx)("div",{ref:o,className:s,...e}),r[5]=e,r[6]=o,r[7]=s,r[8]=l):l=r[8],l});n.displayName="Card";var p=m.forwardRef((t,o)=>{let r=(0,c.c)(9),a,e;r[0]===t?(a=r[1],e=r[2]):({className:a,...e}=t,r[0]=t,r[1]=a,r[2]=e);let s;r[3]===a?s=r[4]:(s=d("flex flex-col space-y-1.5 p-6",a),r[3]=a,r[4]=s);let l;return r[5]!==e||r[6]!==o||r[7]!==s?(l=(0,f.jsx)("div",{ref:o,className:s,...e}),r[5]=e,r[6]=o,r[7]=s,r[8]=l):l=r[8],l});p.displayName="CardHeader";var N=m.forwardRef((t,o)=>{let r=(0,c.c)(9),a,e;r[0]===t?(a=r[1],e=r[2]):({className:a,...e}=t,r[0]=t,r[1]=a,r[2]=e);let s;r[3]===a?s=r[4]:(s=d("font-semibold leading-none tracking-tight",a),r[3]=a,r[4]=s);let l;return r[5]!==e||r[6]!==o||r[7]!==s?(l=(0,f.jsx)("div",{ref:o,className:s,...e}),r[5]=e,r[6]=o,r[7]=s,r[8]=l):l=r[8],l});N.displayName="CardTitle";var x=m.forwardRef((t,o)=>{let r=(0,c.c)(9),a,e;r[0]===t?(a=r[1],e=r[2]):({className:a,...e}=t,r[0]=t,r[1]=a,r[2]=e);let s;r[3]===a?s=r[4]:(s=d("text-sm text-muted-foreground",a),r[3]=a,r[4]=s);let l;return r[5]!==e||r[6]!==o||r[7]!==s?(l=(0,f.jsx)("div",{ref:o,className:s,...e}),r[5]=e,r[6]=o,r[7]=s,r[8]=l):l=r[8],l});x.displayName="CardDescription";var v=m.forwardRef((t,o)=>{let r=(0,c.c)(9),a,e;r[0]===t?(a=r[1],e=r[2]):({className:a,...e}=t,r[0]=t,r[1]=a,r[2]=e);let s;r[3]===a?s=r[4]:(s=d("p-6 pt-0",a),r[3]=a,r[4]=s);let l;return r[5]!==e||r[6]!==o||r[7]!==s?(l=(0,f.jsx)("div",{ref:o,className:s,...e}),r[5]=e,r[6]=o,r[7]=s,r[8]=l):l=r[8],l});v.displayName="CardContent";var C=m.forwardRef((t,o)=>{let r=(0,c.c)(9),a,e;r[0]===t?(a=r[1],e=r[2]):({className:a,...e}=t,r[0]=t,r[1]=a,r[2]=e);let s;r[3]===a?s=r[4]:(s=d("flex items-center p-6 pt-0",a),r[3]=a,r[4]=s);let l;return r[5]!==e||r[6]!==o||r[7]!==s?(l=(0,f.jsx)("div",{ref:o,className:s,...e}),r[5]=e,r[6]=o,r[7]=s,r[8]=l):l=r[8],l});C.displayName="CardFooter";export{N as a,p as i,v as n,x as r,n as t};

Sorry, the diff of this file is too big to display

import{s as j}from"./chunk-LvLJmgfZ.js";import{d as P,l as w,n as y,u as L}from"./useEvent-BhXAndur.js";import{Yt as O,ii as A,j as E,k as S,qr as _,vt as T,w as $}from"./cells-DPp5cDaO.js";import{t as b}from"./compiler-runtime-B3qBwwSJ.js";import{d as q}from"./hotkeys-BHHWjLlp.js";import{d as D}from"./utils-YqBXNpsM.js";import{r as x}from"./constants-B6Cb__3x.js";import{h as F,x as B}from"./config-Q0O7_stz.js";import{t as H}from"./jsx-runtime-ZmTK25f3.js";import{t as M}from"./cn-BKtXLv3a.js";import{r as R}from"./requests-B4FYHTZl.js";import{n as U}from"./paths-BzSgteR-.js";import{s as V}from"./session-BOFn9QrD.js";import{n as Y}from"./ImperativeModal-BNN1HA7x.js";var z=b();function I(){return L(_)}function G(){let r=(0,z.c)(5),[t]=w(F),e=P(_),{openAlert:o}=Y(),{sendRename:a}=R(),s;return r[0]!==t.state||r[1]!==o||r[2]!==a||r[3]!==e?(s=async l=>{let n=D();return t.state===B.OPEN?(V(i=>{l===null?i.delete(x.filePath):i.set(x.filePath,l)}),a({filename:l}).then(()=>(e(l),document.title=n.app_title||U.basename(l)||"Untitled Notebook",l)).catch(i=>(o(i.message),null))):(o("Failed to save notebook: not connected to a kernel."),null)},r[0]=t.state,r[1]=o,r[2]=a,r[3]=e,r[4]=s):s=r[4],y(s)}var p=b(),v=j(H(),1);const k=r=>{let t=(0,p.c)(12),{className:e,cellId:o,variant:a,onClick:s,formatCellName:l,skipScroll:n}=r,i=E()[o]??"",C=S().inOrderIds.indexOf(o),{showCellIfHidden:d}=$(),g=l??Q,c;t[0]===e?c=t[1]:(c=M("inline-block cursor-pointer text-link hover:underline",e),t[0]=e,t[1]=c);let m;t[2]!==o||t[3]!==s||t[4]!==d||t[5]!==n||t[6]!==a?(m=h=>{if(o==="__scratch__")return!1;d({cellId:o}),h.stopPropagation(),h.preventDefault(),requestAnimationFrame(()=>{N(o,a,n)&&(s==null||s())})},t[2]=o,t[3]=s,t[4]=d,t[5]=n,t[6]=a,t[7]=m):m=t[7];let f=g(T(i,C)),u;return t[8]!==c||t[9]!==m||t[10]!==f?(u=(0,v.jsx)("div",{className:c,role:"link",tabIndex:-1,onClick:m,children:f}),t[8]=c,t[9]=m,t[10]=f,t[11]=u):u=t[11],u},J=r=>{let t=(0,p.c)(2),e;return t[0]===r?e=t[1]:(e=(0,v.jsx)(k,{...r,variant:"destructive"}),t[0]=r,t[1]=e),e},K=r=>{let t=(0,p.c)(10),{cellId:e,lineNumber:o}=r,a=I(),s;t[0]!==e||t[1]!==o?(s=()=>O(e,o),t[0]=e,t[1]=o,t[2]=s):s=t[2];let l;t[3]!==e||t[4]!==a?(l=i=>e==="__scratch__"?"scratch":`marimo://${a||"untitled"}#cell=${i}`,t[3]=e,t[4]=a,t[5]=l):l=t[5];let n;return t[6]!==e||t[7]!==s||t[8]!==l?(n=(0,v.jsx)(k,{cellId:e,onClick:s,skipScroll:!0,variant:"destructive",className:"traceback-cell-link",formatCellName:l}),t[6]=e,t[7]=s,t[8]=l,t[9]=n):n=t[9],n};function N(r,t,e){let o=A.create(r),a=document.getElementById(o);return a===null?(q.error(`Cell ${o} not found on page.`),!1):(e||a.scrollIntoView({behavior:"smooth",block:"center"}),t==="destructive"&&(a.classList.add("error-outline"),setTimeout(()=>{a.classList.remove("error-outline")},2e3)),t==="focus"&&(a.classList.add("focus-outline"),setTimeout(()=>{a.classList.remove("focus-outline")},2e3)),!0)}function Q(r){return r}export{I as a,N as i,J as n,G as o,K as r,k as t};

Sorry, the diff of this file is too big to display

import{s as $}from"./chunk-LvLJmgfZ.js";import{t as z}from"./react-Bj1aDYRI.js";import{Z as F}from"./cells-DPp5cDaO.js";import{t as O}from"./compiler-runtime-B3qBwwSJ.js";import{d as B}from"./hotkeys-BHHWjLlp.js";import{t as L}from"./jsx-runtime-ZmTK25f3.js";import{t as V}from"./createLucideIcon-BCdY6lG5.js";import{c as Z,l as A,n as G,t as _}from"./toDate-DETS9bBd.js";import{t as J}from"./ellipsis-DfDsMPvA.js";import{t as R}from"./refresh-cw-Dx8TEWFP.js";import{t as K}from"./workflow-BphwJiK3.js";import{t as D}from"./tooltip-CMQz28hC.js";import{i as Q,n as Y,r as C,t as U}from"./en-US-CCVfmA-q.js";import{t as E}from"./useDateFormatter-CqhdUl2n.js";import{t as H}from"./multi-icon-jM74Rbvg.js";var k=V("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function X(n,e){let t=_(n)-+_(e);return t<0?-1:t>0?1:t}function ee(n){return G(n,Date.now())}function te(n,e,t){let[d,l]=Y(t==null?void 0:t.in,n,e),h=d.getFullYear()-l.getFullYear(),o=d.getMonth()-l.getMonth();return h*12+o}function se(n){return e=>{let t=(n?Math[n]:Math.trunc)(e);return t===0?0:t}}function ae(n,e){return _(n)-+_(e)}function le(n,e){let t=_(n,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}function ne(n,e){let t=_(n,e==null?void 0:e.in),d=t.getMonth();return t.setFullYear(t.getFullYear(),d+1,0),t.setHours(23,59,59,999),t}function re(n,e){let t=_(n,e==null?void 0:e.in);return+le(t,e)==+ne(t,e)}function ie(n,e,t){let[d,l,h]=Y(t==null?void 0:t.in,n,n,e),o=X(l,h),b=Math.abs(te(l,h));if(b<1)return 0;l.getMonth()===1&&l.getDate()>27&&l.setDate(30),l.setMonth(l.getMonth()-o*b);let m=X(l,h)===-o;re(d)&&b===1&&X(d,h)===1&&(m=!1);let x=o*(b-+m);return x===0?0:x}function ce(n,e,t){let d=ae(n,e)/1e3;return se(t==null?void 0:t.roundingMethod)(d)}function oe(n,e,t){let d=Q(),l=(t==null?void 0:t.locale)??d.locale??U,h=X(n,e);if(isNaN(h))throw RangeError("Invalid time value");let o=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:h}),[b,m]=Y(t==null?void 0:t.in,...h>0?[e,n]:[n,e]),x=ce(m,b),M=(C(m)-C(b))/1e3,p=Math.round((x-M)/60),T;if(p<2)return t!=null&&t.includeSeconds?x<5?l.formatDistance("lessThanXSeconds",5,o):x<10?l.formatDistance("lessThanXSeconds",10,o):x<20?l.formatDistance("lessThanXSeconds",20,o):x<40?l.formatDistance("halfAMinute",0,o):x<60?l.formatDistance("lessThanXMinutes",1,o):l.formatDistance("xMinutes",1,o):p===0?l.formatDistance("lessThanXMinutes",1,o):l.formatDistance("xMinutes",p,o);if(p<45)return l.formatDistance("xMinutes",p,o);if(p<90)return l.formatDistance("aboutXHours",1,o);if(p<1440){let g=Math.round(p/60);return l.formatDistance("aboutXHours",g,o)}else{if(p<2520)return l.formatDistance("xDays",1,o);if(p<43200){let g=Math.round(p/Z);return l.formatDistance("xDays",g,o)}else if(p<43200*2)return T=Math.round(p/A),l.formatDistance("aboutXMonths",T,o)}if(T=ie(m,b),T<12){let g=Math.round(p/A);return l.formatDistance("xMonths",g,o)}else{let g=T%12,u=Math.trunc(T/12);return g<3?l.formatDistance("aboutXYears",u,o):g<9?l.formatDistance("overXYears",u,o):l.formatDistance("almostXYears",u+1,o)}}function ue(n,e){return oe(n,ee(n),e)}var I=$(z(),1);function de(n){let e=(0,I.useRef)(n),[t,d]=(0,I.useState)(n);return(0,I.useEffect)(()=>{let l=setInterval(()=>{d(F.now().toMilliseconds())},17);return()=>clearInterval(l)},[]),t-e.current}var P=O(),s=$(L(),1);const me=n=>{let e=(0,P.c)(79),{editing:t,status:d,disabled:l,staleInputs:h,edited:o,interrupted:b,elapsedTime:m,runStartTimestamp:x,lastRunStartTimestamp:M,uninstantiated:p}=n;if(!t)return null;let T=x??M,g;e[0]===T?g=e[1]:(g=T?(0,s.jsx)(he,{lastRanTime:T}):null,e[0]=T,e[1]=g);let u=g;if(l&&d==="running")return B.error("CellStatusComponent: disabled and running"),null;if(l&&h){let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is stale, but it's disabled and can't be run"}),e[2]=c):c=e[2];let a;e[3]===u?a=e[4]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[3]=u,e[4]=a);let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-stale","data-testid":"cell-status","data-status":"stale",children:(0,s.jsxs)(H,{children:[(0,s.jsx)(k,{className:"h-5 w-5",strokeWidth:1.5}),(0,s.jsx)(R,{className:"h-3 w-3",strokeWidth:2.5})]})}),e[5]=i):i=e[5];let r;return e[6]===a?r=e[7]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[6]=a,e[7]=r),r}if(l){let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is disabled"}),e[8]=c):c=e[8];let a;e[9]===u?a=e[10]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[9]=u,e[10]=a);let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-disabled","data-testid":"cell-status","data-status":"disabled",children:(0,s.jsx)(k,{className:"h-5 w-5",strokeWidth:1.5})}),e[11]=i):i=e[11];let r;return e[12]===a?r=e[13]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[12]=a,e[13]=r),r}if(!h&&d==="disabled-transitively"){let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"An ancestor of this cell is disabled, so it can't be run"}),e[14]=c):c=e[14];let a;e[15]===u?a=e[16]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[15]=u,e[16]=a);let i;e[17]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-stale","data-testid":"cell-status","data-status":"disabled-transitively",children:(0,s.jsxs)(H,{layerTop:!0,children:[(0,s.jsx)(K,{className:"h-5 w-5",strokeWidth:1.5}),(0,s.jsx)(k,{className:"h-3 w-3",strokeWidth:2.5})]})}),e[17]=i):i=e[17];let r;return e[18]===a?r=e[19]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[18]=a,e[19]=r),r}if(h&&d==="disabled-transitively"){let c;e[20]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is stale, but an ancestor is disabled so it can't be run"}),e[20]=c):c=e[20];let a;e[21]===u?a=e[22]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[21]=u,e[22]=a);let i;e[23]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-stale","data-testid":"cell-status","data-status":"stale",children:(0,s.jsxs)(H,{children:[(0,s.jsx)(R,{className:"h-5 w-5",strokeWidth:1}),(0,s.jsx)(k,{className:"h-3 w-3",strokeWidth:2.5})]})}),e[23]=i):i=e[23];let r;return e[24]===a?r=e[25]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[24]=a,e[25]=r),r}if(d==="running"){let c;e[26]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is running"}),e[26]=c):c=e[26];let a;e[27]===u?a=e[28]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[27]=u,e[28]=a);let i;e[29]===x?i=e[30]:(i=F.fromSeconds(x)||F.now(),e[29]=x,e[30]=i);let r;e[31]===i?r=e[32]:(r=(0,s.jsx)("div",{className:"cell-status-icon elapsed-time running","data-testid":"cell-status","data-status":"running",children:(0,s.jsx)(fe,{startTime:i})}),e[31]=i,e[32]=r);let f;return e[33]!==a||e[34]!==r?(f=(0,s.jsx)(D,{content:a,usePortal:!0,children:r}),e[33]=a,e[34]=r,e[35]=f):f=e[35],f}if(d==="queued"){let c;e[36]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is queued to run"}),e[36]=c):c=e[36];let a;e[37]===u?a=e[38]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[37]=u,e[38]=a);let i;e[39]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-queued","data-testid":"cell-status","data-status":"queued",children:(0,s.jsx)(J,{className:"h-5 w-5",strokeWidth:1.5})}),e[39]=i):i=e[39];let r;return e[40]===a?r=e[41]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[40]=a,e[41]=r),r}if(o||b||h||p){let c;e[42]===m?c=e[43]:(c=W(m),e[42]=m,e[43]=c);let a=c,i;e[44]!==m||e[45]!==a?(i=m?(0,s.jsx)(q,{elapsedTime:a}):null,e[44]=m,e[45]=a,e[46]=i):i=e[46];let r=i,f,v="";if(p)f="This cell has not yet been run";else if(b){f="This cell was interrupted when it was last run";let j;e[47]===r?j=e[48]:(j=(0,s.jsxs)("span",{children:["This cell ran for ",r," before being interrupted"]}),e[47]=r,e[48]=j),v=j}else if(o){f="This cell has been modified since it was last run";let j;e[49]===r?j=e[50]:(j=(0,s.jsxs)("span",{children:["This cell took ",r," to run"]}),e[49]=r,e[50]=j),v=j}else{f="This cell has not been run with the latest inputs";let j;e[51]===r?j=e[52]:(j=(0,s.jsxs)("span",{children:["This cell took ",r," to run"]}),e[51]=r,e[52]=j),v=j}let N;e[53]===Symbol.for("react.memo_cache_sentinel")?(N=(0,s.jsx)("div",{className:"cell-status-stale","data-testid":"cell-status","data-status":"outdated",children:(0,s.jsx)(R,{className:"h-5 w-5",strokeWidth:1.5})}),e[53]=N):N=e[53];let S;e[54]===f?S=e[55]:(S=(0,s.jsx)(D,{content:f,usePortal:!0,children:N}),e[54]=f,e[55]=S);let y;e[56]!==m||e[57]!==a||e[58]!==u||e[59]!==v?(y=m&&(0,s.jsx)(D,{content:(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[v,u]}),usePortal:!0,children:(0,s.jsx)("div",{className:"elapsed-time hover-action","data-testid":"cell-status","data-status":"outdated",children:(0,s.jsx)("span",{children:a})})}),e[56]=m,e[57]=a,e[58]=u,e[59]=v,e[60]=y):y=e[60];let w;return e[61]!==S||e[62]!==y?(w=(0,s.jsxs)("div",{className:"cell-status-icon flex items-center gap-2",children:[S,y]}),e[61]=S,e[62]=y,e[63]=w):w=e[63],w}if(m!==null){let c;e[64]===m?c=e[65]:(c=W(m),e[64]=m,e[65]=c);let a=c,i;e[66]!==m||e[67]!==a?(i=m?(0,s.jsx)(q,{elapsedTime:a}):null,e[66]=m,e[67]=a,e[68]=i):i=e[68];let r=i,f;e[69]===r?f=e[70]:(f=(0,s.jsxs)("span",{children:["This cell took ",r," to run"]}),e[69]=r,e[70]=f);let v;e[71]!==u||e[72]!==f?(v=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[f,u]}),e[71]=u,e[72]=f,e[73]=v):v=e[73];let N;e[74]===a?N=e[75]:(N=(0,s.jsx)("div",{className:"cell-status-icon elapsed-time hover-action","data-testid":"cell-status","data-status":"idle",children:(0,s.jsx)("span",{children:a})}),e[74]=a,e[75]=N);let S;return e[76]!==v||e[77]!==N?(S=(0,s.jsx)(D,{content:v,usePortal:!0,children:N}),e[76]=v,e[77]=N,e[78]=S):S=e[78],S}return null},q=n=>{let e=(0,P.c)(2),t;return e[0]===n.elapsedTime?t=e[1]:(t=(0,s.jsx)("span",{className:"tracking-wide font-semibold",children:n.elapsedTime}),e[0]=n.elapsedTime,e[1]=t),t};var he=n=>{let e=(0,P.c)(4),t=new Date(n.lastRanTime*1e3),d=new Date,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,hour12:!0},e[0]=l):l=e[0];let h=E(l),o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,hour12:!0},e[1]=o):o=e[1];let b=E(o),m=t.toDateString()===d.toDateString()?h:b,x=ue(t),M;return e[2]===x?M=e[3]:(M=(0,s.jsxs)("span",{className:"text-muted-foreground",children:["(",x," ago)"]}),e[2]=x,e[3]=M),(0,s.jsxs)("span",{children:["Ran at"," ",(0,s.jsx)("strong",{className:"tracking-wide font-semibold",children:m.format(t)})," ",M]})};function W(n){if(n===null)return"";let e=n,t=e/1e3;return t>=60?`${Math.floor(t/60)}m${Math.floor(t%60)}s`:t>=1?`${t.toFixed(2).toString()}s`:`${e.toFixed(0).toString()}ms`}var fe=n=>{let e=(0,P.c)(6),t;e[0]===n.startTime?t=e[1]:(t=n.startTime.toMilliseconds(),e[0]=n.startTime,e[1]=t);let d=de(t),l;e[2]===d?l=e[3]:(l=W(d),e[2]=d,e[3]=l);let h;return e[4]===l?h=e[5]:(h=(0,s.jsx)("span",{children:l}),e[4]=l,e[5]=h),h};export{q as n,W as r,me as t};
import{et as r,tt as e}from"./chunk-ABZYJK2D-0jga8uiE.js";var o=(t,a)=>e.lang.round(r.parse(t)[a]);export{o as t};
import{t}from"./createLucideIcon-BCdY6lG5.js";var a=t("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]]);export{a as t};
import{s as H}from"./chunk-LvLJmgfZ.js";import{t as U}from"./react-Bj1aDYRI.js";import{Vn as $,qn as G}from"./cells-DPp5cDaO.js";import{C as z,P as K,R as E,T as Q}from"./zod-H_cgTO0M.js";import{t as J}from"./compiler-runtime-B3qBwwSJ.js";import{n as X}from"./assertNever-CBU83Y6o.js";import{t as L}from"./isEmpty-CgX_-6Mt.js";import{ut as Y}from"./ai-model-dropdown-Dk2SdB3C.js";import{d as V}from"./hotkeys-BHHWjLlp.js";import{t as Z}from"./jsx-runtime-ZmTK25f3.js";import{t as W}from"./cn-BKtXLv3a.js";import{u as ee}from"./add-cell-with-ai-e_HMl7UU.js";import{t as te}from"./bot-message-square-B2ThzDUZ.js";import{t as A}from"./markdown-renderer-DJy8ww5d.js";import{n as se}from"./spinner-DA8-7wQv.js";import{c as ae}from"./datasource-CtyqtITR.js";import{a as C,i as D,n as I,r as M}from"./multi-map-DxdLNTBd.js";var re=J();U();var t=H(Z(),1);const le=n=>{let e=(0,re.c)(13),{reasoning:a,index:l,isStreaming:s}=n,r=l===void 0?0:l,m=s===void 0?!1:s,o=m?"reasoning":void 0,x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(te,{className:"h-3 w-3"}),e[0]=x):x=e[0];let p=m?"Thinking":"View reasoning",c;e[1]!==a.length||e[2]!==p?(c=(0,t.jsx)(C,{className:"text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[x,p," (",a.length," ","chars)"]})}),e[1]=a.length,e[2]=p,e[3]=c):c=e[3];let i;e[4]===a?i=e[5]:(i=(0,t.jsx)(M,{className:"pb-2 px-2",children:(0,t.jsx)("div",{className:"bg-muted/30 border border-muted/50 rounded-md p-3 italic text-muted-foreground/90 relative",children:(0,t.jsx)("div",{className:"pr-6",children:(0,t.jsx)(A,{content:a})})})}),e[4]=a,e[5]=i);let d;e[6]!==c||e[7]!==i?(d=(0,t.jsxs)(D,{value:"reasoning",className:"border-0",children:[c,i]}),e[6]=c,e[7]=i,e[8]=d):d=e[8];let u;return e[9]!==r||e[10]!==o||e[11]!==d?(u=(0,t.jsx)(I,{type:"single",collapsible:!0,className:"w-full mb-2",value:o,children:d},r),e[9]=r,e[10]=o,e[11]=d,e[12]=u):u=e[12],u};var F=J(),ne=K({status:E().default("success"),auth_required:Q().default(!1),action_url:z(),next_steps:z(),meta:z(),message:E().nullish()}).passthrough(),oe=n=>{let e=(0,F.c)(12),{data:a}=n,l;if(e[0]!==a){let{status:s,auth_required:r,action_url:m,meta:o,next_steps:x,message:p,...c}=a,i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("h3",{className:"text-xs font-semibold text-muted-foreground",children:"Tool Result"}),e[2]=i):i=e[2];let d;e[3]===s?d=e[4]:(d=(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 bg-[var(--grass-2)] text-[var(--grass-11)] rounded-full font-medium capitalize",children:s}),e[3]=s,e[4]=d);let u;e[5]===r?u=e[6]:(u=r&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 bg-[var(--amber-2)] text-[var(--amber-11)] rounded-full",children:"Auth Required"}),e[5]=r,e[6]=u);let f;e[7]!==d||e[8]!==u?(f=(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[i,(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[d,u]})]}),e[7]=d,e[8]=u,e[9]=f):f=e[9];let h;e[10]===p?h=e[11]:(h=p&&(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)($,{className:"h-3 w-3 text-[var(--blue-11)] mt-0.5 flex-shrink-0"}),(0,t.jsx)("div",{className:"text-xs text-foreground",children:p})]}),e[10]=p,e[11]=h),l=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[f,h,c&&(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(c).map(me)})]}),e[0]=a,e[1]=l}else l=e[1];return l},ie=n=>{let e=(0,F.c)(8),{result:a}=n,l;e[0]===a?l=e[1]:(l=ne.safeParse(a),e[0]=a,e[1]=l);let s=l;if(s.success){let o;return e[2]===s.data?o=e[3]:(o=(0,t.jsx)(oe,{data:s.data}),e[2]=s.data,e[3]=o),o}let r;e[4]===a?r=e[5]:(r=typeof a=="string"?a:JSON.stringify(a,null,2),e[4]=a,e[5]=r);let m;return e[6]===r?m=e[7]:(m=(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground mb-1 max-h-64 overflow-y-auto scrollbar-thin",children:r}),e[6]=r,e[7]=m),m},de=n=>{let e=(0,F.c)(9),{input:a}=n;if(!(a&&a!==null))return null;let l;e[0]===a?l=e[1]:(l=L(a),e[0]=a,e[1]=l);let s=l,r=typeof a=="object"&&Object.keys(a).length>0,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("h3",{className:"text-xs font-semibold text-muted-foreground",children:"Tool Request"}),e[2]=m):m=e[2];let o;e[3]!==a||e[4]!==s||e[5]!==r?(o=s?"{}":r?JSON.stringify(a,null,2):String(a),e[3]=a,e[4]=s,e[5]=r,e[6]=o):o=e[6];let x;return e[7]===o?x=e[8]:(x=(0,t.jsxs)("div",{className:"space-y-2",children:[m,(0,t.jsx)("pre",{className:"bg-[var(--slate-2)] p-2 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64",children:o})]}),e[7]=o,e[8]=x),x};const B=n=>{let e=(0,F.c)(38),{toolName:a,result:l,error:s,index:r,state:m,className:o,input:x}=n,p=r===void 0?0:r,c=m==="output-available"&&(l||s),i=s?"error":c?"success":"loading",d;e[0]===i?d=e[1]:(d=()=>{switch(i){case"loading":return(0,t.jsx)(se,{className:"h-3 w-3 animate-spin"});case"error":return(0,t.jsx)(G,{className:"h-3 w-3 text-[var(--red-11)]"});case"success":return(0,t.jsx)(Y,{className:"h-3 w-3 text-[var(--grass-11)]"});default:return(0,t.jsx)(ae,{className:"h-3 w-3"})}},e[0]=i,e[1]=d);let u=d,f;e[2]!==s||e[3]!==c||e[4]!==i?(f=()=>i==="loading"?"Running":s?"Failed":c?"Done":"Tool call",e[2]=s,e[3]=c,e[4]=i,e[5]=f):f=e[5];let h=f,T=`tool-${p}`,g;e[6]===o?g=e[7]:(g=W("w-full",o),e[6]=o,e[7]=g);let k=i==="error"&&"text-[var(--red-11)]/80",q=i==="success"&&"text-[var(--grass-11)]/80",v;e[8]!==k||e[9]!==q?(v=W("h-6 text-xs border-border shadow-none! ring-0! bg-muted/60 hover:bg-muted py-0 px-2 gap-1 rounded-sm [&[data-state=open]>svg]:rotate-180 hover:no-underline",k,q),e[8]=k,e[9]=q,e[10]=v):v=e[10];let j;e[11]===u?j=e[12]:(j=u(),e[11]=u,e[12]=j);let P=h(),b;e[13]===a?b=e[14]:(b=ce(a),e[13]=a,e[14]=b);let N;e[15]===b?N=e[16]:(N=(0,t.jsx)("code",{className:"font-mono text-xs",children:b}),e[15]=b,e[16]=N);let y;e[17]!==P||e[18]!==N||e[19]!==j?(y=(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[j,P,":",N]}),e[17]=P,e[18]=N,e[19]=j,e[20]=y):y=e[20];let w;e[21]!==y||e[22]!==v?(w=(0,t.jsx)(C,{className:v,children:y}),e[21]=y,e[22]=v,e[23]=w):w=e[23];let _;e[24]!==s||e[25]!==c||e[26]!==x||e[27]!==l?(_=c&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(de,{input:x}),l!=null&&(0,t.jsx)(ie,{result:l}),s&&(0,t.jsxs)("div",{className:"bg-[var(--red-2)] border border-[var(--red-6)] rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"text-xs font-semibold text-[var(--red-11)] mb-2 flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-[var(--red-9)] rounded-full"}),"Error"]}),(0,t.jsx)("div",{className:"text-sm text-[var(--red-11)] leading-relaxed",children:s})]})]}),e[24]=s,e[25]=c,e[26]=x,e[27]=l,e[28]=_):_=e[28];let S;e[29]===_?S=e[30]:(S=(0,t.jsx)(M,{className:"py-2 px-2",children:_}),e[29]=_,e[30]=S);let O;e[31]!==w||e[32]!==S?(O=(0,t.jsxs)(D,{value:"tool-call",className:"border-0",children:[w,S]}),e[31]=w,e[32]=S,e[33]=O):O=e[33];let R;return e[34]!==O||e[35]!==T||e[36]!==g?(R=(0,t.jsx)(I,{type:"single",collapsible:!0,className:g,children:O},T),e[34]=O,e[35]=T,e[36]=g,e[37]=R):R=e[37],R};function ce(n){return n.replace("tool-","")}function me(n){let[e,a]=n;return L(a)?null:(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"text-xs font-medium text-muted-foreground capitalize flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-[var(--blue-9)] rounded-full"}),e]}),(0,t.jsx)("pre",{className:"bg-[var(--slate-2)] p-2 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64",children:JSON.stringify(a,null,2)})]},e)}const ue=({message:n,isStreamingReasoning:e,isLast:a})=>{return(0,t.jsx)(t.Fragment,{children:n.parts.map((s,r)=>l(s,r))});function l(s,r){if(xe(s))return(0,t.jsx)(B,{index:r,toolName:s.type,result:s.output,className:"my-2",state:s.state,input:s.input},r);if(pe(s))return V.debug("Found data part",s),null;switch(s.type){case"text":return(0,t.jsx)(A,{content:s.text},r);case"reasoning":return(0,t.jsx)(le,{reasoning:s.text,index:r,isStreaming:e&&a&&r===(n.parts.length||0)-1},r);case"file":return(0,t.jsx)(ee,{attachment:s},r);case"dynamic-tool":return(0,t.jsx)(B,{toolName:s.toolName,result:s.output,state:s.state,input:s.input},r);case"source-document":case"source-url":case"step-start":return V.debug("Found non-renderable part",s),null;default:return X(s),null}}};function xe(n){return n.type.startsWith("tool-")}function pe(n){return n.type.startsWith("data-")}export{ue as t};
import{s as Je}from"./chunk-LvLJmgfZ.js";import{d as kt,f as Lt,l as It,n as ue,u as Ue}from"./useEvent-BhXAndur.js";import{t as Pt}from"./react-Bj1aDYRI.js";import{Kn as Dt,w as zt}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as Qe}from"./compiler-runtime-B3qBwwSJ.js";import{T as Mt,o as Ft,r as Ze,t as Ht,w as Wt}from"./ai-model-dropdown-Dk2SdB3C.js";import{d as Ae}from"./hotkeys-BHHWjLlp.js";import{n as et,r as Ot}from"./utils-YqBXNpsM.js";import{o as Ut}from"./config-Q0O7_stz.js";import{r as le}from"./useEventListener-Cb-RVVEn.js";import{t as Yt}from"./jsx-runtime-ZmTK25f3.js";import{t as oe}from"./button-CZ3Cs4qb.js";import{t as ae}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{r as Xt}from"./requests-B4FYHTZl.js";import{t as tt}from"./createLucideIcon-BCdY6lG5.js";import{C as Vt,N as Bt,O as qt,T as $t,_ as Kt,b as Gt,c as Jt,d as Qt,f as Zt,g as er,h as rt,j as tr,l as rr,m as lr,n as lt,p as or,s as ot,u as ar,v as nr,y as sr}from"./add-cell-with-ai-e_HMl7UU.js";import{t as at}from"./bot-message-square-B2ThzDUZ.js";import{d as ir}from"./markdown-renderer-DJy8ww5d.js";import{n as cr}from"./spinner-DA8-7wQv.js";import{t as dr}from"./plus-B7DF33lD.js";import{lt as ur,r as pr}from"./input-DUrq2DiR.js";import{t as mr}from"./settings-OBbrbhij.js";import{r as nt,t as hr}from"./state-D4T75eZb.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import{C as fr,E as xr,_ as pe,g as X,w as V,x as _e}from"./Combination-BAEdC-rz.js";import{a as vr,i as gr,n as wr,p as br,r as yr,s as jr,t as Sr}from"./select-BVdzZKAh.js";import{i as st,t as Ye}from"./tooltip-CMQz28hC.js";import{u as Cr}from"./menu-items-BMjcEb2j.js";import{i as Nr}from"./dates-CrvjILe3.js";import{t as Rr}from"./context-BfYAMNLF.js";import{i as Tr,r as Ar,t as _r}from"./popover-CH1FzjxU.js";import{t as Er}from"./copy-icon-v8ME_JKB.js";import{n as kr}from"./error-banner-B9ts0mNl.js";import"./chunk-5FQGJX7Z-DPlx2kjA.js";import"./katex-CDLTCvjQ.js";import"./html-to-image-CIQqSu-S.js";import{t as Lr}from"./chat-display--jAB7huF.js";import"./esm-Bmu2DhPy.js";import{t as Xe}from"./empty-state-B8Cxr9nj.js";var Ir=tt("hat-glasses",[["path",{d:"M14 18a2 2 0 0 0-4 0",key:"1v8fkw"}],["path",{d:"m19 11-2.11-6.657a2 2 0 0 0-2.752-1.148l-1.276.61A2 2 0 0 1 12 4H8.5a2 2 0 0 0-1.925 1.456L5 11",key:"1fkr7p"}],["path",{d:"M2 11h20",key:"3eubbj"}],["circle",{cx:"17",cy:"18",r:"3",key:"82mm0e"}],["circle",{cx:"7",cy:"18",r:"3",key:"lvkj7j"}]]),Pr=tt("notebook-text",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M9.5 8h5",key:"11mslq"}],["path",{d:"M9.5 12H16",key:"ktog6x"}],["path",{d:"M9.5 16H14",key:"p1seyn"}]]),it=Qe(),p=Je(Pt(),1);const Dr=({chatState:e,chatId:t,messages:r})=>{if(!t)return Ae.warn("No active chat"),e;let n=e.chats.get(t);if(!n)return Ae.warn("No active chat"),e;let l=new Map(e.chats),a=Date.now();return l.set(n.id,{...n,messages:r,updatedAt:a}),{...e,chats:l}};var o=Je(Yt(),1);function zr(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var Ve="ScrollArea",[ct,po]=xr(Ve),[Mr,M]=ct(Ve),dt=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:l,scrollHideDelay:a=600,...s}=e,[i,c]=p.useState(null),[u,d]=p.useState(null),[m,h]=p.useState(null),[f,v]=p.useState(null),[S,_]=p.useState(null),[w,N]=p.useState(0),[R,y]=p.useState(0),[j,C]=p.useState(!1),[E,I]=p.useState(!1),g=le(t,k=>c(k)),A=Cr(l);return(0,o.jsx)(Mr,{scope:r,type:n,dir:A,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:d,content:m,onContentChange:h,scrollbarX:f,onScrollbarXChange:v,scrollbarXEnabled:j,onScrollbarXEnabledChange:C,scrollbarY:S,onScrollbarYChange:_,scrollbarYEnabled:E,onScrollbarYEnabledChange:I,onCornerWidthChange:N,onCornerHeightChange:y,children:(0,o.jsx)(pe.div,{dir:A,...s,ref:g,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});dt.displayName=Ve;var ut="ScrollAreaViewport",pt=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:l,...a}=e,s=M(ut,r),i=le(t,p.useRef(null),s.onViewportChange);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),(0,o.jsx)(pe.div,{"data-radix-scroll-area-viewport":"",...a,ref:i,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,o.jsx)("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});pt.displayName=ut;var O="ScrollAreaScrollbar",Be=p.forwardRef((e,t)=>{let{forceMount:r,...n}=e,l=M(O,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=l,i=e.orientation==="horizontal";return p.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),l.type==="hover"?(0,o.jsx)(Fr,{...n,ref:t,forceMount:r}):l.type==="scroll"?(0,o.jsx)(Hr,{...n,ref:t,forceMount:r}):l.type==="auto"?(0,o.jsx)(mt,{...n,ref:t,forceMount:r}):l.type==="always"?(0,o.jsx)(qe,{...n,ref:t}):null});Be.displayName=O;var Fr=p.forwardRef((e,t)=>{let{forceMount:r,...n}=e,l=M(O,e.__scopeScrollArea),[a,s]=p.useState(!1);return p.useEffect(()=>{let i=l.scrollArea,c=0;if(i){let u=()=>{window.clearTimeout(c),s(!0)},d=()=>{c=window.setTimeout(()=>s(!1),l.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",d)}}},[l.scrollArea,l.scrollHideDelay]),(0,o.jsx)(_e,{present:r||a,children:(0,o.jsx)(mt,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Hr=p.forwardRef((e,t)=>{let{forceMount:r,...n}=e,l=M(O,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Ie(()=>c("SCROLL_END"),100),[i,c]=zr("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(i==="idle"){let u=window.setTimeout(()=>c("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,l.scrollHideDelay,c]),p.useEffect(()=>{let u=l.viewport,d=a?"scrollLeft":"scrollTop";if(u){let m=u[d],h=()=>{let f=u[d];m!==f&&(c("SCROLL"),s()),m=f};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[l.viewport,a,c,s]),(0,o.jsx)(_e,{present:r||i!=="hidden",children:(0,o.jsx)(qe,{"data-state":i==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:V(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:V(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),mt=p.forwardRef((e,t)=>{let r=M(O,e.__scopeScrollArea),{forceMount:n,...l}=e,[a,s]=p.useState(!1),i=e.orientation==="horizontal",c=Ie(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;s(i?u:d)}},10);return ne(r.viewport,c),ne(r.content,c),(0,o.jsx)(_e,{present:n||a,children:(0,o.jsx)(qe,{"data-state":a?"visible":"hidden",...l,ref:t})})}),qe=p.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,l=M(O,e.__scopeScrollArea),a=p.useRef(null),s=p.useRef(0),[i,c]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=gt(i.viewport,i.content),d={...n,sizes:i,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function m(h,f){return Vr(h,s.current,i,f)}return r==="horizontal"?(0,o.jsx)(Wr,{...d,ref:t,onThumbPositionChange:()=>{if(l.viewport&&a.current){let h=l.viewport.scrollLeft,f=wt(h,i,l.dir);a.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:h=>{l.viewport&&(l.viewport.scrollLeft=h)},onDragScroll:h=>{l.viewport&&(l.viewport.scrollLeft=m(h,l.dir))}}):r==="vertical"?(0,o.jsx)(Or,{...d,ref:t,onThumbPositionChange:()=>{if(l.viewport&&a.current){let h=l.viewport.scrollTop,f=wt(h,i);a.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:h=>{l.viewport&&(l.viewport.scrollTop=h)},onDragScroll:h=>{l.viewport&&(l.viewport.scrollTop=m(h))}}):null}),Wr=p.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...l}=e,a=M(O,e.__scopeScrollArea),[s,i]=p.useState(),c=p.useRef(null),u=le(t,c,a.onScrollbarXChange);return p.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),(0,o.jsx)(ft,{"data-orientation":"horizontal",...l,ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Le(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,m)=>{if(a.viewport){let h=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),yt(h,m)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:ke(s.paddingLeft),paddingEnd:ke(s.paddingRight)}})}})}),Or=p.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...l}=e,a=M(O,e.__scopeScrollArea),[s,i]=p.useState(),c=p.useRef(null),u=le(t,c,a.onScrollbarYChange);return p.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),(0,o.jsx)(ft,{"data-orientation":"vertical",...l,ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Le(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,m)=>{if(a.viewport){let h=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),yt(h,m)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:ke(s.paddingTop),paddingEnd:ke(s.paddingBottom)}})}})}),[Ur,ht]=ct(O),ft=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:l,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:m,...h}=e,f=M(O,r),[v,S]=p.useState(null),_=le(t,g=>S(g)),w=p.useRef(null),N=p.useRef(""),R=f.viewport,y=n.content-n.viewport,j=X(d),C=X(c),E=Ie(m,10);function I(g){w.current&&u({x:g.clientX-w.current.left,y:g.clientY-w.current.top})}return p.useEffect(()=>{let g=A=>{let k=A.target;v!=null&&v.contains(k)&&j(A,y)};return document.addEventListener("wheel",g,{passive:!1}),()=>document.removeEventListener("wheel",g,{passive:!1})},[R,v,y,j]),p.useEffect(C,[n,C]),ne(v,E),ne(f.content,E),(0,o.jsx)(Ur,{scope:r,scrollbar:v,hasThumb:l,onThumbChange:X(a),onThumbPointerUp:X(s),onThumbPositionChange:C,onThumbPointerDown:X(i),children:(0,o.jsx)(pe.div,{...h,ref:_,style:{position:"absolute",...h.style},onPointerDown:V(e.onPointerDown,g=>{g.button===0&&(g.target.setPointerCapture(g.pointerId),w.current=v.getBoundingClientRect(),N.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),I(g))}),onPointerMove:V(e.onPointerMove,I),onPointerUp:V(e.onPointerUp,g=>{let A=g.target;A.hasPointerCapture(g.pointerId)&&A.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=N.current,f.viewport&&(f.viewport.style.scrollBehavior=""),w.current=null})})})}),Ee="ScrollAreaThumb",xt=p.forwardRef((e,t)=>{let{forceMount:r,...n}=e,l=ht(Ee,e.__scopeScrollArea);return(0,o.jsx)(_e,{present:r||l.hasThumb,children:(0,o.jsx)(Yr,{ref:t,...n})})}),Yr=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...l}=e,a=M(Ee,r),s=ht(Ee,r),{onThumbPositionChange:i}=s,c=le(t,m=>s.onThumbChange(m)),u=p.useRef(void 0),d=Ie(()=>{u.current&&(u.current=(u.current(),void 0))},100);return p.useEffect(()=>{let m=a.viewport;if(m){let h=()=>{d(),u.current||(u.current=Br(m,i),i())};return i(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[a.viewport,d,i]),(0,o.jsx)(pe.div,{"data-state":s.hasThumb?"visible":"hidden",...l,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:V(e.onPointerDownCapture,m=>{let h=m.target.getBoundingClientRect(),f=m.clientX-h.left,v=m.clientY-h.top;s.onThumbPointerDown({x:f,y:v})}),onPointerUp:V(e.onPointerUp,s.onThumbPointerUp)})});xt.displayName=Ee;var $e="ScrollAreaCorner",vt=p.forwardRef((e,t)=>{let r=M($e,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,o.jsx)(Xr,{...e,ref:t}):null});vt.displayName=$e;var Xr=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,l=M($e,r),[a,s]=p.useState(0),[i,c]=p.useState(0),u=!!(a&&i);return ne(l.scrollbarX,()=>{var m;let d=((m=l.scrollbarX)==null?void 0:m.offsetHeight)||0;l.onCornerHeightChange(d),c(d)}),ne(l.scrollbarY,()=>{var m;let d=((m=l.scrollbarY)==null?void 0:m.offsetWidth)||0;l.onCornerWidthChange(d),s(d)}),u?(0,o.jsx)(pe.div,{...n,ref:t,style:{width:a,height:i,position:"absolute",right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ke(e){return e?parseInt(e,10):0}function gt(e,t){let r=e/t;return isNaN(r)?0:r}function Le(e){let t=gt(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Vr(e,t,r,n="ltr"){let l=Le(r),a=l/2,s=t||a,i=l-s,c=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-i,d=r.content-r.viewport,m=n==="ltr"?[0,d]:[d*-1,0];return bt([c,u],m)(e)}function wt(e,t,r="ltr"){let n=Le(t),l=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-l,s=t.content-t.viewport,i=a-n,c=br(e,r==="ltr"?[0,s]:[s*-1,0]);return bt([0,s],[0,i])(c)}function bt(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function yt(e,t){return e>0&&e<t}var Br=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function l(){let a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,i=r.top!==a.top;(s||i)&&t(),r=a,n=window.requestAnimationFrame(l)})(),()=>window.cancelAnimationFrame(n)};function Ie(e,t){let r=X(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ne(e,t){let r=X(t);fr(()=>{let n=0;if(e){let l=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return l.observe(e),()=>{window.cancelAnimationFrame(n),l.unobserve(e)}}},[e,r])}var jt=dt,qr=pt,$r=vt,St=p.forwardRef((e,t)=>{let r=(0,it.c)(15),n,l,a;r[0]===e?(n=r[1],l=r[2],a=r[3]):({className:l,children:n,...a}=e,r[0]=e,r[1]=n,r[2]=l,r[3]=a);let s;r[4]===l?s=r[5]:(s=ae("relative overflow-hidden",l),r[4]=l,r[5]=s);let i;r[6]===n?i=r[7]:(i=(0,o.jsx)(qr,{className:"h-full w-full rounded-[inherit]",children:n}),r[6]=n,r[7]=i);let c,u;r[8]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsx)(Ct,{}),u=(0,o.jsx)($r,{}),r[8]=c,r[9]=u):(c=r[8],u=r[9]);let d;return r[10]!==a||r[11]!==t||r[12]!==s||r[13]!==i?(d=(0,o.jsxs)(jt,{ref:t,className:s,...a,children:[i,c,u]}),r[10]=a,r[11]=t,r[12]=s,r[13]=i,r[14]=d):d=r[14],d});St.displayName=jt.displayName;var Ct=p.forwardRef((e,t)=>{let r=(0,it.c)(14),n,l,a;r[0]===e?(n=r[1],l=r[2],a=r[3]):({className:n,orientation:a,...l}=e,r[0]=e,r[1]=n,r[2]=l,r[3]=a);let s=a===void 0?"vertical":a,i=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",c=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",u;r[4]!==n||r[5]!==i||r[6]!==c?(u=ae("flex touch-none select-none transition-colors",i,c,n),r[4]=n,r[5]=i,r[6]=c,r[7]=u):u=r[7];let d;r[8]===Symbol.for("react.memo_cache_sentinel")?(d=(0,o.jsx)(xt,{className:"relative flex-1 rounded-full bg-border"}),r[8]=d):d=r[8];let m;return r[9]!==s||r[10]!==l||r[11]!==t||r[12]!==u?(m=(0,o.jsx)(Be,{ref:t,orientation:s,className:u,...l,children:d}),r[9]=s,r[10]=l,r[11]=t,r[12]=u,r[13]=m):m=r[13],m});Ct.displayName=Be.displayName;var Kr=[{label:"Today",days:0},{label:"Yesterday",days:1},{label:"2d ago",days:2},{label:"3d ago",days:3},{label:"This week",days:7},{label:"This month",days:30}];const Gr=e=>{let t=Date.now(),r=Kr.map(a=>({...a,chats:[]})),n={label:"Older",days:1/0,chats:[]},l=a=>{switch(a){case 0:return r[0];case 1:return r[1];case 2:return r[2];case 3:return r[3];default:return a>=4&&a<=7?r[4]:a>=8&&a<=30?r[5]:n}};for(let a of e)l(Math.floor((t-a.updatedAt)/864e5)).chats.push(a);return[...r,n].filter(a=>a.chats.length>0)},Jr=({activeChatId:e,setActiveChat:t})=>{let r=Ue(nt),{locale:n}=Rr(),[l,a]=(0,p.useState)(""),s=(0,p.useMemo)(()=>[...r.chats.values()].sort((u,d)=>d.updatedAt-u.updatedAt),[r.chats]),i=(0,p.useMemo)(()=>l.trim()?s.filter(u=>u.title.toLowerCase().includes(l.toLowerCase())):s,[s,l]),c=(0,p.useMemo)(()=>Gr(i),[i]);return(0,o.jsxs)(_r,{children:[(0,o.jsx)(Ye,{content:"Previous chats",children:(0,o.jsx)(Tr,{asChild:!0,children:(0,o.jsx)(oe,{variant:"text",size:"icon",children:(0,o.jsx)(Dt,{className:"h-4 w-4"})})})}),(0,o.jsxs)(Ar,{className:"w-[480px] p-0",align:"start",side:"right",children:[(0,o.jsx)("div",{className:"pt-3 px-3 w-full",children:(0,o.jsx)(pr,{placeholder:"Search chat history...",value:l,onChange:u=>a(u.target.value),className:"text-xs"})}),(0,o.jsx)(St,{className:"h-[450px] p-2",children:(0,o.jsxs)("div",{className:"space-y-3",children:[s.length===0&&(0,o.jsx)(Xe,{title:"No chats yet",description:"Start a new chat to get started",icon:(0,o.jsx)(at,{})}),i.length===0&&l&&s.length>0&&(0,o.jsx)(Xe,{title:"No chats found",description:`No chats match "${l}"`,icon:(0,o.jsx)(ur,{})}),c.map((u,d)=>(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsx)("div",{className:"text-xs px-1 text-muted-foreground/60",children:u.label}),(0,o.jsx)("div",{children:u.chats.map(m=>(0,o.jsxs)("button",{className:ae("w-full p-1 rounded-md cursor-pointer text-left flex items-center justify-between",m.id===e&&"bg-accent",m.id!==e&&"hover:bg-muted/20"),onClick:()=>{t(m.id)},type:"button",children:[(0,o.jsx)("div",{className:"flex-1 min-w-0",children:(0,o.jsx)("div",{className:"text-sm truncate",children:m.title})}),(0,o.jsx)("div",{className:"text-xs text-muted-foreground/60 ml-2 flex-shrink-0",children:Nr(m.updatedAt,n)})]},m.id))}),d!==c.length-1&&(0,o.jsx)("hr",{})]},u.label))]})})]})]})};var se=Qe(),Nt="manual",Qr=e=>{let t=(0,se.c)(18),{onNewChat:r,activeChatId:n,setActiveChat:l}=e,{handleClick:a}=Ze(),s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)(dr,{className:"h-4 w-4"}),t[0]=s):s=t[0];let i;t[1]===r?i=t[2]:(i=(0,o.jsx)(Ye,{content:"New chat",children:(0,o.jsx)(oe,{variant:"text",size:"icon",onClick:r,children:s})}),t[1]=r,t[2]=i);let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsx)(Ft,{}),t[3]=c):c=t[3];let u;t[4]===a?u=t[5]:(u=()=>a("ai"),t[4]=a,t[5]=u);let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=(0,o.jsx)(mr,{className:"h-4 w-4"}),t[6]=d):d=t[6];let m;t[7]===u?m=t[8]:(m=(0,o.jsx)(Ye,{content:"AI Settings",children:(0,o.jsx)(oe,{variant:"text",size:"xs",className:"hover:bg-foreground/10 py-2",onClick:u,children:d})}),t[7]=u,t[8]=m);let h;t[9]!==n||t[10]!==l?(h=(0,o.jsx)(Jr,{activeChatId:n,setActiveChat:l}),t[9]=n,t[10]=l,t[11]=h):h=t[11];let f;t[12]!==m||t[13]!==h?(f=(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[c,m,h]}),t[12]=m,t[13]=h,t[14]=f):f=t[14];let v;return t[15]!==i||t[16]!==f?(v=(0,o.jsxs)("div",{className:"flex border-b px-2 py-1 justify-between shrink-0 items-center",children:[i,f]}),t[15]=i,t[16]=f,t[17]=v):v=t[17],v},Rt=(0,p.memo)(e=>{let t=(0,se.c)(15),{message:r,index:n,onEdit:l,isStreamingReasoning:a,isLast:s}=e,i;t[0]!==n||t[1]!==l?(i=S=>{var N,R,y;let _=(R=(N=S.parts)==null?void 0:N.filter(rl))==null?void 0:R.map(ll).join(`
`),w=(y=S.parts)==null?void 0:y.filter(ol);return(0,o.jsxs)("div",{className:"w-[95%] bg-background border p-1 rounded-sm",children:[w==null?void 0:w.map(al),(0,o.jsx)(lt,{value:_,placeholder:"Type your message...",onChange:nl,onSubmit:(j,C)=>{C.trim()&&l(n,C)},onClose:sl},S.id)]})},t[0]=n,t[1]=l,t[2]=i):i=t[2];let c=i,u;t[3]!==s||t[4]!==a?(u=S=>(0,o.jsxs)("div",{className:"w-[95%] wrap-break-word",children:[(0,o.jsx)("div",{className:"absolute right-1 top-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,o.jsx)(Er,{className:"h-3 w-3",value:S.parts.filter(il).map(cl).join(`
`)||""})}),Lr({message:S,isStreamingReasoning:a,isLast:s})]}),t[3]=s,t[4]=a,t[5]=u):u=t[5];let d=u,m=r.role==="user"?"justify-end":"justify-start",h;t[6]===m?h=t[7]:(h=ae("flex group relative",m),t[6]=m,t[7]=h);let f;t[8]!==r||t[9]!==d||t[10]!==c?(f=r.role==="user"?c(r):d(r),t[8]=r,t[9]=d,t[10]=c,t[11]=f):f=t[11];let v;return t[12]!==h||t[13]!==f?(v=(0,o.jsx)("div",{className:h,children:f}),t[12]=h,t[13]=f,t[14]=v):v=t[14],v});Rt.displayName="ChatMessage";var Tt=(0,p.memo)(e=>{var D,U;let t=(0,se.c)(39),{isEmpty:r,onSendClick:n,isLoading:l,onStop:a,fileInputRef:s,onAddFiles:i,onAddContext:c}=e,u=Ue(et),d=(u==null?void 0:u.mode)||Nt,m=((D=u==null?void 0:u.models)==null?void 0:D.chat_model)||"openai/gpt-4o",h=Wt.parse(m).providerId,{saveModeChange:f}=Mt(),v;t[0]===Symbol.for("react.memo_cache_sentinel")?(v=[{value:"manual",label:"Manual",subtitle:"Pure chat, no tool usage",Icon:ir},{value:"ask",label:"Ask",subtitle:"Use AI with access to read-only tools like documentation search",Icon:Pr},{value:"agent",label:"Agent (beta)",subtitle:"Use AI with access to read and write tools",Icon:Ir}],t[0]=v):v=t[0];let S=v,_=or.has(h),w=(U=S.find(me=>me.value===d))==null?void 0:U.Icon,N;t[1]===w?N=t[2]:(N=w&&(0,o.jsx)(w,{className:"h-3 w-3"}),t[1]=w,t[2]=N);let R;t[3]===d?R=t[4]:(R=(0,o.jsx)("span",{className:"capitalize",children:d}),t[3]=d,t[4]=R);let y;t[5]!==N||t[6]!==R?(y=(0,o.jsxs)(jr,{className:"h-6 text-xs border-border shadow-none! ring-0! bg-muted hover:bg-muted/30 py-0 px-2 gap-1.5",children:[N,R]}),t[5]=N,t[6]=R,t[7]=y):y=t[7];let j;t[8]===Symbol.for("react.memo_cache_sentinel")?(j=(0,o.jsx)(vr,{className:"text-xs uppercase tracking-wider text-muted-foreground/70 font-medium",children:"AI Mode"}),t[8]=j):j=t[8];let C;t[9]===S?C=t[10]:(C=(0,o.jsx)(wr,{children:(0,o.jsxs)(yr,{children:[j,S.map(dl)]})}),t[9]=S,t[10]=C);let E;t[11]!==d||t[12]!==f||t[13]!==y||t[14]!==C?(E=(0,o.jsxs)(Sr,{value:d,onValueChange:f,children:[y,C]}),t[11]=d,t[12]=f,t[13]=y,t[14]=C,t[15]=E):E=t[15];let I;t[16]===Symbol.for("react.memo_cache_sentinel")?(I=(0,o.jsx)(Ht,{placeholder:"Model",triggerClassName:"h-6 text-xs shadow-none! ring-0! bg-muted hover:bg-muted/30 rounded-sm",iconSize:"small",showAddCustomModelDocs:!0,forRole:"chat"}),t[16]=I):I=t[16];let g;t[17]===E?g=t[18]:(g=(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[E,I]}),t[17]=E,t[18]=g);let A;t[19]!==l||t[20]!==c?(A=(0,o.jsx)(Jt,{handleAddContext:c,isLoading:l}),t[19]=l,t[20]=c,t[21]=A):A=t[21];let k;t[22]!==s||t[23]!==_||t[24]!==l||t[25]!==i?(k=_&&(0,o.jsx)(rr,{fileInputRef:s,isLoading:l,onAddFiles:i}),t[22]=s,t[23]=_,t[24]=l,t[25]=i,t[26]=k):k=t[26];let F;t[27]!==r||t[28]!==l||t[29]!==n||t[30]!==a?(F=(0,o.jsx)(Zt,{isLoading:l,onStop:a,onSendClick:n,isEmpty:r}),t[27]=r,t[28]=l,t[29]=n,t[30]=a,t[31]=F):F=t[31];let H;t[32]!==A||t[33]!==k||t[34]!==F?(H=(0,o.jsxs)("div",{className:"flex flex-row",children:[A,k,F]}),t[32]=A,t[33]=k,t[34]=F,t[35]=H):H=t[35];let T;return t[36]!==H||t[37]!==g?(T=(0,o.jsx)(st,{children:(0,o.jsxs)("div",{className:"px-3 py-2 border-t border-border/20 flex flex-row flex-wrap items-center justify-between gap-1",children:[g,H]})}),t[36]=H,t[37]=g,t[38]=T):T=t[38],T});Tt.displayName="ChatInputFooter";var Ke=(0,p.memo)(e=>{let t=(0,se.c)(29),{placeholder:r,input:n,inputClassName:l,setInput:a,onSubmit:s,inputRef:i,isLoading:c,onStop:u,fileInputRef:d,onAddFiles:m,onClose:h}=e,f;t[0]!==n||t[1]!==s?(f=()=>{n.trim()&&s(void 0,n)},t[0]=n,t[1]=s,t[2]=f):f=t[2];let v=ue(f),S;t[3]===l?S=t[4]:(S=ae("px-2 py-3 flex-1",l),t[3]=l,t[4]=S);let _=r||"Type your message...",w;t[5]!==n||t[6]!==i||t[7]!==m||t[8]!==h||t[9]!==s||t[10]!==a||t[11]!==_?(w=(0,o.jsx)(lt,{inputRef:i,value:n,onChange:a,onSubmit:s,onClose:h,onAddFiles:m,placeholder:_}),t[5]=n,t[6]=i,t[7]=m,t[8]=h,t[9]=s,t[10]=a,t[11]=_,t[12]=w):w=t[12];let N;t[13]!==S||t[14]!==w?(N=(0,o.jsx)("div",{className:S,children:w}),t[13]=S,t[14]=w,t[15]=N):N=t[15];let R=!n.trim(),y;t[16]===i?y=t[17]:(y=()=>qt(i),t[16]=i,t[17]=y);let j;t[18]!==d||t[19]!==v||t[20]!==c||t[21]!==m||t[22]!==u||t[23]!==R||t[24]!==y?(j=(0,o.jsx)(Tt,{isEmpty:R,onAddContext:y,onSendClick:v,isLoading:c,onStop:u,fileInputRef:d,onAddFiles:m}),t[18]=d,t[19]=v,t[20]=c,t[21]=m,t[22]=u,t[23]=R,t[24]=y,t[25]=j):j=t[25];let C;return t[26]!==N||t[27]!==j?(C=(0,o.jsxs)("div",{className:"relative shrink-0 min-h-[80px] flex flex-col border-t",children:[N,j]}),t[26]=N,t[27]=j,t[28]=C):C=t[28],C});Ke.displayName="ChatInput";var Zr=()=>{let e=(0,se.c)(6),t=Ue(Ot),{handleClick:r}=Ze();if(!t){let l;e[0]===r?l=e[1]:(l=(0,o.jsx)(oe,{variant:"outline",size:"sm",onClick:()=>r("ai","ai-providers"),children:"Edit AI settings"}),e[0]=r,e[1]=l);let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsx)(at,{}),e[2]=a):a=e[2];let s;return e[3]===l?s=e[4]:(s=(0,o.jsx)(Xe,{title:"Chat with AI",description:"No AI provider configured or Chat model not selected",action:l,icon:a}),e[3]=l,e[4]=s),s}let n;return e[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(el,{}),e[5]=n):n=e[5],n},el=()=>{let e=(0,se.c)(95),t=kt(nt),[r,n]=It(hr),[l,a]=(0,p.useState)(""),[s,i]=(0,p.useState)(""),{files:c,addFiles:u,clearFiles:d,removeFile:m}=Gt(),h=(0,p.useRef)(null),f=(0,p.useRef)(null),v=(0,p.useRef)(null),S=(0,p.useRef)(null),_=(0,p.useRef)(null),w=Ut(),{invokeAiTool:N,sendRun:R}=Xt(),y=r==null?void 0:r.id,j=Lt(),{addStagedCell:C}=$t(),{createNewCell:E,prepareForRun:I}=zt(),g;e[0]!==C||e[1]!==E||e[2]!==I||e[3]!==R||e[4]!==j?(g={addStagedCell:C,createNewCell:E,prepareForRun:I,sendRun:R,store:j},e[0]=C,e[1]=E,e[2]=I,e[3]=R,e[4]=j,e[5]=g):g=e[5];let A=g,k;e[6]===(r==null?void 0:r.messages)?k=e[7]:(k=(r==null?void 0:r.messages)||[],e[6]=r==null?void 0:r.messages,e[7]=k);let F;if(e[8]!==w||e[9]!==j){let x;e[11]===j?x=e[12]:(x=async b=>{var re;let L=await lr(b.messages),W=((re=j.get(et))==null?void 0:re.mode)||Nt;return{body:{tools:Vt.getToolSchemas(W),...b,...L}}},e[11]=j,e[12]=x),F=new Bt({api:w.getAiURL("chat").toString(),headers:w.headers(),prepareSendMessagesRequest:x}),e[8]=w,e[9]=j,e[10]=F}else F=e[10];let H;e[13]===t?H=e[14]:(H=x=>{let{messages:b}=x;t(L=>Dr({chatState:L,chatId:L.activeChatId,messages:b}))},e[13]=t,e[14]=H);let{messages:T,sendMessage:D,error:U,status:me,regenerate:Pe,stop:Y,addToolOutput:At,id:De}=tr({id:y,sendAutomaticallyWhen:ul,messages:k,transport:F,onFinish:H,onToolCall:async x=>{let{toolCall:b}=x;if(b.dynamic){Ae.debug("Skipping dynamic tool call",b);return}await Kt({invokeAiTool:N,addToolOutput:_t,toolCall:{toolName:b.toolName,toolCallId:b.toolCallId,input:b.input},toolContext:A})},onError:pl}),_t=At,P=me==="submitted"||me==="streaming",he;e[15]!==P||e[16]!==T?(he=P&&T.length>0&&sr(T),e[15]=P,e[16]=T,e[17]=he):he=e[17];let ie=he,fe;e[18]===Symbol.for("react.memo_cache_sentinel")?(fe=()=>{requestAnimationFrame(()=>{if(v.current){let x=v.current;x.scrollTop=x.scrollHeight}})},e[18]=fe):fe=e[18];let xe;e[19]===y?xe=e[20]:(xe=[y],e[19]=y,e[20]=xe),(0,p.useEffect)(fe,xe);let ve;e[21]!==De||e[22]!==d||e[23]!==D||e[24]!==t?(ve=async(x,b)=>{let L=Date.now(),W={id:De,title:er(x),messages:[],createdAt:L,updatedAt:L};t(de=>{let Ge=new Map(de.chats);return Ge.set(W.id,W),{...de,chats:Ge,activeChatId:W.id}});let re=b&&b.length>0?await rt(b):void 0;D({role:"user",parts:[{type:"text",text:x},...re??[]]}),d(),a("")},e[21]=De,e[22]=d,e[23]=D,e[24]=t,e[25]=ve):ve=e[25];let ze=ve,ge;e[26]!==d||e[27]!==n?(ge=()=>{n(null),a(""),i(""),d()},e[26]=d,e[27]=n,e[28]=ge):ge=e[28];let Me=ue(ge),we;e[29]!==T||e[30]!==D?(we=(x,b)=>{var de;let L=T[x],W=(de=L.parts)==null?void 0:de.filter(ml),re=L.id;D({messageId:re,role:"user",parts:[{type:"text",text:b},...W]})},e[29]=T,e[30]=D,e[31]=we):we=e[31];let ce=ue(we),be;e[32]!==d||e[33]!==c||e[34]!==D?(be=async(x,b)=>{var W;if(!b.trim())return;(W=f.current)!=null&&W.view&&ot(f.current.view);let L=c?await rt(c):void 0;x==null||x.preventDefault(),D({text:b,files:L}),a(""),d()},e[32]=d,e[33]=c,e[34]=D,e[35]=be):be=e[35];let Fe=ue(be),ye;e[36]===Pe?ye=e[37]:(ye=()=>{Pe()},e[36]=Pe,e[37]=ye);let He=ye,je;e[38]!==ze||e[39]!==c||e[40]!==s?(je=()=>{var x;s.trim()&&((x=h.current)!=null&&x.view&&ot(h.current.view),ze(s.trim(),c))},e[38]=ze,e[39]=c,e[40]=s,e[41]=je):je=e[41];let We=ue(je),Se;e[42]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{var x,b;return(b=(x=h.current)==null?void 0:x.editor)==null?void 0:b.blur()},e[42]=Se):Se=e[42];let Et=Se,z=T.length===0,Ce;e[43]!==u||e[44]!==Fe||e[45]!==We||e[46]!==l||e[47]!==P||e[48]!==z||e[49]!==s||e[50]!==Y?(Ce=z?(0,o.jsx)(Ke,{placeholder:"Ask anything, @ to include context about tables or dataframes",input:s,inputRef:h,inputClassName:"px-1 py-0",setInput:i,onSubmit:We,isLoading:P,onStop:Y,fileInputRef:S,onAddFiles:u,onClose:Et},"new-thread-input"):(0,o.jsx)(Ke,{input:l,setInput:a,onSubmit:Fe,inputRef:f,isLoading:P,onStop:Y,onClose:()=>{var x,b;return(b=(x=f.current)==null?void 0:x.editor)==null?void 0:b.blur()},fileInputRef:S,onAddFiles:u}),e[43]=u,e[44]=Fe,e[45]=We,e[46]=l,e[47]=P,e[48]=z,e[49]=s,e[50]=Y,e[51]=Ce):Ce=e[51];let B=Ce,Ne;e[52]!==c||e[53]!==z||e[54]!==m?(Ne=c&&c.length>0&&(0,o.jsx)("div",{className:ae("flex flex-row gap-1 flex-wrap p-1",z&&"py-2 px-1"),children:c==null?void 0:c.map(x=>(0,o.jsx)(Qt,{file:x,onRemove:()=>m(x)},x.name))}),e[52]=c,e[53]=z,e[54]=m,e[55]=Ne):Ne=e[55];let q=Ne,Oe=r==null?void 0:r.id,$;e[56]!==Me||e[57]!==n||e[58]!==Oe?($=(0,o.jsx)(st,{children:(0,o.jsx)(Qr,{onNewChat:Me,activeChatId:Oe,setActiveChat:n})}),e[56]=Me,e[57]=n,e[58]=Oe,e[59]=$):$=e[59];let K;e[60]!==B||e[61]!==q||e[62]!==z?(K=z&&(0,o.jsxs)("div",{className:"rounded-md border bg-background",children:[q,B]}),e[60]=B,e[61]=q,e[62]=z,e[63]=K):K=e[63];let G;if(e[64]!==ce||e[65]!==ie||e[66]!==T){let x;e[68]!==ce||e[69]!==ie||e[70]!==T.length?(x=(b,L)=>(0,o.jsx)(Rt,{message:b,index:L,onEdit:ce,isStreamingReasoning:ie,isLast:L===T.length-1},b.id),e[68]=ce,e[69]=ie,e[70]=T.length,e[71]=x):x=e[71],G=T.map(x),e[64]=ce,e[65]=ie,e[66]=T,e[67]=G}else G=e[67];let J;e[72]===P?J=e[73]:(J=P&&(0,o.jsx)("div",{className:"flex justify-center py-4",children:(0,o.jsx)(cr,{className:"h-4 w-4 animate-spin"})}),e[72]=P,e[73]=J);let Q;e[74]!==U||e[75]!==He?(Q=U&&(0,o.jsxs)("div",{className:"flex items-center justify-center space-x-2 mb-4",children:[(0,o.jsx)(kr,{error:U||Error("Unknown error")}),(0,o.jsx)(oe,{variant:"outline",size:"sm",onClick:He,children:"Retry"})]}),e[74]=U,e[75]=He,e[76]=Q):Q=e[76];let Re;e[77]===Symbol.for("react.memo_cache_sentinel")?(Re=(0,o.jsx)("div",{ref:_}),e[77]=Re):Re=e[77];let Z;e[78]!==K||e[79]!==G||e[80]!==J||e[81]!==Q?(Z=(0,o.jsxs)("div",{className:"flex-1 px-3 bg-(--slate-1) gap-4 py-3 flex flex-col overflow-y-auto",ref:v,children:[K,G,J,Q,Re]}),e[78]=K,e[79]=G,e[80]=J,e[81]=Q,e[82]=Z):Z=e[82];let ee;e[83]!==P||e[84]!==Y?(ee=P&&(0,o.jsx)("div",{className:"w-full flex justify-center items-center z-20 border-t",children:(0,o.jsx)(oe,{variant:"linkDestructive",size:"sm",onClick:Y,children:"Stop"})}),e[83]=P,e[84]=Y,e[85]=ee):ee=e[85];let te;e[86]!==B||e[87]!==q||e[88]!==z?(te=!z&&(0,o.jsxs)(o.Fragment,{children:[q,B]}),e[86]=B,e[87]=q,e[88]=z,e[89]=te):te=e[89];let Te;return e[90]!==$||e[91]!==Z||e[92]!==ee||e[93]!==te?(Te=(0,o.jsxs)("div",{className:"flex flex-col h-[calc(100%-53px)]",children:[$,Z,ee,te]}),e[90]=$,e[91]=Z,e[92]=ee,e[93]=te,e[94]=Te):Te=e[94],Te},tl=Zr;function rl(e){return e.type==="text"}function ll(e){return e.text}function ol(e){return e.type==="file"}function al(e,t){return(0,o.jsx)(ar,{attachment:e},t)}function nl(){}function sl(){}function il(e){return e.type==="text"}function cl(e){return e.text}function dl(e){return(0,o.jsx)(gr,{value:e.value,className:"text-xs py-1",children:(0,o.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,o.jsx)("span",{className:"mt-1 text-muted-foreground",children:(0,o.jsx)(e.Icon,{className:"h-3 w-3"})}),(0,o.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,o.jsx)("span",{className:"font-semibold",children:e.label}),(0,o.jsx)("span",{className:"text-muted-foreground",children:e.subtitle})]})]})},e.value)}function ul(e){let{messages:t}=e;return nr(t)}function pl(e){Ae.error("An error occurred:",e)}function ml(e){return e.type==="file"}export{tl as default};
import{t}from"./createLucideIcon-BCdY6lG5.js";var e=t("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);export{e as t};
import{t}from"./createLucideIcon-BCdY6lG5.js";var r=t("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);export{r as t};
import{n as r}from"./src-CsZby044.js";function l(i,c){var e,a,o;i.accDescr&&((e=c.setAccDescription)==null||e.call(c,i.accDescr)),i.accTitle&&((a=c.setAccTitle)==null||a.call(c,i.accTitle)),i.title&&((o=c.setDiagramTitle)==null||o.call(c,i.title))}r(l,"populateCommonDb");export{l as t};
import{u as r}from"./src-CvyFXpBy.js";import{n}from"./src-CsZby044.js";var a=n((e,o)=>{let t;return o==="sandbox"&&(t=r("#i"+e)),r(o==="sandbox"?t.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement");export{a as t};

Sorry, the diff of this file is too big to display

var e;import{c as o,f as r,g as u,h as l,i as d,m as t,p as k,s as p,t as v}from"./chunk-FPAJGGOC-DOBSZjU2.js";var h=(e=class extends v{constructor(){super(["packet"])}},r(e,"PacketTokenBuilder"),e),c={parser:{TokenBuilder:r(()=>new h,"TokenBuilder"),ValueConverter:r(()=>new d,"ValueConverter")}};function n(i=k){let a=t(u(i),p),s=t(l({shared:a}),o,c);return a.ServiceRegistry.register(s),{shared:a,Packet:s}}r(n,"createPacketServices");export{n,c as t};

Sorry, the diff of this file is too big to display

import{n as a}from"./src-CsZby044.js";import{b as p}from"./chunk-ABZYJK2D-0jga8uiE.js";var d=a(t=>{let{handDrawnSeed:e}=p();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),h=a(t=>{let e=f([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),f=a(t=>{let e=new Map;return t.forEach(s=>{let[i,l]=s.split(":");e.set(i.trim(),l==null?void 0:l.trim())}),e},"styles2Map"),y=a(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),u=a(t=>{let{stylesArray:e}=h(t),s=[],i=[],l=[],n=[];return e.forEach(r=>{let o=r[0];y(o)?s.push(r.join(":")+" !important"):(i.push(r.join(":")+" !important"),o.includes("stroke")&&l.push(r.join(":")+" !important"),o==="fill"&&n.push(r.join(":")+" !important"))}),{labelStyles:s.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:l,backgroundStyles:n}},"styles2String"),g=a((t,e)=>{var o;let{themeVariables:s,handDrawnSeed:i}=p(),{nodeBorder:l,mainBkg:n}=s,{stylesMap:r}=h(t);return Object.assign({roughness:.7,fill:r.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:r.get("stroke")||l,seed:i,strokeWidth:((o=r.get("stroke-width"))==null?void 0:o.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:c(r.get("stroke-dasharray"))},e)},"userNodeOverrides"),c=a(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let s=isNaN(e[0])?0:e[0];return[s,s]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray");export{g as a,u as i,y as n,d as r,h as t};
var P,M;import{u as J}from"./src-CvyFXpBy.js";import{c as te,g as It}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as A,r as Ot}from"./src-CsZby044.js";import{A as w,B as ee,C as se,I as ie,U as ne,_ as re,a as ae,b as F,s as L,v as ue,z as le}from"./chunk-ABZYJK2D-0jga8uiE.js";import{r as oe,t as ce}from"./chunk-N4CR4FBY-BNoQB557.js";import{t as he}from"./chunk-FMBD7UC4-CHJv683r.js";import{t as pe}from"./chunk-55IACEB6-njZIr50E.js";import{t as de}from"./chunk-QN33PNHL-BOQncxfy.js";var vt=(function(){var s=A(function(o,y,p,a){for(p||(p={}),a=o.length;a--;p[o[a]]=y);return p},"o"),i=[1,18],n=[1,19],r=[1,20],l=[1,41],u=[1,42],h=[1,26],d=[1,24],m=[1,25],B=[1,32],pt=[1,33],dt=[1,34],b=[1,45],At=[1,35],yt=[1,36],mt=[1,37],Ct=[1,38],bt=[1,27],gt=[1,28],Et=[1,29],kt=[1,30],ft=[1,31],g=[1,44],E=[1,46],k=[1,43],f=[1,47],Tt=[1,9],c=[1,8,9],Z=[1,58],tt=[1,59],et=[1,60],st=[1,61],it=[1,62],Ft=[1,63],Dt=[1,64],G=[1,8,9,41],Rt=[1,76],v=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],nt=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],rt=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],wt=[13,60,68,69,70,71,72,86,100,102,103],Bt=[1,100],z=[1,117],K=[1,113],Y=[1,109],W=[1,115],Q=[1,110],X=[1,111],j=[1,112],H=[1,114],q=[1,116],Pt=[22,48,60,61,82,86,87,88,89,90],_t=[1,8,9,39,41,44],at=[1,8,9,22],Mt=[1,145],Gt=[1,8,9,61],N=[1,8,9,22,48,60,61,82,86,87,88,89,90],St={trace:A(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,classLiteralName:17,DOT:18,className: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,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"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",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,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,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[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],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,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],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:A(function(o,y,p,a,C,t,V){var e=t.length-1;switch(C){case 8:this.$=t[e-1];break;case 9:case 10:case 13:case 15:this.$=t[e];break;case 11:case 14:this.$=t[e-2]+"."+t[e];break;case 12:case 16:this.$=t[e-1]+t[e];break;case 17:case 18:this.$=t[e-1]+"~"+t[e]+"~";break;case 19:a.addRelation(t[e]);break;case 20:t[e-1].title=a.cleanupLabel(t[e]),a.addRelation(t[e-1]);break;case 31:this.$=t[e].trim(),a.setAccTitle(this.$);break;case 32:case 33:this.$=t[e].trim(),a.setAccDescription(this.$);break;case 34:a.addClassesToNamespace(t[e-3],t[e-1]);break;case 35:a.addClassesToNamespace(t[e-4],t[e-1]);break;case 36:this.$=t[e],a.addNamespace(t[e]);break;case 37:this.$=[t[e]];break;case 38:this.$=[t[e-1]];break;case 39:t[e].unshift(t[e-2]),this.$=t[e];break;case 41:a.setCssClass(t[e-2],t[e]);break;case 42:a.addMembers(t[e-3],t[e-1]);break;case 44:a.setCssClass(t[e-5],t[e-3]),a.addMembers(t[e-5],t[e-1]);break;case 45:this.$=t[e],a.addClass(t[e]);break;case 46:this.$=t[e-1],a.addClass(t[e-1]),a.setClassLabel(t[e-1],t[e]);break;case 50:a.addAnnotation(t[e],t[e-2]);break;case 51:case 64:this.$=[t[e]];break;case 52:t[e].push(t[e-1]),this.$=t[e];break;case 53:break;case 54:a.addMember(t[e-1],a.cleanupLabel(t[e]));break;case 55:break;case 56:break;case 57:this.$={id1:t[e-2],id2:t[e],relation:t[e-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:t[e-3],id2:t[e],relation:t[e-1],relationTitle1:t[e-2],relationTitle2:"none"};break;case 59:this.$={id1:t[e-3],id2:t[e],relation:t[e-2],relationTitle1:"none",relationTitle2:t[e-1]};break;case 60:this.$={id1:t[e-4],id2:t[e],relation:t[e-2],relationTitle1:t[e-3],relationTitle2:t[e-1]};break;case 61:a.addNote(t[e],t[e-1]);break;case 62:a.addNote(t[e]);break;case 63:this.$=t[e-2],a.defineClass(t[e-1],t[e]);break;case 65:this.$=t[e-2].concat([t[e]]);break;case 66:a.setDirection("TB");break;case 67:a.setDirection("BT");break;case 68:a.setDirection("RL");break;case 69:a.setDirection("LR");break;case 70:this.$={type1:t[e-2],type2:t[e],lineType:t[e-1]};break;case 71:this.$={type1:"none",type2:t[e],lineType:t[e-1]};break;case 72:this.$={type1:t[e-1],type2:"none",lineType:t[e]};break;case 73:this.$={type1:"none",type2:"none",lineType:t[e]};break;case 74:this.$=a.relationType.AGGREGATION;break;case 75:this.$=a.relationType.EXTENSION;break;case 76:this.$=a.relationType.COMPOSITION;break;case 77:this.$=a.relationType.DEPENDENCY;break;case 78:this.$=a.relationType.LOLLIPOP;break;case 79:this.$=a.lineType.LINE;break;case 80:this.$=a.lineType.DOTTED_LINE;break;case 81:case 87:this.$=t[e-2],a.setClickEvent(t[e-1],t[e]);break;case 82:case 88:this.$=t[e-3],a.setClickEvent(t[e-2],t[e-1]),a.setTooltip(t[e-2],t[e]);break;case 83:this.$=t[e-2],a.setLink(t[e-1],t[e]);break;case 84:this.$=t[e-3],a.setLink(t[e-2],t[e-1],t[e]);break;case 85:this.$=t[e-3],a.setLink(t[e-2],t[e-1]),a.setTooltip(t[e-2],t[e]);break;case 86:this.$=t[e-4],a.setLink(t[e-3],t[e-2],t[e]),a.setTooltip(t[e-3],t[e-1]);break;case 89:this.$=t[e-3],a.setClickEvent(t[e-2],t[e-1],t[e]);break;case 90:this.$=t[e-4],a.setClickEvent(t[e-3],t[e-2],t[e-1]),a.setTooltip(t[e-3],t[e]);break;case 91:this.$=t[e-3],a.setLink(t[e-2],t[e]);break;case 92:this.$=t[e-4],a.setLink(t[e-3],t[e-1],t[e]);break;case 93:this.$=t[e-4],a.setLink(t[e-3],t[e-1]),a.setTooltip(t[e-3],t[e]);break;case 94:this.$=t[e-5],a.setLink(t[e-4],t[e-2],t[e]),a.setTooltip(t[e-4],t[e-1]);break;case 95:this.$=t[e-2],a.setCssStyle(t[e-1],t[e]);break;case 96:a.setCssClass(t[e-1],t[e]);break;case 97:this.$=[t[e]];break;case 98:t[e-2].push(t[e]),this.$=t[e-2];break;case 100:this.$=t[e-1]+t[e];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,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:n,37:r,38:22,42:l,43:23,46:u,49:h,51:d,52:m,54:B,56:pt,57:dt,60:b,62:At,63:yt,64:mt,65:Ct,75:bt,76:gt,78:Et,82:kt,83:ft,86:g,100:E,102:k,103:f},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(Tt,[2,5],{8:[1,48]}),{8:[1,49]},s(c,[2,19],{22:[1,50]}),s(c,[2,21]),s(c,[2,22]),s(c,[2,23]),s(c,[2,24]),s(c,[2,25]),s(c,[2,26]),s(c,[2,27]),s(c,[2,28]),s(c,[2,29]),s(c,[2,30]),{34:[1,51]},{36:[1,52]},s(c,[2,33]),s(c,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:tt,70:et,71:st,72:it,73:Ft,74:Dt}),{39:[1,65]},s(G,[2,40],{39:[1,67],44:[1,66]}),s(c,[2,55]),s(c,[2,56]),{16:68,60:b,86:g,100:E,102:k},{16:39,17:40,19:69,60:b,86:g,100:E,102:k,103:f},{16:39,17:40,19:70,60:b,86:g,100:E,102:k,103:f},{16:39,17:40,19:71,60:b,86:g,100:E,102:k,103:f},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:b,86:g,100:E,102:k,103:f},{13:Rt,55:75},{58:77,60:[1,78]},s(c,[2,66]),s(c,[2,67]),s(c,[2,68]),s(c,[2,69]),s(v,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:b,86:g,100:E,102:k,103:f}),s(v,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:b,86:g,100:E,102:k,103:f},{16:39,17:40,19:86,60:b,86:g,100:E,102:k,103:f},s(nt,[2,123]),s(nt,[2,124]),s(nt,[2,125]),s(nt,[2,126]),s([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),s(Tt,[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,19:21,38:22,43:23,16:39,17:40,5:87,33:i,35:n,37:r,42:l,46:u,49:h,51:d,52:m,54:B,56:pt,57:dt,60:b,62:At,63:yt,64:mt,65:Ct,75:bt,76:gt,78:Et,82:kt,83:ft,86:g,100:E,102:k,103:f}),{5:88,10:5,16:39,17:40,19:21,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:n,37:r,38:22,42:l,43:23,46:u,49:h,51:d,52:m,54:B,56:pt,57:dt,60:b,62:At,63:yt,64:mt,65:Ct,75:bt,76:gt,78:Et,82:kt,83:ft,86:g,100:E,102:k,103:f},s(c,[2,20]),s(c,[2,31]),s(c,[2,32]),{13:[1,90],16:39,17:40,19:89,60:b,86:g,100:E,102:k,103:f},{53:91,66:56,67:57,68:Z,69:tt,70:et,71:st,72:it,73:Ft,74:Dt},s(c,[2,54]),{67:92,73:Ft,74:Dt},s(rt,[2,73],{66:93,68:Z,69:tt,70:et,71:st,72:it}),s(U,[2,74]),s(U,[2,75]),s(U,[2,76]),s(U,[2,77]),s(U,[2,78]),s(wt,[2,79]),s(wt,[2,80]),{8:[1,95],24:96,40:94,43:23,46:u},{16:97,60:b,86:g,100:E,102:k},{41:[1,99],45:98,51:Bt},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:z,48:K,59:106,60:Y,82:W,84:107,85:108,86:Q,87:X,88:j,89:H,90:q},{60:[1,118]},{13:Rt,55:119},s(c,[2,62]),s(c,[2,128]),{22:z,48:K,59:120,60:Y,61:[1,121],82:W,84:107,85:108,86:Q,87:X,88:j,89:H,90:q},s(Pt,[2,64]),{16:39,17:40,19:122,60:b,86:g,100:E,102:k,103:f},s(v,[2,16]),s(v,[2,17]),s(v,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:b,86:g,100:E,102:k,103:f},{39:[2,10]},s(_t,[2,45],{11:125,12:[1,126]}),s(Tt,[2,7]),{9:[1,127]},s(at,[2,57]),{16:39,17:40,19:128,60:b,86:g,100:E,102:k,103:f},{13:[1,130],16:39,17:40,19:129,60:b,86:g,100:E,102:k,103:f},s(rt,[2,72],{66:131,68:Z,69:tt,70:et,71:st,72:it}),s(rt,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:u},{8:[1,134],41:[2,37]},s(G,[2,41],{39:[1,135]}),{41:[1,136]},s(G,[2,43]),{41:[2,51],45:137,51:Bt},{16:39,17:40,19:138,60:b,86:g,100:E,102:k,103:f},s(c,[2,81],{13:[1,139]}),s(c,[2,83],{13:[1,141],77:[1,140]}),s(c,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},s(c,[2,95],{61:Mt}),s(Gt,[2,97],{85:146,22:z,48:K,60:Y,82:W,86:Q,87:X,88:j,89:H,90:q}),s(N,[2,99]),s(N,[2,101]),s(N,[2,102]),s(N,[2,103]),s(N,[2,104]),s(N,[2,105]),s(N,[2,106]),s(N,[2,107]),s(N,[2,108]),s(N,[2,109]),s(c,[2,96]),s(c,[2,61]),s(c,[2,63],{61:Mt}),{60:[1,147]},s(v,[2,14]),{15:148,16:84,17:85,60:b,86:g,100:E,102:k,103:f},{39:[2,12]},s(_t,[2,46]),{13:[1,149]},{1:[2,4]},s(at,[2,59]),s(at,[2,58]),{16:39,17:40,19:150,60:b,86:g,100:E,102:k,103:f},s(rt,[2,70]),s(c,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:u},{45:153,51:Bt},s(G,[2,42]),{41:[2,52]},s(c,[2,50]),s(c,[2,82]),s(c,[2,84]),s(c,[2,85],{77:[1,154]}),s(c,[2,88]),s(c,[2,89],{13:[1,155]}),s(c,[2,91],{13:[1,157],77:[1,156]}),{22:z,48:K,60:Y,82:W,84:158,85:108,86:Q,87:X,88:j,89:H,90:q},s(N,[2,100]),s(Pt,[2,65]),{39:[2,11]},{14:[1,159]},s(at,[2,60]),s(c,[2,35]),{41:[2,39]},{41:[1,160]},s(c,[2,86]),s(c,[2,90]),s(c,[2,92]),s(c,[2,93],{77:[1,161]}),s(Gt,[2,98],{85:146,22:z,48:K,60:Y,82:W,86:Q,87:X,88:j,89:H,90:q}),s(_t,[2,8]),s(G,[2,44]),s(c,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:A(function(o,y){if(y.recoverable)this.trace(o);else{var p=Error(o);throw p.hash=y,p}},"parseError"),parse:A(function(o){var y=this,p=[0],a=[],C=[null],t=[],V=this.table,e="",lt=0,Ut=0,zt=0,qt=2,Kt=1,Vt=t.slice.call(arguments,1),T=Object.create(this.lexer),x={yy:{}};for(var Nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Nt)&&(x.yy[Nt]=this.yy[Nt]);T.setInput(o,x.yy),x.yy.lexer=T,x.yy.parser=this,T.yylloc===void 0&&(T.yylloc={});var $t=T.yylloc;t.push($t);var Jt=T.options&&T.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(S){p.length-=2*S,C.length-=S,t.length-=S}A(Zt,"popStack");function Yt(){var S=a.pop()||T.lex()||Kt;return typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=y.symbols_[S]||S),S}A(Yt,"lex");for(var D,Lt,I,_,xt,R={},ot,$,Wt,ct;;){if(I=p[p.length-1],this.defaultActions[I]?_=this.defaultActions[I]:(D??(D=Yt()),_=V[I]&&V[I][D]),_===void 0||!_.length||!_[0]){var Qt="";for(ot in ct=[],V[I])this.terminals_[ot]&&ot>qt&&ct.push("'"+this.terminals_[ot]+"'");Qt=T.showPosition?"Parse error on line "+(lt+1)+`:
`+T.showPosition()+`
Expecting `+ct.join(", ")+", got '"+(this.terminals_[D]||D)+"'":"Parse error on line "+(lt+1)+": Unexpected "+(D==Kt?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(Qt,{text:T.match,token:this.terminals_[D]||D,line:T.yylineno,loc:$t,expected:ct})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+I+", token: "+D);switch(_[0]){case 1:p.push(D),C.push(T.yytext),t.push(T.yylloc),p.push(_[1]),D=null,Lt?(D=Lt,Lt=null):(Ut=T.yyleng,e=T.yytext,lt=T.yylineno,$t=T.yylloc,zt>0&&zt--);break;case 2:if($=this.productions_[_[1]][1],R.$=C[C.length-$],R._$={first_line:t[t.length-($||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-($||1)].first_column,last_column:t[t.length-1].last_column},Jt&&(R._$.range=[t[t.length-($||1)].range[0],t[t.length-1].range[1]]),xt=this.performAction.apply(R,[e,Ut,lt,x.yy,_[1],C,t].concat(Vt)),xt!==void 0)return xt;$&&(p=p.slice(0,-1*$*2),C=C.slice(0,-1*$),t=t.slice(0,-1*$)),p.push(this.productions_[_[1]][0]),C.push(R.$),t.push(R._$),Wt=V[p[p.length-2]][p[p.length-1]],p.push(Wt);break;case 3:return!0}}return!0},"parse")};St.lexer=(function(){return{EOF:1,parseError:A(function(o,y){if(this.yy.parser)this.yy.parser.parseError(o,y);else throw Error(o)},"parseError"),setInput:A(function(o,y){return this.yy=y||this.yy||{},this._input=o,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:A(function(){var o=this._input[0];return this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o,o.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:A(function(o){var y=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y),this.offset-=y;var a=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===a.length?this.yylloc.first_column:0)+a[a.length-p.length].length-p[0].length:this.yylloc.first_column-y},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-y]),this.yyleng=this.yytext.length,this},"unput"),more:A(function(){return this._more=!0,this},"more"),reject:A(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:A(function(o){this.unput(this.match.slice(o))},"less"),pastInput:A(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:A(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:A(function(){var o=this.pastInput(),y=Array(o.length+1).join("-");return o+this.upcomingInput()+`
`+y+"^"},"showPosition"),test_match:A(function(o,y){var p,a,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))),a=o[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],p=this.performAction.call(this,this.yy,this,y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var t in C)this[t]=C[t];return!1}return!1},"test_match"),next:A(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,y,p,a;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),t=0;t<C.length;t++)if(p=this._input.match(this.rules[C[t]]),p&&(!y||p[0].length>y[0].length)){if(y=p,a=t,this.options.backtrack_lexer){if(o=this.test_match(p,C[t]),o!==!1)return o;if(this._backtrack){y=!1;continue}else return!1}else if(!this.options.flex)break}return y?(o=this.test_match(y,C[a]),o===!1?!1:o):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:A(function(){return this.next()||this.lex()},"lex"),begin:A(function(o){this.conditionStack.push(o)},"begin"),popState:A(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:A(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:A(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:A(function(o){this.begin(o)},"pushState"),stateStackSize:A(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:A(function(o,y,p,a){switch(p){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;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 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;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 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;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 77;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 69;case 69:return 69;case 70:return 71;case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:return 89;case 85:return 89;case 86:return 90;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:return 48;case 96:return 48;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}}}})();function ut(){this.yy={}}return A(ut,"Parser"),ut.prototype=St,St.Parser=ut,new ut})();vt.parser=vt;var Ae=vt,Xt=["#","+","~","-",""],jt=(P=class{constructor(i,n){this.memberType=n,this.visibility="",this.classifier="",this.text="";let r=ie(i,F());this.parseMember(r)}getDisplayDetails(){let i=this.visibility+w(this.id);this.memberType==="method"&&(i+=`(${w(this.parameters.trim())})`,this.returnType&&(i+=" : "+w(this.returnType))),i=i.trim();let n=this.parseClassifier();return{displayText:i,cssStyle:n}}parseMember(i){let n="";if(this.memberType==="method"){let r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(r){let l=r[1]?r[1].trim():"";if(Xt.includes(l)&&(this.visibility=l),this.id=r[2],this.parameters=r[3]?r[3].trim():"",n=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",n===""){let u=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(u)&&(n=u,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let r=i.length,l=i.substring(0,1),u=i.substring(r-1);Xt.includes(l)&&(this.visibility=l),/[$*]/.exec(u)&&(n=u),this.id=i.substring(this.visibility===""?0:1,n===""?r:r-1)}this.classifier=n,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim(),this.text=`${this.visibility?"\\"+this.visibility:""}${w(this.id)}${this.memberType==="method"?`(${w(this.parameters)})${this.returnType?" : "+w(this.returnType):""}`:""}`.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},A(P,"ClassMember"),P),ht="classId-",Ht=0,O=A(s=>L.sanitizeText(s,F()),"sanitizeText"),ye=(M=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=A(i=>{let n=J(".mermaidTooltip");(n._groups||n)[0][0]===null&&(n=J("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),J(i).select("svg").selectAll("g.node").on("mouseover",r=>{let l=J(r.currentTarget);if(l.attr("title")===null)return;let u=this.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(l.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.top-14+document.body.scrollTop+"px"),n.html(n.html().replace(/&lt;br\/&gt;/g,"<br/>")),l.classed("hover",!0)}).on("mouseout",r=>{n.transition().duration(500).style("opacity",0),J(r.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=ee,this.getAccTitle=ue,this.setAccDescription=le,this.getAccDescription=re,this.setDiagramTitle=ne,this.getDiagramTitle=se,this.getConfig=A(()=>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){let n=L.sanitizeText(i,F()),r="",l=n;if(n.indexOf("~")>0){let u=n.split("~");l=O(u[0]),r=O(u[1])}return{className:l,type:r}}setClassLabel(i,n){let r=L.sanitizeText(i,F());n&&(n=O(n));let{className:l}=this.splitClassNameAndType(r);this.classes.get(l).label=n,this.classes.get(l).text=`${n}${this.classes.get(l).type?`<${this.classes.get(l).type}>`:""}`}addClass(i){let n=L.sanitizeText(i,F()),{className:r,type:l}=this.splitClassNameAndType(n);if(this.classes.has(r))return;let u=L.sanitizeText(r,F());this.classes.set(u,{id:u,type:l,label:u,text:`${u}${l?`&lt;${l}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:ht+u+"-"+Ht}),Ht++}addInterface(i,n){let r={id:`interface${this.interfaces.length}`,label:i,classId:n};this.interfaces.push(r)}lookUpDomId(i){let n=L.sanitizeText(i,F());if(this.classes.has(n))return this.classes.get(n).domId;throw Error("Class not found: "+n)}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",ae()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(i){Ot.debug("Adding relation: "+JSON.stringify(i));let n=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!n.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&&!n.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=L.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=L.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,n){let r=this.splitClassNameAndType(i).className;this.classes.get(r).annotations.push(n)}addMember(i,n){this.addClass(i);let r=this.splitClassNameAndType(i).className,l=this.classes.get(r);if(typeof n=="string"){let u=n.trim();u.startsWith("<<")&&u.endsWith(">>")?l.annotations.push(O(u.substring(2,u.length-2))):u.indexOf(")")>0?l.methods.push(new jt(u,"method")):u&&l.members.push(new jt(u,"attribute"))}}addMembers(i,n){Array.isArray(n)&&(n.reverse(),n.forEach(r=>this.addMember(i,r)))}addNote(i,n){let r={id:`note${this.notes.length}`,class:n,text:i};this.notes.push(r)}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),O(i.trim())}setCssClass(i,n){i.split(",").forEach(r=>{let l=r;/\d/.exec(r[0])&&(l=ht+l);let u=this.classes.get(l);u&&(u.cssClasses+=" "+n)})}defineClass(i,n){for(let r of i){let l=this.styleClasses.get(r);l===void 0&&(l={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,l)),n&&n.forEach(u=>{if(/color/.exec(u)){let h=u.replace("fill","bgFill");l.textStyles.push(h)}l.styles.push(u)}),this.classes.forEach(u=>{u.cssClasses.includes(r)&&u.styles.push(...n.flatMap(h=>h.split(",")))})}}setTooltip(i,n){i.split(",").forEach(r=>{n!==void 0&&(this.classes.get(r).tooltip=O(n))})}getTooltip(i,n){return n&&this.namespaces.has(n)?this.namespaces.get(n).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,n,r){let l=F();i.split(",").forEach(u=>{let h=u;/\d/.exec(u[0])&&(h=ht+h);let d=this.classes.get(h);d&&(d.link=It.formatUrl(n,l),l.securityLevel==="sandbox"?d.linkTarget="_top":typeof r=="string"?d.linkTarget=O(r):d.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,n,r){i.split(",").forEach(l=>{this.setClickFunc(l,n,r),this.classes.get(l).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,n,r){let l=L.sanitizeText(i,F());if(F().securityLevel!=="loose"||n===void 0)return;let u=l;if(this.classes.has(u)){let h=this.lookUpDomId(u),d=[];if(typeof r=="string"){d=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let m=0;m<d.length;m++){let B=d[m].trim();B.startsWith('"')&&B.endsWith('"')&&(B=B.substr(1,B.length-2)),d[m]=B}}d.length===0&&d.push(h),this.functions.push(()=>{let m=document.querySelector(`[id="${h}"]`);m!==null&&m.addEventListener("click",()=>{It.runFunc(n,...d)},!1)})}}bindFunctions(i){this.functions.forEach(n=>{n(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:ht+i+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,n){if(this.namespaces.has(i))for(let r of n){let{className:l}=this.splitClassNameAndType(r);this.classes.get(l).parent=i,this.namespaces.get(i).classes.set(l,this.classes.get(l))}}setCssStyle(i,n){let r=this.classes.get(i);if(!(!n||!r))for(let l of n)l.includes(",")?r.styles.push(...l.split(",")):r.styles.push(l)}getArrowMarker(i){let n;switch(i){case 0:n="aggregation";break;case 1:n="extension";break;case 2:n="composition";break;case 3:n="dependency";break;case 4:n="lollipop";break;default:n="none"}return n}getData(){var u;let i=[],n=[],r=F();for(let h of this.namespaces.keys()){let d=this.namespaces.get(h);if(d){let m={id:d.id,label:d.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:r.look};i.push(m)}}for(let h of this.classes.keys()){let d=this.classes.get(h);if(d){let m=d;m.parentId=d.parent,m.look=r.look,i.push(m)}}let l=0;for(let h of this.notes){l++;let d={id:h.id,label:h.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look};i.push(d);let m=((u=this.classes.get(h.class))==null?void 0:u.id)??"";if(m){let B={id:`edgeNote${l}`,start:h.id,end:m,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};n.push(B)}}for(let h of this.interfaces){let d={id:h.id,label:h.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};i.push(d)}l=0;for(let h of this.relations){l++;let d={id:te(h.id1,h.id2,{prefix:"id",counter:l}),start:h.id1,end:h.id2,type:"normal",label:h.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(h.relation.type1),arrowTypeEnd:this.getArrowMarker(h.relation.type2),startLabelRight:h.relationTitle1==="none"?"":h.relationTitle1,endLabelLeft:h.relationTitle2==="none"?"":h.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:h.style||"",pattern:h.relation.lineType==1?"dashed":"solid",look:r.look};n.push(d)}return{nodes:i,edges:n,other:{},config:r,direction:this.getDirection()}}},A(M,"ClassDB"),M),me=A(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};
}
${he()}
`,"getStyles"),Ce={getClasses:A(function(s,i){return i.db.getClasses()},"getClasses"),draw:A(async function(s,i,n,r){Ot.info("REF0:"),Ot.info("Drawing class diagram (v3)",i);let{securityLevel:l,state:u,layout:h}=F(),d=r.db.getData(),m=pe(i,l);d.type=r.type,d.layoutAlgorithm=ce(h),d.nodeSpacing=(u==null?void 0:u.nodeSpacing)||50,d.rankSpacing=(u==null?void 0:u.rankSpacing)||50,d.markers=["aggregation","extension","composition","dependency","lollipop"],d.diagramId=i,await oe(d,m),It.insertTitle(m,"classDiagramTitleText",(u==null?void 0:u.titleTopMargin)??25,r.db.getDiagramTitle()),de(m,8,"classDiagram",(u==null?void 0:u.useMaxWidth)??!0)},"draw"),getDir:A((s,i="TB")=>{if(!s.doc)return i;let n=i;for(let r of s.doc)r.stmt==="dir"&&(n=r.value);return n},"getDir")};export{me as i,Ae as n,Ce as r,ye as t};
import{n as p}from"./src-CsZby044.js";var l=p(({flowchart:t})=>{var i,o;let r=((i=t==null?void 0:t.subGraphTitleMargin)==null?void 0:i.top)??0,a=((o=t==null?void 0:t.subGraphTitleMargin)==null?void 0:o.bottom)??0;return{subGraphTitleTopMargin:r,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:r+a}},"getSubGraphTitleMargins");export{l as t};
var K;import{g as te,s as ee}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as u,r as T}from"./src-CsZby044.js";import{B as se,C as ie,U as re,_ as ne,a as ae,b as w,s as U,v as oe,z as le}from"./chunk-ABZYJK2D-0jga8uiE.js";import{r as ce}from"./chunk-N4CR4FBY-BNoQB557.js";import{t as he}from"./chunk-55IACEB6-njZIr50E.js";import{t as de}from"./chunk-QN33PNHL-BOQncxfy.js";var kt=(function(){var e=u(function(a,h,g,S){for(g||(g={}),S=a.length;S--;g[a[S]]=h);return g},"o"),t=[1,2],s=[1,3],n=[1,4],i=[2,4],o=[1,9],c=[1,11],y=[1,16],p=[1,17],_=[1,18],m=[1,19],D=[1,33],A=[1,20],x=[1,21],R=[1,22],$=[1,23],O=[1,24],d=[1,26],E=[1,27],v=[1,28],G=[1,29],j=[1,30],Y=[1,31],F=[1,32],rt=[1,35],nt=[1,36],at=[1,37],ot=[1,38],H=[1,34],f=[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],lt=[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],$t=[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],mt={trace:u(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:u(function(a,h,g,S,b,r,Q){var l=r.length-1;switch(b){case 3:return S.setRootDoc(r[l]),r[l];case 4:this.$=[];break;case 5:r[l]!="nl"&&(r[l-1].push(r[l]),this.$=r[l-1]);break;case 6:case 7:this.$=r[l];break;case 8:this.$="nl";break;case 12:this.$=r[l];break;case 13:let ht=r[l-1];ht.description=S.trimColon(r[l]),this.$=ht;break;case 14:this.$={stmt:"relation",state1:r[l-2],state2:r[l]};break;case 15:let dt=S.trimColon(r[l]);this.$={stmt:"relation",state1:r[l-3],state2:r[l-1],description:dt};break;case 19:this.$={stmt:"state",id:r[l-3],type:"default",description:"",doc:r[l-1]};break;case 20:var z=r[l],X=r[l-2].trim();if(r[l].match(":")){var Z=r[l].split(":");z=Z[0],X=[X,Z[1]]}this.$={stmt:"state",id:z,type:"default",description:X};break;case 21:this.$={stmt:"state",id:r[l-3],type:"default",description:r[l-5],doc:r[l-1]};break;case 22:this.$={stmt:"state",id:r[l],type:"fork"};break;case 23:this.$={stmt:"state",id:r[l],type:"join"};break;case 24:this.$={stmt:"state",id:r[l],type:"choice"};break;case 25:this.$={stmt:"state",id:S.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[l-1].trim(),note:{position:r[l-2].trim(),text:r[l].trim()}};break;case 29:this.$=r[l].trim(),S.setAccTitle(this.$);break;case 30:case 31:this.$=r[l].trim(),S.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[l-3],url:r[l-2],tooltip:r[l-1]};break;case 33:this.$={stmt:"click",id:r[l-3],url:r[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[l-1].trim(),classes:r[l].trim()};break;case 36:this.$={stmt:"style",id:r[l-1].trim(),styleClass:r[l].trim()};break;case 37:this.$={stmt:"applyClass",id:r[l-1].trim(),styleClass:r[l].trim()};break;case 38:S.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:S.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:S.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:S.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[l-2].trim(),classes:[r[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[l-2].trim(),classes:[r[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:s,6:n},{1:[3]},{3:5,4:t,5:s,6:n},{3:6,4:t,5:s,6:n},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:c,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:p,19:_,22:m,24:D,25:A,26:x,27:R,28:$,29:O,32:25,33:d,35:E,37:v,38:G,41:j,45:Y,48:F,51:rt,52:nt,53:at,54:ot,57:H},e(f,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:p,19:_,22:m,24:D,25:A,26:x,27:R,28:$,29:O,32:25,33:d,35:E,37:v,38:G,41:j,45:Y,48:F,51:rt,52:nt,53:at,54:ot,57:H},e(f,[2,7]),e(f,[2,8]),e(f,[2,9]),e(f,[2,10]),e(f,[2,11]),e(f,[2,12],{14:[1,40],15:[1,41]}),e(f,[2,16]),{18:[1,42]},e(f,[2,18],{20:[1,43]}),{23:[1,44]},e(f,[2,22]),e(f,[2,23]),e(f,[2,24]),e(f,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(f,[2,28]),{34:[1,49]},{36:[1,50]},e(f,[2,31]),{13:51,24:D,57:H},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(lt,[2,44],{58:[1,56]}),e(lt,[2,45],{58:[1,57]}),e(f,[2,38]),e(f,[2,39]),e(f,[2,40]),e(f,[2,41]),e(f,[2,6]),e(f,[2,13]),{13:58,24:D,57:H},e(f,[2,17]),e($t,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(f,[2,29]),e(f,[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(f,[2,14],{14:[1,71]}),{4:o,5:c,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:p,19:_,21:[1,72],22:m,24:D,25:A,26:x,27:R,28:$,29:O,32:25,33:d,35:E,37:v,38:G,41:j,45:Y,48:F,51:rt,52:nt,53:at,54:ot,57:H},e(f,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(f,[2,34]),e(f,[2,35]),e(f,[2,36]),e(f,[2,37]),e(lt,[2,46]),e(lt,[2,47]),e(f,[2,15]),e(f,[2,19]),e($t,i,{7:78}),e(f,[2,26]),e(f,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:c,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:p,19:_,21:[1,81],22:m,24:D,25:A,26:x,27:R,28:$,29:O,32:25,33:d,35:E,37:v,38:G,41:j,45:Y,48:F,51:rt,52:nt,53:at,54:ot,57:H},e(f,[2,32]),e(f,[2,33]),e(f,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:u(function(a,h){if(h.recoverable)this.trace(a);else{var g=Error(a);throw g.hash=h,g}},"parseError"),parse:u(function(a){var h=this,g=[0],S=[],b=[null],r=[],Q=this.table,l="",z=0,X=0,Z=0,ht=2,dt=1,qt=r.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var St in this.yy)Object.prototype.hasOwnProperty.call(this.yy,St)&&(W.yy[St]=this.yy[St]);k.setInput(a,W.yy),W.yy.lexer=k,W.yy.parser=this,k.yylloc===void 0&&(k.yylloc={});var _t=k.yylloc;r.push(_t);var Qt=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){g.length-=2*N,b.length-=N,r.length-=N}u(Zt,"popStack");function Lt(){var N=S.pop()||k.lex()||dt;return typeof N!="number"&&(N instanceof Array&&(S=N,N=S.pop()),N=h.symbols_[N]||N),N}u(Lt,"lex");for(var L,bt,M,I,Tt,V={},ut,B,At,pt;;){if(M=g[g.length-1],this.defaultActions[M]?I=this.defaultActions[M]:(L??(L=Lt()),I=Q[M]&&Q[M][L]),I===void 0||!I.length||!I[0]){var vt="";for(ut in pt=[],Q[M])this.terminals_[ut]&&ut>ht&&pt.push("'"+this.terminals_[ut]+"'");vt=k.showPosition?"Parse error on line "+(z+1)+`:
`+k.showPosition()+`
Expecting `+pt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":"Parse error on line "+(z+1)+": Unexpected "+(L==dt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(vt,{text:k.match,token:this.terminals_[L]||L,line:k.yylineno,loc:_t,expected:pt})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+M+", token: "+L);switch(I[0]){case 1:g.push(L),b.push(k.yytext),r.push(k.yylloc),g.push(I[1]),L=null,bt?(L=bt,bt=null):(X=k.yyleng,l=k.yytext,z=k.yylineno,_t=k.yylloc,Z>0&&Z--);break;case 2:if(B=this.productions_[I[1]][1],V.$=b[b.length-B],V._$={first_line:r[r.length-(B||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(B||1)].first_column,last_column:r[r.length-1].last_column},Qt&&(V._$.range=[r[r.length-(B||1)].range[0],r[r.length-1].range[1]]),Tt=this.performAction.apply(V,[l,X,z,W.yy,I[1],b,r].concat(qt)),Tt!==void 0)return Tt;B&&(g=g.slice(0,-1*B*2),b=b.slice(0,-1*B),r=r.slice(0,-1*B)),g.push(this.productions_[I[1]][0]),b.push(V.$),r.push(V._$),At=Q[g[g.length-2]][g[g.length-1]],g.push(At);break;case 3:return!0}}return!0},"parse")};mt.lexer=(function(){return{EOF:1,parseError:u(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw Error(a)},"parseError"),setInput:u(function(a,h){return this.yy=h||this.yy||{},this._input=a,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 a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:u(function(a){var h=a.length,g=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var S=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 b=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===S.length?this.yylloc.first_column:0)+S[S.length-g.length].length-g[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-h]),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(a){this.unput(this.match.slice(a))},"less"),pastInput:u(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var a=this.pastInput(),h=Array(a.length+1).join("-");return a+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:u(function(a,h){var g,S,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),S=a[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],g=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in b)this[r]=b[r];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,h,g,S;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),r=0;r<b.length;r++)if(g=this._input.match(this.rules[b[r]]),g&&(!h||g[0].length>h[0].length)){if(h=g,S=r,this.options.backtrack_lexer){if(a=this.test_match(g,b[r]),a!==!1)return a;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(a=this.test_match(h,b[S]),a===!1?!1:a):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(){return this.next()||this.lex()},"lex"),begin:u(function(a){this.conditionStack.push(a)},"begin"),popState:u(function(){return this.conditionStack.length-1>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,h,g,S){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(),h.yytext=h.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),h.yytext=h.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),h.yytext=h.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),h.yytext=h.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),h.yytext=h.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),h.yytext=h.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(),h.yytext=h.yytext.substr(2).trim(),31;case 70:return this.popState(),h.yytext=h.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 h.yytext=h.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,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/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}}}})();function ct(){this.yy={}}return u(ct,"Parser"),ct.prototype=mt,mt.Parser=ct,new ct})();kt.parser=kt;var ue=kt,pe="TB",It="TB",Nt="dir",J="state",q="root",Et="relation",ye="classDef",ge="style",fe="applyClass",tt="default",Ot="divider",Rt="fill:none",wt="fill: #333",Bt="c",Yt="text",Ft="normal",Dt="rect",Ct="rectWithTitle",me="stateStart",Se="stateEnd",Pt="divider",Gt="roundedWithTitle",_e="note",be="noteGroup",et="statediagram",Te=`${et}-state`,jt="transition",ke="note",Ee=`${jt} note-edge`,De=`${et}-${ke}`,Ce=`${et}-cluster`,xe=`${et}-cluster-alt`,zt="parent",Wt="note",$e="state",xt="----",Le=`${xt}${Wt}`,Mt=`${xt}${zt}`,Ut=u((e,t=It)=>{if(!e.doc)return t;let s=t;for(let n of e.doc)n.stmt==="dir"&&(s=n.value);return s},"getDir"),Ae={getClasses:u(function(e,t){return t.db.getClasses()},"getClasses"),draw:u(async function(e,t,s,n){T.info("REF0:"),T.info("Drawing state diagram (v2)",t);let{securityLevel:i,state:o,layout:c}=w();n.db.extract(n.db.getRootDocV2());let y=n.db.getData(),p=he(t,i);y.type=n.type,y.layoutAlgorithm=c,y.nodeSpacing=(o==null?void 0:o.nodeSpacing)||50,y.rankSpacing=(o==null?void 0:o.rankSpacing)||50,y.markers=["barb"],y.diagramId=t,await ce(y,p);try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map).forEach((_,m)=>{var d;let D=typeof m=="string"?m:typeof(m==null?void 0:m.id)=="string"?m.id:"";if(!D){T.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(m));return}let A=(d=p.node())==null?void 0:d.querySelectorAll("g"),x;if(A==null||A.forEach(E=>{var v;((v=E.textContent)==null?void 0:v.trim())===D&&(x=E)}),!x){T.warn("\u26A0\uFE0F Could not find node matching text:",D);return}let R=x.parentNode;if(!R){T.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",D);return}let $=document.createElementNS("http://www.w3.org/2000/svg","a"),O=_.url.replace(/^"+|"+$/g,"");if($.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",O),$.setAttribute("target","_blank"),_.tooltip){let E=_.tooltip.replace(/^"+|"+$/g,"");$.setAttribute("title",E)}R.replaceChild($,x),$.appendChild(x),T.info("\u{1F517} Wrapped node in <a> tag for:",D,_.url)})}catch(_){T.error("\u274C Error injecting clickable links:",_)}te.insertTitle(p,"statediagramTitleText",(o==null?void 0:o.titleTopMargin)??25,n.db.getDiagramTitle()),de(p,8,et,(o==null?void 0:o.useMaxWidth)??!0)},"draw"),getDir:Ut},yt=new Map,P=0;function gt(e="",t=0,s="",n=xt){return`${$e}-${e}${s!==null&&s.length>0?`${n}${s}`:""}-${t}`}u(gt,"stateDomId");var ve=u((e,t,s,n,i,o,c,y)=>{T.trace("items",t),t.forEach(p=>{switch(p.stmt){case J:it(e,p,s,n,i,o,c,y);break;case tt:it(e,p,s,n,i,o,c,y);break;case Et:{it(e,p.state1,s,n,i,o,c,y),it(e,p.state2,s,n,i,o,c,y);let _={id:"edge"+P,start:p.state1.id,end:p.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Rt,labelStyle:"",label:U.sanitizeText(p.description??"",w()),arrowheadStyle:wt,labelpos:Bt,labelType:Yt,thickness:Ft,classes:jt,look:c};i.push(_),P++}break}})},"setupDoc"),Kt=u((e,t=It)=>{let s=t;if(e.doc)for(let n of e.doc)n.stmt==="dir"&&(s=n.value);return s},"getDir");function st(e,t,s){if(!t.id||t.id==="</join></fork>"||t.id==="</choice>")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(i=>{let o=s.get(i);o&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...o.styles])}));let n=e.find(i=>i.id===t.id);n?Object.assign(n,t):e.push(t)}u(st,"insertOrUpdateNode");function Ht(e){var t;return((t=e==null?void 0:e.classes)==null?void 0:t.join(" "))??""}u(Ht,"getClassesFromDbInfo");function Xt(e){return(e==null?void 0:e.styles)??[]}u(Xt,"getStylesFromDbInfo");var it=u((e,t,s,n,i,o,c,y)=>{var x,R,$;let p=t.id,_=s.get(p),m=Ht(_),D=Xt(_),A=w();if(T.info("dataFetcher parsedItem",t,_,D),p!=="root"){let O=Dt;t.start===!0?O=me:t.start===!1&&(O=Se),t.type!==tt&&(O=t.type),yt.get(p)||yt.set(p,{id:p,shape:O,description:U.sanitizeText(p,A),cssClasses:`${m} ${Te}`,cssStyles:D});let d=yt.get(p);t.description&&(Array.isArray(d.description)?(d.shape=Ct,d.description.push(t.description)):(x=d.description)!=null&&x.length&&d.description.length>0?(d.shape=Ct,d.description===p?d.description=[t.description]:d.description=[d.description,t.description]):(d.shape=Dt,d.description=t.description),d.description=U.sanitizeTextOrArray(d.description,A)),((R=d.description)==null?void 0:R.length)===1&&d.shape===Ct&&(d.type==="group"?d.shape=Gt:d.shape=Dt),!d.type&&t.doc&&(T.info("Setting cluster for XCX",p,Kt(t)),d.type="group",d.isGroup=!0,d.dir=Kt(t),d.shape=t.type===Ot?Pt:Gt,d.cssClasses=`${d.cssClasses} ${Ce} ${o?xe:""}`);let E={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:p,dir:d.dir,domId:gt(p,P),type:d.type,isGroup:d.type==="group",padding:8,rx:10,ry:10,look:c};if(E.shape===Pt&&(E.label=""),e&&e.id!=="root"&&(T.trace("Setting node ",p," to be child of its parent ",e.id),E.parentId=e.id),E.centerLabel=!0,t.note){let v={labelStyle:"",shape:_e,label:t.note.text,cssClasses:De,cssStyles:[],cssCompiledStyles:[],id:p+Le+"-"+P,domId:gt(p,P,Wt),type:d.type,isGroup:d.type==="group",padding:($=A.flowchart)==null?void 0:$.padding,look:c,position:t.note.position},G=p+Mt,j={labelStyle:"",shape:be,label:t.note.text,cssClasses:d.cssClasses,cssStyles:[],id:p+Mt,domId:gt(p,P,zt),type:"group",isGroup:!0,padding:16,look:c,position:t.note.position};P++,j.id=G,v.parentId=G,st(n,j,y),st(n,v,y),st(n,E,y);let Y=p,F=v.id;t.note.position==="left of"&&(Y=v.id,F=p),i.push({id:Y+"-"+F,start:Y,end:F,arrowhead:"none",arrowTypeEnd:"",style:Rt,labelStyle:"",classes:Ee,arrowheadStyle:wt,labelpos:Bt,labelType:Yt,thickness:Ft,look:c})}else st(n,E,y)}t.doc&&(T.trace("Adding nodes children "),ve(t,t.doc,s,n,i,!o,c,y))},"dataFetcher"),Ie=u(()=>{yt.clear(),P=0},"reset"),C={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Vt=u(()=>new Map,"newClassesList"),Jt=u(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),ft=u(e=>JSON.parse(JSON.stringify(e)),"clone"),Ne=(K=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Vt(),this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=oe,this.setAccTitle=se,this.getAccDescription=ne,this.setAccDescription=le,this.setDiagramTitle=re,this.getDiagramTitle=ie,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(let i of Array.isArray(t)?t:t.doc)switch(i.stmt){case J:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case Et:this.addRelation(i.state1,i.state2,i.description);break;case ye:this.addStyleClass(i.id.trim(),i.classes);break;case ge:this.handleStyleDef(i);break;case fe:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}let s=this.getStates(),n=w();Ie(),it(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,n.look,this.classes);for(let i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){let s=t.id.trim().split(","),n=t.styleClass.split(",");for(let i of s){let o=this.getState(i);if(!o){let c=i.trim();this.addState(c),o=this.getState(c)}o&&(o.styles=n.map(c=>{var y;return(y=c.replace(/;/g,""))==null?void 0:y.trim()}))}}setRootDoc(t){T.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,s,n){if(s.stmt===Et){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===J&&(s.id===C.START_NODE?(s.id=t.id+(n?"_start":"_end"),s.start=n):s.id=s.id.trim()),s.stmt!==q&&s.stmt!==J||!s.doc)return;let i=[],o=[];for(let c of s.doc)if(c.type===Ot){let y=ft(c);y.doc=ft(o),i.push(y),o=[]}else o.push(c);if(i.length>0&&o.length>0){let c={stmt:J,id:ee(),type:"divider",doc:ft(o)};i.push(ft(c)),s.doc=i}s.doc.forEach(c=>this.docTranslator(s,c,!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=tt,n=void 0,i=void 0,o=void 0,c=void 0,y=void 0,p=void 0){let _=t==null?void 0:t.trim();if(!this.currentDocument.states.has(_))T.info("Adding state ",_,i),this.currentDocument.states.set(_,{stmt:J,id:_,descriptions:[],type:s,doc:n,note:o,classes:[],styles:[],textStyles:[]});else{let m=this.currentDocument.states.get(_);if(!m)throw Error(`State not found: ${_}`);m.doc||(m.doc=n),m.type||(m.type=s)}if(i&&(T.info("Setting state description",_,i),(Array.isArray(i)?i:[i]).forEach(m=>this.addDescription(_,m.trim()))),o){let m=this.currentDocument.states.get(_);if(!m)throw Error(`State not found: ${_}`);m.note=o,m.note.text=U.sanitizeText(m.note.text,w())}c&&(T.info("Setting state classes",_,c),(Array.isArray(c)?c:[c]).forEach(m=>this.setCssClass(_,m.trim()))),y&&(T.info("Setting state styles",_,y),(Array.isArray(y)?y:[y]).forEach(m=>this.setStyle(_,m.trim()))),p&&(T.info("Setting state styles",_,y),(Array.isArray(p)?p:[p]).forEach(m=>this.setTextStyle(_,m.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Vt(),t||(this.links=new Map,ae())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){T.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,s,n){this.links.set(t,{url:s,tooltip:n}),T.warn("Adding link",t,s,n)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===C.START_NODE?(this.startEndCount++,`${C.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",s=tt){return t===C.START_NODE?C.START_TYPE:s}endIdIfNeeded(t=""){return t===C.END_NODE?(this.startEndCount++,`${C.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",s=tt){return t===C.END_NODE?C.END_TYPE:s}addRelationObjs(t,s,n=""){let i=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type),c=this.startIdIfNeeded(s.id.trim()),y=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(c,y,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:i,id2:c,relationTitle:U.sanitizeText(n,w())})}addRelation(t,s,n){if(typeof t=="object"&&typeof s=="object")this.addRelationObjs(t,s,n);else if(typeof t=="string"&&typeof s=="string"){let i=this.startIdIfNeeded(t.trim()),o=this.startTypeIfNeeded(t),c=this.endIdIfNeeded(s.trim()),y=this.endTypeIfNeeded(s);this.addState(i,o),this.addState(c,y),this.currentDocument.relations.push({id1:i,id2:c,relationTitle:n?U.sanitizeText(n,w()):void 0})}}addDescription(t,s){var o;let n=this.currentDocument.states.get(t),i=s.startsWith(":")?s.replace(":","").trim():s;(o=n==null?void 0:n.descriptions)==null||o.push(U.sanitizeText(i,w()))}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:[]});let n=this.classes.get(t);s&&n&&s.split(C.STYLECLASS_SEP).forEach(i=>{let o=i.replace(/([^;]*);/,"$1").trim();if(RegExp(C.COLOR_KEYWORD).exec(i)){let c=o.replace(C.FILL_KEYWORD,C.BG_FILL).replace(C.COLOR_KEYWORD,C.FILL_KEYWORD);n.textStyles.push(c)}n.styles.push(o)})}getClasses(){return this.classes}setCssClass(t,s){t.split(",").forEach(n=>{var o;let i=this.getState(n);if(!i){let c=n.trim();this.addState(c),i=this.getState(c)}(o=i==null?void 0:i.classes)==null||o.push(s)})}setStyle(t,s){var n,i;(i=(n=this.getState(t))==null?void 0:n.styles)==null||i.push(s)}setTextStyle(t,s){var n,i;(i=(n=this.getState(t))==null?void 0:n.textStyles)==null||i.push(s)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Nt)}getDirection(){var t;return((t=this.getDirectionStatement())==null?void 0:t.value)??pe}setDirection(t){let s=this.getDirectionStatement();s?s.value=t:this.rootDoc.unshift({stmt:Nt,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=w();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Ut(this.getRootDocV2())}}getConfig(){return w().state}},u(K,"StateDB"),K.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},K),Oe=u(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");export{Oe as i,ue as n,Ae as r,Ne as t};
import{u as e}from"./src-CvyFXpBy.js";import{n as m}from"./src-CsZby044.js";import{b as s}from"./chunk-ABZYJK2D-0jga8uiE.js";var a=m(t=>{var r;let{securityLevel:n}=s(),o=e("body");return n==="sandbox"&&(o=e((((r=e(`#i${t}`).node())==null?void 0:r.contentDocument)??document).body)),o.select(`#${t}`)},"selectSvgElement");export{a as t};
import{n as e}from"./src-CsZby044.js";var o=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{o as t};
var i,s,o;import{d as u,f as t,g as f,h as T,m as d,n as v,p as g,s as h,t as R}from"./chunk-FPAJGGOC-DOBSZjU2.js";var V=(i=class extends R{constructor(){super(["treemap"])}},t(i,"TreemapTokenBuilder"),i),C=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,S=(s=class extends v{runCustomConverter(r,e,n){if(r.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(r.name==="SEPARATOR"||r.name==="STRING2")return e.substring(1,e.length-1);if(r.name==="INDENTATION")return e.length;if(r.name==="ClassDef"){if(typeof e!="string")return e;let a=C.exec(e);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}},t(s,"TreemapValueConverter"),s);function m(l){let r=l.validation.TreemapValidator,e=l.validation.ValidationRegistry;if(e){let n={Treemap:r.checkSingleRoot.bind(r)};e.register(n,r)}}t(m,"registerValidationChecks");var k=(o=class{checkSingleRoot(r,e){let n;for(let a of r.TreemapRows)a.item&&(n===void 0&&a.indent===void 0?n=0:(a.indent===void 0||n!==void 0&&n>=parseInt(a.indent,10))&&e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},t(o,"TreemapValidator"),o),p={parser:{TokenBuilder:t(()=>new V,"TokenBuilder"),ValueConverter:t(()=>new S,"ValueConverter")},validation:{TreemapValidator:t(()=>new k,"TreemapValidator")}};function c(l=g){let r=d(f(l),h),e=d(T({shared:r}),u,p);return r.ServiceRegistry.register(e),m(e),{shared:r,Treemap:e}}t(c,"createTreemapServices");export{c as n,p as t};
import{n as f}from"./src-CsZby044.js";var i={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},b={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function x(e,l){if(e===void 0||l===void 0)return{angle:0,deltaX:0,deltaY:0};e=a(e),l=a(l);let[s,t]=[e.x,e.y],[n,y]=[l.x,l.y],h=n-s,c=y-t;return{angle:Math.atan(c/h),deltaX:h,deltaY:c}}f(x,"calculateDeltaAndAngle");var a=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),u=f(e=>({x:f(function(l,s,t){let n=0,y=a(t[0]).x<a(t[t.length-1]).x?"left":"right";if(s===0&&Object.hasOwn(i,e.arrowTypeStart)){let{angle:r,deltaX:w}=x(t[0],t[1]);n=i[e.arrowTypeStart]*Math.cos(r)*(w>=0?1:-1)}else if(s===t.length-1&&Object.hasOwn(i,e.arrowTypeEnd)){let{angle:r,deltaX:w}=x(t[t.length-1],t[t.length-2]);n=i[e.arrowTypeEnd]*Math.cos(r)*(w>=0?1:-1)}let h=Math.abs(a(l).x-a(t[t.length-1]).x),c=Math.abs(a(l).y-a(t[t.length-1]).y),g=Math.abs(a(l).x-a(t[0]).x),M=Math.abs(a(l).y-a(t[0]).y),p=i[e.arrowTypeStart],d=i[e.arrowTypeEnd];if(h<d&&h>0&&c<d){let r=d+1-h;r*=y==="right"?-1:1,n-=r}if(g<p&&g>0&&M<p){let r=p+1-g;r*=y==="right"?-1:1,n+=r}return a(l).x+n},"x"),y:f(function(l,s,t){let n=0,y=a(t[0]).y<a(t[t.length-1]).y?"down":"up";if(s===0&&Object.hasOwn(i,e.arrowTypeStart)){let{angle:r,deltaY:w}=x(t[0],t[1]);n=i[e.arrowTypeStart]*Math.abs(Math.sin(r))*(w>=0?1:-1)}else if(s===t.length-1&&Object.hasOwn(i,e.arrowTypeEnd)){let{angle:r,deltaY:w}=x(t[t.length-1],t[t.length-2]);n=i[e.arrowTypeEnd]*Math.abs(Math.sin(r))*(w>=0?1:-1)}let h=Math.abs(a(l).y-a(t[t.length-1]).y),c=Math.abs(a(l).x-a(t[t.length-1]).x),g=Math.abs(a(l).y-a(t[0]).y),M=Math.abs(a(l).x-a(t[0]).x),p=i[e.arrowTypeStart],d=i[e.arrowTypeEnd];if(h<d&&h>0&&c<d){let r=d+1-h;r*=y==="up"?-1:1,n-=r}if(g<p&&g>0&&M<p){let r=p+1-g;r*=y==="up"?-1:1,n+=r}return a(l).y+n},"y")}),"getLineFunctionsWithOffset");export{i as n,b as r,u as t};
var Ke=Object.defineProperty;var et=(t,e,n)=>e in t?Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var k=(t,e,n)=>et(t,typeof e!="symbol"?e+"":e,n);var ue;import{u as U}from"./src-CvyFXpBy.js";import{a as tt}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as x,r as I}from"./src-CsZby044.js";import{I as V,N as nt,O as de,s as rt,y as ke}from"./chunk-ABZYJK2D-0jga8uiE.js";var it=Object.freeze({left:0,top:0,width:16,height:16}),q=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xe=Object.freeze({...it,...q}),st=Object.freeze({...xe,body:"",hidden:!1}),lt=Object.freeze({width:null,height:null}),at=Object.freeze({...lt,...q}),ot=(t,e,n,i="")=>{let r=t.split(":");if(t.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;i=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){let s=r.pop(),c=r.pop(),o={provider:r.length>0?r[0]:i,prefix:c,name:s};return e&&!Y(o)?null:o}let l=r[0],a=l.split("-");if(a.length>1){let s={provider:i,prefix:a.shift(),name:a.join("-")};return e&&!Y(s)?null:s}if(n&&i===""){let s={provider:i,prefix:"",name:l};return e&&!Y(s,n)?null:s}return null},Y=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function ct(t,e){let n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);let i=((t.rotate||0)+(e.rotate||0))%4;return i&&(n.rotate=i),n}function be(t,e){let n=ct(t,e);for(let i in st)i in q?i in t&&!(i in n)&&(n[i]=q[i]):i in e?n[i]=e[i]:i in t&&(n[i]=t[i]);return n}function ht(t,e){let n=t.icons,i=t.aliases||Object.create(null),r=Object.create(null);function l(a){if(n[a])return r[a]=[];if(!(a in r)){r[a]=null;let s=i[a]&&i[a].parent,c=s&&l(s);c&&(r[a]=[s].concat(c))}return r[a]}return(e||Object.keys(n).concat(Object.keys(i))).forEach(l),r}function me(t,e,n){let i=t.icons,r=t.aliases||Object.create(null),l={};function a(s){l=be(i[s]||r[s],l)}return a(e),n.forEach(a),be(t,l)}function pt(t,e){if(t.icons[e])return me(t,e,[]);let n=ht(t,[e])[e];return n?me(t,e,n):null}var ut=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function we(t,e,n){if(e===1)return t;if(n||(n=100),typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;let i=t.split(ut);if(i===null||!i.length)return t;let r=[],l=i.shift(),a=gt.test(l);for(;;){if(a){let s=parseFloat(l);isNaN(s)?r.push(l):r.push(Math.ceil(s*e*n)/n)}else r.push(l);if(l=i.shift(),l===void 0)return r.join("");a=!a}}function ft(t,e="defs"){let n="",i=t.indexOf("<"+e);for(;i>=0;){let r=t.indexOf(">",i),l=t.indexOf("</"+e);if(r===-1||l===-1)break;let a=t.indexOf(">",l);if(a===-1)break;n+=t.slice(r+1,l).trim(),t=t.slice(0,i).trim()+t.slice(a+1)}return{defs:n,content:t}}function dt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function kt(t,e,n){let i=ft(t);return dt(i.defs,e+i.content+n)}var xt=t=>t==="unset"||t==="undefined"||t==="none";function bt(t,e){let n={...xe,...t},i={...at,...e},r={left:n.left,top:n.top,width:n.width,height:n.height},l=n.body;[n,i].forEach(m=>{let w=[],E=m.hFlip,_=m.vFlip,S=m.rotate;E?_?S+=2:(w.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),w.push("scale(-1 1)"),r.top=r.left=0):_&&(w.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),w.push("scale(1 -1)"),r.top=r.left=0);let $;switch(S<0&&(S-=Math.floor(S/4)*4),S%=4,S){case 1:$=r.height/2+r.top,w.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:w.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:$=r.width/2+r.left,w.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}S%2==1&&(r.left!==r.top&&($=r.left,r.left=r.top,r.top=$),r.width!==r.height&&($=r.width,r.width=r.height,r.height=$)),w.length&&(l=kt(l,'<g transform="'+w.join(" ")+'">',"</g>"))});let a=i.width,s=i.height,c=r.width,o=r.height,h,u;a===null?(u=s===null?"1em":s==="auto"?o:s,h=we(u,c/o)):(h=a==="auto"?c:a,u=s===null?we(h,o/c):s==="auto"?o:s);let p={},b=(m,w)=>{xt(w)||(p[m]=w.toString())};b("width",h),b("height",u);let d=[r.left,r.top,c,o];return p.viewBox=d.join(" "),{attributes:p,viewBox:d,body:l}}var mt=/\sid="(\S+)"/g,wt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),yt=0;function $t(t,e=wt){let n=[],i;for(;i=mt.exec(t);)n.push(i[1]);if(!n.length)return t;let r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(l=>{let a=typeof e=="function"?e(l):e+(yt++).toString(),s=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+r+"$3")}),t=t.replace(new RegExp(r,"g"),""),t}function St(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let i in e)n+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function J(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A=J();function ye(t){A=t}var B={exec:()=>null};function g(t,e=""){let n=typeof t=="string"?t:t.source,i={replace:(r,l)=>{let a=typeof l=="string"?l:l.source;return a=a.replace(y.caret,"$1"),n=n.replace(r,a),i},getRegex:()=>new RegExp(n,e)};return i}var y={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Rt=/^(?:[ \t]*(?:\n|$))+/,Tt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,At=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,K=/(?:[*+-]|\d{1,9}[.)])/,$e=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Se=g($e).replace(/bull/g,K).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),vt=g($e).replace(/bull/g,K).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ee=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,It=/^[^\n]+/,te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Et=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_t=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,K).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ne=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pt=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ne).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Re=g(ee).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),re={blockquote:g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Re).getRegex(),code:Tt,def:Et,fences:zt,heading:At,hr:L,html:Pt,lheading:Se,list:_t,newline:Rt,paragraph:Re,table:B,text:It},Te=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Bt={...re,lheading:vt,table:Te,paragraph:g(ee).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Te).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()},Lt={...re,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ne).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:B,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(ee).replace("hr",L).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Se).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ct=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ze=/^( {2,}|\\)\n(?!\s*$)/,qt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,M=/[\p{P}\p{S}]/u,ie=/[\s\p{P}\p{S}]/u,Ae=/[^\s\p{P}\p{S}]/u,Ot=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ie).getRegex(),ve=/(?!~)[\p{P}\p{S}]/u,Mt=/(?!~)[\s\p{P}\p{S}]/u,Zt=/(?:[^\s\p{P}\p{S}]|~)/u,Ft=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Ie=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Dt=g(Ie,"u").replace(/punct/g,M).getRegex(),Nt=g(Ie,"u").replace(/punct/g,ve).getRegex(),Ee="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Wt=g(Ee,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ie).replace(/punct/g,M).getRegex(),Qt=g(Ee,"gu").replace(/notPunctSpace/g,Zt).replace(/punctSpace/g,Mt).replace(/punct/g,ve).getRegex(),Ht=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ie).replace(/punct/g,M).getRegex(),Gt=g(/\\(punct)/,"gu").replace(/punct/g,M).getRegex(),Xt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ut=g(ne).replace("(?:-->|$)","-->").getRegex(),Vt=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ut).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Yt=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_e=g(/^!?\[(label)\]\[(ref)\]/).replace("label",Z).replace("ref",te).getRegex(),Pe=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",te).getRegex(),se={_backpedal:B,anyPunctuation:Gt,autolink:Xt,blockSkip:Ft,br:ze,code:jt,del:B,emStrongLDelim:Dt,emStrongRDelimAst:Wt,emStrongRDelimUnd:Ht,escape:Ct,link:Yt,nolink:Pe,punctuation:Ot,reflink:_e,reflinkSearch:g("reflink|nolink(?!\\()","g").replace("reflink",_e).replace("nolink",Pe).getRegex(),tag:Vt,text:qt,url:B},Jt={...se,link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",Z).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z).getRegex()},le={...se,emStrongRDelimAst:Qt,emStrongLDelim:Nt,url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Kt={...le,br:g(ze).replace("{2,}","*").getRegex(),text:g(le.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},F={normal:re,gfm:Bt,pedantic:Lt},C={normal:se,gfm:le,breaks:Kt,pedantic:Jt},en={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Be=t=>en[t];function R(t,e){if(e){if(y.escapeTest.test(t))return t.replace(y.escapeReplace,Be)}else if(y.escapeTestNoEncode.test(t))return t.replace(y.escapeReplaceNoEncode,Be);return t}function Le(t){try{t=encodeURI(t).replace(y.percentDecode,"%")}catch{return null}return t}function Ce(t,e){var r;let n=t.replace(y.findPipe,(l,a,s)=>{let c=!1,o=a;for(;--o>=0&&s[o]==="\\";)c=!c;return c?"|":" |"}).split(y.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((r=n.at(-1))!=null&&r.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(y.slashPipe,"|");return n}function j(t,e,n){let i=t.length;if(i===0)return"";let r=0;for(;r<i;){let l=t.charAt(i-r-1);if(l===e&&!n)r++;else if(l!==e&&n)r++;else break}return t.slice(0,i-r)}function tn(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])n++;else if(t[i]===e[1]&&(n--,n<0))return i;return n>0?-2:-1}function je(t,e,n,i,r){let l=e.href,a=e.title||null,s=t[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function nn(t,e,n){let i=t.match(n.other.indentCodeCompensation);if(i===null)return e;let r=i[1];return e.split(`
`).map(l=>{let a=l.match(n.other.beginningSpace);if(a===null)return l;let[s]=a;return s.length>=r.length?l.slice(r.length):l}).join(`
`)}var D=class{constructor(t){k(this,"options");k(this,"rules");k(this,"lexer");this.options=t||A}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:j(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],i=nn(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let i=j(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:j(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=j(e[0],`
`).split(`
`),i="",r="",l=[];for(;n.length>0;){let a=!1,s=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))s.push(n[c]),a=!0;else if(!a)s.push(n[c]);else break;n=n.slice(c);let o=s.join(`
`),h=o.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
${o}`:o,r=r?`${r}
${h}`:h;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=u,n.length===0)break;let p=l.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let b=p,d=b.raw+`
`+n.join(`
`),m=this.blockquote(d);l[l.length-1]=m,i=i.substring(0,i.length-b.raw.length)+m.raw,r=r.substring(0,r.length-b.text.length)+m.text;break}else if((p==null?void 0:p.type)==="list"){let b=p,d=b.raw+`
`+n.join(`
`),m=this.list(d);l[l.length-1]=m,i=i.substring(0,i.length-p.raw.length)+m.raw,r=r.substring(0,r.length-b.raw.length)+m.raw,n=d.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:i,tokens:l,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let l=this.rules.other.listItemRegex(n),a=!1;for(;t;){let c=!1,o="",h="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;o=e[0],t=t.substring(o.length);let u=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,E=>" ".repeat(3*E.length)),p=t.split(`
`,1)[0],b=!u.trim(),d=0;if(this.options.pedantic?(d=2,h=u.trimStart()):b?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,h=u.slice(d),d+=e[1].length),b&&this.rules.other.blankLine.test(p)&&(o+=p+`
`,t=t.substring(p.length+1),c=!0),!c){let E=this.rules.other.nextBulletRegex(d),_=this.rules.other.hrRegex(d),S=this.rules.other.fencesBeginRegex(d),$=this.rules.other.headingBeginRegex(d),Je=this.rules.other.htmlBeginRegex(d);for(;t;){let X=t.split(`
`,1)[0],P;if(p=X,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),P=p):P=p.replace(this.rules.other.tabCharGlobal," "),S.test(p)||$.test(p)||Je.test(p)||E.test(p)||_.test(p))break;if(P.search(this.rules.other.nonSpaceChar)>=d||!p.trim())h+=`
`+P.slice(d);else{if(b||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(u)||$.test(u)||_.test(u))break;h+=`
`+p}!b&&!p.trim()&&(b=!0),o+=X+`
`,t=t.substring(X.length+1),u=P.slice(d)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(a=!0));let m=null,w;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(w=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:o,task:!!m,checked:w,loose:!1,text:h,tokens:[]}),r.raw+=o}let s=r.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){let o=r.items[c].tokens.filter(h=>h.type==="space");r.loose=o.length>0&&o.some(h=>this.rules.other.anyLine.test(h.raw))}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){var a;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Ce(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let s of i)this.rules.other.tableAlignRight.test(s)?l.align.push("right"):this.rules.other.tableAlignCenter.test(s)?l.align.push("center"):this.rules.other.tableAlignLeft.test(s)?l.align.push("left"):l.align.push(null);for(let s=0;s<n.length;s++)l.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:l.align[s]});for(let s of r)l.rows.push(Ce(s,l.header.length).map((c,o)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:l.align[o]})));return l}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=j(n.slice(0,-1),"\\");if((n.length-l.length)%2==0)return}else{let l=tn(e[2],"()");if(l===-2)return;if(l>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(i);l&&(i=l[1],r=l[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i.slice(1):i.slice(1,-1)),je(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!i){let r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return je(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let r=[...i[0]].length-1,l,a,s=r,c=0,o=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*t.length+r);(i=o.exec(e))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(a=[...l].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&r%3&&!((r+a)%3)){c+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+c);let h=[...i[0]][0].length,u=t.slice(0,r+i.index+h+a);if(Math.min(r,a)%2){let b=u.slice(1,-1);return{type:"em",raw:u,text:b,tokens:this.lexer.inlineTokens(b)}}let p=u.slice(2,-2);return{type:"strong",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=e[1],i="mailto:"+n):(n=e[1],i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let i,r;if(e[2]==="@")i=e[0],r="mailto:"+i;else{let l;do l=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(l!==e[0]);i=e[0],r=e[1]==="www."?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},T=class ge{constructor(e){k(this,"tokens");k(this,"options");k(this,"state");k(this,"tokenizer");k(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||A,this.options.tokenizer=this.options.tokenizer||new D,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:y,block:F.normal,inline:C.normal};this.options.pedantic?(n.block=F.pedantic,n.inline=C.pedantic):this.options.gfm&&(n.block=F.gfm,this.options.breaks?n.inline=C.breaks:n.inline=C.gfm),this.tokenizer.rules=n}static get rules(){return{block:F,inline:C}}static lex(e,n){return new ge(n).lex(e)}static lexInline(e,n){return new ge(n).inlineTokens(e)}lex(e){e=e.replace(y.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],i=!1){var r,l,a;for(this.options.pedantic&&(e=e.replace(y.tabCharGlobal," ").replace(y.spaceLine,""));e;){let s;if((l=(r=this.options.extensions)==null?void 0:r.block)!=null&&l.some(o=>(s=o.call({lexer:this},e,n))?(e=e.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let o=n.at(-1);s.raw.length===1&&o!==void 0?o.raw+=`
`:n.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let o=n.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+s.raw,o.text+=`
`+s.text,this.inlineQueue.at(-1).src=o.text):n.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let o=n.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+s.raw,o.text+=`
`+s.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),n.push(s);continue}let c=e;if((a=this.options.extensions)!=null&&a.startBlock){let o=1/0,h=e.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},h),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(c=e.substring(0,o+1))}if(this.state.top&&(s=this.tokenizer.paragraph(c))){let o=n.at(-1);i&&(o==null?void 0:o.type)==="paragraph"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+s.raw,o.text+=`
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(s),i=c.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let o=n.at(-1);(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+s.raw,o.text+=`
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(s);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw Error(o)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var s,c,o;let i=e,r=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,a="";for(;e;){l||(a=""),l=!1;let h;if((c=(s=this.options.extensions)==null?void 0:s.inline)!=null&&c.some(p=>(h=p.call({lexer:this},e,n))?(e=e.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let p=n.at(-1);h.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(e,i,a)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),n.push(h);continue}let u=e;if((o=this.options.extensions)!=null&&o.startInline){let p=1/0,b=e.slice(1),d;this.options.extensions.startInline.forEach(m=>{d=m.call({lexer:this},b),typeof d=="number"&&d>=0&&(p=Math.min(p,d))}),p<1/0&&p>=0&&(u=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(u)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(a=h.raw.slice(-1)),l=!0;let p=n.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):n.push(h);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw Error(p)}}return n}},N=class{constructor(t){k(this,"options");k(this,"parser");this.options=t||A}space(t){return""}code({text:t,lang:e,escaped:n}){var l;let i=(l=(e||"").match(y.notSpaceStart))==null?void 0:l[0],r=t.replace(y.endingNewline,"")+`
`;return i?'<pre><code class="language-'+R(i)+'">'+(n?r:R(r,!0))+`</code></pre>
`:"<pre><code>"+(n?r:R(r,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,n=t.start,i="";for(let a=0;a<t.items.length;a++){let s=t.items[a];i+=this.listitem(s)}let r=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+r+l+`>
`+i+"</"+r+`>
`}listitem(t){var n;let e="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?((n=t.tokens[0])==null?void 0:n.type)==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+R(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let i="";for(let r=0;r<t.rows.length;r++){let l=t.rows[r];n="";for(let a=0;a<l.length;a++)n+=this.tablecell(l[a]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+i+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${R(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let i=this.parser.parseInline(n),r=Le(t);if(r===null)return i;t=r;let l='<a href="'+t+'"';return e&&(l+=' title="'+R(e)+'"'),l+=">"+i+"</a>",l}image({href:t,title:e,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let r=Le(t);if(r===null)return R(n);t=r;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${R(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:R(t.text)}},ae=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},z=class fe{constructor(e){k(this,"options");k(this,"renderer");k(this,"textRenderer");this.options=e||A,this.options.renderer=this.options.renderer||new N,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ae}static parse(e,n){return new fe(n).parse(e)}static parseInline(e,n){return new fe(n).parseInline(e)}parse(e,n=!0){var r,l;let i="";for(let a=0;a<e.length;a++){let s=e[a];if((l=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&l[s.type]){let o=s,h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=h||"";continue}}let c=s;switch(c.type){case"space":i+=this.renderer.space(c);continue;case"hr":i+=this.renderer.hr(c);continue;case"heading":i+=this.renderer.heading(c);continue;case"code":i+=this.renderer.code(c);continue;case"table":i+=this.renderer.table(c);continue;case"blockquote":i+=this.renderer.blockquote(c);continue;case"list":i+=this.renderer.list(c);continue;case"html":i+=this.renderer.html(c);continue;case"def":i+=this.renderer.def(c);continue;case"paragraph":i+=this.renderer.paragraph(c);continue;case"text":{let o=c,h=this.renderer.text(o);for(;a+1<e.length&&e[a+1].type==="text";)o=e[++a],h+=`
`+this.renderer.text(o);n?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let o='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw Error(o)}}}return i}parseInline(e,n=this.renderer){var r,l;let i="";for(let a=0;a<e.length;a++){let s=e[a];if((l=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&l[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=o||"";continue}}let c=s;switch(c.type){case"escape":i+=n.text(c);break;case"html":i+=n.html(c);break;case"link":i+=n.link(c);break;case"image":i+=n.image(c);break;case"strong":i+=n.strong(c);break;case"em":i+=n.em(c);break;case"codespan":i+=n.codespan(c);break;case"br":i+=n.br(c);break;case"del":i+=n.del(c);break;case"text":i+=n.text(c);break;default:{let o='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw Error(o)}}}return i}},W=(ue=class{constructor(t){k(this,"options");k(this,"block");this.options=t||A}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?T.lex:T.lexInline}provideParser(){return this.block?z.parse:z.parseInline}},k(ue,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),ue),v=new class{constructor(...t){k(this,"defaults",J());k(this,"options",this.setOptions);k(this,"parse",this.parseMarkdown(!0));k(this,"parseInline",this.parseMarkdown(!1));k(this,"Parser",z);k(this,"Renderer",N);k(this,"TextRenderer",ae);k(this,"Lexer",T);k(this,"Tokenizer",D);k(this,"Hooks",W);this.use(...t)}walkTokens(t,e){var i,r;let n=[];for(let l of t)switch(n=n.concat(e.call(this,l)),l.type){case"table":{let a=l;for(let s of a.header)n=n.concat(this.walkTokens(s.tokens,e));for(let s of a.rows)for(let c of s)n=n.concat(this.walkTokens(c.tokens,e));break}case"list":{let a=l;n=n.concat(this.walkTokens(a.items,e));break}default:{let a=l;(r=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&r[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let c=a[s].flat(1/0);n=n.concat(this.walkTokens(c,e))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw Error("extension name required");if("renderer"in r){let l=e.renderers[r.name];l?e.renderers[r.name]=function(...a){let s=r.renderer.apply(this,a);return s===!1&&(s=l.apply(this,a)),s}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let l=e[r.level];l?l.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),n.renderer){let r=this.defaults.renderer||new N(this.defaults);for(let l in n.renderer){if(!(l in r))throw Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let a=l,s=n.renderer[a],c=r[a];r[a]=(...o)=>{let h=s.apply(r,o);return h===!1&&(h=c.apply(r,o)),h||""}}i.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new D(this.defaults);for(let l in n.tokenizer){if(!(l in r))throw Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let a=l,s=n.tokenizer[a],c=r[a];r[a]=(...o)=>{let h=s.apply(r,o);return h===!1&&(h=c.apply(r,o)),h}}i.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new W;for(let l in n.hooks){if(!(l in r))throw Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let a=l,s=n.hooks[a],c=r[a];W.passThroughHooks.has(l)?r[a]=o=>{if(this.defaults.async)return Promise.resolve(s.call(r,o)).then(u=>c.call(r,u));let h=s.call(r,o);return c.call(r,h)}:r[a]=(...o)=>{let h=s.apply(r,o);return h===!1&&(h=c.apply(r,o)),h}}i.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,l=n.walkTokens;i.walkTokens=function(a){let s=[];return s.push(l.call(this,a)),r&&(s=s.concat(r.call(this,a))),s}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return T.lex(t,e??this.defaults)}parser(t,e){return z.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let i={...n},r={...this.defaults,...i},l=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.async===!1)return l(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=t);let a=r.hooks?r.hooks.provideLexer():t?T.lex:T.lexInline,s=r.hooks?r.hooks.provideParser():t?z.parse:z.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(e):e).then(c=>a(c,r)).then(c=>r.hooks?r.hooks.processAllTokens(c):c).then(c=>r.walkTokens?Promise.all(this.walkTokens(c,r.walkTokens)).then(()=>c):c).then(c=>s(c,r)).then(c=>r.hooks?r.hooks.postprocess(c):c).catch(l);try{r.hooks&&(e=r.hooks.preprocess(e));let c=a(e,r);r.hooks&&(c=r.hooks.processAllTokens(c)),r.walkTokens&&this.walkTokens(c,r.walkTokens);let o=s(c,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(c){return l(c)}}}onError(t,e){return n=>{if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+R(n.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}}};function f(t,e){return v.parse(t,e)}f.options=f.setOptions=function(t){return v.setOptions(t),f.defaults=v.defaults,ye(f.defaults),f},f.getDefaults=J,f.defaults=A,f.use=function(...t){return v.use(...t),f.defaults=v.defaults,ye(f.defaults),f},f.walkTokens=function(t,e){return v.walkTokens(t,e)},f.parseInline=v.parseInline,f.Parser=z,f.parser=z.parse,f.Renderer=N,f.TextRenderer=ae,f.Lexer=T,f.lexer=T.lex,f.Tokenizer=D,f.Hooks=W,f.parse=f,f.options,f.setOptions,f.use,f.walkTokens,f.parseInline,z.parse,T.lex;function qe(t){var e=[...arguments].slice(1),n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(a,s){var c=s.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(o){var h;return((h=o.match(/[\t ]/g))==null?void 0:h.length)??0})):a},[]);if(i.length){var r=RegExp(`
[ ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(a){return a.replace(r,`
`)})}n[0]=n[0].replace(/^\r?\n/,"");var l=n[0];return e.forEach(function(a,s){var c=l.match(/(?:^|\n)( *)$/),o=c?c[1]:"",h=a;typeof a=="string"&&a.includes(`
`)&&(h=String(a).split(`
`).map(function(u,p){return p===0?u:""+o+u}).join(`
`)),l+=h+n[s+1]}),l}var Oe={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},oe=new Map,Me=new Map,rn=x(t=>{for(let e of t){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(I.debug("Registering icon pack:",e.name),"loader"in e)Me.set(e.name,e.loader);else if("icons"in e)oe.set(e.name,e.icons);else throw I.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Ze=x(async(t,e)=>{let n=ot(t,!0,e!==void 0);if(!n)throw Error(`Invalid icon name: ${t}`);let i=n.prefix||e;if(!i)throw Error(`Icon name must contain a prefix: ${t}`);let r=oe.get(i);if(!r){let a=Me.get(i);if(!a)throw Error(`Icon set not found: ${n.prefix}`);try{r={...await a(),prefix:i},oe.set(i,r)}catch(s){throw I.error(s),Error(`Failed to load icon set: ${n.prefix}`)}}let l=pt(r,n.name);if(!l)throw Error(`Icon not found: ${t}`);return l},"getRegisteredIconData"),sn=x(async t=>{try{return await Ze(t),!0}catch{return!1}},"isIconAvailable"),Fe=x(async(t,e,n)=>{let i;try{i=await Ze(t,e==null?void 0:e.fallbackPrefix)}catch(l){I.error(l),i=Oe}let r=bt(i,e);return V(St($t(r.body),{...r.attributes,...n}),ke())},"getIconSVG");function De(t,{markdownAutoWrap:e}){let n=qe(t.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`));return e===!1?n.replace(/ /g,"&nbsp;"):n}x(De,"preprocessMarkdown");function Ne(t,e={}){let n=De(t,e),i=f.lexer(n),r=[[]],l=0;function a(s,c="normal"){s.type==="text"?s.text.split(`
`).forEach((o,h)=>{h!==0&&(l++,r.push([])),o.split(" ").forEach(u=>{u=u.replace(/&#39;/g,"'"),u&&r[l].push({content:u,type:c})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(o=>{a(o,s.type)}):s.type==="html"&&r[l].push({content:s.text,type:"normal"})}return x(a,"processNode"),i.forEach(s=>{var c;s.type==="paragraph"?(c=s.tokens)==null||c.forEach(o=>{a(o)}):s.type==="html"?r[l].push({content:s.text,type:"normal"}):r[l].push({content:s.raw,type:"normal"})}),r}x(Ne,"markdownToLines");function We(t,{markdownAutoWrap:e}={}){let n=f.lexer(t);function i(r){var l,a,s;return r.type==="text"?e===!1?r.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):r.text.replace(/\n */g,"<br/>"):r.type==="strong"?`<strong>${(l=r.tokens)==null?void 0:l.map(i).join("")}</strong>`:r.type==="em"?`<em>${(a=r.tokens)==null?void 0:a.map(i).join("")}</em>`:r.type==="paragraph"?`<p>${(s=r.tokens)==null?void 0:s.map(i).join("")}</p>`:r.type==="space"?"":r.type==="html"?`${r.text}`:r.type==="escape"?r.text:(I.warn(`Unsupported markdown: ${r.type}`),r.raw)}return x(i,"output"),n.map(i).join("")}x(We,"markdownToHTML");function Qe(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}x(Qe,"splitTextToChars");function He(t,e){return ce(t,[],Qe(e.content),e.type)}x(He,"splitWordToFitWidth");function ce(t,e,n,i){if(n.length===0)return[{content:e.join(""),type:i},{content:"",type:i}];let[r,...l]=n,a=[...e,r];return t([{content:a.join(""),type:i}])?ce(t,a,l,i):(e.length===0&&r&&(e.push(r),n.shift()),[{content:e.join(""),type:i},{content:n.join(""),type:i}])}x(ce,"splitWordToFitWidthRecursion");function Ge(t,e){if(t.some(({content:n})=>n.includes(`
`)))throw Error("splitLineToFitWidth does not support newlines in the line");return Q(t,e)}x(Ge,"splitLineToFitWidth");function Q(t,e,n=[],i=[]){if(t.length===0)return i.length>0&&n.push(i),n.length>0?n:[];let r="";t[0].content===" "&&(r=" ",t.shift());let l=t.shift()??{content:" ",type:"normal"},a=[...i];if(r!==""&&a.push({content:r,type:"normal"}),a.push(l),e(a))return Q(t,e,n,a);if(i.length>0)n.push(i),t.unshift(l);else if(l.content){let[s,c]=He(e,l);n.push([s]),c.content&&t.unshift(c)}return Q(t,e,n)}x(Q,"splitLineToFitWidthRecursion");function he(t,e){e&&t.attr("style",e)}x(he,"applyStyle");async function Xe(t,e,n,i,r=!1,l=ke()){let a=t.append("foreignObject");a.attr("width",`${10*n}px`),a.attr("height",`${10*n}px`);let s=a.append("xhtml:div"),c=de(e.label)?await nt(e.label.replace(rt.lineBreakRegex,`
`),l):V(e.label,l),o=e.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(c),he(h,e.labelStyle),h.attr("class",`${o} ${i}`),he(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",n+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),r&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===n&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",n+"px"),u=s.node().getBoundingClientRect()),a.node()}x(Xe,"addHtmlSpan");function H(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}x(H,"createTspan");function Ue(t,e,n){let i=t.append("text"),r=H(i,1,e);G(r,n);let l=r.node().getComputedTextLength();return i.remove(),l}x(Ue,"computeWidthOfText");function Ve(t,e,n){var a;let i=t.append("text"),r=H(i,1,e);G(r,[{content:n,type:"normal"}]);let l=(a=r.node())==null?void 0:a.getBoundingClientRect();return l&&i.remove(),l}x(Ve,"computeDimensionOfText");function Ye(t,e,n,i=!1){let r=1.1,l=e.append("g"),a=l.insert("rect").attr("class","background").attr("style","stroke: none"),s=l.append("text").attr("y","-10.1"),c=0;for(let o of n){let h=x(p=>Ue(l,r,p)<=t,"checkWidth"),u=h(o)?[o]:Ge(o,h);for(let p of u)G(H(s,c,r),p),c++}if(i){let o=s.node().getBBox();return a.attr("x",o.x-2).attr("y",o.y-2).attr("width",o.width+4).attr("height",o.height+4),l.node()}else return s.node()}x(Ye,"createFormattedText");function G(t,e){t.text(""),e.forEach((n,i)=>{let r=t.append("tspan").attr("font-style",n.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",n.type==="strong"?"bold":"normal");i===0?r.text(n.content):r.text(" "+n.content)})}x(G,"updateTextContentAndStyles");async function pe(t,e={}){let n=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(r,l,a)=>(n.push((async()=>{let s=`${l}:${a}`;return await sn(s)?await Fe(s,void 0,{class:"label-icon"}):`<i class='${V(r,e).replace(":"," ")}'></i>`})()),r));let i=await Promise.all(n);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}x(pe,"replaceIconSubstring");var ln=x(async(t,e="",{style:n="",isTitle:i=!1,classes:r="",useHtmlLabels:l=!0,isNode:a=!0,width:s=200,addSvgBackground:c=!1}={},o)=>{if(I.debug("XYZ createText",e,n,i,r,l,a,"addSvgBackground: ",c),l){let h=await pe(tt(We(e,o)),o),u=e.replace(/\\\\/g,"\\");return await Xe(t,{isNode:a,label:de(e)?u:h,labelStyle:n.replace("fill:","color:")},s,r,c,o)}else{let h=Ye(s,t,Ne(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),o),e?c:!1);if(a){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));let u=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");U(h).attr("style",u)}else{let u=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");U(h).select("rect").attr("style",u.replace(/background:/g,"fill:"));let p=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");U(h).select("text").attr("style",p)}return h}},"createText");export{pe as a,rn as i,ln as n,Oe as o,Fe as r,qe as s,Ve as t};

Sorry, the diff of this file is too big to display

var e;import{f as r,g as c,h as u,i as f,m as n,o as l,p as d,s as h,t as p}from"./chunk-FPAJGGOC-DOBSZjU2.js";var v=(e=class extends p{constructor(){super(["info","showInfo"])}},r(e,"InfoTokenBuilder"),e),o={parser:{TokenBuilder:r(()=>new v,"TokenBuilder"),ValueConverter:r(()=>new f,"ValueConverter")}};function t(i=d){let s=n(c(i),h),a=n(u({shared:s}),l,o);return s.ServiceRegistry.register(a),{shared:s,Info:a}}r(t,"createInfoServices");export{t as n,o as t};
var e;import{f as r,g as d,h as u,i as c,m as t,p as l,s as p,t as v,u as h}from"./chunk-FPAJGGOC-DOBSZjU2.js";var R=(e=class extends v{constructor(){super(["radar-beta"])}},r(e,"RadarTokenBuilder"),e),n={parser:{TokenBuilder:r(()=>new R,"TokenBuilder"),ValueConverter:r(()=>new c,"ValueConverter")}};function i(o=l){let a=t(d(o),p),s=t(u({shared:a}),h,n);return a.ServiceRegistry.register(s),{shared:a,Radar:s}}r(i,"createRadarServices");export{i as n,n as t};
import{n as c}from"./src-CsZby044.js";function nt(t){return t==null}c(nt,"isNothing");function Ct(t){return typeof t=="object"&&!!t}c(Ct,"isObject");function St(t){return Array.isArray(t)?t:nt(t)?[]:[t]}c(St,"toArray");function Ot(t,n){var i,o,r,a;if(n)for(a=Object.keys(n),i=0,o=a.length;i<o;i+=1)r=a[i],t[r]=n[r];return t}c(Ot,"extend");function It(t,n){var i="",o;for(o=0;o<n;o+=1)i+=t;return i}c(It,"repeat");function jt(t){return t===0&&1/t==-1/0}c(jt,"isNegativeZero");var k={isNothing:nt,isObject:Ct,toArray:St,repeat:It,isNegativeZero:jt,extend:Ot};function it(t,n){var i="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(i+=`
`+t.mark.snippet),o+" "+i):o}c(it,"formatError");function Y(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=it(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||""}c(Y,"YAMLException$1"),Y.prototype=Object.create(Error.prototype),Y.prototype.constructor=Y,Y.prototype.toString=c(function(t){return this.name+": "+it(this,t)},"toString");var S=Y;function K(t,n,i,o,r){var a="",e="",l=Math.floor(r/2)-1;return o-n>l&&(a=" ... ",n=o-l+a.length),i-o>l&&(e=" ...",i=o+l-e.length),{str:a+t.slice(n,i).replace(/\t/g,"\u2192")+e,pos:o-n+a.length}}c(K,"getLine");function H(t,n){return k.repeat(" ",n-t.length)+t}c(H,"padStart");function Tt(t,n){if(n=Object.create(n||null),!t.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,o=[0],r=[],a,e=-1;a=i.exec(t.buffer);)r.push(a.index),o.push(a.index+a[0].length),t.position<=a.index&&e<0&&(e=o.length-2);e<0&&(e=o.length-1);var l="",s,u,d=Math.min(t.line+n.linesAfter,r.length).toString().length,p=n.maxLength-(n.indent+d+3);for(s=1;s<=n.linesBefore&&!(e-s<0);s++)u=K(t.buffer,o[e-s],r[e-s],t.position-(o[e]-o[e-s]),p),l=k.repeat(" ",n.indent)+H((t.line-s+1).toString(),d)+" | "+u.str+`
`+l;for(u=K(t.buffer,o[e],r[e],t.position,p),l+=k.repeat(" ",n.indent)+H((t.line+1).toString(),d)+" | "+u.str+`
`,l+=k.repeat("-",n.indent+d+3+u.pos)+`^
`,s=1;s<=n.linesAfter&&!(e+s>=r.length);s++)u=K(t.buffer,o[e+s],r[e+s],t.position-(o[e]-o[e+s]),p),l+=k.repeat(" ",n.indent)+H((t.line+s+1).toString(),d)+" | "+u.str+`
`;return l.replace(/\n$/,"")}c(Tt,"makeSnippet");var pi=Tt,fi=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],di=["scalar","sequence","mapping"];function Ft(t){var n={};return t!==null&&Object.keys(t).forEach(function(i){t[i].forEach(function(o){n[String(o)]=i})}),n}c(Ft,"compileStyleAliases");function Mt(t,n){if(n||(n={}),Object.keys(n).forEach(function(i){if(fi.indexOf(i)===-1)throw new S('Unknown option "'+i+'" is met in definition of "'+t+'" YAML type.')}),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Ft(n.styleAliases||null),di.indexOf(this.kind)===-1)throw new S('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}c(Mt,"Type$1");var w=Mt;function rt(t,n){var i=[];return t[n].forEach(function(o){var r=i.length;i.forEach(function(a,e){a.tag===o.tag&&a.kind===o.kind&&a.multi===o.multi&&(r=e)}),i[r]=o}),i}c(rt,"compileList");function Lt(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function o(r){r.multi?(t.multi[r.kind].push(r),t.multi.fallback.push(r)):t[r.kind][r.tag]=t.fallback[r.tag]=r}for(c(o,"collectType"),n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(o);return t}c(Lt,"compileMap");function Z(t){return this.extend(t)}c(Z,"Schema$1"),Z.prototype.extend=c(function(t){var n=[],i=[];if(t instanceof w)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new S("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(r){if(!(r instanceof w))throw new S("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&r.loadKind!=="scalar")throw new S("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new S("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(r){if(!(r instanceof w))throw new S("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(Z.prototype);return o.implicit=(this.implicit||[]).concat(n),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=rt(o,"implicit"),o.compiledExplicit=rt(o,"explicit"),o.compiledTypeMap=Lt(o.compiledImplicit,o.compiledExplicit),o},"extend");var hi=new Z({explicit:[new w("tag:yaml.org,2002:str",{kind:"scalar",construct:c(function(t){return t===null?"":t},"construct")}),new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:c(function(t){return t===null?[]:t},"construct")}),new w("tag:yaml.org,2002:map",{kind:"mapping",construct:c(function(t){return t===null?{}:t},"construct")})]});function Nt(t){if(t===null)return!0;var n=t.length;return n===1&&t==="~"||n===4&&(t==="null"||t==="Null"||t==="NULL")}c(Nt,"resolveYamlNull");function Et(){return null}c(Et,"constructYamlNull");function _t(t){return t===null}c(_t,"isNull");var mi=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:Nt,construct:Et,predicate:_t,represent:{canonical:c(function(){return"~"},"canonical"),lowercase:c(function(){return"null"},"lowercase"),uppercase:c(function(){return"NULL"},"uppercase"),camelcase:c(function(){return"Null"},"camelcase"),empty:c(function(){return""},"empty")},defaultStyle:"lowercase"});function Yt(t){if(t===null)return!1;var n=t.length;return n===4&&(t==="true"||t==="True"||t==="TRUE")||n===5&&(t==="false"||t==="False"||t==="FALSE")}c(Yt,"resolveYamlBoolean");function Dt(t){return t==="true"||t==="True"||t==="TRUE"}c(Dt,"constructYamlBoolean");function qt(t){return Object.prototype.toString.call(t)==="[object Boolean]"}c(qt,"isBoolean");var gi=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Yt,construct:Dt,predicate:qt,represent:{lowercase:c(function(t){return t?"true":"false"},"lowercase"),uppercase:c(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:c(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Bt(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}c(Bt,"isHexCode");function Ut(t){return 48<=t&&t<=55}c(Ut,"isOctCode");function Pt(t){return 48<=t&&t<=57}c(Pt,"isDecCode");function Rt(t){if(t===null)return!1;var n=t.length,i=0,o=!1,r;if(!n)return!1;if(r=t[i],(r==="-"||r==="+")&&(r=t[++i]),r==="0"){if(i+1===n)return!0;if(r=t[++i],r==="b"){for(i++;i<n;i++)if(r=t[i],r!=="_"){if(r!=="0"&&r!=="1")return!1;o=!0}return o&&r!=="_"}if(r==="x"){for(i++;i<n;i++)if(r=t[i],r!=="_"){if(!Bt(t.charCodeAt(i)))return!1;o=!0}return o&&r!=="_"}if(r==="o"){for(i++;i<n;i++)if(r=t[i],r!=="_"){if(!Ut(t.charCodeAt(i)))return!1;o=!0}return o&&r!=="_"}}if(r==="_")return!1;for(;i<n;i++)if(r=t[i],r!=="_"){if(!Pt(t.charCodeAt(i)))return!1;o=!0}return!(!o||r==="_")}c(Rt,"resolveYamlInteger");function Wt(t){var n=t,i=1,o;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),o=n[0],(o==="-"||o==="+")&&(o==="-"&&(i=-1),n=n.slice(1),o=n[0]),n==="0")return 0;if(o==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]==="x")return i*parseInt(n.slice(2),16);if(n[1]==="o")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}c(Wt,"constructYamlInteger");function $t(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1==0&&!k.isNegativeZero(t)}c($t,"isInteger");var yi=new w("tag:yaml.org,2002:int",{kind:"scalar",resolve:Rt,construct:Wt,predicate:$t,represent:{binary:c(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:c(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:c(function(t){return t.toString(10)},"decimal"),hexadecimal:c(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vi=RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Kt(t){return!(t===null||!vi.test(t)||t[t.length-1]==="_")}c(Kt,"resolveYamlFloat");function Ht(t){var n=t.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1;return"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?1/0:-1/0:n===".nan"?NaN:i*parseFloat(n,10)}c(Ht,"constructYamlFloat");var bi=/^[-+]?[0-9]+e/;function Zt(t,n){var i;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(t===1/0)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(t===-1/0)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(k.isNegativeZero(t))return"-0.0";return i=t.toString(10),bi.test(i)?i.replace("e",".e"):i}c(Zt,"representYamlFloat");function Qt(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!=0||k.isNegativeZero(t))}c(Qt,"isFloat");var Ai=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:Kt,construct:Ht,predicate:Qt,represent:Zt,defaultStyle:"lowercase"}),Gt=hi.extend({implicit:[mi,gi,yi,Ai]}),ki=Gt,zt=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Jt=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Vt(t){return t===null?!1:zt.exec(t)!==null||Jt.exec(t)!==null}c(Vt,"resolveYamlTimestamp");function Xt(t){var n,i,o,r,a,e,l,s=0,u=null,d,p,m;if(n=zt.exec(t),n===null&&(n=Jt.exec(t)),n===null)throw Error("Date resolve error");if(i=+n[1],o=n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(i,o,r));if(a=+n[4],e=+n[5],l=+n[6],n[7]){for(s=n[7].slice(0,3);s.length<3;)s+="0";s=+s}return n[9]&&(d=+n[10],p=+(n[11]||0),u=(d*60+p)*6e4,n[9]==="-"&&(u=-u)),m=new Date(Date.UTC(i,o,r,a,e,l,s)),u&&m.setTime(m.getTime()-u),m}c(Xt,"constructYamlTimestamp");function tn(t){return t.toISOString()}c(tn,"representYamlTimestamp");var wi=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Vt,construct:Xt,instanceOf:Date,represent:tn});function nn(t){return t==="<<"||t===null}c(nn,"resolveYamlMerge");var xi=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nn}),ot=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function rn(t){if(t===null)return!1;var n,i,o=0,r=t.length,a=ot;for(i=0;i<r;i++)if(n=a.indexOf(t.charAt(i)),!(n>64)){if(n<0)return!1;o+=6}return o%8==0}c(rn,"resolveYamlBinary");function on(t){var n,i,o=t.replace(/[\r\n=]/g,""),r=o.length,a=ot,e=0,l=[];for(n=0;n<r;n++)n%4==0&&n&&(l.push(e>>16&255),l.push(e>>8&255),l.push(e&255)),e=e<<6|a.indexOf(o.charAt(n));return i=r%4*6,i===0?(l.push(e>>16&255),l.push(e>>8&255),l.push(e&255)):i===18?(l.push(e>>10&255),l.push(e>>2&255)):i===12&&l.push(e>>4&255),new Uint8Array(l)}c(on,"constructYamlBinary");function en(t){var n="",i=0,o,r,a=t.length,e=ot;for(o=0;o<a;o++)o%3==0&&o&&(n+=e[i>>18&63],n+=e[i>>12&63],n+=e[i>>6&63],n+=e[i&63]),i=(i<<8)+t[o];return r=a%3,r===0?(n+=e[i>>18&63],n+=e[i>>12&63],n+=e[i>>6&63],n+=e[i&63]):r===2?(n+=e[i>>10&63],n+=e[i>>4&63],n+=e[i<<2&63],n+=e[64]):r===1&&(n+=e[i>>2&63],n+=e[i<<4&63],n+=e[64],n+=e[64]),n}c(en,"representYamlBinary");function an(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}c(an,"isBinary");var Ci=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:rn,construct:on,predicate:an,represent:en}),Si=Object.prototype.hasOwnProperty,Oi=Object.prototype.toString;function ln(t){if(t===null)return!0;var n=[],i,o,r,a,e,l=t;for(i=0,o=l.length;i<o;i+=1){if(r=l[i],e=!1,Oi.call(r)!=="[object Object]")return!1;for(a in r)if(Si.call(r,a))if(!e)e=!0;else return!1;if(!e)return!1;if(n.indexOf(a)===-1)n.push(a);else return!1}return!0}c(ln,"resolveYamlOmap");function cn(t){return t===null?[]:t}c(cn,"constructYamlOmap");var Ii=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ln,construct:cn}),ji=Object.prototype.toString;function sn(t){if(t===null)return!0;var n,i,o,r,a,e=t;for(a=Array(e.length),n=0,i=e.length;n<i;n+=1){if(o=e[n],ji.call(o)!=="[object Object]"||(r=Object.keys(o),r.length!==1))return!1;a[n]=[r[0],o[r[0]]]}return!0}c(sn,"resolveYamlPairs");function un(t){if(t===null)return[];var n,i,o,r,a,e=t;for(a=Array(e.length),n=0,i=e.length;n<i;n+=1)o=e[n],r=Object.keys(o),a[n]=[r[0],o[r[0]]];return a}c(un,"constructYamlPairs");var Ti=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:sn,construct:un}),Fi=Object.prototype.hasOwnProperty;function pn(t){if(t===null)return!0;var n,i=t;for(n in i)if(Fi.call(i,n)&&i[n]!==null)return!1;return!0}c(pn,"resolveYamlSet");function fn(t){return t===null?{}:t}c(fn,"constructYamlSet");var Mi=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:pn,construct:fn}),dn=ki.extend({implicit:[wi,xi],explicit:[Ci,Ii,Ti,Mi]}),F=Object.prototype.hasOwnProperty,Q=1,hn=2,mn=3,G=4,et=1,Li=2,gn=3,Ni=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ei=/[\x85\u2028\u2029]/,_i=/[,\[\]\{\}]/,yn=/^(?:!|!!|![a-z\-]+!)$/i,vn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function at(t){return Object.prototype.toString.call(t)}c(at,"_class");function I(t){return t===10||t===13}c(I,"is_EOL");function M(t){return t===9||t===32}c(M,"is_WHITE_SPACE");function C(t){return t===9||t===32||t===10||t===13}c(C,"is_WS_OR_EOL");function L(t){return t===44||t===91||t===93||t===123||t===125}c(L,"is_FLOW_INDICATOR");function bn(t){var n;return 48<=t&&t<=57?t-48:(n=t|32,97<=n&&n<=102?n-97+10:-1)}c(bn,"fromHexCode");function An(t){return t===120?2:t===117?4:t===85?8:0}c(An,"escapedHexLen");function kn(t){return 48<=t&&t<=57?t-48:-1}c(kn,"fromDecimalCode");function lt(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}c(lt,"simpleEscapeSequence");function wn(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}c(wn,"charFromCodepoint");var xn=Array(256),Cn=Array(256);for(N=0;N<256;N++)xn[N]=lt(N)?1:0,Cn[N]=lt(N);var N;function Sn(t,n){this.input=t,this.filename=n.filename||null,this.schema=n.schema||dn,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}c(Sn,"State$1");function ct(t,n){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=pi(i),new S(n,i)}c(ct,"generateError");function f(t,n){throw ct(t,n)}c(f,"throwError");function U(t,n){t.onWarning&&t.onWarning.call(null,ct(t,n))}c(U,"throwWarning");var On={YAML:c(function(t,n,i){var o,r,a;t.version!==null&&f(t,"duplication of %YAML directive"),i.length!==1&&f(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&f(t,"ill-formed argument of the YAML directive"),r=parseInt(o[1],10),a=parseInt(o[2],10),r!==1&&f(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&U(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:c(function(t,n,i){var o,r;i.length!==2&&f(t,"TAG directive accepts exactly two arguments"),o=i[0],r=i[1],yn.test(o)||f(t,"ill-formed tag handle (first argument) of the TAG directive"),F.call(t.tagMap,o)&&f(t,'there is a previously declared suffix for "'+o+'" tag handle'),vn.test(r)||f(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch{f(t,"tag prefix is malformed: "+r)}t.tagMap[o]=r},"handleTagDirective")};function T(t,n,i,o){var r,a,e,l;if(n<i){if(l=t.input.slice(n,i),o)for(r=0,a=l.length;r<a;r+=1)e=l.charCodeAt(r),e===9||32<=e&&e<=1114111||f(t,"expected valid JSON character");else Ni.test(l)&&f(t,"the stream contains non-printable characters");t.result+=l}}c(T,"captureSegment");function st(t,n,i,o){var r,a,e,l;for(k.isObject(i)||f(t,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),e=0,l=r.length;e<l;e+=1)a=r[e],F.call(n,a)||(n[a]=i[a],o[a]=!0)}c(st,"mergeMappings");function E(t,n,i,o,r,a,e,l,s){var u,d;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),u=0,d=r.length;u<d;u+=1)Array.isArray(r[u])&&f(t,"nested arrays are not supported inside keys"),typeof r=="object"&&at(r[u])==="[object Object]"&&(r[u]="[object Object]");if(typeof r=="object"&&at(r)==="[object Object]"&&(r="[object Object]"),r=String(r),n===null&&(n={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(u=0,d=a.length;u<d;u+=1)st(t,n,a[u],i);else st(t,n,a,i);else!t.json&&!F.call(i,r)&&F.call(n,r)&&(t.line=e||t.line,t.lineStart=l||t.lineStart,t.position=s||t.position,f(t,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(n,r,{configurable:!0,enumerable:!0,writable:!0,value:a}):n[r]=a,delete i[r];return n}c(E,"storeMappingPair");function z(t){var n=t.input.charCodeAt(t.position);n===10?t.position++:n===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):f(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}c(z,"readLineBreak");function A(t,n,i){for(var o=0,r=t.input.charCodeAt(t.position);r!==0;){for(;M(r);)r===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),r=t.input.charCodeAt(++t.position);if(n&&r===35)do r=t.input.charCodeAt(++t.position);while(r!==10&&r!==13&&r!==0);if(I(r))for(z(t),r=t.input.charCodeAt(t.position),o++,t.lineIndent=0;r===32;)t.lineIndent++,r=t.input.charCodeAt(++t.position);else break}return i!==-1&&o!==0&&t.lineIndent<i&&U(t,"deficient indentation"),o}c(A,"skipSeparationSpace");function P(t){var n=t.position,i=t.input.charCodeAt(n);return!!((i===45||i===46)&&i===t.input.charCodeAt(n+1)&&i===t.input.charCodeAt(n+2)&&(n+=3,i=t.input.charCodeAt(n),i===0||C(i)))}c(P,"testDocumentSeparator");function J(t,n){n===1?t.result+=" ":n>1&&(t.result+=k.repeat(`
`,n-1))}c(J,"writeFoldedLines");function In(t,n,i){var o,r,a,e,l,s,u,d,p=t.kind,m=t.result,h=t.input.charCodeAt(t.position);if(C(h)||L(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(r=t.input.charCodeAt(t.position+1),C(r)||i&&L(r)))return!1;for(t.kind="scalar",t.result="",a=e=t.position,l=!1;h!==0;){if(h===58){if(r=t.input.charCodeAt(t.position+1),C(r)||i&&L(r))break}else if(h===35){if(o=t.input.charCodeAt(t.position-1),C(o))break}else{if(t.position===t.lineStart&&P(t)||i&&L(h))break;if(I(h))if(s=t.line,u=t.lineStart,d=t.lineIndent,A(t,!1,-1),t.lineIndent>=n){l=!0,h=t.input.charCodeAt(t.position);continue}else{t.position=e,t.line=s,t.lineStart=u,t.lineIndent=d;break}}l&&(l=(T(t,a,e,!1),J(t,t.line-s),a=e=t.position,!1)),M(h)||(e=t.position+1),h=t.input.charCodeAt(++t.position)}return T(t,a,e,!1),t.result?!0:(t.kind=p,t.result=m,!1)}c(In,"readPlainScalar");function jn(t,n){var i=t.input.charCodeAt(t.position),o,r;if(i!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=r=t.position;(i=t.input.charCodeAt(t.position))!==0;)if(i===39)if(T(t,o,t.position,!0),i=t.input.charCodeAt(++t.position),i===39)o=t.position,t.position++,r=t.position;else return!0;else I(i)?(T(t,o,r,!0),J(t,A(t,!1,n)),o=r=t.position):t.position===t.lineStart&&P(t)?f(t,"unexpected end of the document within a single quoted scalar"):(t.position++,r=t.position);f(t,"unexpected end of the stream within a single quoted scalar")}c(jn,"readSingleQuotedScalar");function Tn(t,n){var i,o,r,a,e,l=t.input.charCodeAt(t.position);if(l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return T(t,i,t.position,!0),t.position++,!0;if(l===92){if(T(t,i,t.position,!0),l=t.input.charCodeAt(++t.position),I(l))A(t,!1,n);else if(l<256&&xn[l])t.result+=Cn[l],t.position++;else if((e=An(l))>0){for(r=e,a=0;r>0;r--)l=t.input.charCodeAt(++t.position),(e=bn(l))>=0?a=(a<<4)+e:f(t,"expected hexadecimal character");t.result+=wn(a),t.position++}else f(t,"unknown escape sequence");i=o=t.position}else I(l)?(T(t,i,o,!0),J(t,A(t,!1,n)),i=o=t.position):t.position===t.lineStart&&P(t)?f(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}f(t,"unexpected end of the stream within a double quoted scalar")}c(Tn,"readDoubleQuotedScalar");function Fn(t,n){var i=!0,o,r,a,e=t.tag,l,s=t.anchor,u,d,p,m,h,g=Object.create(null),v,b,O,y=t.input.charCodeAt(t.position);if(y===91)d=93,h=!1,l=[];else if(y===123)d=125,h=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),y=t.input.charCodeAt(++t.position);y!==0;){if(A(t,!0,n),y=t.input.charCodeAt(t.position),y===d)return t.position++,t.tag=e,t.anchor=s,t.kind=h?"mapping":"sequence",t.result=l,!0;i?y===44&&f(t,"expected the node content, but found ','"):f(t,"missed comma between flow collection entries"),b=v=O=null,p=m=!1,y===63&&(u=t.input.charCodeAt(t.position+1),C(u)&&(p=m=!0,t.position++,A(t,!0,n))),o=t.line,r=t.lineStart,a=t.position,_(t,n,Q,!1,!0),b=t.tag,v=t.result,A(t,!0,n),y=t.input.charCodeAt(t.position),(m||t.line===o)&&y===58&&(p=!0,y=t.input.charCodeAt(++t.position),A(t,!0,n),_(t,n,Q,!1,!0),O=t.result),h?E(t,l,g,b,v,O,o,r,a):p?l.push(E(t,null,g,b,v,O,o,r,a)):l.push(v),A(t,!0,n),y=t.input.charCodeAt(t.position),y===44?(i=!0,y=t.input.charCodeAt(++t.position)):i=!1}f(t,"unexpected end of the stream within a flow collection")}c(Fn,"readFlowCollection");function Mn(t,n){var i,o,r=et,a=!1,e=!1,l=n,s=0,u=!1,d,p=t.input.charCodeAt(t.position);if(p===124)o=!1;else if(p===62)o=!0;else return!1;for(t.kind="scalar",t.result="";p!==0;)if(p=t.input.charCodeAt(++t.position),p===43||p===45)et===r?r=p===43?gn:Li:f(t,"repeat of a chomping mode identifier");else if((d=kn(p))>=0)d===0?f(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):e?f(t,"repeat of an indentation width identifier"):(l=n+d-1,e=!0);else break;if(M(p)){do p=t.input.charCodeAt(++t.position);while(M(p));if(p===35)do p=t.input.charCodeAt(++t.position);while(!I(p)&&p!==0)}for(;p!==0;){for(z(t),t.lineIndent=0,p=t.input.charCodeAt(t.position);(!e||t.lineIndent<l)&&p===32;)t.lineIndent++,p=t.input.charCodeAt(++t.position);if(!e&&t.lineIndent>l&&(l=t.lineIndent),I(p)){s++;continue}if(t.lineIndent<l){r===gn?t.result+=k.repeat(`
`,a?1+s:s):r===et&&a&&(t.result+=`
`);break}for(o?M(p)?(u=!0,t.result+=k.repeat(`
`,a?1+s:s)):u?(u=!1,t.result+=k.repeat(`
`,s+1)):s===0?a&&(t.result+=" "):t.result+=k.repeat(`
`,s):t.result+=k.repeat(`
`,a?1+s:s),a=!0,e=!0,s=0,i=t.position;!I(p)&&p!==0;)p=t.input.charCodeAt(++t.position);T(t,i,t.position,!1)}return!0}c(Mn,"readBlockScalar");function ut(t,n){var i,o=t.tag,r=t.anchor,a=[],e,l=!1,s;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),s=t.input.charCodeAt(t.position);s!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,f(t,"tab characters must not be used in indentation")),!(s!==45||(e=t.input.charCodeAt(t.position+1),!C(e))));){if(l=!0,t.position++,A(t,!0,-1)&&t.lineIndent<=n){a.push(null),s=t.input.charCodeAt(t.position);continue}if(i=t.line,_(t,n,mn,!1,!0),a.push(t.result),A(t,!0,-1),s=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>n)&&s!==0)f(t,"bad indentation of a sequence entry");else if(t.lineIndent<n)break}return l?(t.tag=o,t.anchor=r,t.kind="sequence",t.result=a,!0):!1}c(ut,"readBlockSequence");function Ln(t,n,i){var o,r,a,e,l,s,u=t.tag,d=t.anchor,p={},m=Object.create(null),h=null,g=null,v=null,b=!1,O=!1,y;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=p),y=t.input.charCodeAt(t.position);y!==0;){if(!b&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,f(t,"tab characters must not be used in indentation")),o=t.input.charCodeAt(t.position+1),a=t.line,(y===63||y===58)&&C(o))y===63?(b&&(E(t,p,m,h,g,null,e,l,s),h=g=v=null),O=!0,b=!0,r=!0):b?(b=!1,r=!0):f(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,y=o;else{if(e=t.line,l=t.lineStart,s=t.position,!_(t,i,hn,!1,!0))break;if(t.line===a){for(y=t.input.charCodeAt(t.position);M(y);)y=t.input.charCodeAt(++t.position);if(y===58)y=t.input.charCodeAt(++t.position),C(y)||f(t,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(E(t,p,m,h,g,null,e,l,s),h=g=v=null),O=!0,b=!1,r=!1,h=t.tag,g=t.result;else if(O)f(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=d,!0}else if(O)f(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=d,!0}if((t.line===a||t.lineIndent>n)&&(b&&(e=t.line,l=t.lineStart,s=t.position),_(t,n,G,!0,r)&&(b?g=t.result:v=t.result),b||(E(t,p,m,h,g,v,e,l,s),h=g=v=null),A(t,!0,-1),y=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>n)&&y!==0)f(t,"bad indentation of a mapping entry");else if(t.lineIndent<n)break}return b&&E(t,p,m,h,g,null,e,l,s),O&&(t.tag=u,t.anchor=d,t.kind="mapping",t.result=p),O}c(Ln,"readBlockMapping");function Nn(t){var n,i=!1,o=!1,r,a,e=t.input.charCodeAt(t.position);if(e!==33)return!1;if(t.tag!==null&&f(t,"duplication of a tag property"),e=t.input.charCodeAt(++t.position),e===60?(i=!0,e=t.input.charCodeAt(++t.position)):e===33?(o=!0,r="!!",e=t.input.charCodeAt(++t.position)):r="!",n=t.position,i){do e=t.input.charCodeAt(++t.position);while(e!==0&&e!==62);t.position<t.length?(a=t.input.slice(n,t.position),e=t.input.charCodeAt(++t.position)):f(t,"unexpected end of the stream within a verbatim tag")}else{for(;e!==0&&!C(e);)e===33&&(o?f(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(n-1,t.position+1),yn.test(r)||f(t,"named tag handle cannot contain such characters"),o=!0,n=t.position+1)),e=t.input.charCodeAt(++t.position);a=t.input.slice(n,t.position),_i.test(a)&&f(t,"tag suffix cannot contain flow indicator characters")}a&&!vn.test(a)&&f(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{f(t,"tag name is malformed: "+a)}return i?t.tag=a:F.call(t.tagMap,r)?t.tag=t.tagMap[r]+a:r==="!"?t.tag="!"+a:r==="!!"?t.tag="tag:yaml.org,2002:"+a:f(t,'undeclared tag handle "'+r+'"'),!0}c(Nn,"readTagProperty");function En(t){var n,i=t.input.charCodeAt(t.position);if(i!==38)return!1;for(t.anchor!==null&&f(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),n=t.position;i!==0&&!C(i)&&!L(i);)i=t.input.charCodeAt(++t.position);return t.position===n&&f(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(n,t.position),!0}c(En,"readAnchorProperty");function _n(t){var n,i,o=t.input.charCodeAt(t.position);if(o!==42)return!1;for(o=t.input.charCodeAt(++t.position),n=t.position;o!==0&&!C(o)&&!L(o);)o=t.input.charCodeAt(++t.position);return t.position===n&&f(t,"name of an alias node must contain at least one character"),i=t.input.slice(n,t.position),F.call(t.anchorMap,i)||f(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],A(t,!0,-1),!0}c(_n,"readAlias");function _(t,n,i,o,r){var a,e,l,s=1,u=!1,d=!1,p,m,h,g,v,b;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=e=l=G===i||mn===i,o&&A(t,!0,-1)&&(u=!0,t.lineIndent>n?s=1:t.lineIndent===n?s=0:t.lineIndent<n&&(s=-1)),s===1)for(;Nn(t)||En(t);)A(t,!0,-1)?(u=!0,l=a,t.lineIndent>n?s=1:t.lineIndent===n?s=0:t.lineIndent<n&&(s=-1)):l=!1;if(l&&(l=u||r),(s===1||G===i)&&(v=Q===i||hn===i?n:n+1,b=t.position-t.lineStart,s===1?l&&(ut(t,b)||Ln(t,b,v))||Fn(t,v)?d=!0:(e&&Mn(t,v)||jn(t,v)||Tn(t,v)?d=!0:_n(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&f(t,"alias node should not have any properties")):In(t,v,Q===i)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):s===0&&(d=l&&ut(t,b))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&f(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),p=0,m=t.implicitTypes.length;p<m;p+=1)if(g=t.implicitTypes[p],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(F.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,h=t.typeMap.multi[t.kind||"fallback"],p=0,m=h.length;p<m;p+=1)if(t.tag.slice(0,h[p].tag.length)===h[p].tag){g=h[p];break}g||f(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&f(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):f(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}c(_,"composeNode");function Yn(t){var n=t.position,i,o,r,a=!1,e;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(e=t.input.charCodeAt(t.position))!==0&&(A(t,!0,-1),e=t.input.charCodeAt(t.position),!(t.lineIndent>0||e!==37));){for(a=!0,e=t.input.charCodeAt(++t.position),i=t.position;e!==0&&!C(e);)e=t.input.charCodeAt(++t.position);for(o=t.input.slice(i,t.position),r=[],o.length<1&&f(t,"directive name must not be less than one character in length");e!==0;){for(;M(e);)e=t.input.charCodeAt(++t.position);if(e===35){do e=t.input.charCodeAt(++t.position);while(e!==0&&!I(e));break}if(I(e))break;for(i=t.position;e!==0&&!C(e);)e=t.input.charCodeAt(++t.position);r.push(t.input.slice(i,t.position))}e!==0&&z(t),F.call(On,o)?On[o](t,o,r):U(t,'unknown document directive "'+o+'"')}if(A(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,A(t,!0,-1)):a&&f(t,"directives end mark is expected"),_(t,t.lineIndent-1,G,!1,!0),A(t,!0,-1),t.checkLineBreaks&&Ei.test(t.input.slice(n,t.position))&&U(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&P(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,A(t,!0,-1));return}if(t.position<t.length-1)f(t,"end of the stream or a document separator is expected");else return}c(Yn,"readDocument");function pt(t,n){t=String(t),n||(n={}),t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new Sn(t,n),o=t.indexOf("\0");for(o!==-1&&(i.position=o,f(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Yn(i);return i.documents}c(pt,"loadDocuments");function Dn(t,n,i){typeof n=="object"&&n&&i===void 0&&(i=n,n=null);var o=pt(t,i);if(typeof n!="function")return o;for(var r=0,a=o.length;r<a;r+=1)n(o[r])}c(Dn,"loadAll$1");function qn(t,n){var i=pt(t,n);if(i.length!==0){if(i.length===1)return i[0];throw new S("expected a single document in the stream, but found more")}}c(qn,"load$1");var Bn={loadAll:Dn,load:qn},Un=Object.prototype.toString,Pn=Object.prototype.hasOwnProperty,ft=65279,Yi=9,R=10,Di=13,qi=32,Bi=33,Ui=34,dt=35,Pi=37,Ri=38,Wi=39,$i=42,Rn=44,Ki=45,V=58,Hi=61,Zi=62,Qi=63,Gi=64,Wn=91,$n=93,zi=96,Kn=123,Ji=124,Hn=125,x={};x[0]="\\0",x[7]="\\a",x[8]="\\b",x[9]="\\t",x[10]="\\n",x[11]="\\v",x[12]="\\f",x[13]="\\r",x[27]="\\e",x[34]='\\"',x[92]="\\\\",x[133]="\\N",x[160]="\\_",x[8232]="\\L",x[8233]="\\P";var Vi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Xi=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Zn(t,n){var i,o,r,a,e,l,s;if(n===null)return{};for(i={},o=Object.keys(n),r=0,a=o.length;r<a;r+=1)e=o[r],l=String(n[e]),e.slice(0,2)==="!!"&&(e="tag:yaml.org,2002:"+e.slice(2)),s=t.compiledTypeMap.fallback[e],s&&Pn.call(s.styleAliases,l)&&(l=s.styleAliases[l]),i[e]=l;return i}c(Zn,"compileStyleMap");function Qn(t){var n=t.toString(16).toUpperCase(),i,o;if(t<=255)i="x",o=2;else if(t<=65535)i="u",o=4;else if(t<=4294967295)i="U",o=8;else throw new S("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+k.repeat("0",o-n.length)+n}c(Qn,"encodeHex");var tr=1,W=2;function Gn(t){this.schema=t.schema||dn,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=k.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Zn(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?W:tr,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}c(Gn,"State");function ht(t,n){for(var i=k.repeat(" ",n),o=0,r=-1,a="",e,l=t.length;o<l;)r=t.indexOf(`
`,o),r===-1?(e=t.slice(o),o=l):(e=t.slice(o,r+1),o=r+1),e.length&&e!==`
`&&(a+=i),a+=e;return a}c(ht,"indentString");function X(t,n){return`
`+k.repeat(" ",t.indent*n)}c(X,"generateNextLine");function zn(t,n){var i,o,r;for(i=0,o=t.implicitTypes.length;i<o;i+=1)if(r=t.implicitTypes[i],r.resolve(n))return!0;return!1}c(zn,"testImplicitResolving");function $(t){return t===qi||t===Yi}c($,"isWhitespace");function D(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==ft||65536<=t&&t<=1114111}c(D,"isPrintable");function mt(t){return D(t)&&t!==ft&&t!==Di&&t!==R}c(mt,"isNsCharOrWhitespace");function gt(t,n,i){var o=mt(t),r=o&&!$(t);return(i?o:o&&t!==Rn&&t!==Wn&&t!==$n&&t!==Kn&&t!==Hn)&&t!==dt&&!(n===V&&!r)||mt(n)&&!$(n)&&t===dt||n===V&&r}c(gt,"isPlainSafe");function Jn(t){return D(t)&&t!==ft&&!$(t)&&t!==Ki&&t!==Qi&&t!==V&&t!==Rn&&t!==Wn&&t!==$n&&t!==Kn&&t!==Hn&&t!==dt&&t!==Ri&&t!==$i&&t!==Bi&&t!==Ji&&t!==Hi&&t!==Zi&&t!==Wi&&t!==Ui&&t!==Pi&&t!==Gi&&t!==zi}c(Jn,"isPlainSafeFirst");function Vn(t){return!$(t)&&t!==V}c(Vn,"isPlainSafeLast");function q(t,n){var i=t.charCodeAt(n),o;return i>=55296&&i<=56319&&n+1<t.length&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)?(i-55296)*1024+o-56320+65536:i}c(q,"codePointAt");function yt(t){return/^\n* /.test(t)}c(yt,"needIndentIndicator");var Xn=1,vt=2,ti=3,ni=4,B=5;function ii(t,n,i,o,r,a,e,l){var s,u=0,d=null,p=!1,m=!1,h=o!==-1,g=-1,v=Jn(q(t,0))&&Vn(q(t,t.length-1));if(n||e)for(s=0;s<t.length;u>=65536?s+=2:s++){if(u=q(t,s),!D(u))return B;v&&(v=gt(u,d,l)),d=u}else{for(s=0;s<t.length;u>=65536?s+=2:s++){if(u=q(t,s),u===R)p=!0,h&&(m||(m=s-g-1>o&&t[g+1]!==" "),g=s);else if(!D(u))return B;v&&(v=gt(u,d,l)),d=u}m||(m=h&&s-g-1>o&&t[g+1]!==" ")}return!p&&!m?v&&!e&&!r(t)?Xn:a===W?B:vt:i>9&&yt(t)?B:e?a===W?B:vt:m?ni:ti}c(ii,"chooseScalarStyle");function ri(t,n,i,o,r){t.dump=(function(){if(n.length===0)return t.quotingType===W?'""':"''";if(!t.noCompatMode&&(Vi.indexOf(n)!==-1||Xi.test(n)))return t.quotingType===W?'"'+n+'"':"'"+n+"'";var a=t.indent*Math.max(1,i),e=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=o||t.flowLevel>-1&&i>=t.flowLevel;function s(u){return zn(t,u)}switch(c(s,"testAmbiguity"),ii(n,l,t.indent,e,s,t.quotingType,t.forceQuotes&&!o,r)){case Xn:return n;case vt:return"'"+n.replace(/'/g,"''")+"'";case ti:return"|"+bt(n,t.indent)+At(ht(n,a));case ni:return">"+bt(n,t.indent)+At(ht(oi(n,e),a));case B:return'"'+ei(n)+'"';default:throw new S("impossible error: invalid scalar style")}})()}c(ri,"writeScalar");function bt(t,n){var i=yt(t)?String(n):"",o=t[t.length-1]===`
`;return i+(o&&(t[t.length-2]===`
`||t===`
`)?"+":o?"":"-")+`
`}c(bt,"blockHeader");function At(t){return t[t.length-1]===`
`?t.slice(0,-1):t}c(At,"dropEndingNewline");function oi(t,n){for(var i=/(\n+)([^\n]*)/g,o=(function(){var u=t.indexOf(`
`);return u=u===-1?t.length:u,i.lastIndex=u,kt(t.slice(0,u),n)})(),r=t[0]===`
`||t[0]===" ",a,e;e=i.exec(t);){var l=e[1],s=e[2];a=s[0]===" ",o+=l+(!r&&!a&&s!==""?`
`:"")+kt(s,n),r=a}return o}c(oi,"foldString");function kt(t,n){if(t===""||t[0]===" ")return t;for(var i=/ [^ ]/g,o,r=0,a,e=0,l=0,s="";o=i.exec(t);)l=o.index,l-r>n&&(a=e>r?e:l,s+=`
`+t.slice(r,a),r=a+1),e=l;return s+=`
`,t.length-r>n&&e>r?s+=t.slice(r,e)+`
`+t.slice(e+1):s+=t.slice(r),s.slice(1)}c(kt,"foldLine");function ei(t){for(var n="",i=0,o,r=0;r<t.length;i>=65536?r+=2:r++)i=q(t,r),o=x[i],!o&&D(i)?(n+=t[r],i>=65536&&(n+=t[r+1])):n+=o||Qn(i);return n}c(ei,"escapeString");function ai(t,n,i){var o="",r=t.tag,a,e,l;for(a=0,e=i.length;a<e;a+=1)l=i[a],t.replacer&&(l=t.replacer.call(i,String(a),l)),(j(t,n,l,!1,!1)||l===void 0&&j(t,n,null,!1,!1))&&(o!==""&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=r,t.dump="["+o+"]"}c(ai,"writeFlowSequence");function wt(t,n,i,o){var r="",a=t.tag,e,l,s;for(e=0,l=i.length;e<l;e+=1)s=i[e],t.replacer&&(s=t.replacer.call(i,String(e),s)),(j(t,n+1,s,!0,!0,!1,!0)||s===void 0&&j(t,n+1,null,!0,!0,!1,!0))&&((!o||r!=="")&&(r+=X(t,n)),t.dump&&R===t.dump.charCodeAt(0)?r+="-":r+="- ",r+=t.dump);t.tag=a,t.dump=r||"[]"}c(wt,"writeBlockSequence");function li(t,n,i){var o="",r=t.tag,a=Object.keys(i),e,l,s,u,d;for(e=0,l=a.length;e<l;e+=1)d="",o!==""&&(d+=", "),t.condenseFlow&&(d+='"'),s=a[e],u=i[s],t.replacer&&(u=t.replacer.call(i,s,u)),j(t,n,s,!1,!1)&&(t.dump.length>1024&&(d+="? "),d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),j(t,n,u,!1,!1)&&(d+=t.dump,o+=d));t.tag=r,t.dump="{"+o+"}"}c(li,"writeFlowMapping");function ci(t,n,i,o){var r="",a=t.tag,e=Object.keys(i),l,s,u,d,p,m;if(t.sortKeys===!0)e.sort();else if(typeof t.sortKeys=="function")e.sort(t.sortKeys);else if(t.sortKeys)throw new S("sortKeys must be a boolean or a function");for(l=0,s=e.length;l<s;l+=1)m="",(!o||r!=="")&&(m+=X(t,n)),u=e[l],d=i[u],t.replacer&&(d=t.replacer.call(i,u,d)),j(t,n+1,u,!0,!0,!0)&&(p=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,p&&(t.dump&&R===t.dump.charCodeAt(0)?m+="?":m+="? "),m+=t.dump,p&&(m+=X(t,n)),j(t,n+1,d,!0,p)&&(t.dump&&R===t.dump.charCodeAt(0)?m+=":":m+=": ",m+=t.dump,r+=m));t.tag=a,t.dump=r||"{}"}c(ci,"writeBlockMapping");function xt(t,n,i){var o,r=i?t.explicitTypes:t.implicitTypes,a,e,l,s;for(a=0,e=r.length;a<e;a+=1)if(l=r[a],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof n=="object"&&n instanceof l.instanceOf)&&(!l.predicate||l.predicate(n))){if(i?l.multi&&l.representName?t.tag=l.representName(n):t.tag=l.tag:t.tag="?",l.represent){if(s=t.styleMap[l.tag]||l.defaultStyle,Un.call(l.represent)==="[object Function]")o=l.represent(n,s);else if(Pn.call(l.represent,s))o=l.represent[s](n,s);else throw new S("!<"+l.tag+'> tag resolver accepts not "'+s+'" style');t.dump=o}return!0}return!1}c(xt,"detectType");function j(t,n,i,o,r,a,e){t.tag=null,t.dump=i,xt(t,i,!1)||xt(t,i,!0);var l=Un.call(t.dump),s=o,u;o&&(o=t.flowLevel<0||t.flowLevel>n);var d=l==="[object Object]"||l==="[object Array]",p,m;if(d&&(p=t.duplicates.indexOf(i),m=p!==-1),(t.tag!==null&&t.tag!=="?"||m||t.indent!==2&&n>0)&&(r=!1),m&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(d&&m&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),l==="[object Object]")o&&Object.keys(t.dump).length!==0?(ci(t,n,t.dump,r),m&&(t.dump="&ref_"+p+t.dump)):(li(t,n,t.dump),m&&(t.dump="&ref_"+p+" "+t.dump));else if(l==="[object Array]")o&&t.dump.length!==0?(t.noArrayIndent&&!e&&n>0?wt(t,n-1,t.dump,r):wt(t,n,t.dump,r),m&&(t.dump="&ref_"+p+t.dump)):(ai(t,n,t.dump),m&&(t.dump="&ref_"+p+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&ri(t,t.dump,n,a,s);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new S("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),u=t.tag[0]==="!"?"!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?"!!"+u.slice(18):"!<"+u+">",t.dump=u+" "+t.dump)}return!0}c(j,"writeNode");function si(t,n){var i=[],o=[],r,a;for(tt(t,i,o),r=0,a=o.length;r<a;r+=1)n.duplicates.push(i[o[r]]);n.usedDuplicates=Array(a)}c(si,"getDuplicateReferences");function tt(t,n,i){var o,r,a;if(typeof t=="object"&&t)if(r=n.indexOf(t),r!==-1)i.indexOf(r)===-1&&i.push(r);else if(n.push(t),Array.isArray(t))for(r=0,a=t.length;r<a;r+=1)tt(t[r],n,i);else for(o=Object.keys(t),r=0,a=o.length;r<a;r+=1)tt(t[o[r]],n,i)}c(tt,"inspectNode");function ui(t,n){n||(n={});var i=new Gn(n);i.noRefs||si(t,i);var o=t;return i.replacer&&(o=i.replacer.call({"":o},"",o)),j(i,0,o,!0,!0)?i.dump+`
`:""}c(ui,"dump$1");var nr={dump:ui};function ir(t,n){return function(){throw Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}c(ir,"renamed");var rr=Gt,or=Bn.load;Bn.loadAll,nr.dump;export{or as n,rr as t};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-6UL2VRFP-DOB6anec.js","./dist-C1VXabOr.js","./chunk-LvLJmgfZ.js","./chunk-JA3XYJ7Z-DOm8KfKa.js","./src-CsZby044.js","./src-CvyFXpBy.js","./timer-B6DpdVnC.js","./chunk-S3R3BYOJ-8loRaCFh.js","./step-CVy5FnKg.js","./math-BJjKGmt3.js","./chunk-ABZYJK2D-0jga8uiE.js","./preload-helper-D2MJg03u.js","./purify.es-DZrAQFIu.js","./merge-BBX6ug-N.js","./_Uint8Array-BGESiCQL.js","./_baseFor-Duhs3RiJ.js","./memoize-BCOZVFBt.js","./dagre-DFula7I5.js","./graphlib-B4SLw_H3.js","./_baseIsEqual-B9N9Mw_N.js","./reduce-CaioMeUx.js","./_arrayReduce-TT0iOGKY.js","./_baseEach-BhAgFun2.js","./get-6uJrSKbw.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./hasIn-CycJImp8.js","./_baseProperty-NKyJO2oh.js","./_baseUniq-BP3iN0f3.js","./_baseFlatten-CUZNxU8H.js","./isEmpty-CgX_-6Mt.js","./min-Ci3LzCQg.js","./_baseMap-D3aN2j3O.js","./sortBy-CGfmqUg5.js","./pick-B_6Qi5aM.js","./_baseSet-5Rdwpmr3.js","./flatten-D-7VEN0q.js","./range-D2UKkEg-.js","./toInteger-CDcO32Gx.js","./now-6sUe0ZdD.js","./_hasUnicode-CWqKLxBC.js","./isString-DtNk7ov1.js","./clone-bEECh4rs.js","./chunk-ATLVNIR6-B17dg7Ry.js","./chunk-CVBHYZKI-DU48rJVu.js","./chunk-HN2XXSSU-Bdbi3Mns.js","./chunk-JZLCHNYA-48QVgmR4.js","./chunk-QXUST7PY-DkCIa8tJ.js","./line-BA7eTS55.js","./path-D7fidI_g.js","./array-Cf4PUXPA.js","./cose-bilkent-S5V4N54A-tFAvjCRW.js","./cytoscape.esm-BauVghWH.js"])))=>i.map(i=>d[i]);
import{t as n}from"./preload-helper-D2MJg03u.js";import{d as _}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as e,r as s}from"./src-CsZby044.js";import{s as d,y as u,__tla as h}from"./chunk-ABZYJK2D-0jga8uiE.js";import{a as y,i as f,s as p}from"./chunk-JZLCHNYA-48QVgmR4.js";import{a as c,i as L,n as w,r as E}from"./chunk-QXUST7PY-DkCIa8tJ.js";let o,m,g,b=Promise.all([(()=>{try{return h}catch{}})()]).then(async()=>{let i,t;i={common:d,getConfig:u,insertCluster:f,insertEdge:w,insertEdgeLabel:E,insertMarkers:L,insertNode:y,interpolateToCurve:_,labelHelper:p,log:s,positionEdgeLabel:c},t={},o=e(r=>{for(let a of r)t[a.name]=a},"registerLayoutLoaders"),e(()=>{o([{name:"dagre",loader:e(async()=>await n(()=>import("./dagre-6UL2VRFP-DOB6anec.js").then(async r=>(await r.__tla,r)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,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]),import.meta.url),"loader")},{name:"cose-bilkent",loader:e(async()=>await n(()=>import("./cose-bilkent-S5V4N54A-tFAvjCRW.js").then(async r=>(await r.__tla,r)),__vite__mapDeps([51,52,4,2,5,6]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders")(),m=e(async(r,a)=>{if(!(r.layoutAlgorithm in t))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);let l=t[r.layoutAlgorithm];return(await l.loader()).render(r,a,i,{algorithm:l.algorithm})},"render"),g=e((r="",{fallback:a="dagre"}={})=>{if(r in t)return r;if(a in t)return s.warn(`Layout algorithm ${r} is not registered. Using ${a} as fallback.`),a;throw Error(`Both layout algorithms ${r} and ${a} are not registered.`)},"getRegisteredLayoutAlgorithm")});export{b as __tla,o as n,m as r,g as t};
var t,a;import{f as s,g as o,h as l,m as n,n as h,p as C,r as m,s as d,t as p}from"./chunk-FPAJGGOC-DOBSZjU2.js";var f=(t=class extends p{constructor(){super(["architecture"])}},s(t,"ArchitectureTokenBuilder"),t),v=(a=class extends h{runCustomConverter(e,r,A){if(e.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return r.replace(/[[\]]/g,"").trim()}},s(a,"ArchitectureValueConverter"),a),c={parser:{TokenBuilder:s(()=>new f,"TokenBuilder"),ValueConverter:s(()=>new v,"ValueConverter")}};function i(u=C){let e=n(o(u),d),r=n(l({shared:e}),m,c);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}s(i,"createArchitectureServices");export{i as n,c as t};
import{n as o,r as s}from"./src-CsZby044.js";import{c as w}from"./chunk-ABZYJK2D-0jga8uiE.js";var x=o((t,i,e,a)=>{t.attr("class",e);let{width:h,height:r,x:n,y:g}=c(t,i);w(t,r,h,a);let d=l(n,g,h,r,i);t.attr("viewBox",d),s.debug(`viewBox configured: ${d} with padding: ${i}`)},"setupViewPortForSVG"),c=o((t,i)=>{var a;let e=((a=t.node())==null?void 0:a.getBBox())||{width:0,height:0,x:0,y:0};return{width:e.width+i*2,height:e.height+i*2,x:e.x,y:e.y}},"calculateDimensionsWithPadding"),l=o((t,i,e,a,h)=>`${t-h} ${i-h} ${e} ${a}`,"createViewBox");export{x as t};
import{u as G}from"./src-CvyFXpBy.js";import{_ as J,a as lt,i as dt,n as pt,o as ct,p as ht,r as ft,t as mt,u as yt,v as K}from"./step-CVy5FnKg.js";import{t as gt}from"./line-BA7eTS55.js";import{g as S,v as kt,y as ut}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as f,r as m}from"./src-CsZby044.js";import{b as O,h as xt}from"./chunk-ABZYJK2D-0jga8uiE.js";import{n as R,r as v,t as bt}from"./chunk-HN2XXSSU-Bdbi3Mns.js";import{t as wt}from"./chunk-CVBHYZKI-DU48rJVu.js";import{i as Mt,n as Lt}from"./chunk-ATLVNIR6-B17dg7Ry.js";import{n as _t}from"./chunk-JA3XYJ7Z-DOm8KfKa.js";import{d as $t,r as A}from"./chunk-JZLCHNYA-48QVgmR4.js";var St=f((r,t,a,s,n,i)=>{t.arrowTypeStart&&tt(r,"start",t.arrowTypeStart,a,s,n,i),t.arrowTypeEnd&&tt(r,"end",t.arrowTypeEnd,a,s,n,i)},"addEdgeMarkers"),Ot={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},tt=f((r,t,a,s,n,i,e)=>{var l;let o=Ot[a];if(!o){m.warn(`Unknown arrow type: ${a}`);return}let h=`${n}_${i}-${o.type}${t==="start"?"Start":"End"}`;if(e&&e.trim()!==""){let d=`${h}_${e.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(d)){let p=document.getElementById(h);if(p){let c=p.cloneNode(!0);c.id=d,c.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",e),o.fill&&x.setAttribute("fill",e)}),(l=p.parentNode)==null||l.appendChild(c)}}r.attr(`marker-${t}`,`url(${s}#${d})`)}else r.attr(`marker-${t}`,`url(${s}#${h})`)},"addEdgeMarker"),U=new Map,u=new Map,Et=f(()=>{U.clear(),u.clear()},"clear"),q=f(r=>r?r.reduce((t,a)=>t+";"+a,""):"","getLabelStyles"),Pt=f(async(r,t)=>{let a=xt(O().flowchart.htmlLabels),{labelStyles:s}=Mt(t);t.labelStyle=s;let n=await _t(r,t.label,{style:t.labelStyle,useHtmlLabels:a,addSvgBackground:!0,isNode:!1});m.info("abc82",t,t.labelType);let i=r.insert("g").attr("class","edgeLabel"),e=i.insert("g").attr("class","label").attr("data-id",t.id);e.node().appendChild(n);let o=n.getBBox();if(a){let l=n.children[0],d=G(n);o=l.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}e.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),U.set(t.id,i),t.width=o.width,t.height=o.height;let h;if(t.startLabelLeft){let l=await A(t.startLabelLeft,q(t.labelStyle)),d=r.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner");h=p.node().appendChild(l);let c=l.getBBox();p.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),u.get(t.id)||u.set(t.id,{}),u.get(t.id).startLeft=d,T(h,t.startLabelLeft)}if(t.startLabelRight){let l=await A(t.startLabelRight,q(t.labelStyle)),d=r.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner");h=d.node().appendChild(l),p.node().appendChild(l);let c=l.getBBox();p.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),u.get(t.id)||u.set(t.id,{}),u.get(t.id).startRight=d,T(h,t.startLabelRight)}if(t.endLabelLeft){let l=await A(t.endLabelLeft,q(t.labelStyle)),d=r.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner");h=p.node().appendChild(l);let c=l.getBBox();p.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),d.node().appendChild(l),u.get(t.id)||u.set(t.id,{}),u.get(t.id).endLeft=d,T(h,t.endLabelLeft)}if(t.endLabelRight){let l=await A(t.endLabelRight,q(t.labelStyle)),d=r.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner");h=p.node().appendChild(l);let c=l.getBBox();p.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),d.node().appendChild(l),u.get(t.id)||u.set(t.id,{}),u.get(t.id).endRight=d,T(h,t.endLabelRight)}return n},"insertEdgeLabel");function T(r,t){O().flowchart.htmlLabels&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}f(T,"setTerminalWidth");var Tt=f((r,t)=>{m.debug("Moving label abc88 ",r.id,r.label,U.get(r.id),t);let a=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:s}=wt(O());if(r.label){let n=U.get(r.id),i=r.x,e=r.y;if(a){let o=S.calcLabelPosition(a);m.debug("Moving label "+r.label+" from (",i,",",e,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(i=o.x,e=o.y)}n.attr("transform",`translate(${i}, ${e+s/2})`)}if(r.startLabelLeft){let n=u.get(r.id).startLeft,i=r.x,e=r.y;if(a){let o=S.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",a);i=o.x,e=o.y}n.attr("transform",`translate(${i}, ${e})`)}if(r.startLabelRight){let n=u.get(r.id).startRight,i=r.x,e=r.y;if(a){let o=S.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",a);i=o.x,e=o.y}n.attr("transform",`translate(${i}, ${e})`)}if(r.endLabelLeft){let n=u.get(r.id).endLeft,i=r.x,e=r.y;if(a){let o=S.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",a);i=o.x,e=o.y}n.attr("transform",`translate(${i}, ${e})`)}if(r.endLabelRight){let n=u.get(r.id).endRight,i=r.x,e=r.y;if(a){let o=S.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",a);i=o.x,e=o.y}n.attr("transform",`translate(${i}, ${e})`)}},"positionEdgeLabel"),Xt=f((r,t)=>{let a=r.x,s=r.y,n=Math.abs(t.x-a),i=Math.abs(t.y-s),e=r.width/2,o=r.height/2;return n>=e||i>=o},"outsideNode"),Yt=f((r,t,a)=>{m.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(a)}
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let s=r.x,n=r.y,i=Math.abs(s-a.x),e=r.width/2,o=a.x<t.x?e-i:e+i,h=r.height/2,l=Math.abs(t.y-a.y),d=Math.abs(t.x-a.x);if(Math.abs(n-t.y)*e>Math.abs(s-t.x)*h){let p=a.y<t.y?t.y-h-n:n-h-t.y;o=d*p/l;let c={x:a.x<t.x?a.x+o:a.x-d+o,y:a.y<t.y?a.y+l-p:a.y-l+p};return o===0&&(c.x=t.x,c.y=t.y),d===0&&(c.x=t.x),l===0&&(c.y=t.y),m.debug(`abc89 top/bottom calc, Q ${l}, q ${p}, R ${d}, r ${o}`,c),c}else{o=a.x<t.x?t.x-e-s:s-e-t.x;let p=l*o/d,c=a.x<t.x?a.x+d-o:a.x-d+o,x=a.y<t.y?a.y+p:a.y-p;return m.debug(`sides calc abc89, Q ${l}, q ${p}, R ${d}, r ${o}`,{_x:c,_y:x}),o===0&&(c=t.x,x=t.y),d===0&&(c=t.x),l===0&&(x=t.y),{x:c,y:x}}},"intersection"),rt=f((r,t)=>{m.warn("abc88 cutPathAtIntersect",r,t);let a=[],s=r[0],n=!1;return r.forEach(i=>{if(m.info("abc88 checking point",i,t),!Xt(t,i)&&!n){let e=Yt(t,s,i);m.debug("abc88 inside",i,s,e),m.debug("abc88 intersection",e,t);let o=!1;a.forEach(h=>{o||(o=h.x===e.x&&h.y===e.y)}),a.some(h=>h.x===e.x&&h.y===e.y)?m.warn("abc88 no intersect",e,a):a.push(e),n=!0}else m.warn("abc88 outside",i,s),s=i,n||a.push(i)}),m.debug("returning points",a),a},"cutPathAtIntersect");function at(r){let t=[],a=[];for(let s=1;s<r.length-1;s++){let n=r[s-1],i=r[s],e=r[s+1];(n.x===i.x&&i.y===e.y&&Math.abs(i.x-e.x)>5&&Math.abs(i.y-n.y)>5||n.y===i.y&&i.x===e.x&&Math.abs(i.x-n.x)>5&&Math.abs(i.y-e.y)>5)&&(t.push(i),a.push(s))}return{cornerPoints:t,cornerPointPositions:a}}f(at,"extractCornerPoints");var et=f(function(r,t,a){let s=t.x-r.x,n=t.y-r.y,i=a/Math.sqrt(s*s+n*n);return{x:t.x-i*s,y:t.y-i*n}},"findAdjacentPoint"),Wt=f(function(r){let{cornerPointPositions:t}=at(r),a=[];for(let s=0;s<r.length;s++)if(t.includes(s)){let n=r[s-1],i=r[s+1],e=r[s],o=et(n,e,5),h=et(i,e,5),l=h.x-o.x,d=h.y-o.y;a.push(o);let p=Math.sqrt(2)*2,c={x:e.x,y:e.y};Math.abs(i.x-n.x)>10&&Math.abs(i.y-n.y)>=10?(m.debug("Corner point fixing",Math.abs(i.x-n.x),Math.abs(i.y-n.y)),c=e.x===o.x?{x:l<0?o.x-5+p:o.x+5-p,y:d<0?o.y-p:o.y+p}:{x:l<0?o.x-p:o.x+p,y:d<0?o.y-5+p:o.y+5-p}):m.debug("Corner point skipping fixing",Math.abs(i.x-n.x),Math.abs(i.y-n.y)),a.push(c,h)}else a.push(r[s]);return a},"fixCorners"),Ht=f((r,t,a)=>{let s=r-t-a,n=Math.floor(s/4);return`0 ${t} ${Array(n).fill("2 2").join(" ")} ${a}`},"generateDashArray"),Ct=f(function(r,t,a,s,n,i,e,o=!1){var V;let{handDrawnSeed:h}=O(),l=t.points,d=!1,p=n;var c=i;let x=[];for(let k in t.cssCompiledStyles)Lt(k)||x.push(t.cssCompiledStyles[k]);m.debug("UIO intersect check",t.points,c.x,p.x),c.intersect&&p.intersect&&!o&&(l=l.slice(1,t.points.length-1),l.unshift(p.intersect(l[0])),m.debug("Last point UIO",t.start,"-->",t.end,l[l.length-1],c,c.intersect(l[l.length-1])),l.push(c.intersect(l[l.length-1])));let _=btoa(JSON.stringify(l));t.toCluster&&(m.info("to cluster abc88",a.get(t.toCluster)),l=rt(t.points,a.get(t.toCluster).node),d=!0),t.fromCluster&&(m.debug("from cluster abc88",a.get(t.fromCluster),JSON.stringify(l,null,2)),l=rt(l.reverse(),a.get(t.fromCluster).node).reverse(),d=!0);let w=l.filter(k=>!Number.isNaN(k.y));w=Wt(w);let y=J;switch(y=K,t.curve){case"linear":y=K;break;case"basis":y=J;break;case"cardinal":y=ht;break;case"bumpX":y=kt;break;case"bumpY":y=ut;break;case"catmullRom":y=yt;break;case"monotoneX":y=lt;break;case"monotoneY":y=ct;break;case"natural":y=dt;break;case"step":y=ft;break;case"stepAfter":y=mt;break;case"stepBefore":y=pt;break;default:y=J}let{x:X,y:Y}=bt(t),N=gt().x(X).y(Y).curve(y),b;switch(t.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(t.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let g,L=t.curve==="rounded"?it(nt(w,t),5):N(w),M=Array.isArray(t.style)?t.style:[t.style],W=M.find(k=>k==null?void 0:k.startsWith("stroke:")),H=!1;if(t.look==="handDrawn"){let k=$t.svg(r);Object.assign([],w);let C=k.path(L,{roughness:.3,seed:h});b+=" transition",g=G(C).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",M?M.reduce((B,z)=>B+";"+z,""):"");let E=g.attr("d");g.attr("d",E),r.node().appendChild(g.node())}else{let k=x.join(";"),C=M?M.reduce((P,j)=>P+j+";",""):"",E="";t.animate&&(E=" edge-animation-fast"),t.animation&&(E=" edge-animation-"+t.animation);let B=(k?k+";"+C+";":C)+";"+(M?M.reduce((P,j)=>P+";"+j,""):"");g=r.append("path").attr("d",L).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(E??"")).attr("style",B),W=(V=B.match(/stroke:([^;]+)/))==null?void 0:V[1],H=t.animate===!0||!!t.animation||k.includes("animation");let z=g.node(),F=typeof z.getTotalLength=="function"?z.getTotalLength():0,Z=v[t.arrowTypeStart]||0,I=v[t.arrowTypeEnd]||0;if(t.look==="neo"&&!H){let P=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Ht(F,Z,I):`0 ${Z} ${F-Z-I} ${I}`}; stroke-dashoffset: 0;`;g.attr("style",P+g.attr("style"))}}g.attr("data-edge",!0),g.attr("data-et","edge"),g.attr("data-id",t.id),g.attr("data-points",_),t.showPoints&&w.forEach(k=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",k.x).attr("cy",k.y)});let $="";(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&($=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,$=$.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),m.info("arrowTypeStart",t.arrowTypeStart),m.info("arrowTypeEnd",t.arrowTypeEnd),St(g,t,$,e,s,W);let st=Math.floor(l.length/2),ot=l[st];S.isLabelCoordinateInPath(ot,g.attr("d"))||(d=!0);let Q={};return d&&(Q.updatedPath=l),Q.originalPath=t.points,Q},"insertEdge");function it(r,t){if(r.length<2)return"";let a="",s=r.length,n=1e-5;for(let i=0;i<s;i++){let e=r[i],o=r[i-1],h=r[i+1];if(i===0)a+=`M${e.x},${e.y}`;else if(i===s-1)a+=`L${e.x},${e.y}`;else{let l=e.x-o.x,d=e.y-o.y,p=h.x-e.x,c=h.y-e.y,x=Math.hypot(l,d),_=Math.hypot(p,c);if(x<n||_<n){a+=`L${e.x},${e.y}`;continue}let w=l/x,y=d/x,X=p/_,Y=c/_,N=w*X+y*Y,b=Math.max(-1,Math.min(1,N)),g=Math.acos(b);if(g<n||Math.abs(Math.PI-g)<n){a+=`L${e.x},${e.y}`;continue}let L=Math.min(t/Math.sin(g/2),x/2,_/2),M=e.x-w*L,W=e.y-y*L,H=e.x+X*L,$=e.y+Y*L;a+=`L${M},${W}`,a+=`Q${e.x},${e.y} ${H},${$}`}}return a}f(it,"generateRoundedPath");function D(r,t){if(!r||!t)return{angle:0,deltaX:0,deltaY:0};let a=t.x-r.x,s=t.y-r.y;return{angle:Math.atan2(s,a),deltaX:a,deltaY:s}}f(D,"calculateDeltaAndAngle");function nt(r,t){let a=r.map(n=>({...n}));if(r.length>=2&&R[t.arrowTypeStart]){let n=R[t.arrowTypeStart],i=r[0],e=r[1],{angle:o}=D(i,e),h=n*Math.cos(o),l=n*Math.sin(o);a[0].x=i.x+h,a[0].y=i.y+l}let s=r.length;if(s>=2&&R[t.arrowTypeEnd]){let n=R[t.arrowTypeEnd],i=r[s-1],e=r[s-2],{angle:o}=D(e,i),h=n*Math.cos(o),l=n*Math.sin(o);a[s-1].x=i.x-h,a[s-1].y=i.y-l}return a}f(nt,"applyMarkerOffsetsToPoints");var Bt=f((r,t,a,s)=>{t.forEach(n=>{zt[n](r,a,s)})},"insertMarkers"),zt={extension:f((r,t,a)=>{m.trace("Making markers for ",a),r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),composition:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),aggregation:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),dependency:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),lollipop:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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),r.append("defs").append("marker").attr("id",a+"_"+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"),point:f((r,t,a)=>{r.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).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"),r.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).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"),circle:f((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),cross:f((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),barb:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:f((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let n=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:f((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let n=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
L20,10
M20,10
L0,20`)},"requirement_arrow"),requirement_contains:f((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},Rt=Bt;export{Tt as a,Rt as i,Ct as n,Pt as r,Et as t};
var t;import{n as s}from"./src-CsZby044.js";var r=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{r as t};
var g;import{t as V}from"./merge-BBX6ug-N.js";import{t as $}from"./memoize-BCOZVFBt.js";import{u as Z}from"./src-CvyFXpBy.js";import{_ as tt,a as et,c as rt,d as it,f as nt,g as at,h as ot,i as st,l as lt,m as ct,n as ht,o as ut,p as ft,r as dt,s as gt,t as xt,u as pt,v as yt}from"./step-CVy5FnKg.js";import{n as s,r as y}from"./src-CsZby044.js";import{F as mt,f as vt,m as v,r as A,s as M}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as _t}from"./dist-C1VXabOr.js";var E=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function N(e){return new E(e,!0)}function P(e){return new E(e,!1)}var $t=_t(),Mt="\u200B",bt={curveBasis:tt,curveBasisClosed:at,curveBasisOpen:ot,curveBumpX:N,curveBumpY:P,curveBundle:ct,curveCardinalClosed:nt,curveCardinalOpen:it,curveCardinal:ft,curveCatmullRomClosed:lt,curveCatmullRomOpen:rt,curveCatmullRom:pt,curveLinear:yt,curveLinearClosed:gt,curveMonotoneX:et,curveMonotoneY:ut,curveNatural:st,curveStep:dt,curveStepAfter:xt,curveStepBefore:ht},wt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,St=s(function(e,t){let r=D(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let o=r.map(l=>l.args);mt(o),i=A(i,[...o])}else i=r.args;if(!i)return;let a=vt(e,t),n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),D=s(function(e,t=null){var r,i;try{let a=RegExp(`[%]{2}(?![{]${wt.source})(?=[}][%]{2}).*
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),y.debug(`Detecting diagram directive${t===null?"":" type:"+t} based on the text:${e}`);let n,o=[];for(;(n=v.exec(e))!==null;)if(n.index===v.lastIndex&&v.lastIndex++,n&&!t||t&&((r=n[1])==null?void 0:r.match(t))||t&&((i=n[2])==null?void 0:i.match(t))){let l=n[1]?n[1]:n[2],c=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:l,args:c})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return y.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Ct=s(function(e){return e.replace(v,"")},"removeDirectives"),It=s(function(e,t){for(let[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function b(e,t){return e?bt[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}s(b,"interpolateToCurve");function H(e,t){let r=e.trim();if(r)return t.securityLevel==="loose"?r:(0,$t.sanitizeUrl)(r)}s(H,"formatUrl");var Tt=s((e,...t)=>{let r=e.split("."),i=r.length-1,a=r[i],n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n){y.error(`Function name: ${e} not found in window`);return}n[a](...t)},"runFunc");function w(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}s(w,"distance");function L(e){let t,r=0;return e.forEach(i=>{r+=w(i,t),t=i}),S(e,r/2)}s(L,"traverseEdge");function R(e){return e.length===1?e[0]:L(e)}s(R,"calcLabelPosition");var O=s((e,t=2)=>{let r=10**t;return Math.round(e*r)/r},"roundNumber"),S=s((e,t)=>{let r,i=t;for(let a of e){if(r){let n=w(a,r);if(n===0)return r;if(n<i)i-=n;else{let o=i/n;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:O((1-o)*r.x+o*a.x,5),y:O((1-o)*r.y+o*a.y,5)}}}r=a}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Bt=s((e,t,r)=>{y.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=S(t,25),a=e?10:5,n=Math.atan2(t[0].y-i.y,t[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+i.x)/2,o.y=-Math.cos(n)*a+(t[0].y+i.y)/2,o},"calcCardinalityPosition");function j(e,t,r){let i=structuredClone(r);y.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();let a=S(i,25+e),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2),l}s(j,"calcTerminalLabelPosition");function C(e){let t="",r="";for(let i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}s(C,"getStylesFromArray");var k=0,U=s(()=>(k++,"id-"+Math.random().toString(36).substr(2,12)+"-"+k),"generateId");function G(e){let t="";for(let r=0;r<e;r++)t+="0123456789abcdef".charAt(Math.floor(Math.random()*16));return t}s(G,"makeRandomHex");var J=s(e=>G(e.length),"random"),Wt=s(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Ft=s(function(e,t){let r=t.text.replace(M.lineBreakRegex," "),[,i]=_(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);let n=a.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.attr("fill",t.fill),n.text(r),a},"drawSimpleText"),X=$((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),M.lineBreakRegex.test(e)))return e;let i=e.split(" ").filter(Boolean),a=[],n="";return i.forEach((o,l)=>{let c=d(`${o} `,r),h=d(n,r);if(c>t){let{hyphenatedStrings:u,remainingWord:x}=zt(o,t,"-",r);a.push(n,...u),n=x}else h+c>=t?(a.push(n),n=o):n=[n,o].filter(Boolean).join(" ");l+1===i.length&&a.push(n)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),zt=$((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let a=[...e],n=[],o="";return a.forEach((l,c)=>{let h=`${o}${l}`;if(d(h,i)>=t){let u=c+1,x=a.length===u,p=`${h}${r}`;n.push(x?h:p),o=""}else o=h}),{hyphenatedStrings:n,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function I(e,t){return T(e,t).height}s(I,"calculateTextHeight");function d(e,t){return T(e,t).width}s(d,"calculateTextWidth");var T=$((e,t)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,n]=_(r),o=["sans-serif",i],l=e.split(M.lineBreakRegex),c=[],h=Z("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let u=h.append("svg");for(let x of o){let p=0,f={width:0,height:0,lineHeight:0};for(let Q of l){let F=Wt();F.text=Q||"\u200B";let z=Ft(u,F).style("font-size",n).style("font-weight",a).style("font-family",x),m=(z._groups||z)[0][0].getBBox();if(m.width===0&&m.height===0)throw Error("svg element not in render tree");f.width=Math.round(Math.max(f.width,m.width)),p=Math.round(m.height),f.height+=p,f.lineHeight=Math.round(Math.max(f.lineHeight,p))}c.push(f)}return u.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),At=(g=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},s(g,"InitIDGenerator"),g),B,Et=s(function(e){return B||(B=document.createElement("div")),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),B.innerHTML=e,unescape(B.textContent)},"entityDecode");function Y(e){return"str"in e}s(Y,"isDetailedError");var Nt=s((e,t,r,i)=>{var n;if(!i)return;let a=(n=e.node())==null?void 0:n.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),_=s(e=>{if(typeof e=="number")return[e,e+"px"];let t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function W(e,t){return V({},e,t)}s(W,"cleanAndMerge");var Pt={assignWithDepth:A,wrapLabel:X,calculateTextHeight:I,calculateTextWidth:d,calculateTextDimensions:T,cleanAndMerge:W,detectInit:St,detectDirective:D,isSubstringInArray:It,interpolateToCurve:b,calcLabelPosition:R,calcCardinalityPosition:Bt,calcTerminalLabelPosition:j,formatUrl:H,getStylesFromArray:C,generateId:U,random:J,runFunc:Tt,entityDecode:Et,insertTitle:Nt,isLabelCoordinateInPath:K,parseFontSize:_,InitIDGenerator:At},Dt=s(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){let i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),Ht=s(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Lt=s((e,t,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function q(e){return e??null}s(q,"handleUndefinedAttr");function K(e,t){let r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,n=>Math.round(parseFloat(n)).toString());return a.includes(r.toString())||a.includes(i.toString())}s(K,"isLabelCoordinateInPath");export{X as _,Ht as a,Lt as c,b as d,Y as f,Pt as g,Ct as h,W as i,C as l,J as m,I as n,Dt as o,_ as p,d as r,U as s,Mt as t,q as u,N as v,P as y};
var e;import{a as c,f as r,g as u,h as p,i as h,m as t,p as l,s as d,t as G}from"./chunk-FPAJGGOC-DOBSZjU2.js";var v=(e=class extends G{constructor(){super(["gitGraph"])}},r(e,"GitGraphTokenBuilder"),e),i={parser:{TokenBuilder:r(()=>new v,"TokenBuilder"),ValueConverter:r(()=>new h,"ValueConverter")}};function n(o=l){let a=t(u(o),d),s=t(p({shared:a}),c,i);return a.ServiceRegistry.register(s),{shared:a,GitGraph:s}}r(n,"createGitGraphServices");export{n,i as t};
var e,r;import{f as t,g as c,h as l,l as d,m as n,n as p,p as v,s as h,t as m}from"./chunk-FPAJGGOC-DOBSZjU2.js";var C=(e=class extends m{constructor(){super(["pie","showData"])}},t(e,"PieTokenBuilder"),e),f=(r=class extends p{runCustomConverter(s,a,P){if(s.name==="PIE_SECTION_LABEL")return a.replace(/"/g,"").trim()}},t(r,"PieValueConverter"),r),i={parser:{TokenBuilder:t(()=>new C,"TokenBuilder"),ValueConverter:t(()=>new f,"ValueConverter")}};function o(u=v){let s=n(c(u),h),a=n(l({shared:s}),d,i);return s.ServiceRegistry.register(a),{shared:s,Pie:a}}t(o,"createPieServices");export{o as n,i as t};
import{n as l}from"./src-CsZby044.js";import{k as n}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as d}from"./dist-C1VXabOr.js";var x=d(),o=l((s,t)=>{let a=s.append("rect");if(a.attr("x",t.x),a.attr("y",t.y),a.attr("fill",t.fill),a.attr("stroke",t.stroke),a.attr("width",t.width),a.attr("height",t.height),t.name&&a.attr("name",t.name),t.rx&&a.attr("rx",t.rx),t.ry&&a.attr("ry",t.ry),t.attrs!==void 0)for(let r in t.attrs)a.attr(r,t.attrs[r]);return t.class&&a.attr("class",t.class),a},"drawRect"),h=l((s,t)=>{o(s,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=l((s,t)=>{let a=t.text.replace(n," "),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);let e=r.append("tspan");return e.attr("x",t.x+t.textMargin*2),e.text(a),r},"drawText"),p=l((s,t,a,r)=>{let e=s.append("image");e.attr("x",t),e.attr("y",a);let i=(0,x.sanitizeUrl)(r);e.attr("xlink:href",i)},"drawImage"),y=l((s,t,a,r)=>{let e=s.append("use");e.attr("x",t),e.attr("y",a);let i=(0,x.sanitizeUrl)(r);e.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),g=l(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),m=l(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{c as a,o as i,y as n,g as o,p as r,m as s,h as t};
var s={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}};export{s as t};
import{t as c}from"./createLucideIcon-BCdY6lG5.js";var e=c("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);export{e as t};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var r=a("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);export{r as t};
import{t as e}from"./createLucideIcon-BCdY6lG5.js";var c=e("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);export{c as t};
import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as t}from"./src-CsZby044.js";import"./chunk-ABZYJK2D-0jga8uiE.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import"./chunk-N4CR4FBY-BNoQB557.js";import"./chunk-FMBD7UC4-CHJv683r.js";import"./chunk-55IACEB6-njZIr50E.js";import"./chunk-QN33PNHL-BOQncxfy.js";import{i,n as o,r as m,t as p}from"./chunk-B4BG7PRW-DoVbcCDm.js";var a={parser:o,get db(){return new p},renderer:m,styles:i,init:t(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{a as diagram};
import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as t}from"./src-CsZby044.js";import"./chunk-ABZYJK2D-0jga8uiE.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import"./chunk-N4CR4FBY-BNoQB557.js";import"./chunk-FMBD7UC4-CHJv683r.js";import"./chunk-55IACEB6-njZIr50E.js";import"./chunk-QN33PNHL-BOQncxfy.js";import{i,n as o,r as m,t as p}from"./chunk-B4BG7PRW-DoVbcCDm.js";var a={parser:o,get db(){return new p},renderer:m,styles:i,init:t(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{a as diagram};
import{s as n}from"./chunk-LvLJmgfZ.js";import{t as c}from"./compiler-runtime-B3qBwwSJ.js";import{t as e}from"./jsx-runtime-ZmTK25f3.js";import{t as l}from"./cn-BKtXLv3a.js";var m=c(),i=n(e(),1);const d=a=>{let t=(0,m.c)(6),r=a.dataTestId,o;t[0]===a.className?o=t[1]:(o=l("text-xs font-semibold text-accent-foreground",a.className),t[0]=a.className,t[1]=o);let s;return t[2]!==a.dataTestId||t[3]!==a.onClick||t[4]!==o?(s=(0,i.jsx)("button",{type:"button","data-testid":r,className:o,onClick:a.onClick,children:"Clear"}),t[2]=a.dataTestId,t[3]=a.onClick,t[4]=o,t[5]=s):s=t[5],s};export{d as t};
var se=Object.defineProperty;var le=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var y=(e,t,r)=>le(e,typeof t!="symbol"?t+"":t,r);var h;import{s as A,t as l}from"./chunk-LvLJmgfZ.js";import{t as ue}from"./react-Bj1aDYRI.js";function D(e="This should not happen"){throw Error(e)}function de(e,t="Assertion failed"){if(!e)return D(t)}function L(e,t){return D(t??"Hell froze over")}function ce(e,t){try{return e()}catch{return t}}var M=Object.prototype.hasOwnProperty;function B(e,t){let r,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&B(e[n],t[n]););return n===-1}if(!r||typeof e=="object"){for(r in n=0,e)if(M.call(e,r)&&++n&&!M.call(t,r)||!(r in t)||!B(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}var pe=l(((e,t)=>{var r=Object.prototype.hasOwnProperty;function n(o,i){return o!=null&&r.call(o,i)}t.exports=n})),x=l(((e,t)=>{t.exports=Array.isArray})),N=l(((e,t)=>{t.exports=typeof global=="object"&&global&&global.Object===Object&&global})),F=l(((e,t)=>{var r=N(),n=typeof self=="object"&&self&&self.Object===Object&&self;t.exports=r||n||Function("return this")()})),_=l(((e,t)=>{t.exports=F().Symbol})),fe=l(((e,t)=>{var r=_(),n=Object.prototype,o=n.hasOwnProperty,i=n.toString,a=r?r.toStringTag:void 0;function s(d){var u=o.call(d,a),c=d[a];try{d[a]=void 0;var p=!0}catch{}var b=i.call(d);return p&&(u?d[a]=c:delete d[a]),b}t.exports=s})),he=l(((e,t)=>{var r=Object.prototype.toString;function n(o){return r.call(o)}t.exports=n})),w=l(((e,t)=>{var r=_(),n=fe(),o=he(),i="[object Null]",a="[object Undefined]",s=r?r.toStringTag:void 0;function d(u){return u==null?u===void 0?a:i:s&&s in Object(u)?n(u):o(u)}t.exports=d})),k=l(((e,t)=>{function r(n){return typeof n=="object"&&!!n}t.exports=r})),S=l(((e,t)=>{var r=w(),n=k(),o="[object Symbol]";function i(a){return typeof a=="symbol"||n(a)&&r(a)==o}t.exports=i})),U=l(((e,t)=>{var r=x(),n=S(),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function a(s,d){if(r(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||n(s)?!0:i.test(s)||!o.test(s)||d!=null&&s in Object(d)}t.exports=a})),z=l(((e,t)=>{function r(n){var o=typeof n;return n!=null&&(o=="object"||o=="function")}t.exports=r})),V=l(((e,t)=>{var r=w(),n=z(),o="[object AsyncFunction]",i="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function d(u){if(!n(u))return!1;var c=r(u);return c==i||c==a||c==o||c==s}t.exports=d})),ge=l(((e,t)=>{t.exports=F()["__core-js_shared__"]})),ve=l(((e,t)=>{var r=ge(),n=(function(){var i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function o(i){return!!n&&n in i}t.exports=o})),G=l(((e,t)=>{var r=Function.prototype.toString;function n(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=n})),be=l(((e,t)=>{var r=V(),n=ve(),o=z(),i=G(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,d=Function.prototype,u=Object.prototype,c=d.toString,p=u.hasOwnProperty,b=RegExp("^"+c.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(v){return!o(v)||n(v)?!1:(r(v)?b:s).test(i(v))}t.exports=g})),me=l(((e,t)=>{function r(n,o){return n==null?void 0:n[o]}t.exports=r})),R=l(((e,t)=>{var r=be(),n=me();function o(i,a){var s=n(i,a);return r(s)?s:void 0}t.exports=o})),H=l(((e,t)=>{t.exports=R()(Object,"create")})),ye=l(((e,t)=>{var r=H();function n(){this.__data__=r?r(null):{},this.size=0}t.exports=n})),xe=l(((e,t)=>{function r(n){var o=this.has(n)&&delete this.__data__[n];return this.size-=o?1:0,o}t.exports=r})),Fe=l(((e,t)=>{var r=H(),n="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;function i(a){var s=this.__data__;if(r){var d=s[a];return d===n?void 0:d}return o.call(s,a)?s[a]:void 0}t.exports=i})),_e=l(((e,t)=>{var r=H(),n=Object.prototype.hasOwnProperty;function o(i){var a=this.__data__;return r?a[i]!==void 0:n.call(a,i)}t.exports=o})),we=l(((e,t)=>{var r=H(),n="__lodash_hash_undefined__";function o(i,a){var s=this.__data__;return this.size+=this.has(i)?0:1,s[i]=r&&a===void 0?n:a,this}t.exports=o})),ke=l(((e,t)=>{var r=ye(),n=xe(),o=Fe(),i=_e(),a=we();function s(d){var u=-1,c=d==null?0:d.length;for(this.clear();++u<c;){var p=d[u];this.set(p[0],p[1])}}s.prototype.clear=r,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),Se=l(((e,t)=>{function r(){this.__data__=[],this.size=0}t.exports=r})),J=l(((e,t)=>{function r(n,o){return n===o||n!==n&&o!==o}t.exports=r})),O=l(((e,t)=>{var r=J();function n(o,i){for(var a=o.length;a--;)if(r(o[a][0],i))return a;return-1}t.exports=n})),He=l(((e,t)=>{var r=O(),n=Array.prototype.splice;function o(i){var a=this.__data__,s=r(a,i);return s<0?!1:(s==a.length-1?a.pop():n.call(a,s,1),--this.size,!0)}t.exports=o})),Oe=l(((e,t)=>{var r=O();function n(o){var i=this.__data__,a=r(i,o);return a<0?void 0:i[a][1]}t.exports=n})),Ce=l(((e,t)=>{var r=O();function n(o){return r(this.__data__,o)>-1}t.exports=n})),je=l(((e,t)=>{var r=O();function n(o,i){var a=this.__data__,s=r(a,o);return s<0?(++this.size,a.push([o,i])):a[s][1]=i,this}t.exports=n})),q=l(((e,t)=>{var r=Se(),n=He(),o=Oe(),i=Ce(),a=je();function s(d){var u=-1,c=d==null?0:d.length;for(this.clear();++u<c;){var p=d[u];this.set(p[0],p[1])}}s.prototype.clear=r,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),W=l(((e,t)=>{t.exports=R()(F(),"Map")})),Ee=l(((e,t)=>{var r=ke(),n=q(),o=W();function i(){this.size=0,this.__data__={hash:new r,map:new(o||n),string:new r}}t.exports=i})),$e=l(((e,t)=>{function r(n){var o=typeof n;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?n!=="__proto__":n===null}t.exports=r})),C=l(((e,t)=>{var r=$e();function n(o,i){var a=o.__data__;return r(i)?a[typeof i=="string"?"string":"hash"]:a.map}t.exports=n})),Be=l(((e,t)=>{var r=C();function n(o){var i=r(this,o).delete(o);return this.size-=i?1:0,i}t.exports=n})),ze=l(((e,t)=>{var r=C();function n(o){return r(this,o).get(o)}t.exports=n})),Re=l(((e,t)=>{var r=C();function n(o){return r(this,o).has(o)}t.exports=n})),Ie=l(((e,t)=>{var r=C();function n(o,i){var a=r(this,o),s=a.size;return a.set(o,i),this.size+=a.size==s?0:1,this}t.exports=n})),K=l(((e,t)=>{var r=Ee(),n=Be(),o=ze(),i=Re(),a=Ie();function s(d){var u=-1,c=d==null?0:d.length;for(this.clear();++u<c;){var p=d[u];this.set(p[0],p[1])}}s.prototype.clear=r,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),Pe=l(((e,t)=>{var r=K(),n="Expected a function";function o(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw TypeError(n);var s=function(){var d=arguments,u=a?a.apply(this,d):d[0],c=s.cache;if(c.has(u))return c.get(u);var p=i.apply(this,d);return s.cache=c.set(u,p)||c,p};return s.cache=new(o.Cache||r),s}o.Cache=r,t.exports=o})),Te=l(((e,t)=>{var r=Pe(),n=500;function o(i){var a=r(i,function(d){return s.size===n&&s.clear(),d}),s=a.cache;return a}t.exports=o})),Ae=l(((e,t)=>{var r=Te(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;t.exports=r(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(n,function(s,d,u,c){a.push(u?c.replace(o,"$1"):d||s)}),a})})),De=l(((e,t)=>{function r(n,o){for(var i=-1,a=n==null?0:n.length,s=Array(a);++i<a;)s[i]=o(n[i],i,n);return s}t.exports=r})),Le=l(((e,t)=>{var r=_(),n=De(),o=x(),i=S(),a=1/0,s=r?r.prototype:void 0,d=s?s.toString:void 0;function u(c){if(typeof c=="string")return c;if(o(c))return n(c,u)+"";if(i(c))return d?d.call(c):"";var p=c+"";return p=="0"&&1/c==-a?"-0":p}t.exports=u})),Me=l(((e,t)=>{var r=Le();function n(o){return o==null?"":r(o)}t.exports=n})),Q=l(((e,t)=>{var r=x(),n=U(),o=Ae(),i=Me();function a(s,d){return r(s)?s:n(s,d)?[s]:o(i(s))}t.exports=a})),Ne=l(((e,t)=>{var r=w(),n=k(),o="[object Arguments]";function i(a){return n(a)&&r(a)==o}t.exports=i})),X=l(((e,t)=>{var r=Ne(),n=k(),o=Object.prototype,i=o.hasOwnProperty,a=o.propertyIsEnumerable;t.exports=r((function(){return arguments})())?r:function(s){return n(s)&&i.call(s,"callee")&&!a.call(s,"callee")}})),Y=l(((e,t)=>{var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function o(i,a){var s=typeof i;return a??(a=r),!!a&&(s=="number"||s!="symbol"&&n.test(i))&&i>-1&&i%1==0&&i<a}t.exports=o})),Z=l(((e,t)=>{var r=9007199254740991;function n(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=r}t.exports=n})),ee=l(((e,t)=>{var r=S(),n=1/0;function o(i){if(typeof i=="string"||r(i))return i;var a=i+"";return a=="0"&&1/i==-n?"-0":a}t.exports=o})),te=l(((e,t)=>{var r=Q(),n=X(),o=x(),i=Y(),a=Z(),s=ee();function d(u,c,p){c=r(c,u);for(var b=-1,g=c.length,v=!1;++b<g;){var $=s(c[b]);if(!(v=u!=null&&p(u,$)))break;u=u[$]}return v||++b!=g?v:(g=u==null?0:u.length,!!g&&a(g)&&i($,g)&&(o(u)||n(u)))}t.exports=d})),Ue=A(l(((e,t)=>{var r=pe(),n=te();function o(i,a){return i!=null&&n(i,a,r)}t.exports=o}))(),1);const Ve=null,Ge=void 0;var f;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(f||(f={}));var re;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(re||(re={}));var ne;(function(e){e.Triangle="triangle",e.Dots="dots"})(ne||(ne={}));function Je(e){return"width"in e&&typeof e.width=="number"}async function qe(e){return typeof e=="object"?e:await e()}function oe(e){return!(e.kind===f.Loading||e.kind===f.Bubble||e.kind===f.RowID||e.kind===f.Protected||e.kind===f.Drilldown)}function We(e){return e.kind===j.Marker||e.kind===j.NewRow}function Ke(e){if(!oe(e)||e.kind===f.Image)return!1;if(e.kind===f.Text||e.kind===f.Number||e.kind===f.Markdown||e.kind===f.Uri||e.kind===f.Custom||e.kind===f.Boolean)return e.readonly!==!0;L(e,"A cell was passed with an invalid kind")}function Qe(e){return(0,Ue.default)(e,"editor")}function Xe(e){return!(e.readonly??!1)}var j;(function(e){e.NewRow="new-row",e.Marker="marker"})(j||(j={}));function Ye(e){if(e.length===0)return[];let t=[...e],r=[];t.sort(function(n,o){return n[0]-o[0]}),r.push([...t[0]]);for(let n of t.slice(1)){let o=r[r.length-1];o[1]<n[0]?r.push([...n]):o[1]<n[1]&&(o[1]=n[1])}return r}var Ze,et=(h=class{constructor(t){y(this,"items");this.items=t}offset(t){return t===0?this:new h(this.items.map(r=>[r[0]+t,r[1]+t]))}add(t){let r=typeof t=="number"?[t,t+1]:t;return new h(Ye([...this.items,r]))}remove(t){let r=[...this.items],n=typeof t=="number"?t:t[0],o=typeof t=="number"?t+1:t[1];for(let[i,a]of r.entries()){let[s,d]=a;if(s<=o&&n<=d){let u=[];s<n&&u.push([s,n]),o<d&&u.push([o,d]),r.splice(i,1,...u)}}return new h(r)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(t){for(let r=0;r<this.items.length;r++){let[n,o]=this.items[r];if(t>=n&&t<o)return!0}return!1}hasAll(t){for(let r=t[0];r<t[1];r++)if(!this.hasIndex(r))return!1;return!0}some(t){for(let r of this)if(t(r))return!0;return!1}equals(t){if(t===this)return!0;if(t.items.length!==this.items.length)return!1;for(let r=0;r<this.items.length;r++){let n=t.items[r],o=this.items[r];if(n[0]!==o[0]||n[1]!==o[1])return!1}return!0}toArray(){let t=[];for(let[r,n]of this.items)for(let o=r;o<n;o++)t.push(o);return t}get length(){let t=0;for(let[r,n]of this.items)t+=n-r;return t}*[Symbol.iterator](){for(let[t,r]of this.items)for(let n=t;n<r;n++)yield n}},y(h,"empty",()=>Ze??(Ze=new h([]))),y(h,"fromSingleSelection",t=>h.empty().add(t)),h),I={},m=null;function tt(){let e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function P(e){let t=e.toLowerCase().trim();if(I[t]!==void 0)return I[t];m||(m=tt()),m.style.color="#000",m.style.color=t;let r=getComputedStyle(m).color;m.style.color="#fff",m.style.color=t;let n=getComputedStyle(m).color;if(n!==r)return[0,0,0,1];let o=n.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return o.length<4&&o.push(1),o=o.map(i=>Number.isNaN(i)?0:i),I[t]=o,o}function rt(e,t){let[r,n,o]=P(e);return`rgba(${r}, ${n}, ${o}, ${t})`}var ie=new Map;function nt(e,t){let r=`${e}-${t}`,n=ie.get(r);if(n!==void 0)return n;let o=T(e,t);return ie.set(r,o),o}function T(e,t){if(t===void 0)return e;let[r,n,o,i]=P(e);if(i===1)return e;let[a,s,d,u]=P(t),c=i+u*(1-i);return`rgba(${(i*r+u*a*(1-i))/c}, ${(i*n+u*s*(1-i))/c}, ${(i*o+u*d*(1-i))/c}, ${c})`}var E=A(ue(),1);function ot(e){return{"--gdg-accent-color":e.accentColor,"--gdg-accent-fg":e.accentFg,"--gdg-accent-light":e.accentLight,"--gdg-text-dark":e.textDark,"--gdg-text-medium":e.textMedium,"--gdg-text-light":e.textLight,"--gdg-text-bubble":e.textBubble,"--gdg-bg-icon-header":e.bgIconHeader,"--gdg-fg-icon-header":e.fgIconHeader,"--gdg-text-header":e.textHeader,"--gdg-text-group-header":e.textGroupHeader??e.textHeader,"--gdg-text-header-selected":e.textHeaderSelected,"--gdg-bg-cell":e.bgCell,"--gdg-bg-cell-medium":e.bgCellMedium,"--gdg-bg-header":e.bgHeader,"--gdg-bg-header-has-focus":e.bgHeaderHasFocus,"--gdg-bg-header-hovered":e.bgHeaderHovered,"--gdg-bg-bubble":e.bgBubble,"--gdg-bg-bubble-selected":e.bgBubbleSelected,"--gdg-bg-search-result":e.bgSearchResult,"--gdg-border-color":e.borderColor,"--gdg-horizontal-border-color":e.horizontalBorderColor??e.borderColor,"--gdg-drilldown-border":e.drilldownBorder,"--gdg-link-color":e.linkColor,"--gdg-cell-horizontal-padding":`${e.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${e.cellVerticalPadding}px`,"--gdg-header-font-style":e.headerFontStyle,"--gdg-base-font-style":e.baseFontStyle,"--gdg-marker-font-style":e.markerFontStyle,"--gdg-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize,...e.resizeIndicatorColor===void 0?{}:{"--gdg-resize-indicator-color":e.resizeIndicatorColor},...e.headerBottomBorderColor===void 0?{}:{"--gdg-header-bottom-border-color":e.headerBottomBorderColor},...e.roundingRadius===void 0?{}:{"--gdg-rounding-radius":`${e.roundingRadius}px`}}}var ae={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#353fb5",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};function it(){return ae}const at=E.createContext(ae);function st(e,...t){let r={...e};for(let n of t)if(n!==void 0)for(let o in n)n.hasOwnProperty(o)&&(o==="bgCell"?r[o]=T(n[o],r[o]):r[o]=n[o]);return(r.headerFontFull===void 0||e.fontFamily!==r.fontFamily||e.headerFontStyle!==r.headerFontStyle)&&(r.headerFontFull=`${r.headerFontStyle} ${r.fontFamily}`),(r.baseFontFull===void 0||e.fontFamily!==r.fontFamily||e.baseFontStyle!==r.baseFontStyle)&&(r.baseFontFull=`${r.baseFontStyle} ${r.fontFamily}`),(r.markerFontFull===void 0||e.fontFamily!==r.fontFamily||e.markerFontStyle!==r.markerFontStyle)&&(r.markerFontFull=`${r.markerFontStyle} ${r.fontFamily}`),r}var lt=class extends E.PureComponent{constructor(){super(...arguments);y(this,"wrapperRef",E.createRef());y(this,"clickOutside",t=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(t))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(t.target)){let r=t.target;for(;r!==null;){if(r.classList.contains("click-outside-ignore"))return;r=r.parentElement}this.props.onClickOutside()}})}componentDidMount(){let t=this.props.customEventTarget??document;t.addEventListener("touchend",this.clickOutside,!0),t.addEventListener("mousedown",this.clickOutside,!0),t.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){let t=this.props.customEventTarget??document;t.removeEventListener("touchend",this.clickOutside,!0),t.removeEventListener("mousedown",this.clickOutside,!0),t.removeEventListener("contextmenu",this.clickOutside,!0)}render(){let{onClickOutside:t,isOutsideClick:r,customEventTarget:n,...o}=this.props;return E.createElement("div",{...o,ref:this.wrapperRef},this.props.children)}};export{W as A,w as B,te as C,X as D,Y as E,V as F,de as G,F as H,z as I,ce as J,L as K,U as L,J as M,R as N,Q as O,G as P,S as R,qe as S,Z as T,N as U,_ as V,x as W,oe as _,st as a,Ke as b,rt as c,et as d,f,Xe as g,j as h,ot as i,q as j,K as k,Ve as l,ne as m,at as n,T as o,re as p,B as q,it as r,nt as s,lt as t,Ge as u,We as v,ee as w,Je as x,Qe as y,k as z};
function F(e,t,n,s,c,f){this.indented=e,this.column=t,this.type=n,this.info=s,this.align=c,this.prev=f}function I(e,t,n,s){var c=e.indented;return e.context&&e.context.type=="statement"&&n!="statement"&&(c=e.context.indented),e.context=new F(c,t,n,s,null,e.context)}function x(e){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}function V(e,t,n){if(t.prevToken=="variable"||t.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||t.typeAtEndOfLine&&e.column()==e.indentation())return!0}function P(e){for(;;){if(!e||e.type=="top")return!0;if(e.type=="}"&&e.prev.info!="namespace")return!1;e=e.prev}}function m(e){var t=e.statementIndentUnit,n=e.dontAlignCalls,s=e.keywords||{},c=e.types||{},f=e.builtin||{},b=e.blockKeywords||{},_=e.defKeywords||{},v=e.atoms||{},h=e.hooks||{},ne=e.multiLineStrings,re=e.indentStatements!==!1,ae=e.indentSwitch!==!1,R=e.namespaceSeparator,ie=e.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,oe=e.numberStart||/[\d\.]/,le=e.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,A=e.isOperatorChar||/[+\-*&%=<>!?|\/]/,j=e.isIdentifierChar||/[\w\$_\xa1-\uffff]/,U=e.isReservedIdentifier||!1,p,E;function B(a,o){var l=a.next();if(h[l]){var i=h[l](a,o);if(i!==!1)return i}if(l=='"'||l=="'")return o.tokenize=se(l),o.tokenize(a,o);if(oe.test(l)){if(a.backUp(1),a.match(le))return"number";a.next()}if(ie.test(l))return p=l,null;if(l=="/"){if(a.eat("*"))return o.tokenize=$,$(a,o);if(a.eat("/"))return a.skipToEnd(),"comment"}if(A.test(l)){for(;!a.match(/^\/[\/*]/,!1)&&a.eat(A););return"operator"}if(a.eatWhile(j),R)for(;a.match(R);)a.eatWhile(j);var u=a.current();return y(s,u)?(y(b,u)&&(p="newstatement"),y(_,u)&&(E=!0),"keyword"):y(c,u)?"type":y(f,u)||U&&U(u)?(y(b,u)&&(p="newstatement"),"builtin"):y(v,u)?"atom":"variable"}function se(a){return function(o,l){for(var i=!1,u,w=!1;(u=o.next())!=null;){if(u==a&&!i){w=!0;break}i=!i&&u=="\\"}return(w||!(i||ne))&&(l.tokenize=null),"string"}}function $(a,o){for(var l=!1,i;i=a.next();){if(i=="/"&&l){o.tokenize=null;break}l=i=="*"}return"comment"}function K(a,o){e.typeFirstDefinitions&&a.eol()&&P(o.context)&&(o.typeAtEndOfLine=V(a,o,a.pos))}return{name:e.name,startState:function(a){return{tokenize:null,context:new F(-a,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(a,o){var l=o.context;if(a.sol()&&(l.align??(l.align=!1),o.indented=a.indentation(),o.startOfLine=!0),a.eatSpace())return K(a,o),null;p=E=null;var i=(o.tokenize||B)(a,o);if(i=="comment"||i=="meta")return i;if(l.align??(l.align=!0),p==";"||p==":"||p==","&&a.match(/^\s*(?:\/\/.*)?$/,!1))for(;o.context.type=="statement";)x(o);else if(p=="{")I(o,a.column(),"}");else if(p=="[")I(o,a.column(),"]");else if(p=="(")I(o,a.column(),")");else if(p=="}"){for(;l.type=="statement";)l=x(o);for(l.type=="}"&&(l=x(o));l.type=="statement";)l=x(o)}else p==l.type?x(o):re&&((l.type=="}"||l.type=="top")&&p!=";"||l.type=="statement"&&p=="newstatement")&&I(o,a.column(),"statement",a.current());if(i=="variable"&&(o.prevToken=="def"||e.typeFirstDefinitions&&V(a,o,a.start)&&P(o.context)&&a.match(/^\s*\(/,!1))&&(i="def"),h.token){var u=h.token(a,o,i);u!==void 0&&(i=u)}return i=="def"&&e.styleDefs===!1&&(i="variable"),o.startOfLine=!1,o.prevToken=E?"def":i||p,K(a,o),i},indent:function(a,o,l){if(a.tokenize!=B&&a.tokenize!=null||a.typeAtEndOfLine&&P(a.context))return null;var i=a.context,u=o&&o.charAt(0),w=u==i.type;if(i.type=="statement"&&u=="}"&&(i=i.prev),e.dontIndentStatements)for(;i.type=="statement"&&e.dontIndentStatements.test(i.info);)i=i.prev;if(h.indent){var q=h.indent(a,i,o,l.unit);if(typeof q=="number")return q}var ce=i.prev&&i.prev.info=="switch";if(e.allmanIndentation&&/[{(]/.test(u)){for(;i.type!="top"&&i.type!="}";)i=i.prev;return i.indented}return i.type=="statement"?i.indented+(u=="{"?0:t||l.unit):i.align&&(!n||i.type!=")")?i.column+(w?0:1):i.type==")"&&!w?i.indented+(t||l.unit):i.indented+(w?0:l.unit)+(!w&&ce&&!/^(?:case|default)\b/.test(o)?l.unit:0)},languageData:{indentOnInput:ae?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:Object.keys(s).concat(Object.keys(c)).concat(Object.keys(f)).concat(Object.keys(v)),...e.languageData}}}function r(e){for(var t={},n=e.split(" "),s=0;s<n.length;++s)t[n[s]]=!0;return t}function y(e,t){return typeof e=="function"?e(t):e.propertyIsEnumerable(t)}var S="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",W="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",G="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",Y="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",ue=r("int long char short double float unsigned signed void bool"),de=r("SEL instancetype id Class Protocol BOOL");function T(e){return y(ue,e)||/.+_t$/.test(e)}function Z(e){return T(e)||y(de,e)}var N="case do else for if switch while struct enum union",C="struct enum union";function g(e,t){if(!t.startOfLine)return!1;for(var n,s=null;n=e.peek();){if(n=="\\"&&e.match(/^.$/)){s=g;break}else if(n=="/"&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=s,"meta"}function z(e,t){return t.prevToken=="type"?"type":!1}function L(e){return!e||e.length<2||e[0]!="_"?!1:e[1]=="_"||e[1]!==e[1].toLowerCase()}function d(e){return e.eatWhile(/[\w\.']/),"number"}function k(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return n?(t.cpp11RawStringDelim=n[1],t.tokenize=H,H(e,t)):!1}return e.match(/^(?:u8|u|U|L)/)?e.match(/^["']/,!1)?"string":!1:(e.next(),!1)}function Q(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function X(e,t){for(var n;(n=e.next())!=null;)if(n=='"'&&!e.eat('"')){t.tokenize=null;break}return"string"}function H(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}const fe=m({name:"c",keywords:r(S),types:T,blockKeywords:r(N),defKeywords:r(C),typeFirstDefinitions:!0,atoms:r("NULL true false"),isReservedIdentifier:L,hooks:{"#":g,"*":z}}),pe=m({name:"cpp",keywords:r(S+" "+W),types:T,blockKeywords:r(N+" class try catch"),defKeywords:r(C+" class namespace"),typeFirstDefinitions:!0,atoms:r("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:L,hooks:{"#":g,"*":z,u:k,U:k,L:k,R:k,0:d,1:d,2:d,3:d,4:d,5:d,6:d,7:d,8:d,9:d,token:function(e,t,n){if(n=="variable"&&e.peek()=="("&&(t.prevToken==";"||t.prevToken==null||t.prevToken=="}")&&Q(e.current()))return"def"}},namespaceSeparator:"::"}),me=m({name:"java",keywords:r("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:r("var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:r("catch class do else finally for if switch try while"),defKeywords:r("class interface enum @interface"),typeFirstDefinitions:!0,atoms:r("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return e.match("interface",!1)?!1:(e.eatWhile(/[\w\$_]/),"meta")},'"':function(e,t){return e.match(/""$/)?(t.tokenize=J,t.tokenize(e,t)):!1}}}),he=m({name:"csharp",keywords:r("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in init interface internal is lock namespace new operator out override params private protected public readonly record ref required return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:r("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:r("catch class do else finally for foreach if struct switch try while"),defKeywords:r("class interface namespace record struct var"),typeFirstDefinitions:!0,atoms:r("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=X,X(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}});function J(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n=e.next()=="\\"&&!n}return"string"}function D(e){return function(t,n){for(var s;s=t.next();)if(s=="*"&&t.eat("/"))if(e==1){n.tokenize=null;break}else return n.tokenize=D(e-1),n.tokenize(t,n);else if(s=="/"&&t.eat("*"))return n.tokenize=D(e+1),n.tokenize(t,n);return"comment"}}const ye=m({name:"scala",keywords:r("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:r("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:r("catch class enum do else finally for forSome if match switch try while"),defKeywords:r("class enum def object package trait type val var"),atoms:r("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return e.match('""')?(t.tokenize=J,t.tokenize(e,t)):!1},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"character":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(e,t){var n=t.context;return n.type=="}"&&n.align&&e.eat(">")?(t.context=new F(n.indented,n.column,n.type,n.info,null,n.prev),"operator"):!1},"/":function(e,t){return e.eat("*")?(t.tokenize=D(1),t.tokenize(e,t)):!1}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}});function ge(e){return function(t,n){for(var s=!1,c,f=!1;!t.eol();){if(!e&&!s&&t.match('"')){f=!0;break}if(e&&t.match('"""')){f=!0;break}c=t.next(),!s&&c=="$"&&t.match("{")&&t.skipTo("}"),s=!s&&c=="\\"&&!e}return(f||!e)&&(n.tokenize=null),"string"}}const ke=m({name:"kotlin",keywords:r("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:r("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(ul?|l|f)?/i,blockKeywords:r("catch class do else finally for if where try while enum"),defKeywords:r("class val var object interface fun"),atoms:r("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return t.prevToken=="."?"variable":"operator"},'"':function(e,t){return t.tokenize=ge(e.match('""')),t.tokenize(e,t)},"/":function(e,t){return e.eat("*")?(t.tokenize=D(1),t.tokenize(e,t)):!1},indent:function(e,t,n,s){var c=n&&n.charAt(0);if((e.prevToken=="}"||e.prevToken==")")&&n=="")return e.indented;if(e.prevToken=="operator"&&n!="}"&&e.context.type!="}"||e.prevToken=="variable"&&c=="."||(e.prevToken=="}"||e.prevToken==")")&&c==".")return s*2+t.indented;if(t.align&&t.type=="}")return t.indented+(e.context.type==(n||"").charAt(0)?0:s)}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}}),be=m({name:"shader",keywords:r("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:r("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:r("for while do if else struct"),builtin:r("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:r("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":g}}),ve=m({name:"nesc",keywords:r(S+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:T,blockKeywords:r(N),atoms:r("null true false"),hooks:{"#":g}}),we=m({name:"objectivec",keywords:r(S+" "+G),types:Z,builtin:r(Y),blockKeywords:r(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:r(C+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:r("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:L,hooks:{"#":g,"*":z}}),_e=m({name:"objectivecpp",keywords:r(S+" "+G+" "+W),types:Z,builtin:r(Y),blockKeywords:r(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:r(C+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:r("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:L,hooks:{"#":g,"*":z,u:k,U:k,L:k,R:k,0:d,1:d,2:d,3:d,4:d,5:d,6:d,7:d,8:d,9:d,token:function(e,t,n){if(n=="variable"&&e.peek()=="("&&(t.prevToken==";"||t.prevToken==null||t.prevToken=="}")&&Q(e.current()))return"def"}},namespaceSeparator:"::"}),xe=m({name:"squirrel",keywords:r("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:T,blockKeywords:r("case catch class else for foreach if switch try while"),defKeywords:r("function local class"),typeFirstDefinitions:!0,atoms:r("true false null"),hooks:{"#":g}});var M=null;function ee(e){return function(t,n){for(var s=!1,c,f=!1;!t.eol();){if(!s&&t.match('"')&&(e=="single"||t.match('""'))){f=!0;break}if(!s&&t.match("``")){M=ee(e),f=!0;break}c=t.next(),s=e=="single"&&!s&&c=="\\"}return f&&(n.tokenize=null),"string"}}const Se=m({name:"ceylon",keywords:r("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:r("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:r("class dynamic function interface module object package value"),builtin:r("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:r("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=ee(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!M||!e.match("`")?!1:(t.tokenize=M,M=null,t.tokenize(e,t))},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"string.special":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},token:function(e,t,n){if((n=="variable"||n=="type")&&t.prevToken==".")return"variableName.special"}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}});function Te(e){(e.interpolationStack||(e.interpolationStack=[])).push(e.tokenize)}function te(e){return(e.interpolationStack||(e.interpolationStack=[])).pop()}function Ne(e){return e.interpolationStack?e.interpolationStack.length:0}function O(e,t,n,s){var c=!1;if(t.eat(e))if(t.eat(e))c=!0;else return"string";function f(b,_){for(var v=!1;!b.eol();){if(!s&&!v&&b.peek()=="$")return Te(_),_.tokenize=De,"string";var h=b.next();if(h==e&&!v&&(!c||b.match(e+e))){_.tokenize=null;break}v=!s&&!v&&h=="\\"}return"string"}return n.tokenize=f,f(t,n)}function De(e,t){return e.eat("$"),e.eat("{")?t.tokenize=null:t.tokenize=Ie,null}function Ie(e,t){return e.eatWhile(/[\w_]/),t.tokenize=te(t),"variable"}const Ce=m({name:"dart",keywords:r("this super static final const abstract class extends external factory implements mixin get native set typedef with enum throw rethrow assert break case continue default in return new deferred async await covariant try catch finally do else for if switch while import library export part of show hide is as extension on yield late required sealed base interface when inline"),blockKeywords:r("try catch finally do else for if switch while"),builtin:r("void bool num int double dynamic var String Null Never"),atoms:r("true false null"),number:/^(?:0x[a-f\d_]+|(?:[\d_]+\.?[\d_]*|\.[\d_]+)(?:e[-+]?[\d_]+)?)/i,hooks:{"@":function(e){return e.eatWhile(/[\w\$_\.]/),"meta"},"'":function(e,t){return O("'",e,t,!1)},'"':function(e,t){return O('"',e,t,!1)},r:function(e,t){var n=e.peek();return n=="'"||n=='"'?O(e.next(),e,t,!0):!1},"}":function(e,t){return Ne(t)>0?(t.tokenize=te(t),null):!1},"/":function(e,t){return e.eat("*")?(t.tokenize=D(1),t.tokenize(e,t)):!1},token:function(e,t,n){if(n=="variable"&&RegExp("^[_$]*[A-Z][a-zA-Z0-9_$]*$","g").test(e.current()))return"type"}}});export{he as a,ke as c,_e as d,ye as f,pe as i,ve as l,xe as m,Se as n,Ce as o,be as p,m as r,me as s,fe as t,we as u};
import{a,c as s,d as e,f as c,i as r,l as o,m as p,n as t,o as i,p as l,r as n,s as d,t as f,u as j}from"./clike-jZeb2kFn.js";export{f as c,t as ceylon,n as clike,r as cpp,a as csharp,i as dart,d as java,s as kotlin,o as nesC,j as objectiveC,e as objectiveCpp,c as scala,l as shader,p as squirrel};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var e=a("clipboard-paste",[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]);export{e as t};
import{t as o}from"./clojure-C0pkR8m2.js";export{o as clojure};
var d=["false","nil","true"],l=[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],u="*,*',*1,*2,*3,*agent*,*allow-unresolved-vars*,*assert*,*clojure-version*,*command-line-args*,*compile-files*,*compile-path*,*compiler-options*,*data-readers*,*default-data-reader-fn*,*e,*err*,*file*,*flush-on-newline*,*fn-loader*,*in*,*math-context*,*ns*,*out*,*print-dup*,*print-length*,*print-level*,*print-meta*,*print-namespace-maps*,*print-readably*,*read-eval*,*reader-resolver*,*source-path*,*suppress-read*,*unchecked-math*,*use-context-classloader*,*verbose-defrecords*,*warn-on-reflection*,+,+',-,-',->,->>,->ArrayChunk,->Eduction,->Vec,->VecNode,->VecSeq,-cache-protocol-fn,-reset-methods,..,/,<,<=,=,==,>,>=,EMPTY-NODE,Inst,StackTraceElement->vec,Throwable->map,accessor,aclone,add-classpath,add-watch,agent,agent-error,agent-errors,aget,alength,alias,all-ns,alter,alter-meta!,alter-var-root,amap,ancestors,and,any?,apply,areduce,array-map,as->,aset,aset-boolean,aset-byte,aset-char,aset-double,aset-float,aset-int,aset-long,aset-short,assert,assoc,assoc!,assoc-in,associative?,atom,await,await-for,await1,bases,bean,bigdec,bigint,biginteger,binding,bit-and,bit-and-not,bit-clear,bit-flip,bit-not,bit-or,bit-set,bit-shift-left,bit-shift-right,bit-test,bit-xor,boolean,boolean-array,boolean?,booleans,bound-fn,bound-fn*,bound?,bounded-count,butlast,byte,byte-array,bytes,bytes?,case,cast,cat,char,char-array,char-escape-string,char-name-string,char?,chars,chunk,chunk-append,chunk-buffer,chunk-cons,chunk-first,chunk-next,chunk-rest,chunked-seq?,class,class?,clear-agent-errors,clojure-version,coll?,comment,commute,comp,comparator,compare,compare-and-set!,compile,complement,completing,concat,cond,cond->,cond->>,condp,conj,conj!,cons,constantly,construct-proxy,contains?,count,counted?,create-ns,create-struct,cycle,dec,dec',decimal?,declare,dedupe,default-data-readers,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftype,delay,delay?,deliver,denominator,deref,derive,descendants,destructure,disj,disj!,dissoc,dissoc!,distinct,distinct?,doall,dorun,doseq,dosync,dotimes,doto,double,double-array,double?,doubles,drop,drop-last,drop-while,eduction,empty,empty?,ensure,ensure-reduced,enumeration-seq,error-handler,error-mode,eval,even?,every-pred,every?,ex-data,ex-info,extend,extend-protocol,extend-type,extenders,extends?,false?,ffirst,file-seq,filter,filterv,find,find-keyword,find-ns,find-protocol-impl,find-protocol-method,find-var,first,flatten,float,float-array,float?,floats,flush,fn,fn?,fnext,fnil,for,force,format,frequencies,future,future-call,future-cancel,future-cancelled?,future-done?,future?,gen-class,gen-interface,gensym,get,get-in,get-method,get-proxy-class,get-thread-bindings,get-validator,group-by,halt-when,hash,hash-combine,hash-map,hash-ordered-coll,hash-set,hash-unordered-coll,ident?,identical?,identity,if-let,if-not,if-some,ifn?,import,in-ns,inc,inc',indexed?,init-proxy,inst-ms,inst-ms*,inst?,instance?,int,int-array,int?,integer?,interleave,intern,interpose,into,into-array,ints,io!,isa?,iterate,iterator-seq,juxt,keep,keep-indexed,key,keys,keyword,keyword?,last,lazy-cat,lazy-seq,let,letfn,line-seq,list,list*,list?,load,load-file,load-reader,load-string,loaded-libs,locking,long,long-array,longs,loop,macroexpand,macroexpand-1,make-array,make-hierarchy,map,map-entry?,map-indexed,map?,mapcat,mapv,max,max-key,memfn,memoize,merge,merge-with,meta,method-sig,methods,min,min-key,mix-collection-hash,mod,munge,name,namespace,namespace-munge,nat-int?,neg-int?,neg?,newline,next,nfirst,nil?,nnext,not,not-any?,not-empty,not-every?,not=,ns,ns-aliases,ns-imports,ns-interns,ns-map,ns-name,ns-publics,ns-refers,ns-resolve,ns-unalias,ns-unmap,nth,nthnext,nthrest,num,number?,numerator,object-array,odd?,or,parents,partial,partition,partition-all,partition-by,pcalls,peek,persistent!,pmap,pop,pop!,pop-thread-bindings,pos-int?,pos?,pr,pr-str,prefer-method,prefers,primitives-classnames,print,print-ctor,print-dup,print-method,print-simple,print-str,printf,println,println-str,prn,prn-str,promise,proxy,proxy-call-with-super,proxy-mappings,proxy-name,proxy-super,push-thread-bindings,pvalues,qualified-ident?,qualified-keyword?,qualified-symbol?,quot,rand,rand-int,rand-nth,random-sample,range,ratio?,rational?,rationalize,re-find,re-groups,re-matcher,re-matches,re-pattern,re-seq,read,read-line,read-string,reader-conditional,reader-conditional?,realized?,record?,reduce,reduce-kv,reduced,reduced?,reductions,ref,ref-history-count,ref-max-history,ref-min-history,ref-set,refer,refer-clojure,reify,release-pending-sends,rem,remove,remove-all-methods,remove-method,remove-ns,remove-watch,repeat,repeatedly,replace,replicate,require,reset!,reset-meta!,reset-vals!,resolve,rest,restart-agent,resultset-seq,reverse,reversible?,rseq,rsubseq,run!,satisfies?,second,select-keys,send,send-off,send-via,seq,seq?,seqable?,seque,sequence,sequential?,set,set-agent-send-executor!,set-agent-send-off-executor!,set-error-handler!,set-error-mode!,set-validator!,set?,short,short-array,shorts,shuffle,shutdown-agents,simple-ident?,simple-keyword?,simple-symbol?,slurp,some,some->,some->>,some-fn,some?,sort,sort-by,sorted-map,sorted-map-by,sorted-set,sorted-set-by,sorted?,special-symbol?,spit,split-at,split-with,str,string?,struct,struct-map,subs,subseq,subvec,supers,swap!,swap-vals!,symbol,symbol?,sync,tagged-literal,tagged-literal?,take,take-last,take-nth,take-while,test,the-ns,thread-bound?,time,to-array,to-array-2d,trampoline,transduce,transient,tree-seq,true?,type,unchecked-add,unchecked-add-int,unchecked-byte,unchecked-char,unchecked-dec,unchecked-dec-int,unchecked-divide-int,unchecked-double,unchecked-float,unchecked-inc,unchecked-inc-int,unchecked-int,unchecked-long,unchecked-multiply,unchecked-multiply-int,unchecked-negate,unchecked-negate-int,unchecked-remainder-int,unchecked-short,unchecked-subtract,unchecked-subtract-int,underive,unquote,unquote-splicing,unreduced,unsigned-bit-shift-right,update,update-in,update-proxy,uri?,use,uuid?,val,vals,var-get,var-set,var?,vary-meta,vec,vector,vector-of,vector?,volatile!,volatile?,vreset!,vswap!,when,when-first,when-let,when-not,when-some,while,with-bindings,with-bindings*,with-in-str,with-loading-context,with-local-vars,with-meta,with-open,with-out-str,with-precision,with-redefs,with-redefs-fn,xml-seq,zero?,zipmap".split(","),p="->.->>.as->.binding.bound-fn.case.catch.comment.cond.cond->.cond->>.condp.def.definterface.defmethod.defn.defmacro.defprotocol.defrecord.defstruct.deftype.do.doseq.dotimes.doto.extend.extend-protocol.extend-type.fn.for.future.if.if-let.if-not.if-some.let.letfn.locking.loop.ns.proxy.reify.struct-map.some->.some->>.try.when.when-first.when-let.when-not.when-some.while.with-bindings.with-bindings*.with-in-str.with-loading-context.with-local-vars.with-meta.with-open.with-out-str.with-precision.with-redefs.with-redefs-fn".split("."),m=s(d),f=s(l),h=s(u),y=s(p),b=/^(?:[\\\[\]\s"(),;@^`{}~]|$)/,g=/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,k=/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,v=/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/;function i(t,e){if(t.eatSpace()||t.eat(","))return["space",null];if(t.match(g))return[null,"number"];if(t.match(k))return[null,"string.special"];if(t.eat(/^"/))return(e.tokenize=x)(t,e);if(t.eat(/^[(\[{]/))return["open","bracket"];if(t.eat(/^[)\]}]/))return["close","bracket"];if(t.eat(/^;/))return t.skipToEnd(),["space","comment"];if(t.eat(/^[#'@^`~]/))return[null,"meta"];var r=t.match(v),n=r&&r[0];return n?n==="comment"&&e.lastToken==="("?(e.tokenize=w)(t,e):a(n,m)||n.charAt(0)===":"?["symbol","atom"]:a(n,f)||a(n,h)?["symbol","keyword"]:e.lastToken==="("?["symbol","builtin"]:["symbol","variable"]:(t.next(),t.eatWhile(function(o){return!a(o,b)}),[null,"error"])}function x(t,e){for(var r=!1,n;n=t.next();){if(n==='"'&&!r){e.tokenize=i;break}r=!r&&n==="\\"}return[null,"string"]}function w(t,e){for(var r=1,n;n=t.next();)if(n===")"&&r--,n==="("&&r++,r===0){t.backUp(1),e.tokenize=i;break}return["space","comment"]}function s(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=!0;return e}function a(t,e){if(e instanceof RegExp)return e.test(t);if(e instanceof Object)return e.propertyIsEnumerable(t)}const q={name:"clojure",startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastToken:null,tokenize:i}},token:function(t,e){t.sol()&&typeof e.ctx.indentTo!="number"&&(e.ctx.indentTo=e.ctx.start+1);var r=e.tokenize(t,e),n=r[0],o=r[1],c=t.current();return n!=="space"&&(e.lastToken==="("&&e.ctx.indentTo===null?n==="symbol"&&a(c,y)?e.ctx.indentTo=e.ctx.start+t.indentUnit:e.ctx.indentTo="next":e.ctx.indentTo==="next"&&(e.ctx.indentTo=t.column()),e.lastToken=c),n==="open"?e.ctx={prev:e.ctx,start:t.column(),indentTo:null}:n==="close"&&(e.ctx=e.ctx.prev||e.ctx),o},indent:function(t){var e=t.ctx.indentTo;return typeof e=="number"?e:t.ctx.start+1},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:";;"},autocomplete:[].concat(d,l,u)}};export{q as t};
import{t as a}from"./cmake-DlvFtk_M.js";export{a as cmake};
var r=/({)?[a-zA-Z0-9_]+(})?/;function c(n,t){for(var e,i,a=!1;!n.eol()&&(e=n.next())!=t.pending;){if(e==="$"&&i!="\\"&&t.pending=='"'){a=!0;break}i=e}return a&&n.backUp(1),e==t.pending?t.continueString=!1:t.continueString=!0,"string"}function o(n,t){var e=n.next();return e==="$"?n.match(r)?"variableName.special":"variable":t.continueString?(n.backUp(1),c(n,t)):n.match(/(\s+)?\w+\(/)||n.match(/(\s+)?\w+\ \(/)?(n.backUp(1),"def"):e=="#"?(n.skipToEnd(),"comment"):e=="'"||e=='"'?(t.pending=e,c(n,t)):e=="("||e==")"?"bracket":e.match(/[0-9]/)?"number":(n.eatWhile(/[\w-]/),null)}const u={name:"cmake",startState:function(){var n={};return n.inDefinition=!1,n.inInclude=!1,n.continueString=!1,n.pending=!1,n},token:function(n,t){return n.eatSpace()?null:o(n,t)}};export{u as t};
var M="builtin",e="comment",L="string",D="atom",G="number",n="keyword",t="header",B="def",i="link";function C(E){for(var T={},I=E.split(" "),R=0;R<I.length;++R)T[I[R]]=!0;return T}var S=C("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "),U=C("ACCEPT ACCESS ACQUIRE ADD ADDRESS ADVANCING AFTER ALIAS ALL ALPHABET ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALSO ALTER ALTERNATE AND ANY ARE AREA AREAS ARITHMETIC ASCENDING ASSIGN AT ATTRIBUTE AUTHOR AUTO AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP BEFORE BELL BINARY BIT BITS BLANK BLINK BLOCK BOOLEAN BOTTOM BY CALL CANCEL CD CF CH CHARACTER CHARACTERS CLASS CLOCK-UNITS CLOSE COBOL CODE CODE-SET COL COLLATING COLUMN COMMA COMMIT COMMITMENT COMMON COMMUNICATION COMP COMP-0 COMP-1 COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS CONVERTING COPY CORR CORRESPONDING COUNT CRT CRT-UNDER CURRENCY CURRENT CURSOR DATA DATE DATE-COMPILED DATE-WRITTEN DAY DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION DOWN DROP DUPLICATE DUPLICATES DYNAMIC EBCDIC EGI EJECT ELSE EMI EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING END-WRITE END-XML ENTER ENTRY ENVIRONMENT EOP EQUAL EQUALS ERASE ERROR ESI EVALUATE EVERY EXCEEDS EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL FILE-STREAM FILES FILLER FINAL FIND FINISH FIRST FOOTING FOR FOREGROUND-COLOR FOREGROUND-COLOUR FORMAT FREE FROM FULL FUNCTION GENERATE GET GIVING GLOBAL GO GOBACK GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL ID IDENTIFICATION IF IN INDEX INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED INDIC INDICATE INDICATOR INDICATORS INITIAL INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO INVALID INVOKE IS JUST JUSTIFIED KANJI KEEP KEY LABEL LAST LD LEADING LEFT LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE LOCALE LOCALLY LOCK MEMBER MEMORY MERGE MESSAGE METACLASS MODE MODIFIED MODIFY MODULES MOVE MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE NEXT NO NO-ECHO NONE NOT NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS OF OFF OMITTED ON ONLY OPEN OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL PADDING PAGE PAGE-COUNTER PARSE PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE PREFIX PRESENT PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID PROMPT PROTECTED PURGE QUEUE QUOTE QUOTES RANDOM RD READ READY REALM RECEIVE RECONNECT RECORD RECORD-NAME RECORDS RECURSIVE REDEFINES REEL REFERENCE REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE REMAINDER REMOVAL RENAMES REPEATED REPLACE REPLACING REPORT REPORTING REPORTS REPOSITORY REQUIRED RERUN RESERVE RESET RETAINING RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO REVERSED REWIND REWRITE RF RH RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED RUN SAME SCREEN SD SEARCH SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SHARED SIGN SIZE SKIP1 SKIP2 SKIP3 SORT SORT-MERGE SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 START STARTING STATUS STOP STORE STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT TABLE TALLYING TAPE TENANT TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TITLE TO TOP TRAILING TRAILING-SIGN TRANSACTION TYPE TYPEDEF UNDERLINE UNEQUAL UNIT UNSTRING UNTIL UP UPDATE UPON USAGE USAGE-MODE USE USING VALID VALIDATE VALUE VALUES VARYING VLR WAIT WHEN WHEN-COMPILED WITH WITHIN WORDS WORKING-STORAGE WRITE XML XML-CODE XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL "),P=C("- * ** / + < <= = > >= "),N={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,symbol:/[\w*+\-]/};function F(E,T){return E==="0"&&T.eat(/x/i)?(T.eatWhile(N.hex),!0):((E=="+"||E=="-")&&N.digit.test(T.peek())&&(T.eat(N.sign),E=T.next()),N.digit.test(E)?(T.eat(E),T.eatWhile(N.digit),T.peek()=="."&&(T.eat("."),T.eatWhile(N.digit)),T.eat(N.exponent)&&(T.eat(N.sign),T.eatWhile(N.digit)),!0):!1)}const r={name:"cobol",startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(E,T){if(T.indentStack==null&&E.sol()&&(T.indentation=6),E.eatSpace())return null;var I=null;switch(T.mode){case"string":for(var R=!1;(R=E.next())!=null;)if((R=='"'||R=="'")&&!E.match(/['"]/,!1)){T.mode=!1;break}I=L;break;default:var O=E.next(),A=E.column();if(A>=0&&A<=5)I=B;else if(A>=72&&A<=79)E.skipToEnd(),I=t;else if(O=="*"&&A==6)E.skipToEnd(),I=e;else if(O=='"'||O=="'")T.mode="string",I=L;else if(O=="'"&&!N.digit_or_colon.test(E.peek()))I=D;else if(O==".")I=i;else if(F(O,E))I=G;else{if(E.current().match(N.symbol))for(;A<71&&E.eat(N.symbol)!==void 0;)A++;I=U&&U.propertyIsEnumerable(E.current().toUpperCase())?n:P&&P.propertyIsEnumerable(E.current().toUpperCase())?M:S&&S.propertyIsEnumerable(E.current().toUpperCase())?D:null}}return I},indent:function(E){return E.indentStack==null?E.indentation:E.indentStack.indent}};export{r as t};
import{t as o}from"./cobol-C_yb45mr.js";export{o as cobol};
import{s as b}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-Bj1aDYRI.js";import{t as x}from"./jsx-runtime-ZmTK25f3.js";import"./cjs-CH5Rj0g8.js";import{i as p,n as k,r as u,t as N}from"./chunk-5FQGJX7Z-DPlx2kjA.js";var l=b(h(),1),r=b(x(),1),j=u("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),y=(0,l.memo)(({children:a,result:e,language:n,className:c,...g})=>{let d=(0,l.useMemo)(()=>({backgroundColor:e.bg,color:e.fg}),[e.bg,e.fg]);return(0,r.jsx)("pre",{className:u(c,"p-4 text-sm dark:bg-(--shiki-dark-bg)!"),"data-language":n,"data-streamdown":"code-block-body",style:d,...g,children:(0,r.jsx)("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:e.tokens.map((i,t)=>(0,r.jsx)("span",{className:j,children:i.map((o,s)=>(0,r.jsx)("span",{className:"dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!",style:{color:o.color,backgroundColor:o.bgColor,...o.htmlStyle},...o.htmlAttrs,children:o.content},s))},t))})})},(a,e)=>a.result===e.result&&a.language===e.language&&a.className===e.className),w=({className:a,language:e,style:n,...c})=>(0,r.jsx)("div",{className:u("my-4 w-full overflow-hidden rounded-xl border border-border",a),"data-language":e,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...c}),v=({language:a,children:e})=>(0,r.jsxs)("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-language":a,"data-streamdown":"code-block-header",children:[(0,r.jsx)("span",{className:"ml-1 font-mono lowercase",children:a}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:e})]}),C=({code:a,language:e,className:n,children:c,...g})=>{let{shikiTheme:d}=(0,l.useContext)(N),i=p(),t=(0,l.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:a.split(`
`).map(m=>[{content:m,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[a]),[o,s]=(0,l.useState)(t);return(0,l.useEffect)(()=>{if(!i){s(t);return}let m=i.highlight({code:a,language:e,themes:d},f=>{s(f)});if(m){s(m);return}s(t)},[a,e,d,i,t]),(0,r.jsx)(k.Provider,{value:{code:a},children:(0,r.jsxs)(w,{language:e,children:[(0,r.jsx)(v,{language:e,children:c}),(0,r.jsx)(y,{className:n,language:e,result:o,...g})]})})};export{C as CodeBlock};
import{t as e}from"./createLucideIcon-BCdY6lG5.js";var m=e("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);export{m as t};
var s="error";function f(e){return RegExp("^(("+e.join(")|(")+"))\\b")}var h=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,v=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,d=/^[_A-Za-z$][_A-Za-z$0-9]*/,k=/^@[_A-Za-z$][_A-Za-z$0-9]*/,g=f(["and","or","not","is","isnt","in","instanceof","typeof"]),p=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],y=f(p.concat(["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"]));p=f(p);var z=/^('{3}|\"{3}|['\"])/,b=/^(\/{3}|\/)/,x=f(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);function a(e,n){if(e.sol()){n.scope.align===null&&(n.scope.align=!1);var r=n.scope.offset;if(e.eatSpace()){var o=e.indentation();return o>r&&n.scope.type=="coffee"?"indent":o<r?"dedent":null}else r>0&&l(e,n)}if(e.eatSpace())return null;var c=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return n.tokenize=w,n.tokenize(e,n);if(c==="#")return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var i=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^-?\d+\.\d*/)&&(i=!0),e.match(/^-?\.\d+/)&&(i=!0),i)return e.peek()=="."&&e.backUp(1),"number";var t=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(t=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(t=!0),e.match(/^-?0(?![\dx])/i)&&(t=!0),t)return"number"}if(e.match(z))return n.tokenize=m(e.current(),!1,"string"),n.tokenize(e,n);if(e.match(b)){if(e.current()!="/"||e.match(/^.*\//,!1))return n.tokenize=m(e.current(),!0,"string.special"),n.tokenize(e,n);e.backUp(1)}return e.match(h)||e.match(g)?"operator":e.match(v)?"punctuation":e.match(x)?"atom":e.match(k)||n.prop&&e.match(d)?"property":e.match(y)?"keyword":e.match(d)?"variable":(e.next(),s)}function m(e,n,r){return function(o,c){for(;!o.eol();)if(o.eatWhile(/[^'"\/\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return c.tokenize=a,r;o.eat(/['"\/]/)}return n&&(c.tokenize=a),r}}function w(e,n){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){n.tokenize=a;break}e.eatWhile("#")}return"comment"}function u(e,n,r="coffee"){for(var o=0,c=!1,i=null,t=n.scope;t;t=t.prev)if(t.type==="coffee"||t.type=="}"){o=t.offset+e.indentUnit;break}r==="coffee"?n.scope.align&&(n.scope.align=!1):(c=null,i=e.column()+e.current().length),n.scope={offset:o,type:r,prev:n.scope,align:c,alignOffset:i}}function l(e,n){if(n.scope.prev)if(n.scope.type==="coffee"){for(var r=e.indentation(),o=!1,c=n.scope;c;c=c.prev)if(r===c.offset){o=!0;break}if(!o)return!0;for(;n.scope.prev&&n.scope.offset!==r;)n.scope=n.scope.prev;return!1}else return n.scope=n.scope.prev,!1}function A(e,n){var r=n.tokenize(e,n),o=e.current();o==="return"&&(n.dedent=!0),((o==="->"||o==="=>")&&e.eol()||r==="indent")&&u(e,n);var c="[({".indexOf(o);if(c!==-1&&u(e,n,"])}".slice(c,c+1)),p.exec(o)&&u(e,n),o=="then"&&l(e,n),r==="dedent"&&l(e,n))return s;if(c="])}".indexOf(o),c!==-1){for(;n.scope.type=="coffee"&&n.scope.prev;)n.scope=n.scope.prev;n.scope.type==o&&(n.scope=n.scope.prev)}return n.dedent&&e.eol()&&(n.scope.type=="coffee"&&n.scope.prev&&(n.scope=n.scope.prev),n.dedent=!1),r=="indent"||r=="dedent"?null:r}const _={name:"coffeescript",startState:function(){return{tokenize:a,scope:{offset:0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,n){var r=n.scope.align===null&&n.scope;r&&e.sol()&&(r.align=!1);var o=A(e,n);return o&&o!="comment"&&(r&&(r.align=!0),n.prop=o=="punctuation"&&e.current()=="."),o},indent:function(e,n){if(e.tokenize!=a)return 0;var r=e.scope,o=n&&"])}".indexOf(n.charAt(0))>-1;if(o)for(;r.type=="coffee"&&r.prev;)r=r.prev;var c=o&&r.type===n.charAt(0);return r.align?r.alignOffset-(c?1:0):(c?r.prev:r).offset},languageData:{commentTokens:{line:"#"}}};export{_ as t};
import{t as e}from"./coffeescript-DBK0AeMT.js";export{e as coffeeScript};
function n(r){for(var t=r.length/6|0,a=Array(t),e=0;e<t;)a[e]="#"+r.slice(e*6,++e*6);return a}export{n as t};
import{s as L}from"./chunk-LvLJmgfZ.js";import{u as K}from"./useEvent-BhXAndur.js";import{t as R}from"./react-Bj1aDYRI.js";import{An as U,fr as O,kn as V,ur as W,w as Y}from"./cells-DPp5cDaO.js";import{t as D}from"./compiler-runtime-B3qBwwSJ.js";import{t as X}from"./useLifecycle-ClI_npeg.js";import{o as Z}from"./utils-YqBXNpsM.js";import{t as ee}from"./jsx-runtime-ZmTK25f3.js";import{r as M,t as z}from"./button-CZ3Cs4qb.js";import{t as x}from"./cn-BKtXLv3a.js";import{G as te}from"./JsonOutput-PE5ko4gi.js";import{r as ae}from"./requests-B4FYHTZl.js";import{t as se}from"./createLucideIcon-BCdY6lG5.js";import{t as re}from"./x-ZP5cObgf.js";import{t as ne}from"./chevron-right--18M_6o9.js";import{n as le,t as oe}from"./spinner-DA8-7wQv.js";import{r as ce}from"./useTheme-DQozhcp1.js";import{t as $}from"./tooltip-CMQz28hC.js";import{t as ie}from"./context-BfYAMNLF.js";import{r as me}from"./numbers-D7O23mOZ.js";import{t as de}from"./copy-icon-v8ME_JKB.js";import{t as pe}from"./useInstallPackage-D4fX0Ee_.js";import{n as ue}from"./html-to-image-CIQqSu-S.js";import{o as xe}from"./focus-C1YokgL7.js";var I=se("square-plus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]),f=D(),l=L(ee(),1);const fe=o=>{let e=(0,f.c)(4),{isExpanded:a}=o,s=a&&"rotate-90",t;e[0]===s?t=e[1]:(t=x("h-3 w-3 transition-transform",s),e[0]=s,e[1]=t);let r;return e[2]===t?r=e[3]:(r=(0,l.jsx)(ne,{className:t}),e[2]=t,e[3]=r),r},he=o=>{let e=(0,f.c)(5),{children:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("flex gap-1.5 items-center font-bold py-1.5 text-muted-foreground bg-(--slate-2) text-sm",s),e[0]=s,e[1]=t);let r;return e[2]!==a||e[3]!==t?(r=(0,l.jsx)("div",{className:t,children:a}),e[2]=a,e[3]=t,e[4]=r):r=e[4],r},ge=o=>{let e=(0,f.c)(5),{content:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("text-sm text-muted-foreground py-1",s),e[0]=s,e[1]=t);let r;return e[2]!==a||e[3]!==t?(r=(0,l.jsx)("div",{className:t,children:a}),e[2]=a,e[3]=t,e[4]=r):r=e[4],r},ye=o=>{let e=(0,f.c)(6),{error:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("text-sm bg-red-50 dark:bg-red-900 text-red-600 dark:text-red-50 flex items-center gap-2 p-2 h-8",s),e[0]=s,e[1]=t);let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,l.jsx)(re,{className:"h-4 w-4 mt-0.5"}),e[2]=r):r=e[2];let n;return e[3]!==a.message||e[4]!==t?(n=(0,l.jsxs)("div",{className:t,children:[r,a.message]}),e[3]=a.message,e[4]=t,e[5]=n):n=e[5],n},be=o=>{let e=(0,f.c)(6),{message:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("text-sm bg-blue-50 dark:bg-(--accent) text-blue-500 dark:text-blue-50 flex items-center gap-2 p-2 h-8",s),e[0]=s,e[1]=t);let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,l.jsx)(le,{className:"h-4 w-4 animate-spin"}),e[2]=r):r=e[2];let n;return e[3]!==a||e[4]!==t?(n=(0,l.jsxs)("div",{className:t,children:[r,a]}),e[3]=a,e[4]=t,e[5]=n):n=e[5],n},E=o=>{let e=(0,f.c)(5),{children:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("flex flex-col gap-2 relative",s),e[0]=s,e[1]=t);let r;return e[2]!==a||e[3]!==t?(r=(0,l.jsx)("div",{className:t,children:a}),e[2]=a,e[3]=t,e[4]=r):r=e[4],r},_e=o=>{let e=(0,f.c)(6),{columnName:a,dataType:s}=o,t=V[s],r=`w-4 h-4 p-0.5 rounded-sm stroke-card-foreground ${U(s)}`,n;e[0]!==t||e[1]!==r?(n=(0,l.jsx)(t,{className:r}),e[0]=t,e[1]=r,e[2]=n):n=e[2];let c;return e[3]!==a||e[4]!==n?(c=(0,l.jsxs)("div",{className:"flex flex-row items-center gap-1.5",children:[n,a]}),e[3]=a,e[4]=n,e[5]=c):c=e[5],c};var Ne=D(),je=L(R(),1);const ke=o=>{let e=(0,Ne.c)(13),{packages:a,showMaxPackages:s,className:t,onInstall:r}=o,{handleInstallPackages:n}=pe();if(!a||a.length===0)return null;let c;e[0]!==n||e[1]!==r||e[2]!==a?(c=()=>{n(a,r)},e[0]=n,e[1]=r,e[2]=a,e[3]=c):c=e[3];let i;e[4]===t?i=e[5]:(i=x("ml-2",t),e[4]=t,e[5]=i);let d;e[6]!==a||e[7]!==s?(d=s?a.slice(0,s).join(", "):a.join(", "),e[6]=a,e[7]=s,e[8]=d):d=e[8];let p;return e[9]!==c||e[10]!==i||e[11]!==d?(p=(0,l.jsxs)(z,{variant:"outline",size:"xs",onClick:c,className:i,children:["Install"," ",d]}),e[9]=c,e[10]=i,e[11]=d,e[12]=p):p=e[12],p};var Q=D();const ve=o=>{let e=(0,Q.c)(53),{table:a,column:s,preview:t,onAddColumnChart:r,sqlTableContext:n}=o,{theme:c}=ce(),{previewDatasetColumn:i}=ae(),{locale:d}=ie(),p;e[0]!==s.name||e[1]!==i||e[2]!==n||e[3]!==a.name||e[4]!==a.source||e[5]!==a.source_type?(p=()=>{i({source:a.source,tableName:a.name,columnName:s.name,sourceType:a.source_type,fullyQualifiedTableName:n?`${n.database}.${n.schema}.${a.name}`:a.name})},e[0]=s.name,e[1]=i,e[2]=n,e[3]=a.name,e[4]=a.source,e[5]=a.source_type,e[6]=p):p=e[6];let u=p,y;if(e[7]!==t||e[8]!==u||e[9]!==a.source_type?(y=()=>{t||a.source_type==="connection"||a.source_type==="catalog"||u()},e[7]=t,e[8]=u,e[9]=a.source_type,e[10]=y):y=e[10],X(y),a.source_type==="connection"){let m=s.name,H=s.external_type,h;e[11]!==s.name||e[12]!==r||e[13]!==n||e[14]!==a?(h=M.stopPropagation(()=>{r(O({table:a,columnName:s.name,sqlTableContext:n}))}),e[11]=s.name,e[12]=r,e[13]=n,e[14]=a,e[15]=h):h=e[15];let P;e[16]===Symbol.for("react.memo_cache_sentinel")?(P=(0,l.jsx)(I,{className:"h-3 w-3 mr-1"}),e[16]=P):P=e[16];let g;e[17]===h?g=e[18]:(g=(0,l.jsxs)(z,{variant:"outline",size:"xs",onClick:h,children:[P," Add SQL cell"]}),e[17]=h,e[18]=g);let T;return e[19]!==s.external_type||e[20]!==s.name||e[21]!==g?(T=(0,l.jsxs)("span",{className:"text-xs text-muted-foreground gap-2 flex items-center justify-between pl-7",children:[m," (",H,")",g]}),e[19]=s.external_type,e[20]=s.name,e[21]=g,e[22]=T):T=e[22],T}if(a.source_type==="catalog"){let m;return e[23]!==s.external_type||e[24]!==s.name?(m=(0,l.jsxs)("span",{className:"text-xs text-muted-foreground gap-2 flex items-center justify-between pl-7",children:[s.name," (",s.external_type,")"]}),e[23]=s.external_type,e[24]=s.name,e[25]=m):m=e[25],m}if(!t){let m;return e[26]===Symbol.for("react.memo_cache_sentinel")?(m=(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:"Loading..."}),e[26]=m):m=e[26],m}let b;e[27]!==t.error||e[28]!==t.missing_packages||e[29]!==u?(b=t.error&&G({error:t.error,missingPackages:t.missing_packages,refetchPreview:u}),e[27]=t.error,e[28]=t.missing_packages,e[29]=u,e[30]=b):b=e[30];let _=b,N;e[31]!==s.type||e[32]!==d||e[33]!==t.stats?(N=t.stats&&J({stats:t.stats,dataType:s.type,locale:d}),e[31]=s.type,e[32]=d,e[33]=t.stats,e[34]=N):N=e[34];let j=N,k;e[35]!==t.chart_spec||e[36]!==c?(k=t.chart_spec&&B(t.chart_spec,c),e[35]=t.chart_spec,e[36]=c,e[37]=k):k=e[37];let v=k,w;e[38]!==t.chart_code||e[39]!==a.source_type?(w=t.chart_code&&a.source_type==="local"&&(0,l.jsx)(F,{chartCode:t.chart_code}),e[38]=t.chart_code,e[39]=a.source_type,e[40]=w):w=e[40];let A=w,C;e[41]!==s.name||e[42]!==r||e[43]!==n||e[44]!==a?(C=a.source_type==="duckdb"&&(0,l.jsx)($,{content:"Add SQL cell",delayDuration:400,children:(0,l.jsx)(z,{variant:"outline",size:"icon",className:"z-10 bg-background absolute right-1 -top-1",onClick:M.stopPropagation(()=>{r(O({table:a,columnName:s.name,sqlTableContext:n}))}),children:(0,l.jsx)(I,{className:"h-3 w-3"})})}),e[41]=s.name,e[42]=r,e[43]=n,e[44]=a,e[45]=C):C=e[45];let q=C;if(!_&&!j&&!v){let m;return e[46]===Symbol.for("react.memo_cache_sentinel")?(m=(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:"No data"}),e[46]=m):m=e[46],m}let S;return e[47]!==A||e[48]!==q||e[49]!==v||e[50]!==_||e[51]!==j?(S=(0,l.jsxs)(E,{children:[_,A,q,v,j]}),e[47]=A,e[48]=q,e[49]=v,e[50]=_,e[51]=j,e[52]=S):S=e[52],S};function G({error:o,missingPackages:e,refetchPreview:a}){return(0,l.jsxs)("div",{className:"text-xs text-muted-foreground p-2 border border-border rounded flex items-center justify-between",children:[(0,l.jsx)("span",{children:o}),e&&(0,l.jsx)(ke,{packages:e,showMaxPackages:1,className:"w-32",onInstall:a})]})}function J({stats:o,dataType:e,locale:a}){return(0,l.jsx)("div",{className:"gap-x-16 gap-y-1 grid grid-cols-2-fit border rounded p-2 empty:hidden",children:Object.entries(o).map(([s,t])=>t==null?null:(0,l.jsxs)("div",{className:"flex items-center gap-1 group",children:[(0,l.jsx)("span",{className:"text-xs min-w-[60px] capitalize",children:W(s,e)}),(0,l.jsx)("span",{className:"text-xs font-bold text-muted-foreground tracking-wide",children:me(t,a)}),(0,l.jsx)(de,{className:"h-3 w-3 invisible group-hover:visible",value:String(t)})]},s))})}var we=(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(oe,{className:"size-4"})});function B(o,e){return(0,l.jsx)(je.Suspense,{fallback:we,children:(0,l.jsx)(te,{spec:(a=>({...a,background:"transparent",config:{...a.config,background:"transparent"}}))(JSON.parse(o)),options:{theme:e==="dark"?"dark":"vox",height:100,width:"container",actions:!1,renderer:"canvas"}})})}const F=o=>{let e=(0,Q.c)(10),{chartCode:a}=o,s=K(Z),t=xe(),{createNewCell:r}=Y(),n;e[0]!==s||e[1]!==r||e[2]!==t?(n=u=>{u.includes("alt")&&ue({autoInstantiate:s,createNewCell:r,fromCellId:t}),r({code:u,before:!1,cellId:t??"__end__"})},e[0]=s,e[1]=r,e[2]=t,e[3]=n):n=e[3];let c=n,i;e[4]!==a||e[5]!==c?(i=M.stopPropagation(()=>c(a)),e[4]=a,e[5]=c,e[6]=i):i=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(I,{className:"h-3 w-3"}),e[7]=d):d=e[7];let p;return e[8]===i?p=e[9]:(p=(0,l.jsx)($,{content:"Add chart to notebook",delayDuration:400,children:(0,l.jsx)(z,{variant:"outline",size:"icon",className:"z-10 bg-background absolute right-1 -top-0.5",onClick:i,children:d})}),e[8]=i,e[9]=p),p};export{J as a,he as c,be as d,fe as f,G as i,ge as l,ve as n,_e as o,I as p,B as r,E as s,F as t,ye as u};
import{s as I}from"./chunk-LvLJmgfZ.js";import{t as Ye}from"./react-Bj1aDYRI.js";import{t as ae}from"./react-dom-CSu739Rf.js";import{t as ue}from"./compiler-runtime-B3qBwwSJ.js";import{n as ze,r as W,t as Ve}from"./useEventListener-Cb-RVVEn.js";import{t as Ze}from"./jsx-runtime-ZmTK25f3.js";var u=I(Ye(),1),E=I(Ze(),1);function qe(e,t){let r=u.createContext(t),n=a=>{let{children:l,...i}=a,m=u.useMemo(()=>i,Object.values(i));return(0,E.jsx)(r.Provider,{value:m,children:l})};n.displayName=e+"Provider";function o(a){let l=u.useContext(r);if(l)return l;if(t!==void 0)return t;throw Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function He(e,t=[]){let r=[];function n(a,l){let i=u.createContext(l),m=r.length;r=[...r,l];let c=f=>{var b;let{scope:p,children:h,...N}=f,s=((b=p==null?void 0:p[e])==null?void 0:b[m])||i,v=u.useMemo(()=>N,Object.values(N));return(0,E.jsx)(s.Provider,{value:v,children:h})};c.displayName=a+"Provider";function d(f,p){var s;let h=((s=p==null?void 0:p[e])==null?void 0:s[m])||i,N=u.useContext(h);if(N)return N;if(l!==void 0)return l;throw Error(`\`${f}\` must be used within \`${a}\``)}return[c,d]}let o=()=>{let a=r.map(l=>u.createContext(l));return function(l){let i=(l==null?void 0:l[e])||a;return u.useMemo(()=>({[`__scope${e}`]:{...l,[e]:i}}),[l,i])}};return o.scopeName=e,[n,Xe(o,...t)]}function Xe(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){let a=n.reduce((l,{useScope:i,scopeName:m})=>{let c=i(o)[`__scope${m}`];return{...l,...c}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}typeof window<"u"&&window.document&&window.document.createElement;function F(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e==null||e(n),r===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}var L=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Ge=u.useInsertionEffect||L;function Je({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,l]=Qe({defaultProp:t,onChange:r}),i=e!==void 0,m=i?e:o;{let c=u.useRef(e!==void 0);u.useEffect(()=>{let d=c.current;d!==i&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=i},[i,n])}return[m,u.useCallback(c=>{var d;if(i){let f=et(c)?c(e):c;f!==e&&((d=l.current)==null||d.call(l,f))}else a(c)},[i,e,a,l])]}function Qe({defaultProp:e,onChange:t}){let[r,n]=u.useState(e),o=u.useRef(r),a=u.useRef(t);return Ge(()=>{a.current=t},[t]),u.useEffect(()=>{var l;o.current!==r&&((l=a.current)==null||l.call(a,r),o.current=r)},[r,o]),[r,n,a]}function et(e){return typeof e=="function"}function tt(e,t){return u.useReducer((r,n)=>t[r][n]??r,e)}var le=e=>{let{present:t,children:r}=e,n=nt(t),o=typeof r=="function"?r({present:n.isPresent}):u.Children.only(r),a=W(n.ref,rt(o));return typeof r=="function"||n.isPresent?u.cloneElement(o,{ref:a}):null};le.displayName="Presence";function nt(e){let[t,r]=u.useState(),n=u.useRef(null),o=u.useRef(e),a=u.useRef("none"),[l,i]=tt(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{let m=B(n.current);a.current=l==="mounted"?m:"none"},[l]),L(()=>{let m=n.current,c=o.current;if(c!==e){let d=a.current,f=B(m);e?i("MOUNT"):f==="none"||(m==null?void 0:m.display)==="none"?i("UNMOUNT"):i(c&&d!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,i]),L(()=>{if(t){let m,c=t.ownerDocument.defaultView??window,d=p=>{let h=B(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(i("ANIMATION_END"),!o.current)){let N=t.style.animationFillMode;t.style.animationFillMode="forwards",m=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},f=p=>{p.target===t&&(a.current=B(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(m),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else i("ANIMATION_END")},[t,i]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:u.useCallback(m=>{n.current=m?getComputedStyle(m):null,r(m)},[])}}function B(e){return(e==null?void 0:e.animationName)||"none"}function rt(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ce(e){let t=ot(e),r=u.forwardRef((n,o)=>{let{children:a,...l}=n,i=u.Children.toArray(a),m=i.find(at);if(m){let c=m.props.children,d=i.map(f=>f===m?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return(0,E.jsx)(t,{...l,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return(0,E.jsx)(t,{...l,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function ot(e){let t=u.forwardRef((r,n)=>{let{children:o,...a}=r;if(u.isValidElement(o)){let l=lt(o),i=ut(a,o.props);return o.type!==u.Fragment&&(i.ref=n?ze(n,l):l),u.cloneElement(o,i)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function it(e){let t=({children:r})=>(0,E.jsx)(E.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=se,t}function at(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function ut(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{let i=a(...l);return o(...l),i}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function lt(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ct=I(ae(),1),k=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=ce(`Primitive.${t}`),n=u.forwardRef((o,a)=>{let{asChild:l,...i}=o,m=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,E.jsx)(m,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function de(e,t){e&&ct.flushSync(()=>e.dispatchEvent(t))}function M(e){let t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function st(e,t=globalThis==null?void 0:globalThis.document){let r=M(e);u.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var dt="DismissableLayer",X="dismissableLayer.update",ft="dismissableLayer.pointerDownOutside",mt="dismissableLayer.focusOutside",fe,me=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),G=u.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:i,...m}=e,c=u.useContext(me),[d,f]=u.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=u.useState({}),N=W(t,g=>f(g)),s=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=s.indexOf(v),S=d?s.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,y=S>=b,x=vt(g=>{let P=g.target,T=[...c.branches].some(Ke=>Ke.contains(P));!y||T||(o==null||o(g),l==null||l(g),g.defaultPrevented||(i==null||i()))},p),R=ht(g=>{let P=g.target;[...c.branches].some(T=>T.contains(P))||(a==null||a(g),l==null||l(g),g.defaultPrevented||(i==null||i()))},p);return st(g=>{S===c.layers.size-1&&(n==null||n(g),!g.defaultPrevented&&i&&(g.preventDefault(),i()))},p),u.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(fe=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ve(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=fe)}},[d,p,r,c]),u.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ve())},[d,c]),u.useEffect(()=>{let g=()=>h({});return document.addEventListener(X,g),()=>document.removeEventListener(X,g)},[]),(0,E.jsx)(k.div,{...m,ref:N,style:{pointerEvents:w?y?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,R.onFocusCapture),onBlurCapture:F(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,x.onPointerDownCapture)})});G.displayName=dt;var pt="DismissableLayerBranch",pe=u.forwardRef((e,t)=>{let r=u.useContext(me),n=u.useRef(null),o=W(t,n);return u.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,E.jsx)(k.div,{...e,ref:o})});pe.displayName=pt;function vt(e,t=globalThis==null?void 0:globalThis.document){let r=M(e),n=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{let a=i=>{if(i.target&&!n.current){let m=function(){he(ft,r,c,{discrete:!0})},c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=m,t.addEventListener("click",o.current,{once:!0})):m()}else t.removeEventListener("click",o.current);n.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ht(e,t=globalThis==null?void 0:globalThis.document){let r=M(e),n=u.useRef(!1);return u.useEffect(()=>{let o=a=>{a.target&&!n.current&&he(mt,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ve(){let e=new CustomEvent(X);document.dispatchEvent(e)}function he(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?de(o,a):o.dispatchEvent(a)}var yt=G,gt=pe,Et=u.useId||(()=>{}),bt=0;function wt(e){let[t,r]=u.useState(Et());return L(()=>{e||r(n=>n??String(bt++))},[e]),e||(t?`radix-${t}`:"")}var Nt=I(ae(),1),St="Portal",ye=u.forwardRef((e,t)=>{var i;let{container:r,...n}=e,[o,a]=u.useState(!1);L(()=>a(!0),[]);let l=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?Nt.createPortal((0,E.jsx)(k.div,{...n,ref:t}),l):null});ye.displayName=St;var Ct=ue(),xt={display:"contents"};const ge=u.forwardRef((e,t)=>{let r=(0,Ct.c)(3),{children:n}=e,o;return r[0]!==n||r[1]!==t?(o=(0,E.jsx)("div",{ref:t,className:"marimo",style:xt,children:n}),r[0]=n,r[1]=t,r[2]=o):o=r[2],o});ge.displayName="StyleNamespace";function U(){return document.querySelector("[data-vscode-theme-kind]")!==null}var D=ue(),Ee="[data-vscode-output-container]";const Rt=U()?0:30;function Pt(){let e=(0,D.c)(1),[t,r]=(0,u.useState)(document.fullscreenElement),n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{r(document.fullscreenElement)},e[0]=n):n=e[0],Ve(document,"fullscreenchange",n),t}function Ot(e){let t=n=>{let o=(0,D.c)(6),[a,l]=u.useState(null),i=u.useRef(null),m,c;o[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{i.current&&l(be(i.current,Ee))},c=[],o[0]=m,o[1]=c):(m=o[0],c=o[1]),u.useLayoutEffect(m,c);let d;o[2]===Symbol.for("react.memo_cache_sentinel")?(d=(0,E.jsx)("div",{ref:i,className:"contents invisible"}),o[2]=d):d=o[2];let f;return o[3]!==a||o[4]!==n?(f=(0,E.jsxs)(E.Fragment,{children:[d,(0,E.jsx)(e,{...n,container:a})]}),o[3]=a,o[4]=n,o[5]=f):f=o[5],f},r=n=>{let o=(0,D.c)(7),a=Pt();if(U()){let i;return o[0]===n?i=o[1]:(i=(0,E.jsx)(t,{...n}),o[0]=n,o[1]=i),i}if(!a){let i;return o[2]===n?i=o[3]:(i=(0,E.jsx)(e,{...n}),o[2]=n,o[3]=i),i}let l;return o[4]!==a||o[5]!==n?(l=(0,E.jsx)(e,{...n,container:a}),o[4]=a,o[5]=n,o[6]=l):l=o[6],l};return r.displayName=e.displayName,r}function Tt(e){let t=n=>{let o=(0,D.c)(6),[a,l]=u.useState(null),i=u.useRef(null),m,c;o[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{i.current&&l(be(i.current,Ee))},c=[],o[0]=m,o[1]=c):(m=o[0],c=o[1]),u.useLayoutEffect(m,c);let d;o[2]===Symbol.for("react.memo_cache_sentinel")?(d=(0,E.jsx)("div",{ref:i,className:"contents invisible"}),o[2]=d):d=o[2];let f;return o[3]!==a||o[4]!==n?(f=(0,E.jsxs)(E.Fragment,{children:[d,(0,E.jsx)(e,{...n,collisionBoundary:a})]}),o[3]=a,o[4]=n,o[5]=f):f=o[5],f},r=n=>{let o=(0,D.c)(4);if(U()){let l;return o[0]===n?l=o[1]:(l=(0,E.jsx)(t,{...n}),o[0]=n,o[1]=l),l}let a;return o[2]===n?a=o[3]:(a=(0,E.jsx)(e,{...n}),o[2]=n,o[3]=a),a};return r.displayName=e.displayName,r}function be(e,t){let r=e;for(;r;){let n=r.closest(t);if(n)return n;let o=r.getRootNode();if(r=o instanceof ShadowRoot?o.host:r.parentElement,r===o)break}return null}var J=0;function Lt(){u.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??we()),document.body.insertAdjacentElement("beforeend",e[1]??we()),J++,()=>{J===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J--}},[])}function we(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Q="focusScope.autoFocusOnMount",ee="focusScope.autoFocusOnUnmount",Ne={bubbles:!1,cancelable:!0},Mt="FocusScope",Se=u.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[i,m]=u.useState(null),c=M(o),d=M(a),f=u.useRef(null),p=W(t,s=>m(s)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(n){let s=function(w){if(h.paused||!i)return;let y=w.target;i.contains(y)?f.current=y:O(f.current,{select:!0})},v=function(w){if(h.paused||!i)return;let y=w.relatedTarget;y!==null&&(i.contains(y)||O(f.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(let y of w)y.removedNodes.length>0&&O(i)};document.addEventListener("focusin",s),document.addEventListener("focusout",v);let S=new MutationObserver(b);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",v),S.disconnect()}}},[n,i,h.paused]),u.useEffect(()=>{if(i){Re.add(h);let s=document.activeElement;if(!i.contains(s)){let v=new CustomEvent(Q,Ne);i.addEventListener(Q,c),i.dispatchEvent(v),v.defaultPrevented||($t(jt(Ce(i)),{select:!0}),document.activeElement===s&&O(i))}return()=>{i.removeEventListener(Q,c),setTimeout(()=>{let v=new CustomEvent(ee,Ne);i.addEventListener(ee,d),i.dispatchEvent(v),v.defaultPrevented||O(s??document.body,{select:!0}),i.removeEventListener(ee,d),Re.remove(h)},0)}}},[i,c,d,h]);let N=u.useCallback(s=>{if(!r&&!n||h.paused)return;let v=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,b=document.activeElement;if(v&&b){let S=s.currentTarget,[w,y]=At(S);w&&y?!s.shiftKey&&b===y?(s.preventDefault(),r&&O(w,{select:!0})):s.shiftKey&&b===w&&(s.preventDefault(),r&&O(y,{select:!0})):b===S&&s.preventDefault()}},[r,n,h.paused]);return(0,E.jsx)(k.div,{tabIndex:-1,...l,ref:p,onKeyDown:N})});Se.displayName=Mt;function $t(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(O(n,{select:t}),document.activeElement!==r)return}function At(e){let t=Ce(e);return[xe(t,e),xe(t.reverse(),e)]}function Ce(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xe(e,t){for(let r of e)if(!_t(r,{upTo:t}))return r}function _t(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function kt(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&kt(e)&&t&&e.select()}}var Re=Dt();function Dt(){let e=[];return{add(t){let r=e[0];t!==r&&(r==null||r.pause()),e=Pe(e,t),e.unshift(t)},remove(t){var r;e=Pe(e,t),(r=e[0])==null||r.resume()}}}function Pe(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function jt(e){return e.filter(t=>t.tagName!=="A")}var It=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},$=new WeakMap,K=new WeakMap,Y={},te=0,Oe=function(e){return e&&(e.host||Oe(e.parentNode))},Wt=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Oe(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ft=function(e,t,r,n){var o=Wt(t,Array.isArray(e)?e:[e]);Y[r]||(Y[r]=new WeakMap);var a=Y[r],l=[],i=new Set,m=new Set(o),c=function(f){!f||i.has(f)||(i.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||m.has(f)||Array.prototype.forEach.call(f.children,function(p){if(i.has(p))d(p);else try{var h=p.getAttribute(n),N=h!==null&&h!=="false",s=($.get(p)||0)+1,v=(a.get(p)||0)+1;$.set(p,s),a.set(p,v),l.push(p),s===1&&N&&K.set(p,!0),v===1&&p.setAttribute(r,"true"),N||p.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return d(t),i.clear(),te++,function(){l.forEach(function(f){var p=$.get(f)-1,h=a.get(f)-1;$.set(f,p),a.set(f,h),p||(K.has(f)||f.removeAttribute(n),K.delete(f)),h||f.removeAttribute(r)}),te--,te||($=new WeakMap,$=new WeakMap,K=new WeakMap,Y={})}},Bt=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||It(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Ft(n,o,r,"aria-hidden")):function(){return null}},C=function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C.apply(this,arguments)};function Te(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ut(e,t,r,n){function o(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function i(d){try{c(n.next(d))}catch(f){l(f)}}function m(d){try{c(n.throw(d))}catch(f){l(f)}}function c(d){d.done?a(d.value):o(d.value).then(i,m)}c((n=n.apply(e,t||[])).next())})}function Kt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var z="right-scroll-bar-position",V="width-before-scroll-bar",Yt="with-scroll-bars-hidden",zt="--removed-body-scroll-bar-size";function ne(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Vt(e,t){var r=(0,u.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Zt=typeof window<"u"?u.useLayoutEffect:u.useEffect,Le=new WeakMap;function qt(e,t){var r=Vt(t||null,function(n){return e.forEach(function(o){return ne(o,n)})});return Zt(function(){var n=Le.get(r);if(n){var o=new Set(n),a=new Set(e),l=r.current;o.forEach(function(i){a.has(i)||ne(i,null)}),a.forEach(function(i){o.has(i)||ne(i,l)})}Le.set(r,e)},[e]),r}function Ht(e){return e}function Xt(e,t){t===void 0&&(t=Ht);var r=[],n=!1;return{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(o),a=r}var i=function(){var c=a;a=[],c.forEach(o)},m=function(){return Promise.resolve().then(i)};m(),r={push:function(c){a.push(c),m()},filter:function(c){return a=a.filter(c),r}}}}}function Gt(e){e===void 0&&(e={});var t=Xt(null);return t.options=C({async:!0,ssr:!1},e),t}var Me=function(e){var t=e.sideCar,r=Te(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return u.createElement(n,C({},r))};Me.isSideCarExport=!0;function Jt(e,t){return e.useMedium(t),Me}var $e=Gt(),re=function(){},Z=u.forwardRef(function(e,t){var r=u.useRef(null),n=u.useState({onScrollCapture:re,onWheelCapture:re,onTouchMoveCapture:re}),o=n[0],a=n[1],l=e.forwardProps,i=e.children,m=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,N=e.noIsolation,s=e.inert,v=e.allowPinchZoom,b=e.as,S=b===void 0?"div":b,w=e.gapMode,y=Te(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,R=qt([r,t]),g=C(C({},y),o);return u.createElement(u.Fragment,null,d&&u.createElement(x,{sideCar:$e,removeScrollBar:c,shards:f,noRelative:h,noIsolation:N,inert:s,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:w}),l?u.cloneElement(u.Children.only(i),C(C({},g),{ref:R})):u.createElement(S,C({},g,{className:m,ref:R}),i))});Z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Z.classNames={fullWidth:V,zeroRight:z};var Ae,Qt=function(){if(Ae)return Ae;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function en(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qt();return t&&e.setAttribute("nonce",t),e}function tn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nn(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var rn=function(){var e=0,t=null;return{add:function(r){e==0&&(t=en())&&(tn(t,r),nn(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},on=function(){var e=rn();return function(t,r){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},_e=function(){var e=on();return function(t){var r=t.styles,n=t.dynamic;return e(r,n),null}},an={left:0,top:0,right:0,gap:0},oe=function(e){return parseInt(e||"",10)||0},un=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[oe(r),oe(n),oe(o)]},ln=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return an;var t=un(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},cn=_e(),j="data-scroll-locked",sn=function(e,t,r,n){var o=e.left,a=e.top,l=e.right,i=e.gap;return r===void 0&&(r="margin"),`
.${Yt} {
overflow: hidden ${n};
padding-right: ${i}px ${n};
}
body[${j}] {
overflow: hidden ${n};
overscroll-behavior: contain;
${[t&&`position: relative ${n};`,r==="margin"&&`
padding-left: ${o}px;
padding-top: ${a}px;
padding-right: ${l}px;
margin-left:0;
margin-top:0;
margin-right: ${i}px ${n};
`,r==="padding"&&`padding-right: ${i}px ${n};`].filter(Boolean).join("")}
}
.${z} {
right: ${i}px ${n};
}
.${V} {
margin-right: ${i}px ${n};
}
.${z} .${z} {
right: 0 ${n};
}
.${V} .${V} {
margin-right: 0 ${n};
}
body[${j}] {
${zt}: ${i}px;
}
`},ke=function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},dn=function(){u.useEffect(function(){return document.body.setAttribute(j,(ke()+1).toString()),function(){var e=ke()-1;e<=0?document.body.removeAttribute(j):document.body.setAttribute(j,e.toString())}},[])},fn=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;dn();var a=u.useMemo(function(){return ln(o)},[o]);return u.createElement(cn,{styles:sn(a,!t,o,r?"":"!important")})},ie=!1;if(typeof window<"u")try{var q=Object.defineProperty({},"passive",{get:function(){return ie=!0,!0}});window.addEventListener("test",q,q),window.removeEventListener("test",q,q)}catch{ie=!1}var A=ie?{passive:!1}:!1,mn=function(e){return e.tagName==="TEXTAREA"},De=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!mn(e)&&r[t]==="visible")},pn=function(e){return De(e,"overflowY")},vn=function(e){return De(e,"overflowX")},je=function(e,t){var r=t.ownerDocument,n=t;do{if(typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host),Ie(e,n)){var o=We(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},hn=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},yn=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ie=function(e,t){return e==="v"?pn(t):vn(t)},We=function(e,t){return e==="v"?hn(t):yn(t)},gn=function(e,t){return e==="h"&&t==="rtl"?-1:1},En=function(e,t,r,n,o){var a=gn(e,window.getComputedStyle(t).direction),l=a*n,i=r.target,m=t.contains(i),c=!1,d=l>0,f=0,p=0;do{if(!i)break;var h=We(e,i),N=h[0],s=h[1]-h[2]-a*N;(N||s)&&Ie(e,i)&&(f+=s,p+=N);var v=i.parentNode;i=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!m&&i!==document.body||m&&(t.contains(i)||t===i));return(d&&(o&&Math.abs(f)<1||!o&&l>f)||!d&&(o&&Math.abs(p)<1||!o&&-l>p))&&(c=!0),c},H=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fe=function(e){return[e.deltaX,e.deltaY]},Be=function(e){return e&&"current"in e?e.current:e},bn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wn=function(e){return`
.block-interactivity-${e} {pointer-events: none;}
.allow-interactivity-${e} {pointer-events: all;}
`},Nn=0,_=[];function Sn(e){var t=u.useRef([]),r=u.useRef([0,0]),n=u.useRef(),o=u.useState(Nn++)[0],a=u.useState(_e)[0],l=u.useRef(e);u.useEffect(function(){l.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${o}`);var s=Kt([e.lockRef.current],(e.shards||[]).map(Be),!0).filter(Boolean);return s.forEach(function(v){return v.classList.add(`allow-interactivity-${o}`)}),function(){document.body.classList.remove(`block-interactivity-${o}`),s.forEach(function(v){return v.classList.remove(`allow-interactivity-${o}`)})}}},[e.inert,e.lockRef.current,e.shards]);var i=u.useCallback(function(s,v){if("touches"in s&&s.touches.length===2||s.type==="wheel"&&s.ctrlKey)return!l.current.allowPinchZoom;var b=H(s),S=r.current,w="deltaX"in s?s.deltaX:S[0]-b[0],y="deltaY"in s?s.deltaY:S[1]-b[1],x,R=s.target,g=Math.abs(w)>Math.abs(y)?"h":"v";if("touches"in s&&g==="h"&&R.type==="range")return!1;var P=je(g,R);if(!P)return!0;if(P?x=g:(x=g==="v"?"h":"v",P=je(g,R)),!P)return!1;if(!n.current&&"changedTouches"in s&&(w||y)&&(n.current=x),!x)return!0;var T=n.current||x;return En(T,v,s,T==="h"?w:y,!0)},[]),m=u.useCallback(function(s){var v=s;if(!(!_.length||_[_.length-1]!==a)){var b="deltaY"in v?Fe(v):H(v),S=t.current.filter(function(y){return y.name===v.type&&(y.target===v.target||v.target===y.shadowParent)&&bn(y.delta,b)})[0];if(S&&S.should){v.cancelable&&v.preventDefault();return}if(!S){var w=(l.current.shards||[]).map(Be).filter(Boolean).filter(function(y){return y.contains(v.target)});(w.length>0?i(v,w[0]):!l.current.noIsolation)&&v.cancelable&&v.preventDefault()}}},[]),c=u.useCallback(function(s,v,b,S){var w={name:s,delta:v,target:b,should:S,shadowParent:Cn(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(y){return y!==w})},1)},[]),d=u.useCallback(function(s){r.current=H(s),n.current=void 0},[]),f=u.useCallback(function(s){c(s.type,Fe(s),s.target,i(s,e.lockRef.current))},[]),p=u.useCallback(function(s){c(s.type,H(s),s.target,i(s,e.lockRef.current))},[]);u.useEffect(function(){return _.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",m,A),document.addEventListener("touchmove",m,A),document.addEventListener("touchstart",d,A),function(){_=_.filter(function(s){return s!==a}),document.removeEventListener("wheel",m,A),document.removeEventListener("touchmove",m,A),document.removeEventListener("touchstart",d,A)}},[]);var h=e.removeScrollBar,N=e.inert;return u.createElement(u.Fragment,null,N?u.createElement(a,{styles:wn(o)}):null,h?u.createElement(fn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Cn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var xn=Jt($e,Sn),Ue=u.forwardRef(function(e,t){return u.createElement(Z,C({},e,{ref:t,sideCar:xn}))});Ue.classNames=Z.classNames;var Rn=Ue;export{L as C,He as E,Je as S,qe as T,k as _,Lt as a,it as b,Tt as c,ye as d,wt as f,M as g,yt as h,Se as i,U as l,G as m,Ut as n,Rt as o,gt as p,Bt as r,Ot as s,Rn as t,ge as u,de as v,F as w,le as x,ce as y};
import{s as fe}from"./chunk-LvLJmgfZ.js";import{t as De}from"./react-Bj1aDYRI.js";import{G as Pe}from"./cells-DPp5cDaO.js";import{t as $e}from"./compiler-runtime-B3qBwwSJ.js";import{n as V}from"./useEventListener-Cb-RVVEn.js";import{t as Le}from"./jsx-runtime-ZmTK25f3.js";import{t as P}from"./cn-BKtXLv3a.js";import{lt as Fe}from"./input-DUrq2DiR.js";import{f as $}from"./Combination-BAEdC-rz.js";import{c as Ke,n as Oe,o as Ve,t as qe}from"./menu-items-BMjcEb2j.js";import{_ as ze,g as Be,h as Ge,p as He}from"./alert-dialog-BW4srmS0.js";import{n as Ue,t as Te}from"./dialog-eb-NieZw.js";import{t as A}from"./dist-CDXJRSCj.js";var pe=1,We=.9,Je=.8,Qe=.17,ee=.1,te=.999,Xe=.9999,Ye=.99,Ze=/[\\\/_+.#"@\[\(\{&]/,et=/[\\\/_+.#"@\[\(\{&]/g,tt=/[\s-]/,ve=/[\s-]/g;function re(t,r,e,n,a,l,o){if(l===r.length)return a===t.length?pe:Ye;var m=`${a},${l}`;if(o[m]!==void 0)return o[m];for(var p=n.charAt(l),c=e.indexOf(p,a),f=0,v,y,x,I;c>=0;)v=re(t,r,e,n,c+1,l+1,o),v>f&&(c===a?v*=pe:Ze.test(t.charAt(c-1))?(v*=Je,x=t.slice(a,c-1).match(et),x&&a>0&&(v*=te**+x.length)):tt.test(t.charAt(c-1))?(v*=We,I=t.slice(a,c-1).match(ve),I&&a>0&&(v*=te**+I.length)):(v*=Qe,a>0&&(v*=te**+(c-a))),t.charAt(c)!==r.charAt(l)&&(v*=Xe)),(v<ee&&e.charAt(c-1)===n.charAt(l+1)||n.charAt(l+1)===n.charAt(l)&&e.charAt(c-1)!==n.charAt(l))&&(y=re(t,r,e,n,c+1,l+2,o),y*ee>v&&(v=y*ee)),v>f&&(f=v),c=e.indexOf(p,c+1);return o[m]=f,f}function he(t){return t.toLowerCase().replace(ve," ")}function rt(t,r,e){return t=e&&e.length>0?`${t+" "+e.join(" ")}`:t,re(t,r,he(t),he(r),0,0,{})}var u=fe(De(),1),q='[cmdk-group=""]',ae='[cmdk-group-items=""]',at='[cmdk-group-heading=""]',ge='[cmdk-item=""]',be=`${ge}:not([aria-disabled="true"])`,ne="cmdk-item-select",L="data-value",nt=(t,r,e)=>rt(t,r,e),we=u.createContext(void 0),z=()=>u.useContext(we),ye=u.createContext(void 0),le=()=>u.useContext(ye),xe=u.createContext(void 0),ke=u.forwardRef((t,r)=>{let e=F(()=>({search:"",value:t.value??t.defaultValue??"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),n=F(()=>new Set),a=F(()=>new Map),l=F(()=>new Map),o=F(()=>new Set),m=Se(t),{label:p,children:c,value:f,onValueChange:v,filter:y,shouldFilter:x,loop:I,disablePointerSelection:Me=!1,vimBindings:H=!0,...B}=t,U=$(),T=$(),K=$(),b=u.useRef(null),N=pt();M(()=>{if(f!==void 0){let i=f.trim();e.current.value=i,S.emit()}},[f]),M(()=>{N(6,ue)},[]);let S=u.useMemo(()=>({subscribe:i=>(o.current.add(i),()=>o.current.delete(i)),snapshot:()=>e.current,setState:(i,d,h)=>{var R;var s,g,w;if(!Object.is(e.current[i],d)){if(e.current[i]=d,i==="search")X(),J(),N(1,Q);else if(i==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let C=document.getElementById(K);C?C.focus():(s=document.getElementById(U))==null||s.focus()}if(N(7,()=>{var C;e.current.selectedItemId=(C=D())==null?void 0:C.id,S.emit()}),h||N(5,ue),((R=m.current)==null?void 0:R.value)!==void 0){let C=d??"";(w=(g=m.current).onValueChange)==null||w.call(g,C);return}}S.emit()}},emit:()=>{o.current.forEach(i=>i())}}),[]),W=u.useMemo(()=>({value:(i,d,h)=>{var s;d!==((s=l.current.get(i))==null?void 0:s.value)&&(l.current.set(i,{value:d,keywords:h}),e.current.filtered.items.set(i,oe(d,h)),N(2,()=>{J(),S.emit()}))},item:(i,d)=>(n.current.add(i),d&&(a.current.has(d)?a.current.get(d).add(i):a.current.set(d,new Set([i]))),N(3,()=>{X(),J(),e.current.value||Q(),S.emit()}),()=>{l.current.delete(i),n.current.delete(i),e.current.filtered.items.delete(i);let h=D();N(4,()=>{X(),(h==null?void 0:h.getAttribute("id"))===i&&Q(),S.emit()})}),group:i=>(a.current.has(i)||a.current.set(i,new Set),()=>{l.current.delete(i),a.current.delete(i)}),filter:()=>m.current.shouldFilter,label:p||t["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:U,inputId:K,labelId:T,listInnerRef:b}),[]);function oe(i,d){var s;let h=((s=m.current)==null?void 0:s.filter)??nt;return i?h(i,e.current.search,d):0}function J(){if(!e.current.search||m.current.shouldFilter===!1)return;let i=e.current.filtered.items,d=[];e.current.filtered.groups.forEach(s=>{let g=a.current.get(s),w=0;g.forEach(R=>{let C=i.get(R);w=Math.max(C,w)}),d.push([s,w])});let h=b.current;O().sort((s,g)=>{let w=s.getAttribute("id"),R=g.getAttribute("id");return(i.get(R)??0)-(i.get(w)??0)}).forEach(s=>{let g=s.closest(ae);g?g.appendChild(s.parentElement===g?s:s.closest(`${ae} > *`)):h.appendChild(s.parentElement===h?s:s.closest(`${ae} > *`))}),d.sort((s,g)=>g[1]-s[1]).forEach(s=>{var w;let g=(w=b.current)==null?void 0:w.querySelector(`${q}[${L}="${encodeURIComponent(s[0])}"]`);g==null||g.parentElement.appendChild(g)})}function Q(){var d;let i=(d=O().find(h=>h.getAttribute("aria-disabled")!=="true"))==null?void 0:d.getAttribute(L);S.setState("value",i||void 0)}function X(){var d,h;if(!e.current.search||m.current.shouldFilter===!1){e.current.filtered.count=n.current.size;return}e.current.filtered.groups=new Set;let i=0;for(let s of n.current){let g=oe(((d=l.current.get(s))==null?void 0:d.value)??"",((h=l.current.get(s))==null?void 0:h.keywords)??[]);e.current.filtered.items.set(s,g),g>0&&i++}for(let[s,g]of a.current)for(let w of g)if(e.current.filtered.items.get(w)>0){e.current.filtered.groups.add(s);break}e.current.filtered.count=i}function ue(){var h,s;var i;let d=D();d&&(((h=d.parentElement)==null?void 0:h.firstChild)===d&&((i=(s=d.closest(q))==null?void 0:s.querySelector(at))==null||i.scrollIntoView({block:"nearest"})),d.scrollIntoView({block:"nearest"}))}function D(){var i;return(i=b.current)==null?void 0:i.querySelector(`${ge}[aria-selected="true"]`)}function O(){var i;return Array.from(((i=b.current)==null?void 0:i.querySelectorAll(be))||[])}function Y(i){let d=O()[i];d&&S.setState("value",d.getAttribute(L))}function Z(i){var d;let h=D(),s=O(),g=s.findIndex(R=>R===h),w=s[g+i];(d=m.current)!=null&&d.loop&&(w=g+i<0?s[s.length-1]:g+i===s.length?s[0]:s[g+i]),w&&S.setState("value",w.getAttribute(L))}function ce(i){var s;let d=(s=D())==null?void 0:s.closest(q),h;for(;d&&!h;)d=i>0?mt(d,q):ft(d,q),h=d==null?void 0:d.querySelector(be);h?S.setState("value",h.getAttribute(L)):Z(i)}let se=()=>Y(O().length-1),de=i=>{i.preventDefault(),i.metaKey?se():i.altKey?ce(1):Z(1)},me=i=>{i.preventDefault(),i.metaKey?Y(0):i.altKey?ce(-1):Z(-1)};return u.createElement(A.div,{ref:r,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:i=>{var d;(d=B.onKeyDown)==null||d.call(B,i);let h=i.nativeEvent.isComposing||i.keyCode===229;if(!(i.defaultPrevented||h))switch(i.key){case"n":case"j":H&&i.ctrlKey&&de(i);break;case"ArrowDown":de(i);break;case"p":case"k":H&&i.ctrlKey&&me(i);break;case"ArrowUp":me(i);break;case"Home":i.preventDefault(),Y(0);break;case"End":i.preventDefault(),se();break;case"Enter":{i.preventDefault();let s=D();if(s){let g=new Event(ne);s.dispatchEvent(g)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:W.inputId,id:W.labelId,style:ht},p),G(t,i=>u.createElement(ye.Provider,{value:S},u.createElement(we.Provider,{value:W},i))))}),lt=u.forwardRef((t,r)=>{var K;let e=$(),n=u.useRef(null),a=u.useContext(xe),l=z(),o=Se(t),m=((K=o.current)==null?void 0:K.forceMount)??(a==null?void 0:a.forceMount);M(()=>{if(!m)return l.item(e,a==null?void 0:a.id)},[m]);let p=Ne(e,n,[t.value,t.children,n],t.keywords),c=le(),f=_(b=>b.value&&b.value===p.current),v=_(b=>m||l.filter()===!1?!0:b.search?b.filtered.items.get(e)>0:!0);u.useEffect(()=>{let b=n.current;if(!(!b||t.disabled))return b.addEventListener(ne,y),()=>b.removeEventListener(ne,y)},[v,t.onSelect,t.disabled]);function y(){var b,N;x(),(N=(b=o.current).onSelect)==null||N.call(b,p.current)}function x(){c.setState("value",p.current,!0)}if(!v)return null;let{disabled:I,value:Me,onSelect:H,forceMount:B,keywords:U,...T}=t;return u.createElement(A.div,{ref:V(n,r),...T,id:e,"cmdk-item":"",role:"option","aria-disabled":!!I,"aria-selected":!!f,"data-disabled":!!I,"data-selected":!!f,onPointerMove:I||l.getDisablePointerSelection()?void 0:x,onClick:I?void 0:y},t.children)}),it=u.forwardRef((t,r)=>{let{heading:e,children:n,forceMount:a,...l}=t,o=$(),m=u.useRef(null),p=u.useRef(null),c=$(),f=z(),v=_(x=>a||f.filter()===!1?!0:x.search?x.filtered.groups.has(o):!0);M(()=>f.group(o),[]),Ne(o,m,[t.value,t.heading,p]);let y=u.useMemo(()=>({id:o,forceMount:a}),[a]);return u.createElement(A.div,{ref:V(m,r),...l,"cmdk-group":"",role:"presentation",hidden:v?void 0:!0},e&&u.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:c},e),G(t,x=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":e?c:void 0},u.createElement(xe.Provider,{value:y},x))))}),ot=u.forwardRef((t,r)=>{let{alwaysRender:e,...n}=t,a=u.useRef(null),l=_(o=>!o.search);return!e&&!l?null:u.createElement(A.div,{ref:V(a,r),...n,"cmdk-separator":"",role:"separator"})}),ut=u.forwardRef((t,r)=>{let{onValueChange:e,...n}=t,a=t.value!=null,l=le(),o=_(c=>c.search),m=_(c=>c.selectedItemId),p=z();return u.useEffect(()=>{t.value!=null&&l.setState("search",t.value)},[t.value]),u.createElement(A.input,{ref:r,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":m,id:p.inputId,type:"text",value:a?t.value:o,onChange:c=>{a||l.setState("search",c.target.value),e==null||e(c.target.value)}})}),Ee=u.forwardRef((t,r)=>{let{children:e,label:n="Suggestions",...a}=t,l=u.useRef(null),o=u.useRef(null),m=_(c=>c.selectedItemId),p=z();return u.useEffect(()=>{if(o.current&&l.current){let c=o.current,f=l.current,v,y=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let x=c.offsetHeight;f.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return y.observe(c),()=>{cancelAnimationFrame(v),y.unobserve(c)}}},[]),u.createElement(A.div,{ref:V(l,r),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":n,id:p.listId},G(t,c=>u.createElement("div",{ref:V(o,p.listInnerRef),"cmdk-list-sizer":""},c)))}),ct=u.forwardRef((t,r)=>{let{open:e,onOpenChange:n,overlayClassName:a,contentClassName:l,container:o,...m}=t;return u.createElement(ze,{open:e,onOpenChange:n},u.createElement(Be,{container:o},u.createElement(Ge,{"cmdk-overlay":"",className:a}),u.createElement(He,{"aria-label":t.label,"cmdk-dialog":"",className:l},u.createElement(ke,{ref:r,...m}))))}),st=u.forwardRef((t,r)=>_(e=>e.filtered.count===0)?u.createElement(A.div,{ref:r,...t,"cmdk-empty":"",role:"presentation"}):null),dt=u.forwardRef((t,r)=>{let{progress:e,children:n,label:a="Loading...",...l}=t;return u.createElement(A.div,{ref:r,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},G(t,o=>u.createElement("div",{"aria-hidden":!0},o)))}),k=Object.assign(ke,{List:Ee,Item:lt,Input:ut,Group:it,Separator:ot,Dialog:ct,Empty:st,Loading:dt});function mt(t,r){let e=t.nextElementSibling;for(;e;){if(e.matches(r))return e;e=e.nextElementSibling}}function ft(t,r){let e=t.previousElementSibling;for(;e;){if(e.matches(r))return e;e=e.previousElementSibling}}function Se(t){let r=u.useRef(t);return M(()=>{r.current=t}),r}var M=typeof window>"u"?u.useEffect:u.useLayoutEffect;function F(t){let r=u.useRef();return r.current===void 0&&(r.current=t()),r}function _(t){let r=le(),e=()=>t(r.snapshot());return u.useSyncExternalStore(r.subscribe,e,e)}function Ne(t,r,e,n=[]){let a=u.useRef(),l=z();return M(()=>{var o;let m=(()=>{var c;for(let f of e){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(c=f.current.textContent)==null?void 0:c.trim():a.current}})(),p=n.map(c=>c.trim());l.value(t,m,p),(o=r.current)==null||o.setAttribute(L,m),a.current=m}),a}var pt=()=>{let[t,r]=u.useState(),e=F(()=>new Map);return M(()=>{e.current.forEach(n=>n()),e.current=new Map},[t]),(n,a)=>{e.current.set(n,a),r({})}};function vt(t){let r=t.type;return typeof r=="function"?r(t.props):"render"in r?r.render(t.props):t}function G({asChild:t,children:r},e){return t&&u.isValidElement(r)?u.cloneElement(vt(r),{ref:r.ref},e(r.props.children)):e(r)}var ht={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},j=$e(),E=fe(Le(),1),ie=u.forwardRef((t,r)=>{let e=(0,j.c)(9),n,a;e[0]===t?(n=e[1],a=e[2]):({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a);let l;e[3]===n?l=e[4]:(l=P("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",n),e[3]=n,e[4]=l);let o;return e[5]!==a||e[6]!==r||e[7]!==l?(o=(0,E.jsx)(k,{ref:r,className:l,...a}),e[5]=a,e[6]=r,e[7]=l,e[8]=o):o=e[8],o});ie.displayName=k.displayName;var gt=t=>{let r=(0,j.c)(8),e,n;r[0]===t?(e=r[1],n=r[2]):({children:e,...n}=t,r[0]=t,r[1]=e,r[2]=n);let a;r[3]===e?a=r[4]:(a=(0,E.jsx)(Ue,{className:"overflow-hidden p-0 shadow-2xl",usePortal:!0,children:(0,E.jsx)(ie,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})}),r[3]=e,r[4]=a);let l;return r[5]!==n||r[6]!==a?(l=(0,E.jsx)(Te,{...n,children:a}),r[5]=n,r[6]=a,r[7]=l):l=r[7],l},Ie=u.forwardRef((t,r)=>{let e=(0,j.c)(19),n,a,l,o;e[0]===t?(n=e[1],a=e[2],l=e[3],o=e[4]):({className:n,icon:a,rootClassName:o,...l}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=l,e[4]=o);let m;e[5]===o?m=e[6]:(m=P("flex items-center border-b px-3",o),e[5]=o,e[6]=m);let p;e[7]===a?p=e[8]:(p=a===null?null:(0,E.jsx)(Fe,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e[7]=a,e[8]=p);let c;e[9]===n?c=e[10]:(c=P("placeholder:text-foreground-muted flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),e[9]=n,e[10]=c);let f;e[11]!==l||e[12]!==r||e[13]!==c?(f=(0,E.jsx)(k.Input,{ref:r,className:c,...l}),e[11]=l,e[12]=r,e[13]=c,e[14]=f):f=e[14];let v;return e[15]!==m||e[16]!==p||e[17]!==f?(v=(0,E.jsxs)("div",{className:m,"cmdk-input-wrapper":"",children:[p,f]}),e[15]=m,e[16]=p,e[17]=f,e[18]=v):v=e[18],v});Ie.displayName=k.Input.displayName;var Ce=u.forwardRef((t,r)=>{let e=(0,j.c)(9),n,a;e[0]===t?(n=e[1],a=e[2]):({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a);let l;e[3]===n?l=e[4]:(l=P("max-h-[300px] overflow-y-auto overflow-x-hidden",n),e[3]=n,e[4]=l);let o;return e[5]!==a||e[6]!==r||e[7]!==l?(o=(0,E.jsx)(k.List,{ref:r,className:l,...a}),e[5]=a,e[6]=r,e[7]=l,e[8]=o):o=e[8],o});Ce.displayName=k.List.displayName;var Re=u.forwardRef((t,r)=>{let e=(0,j.c)(3),n;return e[0]!==t||e[1]!==r?(n=(0,E.jsx)(k.Empty,{ref:r,className:"py-6 text-center text-sm",...t}),e[0]=t,e[1]=r,e[2]=n):n=e[2],n});Re.displayName=k.Empty.displayName;var Ae=u.forwardRef((t,r)=>{let e=(0,j.c)(9),n,a;e[0]===t?(n=e[1],a=e[2]):({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a);let l;e[3]===n?l=e[4]:(l=P("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",n),e[3]=n,e[4]=l);let o;return e[5]!==a||e[6]!==r||e[7]!==l?(o=(0,E.jsx)(k.Group,{ref:r,className:l,...a}),e[5]=a,e[6]=r,e[7]=l,e[8]=o):o=e[8],o});Ae.displayName=k.Group.displayName;var _e=u.forwardRef((t,r)=>{let e=(0,j.c)(9),n,a;e[0]===t?(n=e[1],a=e[2]):({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a);let l;e[3]===n?l=e[4]:(l=Ke({className:n}),e[3]=n,e[4]=l);let o;return e[5]!==a||e[6]!==r||e[7]!==l?(o=(0,E.jsx)(k.Separator,{ref:r,className:l,...a}),e[5]=a,e[6]=r,e[7]=l,e[8]=o):o=e[8],o});_e.displayName=k.Separator.displayName;var je=u.forwardRef((t,r)=>{let e=(0,j.c)(17),n,a,l,o,m;if(e[0]!==r||e[1]!==t){let{className:c,variant:f,inset:v,...y}=t;n=k.Item,a=r,e[7]!==c||e[8]!==v||e[9]!==f?(l=P(Ve({variant:f,inset:v}).replace(qe,"data-[disabled=false]:pointer-events-all data-[disabled=false]:opacity-100 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"),c),e[7]=c,e[8]=v,e[9]=f,e[10]=l):l=e[10],o=y,m=Pe.htmlEscape(y.value),e[0]=r,e[1]=t,e[2]=n,e[3]=a,e[4]=l,e[5]=o,e[6]=m}else n=e[2],a=e[3],l=e[4],o=e[5],m=e[6];let p;return e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==o||e[15]!==m?(p=(0,E.jsx)(n,{ref:a,className:l,...o,value:m}),e[11]=n,e[12]=a,e[13]=l,e[14]=o,e[15]=m,e[16]=p):p=e[16],p});je.displayName=k.Item.displayName;var bt=Oe;export{Ie as a,_e as c,Ae as i,bt as l,gt as n,je as o,Re as r,Ce as s,ie as t,Ee as u};
import{s as V}from"./chunk-LvLJmgfZ.js";import{l as X,u as L}from"./useEvent-BhXAndur.js";import{t as Y}from"./react-Bj1aDYRI.js";import{Ur as Z}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as O}from"./compiler-runtime-B3qBwwSJ.js";import"./tooltip-DxKBXCGp.js";import{S as ee}from"./ai-model-dropdown-Dk2SdB3C.js";import{a as le,i as te,l as ie}from"./hotkeys-BHHWjLlp.js";import{p as ae,v as oe,y as re}from"./utils-YqBXNpsM.js";import{i as ne}from"./switch-dWLWbbtg.js";import{t as pe}from"./useEventListener-Cb-RVVEn.js";import{t as se}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./JsonOutput-PE5ko4gi.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{r as de}from"./requests-B4FYHTZl.js";import"./layout-_O8thjaV.js";import"./download-os8QlW6l.js";import{t as me}from"./useCellActionButton-DUDHPTmq.js";import"./markdown-renderer-DJy8ww5d.js";import{i as he,t as ce}from"./useNotebookActions-BFGSBiOA.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import"./dates-CrvjILe3.js";import"./popover-CH1FzjxU.js";import"./share-ipf2hrOh.js";import"./vega-loader.browser-DXARUlxo.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import"./purify.es-DZrAQFIu.js";import{a as ye,c as fe,i as z,l as J,n as ue,o as K,r as be,s as ge}from"./command-2ElA5IkO.js";import"./chunk-5FQGJX7Z-DPlx2kjA.js";import"./katex-CDLTCvjQ.js";import"./html-to-image-CIQqSu-S.js";import{r as ke}from"./focus-C1YokgL7.js";import{t as Q}from"./renderShortcut-BckyRbYt.js";import"./esm-Bmu2DhPy.js";import"./name-cell-input-Bc7geMVf.js";import"./multi-icon-jM74Rbvg.js";import"./dist-tLOz534J.js";import"./dist-C5H5qIvq.js";import"./dist-B62Xo7-b.js";import"./dist-BpuNldXk.js";import"./dist-8kKeYgOg.js";import"./dist-BZWmfQbq.js";import"./dist-DLgWirXg.js";import"./dist-CF4gkF4y.js";import"./dist-CNW1zLeq.js";import"./esm-D82gQH1f.js";var Ce=O(),je=V(Y(),1);function xe(e,l){let t=(0,Ce.c)(11),n;t[0]===l?n=t[1]:(n=new Z(l),t[0]=l,t[1]=n);let p=n,r;t[2]!==e||t[3]!==p?(r=()=>p.get(e),t[2]=e,t[3]=p,t[4]=r):r=t[4];let[m,g]=(0,je.useState)(r),i;t[5]!==e||t[6]!==p?(i=k=>{g(k),p.set(e,k)},t[5]=e,t[6]=p,t[7]=i):i=t[7];let f=i,h;return t[8]!==f||t[9]!==m?(h=[m,f],t[8]=f,t[9]=m,t[10]=h):h=t[10],h}var ve=O(),Se=3;function we(){let e=(0,ve.c)(7),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];let[t,n]=xe("marimo:commands",l),p;e[1]!==t||e[2]!==n?(p=m=>{n(_e([m,...t]).slice(0,Se))},e[1]=t,e[2]=n,e[3]=p):p=e[3];let r;return e[4]!==t||e[5]!==p?(r={recentCommands:t,addRecentCommand:p},e[4]=t,e[5]=p,e[6]=r):r=e[6],r}function _e(e){return[...new Set(e)]}function W(e){return e.dropdown!==void 0}function T(e,l=""){return e.flatMap(t=>t.label?W(t)?T(t.dropdown,`${l+t.label} > `):{...t,label:l+t.label}:[])}var He=O();function Ae(){let e=(0,He.c)(75),[l,t]=re(),[n,p]=oe(),{saveAppConfig:r,saveUserConfig:m}=de(),g;e[0]!==m||e[1]!==t?(g=async d=>{await m({config:d}).then(()=>{t(c=>({...c,...d}))})},e[0]=m,e[1]=t,e[2]=g):g=e[2];let i=g,f;e[3]!==r||e[4]!==p?(f=async d=>{await r({config:d}).then(()=>{p(d)})},e[3]=r,e[4]=p,e[5]=f):f=e[5];let h=f,k;if(e[6]!==n||e[7]!==l.completion||e[8]!==l.display||e[9]!==l.keymap||e[10]!==h||e[11]!==i){let d;e[13]===n?d=e[14]:(d=I=>I!==n.width,e[13]=n,e[14]=d);let c;e[15]!==n||e[16]!==h?(c=I=>({label:`App config > Set width=${I}`,handle:()=>{h({...n,width:I})}}),e[15]=n,e[16]=h,e[17]=c):c=e[17];let H;e[18]!==l.display||e[19]!==i?(H={label:"Config > Set theme: dark",handle:()=>{i({display:{...l.display,theme:"dark"}})}},e[18]=l.display,e[19]=i,e[20]=H):H=e[20];let C;e[21]!==l.display||e[22]!==i?(C={label:"Config > Set theme: light",handle:()=>{i({display:{...l.display,theme:"light"}})}},e[21]=l.display,e[22]=i,e[23]=C):C=e[23];let A;e[24]!==l.display||e[25]!==i?(A={label:"Config > Set theme: system",handle:()=>{i({display:{...l.display,theme:"system"}})}},e[24]=l.display,e[25]=i,e[26]=A):A=e[26];let P=l.keymap.preset==="vim",M;e[27]!==l.keymap||e[28]!==i?(M=()=>{i({keymap:{...l.keymap,preset:"vim"}})},e[27]=l.keymap,e[28]=i,e[29]=M):M=e[29];let N;e[30]!==P||e[31]!==M?(N={label:"Config > Switch keymap to VIM",hidden:P,handle:M},e[30]=P,e[31]=M,e[32]=N):N=e[32];let D=l.keymap.preset==="default",j;e[33]!==l.keymap||e[34]!==i?(j=()=>{i({keymap:{...l.keymap,preset:"default"}})},e[33]=l.keymap,e[34]=i,e[35]=j):j=e[35];let u;e[36]!==D||e[37]!==j?(u={label:"Config > Switch keymap to default (current: VIM)",hidden:D,handle:j},e[36]=D,e[37]=j,e[38]=u):u=e[38];let x;e[39]!==l.completion||e[40]!==i?(x=()=>{i({completion:{...l.completion,copilot:!1}})},e[39]=l.completion,e[40]=i,e[41]=x):x=e[41];let v=l.completion.copilot!=="github",U;e[42]!==x||e[43]!==v?(U={label:"Config > Disable GitHub Copilot",handle:x,hidden:v},e[42]=x,e[43]=v,e[44]=U):U=e[44];let S;e[45]!==l.completion||e[46]!==i?(S=()=>{i({completion:{...l.completion,copilot:"github"}})},e[45]=l.completion,e[46]=i,e[47]=S):S=e[47];let G=l.completion.copilot==="github",$;e[48]!==S||e[49]!==G?($={label:"Config > Enable GitHub Copilot",handle:S,hidden:G},e[48]=S,e[49]=G,e[50]=$):$=e[50];let q=!l.display.reference_highlighting,w;e[51]!==l.display||e[52]!==i?(w=()=>{i({display:{...l.display,reference_highlighting:!1}})},e[51]=l.display,e[52]=i,e[53]=w):w=e[53];let b;e[54]!==q||e[55]!==w?(b={label:"Config > Disable reference highlighting",hidden:q,handle:w},e[54]=q,e[55]=w,e[56]=b):b=e[56];let y;e[57]!==l.display||e[58]!==i?(y=()=>{i({display:{...l.display,reference_highlighting:!0}})},e[57]=l.display,e[58]=i,e[59]=y):y=e[59];let F;e[60]!==l.display.reference_highlighting||e[61]!==y?(F={label:"Config > Enable reference highlighting",hidden:l.display.reference_highlighting,handle:y},e[60]=l.display.reference_highlighting,e[61]=y,e[62]=F):F=e[62];let o=l.display.cell_output==="above",a;e[63]!==l.display||e[64]!==i?(a=()=>{i({display:{...l.display,cell_output:"above"}})},e[63]=l.display,e[64]=i,e[65]=a):a=e[65];let R;e[66]!==o||e[67]!==a?(R={label:"Config > Set cell output area: above",hidden:o,handle:a},e[66]=o,e[67]=a,e[68]=R):R=e[68];let _=l.display.cell_output==="below",E;e[69]!==l.display||e[70]!==i?(E=()=>{i({display:{...l.display,cell_output:"below"}})},e[69]=l.display,e[70]=i,e[71]=E):E=e[71];let B;e[72]!==_||e[73]!==E?(B={label:"Config > Set cell output area: below",hidden:_,handle:E},e[72]=_,e[73]=E,e[74]=B):B=e[74],k=[...ee().filter(d).map(c),H,C,A,N,u,U,$,b,F,R,B].filter(Me),e[6]=n,e[7]=l.completion,e[8]=l.display,e[9]=l.keymap,e[10]=h,e[11]=i,e[12]=k}else k=e[12];return k}function Me(e){return!e.hidden}var Ne=O(),s=V(se(),1),De=()=>{let e=(0,Ne.c)(37),[l,t]=X(he),n=ne(),p=L(ke),r=L(ae),m;e[0]===p?m=e[1]:(m={cell:p},e[0]=p,e[1]=m);let g=me(m).flat();g=T(g);let i=Ae(),f=ce();f=[...T(f),...T(i)];let h=f.filter(Fe),k=le.keyBy(h,Re),{recentCommands:d,addRecentCommand:c}=we(),H;e[2]===d?H=e[3]:(H=new Set(d),e[2]=d,e[3]=H);let C=H,A;e[4]!==r||e[5]!==t?(A=o=>{ie(r.getHotkey("global.commandPalette").key)(o)&&(o.preventDefault(),t(Ee))},e[4]=r,e[5]=t,e[6]=A):A=e[6],pe(document,"keydown",A);let P;e[7]!==c||e[8]!==r||e[9]!==n||e[10]!==t?(P=(o,a)=>{let R=n[o];if(!R)return null;let _=r.getHotkey(o);return(0,s.jsxs)(K,{disabled:a.disabled,onSelect:()=>{c(o),t(!1),requestAnimationFrame(()=>{R()})},value:_.name,children:[(0,s.jsxs)("span",{children:[_.name,a.tooltip&&(0,s.jsx)("span",{className:"ml-2",children:a.tooltip})]}),(0,s.jsx)(J,{children:(0,s.jsx)(Q,{shortcut:_.key})})]},o)},e[7]=c,e[8]=r,e[9]=n,e[10]=t,e[11]=P):P=e[11];let M=P,N;e[12]!==c||e[13]!==r||e[14]!==t?(N=o=>{let{label:a,handle:R,props:_,hotkey:E}=o,B=_===void 0?{}:_;return(0,s.jsxs)(K,{disabled:B.disabled,onSelect:()=>{c(a),t(!1),requestAnimationFrame(()=>{R()})},value:a,children:[(0,s.jsxs)("span",{children:[a,B.tooltip&&(0,s.jsxs)("span",{className:"ml-2",children:["(",B.tooltip,")"]})]}),E&&(0,s.jsx)(J,{children:(0,s.jsx)(Q,{shortcut:r.getHotkey(E).key})})]},a)},e[12]=c,e[13]=r,e[14]=t,e[15]=N):N=e[15];let D=N,j=ue,u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=(0,s.jsx)(ye,{placeholder:"Type to search..."}),e[16]=u):u=e[16];let x=ge,v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=(0,s.jsx)(be,{children:"No results found."}),e[17]=v):v=e[17];let U=d.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z,{heading:"Recently Used",children:d.map(o=>{let a=k[o];return te(o)?M(o,{disabled:a==null?void 0:a.disabled,tooltip:a==null?void 0:a.tooltip}):a&&!W(a)?D({label:a.label,handle:a.handleHeadless||a.handle,props:{disabled:a.disabled,tooltip:a.tooltip}}):null})}),(0,s.jsx)(fe,{})]}),S=z,G=r.iterate().map(o=>{if(C.has(o))return null;let a=k[o];return M(o,{disabled:a==null?void 0:a.disabled,tooltip:a==null?void 0:a.tooltip})}),$=h.map(o=>C.has(o.label)?null:D({label:o.label,handle:o.handleHeadless||o.handle,props:{disabled:o.disabled,tooltip:o.tooltip}})),q;e[18]!==C||e[19]!==D?(q=o=>C.has(o.label)?null:D({label:`Cell > ${o.label}`,handle:o.handleHeadless||o.handle,props:{disabled:o.disabled,tooltip:o.tooltip}}),e[18]=C,e[19]=D,e[20]=q):q=e[20];let w=g.map(q),b;e[21]!==S||e[22]!==$||e[23]!==w||e[24]!==G?(b=(0,s.jsxs)(S,{heading:"Commands",children:[G,$,w]}),e[21]=S,e[22]=$,e[23]=w,e[24]=G,e[25]=b):b=e[25];let y;e[26]!==x||e[27]!==b||e[28]!==v||e[29]!==U?(y=(0,s.jsxs)(x,{children:[v,U,b]}),e[26]=x,e[27]=b,e[28]=v,e[29]=U,e[30]=y):y=e[30];let F;return e[31]!==j||e[32]!==l||e[33]!==t||e[34]!==y||e[35]!==u?(F=(0,s.jsxs)(j,{open:l,onOpenChange:t,children:[u,y]}),e[31]=j,e[32]=l,e[33]=t,e[34]=y,e[35]=u,e[36]=F):F=e[36],F};function Fe(e){return!e.hotkey}function Re(e){return e.label}function Ee(e){return!e}export{De as default};
import{s as j}from"./chunk-LvLJmgfZ.js";import{t as w}from"./react-Bj1aDYRI.js";import{k}from"./cells-DPp5cDaO.js";import{t as g}from"./compiler-runtime-B3qBwwSJ.js";import{t as N}from"./jsx-runtime-ZmTK25f3.js";import{t as y}from"./badge-DX6CQ6PA.js";import{t as C}from"./use-toast-BDYuj3zG.js";import{i as _,r as b,t as I}from"./popover-CH1FzjxU.js";import{t as S}from"./copy-DHrHayPa.js";import{t as v}from"./cell-link-B9b7J8QK.js";var O=g(),i=j(N(),1);const B=p=>{let e=(0,O.c)(18),{maxCount:n,cellIds:r,onClick:t,skipScroll:o}=p,m=k(),l,a,c;if(e[0]!==r||e[1]!==m||e[2]!==n||e[3]!==t||e[4]!==o){c=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===m?f=e[9]:(f=(s,x)=>m.inOrderIds.indexOf(s)-m.inOrderIds.indexOf(x),e[8]=m,e[9]=f);let u=[...r].sort(f);if(r.length===0){let s;e[10]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)("div",{className:"text-muted-foreground",children:"--"}),e[10]=s):s=e[10],c=s;break e}let h;e[11]!==r.length||e[12]!==t||e[13]!==o?(h=(s,x)=>(0,i.jsxs)("span",{className:"truncate",children:[(0,i.jsx)(v,{variant:"focus",cellId:s,skipScroll:o,className:"whitespace-nowrap",onClick:t?()=>t(s):void 0},s),x<r.length-1&&", "]},s),e[11]=r.length,e[12]=t,e[13]=o,e[14]=h):h=e[14],l=u.slice(0,n).map(h),a=r.length>n&&(0,i.jsxs)(I,{children:[(0,i.jsx)(_,{asChild:!0,children:(0,i.jsxs)("span",{className:"whitespace-nowrap text-muted-foreground text-xs hover:underline cursor-pointer",children:["+",r.length-n," more"]})}),(0,i.jsx)(b,{className:"w-auto",children:(0,i.jsx)("div",{className:"flex flex-col gap-1 py-1",children:u.slice(n).map(s=>(0,i.jsx)(v,{variant:"focus",cellId:s,className:"whitespace-nowrap",onClick:t?()=>t(s):void 0},s))})})]})}e[0]=r,e[1]=m,e[2]=n,e[3]=t,e[4]=o,e[5]=l,e[6]=a,e[7]=c}else l=e[5],a=e[6],c=e[7];if(c!==Symbol.for("react.early_return_sentinel"))return c;let d;return e[15]!==l||e[16]!==a?(d=(0,i.jsxs)(i.Fragment,{children:[l,a]}),e[15]=l,e[16]=a,e[17]=d):d=e[17],d};var F=g();w();const q=p=>{let e=(0,F.c)(15),n,r,t,o;e[0]===p?(n=e[1],r=e[2],t=e[3],o=e[4]):({name:r,declaredBy:n,onClick:t,...o}=p,e[0]=p,e[1]=n,e[2]=r,e[3]=t,e[4]=o);let m=n.length>1?"destructive":"outline",l;e[5]!==r||e[6]!==t?(l=async d=>{if(t){t(d);return}await S(r),C({title:"Copied to clipboard"})},e[5]=r,e[6]=t,e[7]=l):l=e[7];let a;e[8]!==r||e[9]!==m||e[10]!==l?(a=(0,i.jsx)(y,{title:r,variant:m,className:"rounded-sm text-ellipsis block overflow-hidden max-w-fit cursor-pointer font-medium",onClick:l,children:r}),e[8]=r,e[9]=m,e[10]=l,e[11]=a):a=e[11];let c;return e[12]!==o||e[13]!==a?(c=(0,i.jsx)("div",{className:"max-w-[130px]",...o,children:a}),e[12]=o,e[13]=a,e[14]=c):c=e[14],c};export{B as n,q as t};
const e=JSON.parse(`{"select":{"description":"Retrieves data from one or more tables","syntax":"SELECT column1, column2, ... FROM table_name","example":"SELECT name, email FROM users WHERE active = true"},"from":{"description":"Specifies which table to select data from","syntax":"FROM table_name","example":"FROM users u JOIN orders o ON u.id = o.user_id"},"where":{"description":"Filters records based on specified conditions","syntax":"WHERE condition","example":"WHERE age > 18 AND status = 'active'"},"join":{"description":"Combines rows from two or more tables based on a related column","syntax":"JOIN table_name ON condition","example":"JOIN orders ON users.id = orders.user_id"},"inner":{"description":"Returns records that have matching values in both tables","syntax":"INNER JOIN table_name ON condition","example":"INNER JOIN orders ON users.id = orders.user_id"},"left":{"description":"Returns all records from the left table and matching records from the right","syntax":"LEFT JOIN table_name ON condition","example":"LEFT JOIN orders ON users.id = orders.user_id"},"right":{"description":"Returns all records from the right table and matching records from the left","syntax":"RIGHT JOIN table_name ON condition","example":"RIGHT JOIN users ON users.id = orders.user_id"},"full":{"description":"Returns all records when there is a match in either left or right table","syntax":"FULL OUTER JOIN table_name ON condition","example":"FULL OUTER JOIN orders ON users.id = orders.user_id"},"outer":{"description":"Used with FULL to return all records from both tables","syntax":"FULL OUTER JOIN table_name ON condition","example":"FULL OUTER JOIN orders ON users.id = orders.user_id"},"cross":{"description":"Returns the Cartesian product of both tables","syntax":"CROSS JOIN table_name","example":"CROSS JOIN colors"},"order":{"description":"Sorts the result set in ascending or descending order","syntax":"ORDER BY column_name [ASC|DESC]","example":"ORDER BY created_at DESC, name ASC"},"by":{"description":"Used with ORDER BY and GROUP BY clauses","syntax":"ORDER BY column_name or GROUP BY column_name","example":"ORDER BY name ASC or GROUP BY category"},"group":{"description":"Groups rows that have the same values into summary rows","syntax":"GROUP BY column_name","example":"GROUP BY category HAVING COUNT(*) > 5"},"having":{"description":"Filters groups based on specified conditions (used with GROUP BY)","syntax":"HAVING condition","example":"GROUP BY category HAVING COUNT(*) > 5"},"insert":{"description":"Adds new records to a table","syntax":"INSERT INTO table_name (columns) VALUES (values)","example":"INSERT INTO users (name, email) VALUES ('John', 'john@example.com')"},"into":{"description":"Specifies the target table for INSERT statements","syntax":"INSERT INTO table_name","example":"INSERT INTO users (name, email) VALUES ('John', 'john@example.com')"},"values":{"description":"Specifies the values to insert into a table","syntax":"VALUES (value1, value2, ...)","example":"VALUES ('John', 'john@example.com', true)"},"update":{"description":"Modifies existing records in a table","syntax":"UPDATE table_name SET column = value WHERE condition","example":"UPDATE users SET email = 'new@example.com' WHERE id = 1"},"set":{"description":"Specifies which columns to update and their new values","syntax":"SET column1 = value1, column2 = value2","example":"SET name = 'John', email = 'john@example.com'"},"delete":{"description":"Removes records from a table","syntax":"DELETE FROM table_name WHERE condition","example":"DELETE FROM users WHERE active = false"},"create":{"description":"Creates a new table, database, or other database object","syntax":"CREATE TABLE table_name (column definitions)","example":"CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100))"},"table":{"description":"Specifies a table in CREATE, ALTER, or DROP statements","syntax":"CREATE TABLE table_name or ALTER TABLE table_name","example":"CREATE TABLE users (id INT, name VARCHAR(100))"},"drop":{"description":"Deletes a table, database, or other database object","syntax":"DROP TABLE table_name","example":"DROP TABLE old_users"},"alter":{"description":"Modifies an existing database object","syntax":"ALTER TABLE table_name ADD/DROP/MODIFY column","example":"ALTER TABLE users ADD COLUMN phone VARCHAR(20)"},"add":{"description":"Adds a new column or constraint to a table","syntax":"ALTER TABLE table_name ADD column_name data_type","example":"ALTER TABLE users ADD phone VARCHAR(20)"},"column":{"description":"Specifies a column in table operations","syntax":"ADD COLUMN column_name or DROP COLUMN column_name","example":"ADD COLUMN created_at TIMESTAMP DEFAULT NOW()"},"primary":{"description":"Defines a primary key constraint","syntax":"PRIMARY KEY (column_name)","example":"CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100))"},"key":{"description":"Used with PRIMARY or FOREIGN to define constraints","syntax":"PRIMARY KEY or FOREIGN KEY","example":"PRIMARY KEY (id) or FOREIGN KEY (user_id) REFERENCES users(id)"},"foreign":{"description":"Defines a foreign key constraint","syntax":"FOREIGN KEY (column_name) REFERENCES table_name(column_name)","example":"FOREIGN KEY (user_id) REFERENCES users(id)"},"references":{"description":"Specifies the referenced table and column for foreign keys","syntax":"REFERENCES table_name(column_name)","example":"FOREIGN KEY (user_id) REFERENCES users(id)"},"unique":{"description":"Ensures all values in a column are unique","syntax":"UNIQUE (column_name)","example":"CREATE TABLE users (email VARCHAR(255) UNIQUE)"},"constraint":{"description":"Names a constraint for easier management","syntax":"CONSTRAINT constraint_name constraint_type","example":"CONSTRAINT fk_user FOREIGN KEY (user_id) REFERENCES users(id)"},"check":{"description":"Defines a condition that must be true for all rows","syntax":"CHECK (condition)","example":"CHECK (age >= 18)"},"default":{"description":"Specifies a default value for a column","syntax":"column_name data_type DEFAULT value","example":"created_at TIMESTAMP DEFAULT NOW()"},"index":{"description":"Creates an index to improve query performance","syntax":"CREATE INDEX index_name ON table_name (column_name)","example":"CREATE INDEX idx_user_email ON users (email)"},"view":{"description":"Creates a virtual table based on a SELECT statement","syntax":"CREATE VIEW view_name AS SELECT ...","example":"CREATE VIEW active_users AS SELECT * FROM users WHERE active = true"},"limit":{"description":"Restricts the number of records returned","syntax":"LIMIT number","example":"SELECT * FROM users LIMIT 10"},"offset":{"description":"Skips a specified number of rows before returning results","syntax":"OFFSET number","example":"SELECT * FROM users LIMIT 10 OFFSET 20"},"top":{"description":"Limits the number of records returned (SQL Server syntax)","syntax":"SELECT TOP number columns FROM table","example":"SELECT TOP 10 * FROM users"},"fetch":{"description":"Retrieves a specific number of rows (modern SQL standard)","syntax":"OFFSET number ROWS FETCH NEXT number ROWS ONLY","example":"OFFSET 10 ROWS FETCH NEXT 5 ROWS ONLY"},"with":{"description":"Defines a Common Table Expression (CTE)","syntax":"WITH cte_name AS (SELECT ...) SELECT ... FROM cte_name","example":"WITH user_stats AS (SELECT user_id, COUNT(*) FROM orders GROUP BY user_id) SELECT * FROM user_stats"},"recursive":{"description":"Creates a recursive CTE that can reference itself","syntax":"WITH RECURSIVE cte_name AS (...) SELECT ...","example":"WITH RECURSIVE tree AS (SELECT id, parent_id FROM categories WHERE parent_id IS NULL UNION ALL SELECT c.id, c.parent_id FROM categories c JOIN tree t ON c.parent_id = t.id) SELECT * FROM tree"},"distinct":{"description":"Returns only unique values","syntax":"SELECT DISTINCT column_name FROM table_name","example":"SELECT DISTINCT category FROM products"},"count":{"description":"Returns the number of rows that match a condition","syntax":"COUNT(*) or COUNT(column_name)","example":"SELECT COUNT(*) FROM users WHERE active = true"},"sum":{"description":"Returns the sum of numeric values","syntax":"SUM(column_name)","example":"SELECT SUM(price) FROM orders WHERE status = 'completed'"},"avg":{"description":"Returns the average value of numeric values","syntax":"AVG(column_name)","example":"SELECT AVG(age) FROM users"},"max":{"description":"Returns the maximum value","syntax":"MAX(column_name)","example":"SELECT MAX(price) FROM products"},"min":{"description":"Returns the minimum value","syntax":"MIN(column_name)","example":"SELECT MIN(price) FROM products"},"as":{"description":"Creates an alias for a column or table","syntax":"column_name AS alias_name or table_name AS alias_name","example":"SELECT name AS customer_name FROM users AS u"},"on":{"description":"Specifies the join condition between tables","syntax":"JOIN table_name ON condition","example":"JOIN orders ON users.id = orders.user_id"},"and":{"description":"Combines multiple conditions with logical AND","syntax":"WHERE condition1 AND condition2","example":"WHERE age > 18 AND status = 'active'"},"or":{"description":"Combines multiple conditions with logical OR","syntax":"WHERE condition1 OR condition2","example":"WHERE category = 'electronics' OR category = 'books'"},"not":{"description":"Negates a condition","syntax":"WHERE NOT condition","example":"WHERE NOT status = 'inactive'"},"null":{"description":"Represents a missing or unknown value","syntax":"column_name IS NULL or column_name IS NOT NULL","example":"WHERE email IS NOT NULL"},"is":{"description":"Used to test for NULL values or boolean conditions","syntax":"column_name IS NULL or column_name IS NOT NULL","example":"WHERE deleted_at IS NULL"},"in":{"description":"Checks if a value matches any value in a list","syntax":"column_name IN (value1, value2, ...)","example":"WHERE status IN ('active', 'pending', 'approved')"},"between":{"description":"Selects values within a range","syntax":"column_name BETWEEN value1 AND value2","example":"WHERE age BETWEEN 18 AND 65"},"like":{"description":"Searches for a pattern in a column","syntax":"column_name LIKE pattern","example":"WHERE name LIKE 'John%' (starts with 'John')"},"exists":{"description":"Tests whether a subquery returns any rows","syntax":"WHERE EXISTS (subquery)","example":"WHERE EXISTS (SELECT 1 FROM orders WHERE orders.user_id = users.id)"},"any":{"description":"Compares a value to any value returned by a subquery","syntax":"column_name operator ANY (subquery)","example":"WHERE price > ANY (SELECT price FROM products WHERE category = 'electronics')"},"all":{"description":"Compares a value to all values returned by a subquery","syntax":"column_name operator ALL (subquery)","example":"WHERE price > ALL (SELECT price FROM products WHERE category = 'books')"},"some":{"description":"Synonym for ANY - compares a value to some values in a subquery","syntax":"column_name operator SOME (subquery)","example":"WHERE price > SOME (SELECT price FROM products WHERE category = 'electronics')"},"union":{"description":"Combines the result sets of two or more SELECT statements","syntax":"SELECT ... UNION SELECT ...","example":"SELECT name FROM customers UNION SELECT name FROM suppliers"},"intersect":{"description":"Returns rows that are in both result sets","syntax":"SELECT ... INTERSECT SELECT ...","example":"SELECT customer_id FROM orders INTERSECT SELECT customer_id FROM returns"},"except":{"description":"Returns rows from the first query that are not in the second","syntax":"SELECT ... EXCEPT SELECT ...","example":"SELECT customer_id FROM customers EXCEPT SELECT customer_id FROM blacklist"},"case":{"description":"Provides conditional logic in SQL queries","syntax":"CASE WHEN condition THEN result ELSE result END","example":"CASE WHEN age < 18 THEN 'Minor' ELSE 'Adult' END"},"when":{"description":"Specifies conditions in CASE statements","syntax":"CASE WHEN condition THEN result","example":"CASE WHEN score >= 90 THEN 'A' WHEN score >= 80 THEN 'B' END"},"then":{"description":"Specifies the result for a WHEN condition","syntax":"WHEN condition THEN result","example":"WHEN age < 18 THEN 'Minor'"},"else":{"description":"Specifies the default result in CASE statements","syntax":"CASE WHEN condition THEN result ELSE default_result END","example":"CASE WHEN score >= 60 THEN 'Pass' ELSE 'Fail' END"},"end":{"description":"Terminates a CASE statement","syntax":"CASE WHEN condition THEN result END","example":"CASE WHEN age < 18 THEN 'Minor' ELSE 'Adult' END"},"over":{"description":"Defines a window for window functions","syntax":"window_function() OVER (PARTITION BY ... ORDER BY ...)","example":"ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC)"},"partition":{"description":"Divides the result set into groups for window functions","syntax":"OVER (PARTITION BY column_name)","example":"SUM(salary) OVER (PARTITION BY department)"},"row_number":{"description":"Assigns a unique sequential integer to each row","syntax":"ROW_NUMBER() OVER (ORDER BY column_name)","example":"ROW_NUMBER() OVER (ORDER BY created_at DESC)"},"rank":{"description":"Assigns a rank to each row with gaps for ties","syntax":"RANK() OVER (ORDER BY column_name)","example":"RANK() OVER (ORDER BY score DESC)"},"dense_rank":{"description":"Assigns a rank to each row without gaps for ties","syntax":"DENSE_RANK() OVER (ORDER BY column_name)","example":"DENSE_RANK() OVER (ORDER BY score DESC)"},"begin":{"description":"Starts a transaction block","syntax":"BEGIN [TRANSACTION]","example":"BEGIN; UPDATE accounts SET balance = balance - 100; COMMIT;"},"commit":{"description":"Permanently saves all changes made in the current transaction","syntax":"COMMIT [TRANSACTION]","example":"BEGIN; INSERT INTO users VALUES (...); COMMIT;"},"rollback":{"description":"Undoes all changes made in the current transaction","syntax":"ROLLBACK [TRANSACTION]","example":"BEGIN; DELETE FROM users WHERE id = 1; ROLLBACK;"},"transaction":{"description":"Groups multiple SQL statements into a single unit of work","syntax":"BEGIN TRANSACTION; ... COMMIT/ROLLBACK;","example":"BEGIN TRANSACTION; UPDATE accounts SET balance = balance - 100 WHERE id = 1; COMMIT;"}}`);var a={keywords:e};export{a as default,e as keywords};
var i=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,c=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,s=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,u=/[^\s'`,@()\[\]";]/,o;function l(t){for(var e;e=t.next();)if(e=="\\")t.next();else if(!u.test(e)){t.backUp(1);break}return t.current()}function a(t,e){if(t.eatSpace())return o="ws",null;if(t.match(s))return"number";var n=t.next();if(n=="\\"&&(n=t.next()),n=='"')return(e.tokenize=d)(t,e);if(n=="(")return o="open","bracket";if(n==")")return o="close","bracket";if(n==";")return t.skipToEnd(),o="ws","comment";if(/['`,@]/.test(n))return null;if(n=="|")return t.skipTo("|")?(t.next(),"variableName"):(t.skipToEnd(),"error");if(n=="#"){var n=t.next();return n=="("?(o="open","bracket"):/[+\-=\.']/.test(n)||/\d/.test(n)&&t.match(/^\d*#/)?null:n=="|"?(e.tokenize=f)(t,e):n==":"?(l(t),"meta"):n=="\\"?(t.next(),l(t),"string.special"):"error"}else{var r=l(t);return r=="."?null:(o="symbol",r=="nil"||r=="t"||r.charAt(0)==":"?"atom":e.lastType=="open"&&(i.test(r)||c.test(r))?"keyword":r.charAt(0)=="&"?"variableName.special":"variableName")}}function d(t,e){for(var n=!1,r;r=t.next();){if(r=='"'&&!n){e.tokenize=a;break}n=!n&&r=="\\"}return"string"}function f(t,e){for(var n,r;n=t.next();){if(n=="#"&&r=="|"){e.tokenize=a;break}r=n}return o="ws","comment"}const m={name:"commonlisp",startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:a}},token:function(t,e){t.sol()&&typeof e.ctx.indentTo!="number"&&(e.ctx.indentTo=e.ctx.start+1),o=null;var n=e.tokenize(t,e);return o!="ws"&&(e.ctx.indentTo==null?o=="symbol"&&c.test(t.current())?e.ctx.indentTo=e.ctx.start+t.indentUnit:e.ctx.indentTo="next":e.ctx.indentTo=="next"&&(e.ctx.indentTo=t.column()),e.lastType=o),o=="open"?e.ctx={prev:e.ctx,start:t.column(),indentTo:null}:o=="close"&&(e.ctx=e.ctx.prev||e.ctx),n},indent:function(t){var e=t.ctx.indentTo;return typeof e=="number"?e:t.ctx.start+1},languageData:{commentTokens:{line:";;",block:{open:"#|",close:"|#"}},closeBrackets:{brackets:["(","[","{",'"']}}};export{m as t};
import{t as o}from"./commonlisp-Bo8hOdn-.js";export{o as commonLisp};
import{t}from"./chunk-LvLJmgfZ.js";import{t as o}from"./react-Bj1aDYRI.js";var N=t((r=>{var _=o().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;r.c=function(e){return _.H.useMemoCache(e)}})),E=t(((r,_)=>{_.exports=N()}));export{E as t};
var w=Object.defineProperty;var S=(t,e,r)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var R=(t,e,r)=>S(t,typeof e!="symbol"?e+"":e,r);import{i as T,l as d,n as g,o as C,p as i,u as y}from"./useEvent-BhXAndur.js";import{t as D}from"./compiler-runtime-B3qBwwSJ.js";import{d as c}from"./hotkeys-BHHWjLlp.js";import{t as I}from"./utils-YqBXNpsM.js";import{r as l}from"./constants-B6Cb__3x.js";import{t as A}from"./Deferred-DxQeE5uh.js";import{t as f}from"./session-BOFn9QrD.js";function m(){return typeof document<"u"&&document.querySelector("marimo-wasm")!==null}const n={NOT_STARTED:"NOT_STARTED",CONNECTING:"CONNECTING",OPEN:"OPEN",CLOSING:"CLOSING",CLOSED:"CLOSED"},P={KERNEL_DISCONNECTED:"KERNEL_DISCONNECTED",ALREADY_RUNNING:"ALREADY_RUNNING",MALFORMED_QUERY:"MALFORMED_QUERY",KERNEL_STARTUP_ERROR:"KERNEL_STARTUP_ERROR"},o=i({state:n.NOT_STARTED});function _(){return C(o,t=>t.state===n.OPEN)}const b=i(t=>t(o).state===n.CONNECTING);i(t=>t(o).state===n.OPEN);const G=i(t=>{let e=t(o);return e.state===n.OPEN||e.state===n.NOT_STARTED}),W=i(t=>t(o).state===n.CLOSED),k=i(t=>t(o).state===n.NOT_STARTED);function H(t){return t===n.CLOSED}function $(t){return t===n.CONNECTING}function M(t){return t===n.OPEN}function v(t){return t===n.CLOSING}function L(t){return t===n.NOT_STARTED}function z(t){return t===n.CLOSED||t===n.CLOSING||t===n.CONNECTING}function F(t){switch(t){case n.CLOSED:return"App disconnected";case n.CONNECTING:return"Connecting to a runtime ...";case n.CLOSING:return"App disconnecting...";case n.OPEN:return"";case n.NOT_STARTED:return"Click to connect to a runtime";default:return""}}var x=class{constructor(t,e=!1){R(this,"initialHealthyCheck",new A);this.config=t,this.lazy=e;try{new URL(this.config.url)}catch(r){throw Error(`Invalid runtime URL: ${this.config.url}. ${r instanceof Error?r.message:"Unknown error"}`)}this.lazy||this.init()}get isLazy(){return this.lazy}get httpURL(){return new URL(this.config.url)}get isSameOrigin(){return this.httpURL.origin===window.location.origin}formatHttpURL(t,e,r=!0){t||(t="");let a=this.httpURL,s=new URLSearchParams(window.location.search);if(e)for(let[h,u]of e.entries())a.searchParams.set(h,u);for(let[h,u]of s.entries())r&&!Object.values(l).includes(h)||a.searchParams.set(h,u);return a.pathname=`${a.pathname.replace(/\/$/,"")}/${t.replace(/^\//,"")}`,a.hash="",a}formatWsURL(t,e){return K(this.formatHttpURL(t,e,!1).toString())}getWsURL(t){let e=new URL(this.config.url),r=new URLSearchParams(e.search);return new URLSearchParams(window.location.search).forEach((a,s)=>{r.has(s)||r.set(s,a)}),r.set(l.sessionId,t),this.formatWsURL("/ws",r)}getWsSyncURL(t){let e=new URL(this.config.url),r=new URLSearchParams(e.search);return new URLSearchParams(window.location.search).forEach((a,s)=>{r.has(s)||r.set(s,a)}),r.set(l.sessionId,t),this.formatWsURL("/ws_sync",r)}getTerminalWsURL(){return this.formatWsURL("/terminal/ws")}getLSPURL(t){if(t==="copilot"){let e=this.formatWsURL(`/lsp/${t}`);return e.search="",e}return this.formatWsURL(`/lsp/${t}`)}getAiURL(t){return this.formatHttpURL(`/api/ai/${t}`)}healthURL(){return this.formatHttpURL("/health")}async isHealthy(){if(m()||I())return!0;try{let t=await fetch(this.healthURL().toString());if(t.redirected){c.debug(`Runtime redirected to ${t.url}`);let r=t.url.replace(/\/health$/,"");this.config.url=r}let e=t.ok;return e&&this.setDOMBaseUri(this.config.url),e}catch{return!1}}setDOMBaseUri(t){t=t.split("?",1)[0],t.endsWith("/")||(t+="/");let e=document.querySelector("base");e?e.setAttribute("href",t):(e=document.createElement("base"),e.setAttribute("href",t),document.head.append(e))}async init(t){c.debug("Initializing runtime...");let e=0;for(;!await this.isHealthy();){if(e>=25){c.error("Failed to connect after 25 retries"),this.initialHealthyCheck.reject(Error("Failed to connect after 25 retries"));return}if(!(t!=null&&t.disableRetryDelay)){let r=Math.min(100*1.2**e,2e3);await new Promise(a=>setTimeout(a,r))}e++}c.debug("Runtime is healthy"),this.initialHealthyCheck.resolve()}async waitForHealthy(){return this.initialHealthyCheck.promise}headers(){let t={"Marimo-Session-Id":f(),"Marimo-Server-Token":this.config.serverToken??"","x-runtime-url":this.httpURL.toString()};return this.config.authToken&&(t.Authorization=`Bearer ${this.config.authToken}`),t}sessionHeaders(){return{"Marimo-Session-Id":f()}}};function K(t){if(!t.startsWith("http")){c.warn(`URL must start with http: ${t}`);let e=new URL(t);return e.protocol="ws",e}return new URL(t.replace(/^http/,"ws"))}var Y=D();function j(){let t=new URL(document.baseURI);return t.search="",t.hash="",t.toString()}const N={lazy:!0,url:j()},E=i(N);var U=i(t=>{let e=t(E);return new x(e,e.lazy)});function p(){return y(U)}function B(){let t=(0,Y.c)(4),e=p(),[r,a]=d(o),s;return t[0]!==r.state||t[1]!==e||t[2]!==a?(s=async()=>{L(r.state)?(a({state:n.CONNECTING}),await e.init()):c.log("Runtime already started or starting...")},t[0]=r.state,t[1]=e,t[2]=a,t[3]=s):s=t[3],g(s)}function O(){return T.get(U)}function q(t){if(t.startsWith("http"))return new URL(t);let e=O().httpURL.toString();return e.startsWith("blob:")&&(e=e.replace("blob:","")),new URL(t,e)}export{m as S,b as _,B as a,P as b,H as c,$ as d,z as f,W as g,o as h,E as i,v as l,G as m,q as n,p as o,L as p,O as r,F as s,N as t,M as u,k as v,n as x,_ as y};

Sorry, the diff of this file is too big to display

import{s}from"./chunk-LvLJmgfZ.js";import{t as m}from"./react-Bj1aDYRI.js";import{t as g}from"./SSRProvider-BIDQNg9Q.js";var p=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),v=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function c(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),o=typeof t.getTextInfo=="function"?t.getTextInfo():t.textInfo;if(o)return o.direction==="rtl";if(t.script)return p.has(t.script)}let n=e.split("-")[0];return v.has(n)}var r=s(m(),1),h=Symbol.for("react-aria.i18n.locale");function u(){let e=typeof window<"u"&&window[h]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:c(e)?"rtl":"ltr"}}var l=u(),a=new Set;function f(){l=u();for(let e of a)e(l)}function d(){let e=g(),[n,t]=(0,r.useState)(l);return(0,r.useEffect)(()=>(a.size===0&&window.addEventListener("languagechange",f),a.add(t),()=>{a.delete(t),a.size===0&&window.removeEventListener("languagechange",f)}),[]),e?{locale:"en-US",direction:"ltr"}:n}var i=r.createContext(null);function w(e){let{locale:n,children:t}=e,o=r.useMemo(()=>({locale:n,direction:c(n)?"rtl":"ltr"}),[n]);return r.createElement(i.Provider,{value:o},t)}function S(e){let{children:n}=e,t=d();return r.createElement(i.Provider,{value:t},n)}function b(e){let{locale:n,children:t}=e;return n?r.createElement(w,{locale:n,children:t}):r.createElement(S,{children:t})}function x(){let e=d();return(0,r.useContext)(i)||e}export{b as n,x as t};
import{t}from"./createLucideIcon-BCdY6lG5.js";var e=t("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);export{e as t};
import{d as r}from"./hotkeys-BHHWjLlp.js";async function a(o){if(navigator.clipboard===void 0){r.warn("navigator.clipboard is not supported"),window.prompt("Copy to clipboard: Ctrl+C, Enter",o);return}await navigator.clipboard.writeText(o).catch(async()=>{r.warn("Failed to copy to clipboard using navigator.clipboard"),window.prompt("Copy to clipboard: Ctrl+C, Enter",o)})}export{a as t};
import{s as y}from"./chunk-LvLJmgfZ.js";import{t as j}from"./react-Bj1aDYRI.js";import{t as g}from"./compiler-runtime-B3qBwwSJ.js";import{t as v}from"./jsx-runtime-ZmTK25f3.js";import{r as T}from"./button-CZ3Cs4qb.js";import{t as w}from"./cn-BKtXLv3a.js";import{t as D}from"./check-Dr3SxUsb.js";import{t as S}from"./copy-D-8y6iMN.js";import{t as k}from"./use-toast-BDYuj3zG.js";import{t as E}from"./tooltip-CMQz28hC.js";import{t as L}from"./copy-DHrHayPa.js";var P=g(),_=y(j(),1),n=y(v(),1);const q=C=>{let t=(0,P.c)(14),{value:a,className:r,buttonClassName:c,tooltip:d,toastTitle:s,ariaLabel:N}=C,[e,x]=(0,_.useState)(!1),m;t[0]!==s||t[1]!==a?(m=T.stopPropagation(async h=>{await L(typeof a=="function"?a(h):a).then(()=>{x(!0),setTimeout(()=>x(!1),2e3),s&&k({title:s})})}),t[0]=s,t[1]=a,t[2]=m):m=t[2];let f=m,u=N??"Copy to clipboard",o;t[3]!==r||t[4]!==e?(o=e?(0,n.jsx)(D,{className:w(r,"text-(--grass-11)")}):(0,n.jsx)(S,{className:r}),t[3]=r,t[4]=e,t[5]=o):o=t[5];let i;t[6]!==c||t[7]!==f||t[8]!==u||t[9]!==o?(i=(0,n.jsx)("button",{type:"button",onClick:f,"aria-label":u,className:c,children:o}),t[6]=c,t[7]=f,t[8]=u,t[9]=o,t[10]=i):i=t[10];let l=i;if(d===!1)return l;let b=e?"Copied!":d??"Copy to clipboard",p;return t[11]!==l||t[12]!==b?(p=(0,n.jsx)(E,{content:b,delayDuration:400,children:l}),t[11]=l,t[12]=b,t[13]=p):p=t[13],p};export{q as t};

Sorry, the diff of this file is too big to display

import{s as f}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-Bj1aDYRI.js";var n=(...r)=>r.filter((e,t,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===t).join(" ").trim(),w=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,o)=>o?o.toUpperCase():t.toLowerCase()),c=r=>{let e=N(r);return e.charAt(0).toUpperCase()+e.slice(1)},k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},g=r=>{for(let e in r)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},a=f(p()),C=(0,a.forwardRef)(({color:r="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:s="",children:i,iconNode:d,...l},m)=>(0,a.createElement)("svg",{ref:m,...k,width:e,height:e,stroke:r,strokeWidth:o?Number(t)*24/Number(e):t,className:n("lucide",s),...!i&&!g(l)&&{"aria-hidden":"true"},...l},[...d.map(([u,h])=>(0,a.createElement)(u,h)),...Array.isArray(i)?i:[i]])),A=(r,e)=>{let t=(0,a.forwardRef)(({className:o,...s},i)=>(0,a.createElement)(C,{ref:i,iconNode:e,className:n(`lucide-${w(c(r))}`,`lucide-${r}`,o),...s}));return t.displayName=c(r),t};export{A as t};
import{d as m,p as A}from"./useEvent-BhXAndur.js";import{t as h}from"./compiler-runtime-B3qBwwSJ.js";import{d as s}from"./hotkeys-BHHWjLlp.js";var $=h();function v(i,c){return{reducer:(o,e)=>(o||(o=i()),e.type in c?c[e.type](o,e.payload):(s.error(`Action type ${e.type} is not defined in reducers.`),o)),createActions:o=>{let e={};for(let a in c)e[a]=u=>{o({type:a,payload:u})};return e}}}function w(i,c,o){let{reducer:e,createActions:a}=v(i,c),u=(n,r)=>{try{let t=e(n,r);if(o)for(let d of o)try{d(n,t,r)}catch(f){s.error(`Error in middleware for action ${r.type}:`,f)}return t}catch(t){return s.error(`Error in reducer for action ${r.type}:`,t),n}},l=A(i()),p=new WeakMap;function y(){let n=(0,$.c)(2),r=m(l);p.has(r)||p.set(r,a(d=>{r(f=>u(f,d))}));let t;return n[0]===r?t=n[1]:(t=p.get(r),n[0]=r,n[1]=t),t}return{reducer:u,createActions:a,valueAtom:l,useActions:y}}export{w as t};
import{t as r}from"./crystal-DYrQEMVi.js";export{r as crystal};
function i(t,e){return RegExp((e?"":"^")+"(?:"+t.join("|")+")"+(e?"$":"\\b"))}function o(t,e,n){return n.tokenize.push(t),t(e,n)}var f=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,k=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,_=/^(?:\[\][?=]?)/,I=/^(?:\.(?:\.{2})?|->|[?:])/,m=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,h=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,w=i("abstract.alias.as.asm.begin.break.case.class.def.do.else.elsif.end.ensure.enum.extend.for.fun.if.include.instance_sizeof.lib.macro.module.next.of.out.pointerof.private.protected.rescue.return.require.select.sizeof.struct.super.then.type.typeof.uninitialized.union.unless.until.when.while.with.yield.__DIR__.__END_LINE__.__FILE__.__LINE__".split(".")),S=i(["true","false","nil","self"]),E=i(["def","fun","macro","class","module","struct","lib","enum","union","do","for"]),T=i(["if","unless","case","while","until","begin","then"]),b=["end","else","elsif","rescue","ensure"],A=i(b),g=["\\)","\\}","\\]"],Z=RegExp("^(?:"+g.join("|")+")$"),x={def:y,fun:y,macro:v,class:s,module:s,struct:s,lib:s,enum:s,union:s},d={"[":"]","{":"}","(":")","<":">"};function F(t,e){if(t.eatSpace())return null;if(e.lastToken!="\\"&&t.match("{%",!1))return o(c("%","%"),t,e);if(e.lastToken!="\\"&&t.match("{{",!1))return o(c("{","}"),t,e);if(t.peek()=="#")return t.skipToEnd(),"comment";var n;if(t.match(m))return t.eat(/[?!]/),n=t.current(),t.eat(":")?"atom":e.lastToken=="."?"property":w.test(n)?(E.test(n)?!(n=="fun"&&e.blocks.indexOf("lib")>=0)&&!(n=="def"&&e.lastToken=="abstract")&&(e.blocks.push(n),e.currentIndent+=1):(e.lastStyle=="operator"||!e.lastStyle)&&T.test(n)?(e.blocks.push(n),e.currentIndent+=1):n=="end"&&(e.blocks.pop(),--e.currentIndent),x.hasOwnProperty(n)&&e.tokenize.push(x[n]),"keyword"):S.test(n)?"atom":"variable";if(t.eat("@"))return t.peek()=="["?o(p("[","]","meta"),t,e):(t.eat("@"),t.match(m)||t.match(h),"propertyName");if(t.match(h))return"tag";if(t.eat(":"))return t.eat('"')?o(z('"',"atom",!1),t,e):t.match(m)||t.match(h)||t.match(f)||t.match(k)||t.match(_)?"atom":(t.eat(":"),"operator");if(t.eat('"'))return o(z('"',"string",!0),t,e);if(t.peek()=="%"){var a="string",r=!0,u;if(t.match("%r"))a="string.special",u=t.next();else if(t.match("%w"))r=!1,u=t.next();else if(t.match("%q"))r=!1,u=t.next();else if(u=t.match(/^%([^\w\s=])/))u=u[1];else{if(t.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/))return"meta";if(t.eat("%"))return"operator"}return d.hasOwnProperty(u)&&(u=d[u]),o(z(u,a,r),t,e)}return(n=t.match(/^<<-('?)([A-Z]\w*)\1/))?o(N(n[2],!n[1]),t,e):t.eat("'")?(t.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),t.eat("'"),"atom"):t.eat("0")?(t.eat("x")?t.match(/^[0-9a-fA-F_]+/):t.eat("o")?t.match(/^[0-7_]+/):t.eat("b")&&t.match(/^[01_]+/),"number"):t.eat(/^\d/)?(t.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/),"number"):t.match(f)?(t.eat("="),"operator"):t.match(k)||t.match(I)?"operator":(n=t.match(/[({[]/,!1))?(n=n[0],o(p(n,d[n],null),t,e)):t.eat("\\")?(t.next(),"meta"):(t.next(),null)}function p(t,e,n,a){return function(r,u){if(!a&&r.match(t))return u.tokenize[u.tokenize.length-1]=p(t,e,n,!0),u.currentIndent+=1,n;var l=F(r,u);return r.current()===e&&(u.tokenize.pop(),--u.currentIndent,l=n),l}}function c(t,e,n){return function(a,r){return!n&&a.match("{"+t)?(r.currentIndent+=1,r.tokenize[r.tokenize.length-1]=c(t,e,!0),"meta"):a.match(e+"}")?(--r.currentIndent,r.tokenize.pop(),"meta"):F(a,r)}}function v(t,e){if(t.eatSpace())return null;var n;if(n=t.match(m)){if(n=="def")return"keyword";t.eat(/[?!]/)}return e.tokenize.pop(),"def"}function y(t,e){return t.eatSpace()?null:(t.match(m)?t.eat(/[!?]/):t.match(f)||t.match(k)||t.match(_),e.tokenize.pop(),"def")}function s(t,e){return t.eatSpace()?null:(t.match(h),e.tokenize.pop(),"def")}function z(t,e,n){return function(a,r){for(var u=!1;a.peek();)if(u)a.next(),u=!1;else{if(a.match("{%",!1))return r.tokenize.push(c("%","%")),e;if(a.match("{{",!1))return r.tokenize.push(c("{","}")),e;if(n&&a.match("#{",!1))return r.tokenize.push(p("#{","}","meta")),e;var l=a.next();if(l==t)return r.tokenize.pop(),e;u=n&&l=="\\"}return e}}function N(t,e){return function(n,a){if(n.sol()&&(n.eatSpace(),n.match(t)))return a.tokenize.pop(),"string";for(var r=!1;n.peek();)if(r)n.next(),r=!1;else{if(n.match("{%",!1))return a.tokenize.push(c("%","%")),"string";if(n.match("{{",!1))return a.tokenize.push(c("{","}")),"string";if(e&&n.match("#{",!1))return a.tokenize.push(p("#{","}","meta")),"string";r=n.next()=="\\"&&e}return"string"}}const O={name:"crystal",startState:function(){return{tokenize:[F],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(t,e){var n=e.tokenize[e.tokenize.length-1](t,e),a=t.current();return n&&n!="comment"&&(e.lastToken=a,e.lastStyle=n),n},indent:function(t,e,n){return e=e.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),A.test(e)||Z.test(e)?n.unit*(t.currentIndent-1):n.unit*t.currentIndent},languageData:{indentOnInput:i(g.concat(b),!0),commentTokens:{line:"#"}}};export{O as t};
import{a as s,i as a,n as r,o,r as e,t}from"./css-zh47N2UC.js";export{t as css,r as gss,e as keywords,a as less,s as mkCSS,o as sCSS};
function y(o){o={...ne,...o};var l=o.inline,m=o.tokenHooks,f=o.documentTypes||{},G=o.mediaTypes||{},J=o.mediaFeatures||{},Q=o.mediaValueKeywords||{},C=o.propertyKeywords||{},S=o.nonStandardPropertyKeywords||{},R=o.fontProperties||{},ee=o.counterDescriptors||{},F=o.colorKeywords||{},N=o.valueKeywords||{},b=o.allowNested,te=o.lineComment,re=o.supportsAtComponent===!0,$=o.highlightNonStandardPropertyKeywords!==!1,w,a;function c(e,r){return w=r,e}function oe(e,r){var t=e.next();if(m[t]){var i=m[t](e,r);if(i!==!1)return i}if(t=="@")return e.eatWhile(/[\w\\\-]/),c("def",e.current());if(t=="="||(t=="~"||t=="|")&&e.eat("="))return c(null,"compare");if(t=='"'||t=="'")return r.tokenize=L(t),r.tokenize(e,r);if(t=="#")return e.eatWhile(/[\w\\\-]/),c("atom","hash");if(t=="!")return e.match(/^\s*\w*/),c("keyword","important");if(/\d/.test(t)||t=="."&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),c("number","unit");if(t==="-"){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),c("number","unit");if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?c("def","variable-definition"):c("variableName","variable");if(e.match(/^\w+-/))return c("meta","meta")}else return/[,+>*\/]/.test(t)?c(null,"select-op"):t=="."&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?c("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(t)?c(null,t):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(r.tokenize=ie),c("variableName.function","variable")):/[\w\\\-]/.test(t)?(e.eatWhile(/[\w\\\-]/),c("property","word")):c(null,null)}function L(e){return function(r,t){for(var i=!1,d;(d=r.next())!=null;){if(d==e&&!i){e==")"&&r.backUp(1);break}i=!i&&d=="\\"}return(d==e||!i&&e!=")")&&(t.tokenize=null),c("string","string")}}function ie(e,r){return e.next(),e.match(/^\s*[\"\')]/,!1)?r.tokenize=null:r.tokenize=L(")"),c(null,"(")}function W(e,r,t){this.type=e,this.indent=r,this.prev=t}function s(e,r,t,i){return e.context=new W(t,r.indentation()+(i===!1?0:r.indentUnit),e.context),t}function p(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function k(e,r,t){return n[t.context.type](e,r,t)}function h(e,r,t,i){for(var d=i||1;d>0;d--)t.context=t.context.prev;return k(e,r,t)}function D(e){var r=e.current().toLowerCase();a=N.hasOwnProperty(r)?"atom":F.hasOwnProperty(r)?"keyword":"variable"}var n={};return n.top=function(e,r,t){if(e=="{")return s(t,r,"block");if(e=="}"&&t.context.prev)return p(t);if(re&&/@component/i.test(e))return s(t,r,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(t,r,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(t,r,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return t.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&e.charAt(0)=="@")return s(t,r,"at");if(e=="hash")a="builtin";else if(e=="word")a="tag";else{if(e=="variable-definition")return"maybeprop";if(e=="interpolation")return s(t,r,"interpolation");if(e==":")return"pseudo";if(b&&e=="(")return s(t,r,"parens")}return t.context.type},n.block=function(e,r,t){if(e=="word"){var i=r.current().toLowerCase();return C.hasOwnProperty(i)?(a="property","maybeprop"):S.hasOwnProperty(i)?(a=$?"string.special":"property","maybeprop"):b?(a=r.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a="error","maybeprop")}else return e=="meta"?"block":!b&&(e=="hash"||e=="qualifier")?(a="error","block"):n.top(e,r,t)},n.maybeprop=function(e,r,t){return e==":"?s(t,r,"prop"):k(e,r,t)},n.prop=function(e,r,t){if(e==";")return p(t);if(e=="{"&&b)return s(t,r,"propBlock");if(e=="}"||e=="{")return h(e,r,t);if(e=="(")return s(t,r,"parens");if(e=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(r.current()))a="error";else if(e=="word")D(r);else if(e=="interpolation")return s(t,r,"interpolation");return"prop"},n.propBlock=function(e,r,t){return e=="}"?p(t):e=="word"?(a="property","maybeprop"):t.context.type},n.parens=function(e,r,t){return e=="{"||e=="}"?h(e,r,t):e==")"?p(t):e=="("?s(t,r,"parens"):e=="interpolation"?s(t,r,"interpolation"):(e=="word"&&D(r),"parens")},n.pseudo=function(e,r,t){return e=="meta"?"pseudo":e=="word"?(a="variableName.constant",t.context.type):k(e,r,t)},n.documentTypes=function(e,r,t){return e=="word"&&f.hasOwnProperty(r.current())?(a="tag",t.context.type):n.atBlock(e,r,t)},n.atBlock=function(e,r,t){if(e=="(")return s(t,r,"atBlock_parens");if(e=="}"||e==";")return h(e,r,t);if(e=="{")return p(t)&&s(t,r,b?"block":"top");if(e=="interpolation")return s(t,r,"interpolation");if(e=="word"){var i=r.current().toLowerCase();a=i=="only"||i=="not"||i=="and"||i=="or"?"keyword":G.hasOwnProperty(i)?"attribute":J.hasOwnProperty(i)?"property":Q.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":S.hasOwnProperty(i)?$?"string.special":"property":N.hasOwnProperty(i)?"atom":F.hasOwnProperty(i)?"keyword":"error"}return t.context.type},n.atComponentBlock=function(e,r,t){return e=="}"?h(e,r,t):e=="{"?p(t)&&s(t,r,b?"block":"top",!1):(e=="word"&&(a="error"),t.context.type)},n.atBlock_parens=function(e,r,t){return e==")"?p(t):e=="{"||e=="}"?h(e,r,t,2):n.atBlock(e,r,t)},n.restricted_atBlock_before=function(e,r,t){return e=="{"?s(t,r,"restricted_atBlock"):e=="word"&&t.stateArg=="@counter-style"?(a="variable","restricted_atBlock_before"):k(e,r,t)},n.restricted_atBlock=function(e,r,t){return e=="}"?(t.stateArg=null,p(t)):e=="word"?(a=t.stateArg=="@font-face"&&!R.hasOwnProperty(r.current().toLowerCase())||t.stateArg=="@counter-style"&&!ee.hasOwnProperty(r.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},n.keyframes=function(e,r,t){return e=="word"?(a="variable","keyframes"):e=="{"?s(t,r,"top"):k(e,r,t)},n.at=function(e,r,t){return e==";"?p(t):e=="{"||e=="}"?h(e,r,t):(e=="word"?a="tag":e=="hash"&&(a="builtin"),"at")},n.interpolation=function(e,r,t){return e=="}"?p(t):e=="{"||e==";"?h(e,r,t):(e=="word"?a="variable":e!="variable"&&e!="("&&e!=")"&&(a="error"),"interpolation")},{name:o.name,startState:function(){return{tokenize:null,state:l?"block":"top",stateArg:null,context:new W(l?"block":"top",0,null)}},token:function(e,r){if(!r.tokenize&&e.eatSpace())return null;var t=(r.tokenize||oe)(e,r);return t&&typeof t=="object"&&(w=t[1],t=t[0]),a=t,w!="comment"&&(r.state=n[r.state](w,e,r)),a},indent:function(e,r,t){var i=e.context,d=r&&r.charAt(0),_=i.indent;return i.type=="prop"&&(d=="}"||d==")")&&(i=i.prev),i.prev&&(d=="}"&&(i.type=="block"||i.type=="top"||i.type=="interpolation"||i.type=="restricted_atBlock")?(i=i.prev,_=i.indent):(d==")"&&(i.type=="parens"||i.type=="atBlock_parens")||d=="{"&&(i.type=="at"||i.type=="atBlock"))&&(_=Math.max(0,i.indent-t.unit))),_},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:te,block:{open:"/*",close:"*/"}},autocomplete:M}}}function u(o){for(var l={},m=0;m<o.length;++m)l[o[m].toLowerCase()]=!0;return l}var H=["domain","regexp","url","url-prefix"],E=u(H),V=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=u(V),X="width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.orientation.device-pixel-ratio.min-device-pixel-ratio.max-device-pixel-ratio.pointer.any-pointer.hover.any-hover.prefers-color-scheme.dynamic-range.video-dynamic-range".split("."),x=u(X),Y=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],B=u(Y),O="align-content.align-items.align-self.alignment-adjust.alignment-baseline.all.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.binding.bleed.block-size.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-content.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.gap.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-gap.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-gap.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.inset.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.left.letter-spacing.line-break.line-height.line-height-step.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.place-content.place-items.place-self.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotate.rotation.rotation-point.row-gap.ruby-align.ruby-overhang.ruby-position.ruby-span.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-type.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-orientation.text-outline.text-overflow.text-rendering.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.touch-action.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-select.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.paint-order.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode".split("."),z=u(O),Z="accent-color.aspect-ratio.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.content-visibility.margin-block.margin-block-end.margin-block-start.margin-inline.margin-inline-end.margin-inline-start.overflow-anchor.overscroll-behavior.padding-block.padding-block-end.padding-block-start.padding-inline.padding-inline-end.padding-inline-start.scroll-snap-stop.scrollbar-3d-light-color.scrollbar-arrow-color.scrollbar-base-color.scrollbar-dark-shadow-color.scrollbar-face-color.scrollbar-highlight-color.scrollbar-shadow-color.scrollbar-track-color.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.shape-inside.zoom".split("."),P=u(Z),U=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],j=u(U),I=u(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),T="aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen".split("."),q=u(T),A="above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.blur.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.brightness.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.contrast.copy.counter.counters.cover.crop.cross.crosshair.cubic-bezier.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.devanagari.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.drop-shadow.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.georgian.grayscale.graytext.grid.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hard-light.hebrew.help.hidden.hide.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.hue.hue-rotate.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.luminosity.malayalam.manipulation.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.multiple_mask_images.multiply.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.opacity.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturate.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.self-start.self-end.semi-condensed.semi-expanded.separate.sepia.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.somali.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.square-button.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small".split("."),K=u(A),M=H.concat(V).concat(X).concat(Y).concat(O).concat(Z).concat(T).concat(A);const ae={properties:O,colors:T,fonts:U,values:A,all:M};var ne={documentTypes:E,mediaTypes:v,mediaFeatures:x,mediaValueKeywords:B,propertyKeywords:z,nonStandardPropertyKeywords:P,fontProperties:j,counterDescriptors:I,colorKeywords:q,valueKeywords:K,tokenHooks:{"/":function(o,l){return o.eat("*")?(l.tokenize=g,g(o,l)):!1}}};const le=y({name:"css"});function g(o,l){for(var m=!1,f;(f=o.next())!=null;){if(m&&f=="/"){l.tokenize=null;break}m=f=="*"}return["comment","comment"]}const se=y({name:"scss",mediaTypes:v,mediaFeatures:x,mediaValueKeywords:B,propertyKeywords:z,nonStandardPropertyKeywords:P,colorKeywords:q,valueKeywords:K,fontProperties:j,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(o,l){return o.eat("/")?(o.skipToEnd(),["comment","comment"]):o.eat("*")?(l.tokenize=g,g(o,l)):["operator","operator"]},":":function(o){return o.match(/^\s*\{/,!1)?[null,null]:!1},$:function(o){return o.match(/^[\w-]+/),o.match(/^\s*:/,!1)?["def","variable-definition"]:["variableName.special","variable"]},"#":function(o){return o.eat("{")?[null,"interpolation"]:!1}}}),ce=y({name:"less",mediaTypes:v,mediaFeatures:x,mediaValueKeywords:B,propertyKeywords:z,nonStandardPropertyKeywords:P,colorKeywords:q,valueKeywords:K,fontProperties:j,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(o,l){return o.eat("/")?(o.skipToEnd(),["comment","comment"]):o.eat("*")?(l.tokenize=g,g(o,l)):["operator","operator"]},"@":function(o){return o.eat("{")?[null,"interpolation"]:o.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(o.eatWhile(/[\w\\\-]/),o.match(/^\s*:/,!1)?["def","variable-definition"]:["variableName","variable"])},"&":function(){return["atom","atom"]}}}),de=y({name:"gss",documentTypes:E,mediaTypes:v,mediaFeatures:x,propertyKeywords:z,nonStandardPropertyKeywords:P,fontProperties:j,counterDescriptors:I,colorKeywords:q,valueKeywords:K,supportsAtComponent:!0,tokenHooks:{"/":function(o,l){return o.eat("*")?(l.tokenize=g,g(o,l)):!1}}});export{y as a,ce as i,de as n,se as o,ae as r,le as t};
var i=function(t){return RegExp("^(?:"+t.join("|")+")$","i")},d=function(t){a=null;var e=t.next();if(e==='"')return t.match(/^.*?"/),"string";if(e==="'")return t.match(/^.*?'/),"string";if(/[{}\(\),\.;\[\]]/.test(e))return a=e,"punctuation";if(e==="/"&&t.eat("/"))return t.skipToEnd(),"comment";if(p.test(e))return t.eatWhile(p),null;if(t.eatWhile(/[_\w\d]/),t.eat(":"))return t.eatWhile(/[\w\d_\-]/),"atom";var n=t.current();return u.test(n)?"builtin":m.test(n)?"def":x.test(n)||h.test(n)?"keyword":"variable"},o=function(t,e,n){return t.context={prev:t.context,indent:t.indent,col:n,type:e}},s=function(t){return t.indent=t.context.indent,t.context=t.context.prev},a,u=i("abs.acos.allShortestPaths.asin.atan.atan2.avg.ceil.coalesce.collect.cos.cot.count.degrees.e.endnode.exp.extract.filter.floor.haversin.head.id.keys.labels.last.left.length.log.log10.lower.ltrim.max.min.node.nodes.percentileCont.percentileDisc.pi.radians.rand.range.reduce.rel.relationship.relationships.replace.reverse.right.round.rtrim.shortestPath.sign.sin.size.split.sqrt.startnode.stdev.stdevp.str.substring.sum.tail.tan.timestamp.toFloat.toInt.toString.trim.type.upper".split(".")),m=i(["all","and","any","contains","exists","has","in","none","not","or","single","xor"]),x=i("as.asc.ascending.assert.by.case.commit.constraint.create.csv.cypher.delete.desc.descending.detach.distinct.drop.else.end.ends.explain.false.fieldterminator.foreach.from.headers.in.index.is.join.limit.load.match.merge.null.on.optional.order.periodic.profile.remove.return.scan.set.skip.start.starts.then.true.union.unique.unwind.using.when.where.with.call.yield".split(".")),h=i("access.active.assign.all.alter.as.catalog.change.copy.create.constraint.constraints.current.database.databases.dbms.default.deny.drop.element.elements.exists.from.grant.graph.graphs.if.index.indexes.label.labels.management.match.name.names.new.node.nodes.not.of.on.or.password.populated.privileges.property.read.relationship.relationships.remove.replace.required.revoke.role.roles.set.show.start.status.stop.suspended.to.traverse.type.types.user.users.with.write".split(".")),p=/[*+\-<>=&|~%^]/;const f={name:"cypher",startState:function(){return{tokenize:d,context:null,indent:0,col:0}},token:function(t,e){if(t.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=t.indentation()),t.eatSpace())return null;var n=e.tokenize(t,e);if(n!=="comment"&&e.context&&e.context.align==null&&e.context.type!=="pattern"&&(e.context.align=!0),a==="(")o(e,")",t.column());else if(a==="[")o(e,"]",t.column());else if(a==="{")o(e,"}",t.column());else if(/[\]\}\)]/.test(a)){for(;e.context&&e.context.type==="pattern";)s(e);e.context&&a===e.context.type&&s(e)}else a==="."&&e.context&&e.context.type==="pattern"?s(e):/atom|string|variable/.test(n)&&e.context&&(/[\}\]]/.test(e.context.type)?o(e,"pattern",t.column()):e.context.type==="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=t.column()));return n},indent:function(t,e,n){var l=e&&e.charAt(0),r=t.context;if(/[\]\}]/.test(l))for(;r&&r.type==="pattern";)r=r.prev;var c=r&&l===r.type;return r?r.type==="keywords"?null:r.align?r.col+(c?0:1):r.indent+(c?0:n.unit):0}};export{f as t};
import{t as r}from"./cypher-BWPAHm69.js";export{r as cypher};

Sorry, the diff of this file is too big to display

function s(t){for(var n={},e=t.split(" "),r=0;r<e.length;++r)n[e[r]]=!0;return n}var f="body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with",a={keywords:s("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters "+f),blockKeywords:s(f),builtin:s("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t"),atoms:s("exit failure success true false null"),hooks:{"@":function(t,n){return t.eatWhile(/[\w\$_]/),"meta"}}},v=a.statementIndentUnit,x=a.keywords,_=a.builtin,d=a.blockKeywords,w=a.atoms,m=a.hooks,g=a.multiLineStrings,p=/[+\-*&%=<>!?|\/]/,o;function y(t,n){var e=t.next();if(m[e]){var r=m[e](t,n);if(r!==!1)return r}if(e=='"'||e=="'"||e=="`")return n.tokenize=z(e),n.tokenize(t,n);if(/[\[\]{}\(\),;\:\.]/.test(e))return o=e,null;if(/\d/.test(e))return t.eatWhile(/[\w\.]/),"number";if(e=="/"){if(t.eat("+"))return n.tokenize=b,b(t,n);if(t.eat("*"))return n.tokenize=h,h(t,n);if(t.eat("/"))return t.skipToEnd(),"comment"}if(p.test(e))return t.eatWhile(p),"operator";t.eatWhile(/[\w\$_\xa1-\uffff]/);var i=t.current();return x.propertyIsEnumerable(i)?(d.propertyIsEnumerable(i)&&(o="newstatement"),"keyword"):_.propertyIsEnumerable(i)?(d.propertyIsEnumerable(i)&&(o="newstatement"),"builtin"):w.propertyIsEnumerable(i)?"atom":"variable"}function z(t){return function(n,e){for(var r=!1,i,u=!1;(i=n.next())!=null;){if(i==t&&!r){u=!0;break}r=!r&&i=="\\"}return(u||!(r||g))&&(e.tokenize=null),"string"}}function h(t,n){for(var e=!1,r;r=t.next();){if(r=="/"&&e){n.tokenize=null;break}e=r=="*"}return"comment"}function b(t,n){for(var e=!1,r;r=t.next();){if(r=="/"&&e){n.tokenize=null;break}e=r=="+"}return"comment"}function k(t,n,e,r,i){this.indented=t,this.column=n,this.type=e,this.align=r,this.prev=i}function c(t,n,e){var r=t.indented;return t.context&&t.context.type=="statement"&&(r=t.context.indented),t.context=new k(r,n,e,null,t.context)}function l(t){var n=t.context.type;return(n==")"||n=="]"||n=="}")&&(t.indented=t.context.indented),t.context=t.context.prev}const I={name:"d",startState:function(t){return{tokenize:null,context:new k(-t,0,"top",!1),indented:0,startOfLine:!0}},token:function(t,n){var e=n.context;if(t.sol()&&(e.align??(e.align=!1),n.indented=t.indentation(),n.startOfLine=!0),t.eatSpace())return null;o=null;var r=(n.tokenize||y)(t,n);if(r=="comment"||r=="meta")return r;if(e.align??(e.align=!0),(o==";"||o==":"||o==",")&&e.type=="statement")l(n);else if(o=="{")c(n,t.column(),"}");else if(o=="[")c(n,t.column(),"]");else if(o=="(")c(n,t.column(),")");else if(o=="}"){for(;e.type=="statement";)e=l(n);for(e.type=="}"&&(e=l(n));e.type=="statement";)e=l(n)}else o==e.type?l(n):((e.type=="}"||e.type=="top")&&o!=";"||e.type=="statement"&&o=="newstatement")&&c(n,t.column(),"statement");return n.startOfLine=!1,r},indent:function(t,n,e){if(t.tokenize!=y&&t.tokenize!=null)return null;var r=t.context,i=n&&n.charAt(0);r.type=="statement"&&i=="}"&&(r=r.prev);var u=i==r.type;return r.type=="statement"?r.indented+(i=="{"?0:v||e.unit):r.align?r.column+(u?0:1):r.indented+(u?0:e.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{I as t};
import{t as o}from"./d-CMuL95tt.js";export{o as d};
import{n as C,t as D}from"./graphlib-B4SLw_H3.js";import{t as F}from"./clone-bEECh4rs.js";import{t as L}from"./dagre-DFula7I5.js";import{i as O}from"./min-Ci3LzCQg.js";import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as w,r as t}from"./src-CsZby044.js";import{b as M}from"./chunk-ABZYJK2D-0jga8uiE.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import{t as j}from"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import{a as Y,c as k,i as H,l as _,n as z,t as q,u as K}from"./chunk-JZLCHNYA-48QVgmR4.js";import{a as Q,i as U,n as V,r as W,t as Z}from"./chunk-QXUST7PY-DkCIa8tJ.js";function X(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:$(e),edges:ee(e)};return C(e.graph())||(r.value=F(e.graph())),r}function $(e){return O(e.nodes(),function(r){var n=e.node(r),d=e.parent(r),o={v:r};return C(n)||(o.value=n),C(d)||(o.parent=d),o})}function ee(e){return O(e.edges(),function(r){var n=e.edge(r),d={v:r.v,w:r.w};return C(r.name)||(d.name=r.name),C(n)||(d.value=n),d})}var c=new Map,b=new Map,G=new Map,ne=w(()=>{b.clear(),G.clear(),c.clear()},"clear"),I=w((e,r)=>{let n=b.get(r)||[];return t.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),re=w((e,r)=>{let n=b.get(r)||[];return t.info("Descendants of ",r," is ",n),t.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||I(e.v,r)||I(e.w,r)||n.includes(e.w):(t.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),P=w((e,r,n,d)=>{t.warn("Copying children of ",e,"root",d,"data",r.node(e),d);let o=r.children(e)||[];e!==d&&o.push(e),t.warn("Copying (nodes) clusterId",e,"nodes",o),o.forEach(l=>{if(r.children(l).length>0)P(l,r,n,d);else{let i=r.node(l);t.info("cp ",l," to ",d," with parent ",e),n.setNode(l,i),d!==r.parent(l)&&(t.warn("Setting parent",l,r.parent(l)),n.setParent(l,r.parent(l))),e!==d&&l!==e?(t.debug("Setting parent",l,e),n.setParent(l,e)):(t.info("In copy ",e,"root",d,"data",r.node(e),d),t.debug("Not Setting parent for node=",l,"cluster!==rootId",e!==d,"node!==clusterId",l!==e));let s=r.edges(l);t.debug("Copying Edges",s),s.forEach(f=>{t.info("Edge",f);let E=r.edge(f.v,f.w,f.name);t.info("Edge data",E,d);try{re(f,d)?(t.info("Copying as ",f.v,f.w,E,f.name),n.setEdge(f.v,f.w,E,f.name),t.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):t.info("Skipping copy of edge ",f.v,"-->",f.w," rootId: ",d," clusterId:",e)}catch(N){t.error(N)}})}t.debug("Removing node",l),r.removeNode(l)})},"copy"),B=w((e,r)=>{let n=r.children(e),d=[...n];for(let o of n)G.set(o,e),d=[...d,...B(o,r)];return d},"extractDescendants"),ae=w((e,r,n)=>{let d=e.edges().filter(s=>s.v===r||s.w===r),o=e.edges().filter(s=>s.v===n||s.w===n),l=d.map(s=>({v:s.v===r?n:s.v,w:s.w===r?r:s.w})),i=o.map(s=>({v:s.v,w:s.w}));return l.filter(s=>i.some(f=>s.v===f.v&&s.w===f.w))},"findCommonEdges"),S=w((e,r,n)=>{let d=r.children(e);if(t.trace("Searching children of id ",e,d),d.length<1)return e;let o;for(let l of d){let i=S(l,r,n),s=ae(r,n,i);if(i)if(s.length>0)o=i;else return i}return o},"findNonClusterChild"),T=w(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),te=w((e,r)=>{if(!e||r>10){t.debug("Opting out, no graph ");return}else t.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(t.warn("Cluster identified",n," Replacement id in edges: ",S(n,e,n)),b.set(n,B(n,e)),c.set(n,{id:S(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){let d=e.children(n),o=e.edges();d.length>0?(t.debug("Cluster identified",n,b),o.forEach(l=>{I(l.v,n)^I(l.w,n)&&(t.warn("Edge: ",l," leaves cluster ",n),t.warn("Descendants of XXX ",n,": ",b.get(n)),c.get(n).externalConnections=!0)})):t.debug("Not a cluster ",n,b)});for(let n of c.keys()){let d=c.get(n).id,o=e.parent(d);o!==n&&c.has(o)&&!c.get(o).externalConnections&&(c.get(n).id=o)}e.edges().forEach(function(n){let d=e.edge(n);t.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),t.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let o=n.v,l=n.w;if(t.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(t.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),o=T(n.v),l=T(n.w),e.removeEdge(n.v,n.w,n.name),o!==n.v){let i=e.parent(o);c.get(i).externalConnections=!0,d.fromCluster=n.v}if(l!==n.w){let i=e.parent(l);c.get(i).externalConnections=!0,d.toCluster=n.w}t.warn("Fix Replacing with XXX",o,l,n.name),e.setEdge(o,l,d,n.name)}}),t.warn("Adjusted Graph",X(e)),A(e,0),t.trace(c)},"adjustClustersAndEdges"),A=w((e,r)=>{var o,l;if(t.warn("extractor - ",r,X(e),e.children("D")),r>10){t.error("Bailing out");return}let n=e.nodes(),d=!1;for(let i of n){let s=e.children(i);d||(d=s.length>0)}if(!d){t.debug("Done, no node has children",e.nodes());return}t.debug("Nodes = ",n,r);for(let i of n)if(t.debug("Extracting node",i,c,c.has(i)&&!c.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",r),!c.has(i))t.debug("Not a cluster",i,r);else if(!c.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){t.warn("Cluster without external connections, without a parent and with children",i,r);let s=e.graph().rankdir==="TB"?"LR":"TB";(l=(o=c.get(i))==null?void 0:o.clusterData)!=null&&l.dir&&(s=c.get(i).clusterData.dir,t.warn("Fixing dir",c.get(i).clusterData.dir,s));let f=new D({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});t.warn("Old graph before copy",X(e)),P(i,e,f,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:c.get(i).clusterData,label:c.get(i).label,graph:f}),t.warn("New graph after copy node: (",i,")",X(f)),t.debug("Old graph after copy",X(e))}else t.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!c.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),r),t.debug(c);n=e.nodes(),t.warn("New list of nodes",n);for(let i of n){let s=e.node(i);t.warn(" Now next level",i,s),s!=null&&s.clusterNode&&A(s.graph,r+1)}},"extractor"),J=w((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(d=>{let o=J(e,e.children(d));n=[...n,...o]}),n},"sorter"),ie=w(e=>J(e,e.children()),"sortNodesByHierarchy"),R=w(async(e,r,n,d,o,l)=>{t.warn("Graph in recursive render:XAX",X(r),o);let i=r.graph().rankdir;t.trace("Dir in recursive render - dir:",i);let s=e.insert("g").attr("class","root");r.nodes()?t.info("Recursive render XXX",r.nodes()):t.info("No nodes found for",r),r.edges().length>0&&t.info("Recursive edges",r.edge(r.edges()[0]));let f=s.insert("g").attr("class","clusters"),E=s.insert("g").attr("class","edgePaths"),N=s.insert("g").attr("class","edgeLabels"),p=s.insert("g").attr("class","nodes");await Promise.all(r.nodes().map(async function(g){let a=r.node(g);if(o!==void 0){let u=JSON.parse(JSON.stringify(o.clusterData));t.trace(`Setting data for parent cluster XXX
Node.id = `,g,`
data=`,u.height,`
Parent cluster`,o.height),r.setNode(o.id,u),r.parent(g)||(t.trace("Setting parent",g,o.id),r.setParent(g,o.id,u))}if(t.info("(Insert) Node XXX"+g+": "+JSON.stringify(r.node(g))),a==null?void 0:a.clusterNode){t.info("Cluster identified XBX",g,a.width,r.node(g));let{ranksep:u,nodesep:m}=r.graph();a.graph.setGraph({...a.graph.graph(),ranksep:u+25,nodesep:m});let y=await R(p,a.graph,n,d,r.node(g),l),x=y.elem;K(a,x),a.diff=y.diff||0,t.info("New compound node after recursive render XAX",g,"width",a.width,"height",a.height),_(x,a)}else r.children(g).length>0?(t.trace("Cluster - the non recursive path XBX",g,a.id,a,a.width,"Graph:",r),t.trace(S(a.id,r)),c.set(a.id,{id:S(a.id,r),node:a})):(t.trace("Node - the non recursive path XAX",g,p,r.node(g),i),await Y(p,r.node(g),{config:l,dir:i}))})),await w(async()=>{let g=r.edges().map(async function(a){let u=r.edge(a.v,a.w,a.name);t.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(a)),t.info("Edge "+a.v+" -> "+a.w+": ",a," ",JSON.stringify(r.edge(a))),t.info("Fix",c,"ids:",a.v,a.w,"Translating: ",c.get(a.v),c.get(a.w)),await W(N,u)});await Promise.all(g)},"processEdges")(),t.info("Graph before layout:",JSON.stringify(X(r))),t.info("############################################# XXX"),t.info("### Layout ### XXX"),t.info("############################################# XXX"),L(r),t.info("Graph after layout:",JSON.stringify(X(r)));let h=0,{subGraphTitleTotalMargin:v}=j(l);return await Promise.all(ie(r).map(async function(g){var u;let a=r.node(g);if(t.info("Position XBX => "+g+": ("+a.x,","+a.y,") width: ",a.width," height: ",a.height),a==null?void 0:a.clusterNode)a.y+=v,t.info("A tainted cluster node XBX1",g,a.id,a.width,a.height,a.x,a.y,r.parent(g)),c.get(a.id).node=a,k(a);else if(r.children(g).length>0){t.info("A pure cluster node XBX1",g,a.id,a.x,a.y,a.width,a.height,r.parent(g)),a.height+=v,r.node(a.parentId);let m=(a==null?void 0:a.padding)/2||0,y=((u=a==null?void 0:a.labelBBox)==null?void 0:u.height)||0,x=y-m||0;t.debug("OffsetY",x,"labelHeight",y,"halfPadding",m),await H(f,a),c.get(a.id).node=a}else{let m=r.node(a.parentId);a.y+=v/2,t.info("A regular node XBX1 - using the padding",a.id,"parent",a.parentId,a.width,a.height,a.x,a.y,"offsetY",a.offsetY,"parent",m,m==null?void 0:m.offsetY,a),k(a)}})),r.edges().forEach(function(g){let a=r.edge(g);t.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(a),a),a.points.forEach(u=>u.y+=v/2),Q(a,V(E,a,c,n,r.node(g.v),r.node(g.w),d))}),r.nodes().forEach(function(g){let a=r.node(g);t.info(g,a.type,a.diff),a.isGroup&&(h=a.diff)}),t.warn("Returning from recursive render XAX",s,h),{elem:s,diff:h}},"recursiveRender"),de=w(async(e,r)=>{var l,i,s,f,E,N;let n=new D({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((l=e.config)==null?void 0:l.nodeSpacing)||((s=(i=e.config)==null?void 0:i.flowchart)==null?void 0:s.nodeSpacing)||e.nodeSpacing,ranksep:((f=e.config)==null?void 0:f.rankSpacing)||((N=(E=e.config)==null?void 0:E.flowchart)==null?void 0:N.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),d=r.select("g");U(d,e.markers,e.type,e.diagramId),z(),Z(),q(),ne(),e.nodes.forEach(p=>{n.setNode(p.id,{...p}),p.parentId&&n.setParent(p.id,p.parentId)}),t.debug("Edges:",e.edges),e.edges.forEach(p=>{if(p.start===p.end){let h=p.start,v=h+"---"+h+"---1",g=h+"---"+h+"---2",a=n.node(h);n.setNode(v,{domId:v,id:v,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(v,a.parentId),n.setNode(g,{domId:g,id:g,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(g,a.parentId);let u=structuredClone(p),m=structuredClone(p),y=structuredClone(p);u.label="",u.arrowTypeEnd="none",u.id=h+"-cyclic-special-1",m.arrowTypeStart="none",m.arrowTypeEnd="none",m.id=h+"-cyclic-special-mid",y.label="",a.isGroup&&(u.fromCluster=h,y.toCluster=h),y.id=h+"-cyclic-special-2",y.arrowTypeStart="none",n.setEdge(h,v,u,h+"-cyclic-special-0"),n.setEdge(v,g,m,h+"-cyclic-special-1"),n.setEdge(g,h,y,h+"-cyc<lic-special-2")}else n.setEdge(p.start,p.end,{...p},p.id)}),t.warn("Graph at first:",JSON.stringify(X(n))),te(n),t.warn("Graph after XAX:",JSON.stringify(X(n)));let o=M();await R(d,n,e.type,e.diagramId,void 0,o)},"render");export{de as render};
import{s as z}from"./chunk-LvLJmgfZ.js";import{t as J}from"./react-Bj1aDYRI.js";import{t as Q}from"./react-dom-CSu739Rf.js";import{_ as P,i as U,n as Z,t as ee,v as te,y as re}from"./click-outside-container-BXzp0MYr.js";import{t as ie}from"./dist-BZP3Xxma.js";var ae=Q(),r=z(J(),1),ne=()=>t=>t.targetX,oe=()=>t=>t.targetY,le=()=>t=>t.targetWidth,de=()=>t=>t.targetHeight,se=()=>t=>t.targetY+10,ue=()=>t=>Math.max(0,(t.targetHeight-28)/2);const ce=ie("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[oe(),"px"],"d19meir1-1":[ne(),"px"],"d19meir1-2":[le(),"px"],"d19meir1-3":[de(),"px"],"d19meir1-4":[se(),"px"],"d19meir1-5":[ue(),"px"]}});function ge(){let[t,n]=r.useState();return[t??void 0,n]}function me(){let[t,n]=ge(),[a,f]=r.useState(0),[v,b]=r.useState(!0);return r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;let o=new IntersectionObserver(l=>{l.length!==0&&b(l[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),r.useEffect(()=>{if(v||t===void 0)return;let o,l=()=>{let{right:k}=t.getBoundingClientRect();f(x=>Math.min(x+window.innerWidth-k-10,0)),o=requestAnimationFrame(l)};return o=requestAnimationFrame(l),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,v]),{ref:n,style:r.useMemo(()=>({transform:`translateX(${a}px)`}),[a])}}var ve=t=>{let{target:n,content:a,onFinishEditing:f,forceEditMode:v,initialValue:b,imageEditorOverride:o,markdownDivCreateNode:l,highlight:k,className:x,theme:C,id:V,cell:w,bloom:c,validateCell:d,getCellRenderer:M,provideEditor:p,isOutsideClick:W,customEventTarget:X}=t,[s,Y]=r.useState(v?a:void 0),O=r.useRef(s??a);O.current=s??a;let[h,N]=r.useState(()=>d===void 0?!0:!(P(a)&&(d==null?void 0:d(w,a,O.current))===!1)),g=r.useCallback((e,i)=>{f(h?e:void 0,i)},[h,f]),q=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&P(e)){let i=d(w,e,O.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[w,d]),y=r.useRef(!1),m=r.useRef(void 0),B=r.useCallback(()=>{g(s,[0,0]),y.current=!0},[s,g]),G=r.useCallback((e,i)=>{g(e,i??m.current??[0,0]),y.current=!0},[g]),_=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),m.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!y.current&&m.current!==void 0&&(g(i?s:void 0,m.current),y.current=!0)},0)},[g,s]),D=s??a,[u,j]=r.useMemo(()=>{var i,K;if(te(a))return[];let e=p==null?void 0:p(a);return e===void 0?[(K=(i=M(a))==null?void 0:i.provideEditor)==null?void 0:K.call(i,a),!1]:[e,!1]},[a,M,p]),{ref:L,style:$}=me(),R=!0,F,I=!0,E;if(u!==void 0){R=u.disablePadding!==!0,I=u.disableStyling!==!0;let e=re(u);e&&(E=u.styleOverride);let i=e?u.editor:u;F=r.createElement(i,{isHighlighted:k,onChange:q,value:D,initialValue:b,onFinishedEditing:G,validatedSelection:P(D)?D.selectionRange:void 0,forceEditMode:v,target:n,imageEditorOverride:o,markdownDivCreateNode:l,isValid:h,theme:C})}E={...E,...$};let A=document.getElementById("portal");if(A===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let S=I?"gdg-style":"gdg-unstyle";h||(S+=" gdg-invalid"),R&&(S+=" gdg-pad");let H=(c==null?void 0:c[0])??1,T=(c==null?void 0:c[1])??1;return(0,ae.createPortal)(r.createElement(Z.Provider,{value:C},r.createElement(ee,{style:U(C),className:x,onClickOutside:B,isOutsideClick:W,customEventTarget:X},r.createElement(ce,{ref:L,id:V,className:S,style:E,as:j===!0?"label":void 0,targetX:n.x-H,targetY:n.y-T,targetWidth:n.width+H*2,targetHeight:n.height+T*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:_},F)))),A)};export{ve as default};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var e=a("database-zap",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84",key:"14ibmq"}],["path",{d:"M21 5V8",key:"1marbg"}],["path",{d:"M21 12L18 17H22L19 22",key:"zafso"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87",key:"1y4wr8"}]]);export{e as t};
var x=Object.defineProperty;var A=(r,e,n)=>e in r?x(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n;var l=(r,e,n)=>A(r,typeof e!="symbol"?e+"":e,n);import{i as m}from"./useEvent-BhXAndur.js";import{Ct as I,En as E,Jr as T,hr as p,jn as C,mi as w,n as L,nr as M,rr as O}from"./cells-DPp5cDaO.js";import{d as $}from"./hotkeys-BHHWjLlp.js";import{t as P}from"./createLucideIcon-BCdY6lG5.js";import{t as R}from"./multi-map-DxdLNTBd.js";var S=P("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]),u,c;function U(r,e,n,a,i){var t={};return Object.keys(a).forEach(function(s){t[s]=a[s]}),t.enumerable=!!t.enumerable,t.configurable=!!t.configurable,("value"in t||t.initializer)&&(t.writable=!0),t=n.slice().reverse().reduce(function(s,o){return o(r,e,s)||s},t),i&&t.initializer!==void 0&&(t.value=t.initializer?t.initializer.call(i):void 0,t.initializer=void 0),t.initializer===void 0?(Object.defineProperty(r,e,t),null):t}var d=class{async getAttachments(r){return[]}asURI(r){return`${this.contextType}://${r}`}parseContextIds(r){let e=RegExp(`${this.mentionPrefix}([\\w-]+):\\/\\/([\\w./-]+)`,"g"),n=[...r.matchAll(e)],a=t=>t.slice(1),i=n.filter(([,t])=>t===this.contextType).map(([t])=>a(t));return[...new Set(i)]}createBasicCompletion(r,e){return{label:`${this.mentionPrefix}${r.uri.split("://")[1]}`,displayLabel:r.name,detail:(e==null?void 0:e.detail)||r.description,boost:(e==null?void 0:e.boost)||1,type:(e==null?void 0:e.type)||this.contextType,apply:`${this.mentionPrefix}${r.uri}`,section:(e==null?void 0:e.section)||this.title}}};let D=(u=T(),c=class{constructor(){l(this,"providers",new Set)}register(r){return this.providers.add(r),this}getProviders(){return this.providers}getProvider(r){return[...this.providers].find(e=>e.contextType===r)}getAllItems(){return[...this.providers].flatMap(r=>r.getItems())}parseAllContextIds(r){return[...this.providers].flatMap(e=>e.parseContextIds(r))}getContextInfo(r){let e=[],n=new Map(this.getAllItems().map(a=>[a.uri,a]));for(let a of r){let i=n.get(a);i&&e.push(i)}return e}formatContextForAI(r){let e=new Map(this.getAllItems().map(a=>[a.uri,a])),n=[];for(let a of r){let i=e.get(a);i&&n.push(i)}return n.length===0?"":n.map(a=>{var i;return((i=this.getProvider(a.type))==null?void 0:i.formatContext(a))||""}).join(`
`)}async getAttachmentsForContext(r){let e=new Map(this.getAllItems().map(t=>[t.uri,t])),n=[];for(let t of r){let s=e.get(t);s&&n.push(s)}if(n.length===0)return[];let a=new R;for(let t of n){let s=t.type;a.add(s,t)}let i=[...a.entries()].map(async([t,s])=>{let o=this.getProvider(t);if(!o)return[];try{return await o.getAttachments(s)}catch(v){return $.error("Error getting attachments from provider",v),[]}});return(await Promise.all(i)).flat()}},U(c.prototype,"getAllItems",[u],Object.getOwnPropertyDescriptor(c.prototype,"getAllItems"),c.prototype),c);function f(r){return r.replaceAll("<","&lt;").replaceAll(">","&gt;")}function h(r){let{type:e,data:n,details:a}=r,i=`<${e}`;for(let[t,s]of Object.entries(n))if(s!==void 0){let o=f(typeof s=="object"&&s?JSON.stringify(s):String(s));i+=` ${t}="${o}"`}return i+=">",a&&(i+=f(a)),i+=`</${e}>`,i}const g={LOCAL_TABLE:7,REMOTE_TABLE:5,HIGH:4,MEDIUM:3,CELL_OUTPUT:2,LOW:2},y={ERROR:{name:"Error",rank:1},TABLE:{name:"Table",rank:2},DATA_SOURCES:{name:"Data Sources",rank:3},VARIABLE:{name:"Variable",rank:4},CELL_OUTPUT:{name:"Cell Output",rank:5},FILE:{name:"File",rank:6}};var _=w(),b="datasource",k=class extends d{constructor(e,n){super();l(this,"title","Datasource");l(this,"mentionPrefix","@");l(this,"contextType",b);this.connectionsMap=e,this.dataframes=[...n.values()].filter(a=>O(a)==="dataframe")}getItems(){return[...this.connectionsMap.values()].map(e=>{var i;let n="Database schema.",a={connection:e};return p.has(e.name)&&(a.tables=this.dataframes,n="Database schema and the dataframes that can be queried"),e.databases.length===0&&(((i=a.tables)==null?void 0:i.length)??0)===0?null:{uri:this.asURI(e.name),name:e.name,description:n,type:this.contextType,data:a}}).filter(Boolean)}formatContext(e){let n=e.data,{name:a,display_name:i,source:t,...s}=n.connection,o=s;return p.has(a)||(o={...s,engine_name:a}),h({type:this.contextType,data:{connection:o,tables:n.tables}})}formatCompletion(e){let n=e.data,a=n.connection,i=n.tables,t=a.name;return p.has(a.name)&&(t="In-Memory"),{label:`@${t}`,displayLabel:t,detail:C(a.dialect),boost:g.MEDIUM,type:this.contextType,section:y.DATA_SOURCES,info:()=>{let s=document.createElement("div");return s.classList.add("mo-cm-tooltip","docs-documentation"),(0,_.createRoot)(s).render(E(a,i)),s}}}};function j(r){var s;let e=(s=m.get(L(r)))==null?void 0:s.code;if(!e||e.trim()==="")return null;let[n,a,i]=I.sql.transformIn(e),t=m.get(M).connectionsMap.get(i.engine);return t?`@${b}://${t.name}`:null}export{h as a,S as c,y as i,j as n,d as o,g as r,D as s,k as t};
var Lt=Object.defineProperty;var Ct=(n,t,e)=>t in n?Lt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>Ct(n,typeof t!="symbol"?t+"":t,e);import{d as W}from"./hotkeys-BHHWjLlp.js";import{a as Nt,i as Et,n as S,o as Qt,r as Gt,s as ct,t as x}from"./toDate-DETS9bBd.js";import{i as Z,n as Ft,r as A,t as lt}from"./en-US-CCVfmA-q.js";import{t as dt}from"./isValid-DDt9wNjK.js";function ht(n,t,e){let r=x(n,e==null?void 0:e.in);return isNaN(t)?S((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function N(n,t){var c,h,y,b;let e=Z(),r=(t==null?void 0:t.weekStartsOn)??((h=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:h.weekStartsOn)??e.weekStartsOn??((b=(y=e.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0,a=x(n,t==null?void 0:t.in),i=a.getDay(),s=(i<r?7:0)+i-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function $(n,t){return N(n,{...t,weekStartsOn:1})}function wt(n,t){let e=x(n,t==null?void 0:t.in),r=e.getFullYear(),a=S(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let i=$(a),s=S(e,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let c=$(s);return e.getTime()>=i.getTime()?r+1:e.getTime()>=c.getTime()?r:r-1}function mt(n,t){let e=x(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function Zt(n,t,e){let[r,a]=Ft(e==null?void 0:e.in,n,t),i=mt(r),s=mt(a),c=+i-A(i),h=+s-A(s);return Math.round((c-h)/Gt)}function $t(n,t){let e=wt(n,t),r=S((t==null?void 0:t.in)||n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),$(r)}function Ut(n,t){let e=x(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function It(n,t){let e=x(n,t==null?void 0:t.in);return Zt(e,Ut(e))+1}function ft(n,t){let e=x(n,t==null?void 0:t.in),r=$(e)-+$t(e);return Math.round(r/ct)+1}function j(n,t){var b,k,D,O;let e=x(n,t==null?void 0:t.in),r=e.getFullYear(),a=Z(),i=(t==null?void 0:t.firstWeekContainsDate)??((k=(b=t==null?void 0:t.locale)==null?void 0:b.options)==null?void 0:k.firstWeekContainsDate)??a.firstWeekContainsDate??((O=(D=a.locale)==null?void 0:D.options)==null?void 0:O.firstWeekContainsDate)??1,s=S((t==null?void 0:t.in)||n,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let c=N(s,t),h=S((t==null?void 0:t.in)||n,0);h.setFullYear(r,0,i),h.setHours(0,0,0,0);let y=N(h,t);return+e>=+c?r+1:+e>=+y?r:r-1}function Bt(n,t){var s,c,h,y;let e=Z(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??e.firstWeekContainsDate??((y=(h=e.locale)==null?void 0:h.options)==null?void 0:y.firstWeekContainsDate)??1,a=j(n,t),i=S((t==null?void 0:t.in)||n,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),N(i,t)}function gt(n,t){let e=x(n,t==null?void 0:t.in),r=N(e,t)-+Bt(e,t);return Math.round(r/ct)+1}function d(n,t){return(n<0?"-":"")+Math.abs(n).toString().padStart(t,"0")}const E={y(n,t){let e=n.getFullYear(),r=e>0?e:1-e;return d(t==="yy"?r%100:r,t.length)},M(n,t){let e=n.getMonth();return t==="M"?String(e+1):d(e+1,2)},d(n,t){return d(n.getDate(),t.length)},a(n,t){let e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];default:return e==="am"?"a.m.":"p.m."}},h(n,t){return d(n.getHours()%12||12,t.length)},H(n,t){return d(n.getHours(),t.length)},m(n,t){return d(n.getMinutes(),t.length)},s(n,t){return d(n.getSeconds(),t.length)},S(n,t){let e=t.length,r=n.getMilliseconds();return d(Math.trunc(r*10**(e-3)),t.length)}};var U={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};const pt={G:function(n,t,e){let r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){let r=n.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return E.y(n,t)},Y:function(n,t,e,r){let a=j(n,r),i=a>0?a:1-a;return t==="YY"?d(i%100,2):t==="Yo"?e.ordinalNumber(i,{unit:"year"}):d(i,t.length)},R:function(n,t){return d(wt(n),t.length)},u:function(n,t){return d(n.getFullYear(),t.length)},Q:function(n,t,e){let r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){let r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return d(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){let r=n.getMonth();switch(t){case"M":case"MM":return E.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){let r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){let a=gt(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):d(a,t.length)},I:function(n,t,e){let r=ft(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):d(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):E.d(n,t)},D:function(n,t,e){let r=It(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):d(r,t.length)},E:function(n,t,e){let r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return d(i,2);case"eo":return e.ordinalNumber(i,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return d(i,t.length);case"co":return e.ordinalNumber(i,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){let r=n.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return d(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){let r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){let r=n.getHours(),a;switch(a=r===12?U.noon:r===0?U.midnight:r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){let r=n.getHours(),a;switch(a=r>=17?U.evening:r>=12?U.afternoon:r>=4?U.morning:U.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return E.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):E.H(n,t)},K:function(n,t,e){let r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):E.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):E.s(n,t)},S:function(n,t){return E.S(n,t)},X:function(n,t,e){let r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return bt(r);case"XXXX":case"XX":return Q(r);default:return Q(r,":")}},x:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"x":return bt(r);case"xxxx":case"xx":return Q(r);default:return Q(r,":")}},O:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yt(r,":");default:return"GMT"+Q(r,":")}},z:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yt(r,":");default:return"GMT"+Q(r,":")}},t:function(n,t,e){return d(Math.trunc(n/1e3),t.length)},T:function(n,t,e){return d(+n,t.length)}};function yt(n,t=""){let e=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),i=r%60;return i===0?e+String(a):e+String(a)+t+d(i,2)}function bt(n,t){return n%60==0?(n>0?"-":"+")+d(Math.abs(n)/60,2):Q(n,t)}function Q(n,t=""){let e=n>0?"-":"+",r=Math.abs(n),a=d(Math.trunc(r/60),2),i=d(r%60,2);return e+a+t+i}var xt=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Tt=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const V={p:Tt,P:(n,t)=>{let e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return xt(n,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",xt(r,t)).replace("{{time}}",Tt(a,t))}};var Xt=/^D+$/,zt=/^Y+$/,Rt=["D","DD","YY","YYYY"];function Dt(n){return Xt.test(n)}function Mt(n){return zt.test(n)}function J(n,t,e){let r=Wt(n,t,e);if(console.warn(r),Rt.includes(n))throw RangeError(r)}function Wt(n,t,e){let r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var At=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Kt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jt=/^'([^]*?)'?$/,Vt=/''/g,Jt=/[a-zA-Z]/;function I(n,t,e){var b,k,D,O,v,C,P,L;let r=Z(),a=(e==null?void 0:e.locale)??r.locale??lt,i=(e==null?void 0:e.firstWeekContainsDate)??((k=(b=e==null?void 0:e.locale)==null?void 0:b.options)==null?void 0:k.firstWeekContainsDate)??r.firstWeekContainsDate??((O=(D=r.locale)==null?void 0:D.options)==null?void 0:O.firstWeekContainsDate)??1,s=(e==null?void 0:e.weekStartsOn)??((C=(v=e==null?void 0:e.locale)==null?void 0:v.options)==null?void 0:C.weekStartsOn)??r.weekStartsOn??((L=(P=r.locale)==null?void 0:P.options)==null?void 0:L.weekStartsOn)??0,c=x(n,e==null?void 0:e.in);if(!dt(c))throw RangeError("Invalid time value");let h=t.match(Kt).map(M=>{let T=M[0];if(T==="p"||T==="P"){let F=V[T];return F(M,a.formatLong)}return M}).join("").match(At).map(M=>{if(M==="''")return{isToken:!1,value:"'"};let T=M[0];if(T==="'")return{isToken:!1,value:_t(M)};if(pt[T])return{isToken:!0,value:M};if(T.match(Jt))throw RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:M}});a.localize.preprocessor&&(h=a.localize.preprocessor(c,h));let y={firstWeekContainsDate:i,weekStartsOn:s,locale:a};return h.map(M=>{if(!M.isToken)return M.value;let T=M.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Mt(T)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Dt(T))&&J(T,t,String(n));let F=pt[T[0]];return F(c,T,a.localize,y)}).join("")}function _t(n){let t=n.match(jt);return t?t[1].replace(Vt,"'"):n}function te(){return Object.assign({},Z())}function ee(n,t){let e=x(n,t==null?void 0:t.in).getDay();return e===0?7:e}function re(n,t){let e=ne(t)?new t(0):S(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function ne(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}var ae=10,St=class{constructor(){o(this,"subPriority",0)}validate(n,t){return!0}},ie=class extends St{constructor(n,t,e,r,a){super(),this.value=n,this.validateValue=t,this.setValue=e,this.priority=r,a&&(this.subPriority=a)}validate(n,t){return this.validateValue(n,this.value,t)}set(n,t,e){return this.setValue(n,t,this.value,e)}},oe=class extends St{constructor(t,e){super();o(this,"priority",ae);o(this,"subPriority",-1);this.context=t||(r=>S(e,r))}set(t,e){return e.timestampIsSet?t:S(t,re(t,this.context))}},l=class{run(n,t,e,r){let a=this.parse(n,t,e,r);return a?{setter:new ie(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(n,t,e){return!0}},se=class extends l{constructor(){super(...arguments);o(this,"priority",140);o(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}};const g={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Y={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function p(n,t){return n&&{value:t(n.value),rest:n.rest}}function w(n,t){let e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function q(n,t){let e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};let r=e[1]==="+"?1:-1,a=e[2]?parseInt(e[2],10):0,i=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:r*(a*Et+i*Nt+s*Qt),rest:t.slice(e[0].length)}}function kt(n){return w(g.anyDigitsSigned,n)}function f(n,t){switch(n){case 1:return w(g.singleDigit,t);case 2:return w(g.twoDigits,t);case 3:return w(g.threeDigits,t);case 4:return w(g.fourDigits,t);default:return w(RegExp("^\\d{1,"+n+"}"),t)}}function vt(n,t){switch(n){case 1:return w(g.singleDigitSigned,t);case 2:return w(g.twoDigitsSigned,t);case 3:return w(g.threeDigitsSigned,t);case 4:return w(g.fourDigitsSigned,t);default:return w(RegExp("^-?\\d{1,"+n+"}"),t)}}function _(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Ht(n,t){let e=t>0,r=e?t:1-t,a;if(r<=50)a=n||100;else{let i=r+50,s=Math.trunc(i/100)*100,c=n>=i%100;a=n+s-(c?100:0)}return e?a:1-a}function Yt(n){return n%400==0||n%4==0&&n%100!=0}var ue=class extends l{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){let a=i=>({year:i,isTwoDigitYear:e==="yy"});switch(e){case"y":return p(f(4,t),a);case"yo":return p(r.ordinalNumber(t,{unit:"year"}),a);default:return p(f(e.length,t),a)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){let a=t.getFullYear();if(r.isTwoDigitYear){let s=Ht(r.year,a);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}let i=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}},ce=class extends l{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){let a=i=>({year:i,isTwoDigitYear:e==="YY"});switch(e){case"Y":return p(f(4,t),a);case"Yo":return p(r.ordinalNumber(t,{unit:"year"}),a);default:return p(f(e.length,t),a)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,a){let i=j(t,a);if(r.isTwoDigitYear){let c=Ht(r.year,i);return t.setFullYear(c,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),N(t,a)}let s=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(s,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),N(t,a)}},le=class extends l{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return vt(e==="R"?4:e.length,t)}set(t,e,r){let a=S(t,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),$(a)}},de=class extends l{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return vt(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}},he=class extends l{constructor(){super(...arguments);o(this,"priority",120);o(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return f(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}},we=class extends l{constructor(){super(...arguments);o(this,"priority",120);o(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return f(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}},me=class extends l{constructor(){super(...arguments);o(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);o(this,"priority",110)}parse(t,e,r){let a=i=>i-1;switch(e){case"M":return p(w(g.month,t),a);case"MM":return p(f(2,t),a);case"Mo":return p(r.ordinalNumber(t,{unit:"month"}),a);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}},fe=class extends l{constructor(){super(...arguments);o(this,"priority",110);o(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){let a=i=>i-1;switch(e){case"L":return p(w(g.month,t),a);case"LL":return p(f(2,t),a);case"Lo":return p(r.ordinalNumber(t,{unit:"month"}),a);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}};function ge(n,t,e){let r=x(n,e==null?void 0:e.in),a=gt(r,e)-t;return r.setDate(r.getDate()-a*7),x(r,e==null?void 0:e.in)}var pe=class extends l{constructor(){super(...arguments);o(this,"priority",100);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return w(g.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return f(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,a){return N(ge(t,r,a),a)}};function ye(n,t,e){let r=x(n,e==null?void 0:e.in),a=ft(r,e)-t;return r.setDate(r.getDate()-a*7),r}var be=class extends l{constructor(){super(...arguments);o(this,"priority",100);o(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return w(g.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return f(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return $(ye(t,r))}},xe=[31,28,31,30,31,30,31,31,30,31,30,31],Te=[31,29,31,30,31,30,31,31,30,31,30,31],De=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"subPriority",1);o(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return w(g.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return f(e.length,t)}}validate(t,e){let r=Yt(t.getFullYear()),a=t.getMonth();return r?e>=1&&e<=Te[a]:e>=1&&e<=xe[a]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}},Me=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"subpriority",1);o(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return w(g.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return f(e.length,t)}}validate(t,e){return Yt(t.getFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}};function tt(n,t,e){var y,b,k,D;let r=Z(),a=(e==null?void 0:e.weekStartsOn)??((b=(y=e==null?void 0:e.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??r.weekStartsOn??((D=(k=r.locale)==null?void 0:k.options)==null?void 0:D.weekStartsOn)??0,i=x(n,e==null?void 0:e.in),s=i.getDay(),c=(t%7+7)%7,h=7-a;return ht(i,t<0||t>6?t-(s+h)%7:(c+h)%7-(s+h)%7,e)}var Se=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,a){return t=tt(t,r,a),t.setHours(0,0,0,0),t}},ke=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,a){let i=s=>{let c=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+c};switch(e){case"e":case"ee":return p(f(e.length,t),i);case"eo":return p(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,a){return t=tt(t,r,a),t.setHours(0,0,0,0),t}},ve=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,a){let i=s=>{let c=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+c};switch(e){case"c":case"cc":return p(f(e.length,t),i);case"co":return p(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,a){return t=tt(t,r,a),t.setHours(0,0,0,0),t}};function He(n,t,e){let r=x(n,e==null?void 0:e.in);return ht(r,t-ee(r,e),e)}var Ye=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){let a=i=>i===0?7:i;switch(e){case"i":case"ii":return f(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return p(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),a);case"iiiii":return p(r.day(t,{width:"narrow",context:"formatting"}),a);case"iiiiii":return p(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),a);default:return p(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),a)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=He(t,r),t.setHours(0,0,0,0),t}},qe=class extends l{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(_(r),0,0,0),t}},Oe=class extends l{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(_(r),0,0,0),t}},Pe=class extends l{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(_(r),0,0,0),t}},Le=class extends l{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return w(g.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return f(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){let a=t.getHours()>=12;return a&&r<12?t.setHours(r+12,0,0,0):!a&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}},Ce=class extends l{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return w(g.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return f(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}},Ne=class extends l{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return w(g.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return f(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}},Ee=class extends l{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return w(g.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return f(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){let a=r<=24?r%24:r;return t.setHours(a,0,0,0),t}},Qe=class extends l{constructor(){super(...arguments);o(this,"priority",60);o(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return w(g.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return f(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}},Ge=class extends l{constructor(){super(...arguments);o(this,"priority",50);o(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return w(g.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return f(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}},Fe=class extends l{constructor(){super(...arguments);o(this,"priority",30);o(this,"incompatibleTokens",["t","T"])}parse(t,e){return p(f(e.length,t),r=>Math.trunc(r*10**(-e.length+3)))}set(t,e,r){return t.setMilliseconds(r),t}},Ze=class extends l{constructor(){super(...arguments);o(this,"priority",10);o(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return q(Y.basicOptionalMinutes,t);case"XX":return q(Y.basic,t);case"XXXX":return q(Y.basicOptionalSeconds,t);case"XXXXX":return q(Y.extendedOptionalSeconds,t);default:return q(Y.extended,t)}}set(t,e,r){return e.timestampIsSet?t:S(t,t.getTime()-A(t)-r)}},$e=class extends l{constructor(){super(...arguments);o(this,"priority",10);o(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return q(Y.basicOptionalMinutes,t);case"xx":return q(Y.basic,t);case"xxxx":return q(Y.basicOptionalSeconds,t);case"xxxxx":return q(Y.extendedOptionalSeconds,t);default:return q(Y.extended,t)}}set(t,e,r){return e.timestampIsSet?t:S(t,t.getTime()-A(t)-r)}},Ue=class extends l{constructor(){super(...arguments);o(this,"priority",40);o(this,"incompatibleTokens","*")}parse(t){return kt(t)}set(t,e,r){return[S(t,r*1e3),{timestampIsSet:!0}]}},Ie=class extends l{constructor(){super(...arguments);o(this,"priority",20);o(this,"incompatibleTokens","*")}parse(t){return kt(t)}set(t,e,r){return[S(t,r),{timestampIsSet:!0}]}};const Be={G:new se,y:new ue,Y:new ce,R:new le,u:new de,Q:new he,q:new we,M:new me,L:new fe,w:new pe,I:new be,d:new De,D:new Me,E:new Se,e:new ke,c:new ve,i:new Ye,a:new qe,b:new Oe,B:new Pe,h:new Le,H:new Ce,K:new Ne,k:new Ee,m:new Qe,s:new Ge,S:new Fe,X:new Ze,x:new $e,t:new Ue,T:new Ie};var Xe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ze=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Re=/^'([^]*?)'?$/,We=/''/g,Ae=/\S/,Ke=/[a-zA-Z]/;function je(n,t,e,r){var P,L,M,T,F,nt,at,it;let a=()=>S((r==null?void 0:r.in)||e,NaN),i=te(),s=(r==null?void 0:r.locale)??i.locale??lt,c=(r==null?void 0:r.firstWeekContainsDate)??((L=(P=r==null?void 0:r.locale)==null?void 0:P.options)==null?void 0:L.firstWeekContainsDate)??i.firstWeekContainsDate??((T=(M=i.locale)==null?void 0:M.options)==null?void 0:T.firstWeekContainsDate)??1,h=(r==null?void 0:r.weekStartsOn)??((nt=(F=r==null?void 0:r.locale)==null?void 0:F.options)==null?void 0:nt.weekStartsOn)??i.weekStartsOn??((it=(at=i.locale)==null?void 0:at.options)==null?void 0:it.weekStartsOn)??0;if(!t)return n?a():x(e,r==null?void 0:r.in);let y={firstWeekContainsDate:c,weekStartsOn:h,locale:s},b=[new oe(r==null?void 0:r.in,e)],k=t.match(ze).map(u=>{let m=u[0];if(m in V){let H=V[m];return H(u,s.formatLong)}return u}).join("").match(Xe),D=[];for(let u of k){!(r!=null&&r.useAdditionalWeekYearTokens)&&Mt(u)&&J(u,t,n),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Dt(u)&&J(u,t,n);let m=u[0],H=Be[m];if(H){let{incompatibleTokens:ot}=H;if(Array.isArray(ot)){let st=D.find(ut=>ot.includes(ut.token)||ut.token===m);if(st)throw RangeError(`The format string mustn't contain \`${st.fullToken}\` and \`${u}\` at the same time`)}else if(H.incompatibleTokens==="*"&&D.length>0)throw RangeError(`The format string mustn't contain \`${u}\` and any other token at the same time`);D.push({token:m,fullToken:u});let K=H.run(n,u,s.match,y);if(!K)return a();b.push(K.setter),n=K.rest}else{if(m.match(Ke))throw RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");if(u==="''"?u="'":m==="'"&&(u=Ve(u)),n.indexOf(u)===0)n=n.slice(u.length);else return a()}}if(n.length>0&&Ae.test(n))return a();let O=b.map(u=>u.priority).sort((u,m)=>m-u).filter((u,m,H)=>H.indexOf(u)===m).map(u=>b.filter(m=>m.priority===u).sort((m,H)=>H.subPriority-m.subPriority)).map(u=>u[0]),v=x(e,r==null?void 0:r.in);if(isNaN(+v))return a();let C={};for(let u of O){if(!u.validate(v,y))return a();let m=u.set(v,C,y);Array.isArray(m)?(v=m[0],Object.assign(C,m[1])):v=m}return v}function Ve(n){return n.match(Re)[1].replace(We,"'")}function Je(n,t,e){return dt(je(n,t,new Date,e))}function _e(n,t,e="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:n,timeZoneName:e}).format(t).split(/\s/g).slice(2).join(" ")}var et={},B={};function G(n,t){try{let e=(et[n]||(et[n]=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return e in B?B[e]:qt(e,e.split(":"))}catch{if(n in B)return B[n];let e=n==null?void 0:n.match(tr);return e?qt(n,e.slice(1)):NaN}}var tr=/([+-]\d\d):?(\d\d)?/;function qt(n,t){let e=+(t[0]||0),r=+(t[1]||0),a=(t[2]||0)/60;return B[n]=e*60+r>0?e*60+r+a:e*60-r-a}var X=class z extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(G(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Pt(this,NaN),rt(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new z(...e,t):new z(Date.now(),t)}withTimeZone(t){return new z(+this,t)}getTimezoneOffset(){let t=-G(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),rt(this),+this}[Symbol.for("constructDateFrom")](t){return new z(+new Date(t),this.timeZone)}},Ot=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!Ot.test(n))return;let t=n.replace(Ot,"$1UTC");X.prototype[t]&&(n.startsWith("get")?X.prototype[n]=function(){return this.internal[t]()}:(X.prototype[n]=function(){return Date.prototype[t].apply(this.internal,arguments),er(this),+this},X.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),rt(this),+this}))});function rt(n){n.internal.setTime(+n),n.internal.setUTCSeconds(n.internal.getUTCSeconds()-Math.round(-G(n.timeZone,n)*60))}function er(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),Pt(n)}function Pt(n){let t=G(n.timeZone,n),e=t>0?Math.floor(t):Math.ceil(t),r=new Date(+n);r.setUTCHours(r.getUTCHours()-1);let a=-new Date(+n).getTimezoneOffset(),i=a- -new Date(+r).getTimezoneOffset(),s=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();i&&s&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+i);let c=a-e;c&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+c);let h=new Date(+n);h.setUTCSeconds(0);let y=a>0?h.getSeconds():(h.getSeconds()-60)%60,b=Math.round(-(G(n.timeZone,n)*60))%60;(b||y)&&(n.internal.setUTCSeconds(n.internal.getUTCSeconds()+b),Date.prototype.setUTCSeconds.call(n,Date.prototype.getUTCSeconds.call(n)+b+y));let k=G(n.timeZone,n),D=k>0?Math.floor(k):Math.ceil(k),O=-new Date(+n).getTimezoneOffset()-D,v=D!==e,C=O-c;if(v&&C){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+C);let P=G(n.timeZone,n),L=D-(P>0?Math.floor(P):Math.ceil(P));L&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+L),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+L))}}var rr=class R extends X{static tz(t,...e){return e.length?new R(...e,t):new R(Date.now(),t)}toISOString(){let[t,e,r]=this.tzComponents(),a=`${t}${e}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[t,e,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${e} ${a}`}toTimeString(){let t=this.internal.toUTCString().split(" ")[4],[e,r,a]=this.tzComponents();return`${t} GMT${e}${r}${a} (${_e(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}tzComponents(){let t=this.getTimezoneOffset();return[t>0?"-":"+",String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),String(Math.abs(t)%60).padStart(2,"0")]}withTimeZone(t){return new R(+this,t)}[Symbol.for("constructDateFrom")](t){return new R(+new Date(t),this.timeZone)}};function nr(n,t,e){if(n==null)return"";try{return t==="date"?new Date(n).toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}):new Date(n).toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}catch(r){return W.warn("Failed to parse date",r),n.toString()}}function ar(n,t,e){let r=n.getUTCMilliseconds()!==0;try{if(t){let a=new rr(n,t),i=ir(t,e);return r?`${I(a,"yyyy-MM-dd HH:mm:ss.SSS")} ${i}`:`${I(a,"yyyy-MM-dd HH:mm:ss")} ${i}`}return r?I(n,"yyyy-MM-dd HH:mm:ss.SSS"):I(n,"yyyy-MM-dd HH:mm:ss")}catch(a){return W.warn("Failed to parse date",a),n.toISOString()}}function ir(n,t){var e;try{return((e=new Intl.DateTimeFormat(t,{timeZone:n,timeZoneName:"short"}).formatToParts(new Date).find(r=>r.type==="timeZoneName"))==null?void 0:e.value)??""}catch(r){return W.warn("Failed to get abbrev",r),n}}function or(n,t){if(n==null||n===0)return"";try{let e=new Date(n),r=new Date,a=new Date;return a.setDate(a.getDate()-1),e.toDateString()===r.toDateString()?`Today at ${e.toLocaleTimeString(t,{hour:"numeric",minute:"numeric"})}`:e.toDateString()===a.toDateString()?`Yesterday at ${e.toLocaleTimeString(t,{hour:"numeric",minute:"numeric"})}`:`${e.toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"})} at ${e.toLocaleTimeString(t,{hour:"numeric",minute:"numeric"})}`}catch(e){W.warn("Failed to parse date",e)}return n.toString()}const sr=["yyyy","yyyy-MM","yyyy-MM-dd"];function ur(n){for(let t of sr)if(Je(n,t))return t;return null}export{I as a,or as i,ur as n,nr as r,ar as t};
var P=new Date,B=new Date;function T(t,e,n,r){function f(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return f.floor=a=>(t(a=new Date(+a)),a),f.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),f.round=a=>{let c=f(a),C=f.ceil(a);return a-c<C-a?c:C},f.offset=(a,c)=>(e(a=new Date(+a),c==null?1:Math.floor(c)),a),f.range=(a,c,C)=>{let d=[];if(a=f.ceil(a),C=C==null?1:Math.floor(C),!(a<c)||!(C>0))return d;let X;do d.push(X=new Date(+a)),e(a,C),t(a);while(X<a&&a<c);return d},f.filter=a=>T(c=>{if(c>=c)for(;t(c),!a(c);)c.setTime(c-1)},(c,C)=>{if(c>=c)if(C<0)for(;++C<=0;)for(;e(c,-1),!a(c););else for(;--C>=0;)for(;e(c,1),!a(c););}),n&&(f.count=(a,c)=>(P.setTime(+a),B.setTime(+c),t(P),t(B),Math.floor(n(P,B))),f.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?f.filter(r?c=>r(c)%a===0:c=>f.count(0,c)%a===0):f)),f}const z=T(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);z.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?T(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):z),z.range;const L=1e3,y=L*60,Z=y*60,m=Z*24,E=m*7,ie=m*30,ce=m*365,tt=T(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*L)},(t,e)=>(e-t)/L,t=>t.getUTCSeconds());tt.range;const et=T(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*L)},(t,e)=>{t.setTime(+t+e*y)},(t,e)=>(e-t)/y,t=>t.getMinutes());et.range;const nt=T(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*y)},(t,e)=>(e-t)/y,t=>t.getUTCMinutes());nt.range;const rt=T(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*L-t.getMinutes()*y)},(t,e)=>{t.setTime(+t+e*Z)},(t,e)=>(e-t)/Z,t=>t.getHours());rt.range;const ut=T(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Z)},(t,e)=>(e-t)/Z,t=>t.getUTCHours());ut.range;const J=T(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*y)/m,t=>t.getDate()-1);J.range;const I=T(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/m,t=>t.getUTCDate()-1);I.range;const ot=T(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/m,t=>Math.floor(t/m));ot.range;function S(t){return T(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*y)/E)}const G=S(0),W=S(1),at=S(2),it=S(3),p=S(4),ct=S(5),st=S(6);G.range,W.range,at.range,it.range,p.range,ct.range,st.range;function A(t){return T(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/E)}const _=A(0),N=A(1),se=A(2),le=A(3),b=A(4),ge=A(5),fe=A(6);_.range,N.range,se.range,le.range,b.range,ge.range,fe.range;const lt=T(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());lt.range;const gt=T(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());gt.range;const F=T(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());F.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:T(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}),F.range;const w=T(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());w.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:T(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}),w.range;function $(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function k(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function j(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function ft(t){var e=t.dateTime,n=t.date,r=t.time,f=t.periods,a=t.days,c=t.shortDays,C=t.months,d=t.shortMonths,X=O(f),Lt=Q(f),Zt=O(a),bt=Q(a),Vt=O(c),Wt=Q(c),jt=O(C),Ot=Q(C),Qt=O(d),Xt=Q(d),Y={a:_t,A:$t,b:kt,B:Rt,c:null,d:Dt,e:Dt,f:We,g:Pe,G:Ee,H:Ze,I:be,j:Ve,L:yt,m:je,M:Oe,p:Kt,q:te,Q:Yt,s:xt,S:Qe,u:Xe,U:qe,V:ze,w:Je,W:Ie,x:null,X:null,y:Ne,Y:Be,Z:Ge,"%":wt},x={a:ee,A:ne,b:re,B:ue,c:null,d:vt,e:vt,f:Re,g:sn,G:gn,H:_e,I:$e,j:ke,L:mt,m:Ke,M:tn,p:oe,q:ae,Q:Yt,s:xt,S:en,u:nn,U:rn,V:un,w:on,W:an,x:null,X:null,y:cn,Y:ln,Z:fn,"%":wt},qt={a:Jt,A:It,b:Nt,B:Pt,c:Bt,d:Ut,e:Ut,f:Se,g:Ct,G:ht,H:Mt,I:Mt,j:we,L:He,m:Fe,M:Ye,p:zt,q:me,Q:Ae,s:Le,S:xe,u:Me,U:De,V:ye,w:Ue,W:de,x:Et,X:Gt,y:Ct,Y:ht,Z:ve,"%":pe};Y.x=v(n,Y),Y.X=v(r,Y),Y.c=v(e,Y),x.x=v(n,x),x.X=v(r,x),x.c=v(e,x);function v(o,i){return function(s){var u=[],U=-1,g=0,M=o.length,D,H,K;for(s instanceof Date||(s=new Date(+s));++U<M;)o.charCodeAt(U)===37&&(u.push(o.slice(g,U)),(H=Tt[D=o.charAt(++U)])==null?H=D==="e"?" ":"0":D=o.charAt(++U),(K=i[D])&&(D=K(s,H)),u.push(D),g=U+1);return u.push(o.slice(g,U)),u.join("")}}function R(o,i){return function(s){var u=j(1900,void 0,1),U=q(u,o,s+="",0),g,M;if(U!=s.length)return null;if("Q"in u)return new Date(u.Q);if("s"in u)return new Date(u.s*1e3+("L"in u?u.L:0));if(i&&!("Z"in u)&&(u.Z=0),"p"in u&&(u.H=u.H%12+u.p*12),u.m===void 0&&(u.m="q"in u?u.q:0),"V"in u){if(u.V<1||u.V>53)return null;"w"in u||(u.w=1),"Z"in u?(g=k(j(u.y,0,1)),M=g.getUTCDay(),g=M>4||M===0?N.ceil(g):N(g),g=I.offset(g,(u.V-1)*7),u.y=g.getUTCFullYear(),u.m=g.getUTCMonth(),u.d=g.getUTCDate()+(u.w+6)%7):(g=$(j(u.y,0,1)),M=g.getDay(),g=M>4||M===0?W.ceil(g):W(g),g=J.offset(g,(u.V-1)*7),u.y=g.getFullYear(),u.m=g.getMonth(),u.d=g.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),M="Z"in u?k(j(u.y,0,1)).getUTCDay():$(j(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(M+5)%7:u.w+u.U*7-(M+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,k(u)):$(u)}}function q(o,i,s,u){for(var U=0,g=i.length,M=s.length,D,H;U<g;){if(u>=M)return-1;if(D=i.charCodeAt(U++),D===37){if(D=i.charAt(U++),H=qt[D in Tt?i.charAt(U++):D],!H||(u=H(o,s,u))<0)return-1}else if(D!=s.charCodeAt(u++))return-1}return u}function zt(o,i,s){var u=X.exec(i.slice(s));return u?(o.p=Lt.get(u[0].toLowerCase()),s+u[0].length):-1}function Jt(o,i,s){var u=Vt.exec(i.slice(s));return u?(o.w=Wt.get(u[0].toLowerCase()),s+u[0].length):-1}function It(o,i,s){var u=Zt.exec(i.slice(s));return u?(o.w=bt.get(u[0].toLowerCase()),s+u[0].length):-1}function Nt(o,i,s){var u=Qt.exec(i.slice(s));return u?(o.m=Xt.get(u[0].toLowerCase()),s+u[0].length):-1}function Pt(o,i,s){var u=jt.exec(i.slice(s));return u?(o.m=Ot.get(u[0].toLowerCase()),s+u[0].length):-1}function Bt(o,i,s){return q(o,e,i,s)}function Et(o,i,s){return q(o,n,i,s)}function Gt(o,i,s){return q(o,r,i,s)}function _t(o){return c[o.getDay()]}function $t(o){return a[o.getDay()]}function kt(o){return d[o.getMonth()]}function Rt(o){return C[o.getMonth()]}function Kt(o){return f[+(o.getHours()>=12)]}function te(o){return 1+~~(o.getMonth()/3)}function ee(o){return c[o.getUTCDay()]}function ne(o){return a[o.getUTCDay()]}function re(o){return d[o.getUTCMonth()]}function ue(o){return C[o.getUTCMonth()]}function oe(o){return f[+(o.getUTCHours()>=12)]}function ae(o){return 1+~~(o.getUTCMonth()/3)}return{format:function(o){var i=v(o+="",Y);return i.toString=function(){return o},i},parse:function(o){var i=R(o+="",!1);return i.toString=function(){return o},i},utcFormat:function(o){var i=v(o+="",x);return i.toString=function(){return o},i},utcParse:function(o){var i=R(o+="",!0);return i.toString=function(){return o},i}}}var Tt={"-":"",_:" ",0:"0"},h=/^\s*\d+/,Te=/^%/,he=/[\\^$*+?|[\]().{}]/g;function l(t,e,n){var r=t<0?"-":"",f=(r?-t:t)+"",a=f.length;return r+(a<n?Array(n-a+1).join(e)+f:f)}function Ce(t){return t.replace(he,"\\$&")}function O(t){return RegExp("^(?:"+t.map(Ce).join("|")+")","i")}function Q(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ue(t,e,n){var r=h.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Me(t,e,n){var r=h.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function De(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function ye(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function de(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ht(t,e,n){var r=h.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ct(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ve(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function me(t,e,n){var r=h.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Fe(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ut(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function we(t,e,n){var r=h.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Mt(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ye(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function xe(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function He(t,e,n){var r=h.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Se(t,e,n){var r=h.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pe(t,e,n){var r=Te.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ae(t,e,n){var r=h.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Le(t,e,n){var r=h.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Dt(t,e){return l(t.getDate(),e,2)}function Ze(t,e){return l(t.getHours(),e,2)}function be(t,e){return l(t.getHours()%12||12,e,2)}function Ve(t,e){return l(1+J.count(F(t),t),e,3)}function yt(t,e){return l(t.getMilliseconds(),e,3)}function We(t,e){return yt(t,e)+"000"}function je(t,e){return l(t.getMonth()+1,e,2)}function Oe(t,e){return l(t.getMinutes(),e,2)}function Qe(t,e){return l(t.getSeconds(),e,2)}function Xe(t){var e=t.getDay();return e===0?7:e}function qe(t,e){return l(G.count(F(t)-1,t),e,2)}function dt(t){var e=t.getDay();return e>=4||e===0?p(t):p.ceil(t)}function ze(t,e){return t=dt(t),l(p.count(F(t),t)+(F(t).getDay()===4),e,2)}function Je(t){return t.getDay()}function Ie(t,e){return l(W.count(F(t)-1,t),e,2)}function Ne(t,e){return l(t.getFullYear()%100,e,2)}function Pe(t,e){return t=dt(t),l(t.getFullYear()%100,e,2)}function Be(t,e){return l(t.getFullYear()%1e4,e,4)}function Ee(t,e){var n=t.getDay();return t=n>=4||n===0?p(t):p.ceil(t),l(t.getFullYear()%1e4,e,4)}function Ge(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+l(e/60|0,"0",2)+l(e%60,"0",2)}function vt(t,e){return l(t.getUTCDate(),e,2)}function _e(t,e){return l(t.getUTCHours(),e,2)}function $e(t,e){return l(t.getUTCHours()%12||12,e,2)}function ke(t,e){return l(1+I.count(w(t),t),e,3)}function mt(t,e){return l(t.getUTCMilliseconds(),e,3)}function Re(t,e){return mt(t,e)+"000"}function Ke(t,e){return l(t.getUTCMonth()+1,e,2)}function tn(t,e){return l(t.getUTCMinutes(),e,2)}function en(t,e){return l(t.getUTCSeconds(),e,2)}function nn(t){var e=t.getUTCDay();return e===0?7:e}function rn(t,e){return l(_.count(w(t)-1,t),e,2)}function Ft(t){var e=t.getUTCDay();return e>=4||e===0?b(t):b.ceil(t)}function un(t,e){return t=Ft(t),l(b.count(w(t),t)+(w(t).getUTCDay()===4),e,2)}function on(t){return t.getUTCDay()}function an(t,e){return l(N.count(w(t)-1,t),e,2)}function cn(t,e){return l(t.getUTCFullYear()%100,e,2)}function sn(t,e){return t=Ft(t),l(t.getUTCFullYear()%100,e,2)}function ln(t,e){return l(t.getUTCFullYear()%1e4,e,4)}function gn(t,e){var n=t.getUTCDay();return t=n>=4||n===0?b(t):b.ceil(t),l(t.getUTCFullYear()%1e4,e,4)}function fn(){return"+0000"}function wt(){return"%"}function Yt(t){return+t}function xt(t){return Math.floor(t/1e3)}var V,Ht,St,pt,At;Tn({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 Tn(t){return V=ft(t),Ht=V.format,St=V.parse,pt=V.utcFormat,At=V.utcParse,V}export{L as A,et as C,Z as D,m as E,ce as M,z as N,y as O,ut as S,tt as T,_,ft as a,I as b,lt as c,W as d,st as f,it as g,at as h,At as i,E as j,ie as k,gt as l,p as m,St as n,F as o,G as p,pt as r,w as s,Ht as t,ct as u,J as v,nt as w,rt as x,ot as y};
function Q(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function A(t,i){if((o=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"))<0)return null;var o,n=t.slice(0,o);return[n.length>1?n[0]+n.slice(2):n,+t.slice(o+1)]}function T(t){return t=A(Math.abs(t)),t?t[1]:NaN}function R(t,i){return function(o,n){for(var a=o.length,c=[],m=0,f=t[0],y=0;a>0&&f>0&&(y+f+1>n&&(f=Math.max(1,n-y)),c.push(o.substring(a-=f,a+f)),!((y+=f+1)>n));)f=t[m=(m+1)%t.length];return c.reverse().join(i)}}function V(t){return function(i){return i.replace(/[0-9]/g,function(o){return t[+o]})}}var W=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function N(t){if(!(i=W.exec(t)))throw Error("invalid format: "+t);var i;return new $({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}N.prototype=$.prototype;function $(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.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 tt(t){t:for(var i=t.length,o=1,n=-1,a;o<i;++o)switch(t[o]){case".":n=a=o;break;case"0":n===0&&(n=o),a=o;break;default:if(!+t[o])break t;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(a+1):t}var X;function it(t,i){var o=A(t,i);if(!o)return t+"";var n=o[0],a=o[1],c=a-(X=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,m=n.length;return c===m?n:c>m?n+Array(c-m+1).join("0"):c>0?n.slice(0,c)+"."+n.slice(c):"0."+Array(1-c).join("0")+A(t,Math.max(0,i+c-1))[0]}function _(t,i){var o=A(t,i);if(!o)return t+"";var n=o[0],a=o[1];return a<0?"0."+Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+Array(a-n.length+2).join("0")}var D={"%":(t,i)=>(t*100).toFixed(i),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Q,e:(t,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>_(t*100,i),r:_,s:it,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function G(t){return t}var U=Array.prototype.map,Y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Z(t){var i=t.grouping===void 0||t.thousands===void 0?G:R(U.call(t.grouping,Number),t.thousands+""),o=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",c=t.numerals===void 0?G:V(U.call(t.numerals,String)),m=t.percent===void 0?"%":t.percent+"",f=t.minus===void 0?"\u2212":t.minus+"",y=t.nan===void 0?"NaN":t.nan+"";function C(s){s=N(s);var b=s.fill,M=s.align,u=s.sign,x=s.symbol,p=s.zero,w=s.width,E=s.comma,g=s.precision,P=s.trim,l=s.type;l==="n"?(E=!0,l="g"):D[l]||(g===void 0&&(g=12),P=!0,l="g"),(p||b==="0"&&M==="=")&&(p=!0,b="0",M="=");var I=x==="$"?o:x==="#"&&/[boxX]/.test(l)?"0"+l.toLowerCase():"",J=x==="$"?n:/[%p]/.test(l)?m:"",O=D[l],K=/[defgprs%]/.test(l);g=g===void 0?6:/[gprs]/.test(l)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function F(r){var v=I,h=J,e,L,k;if(l==="c")h=O(r)+h,r="";else{r=+r;var S=r<0||1/r<0;if(r=isNaN(r)?y:O(Math.abs(r),g),P&&(r=tt(r)),S&&+r==0&&u!=="+"&&(S=!1),v=(S?u==="("?u:f:u==="-"||u==="("?"":u)+v,h=(l==="s"?Y[8+X/3]:"")+h+(S&&u==="("?")":""),K){for(e=-1,L=r.length;++e<L;)if(k=r.charCodeAt(e),48>k||k>57){h=(k===46?a+r.slice(e+1):r.slice(e))+h,r=r.slice(0,e);break}}}E&&!p&&(r=i(r,1/0));var z=v.length+r.length+h.length,d=z<w?Array(w-z+1).join(b):"";switch(E&&p&&(r=i(d+r,d.length?w-h.length:1/0),d=""),M){case"<":r=v+r+h+d;break;case"=":r=v+d+r+h;break;case"^":r=d.slice(0,z=d.length>>1)+v+r+h+d.slice(z);break;default:r=d+v+r+h;break}return c(r)}return F.toString=function(){return s+""},F}function H(s,b){var M=C((s=N(s),s.type="f",s)),u=Math.max(-8,Math.min(8,Math.floor(T(b)/3)))*3,x=10**-u,p=Y[8+u/3];return function(w){return M(x*w)+p}}return{format:C,formatPrefix:H}}var j,q,B;rt({thousands:",",grouping:[3],currency:["$",""]});function rt(t){return j=Z(t),q=j.format,B=j.formatPrefix,j}export{T as a,N as i,B as n,Z as r,q as t};
var o=Object.defineProperty;var r=(t,s,e)=>s in t?o(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var i=(t,s,e)=>r(t,typeof s!="symbol"?s+"":s,e);var n=class{constructor(){i(this,"status","pending");i(this,"value");this.promise=new Promise((t,s)=>{this.reject=e=>{this.status="rejected",s(e)},this.resolve=e=>{this.status="resolved",u(e)||(this.value=e),t(e)}})}};function u(t){return typeof t=="object"&&!!t&&"then"in t&&typeof t.then=="function"}export{n as t};
var a=Object.defineProperty;var h=(s,e,t)=>e in s?a(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>h(s,typeof e!="symbol"?e+"":e,t);import{t as l}from"./createLucideIcon-BCdY6lG5.js";import{t as u}from"./Deferred-DxQeE5uh.js";import{t as c}from"./uuid-DXdzqzcr.js";var n=l("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);const q={create(){return c()}};var p=class{constructor(s,e,t={}){i(this,"requests",new Map);this.operation=s,this.makeRequest=e,this.opts=t}async request(s){if(this.opts.resolveExistingRequests){let r=this.opts.resolveExistingRequests();for(let o of this.requests.values())o.resolve(r);this.requests.clear()}let e=q.create(),t=new u;return this.requests.set(e,t),await this.makeRequest(e,s).catch(r=>{t.reject(r),this.requests.delete(e)}),t.promise}resolve(s,e){let t=this.requests.get(s);t!==void 0&&(t.resolve(e),this.requests.delete(s))}reject(s,e){let t=this.requests.get(s);t!==void 0&&(t.reject(e),this.requests.delete(s))}};export{n,p as t};

Sorry, the diff of this file is too big to display

var $;import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as A}from"./ordinal-DG_POl79.js";import{t as T}from"./defaultLocale-JieDVWC_.js";import"./purify.es-DZrAQFIu.js";import{u as D}from"./src-CvyFXpBy.js";import{i as _}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{p as Y,t as Z}from"./treemap-CZF0Enj1.js";import{n as h,r as V}from"./src-CsZby044.js";import{B as ee,C as te,U as ae,_ as le,a as re,c as se,d as ie,v as oe,y as G,z as ne}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as ce}from"./chunk-EXTU4WIE-Dmu97ZvI.js";import{i as C,n as de}from"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-O7ZBX7Z2-CFqB9i7k.js";import"./chunk-S6J4BHB3-C4KwSfr_.js";import"./chunk-LBM3YZW2-BRBe7ZaP.js";import"./chunk-76Q3JFCE-BAZ3z-Fu.js";import"./chunk-T53DSG4Q-Bhd043Cg.js";import"./chunk-LHMN2FUI-C4onQD9F.js";import"./chunk-FWNWRKHM-DzIkWreD.js";import{t as pe}from"./chunk-4BX2VUAB-KawmK-5L.js";import{t as he}from"./mermaid-parser.core-BLHYb13y.js";import{t as me}from"./chunk-QN33PNHL-BOQncxfy.js";var O=($=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ee,this.getAccTitle=oe,this.setDiagramTitle=ae,this.getDiagramTitle=te,this.getAccDescription=le,this.setAccDescription=ne}getNodes(){return this.nodes}getConfig(){let a=ie,i=G();return _({...a.treemap,...i.treemap??{}})}addNode(a,i){this.nodes.push(a),this.levels.set(a,i),i===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,i){let r=this.classes.get(a)??{id:a,styles:[],textStyles:[]},n=i.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(s=>{de(s)&&(r!=null&&r.textStyles?r.textStyles.push(s):r.textStyles=[s]),r!=null&&r.styles?r.styles.push(s):r.styles=[s]}),this.classes.set(a,r)}getClasses(){return this.classes}getStylesForClass(a){var i;return((i=this.classes.get(a))==null?void 0:i.styles)??[]}clear(){re(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},h($,"TreeMapDB"),$);function U(c){if(!c.length)return[];let a=[],i=[];return c.forEach(r=>{let n={name:r.name,children:r.type==="Leaf"?void 0:[]};for(n.classSelector=r==null?void 0:r.classSelector,r!=null&&r.cssCompiledStyles&&(n.cssCompiledStyles=[r.cssCompiledStyles]),r.type==="Leaf"&&r.value!==void 0&&(n.value=r.value);i.length>0&&i[i.length-1].level>=r.level;)i.pop();if(i.length===0)a.push(n);else{let s=i[i.length-1].node;s.children?s.children.push(n):s.children=[n]}r.type!=="Leaf"&&i.push({node:n,level:r.level})}),a}h(U,"buildHierarchy");var ye=h((c,a)=>{pe(c,a);let i=[];for(let s of c.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(let s of c.TreemapRows??[]){let d=s.item;if(!d)continue;let y=s.indent?parseInt(s.indent):0,z=fe(d),l=d.classSelector?a.getStylesForClass(d.classSelector):[],w=l.length>0?l.join(";"):void 0,g={level:y,name:z,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:w};i.push(g)}let r=U(i),n=h((s,d)=>{for(let y of s)a.addNode(y,d),y.children&&y.children.length>0&&n(y.children,d+1)},"addNodesRecursively");n(r,0)},"populate"),fe=h(c=>c.name?String(c.name):"","getItemName"),q={parser:{yy:void 0},parse:h(async c=>{var a;try{let i=await he("treemap",c);V.debug("Treemap AST:",i);let r=(a=q.parser)==null?void 0:a.yy;if(!(r instanceof O))throw 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.");ye(i,r)}catch(i){throw V.error("Error parsing treemap:",i),i}},"parse")},ue=10,v=10,M=25,Se={draw:h((c,a,i,r)=>{let n=r.db,s=n.getConfig(),d=s.padding??ue,y=n.getDiagramTitle(),z=n.getRoot(),{themeVariables:l}=G();if(!z)return;let w=y?30:0,g=ce(a),E=s.nodeWidth?s.nodeWidth*v:960,R=s.nodeHeight?s.nodeHeight*v:500,W=E,B=R+w;g.attr("viewBox",`0 0 ${W} ${B}`),se(g,B,W,s.useMaxWidth);let x;try{let e=s.valueFormat||",";if(e==="$0,0")x=h(t=>"$"+T(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){let t=/\.\d+/.exec(e),p=t?t[0]:"";x=h(f=>"$"+T(","+p)(f),"valueFormat")}else if(e.startsWith("$")){let t=e.substring(1);x=h(p=>"$"+T(t||"")(p),"valueFormat")}else x=T(e)}catch(e){V.error("Error creating format function:",e),x=T(",")}let L=A().range(["transparent",l.cScale0,l.cScale1,l.cScale2,l.cScale3,l.cScale4,l.cScale5,l.cScale6,l.cScale7,l.cScale8,l.cScale9,l.cScale10,l.cScale11]),J=A().range(["transparent",l.cScalePeer0,l.cScalePeer1,l.cScalePeer2,l.cScalePeer3,l.cScalePeer4,l.cScalePeer5,l.cScalePeer6,l.cScalePeer7,l.cScalePeer8,l.cScalePeer9,l.cScalePeer10,l.cScalePeer11]),F=A().range([l.cScaleLabel0,l.cScaleLabel1,l.cScaleLabel2,l.cScaleLabel3,l.cScaleLabel4,l.cScaleLabel5,l.cScaleLabel6,l.cScaleLabel7,l.cScaleLabel8,l.cScaleLabel9,l.cScaleLabel10,l.cScaleLabel11]);y&&g.append("text").attr("x",W/2).attr("y",w/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(y);let I=g.append("g").attr("transform",`translate(0, ${w})`).attr("class","treemapContainer"),K=Y(z).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),j=Z().size([E,R]).paddingTop(e=>e.children&&e.children.length>0?M+v:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?v:0).paddingRight(e=>e.children&&e.children.length>0?v:0).paddingBottom(e=>e.children&&e.children.length>0?v:0).round(!0)(K),Q=j.descendants().filter(e=>e.children&&e.children.length>0),k=I.selectAll(".treemapSection").data(Q).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);k.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),k.append("clipPath").attr("id",(e,t)=>`clip-section-${a}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),k.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>L(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>J(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";let t=C({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),k.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>e.depth===0?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+F(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(e){if(e.depth===0)return;let t=D(this),p=e.data.name;t.text(p);let f=e.x1-e.x0,S;S=s.showValues!==!1&&e.value?f-10-30-10-6:f-6-6;let m=Math.max(15,S),u=t.node();if(u.getComputedTextLength()>m){let o=p;for(;o.length>0;){if(o=p.substring(0,o.length-1),o.length===0){t.text("..."),u.getComputedTextLength()>m&&t.text("");break}if(t.text(o+"..."),u.getComputedTextLength()<=m)break}}}),s.showValues!==!1&&k.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?x(e.value):"").attr("font-style","italic").attr("style",e=>e.depth===0?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+F(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"));let X=j.leaves(),P=I.selectAll(".treemapLeafGroup").data(X).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);P.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("style",e=>C({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("stroke-width",3),P.append("clipPath").attr("id",(e,t)=>`clip-${a}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),P.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+F(e.data.name)+";"+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.data.name).each(function(e){let t=D(this),p=e.x1-e.x0,f=e.y1-e.y0,S=t.node(),m=p-8,u=f-8;if(m<10||u<10){t.style("display","none");return}let o=parseInt(t.style("font-size"),10),N=.6;for(;S.getComputedTextLength()>m&&o>8;)o--,t.style("font-size",`${o}px`);let b=Math.max(6,Math.min(28,Math.round(o*N))),H=o+2+b;for(;H>u&&o>8&&(o--,b=Math.max(6,Math.min(28,Math.round(o*N))),!(b<6&&o===8));)t.style("font-size",`${o}px`),H=o+2+b;t.style("font-size",`${o}px`),(S.getComputedTextLength()>m||o<8||u<o)&&t.style("display","none")}),s.showValues!==!1&&P.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+F(e.data.name)+";"+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.value?x(e.value):"").each(function(e){let t=D(this),p=this.parentNode;if(!p){t.style("display","none");return}let f=D(p).select(".treemapLabel");if(f.empty()||f.style("display")==="none"){t.style("display","none");return}let S=parseFloat(f.style("font-size")),m=Math.max(6,Math.min(28,Math.round(S*.6)));t.style("font-size",`${m}px`);let u=(e.y1-e.y0)/2+S/2+2;t.attr("y",u);let o=e.x1-e.x0,N=e.y1-e.y0-4,b=o-8;t.node().getComputedTextLength()>b||u+m>N||m<6?t.style("display","none"):t.style("display",null)}),me(g,s.diagramPadding??8,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),getClasses:h(function(c,a){return a.db.getClasses()},"getClasses")},ge={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},xe={parser:q,get db(){return new O},renderer:Se,styles:h(({treemap:c}={})=>{let a=_(ge,c);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")};export{xe as diagram};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import{i as y}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as o,r as k}from"./src-CsZby044.js";import{B as O,C as S,T as I,U as z,_ as E,a as F,d as P,v as R,y as w,z as D}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as B}from"./chunk-EXTU4WIE-Dmu97ZvI.js";import"./dist-C1VXabOr.js";import"./chunk-O7ZBX7Z2-CFqB9i7k.js";import"./chunk-S6J4BHB3-C4KwSfr_.js";import"./chunk-LBM3YZW2-BRBe7ZaP.js";import"./chunk-76Q3JFCE-BAZ3z-Fu.js";import"./chunk-T53DSG4Q-Bhd043Cg.js";import"./chunk-LHMN2FUI-C4onQD9F.js";import"./chunk-FWNWRKHM-DzIkWreD.js";import{t as G}from"./chunk-4BX2VUAB-KawmK-5L.js";import{t as V}from"./mermaid-parser.core-BLHYb13y.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},b={axes:[],curves:[],options:h},g=structuredClone(b),_=P.radar,j=o(()=>y({..._,...w().radar}),"getConfig"),C=o(()=>g.axes,"getAxes"),W=o(()=>g.curves,"getCurves"),H=o(()=>g.options,"getOptions"),N=o(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),U=o(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=o(a=>{if(a[0].axis==null)return a.map(e=>e.value);let t=C();if(t.length===0)throw Error("Axes must be populated before curves for reference entries");return t.map(e=>{let r=a.find(i=>{var n;return((n=i.axis)==null?void 0:n.$refText)===e.name});if(r===void 0)throw Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),x={getAxes:C,getCurves:W,getOptions:H,setAxes:N,setCurves:U,setOptions:o(a=>{var e,r,i,n,l;let t=a.reduce((s,c)=>(s[c.name]=c,s),{});g.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??h.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??h.ticks,max:((i=t.max)==null?void 0:i.value)??h.max,min:((n=t.min)==null?void 0:n.value)??h.min,graticule:((l=t.graticule)==null?void 0:l.value)??h.graticule}},"setOptions"),getConfig:j,clear:o(()=>{F(),g=structuredClone(b)},"clear"),setAccTitle:O,getAccTitle:R,setDiagramTitle:z,getDiagramTitle:S,getAccDescription:E,setAccDescription:D},q=o(a=>{G(a,x);let{axes:t,curves:e,options:r}=a;x.setAxes(t),x.setCurves(e),x.setOptions(r)},"populate"),J={parse:o(async a=>{let t=await V("radar",a);k.debug(t),q(t)},"parse")},K=o((a,t,e,r)=>{let i=r.db,n=i.getAxes(),l=i.getCurves(),s=i.getOptions(),c=i.getConfig(),p=i.getDiagramTitle(),d=Q(B(t),c),m=s.max??Math.max(...l.map($=>Math.max(...$.entries))),u=s.min,f=Math.min(c.width,c.height)/2;X(d,n,f,s.ticks,s.graticule),Y(d,n,f,c),M(d,n,l,u,m,s.graticule,c),A(d,l,s.showLegend,c),d.append("text").attr("class","radarTitle").text(p).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),Q=o((a,t)=>{let e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={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(${i.x}, ${i.y})`)},"drawFrame"),X=o((a,t,e,r,i)=>{if(i==="circle")for(let n=0;n<r;n++){let l=e*(n+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(i==="polygon"){let n=t.length;for(let l=0;l<r;l++){let s=e*(l+1)/r,c=t.map((p,d)=>{let m=2*d*Math.PI/n-Math.PI/2;return`${s*Math.cos(m)},${s*Math.sin(m)}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),Y=o((a,t,e,r)=>{let i=t.length;for(let n=0;n<i;n++){let l=t[n].label,s=2*n*Math.PI/i-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(s)).attr("y2",e*r.axisScaleFactor*Math.sin(s)).attr("class","radarAxisLine"),a.append("text").text(l).attr("x",e*r.axisLabelFactor*Math.cos(s)).attr("y",e*r.axisLabelFactor*Math.sin(s)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,i,n,l){let s=t.length,c=Math.min(l.width,l.height)/2;e.forEach((p,d)=>{if(p.entries.length!==s)return;let m=p.entries.map((u,f)=>{let $=2*Math.PI*f/s-Math.PI/2,v=L(u,r,i,c);return{x:v*Math.cos($),y:v*Math.sin($)}});n==="circle"?a.append("path").attr("d",T(m,l.curveTension)).attr("class",`radarCurve-${d}`):n==="polygon"&&a.append("polygon").attr("points",m.map(u=>`${u.x},${u.y}`).join(" ")).attr("class",`radarCurve-${d}`)})}o(M,"drawCurves");function L(a,t,e,r){return r*(Math.min(Math.max(a,t),e)-t)/(e-t)}o(L,"relativeRadius");function T(a,t){let e=a.length,r=`M${a[0].x},${a[0].y}`;for(let i=0;i<e;i++){let n=a[(i-1+e)%e],l=a[i],s=a[(i+1)%e],c=a[(i+2)%e],p={x:l.x+(s.x-n.x)*t,y:l.y+(s.y-n.y)*t},d={x:s.x-(c.x-l.x)*t,y:s.y-(c.y-l.y)*t};r+=` C${p.x},${p.y} ${d.x},${d.y} ${s.x},${s.y}`}return`${r} Z`}o(T,"closedRoundCurve");function A(a,t,e,r){if(!e)return;let i=(r.width/2+r.marginRight)*3/4,n=-(r.height/2+r.marginTop)*3/4;t.forEach((l,s)=>{let c=a.append("g").attr("transform",`translate(${i}, ${n+s*20})`);c.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${s}`),c.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(l.label)})}o(A,"drawLegend");var tt={draw:K},et=o((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){let i=a[`cScale${r}`];e+=`
.radarCurve-${r} {
color: ${i};
fill: ${i};
fill-opacity: ${t.curveOpacity};
stroke: ${i};
stroke-width: ${t.curveStrokeWidth};
}
.radarLegendBox-${r} {
fill: ${i};
fill-opacity: ${t.curveOpacity};
stroke: ${i};
}
`}return e},"genIndexStyles"),at=o(a=>{let t=y(I(),w().themeVariables);return{themeVariables:t,radarOptions:y(t.radar,a)}},"buildRadarStyleOptions"),rt={parser:J,db:x,renderer:tt,styles:o(({radar:a}={})=>{let{themeVariables:t,radarOptions:e}=at(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;
}
${et(t,e)}
`},"styles")};export{rt as diagram};
var g;import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import{i as u}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as f,r as y}from"./src-CsZby044.js";import{B as C,C as v,U as P,_ as z,a as S,c as E,d as F,v as T,y as W,z as D}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as A}from"./chunk-EXTU4WIE-Dmu97ZvI.js";import"./dist-C1VXabOr.js";import"./chunk-O7ZBX7Z2-CFqB9i7k.js";import"./chunk-S6J4BHB3-C4KwSfr_.js";import"./chunk-LBM3YZW2-BRBe7ZaP.js";import"./chunk-76Q3JFCE-BAZ3z-Fu.js";import"./chunk-T53DSG4Q-Bhd043Cg.js";import"./chunk-LHMN2FUI-C4onQD9F.js";import"./chunk-FWNWRKHM-DzIkWreD.js";import{t as R}from"./chunk-4BX2VUAB-KawmK-5L.js";import{t as Y}from"./mermaid-parser.core-BLHYb13y.js";var _=F.packet,w=(g=class{constructor(){this.packet=[],this.setAccTitle=C,this.getAccTitle=T,this.setDiagramTitle=P,this.getDiagramTitle=v,this.getAccDescription=z,this.setAccDescription=D}getConfig(){let t=u({..._,...W().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){S(),this.packet=[]}},f(g,"PacketDB"),g),H=1e4,L=f((e,t)=>{R(e,t);let i=-1,a=[],l=1,{bitsPerRow:n}=t.getConfig();for(let{start:r,end:s,bits:c,label:d}of e.blocks){if(r!==void 0&&s!==void 0&&s<r)throw Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??(r=i+1),r!==i+1)throw Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${i+1}.`);if(c===0)throw Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??(s=r+(c??1)-1),c??(c=s-r+1),i=s,y.debug(`Packet block ${r} - ${i} with label ${d}`);a.length<=n+1&&t.getPacket().length<H;){let[p,o]=M({start:r,end:s,bits:c,label:d},l,n);if(a.push(p),p.end+1===l*n&&(t.pushWord(a),a=[],l++),!o)break;({start:r,end:s,bits:c,label:d}=o)}}t.pushWord(a)},"populate"),M=f((e,t,i)=>{if(e.start===void 0)throw Error("start should have been set during first phase");if(e.end===void 0)throw Error("end should have been set during first phase");if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*i)return[e,void 0];let a=t*i-1,l=t*i;return[{start:e.start,end:a,label:e.label,bits:a-e.start},{start:l,end:e.end,label:e.label,bits:e.end-l}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:f(async e=>{var a;let t=await Y("packet",e),i=(a=x.parser)==null?void 0:a.yy;if(!(i instanceof w))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");y.debug(t),L(t,i)},"parse")},j=f((e,t,i,a)=>{let l=a.db,n=l.getConfig(),{rowHeight:r,paddingY:s,bitWidth:c,bitsPerRow:d}=n,p=l.getPacket(),o=l.getDiagramTitle(),b=r+s,h=b*(p.length+1)-(o?0:r),k=c*d+2,m=A(t);m.attr("viewbox",`0 0 ${k} ${h}`),E(m,h,k,n.useMaxWidth);for(let[$,B]of p.entries())I(m,B,$,n);m.append("text").text(o).attr("x",k/2).attr("y",h-b/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=f((e,t,i,{rowHeight:a,paddingX:l,paddingY:n,bitWidth:r,bitsPerRow:s,showBits:c})=>{let d=e.append("g"),p=i*(a+n)+n;for(let o of t){let b=o.start%s*r+1,h=(o.end-o.start+1)*r-l;if(d.append("rect").attr("x",b).attr("y",p).attr("width",h).attr("height",a).attr("class","packetBlock"),d.append("text").attr("x",b+h/2).attr("y",p+a/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!c)continue;let k=o.end===o.start,m=p-2;d.append("text").attr("x",b+(k?h/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||d.append("text").attr("x",b+h).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),N={draw:j},U={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},X={parser:x,get db(){return new w},renderer:N,styles:f(({packet:e}={})=>{let t=u(U,e);return`
.packetByte {
font-size: ${t.byteFontSize};
}
.packetByte.start {
fill: ${t.startByteColor};
}
.packetByte.end {
fill: ${t.endByteColor};
}
.packetLabel {
fill: ${t.labelColor};
font-size: ${t.labelFontSize};
}
.packetTitle {
fill: ${t.titleColor};
font-size: ${t.titleFontSize};
}
.packetBlock {
stroke: ${t.blockStrokeColor};
stroke-width: ${t.blockStrokeWidth};
fill: ${t.blockFillColor};
}
`},"styles")};export{X as diagram};
import{s as b}from"./chunk-LvLJmgfZ.js";import{t as E}from"./react-Bj1aDYRI.js";import{t as F}from"./compiler-runtime-B3qBwwSJ.js";import{t as H}from"./jsx-runtime-ZmTK25f3.js";import{t as m}from"./cn-BKtXLv3a.js";import{t as O}from"./x-ZP5cObgf.js";import{s as P,u as T}from"./Combination-BAEdC-rz.js";import{_ as q,d as A,f as B,g as v,h as j,m as w,p as k,v as z,y as G}from"./alert-dialog-BW4srmS0.js";var n=F(),u=b(E(),1),i=b(H(),1),I=q,J=G,y=P(({className:o,children:s,...a})=>(0,i.jsx)(v,{...a,children:(0,i.jsx)(T,{children:(0,i.jsx)("div",{className:m("fixed inset-0 z-50 flex items-start justify-center sm:items-start sm:top-[15%]",o),children:s})})}));y.displayName=v.displayName;var h=u.forwardRef((o,s)=>{let a=(0,n.c)(9),e,t;a[0]===o?(e=a[1],t=a[2]):({className:e,...t}=o,a[0]=o,a[1]=e,a[2]=t);let r;a[3]===e?r=a[4]:(r=m("fixed inset-0 z-50 bg-background/80 backdrop-blur-xs transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",e),a[3]=e,a[4]=r);let l;return a[5]!==t||a[6]!==s||a[7]!==r?(l=(0,i.jsx)(j,{ref:s,className:r,...t}),a[5]=t,a[6]=s,a[7]=r,a[8]=l):l=a[8],l});h.displayName=j.displayName;var R=u.forwardRef((o,s)=>{let a=(0,n.c)(17),e,t,r,l;a[0]===o?(e=a[1],t=a[2],r=a[3],l=a[4]):({className:t,children:e,usePortal:l,...r}=o,a[0]=o,a[1]=e,a[2]=t,a[3]=r,a[4]=l);let N=l===void 0?!0:l,g=A(),d;a[5]===t?d=a[6]:(d=m("fixed z-50 grid w-full gap-4 rounded-b-lg border bg-background p-6 shadow-sm animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-2xl sm:mx-4 sm:rounded-lg sm:zoom-in-90 sm:data-[state=open]:slide-in-from-bottom-0",t),a[5]=t,a[6]=d);let c;a[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,i.jsxs)(B,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,i.jsx)(O,{className:"h-4 w-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]}),a[7]=c):c=a[7];let f;a[8]!==e||a[9]!==r||a[10]!==s||a[11]!==g||a[12]!==d?(f=(0,i.jsxs)(k,{ref:s,className:d,...g,...r,children:[e,c]}),a[8]=e,a[9]=r,a[10]=s,a[11]=g,a[12]=d,a[13]=f):f=a[13];let p=f,x;return a[14]!==p||a[15]!==N?(x=N?(0,i.jsxs)(y,{children:[(0,i.jsx)(h,{}),p]}):p,a[14]=p,a[15]=N,a[16]=x):x=a[16],x});R.displayName=k.displayName;var _=o=>{let s=(0,n.c)(8),a,e;s[0]===o?(a=s[1],e=s[2]):({className:a,...e}=o,s[0]=o,s[1]=a,s[2]=e);let t;s[3]===a?t=s[4]:(t=m("flex flex-col space-y-1.5 text-center sm:text-left",a),s[3]=a,s[4]=t);let r;return s[5]!==e||s[6]!==t?(r=(0,i.jsx)("div",{className:t,...e}),s[5]=e,s[6]=t,s[7]=r):r=s[7],r};_.displayName="DialogHeader";var D=o=>{let s=(0,n.c)(8),a,e;s[0]===o?(a=s[1],e=s[2]):({className:a,...e}=o,s[0]=o,s[1]=a,s[2]=e);let t;s[3]===a?t=s[4]:(t=m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),s[3]=a,s[4]=t);let r;return s[5]!==e||s[6]!==t?(r=(0,i.jsx)("div",{className:t,...e}),s[5]=e,s[6]=t,s[7]=r):r=s[7],r};D.displayName="DialogFooter";var C=u.forwardRef((o,s)=>{let a=(0,n.c)(9),e,t;a[0]===o?(e=a[1],t=a[2]):({className:e,...t}=o,a[0]=o,a[1]=e,a[2]=t);let r;a[3]===e?r=a[4]:(r=m("text-lg font-semibold leading-none tracking-tight",e),a[3]=e,a[4]=r);let l;return a[5]!==t||a[6]!==s||a[7]!==r?(l=(0,i.jsx)(z,{ref:s,className:r,...t}),a[5]=t,a[6]=s,a[7]=r,a[8]=l):l=a[8],l});C.displayName=z.displayName;var S=u.forwardRef((o,s)=>{let a=(0,n.c)(9),e,t;a[0]===o?(e=a[1],t=a[2]):({className:e,...t}=o,a[0]=o,a[1]=e,a[2]=t);let r;a[3]===e?r=a[4]:(r=m("text-sm text-muted-foreground",e),a[3]=e,a[4]=r);let l;return a[5]!==t||a[6]!==s||a[7]!==r?(l=(0,i.jsx)(w,{ref:s,className:r,...t}),a[5]=t,a[6]=s,a[7]=r,a[8]=l):l=a[8],l});S.displayName=w.displayName;export{_ as a,C as c,D as i,J as l,R as n,h as o,S as r,y as s,I as t};
import{t as f}from"./diff-oor_HZ51.js";export{f as diff};
var n={"+":"inserted","-":"deleted","@":"meta"};const s={name:"diff",token:function(e){var r=e.string.search(/[\t ]+?$/);if(!e.sol()||r===0)return e.skipToEnd(),("error "+(n[e.string.charAt(0)]||"")).replace(/ $/,"");var o=n[e.peek()]||e.skipToEnd();return r===-1?e.skipToEnd():e.pos=r,o}};export{s as t};
import"./dist-DBwNzi3C.js";import{n as p,t as a}from"./dist-tLOz534J.js";export{a as cpp,p as cppLanguage};
import"./dist-DBwNzi3C.js";import{n as r,t}from"./dist-BZWmfQbq.js";export{t as rust,r as rustLanguage};

Sorry, the diff of this file is too big to display

import"./dist-DBwNzi3C.js";import{n as a,t as o}from"./dist-B62Xo7-b.js";export{o as java,a as javaLanguage};
import{D as e,J as O,N as s,T as X,g as $,q as l,r as Y,s as S,u as o,x as t,y as Z}from"./dist-DBwNzi3C.js";var n=l({null:O.null,instanceof:O.operatorKeyword,this:O.self,"new super assert open to with void":O.keyword,"class interface extends implements enum var":O.definitionKeyword,"module package import":O.moduleKeyword,"switch while for if else case default do break continue return try catch finally throw":O.controlKeyword,"requires exports opens uses provides public private protected static transitive abstract final strictfp synchronized native transient volatile throws":O.modifier,IntegerLiteral:O.integer,FloatingPointLiteral:O.float,"StringLiteral TextBlock":O.string,CharacterLiteral:O.character,LineComment:O.lineComment,BlockComment:O.blockComment,BooleanLiteral:O.bool,PrimitiveType:O.standard(O.typeName),TypeName:O.typeName,Identifier:O.variableName,"MethodName/Identifier":O.function(O.variableName),Definition:O.definition(O.variableName),ArithOp:O.arithmeticOperator,LogicOp:O.logicOperator,BitOp:O.bitwiseOperator,CompareOp:O.compareOperator,AssignOp:O.definitionOperator,UpdateOp:O.updateOperator,Asterisk:O.punctuation,Label:O.labelName,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace,".":O.derefOperator,", ;":O.separator}),_={__proto__:null,true:34,false:34,null:42,void:46,byte:48,short:48,int:48,long:48,char:48,float:48,double:48,boolean:48,extends:62,super:64,class:76,this:78,new:84,public:100,protected:102,private:104,abstract:106,static:108,final:110,strictfp:112,default:114,synchronized:116,native:118,transient:120,volatile:122,throws:150,implements:160,interface:166,enum:176,instanceof:238,open:267,module:269,requires:274,transitive:276,exports:278,to:280,opens:282,uses:284,provides:286,with:288,package:292,import:296,if:308,else:310,while:314,for:318,var:325,assert:332,switch:336,case:342,do:346,break:350,continue:354,return:358,throw:364,try:368,catch:372,finally:380},d=Y.deserialize({version:14,states:"##jQ]QPOOQ$wQPOOO(bQQO'#H^O*iQQO'#CbOOQO'#Cb'#CbO*pQPO'#CaO*xOSO'#CpOOQO'#Hc'#HcOOQO'#Cu'#CuO,eQPO'#D_O-OQQO'#HmOOQO'#Hm'#HmO/gQQO'#HhO/nQQO'#HhOOQO'#Hh'#HhOOQO'#Hg'#HgO1rQPO'#DUO2PQPO'#GnO4wQPO'#D_O5OQPO'#DzO*pQPO'#E[O5qQPO'#E[OOQO'#DV'#DVO7SQQO'#HaO9^QQO'#EeO9eQPO'#EdO9jQPO'#EfOOQO'#Hb'#HbO7jQQO'#HbO:pQQO'#FhO:wQPO'#ExO:|QPO'#E}O:|QPO'#FPOOQO'#Ha'#HaOOQO'#HY'#HYOOQO'#Gh'#GhOOQO'#HX'#HXO<^QPO'#FiOOQO'#HW'#HWOOQO'#Gg'#GgQ]QPOOOOQO'#Hs'#HsO<cQPO'#HsO<hQPO'#D{O<hQPO'#EVO<hQPO'#EQO<pQPO'#HpO=RQQO'#EfO*pQPO'#C`O=ZQPO'#C`O*pQPO'#FcO=`QPO'#FeO=kQPO'#FkO=kQPO'#FnO<hQPO'#FsO=pQPO'#FpO:|QPO'#FwO=kQPO'#FyO]QPO'#GOO=uQPO'#GQO>QQPO'#GSO>]QPO'#GUO=kQPO'#GWO:|QPO'#GXO>dQPO'#GZO?QQQO'#HiO?mQQO'#CuO?tQPO'#HxO@SQPO'#D_O@rQPO'#DpO?wQPO'#DqO@|QPO'#HxOA_QPO'#DpOAgQPO'#IROAlQPO'#E`OOQO'#Hr'#HrOOQO'#Gm'#GmQ$wQPOOOAtQPO'#HsOOQO'#H^'#H^OCsQQO,58{OOQO'#H['#H[OOOO'#Gi'#GiOEfOSO,59[OOQO,59[,59[OOQO'#Hi'#HiOFVQPO,59eOGXQPO,59yOOQO-E:f-E:fO*pQPO,58zOG{QPO,58zO*pQPO,5;}OHQQPO'#DQOHVQPO'#DQOOQO'#Gk'#GkOIVQQO,59jOOQO'#Dm'#DmOJqQPO'#HuOJ{QPO'#DlOKZQPO'#HtOKcQPO,5<_OKhQPO,59^OLRQPO'#CxOOQO,59c,59cOLYQPO,59bOLeQQO'#H^ONgQQO'#CbO!!iQPO'#D_O!#nQQO'#HmO!$OQQO,59pO!$VQPO'#DvO!$eQPO'#H|O!$mQPO,5:`O!$rQPO,5:`O!%YQPO,5;nO!%eQPO'#ITO!%pQPO,5;eO!%uQPO,5=YOOQO-E:l-E:lOOQO,5:f,5:fO!']QPO,5:fO!'dQPO,5:vO?tQPO,5<_O*pQPO,5:vO<hQPO,5:gO<hQPO,5:qO<hQPO,5:lO<hQPO,5<_O!'zQPO,59qO:|QPO,5:}O!(RQPO,5;QO:|QPO,59TO!(aQPO'#DXOOQO,5;O,5;OOOQO'#El'#ElOOQO'#Eo'#EoO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;fOOQO,5;i,5;iOOQO,5<S,5<SO!(hQPO,5;bO!(yQPO,5;dO!(hQPO'#CyO!)QQQO'#HmO!)`QQO,5;kO]QPO,5<TOOQO-E:e-E:eOOQO,5>_,5>_O!*sQPO,5:gO!+RQPO,5:qO!+ZQPO,5:lO!+fQPO,5>[O!$VQPO,5>[O!'iQPO,59UO!+qQQO,58zO!+yQQO,5;}O!,RQQO,5<PO*pQPO,5<PO:|QPO'#DUO]QPO,5<VO]QPO,5<YO!,ZQPO'#FrO]QPO,5<[O]QPO,5<aO!,kQQO,5<cO!,uQPO,5<eO!,zQPO,5<jOOQO'#Fj'#FjOOQO,5<l,5<lO!-PQPO,5<lOOQO,5<n,5<nO!-UQPO,5<nO!-ZQQO,5<pOOQO,5<p,5<pO>gQPO,5<rO!-bQQO,5<sO!-iQPO'#GdO!.oQPO,5<uO>gQPO,5<}O!2mQPO,59jO!2zQPO'#HuO!3RQPO,59xO!3WQPO,5>dO?tQPO,59xO!3cQPO,5:[OAlQPO,5:zO!3kQPO'#DrO?wQPO'#DrO!3vQPO'#HyO!4OQPO,5:]O?tQPO,5>dO!(hQPO,5>dOAgQPO,5>mOOQO,5:[,5:[O!$rQPO'#DtOOQO,5>m,5>mO!4TQPO'#EaOOQO,5:z,5:zO!7UQPO,5:zO!(hQPO'#DxOOQO-E:k-E:kOOQO,5:y,5:yO*pQPO,58}O!7ZQPO'#ChOOQO1G.k1G.kOOOO-E:g-E:gOOQO1G.v1G.vO!+qQQO1G.fO*pQPO1G.fO!7eQQO1G1iOOQO,59l,59lO!7mQPO,59lOOQO-E:i-E:iO!7rQPO,5>aO!8ZQPO,5:WO<hQPO'#GpO!8bQPO,5>`OOQO1G1y1G1yOOQO1G.x1G.xO!8{QPO'#CyO!9kQPO'#HmO!9uQPO'#CzO!:TQPO'#HlO!:]QPO,59dOOQO1G.|1G.|OLYQPO1G.|O!:sQPO,59eO!;QQQO'#H^O!;cQQO'#CbOOQO,5:b,5:bO<hQPO,5:cOOQO,5:a,5:aO!;tQQO,5:aOOQO1G/[1G/[O!;yQPO,5:bO!<[QPO'#GsO!<oQPO,5>hOOQO1G/z1G/zO!<wQPO'#DvO!=YQPO1G/zO!(hQPO'#GqO!=_QPO1G1YO:|QPO1G1YO<hQPO'#GyO!=gQPO,5>oOOQO1G1P1G1POOQO1G0Q1G0QO!=oQPO'#E]OOQO1G0b1G0bO!>`QPO1G1yO!'dQPO1G0bO!*sQPO1G0RO!+RQPO1G0]O!+ZQPO1G0WOOQO1G/]1G/]O!>eQQO1G.pO9eQPO1G0jO*pQPO1G0jO<pQPO'#HpO!@[QQO1G.pOOQO1G.p1G.pO!@aQQO1G0iOOQO1G0l1G0lO!@hQPO1G0lO!@sQQO1G.oO!AZQQO'#HqO!AhQPO,59sO!BzQQO1G0pO!DfQQO1G0pO!DmQQO1G0pO!FUQQO1G0pO!F]QQO1G0pO!GbQQO1G0pO!I]QQO1G0pO!IdQQO1G0pO!IkQQO1G0pO!IuQQO1G1QO!I|QQO'#HmOOQO1G0|1G0|O!KSQQO1G1OOOQO1G1O1G1OOOQO1G1o1G1oO!KjQPO'#D[O!(hQPO'#D|O!(hQPO'#D}OOQO1G0R1G0RO!KqQPO1G0RO!KvQPO1G0RO!LOQPO1G0RO!LZQPO'#EXOOQO1G0]1G0]O!LnQPO1G0]O!LsQPO'#ETO!(hQPO'#ESOOQO1G0W1G0WO!MmQPO1G0WO!MrQPO1G0WO!MzQPO'#EhO!NRQPO'#EhOOQO'#Gx'#GxO!NZQQO1G0mO# }QQO1G3vO9eQPO1G3vO#$PQPO'#FXOOQO1G.f1G.fOOQO1G1i1G1iO#$WQPO1G1kOOQO1G1k1G1kO#$cQQO1G1kO#$kQPO1G1qOOQO1G1t1G1tO+QQPO'#D_O-OQQO,5<bO#(cQPO,5<bO#(tQPO,5<^O#({QPO,5<^OOQO1G1v1G1vOOQO1G1{1G1{OOQO1G1}1G1}O:|QPO1G1}O#,oQPO'#F{OOQO1G2P1G2PO=kQPO1G2UOOQO1G2W1G2WOOQO1G2Y1G2YOOQO1G2[1G2[OOQO1G2^1G2^OOQO1G2_1G2_O#,vQQO'#H^O#-aQQO'#CbO-OQQO'#HmO#-zQQOOO#.hQQO'#EeO#.VQQO'#HbO!$VQPO'#GeO#.oQPO,5=OOOQO'#HQ'#HQO#.wQPO1G2aO#2uQPO'#G]O>gQPO'#GaOOQO1G2a1G2aO#2zQPO1G2iO#6xQPO,5>gOOQO1G/d1G/dOOQO1G4O1G4OO#7ZQPO1G/dOOQO1G/v1G/vOOQO1G0f1G0fO!7UQPO1G0fOOQO,5:^,5:^O!(hQPO'#DsO#7`QPO,5:^O?wQPO'#GrO#7kQPO,5>eOOQO1G/w1G/wOAgQPO'#H{O#7sQPO1G4OO?tQPO1G4OOOQO1G4X1G4XO!#YQPO'#DvO!!iQPO'#D_OOQO,5:{,5:{O#8OQPO,5:{O#8OQPO,5:{O#8VQQO'#HaO#9hQQO'#HbO#9rQQO'#EbO#9}QPO'#EbO#:VQPO'#IOOOQO,5:d,5:dOOQO1G.i1G.iO#:bQQO'#EeO#:rQQO'#H`O#;SQPO'#FTOOQO'#H`'#H`O#;^QPO'#H`O#;{QPO'#IWO#<TQPO,59SOOQO7+$Q7+$QO!+qQQO7+$QOOQO7+'T7+'TOOQO1G/W1G/WO#<YQPO'#DoO#<dQQO'#HvOOQO'#Hv'#HvOOQO1G/r1G/rOOQO,5=[,5=[OOQO-E:n-E:nO#<tQWO,58{O#<{QPO,59fOOQO,59f,59fO!(hQPO'#HoOKmQPO'#GjO#=ZQPO,5>WOOQO1G/O1G/OOOQO7+$h7+$hOOQO1G/{1G/{O#=cQQO1G/{OOQO1G/}1G/}O#=hQPO1G/{OOQO1G/|1G/|O<hQPO1G/}OOQO,5=_,5=_OOQO-E:q-E:qOOQO7+%f7+%fOOQO,5=],5=]OOQO-E:o-E:oO:|QPO7+&tOOQO7+&t7+&tOOQO,5=e,5=eOOQO-E:w-E:wO#=mQPO'#EUO#={QPO'#EUOOQO'#Gw'#GwO#>dQPO,5:wOOQO,5:w,5:wOOQO7+'e7+'eOOQO7+%|7+%|OOQO7+%m7+%mO!KqQPO7+%mO!KvQPO7+%mO!LOQPO7+%mOOQO7+%w7+%wO!LnQPO7+%wOOQO7+%r7+%rO!MmQPO7+%rO!MrQPO7+%rOOQO7+&U7+&UOOQO'#Ee'#EeO9eQPO7+&UO9eQPO,5>[O#?TQPO7+$[OOQO7+&T7+&TOOQO7+&W7+&WO:|QPO'#GlO#?cQPO,5>]OOQO1G/_1G/_O:|QPO7+&lO#?nQQO,59eO#@tQPO,59vOOQO,59v,59vOOQO,5:h,5:hOOQO'#EP'#EPOOQO,5:i,5:iO#@{QPO'#EYO<hQPO'#EYO#A^QPO'#IPO#AiQPO,5:sO?tQPO'#HxO!(hQPO'#HxO#AqQPO'#DpOOQO'#Gu'#GuO#AxQPO,5:oOOQO,5:o,5:oOOQO,5:n,5:nOOQO,5;S,5;SO#BrQQO,5;SO#ByQPO,5;SOOQO-E:v-E:vOOQO7+&X7+&XOOQO7+)b7+)bO#CQQQO7+)bOOQO'#G|'#G|O#DqQPO,5;sOOQO,5;s,5;sO#DxQPO'#FYO*pQPO'#FYO*pQPO'#FYO*pQPO'#FYO#EWQPO7+'VO#E]QPO7+'VOOQO7+'V7+'VO]QPO7+']O#EhQPO1G1|O?tQPO1G1|O#EvQQO1G1xO!(aQPO1G1xO#E}QPO1G1xO#FUQQO7+'iOOQO'#HP'#HPO#F]QPO,5<gOOQO,5<g,5<gO#FdQPO'#HsO:|QPO'#F|O#FlQPO7+'pO#FqQPO,5=PO?tQPO,5=PO#FvQPO1G2jO#HPQPO1G2jOOQO1G2j1G2jOOQO-E;O-E;OOOQO7+'{7+'{O!<[QPO'#G_O>gQPO,5<wOOQO,5<{,5<{O#HXQPO7+(TOOQO7+(T7+(TO#LVQPO1G4ROOQO7+%O7+%OOOQO7+&Q7+&QO#LhQPO,5:_OOQO1G/x1G/xOOQO,5=^,5=^OOQO-E:p-E:pOOQO7+)j7+)jO#LsQPO7+)jO!:bQPO,5:aOOQO1G0g1G0gO#MOQPO1G0gO#MVQPO,59qO#MkQPO,5:|O9eQPO,5:|O!(hQPO'#GtO#MpQPO,5>jO#M{QPO,59TO#NSQPO'#IVO#N[QPO,5;oO*pQPO'#G{O#NaQPO,5>rOOQO1G.n1G.nOOQO<<Gl<<GlO#NiQPO'#HwO#NqQPO,5:ZOOQO1G/Q1G/QOOQO,5>Z,5>ZOOQO,5=U,5=UOOQO-E:h-E:hO#NvQPO7+%gOOQO7+%g7+%gOOQO7+%i7+%iOOQO<<J`<<J`O$ ^QPO'#H^O$ eQPO'#CbO$ lQPO,5:pO$ qQPO,5:xO#=mQPO,5:pOOQO-E:u-E:uOOQO1G0c1G0cOOQO<<IX<<IXO!KqQPO<<IXO!KvQPO<<IXOOQO<<Ic<<IcOOQO<<I^<<I^O!MmQPO<<I^OOQO<<Ip<<IpO$ vQQO<<GvO9eQPO<<IpO*pQPO<<IpOOQO<<Gv<<GvO$#mQQO,5=WOOQO-E:j-E:jO$#zQQO<<JWOOQO1G/b1G/bOOQO,5:t,5:tO$$bQPO,5:tO$$pQPO,5:tO$%RQPO'#GvO$%iQPO,5>kO$%tQPO'#EZOOQO1G0_1G0_O$%{QPO1G0_O?tQPO,5:pOOQO-E:s-E:sOOQO1G0Z1G0ZOOQO1G0n1G0nO$&QQQO1G0nOOQO<<L|<<L|OOQO-E:z-E:zOOQO1G1_1G1_O$&XQQO,5;tOOQO'#G}'#G}O#DxQPO,5;tOOQO'#IX'#IXO$&aQQO,5;tO$&rQQO,5;tOOQO<<Jq<<JqO$&zQPO<<JqOOQO<<Jw<<JwO:|QPO7+'hO$'PQPO7+'hO!(aQPO7+'dO$'_QPO7+'dO$'dQQO7+'dOOQO<<KT<<KTOOQO-E:}-E:}OOQO1G2R1G2ROOQO,5<h,5<hO$'kQQO,5<hOOQO<<K[<<K[O:|QPO1G2kO$'rQPO1G2kOOQO,5=n,5=nOOQO7+(U7+(UO$'wQPO7+(UOOQO-E;Q-E;QO$)fQWO'#HhO$)QQWO'#HhO$)mQPO'#G`O<hQPO,5<yO!$VQPO,5<yOOQO1G2c1G2cOOQO<<Ko<<KoO$*OQPO1G/yOOQO<<MU<<MUOOQO7+&R7+&RO$*ZQPO1G0jO$*fQQO1G0hOOQO1G0h1G0hO$*nQPO1G0hOOQO,5=`,5=`OOQO-E:r-E:rO$*sQQO1G.oOOQO1G1[1G1[O$*}QPO'#GzO$+[QPO,5>qOOQO1G1Z1G1ZO$+dQPO'#FUOOQO,5=g,5=gOOQO-E:y-E:yO$+iQPO'#GoO$+vQPO,5>cOOQO1G/u1G/uOOQO<<IR<<IROOQO1G0[1G0[O$,OQPO1G0dO$,TQPO1G0[O$,YQPO1G0dOOQOAN>sAN>sO!KqQPOAN>sOOQOAN>xAN>xOOQOAN?[AN?[O9eQPOAN?[OOQO1G0`1G0`O$,_QPO1G0`OOQO,5=b,5=bOOQO-E:t-E:tO$,mQPO,5:uOOQO7+%y7+%yOOQO7+&Y7+&YOOQO1G1`1G1`O$,tQQO1G1`OOQO-E:{-E:{O$,|QQO'#IYO$,wQPO1G1`O$&gQPO1G1`O*pQPO1G1`OOQOAN@]AN@]O$-XQQO<<KSO:|QPO<<KSO$-`QPO<<KOOOQO<<KO<<KOO!(aQPO<<KOOOQO1G2S1G2SO$-eQQO7+(VO:|QPO7+(VOOQO<<Kp<<KpP!-iQPO'#HSO!$VQPO'#HRO$-oQPO,5<zO$-zQPO1G2eO<hQPO1G2eO9eQPO7+&SO$.PQPO7+&SOOQO7+&S7+&SOOQO,5=f,5=fOOQO-E:x-E:xO#M{QPO,5;pOOQO,5=Z,5=ZOOQO-E:m-E:mO$.UQPO7+&OOOQO7+%v7+%vO$.dQPO7+&OOOQOG24_G24_OOQOG24vG24vOOQO7+%z7+%zOOQO7+&z7+&zO*pQPO'#HOO$.iQPO,5>tO$.qQPO7+&zO$.vQQO'#IZOOQOAN@nAN@nO$/RQQOAN@nOOQOAN@jAN@jO$/YQPOAN@jO$/_QQO<<KqO$/iQPO,5=mOOQO-E;P-E;POOQO7+(P7+(PO$/zQPO7+(PO$0PQPO<<InOOQO<<In<<InO$0UQPO<<IjOOQO<<Ij<<IjO#M{QPO<<IjO$0UQPO<<IjO$0dQQO,5=jOOQO-E:|-E:|OOQO<<Jf<<JfO$0oQPO,5>uOOQOG26YG26YOOQOG26UG26UOOQO<<Kk<<KkOOQOAN?YAN?YOOQOAN?UAN?UO#M{QPOAN?UO$0wQPOAN?UO$0|QPOAN?UO$1[QPOG24pOOQOG24pG24pO#M{QPOG24pOOQOLD*[LD*[O$1aQPOLD*[OOQO!$'Mv!$'MvO*pQPO'#CaO$1fQQO'#H^O$1yQQO'#CbO!(hQPO'#Cy",stateData:"$2i~OPOSQOS%yOS~OZ`O_VO`VOaVObVOcVOeVOg^Oh^Op!POv{OwkOz!OO}cO!PvO!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO![!`O!]yO!^yO!_yO!u}O!z|O#fpO#roO#tpO#upO#y!RO#z!QO$W!SO$Y!TO$`!UO$c!VO$e!XO$h!WO$l!YO$n!ZO$s![O$u!]O$w!^O$y!_O$|!aO%O!bO%}TO&PRO&RQO&XUO&tdO~Og^Oh^Ov{O}cO!P!mO!SyO!TyO!UyO!VyO!W!pO!XyO!YyO!ZzO!]yO!^yO!_yO!u}O!z|O%}TO&P!cO&R!dO&_!hO&tdO~OWiXW&QXZ&QXuiXu&QX!P&QX!b&QX#]&QX#_&QX#a&QX#b&QX#d&QX#e&QX#f&QX#g&QX#h&QX#i&QX#k&QX#o&QX#r&QX%}iX&PiX&RiX&^&QX&_iX&_&QX&n&QX&viX&v&QX&x!aX~O#p$^X~P&bOWUXW&]XZUXuUXu&]X!PUX!bUX#]UX#_UX#aUX#bUX#dUX#eUX#fUX#gUX#hUX#iUX#kUX#oUX#rUX%}&]X&P&]X&R&]X&^UX&_UX&_&]X&nUX&vUX&v&]X&x!aX~O#p$^X~P(iO&PSO&R!qO~O&W!vO&Y!tO~Og^Oh^O!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO!]yO!^yO!_yO%}TO&P!wO&RWOg!RXh!RX$h!RX&P!RX&R!RX~O#y!|O#z!{O$W!}Ov!RX!u!RX!z!RX&t!RX~P+QOW#XOu#OO%}TO&P#SO&R#SO&v&aX~OW#[Ou&[X%}&[X&P&[X&R&[X&v&[XY&[Xw&[X&n&[X&q&[XZ&[Xq&[X&^&[X!P&[X#_&[X#a&[X#b&[X#d&[X#e&[X#f&[X#g&[X#h&[X#i&[X#k&[X#o&[X#r&[X}&[X!r&[X#p&[Xs&[X|&[X~O&_#YO~P-dO&_&[X~P-dOZ`O_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO!]yO!^yO!_yO#fpO#roO#tpO#upO%}TO&XUO~O&P#^O&R#]OY&pP~P/uO%}TOg%bXh%bXv%bX!S%bX!T%bX!U%bX!V%bX!W%bX!X%bX!Y%bX!Z%bX!]%bX!^%bX!_%bX!u%bX!z%bX$h%bX&P%bX&R%bX&t%bX&_%bX~O!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO!]yO!^yO!_yOg!RXh!RXv!RX!u!RX!z!RX&P!RX&R!RX&t!RX&_!RX~O$h!RX~P3gO|#kO~P]Og^Oh^Ov#pO!u#rO!z#qO&P!wO&RWO&t#oO~O$h#sO~P5VOu#uO&v#vO!P&TX#_&TX#a&TX#b&TX#d&TX#e&TX#f&TX#g&TX#h&TX#i&TX#k&TX#o&TX#r&TX&^&TX&_&TX&n&TX~OW#tOY&TX#p&TXs&TXq&TX|&TX~P5xO!b#wO#]#wOW&UXu&UX!P&UX#_&UX#a&UX#b&UX#d&UX#e&UX#f&UX#g&UX#h&UX#i&UX#k&UX#o&UX#r&UX&^&UX&_&UX&n&UX&v&UXY&UX#p&UXs&UXq&UX|&UX~OZ#XX~P7jOZ#xO~O&v#vO~O#_#|O#a#}O#b$OO#d$QO#e$RO#f$SO#g$TO#h$UO#i$UO#k$YO#o$VO#r$WO&^#zO&_#zO&n#{O~O!P$XO~P9oO&x$ZO~OZ`O_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO#fpO#roO#tpO#upO%}TO&P0qO&R0pO&XUO~O#p$_O~O![$aO~O&P#SO&R#SO~Og^Oh^O&P!wO&RWO&_#YO~OW$gO&v#vO~O#z!{O~O!W$kO&PSO&R!qO~OZ$lO~OZ$oO~O!P$vO&P$uO&R$uO~O!P$xO&P$uO&R$uO~O!P${O~P:|OZ%OO}cO~OW&]Xu&]X%}&]X&P&]X&R&]X&_&]X~OZ!aX~P>lOWiXuiX%}iX&PiX&RiX&_iX~OZ!aX~P?XOu#OO%}TO&P#SO&R#SO~O%}TO~P3gOg^Oh^Ov#pO!u#rO!z#qO&_!hO&t#oO~O&P!cO&R!dO~P@ZOg^Oh^O%}TO&P!cO&R!dO~O}cO!P%aO~OZ%bO~O}%dO!m%gO~O}cOg&gXh&gXv&gX!S&gX!T&gX!U&gX!V&gX!W&gX!X&gX!Y&gX!Z&gX!]&gX!^&gX!_&gX!u&gX!z&gX%}&gX&P&gX&R&gX&_&gX&t&gX~OW%jOZ%kOgTahTa%}Ta&PTa&RTa~OvTa!STa!TTa!UTa!VTa!WTa!XTa!YTa!ZTa!]Ta!^Ta!_Ta!uTa!zTa#yTa#zTa$WTa$hTa&tTa&_TauTaYTaqTa|Ta!PTa~PC[O&W%nO&Y!tO~Ou#OO%}TOqma&^maYma&nma!Pma~O&vma}ma!rma~PEnO!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO!]yO!^yO!_yO~Og!Rah!Rav!Ra!u!Ra!z!Ra$h!Ra&P!Ra&R!Ra&t!Ra&_!Ra~PFdO#z%pO~Os%rO~Ou%sO%}TO~Ou#OO%}ra&Pra&Rra&vraYrawra&nra&qra!Pra&^raqra~OWra#_ra#ara#bra#dra#era#fra#gra#hra#ira#kra#ora#rra&_ra#prasra|ra~PH_Ou#OO%}TOq&iX!P&iX!b&iX~OY&iX#p&iX~PJ`O!b%vOq!`X!P!`XY!`X~Oq%wO!P&hX~O!P%yO~Ov%zO~Og^Oh^O%}0oO&P!wO&RWO&b%}O~O&^&`P~PKmO%}TO&P!wO&RWO~OW&QXYiXY!aXY&QXZ&QXq!aXu&QXwiX!b&QX#]&QX#_&QX#a&QX#b&QX#d&QX#e&QX#f&QX#g&QX#h&QX#i&QX#k&QX#o&QX#r&QX&^&QX&_&QX&niX&n&QX&qiX&viX&v&QX&x!aX~P?XOWUXYUXY!aXY&]XZUXq!aXuUXw&]X!bUX#]UX#_UX#aUX#bUX#dUX#eUX#fUX#gUX#hUX#iUX#kUX#oUX#rUX&^UX&_UX&nUX&n&]X&q&]X&vUX&v&]X&x!aX~P>lOg^Oh^O%}TO&P!wO&RWOg!RXh!RX&P!RX&R!RX~PFdOu#OOw&XO%}TO&P&UO&R&TO&q&WO~OW#XOY&aX&n&aX&v&aX~P!#YOY&ZO~P9oOg^Oh^O&P!wO&RWO~Oq&]OY&pX~OY&_O~Og^Oh^O%}TO&P!wO&RWOY&pP~PFdOY&dO&n&bO&v#vO~Oq&eO&x$ZOY&wX~OY&gO~O%}TOg%bah%bav%ba!S%ba!T%ba!U%ba!V%ba!W%ba!X%ba!Y%ba!Z%ba!]%ba!^%ba!_%ba!u%ba!z%ba$h%ba&P%ba&R%ba&t%ba&_%ba~O|&hO~P]O}&iO~Op&uOw&vO&PSO&R!qO&_#YO~Oz&tO~P!'iOz&xO&PSO&R!qO&_#YO~OY&eP~P:|Og^Oh^O%}TO&P!wO&RWO~O}cO~P:|OW#XOu#OO%}TO&v&aX~O#r$WO!P#sa#_#sa#a#sa#b#sa#d#sa#e#sa#f#sa#g#sa#h#sa#i#sa#k#sa#o#sa&^#sa&_#sa&n#saY#sa#p#sas#saq#sa|#sa~Oo'_O}'^O!r'`O&_!hO~O}'eO!r'`O~Oo'iO}'hO&_!hO~OZ#xOu'mO%}TO~OW%jO}'sO~OW%jO!P'uO~OW'vO!P'wO~O$h!WO&P0qO&R0pO!P&eP~P/uO!P(SO#p(TO~P9oO}(UO~O$c(WO~O!P(XO~O!P(YO~O!P(ZO~P9oO!P(]O~P9oOZ$lO_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO%}TO&P(_O&R(^O&XUO~PFdO%Q(hO%U(iOZ$}a_$}a`$}aa$}ab$}ac$}ae$}ag$}ah$}ap$}av$}aw$}az$}a}$}a!P$}a!S$}a!T$}a!U$}a!V$}a!W$}a!X$}a!Y$}a!Z$}a![$}a!]$}a!^$}a!_$}a!u$}a!z$}a#f$}a#r$}a#t$}a#u$}a#y$}a#z$}a$W$}a$Y$}a$`$}a$c$}a$e$}a$h$}a$l$}a$n$}a$s$}a$u$}a$w$}a$y$}a$|$}a%O$}a%w$}a%}$}a&P$}a&R$}a&X$}a&t$}a|$}a$a$}a$q$}a~O}ra!rra'Ora~PH_OZ%bO~PJ`O!P(mO~O!m%gO}&la!P&la~O}cO!P(pO~Oo(tOq!fX&^!fX~Oq(vO&^&mX~O&^(xO~OZ`O_VO`VOaVObVOcVOeVOg^Oh^Op)UOv{Ow)TOz!OO|)PO}cO!PvO![!`O!u}O!z|O#fpO#roO#tpO#upO#y!RO#z!QO$W!SO$Y!TO$`!UO$c!VO$e!XO$h!WO$l!YO$n!ZO$s![O$u!]O$w!^O$y!_O$|!aO%O!bO%}TO&PRO&RQO&XUO&_#YO&tdO~PFdO}%dO~O})]OY&zP~P:|OW%jO!P)dO~Os)eO~Ou#OO%}TOq&ia!P&ia!b&iaY&ia#p&ia~O})fO~P:|Oq%wO!P&ha~Og^Oh^O%}0oO&P!wO&RWO~O&b)mO~P!8jOu#OO%}TOq&aX&^&aXY&aX&n&aX!P&aX~O}&aX!r&aX~P!9SOo)oOp)oOqnX&^nX~Oq)pO&^&`X~O&^)rO~Ou#OOw)tO%}TO&PSO&R!qO~OYma&nma&vma~P!:bOW&QXY!aXq!aXu!aX%}!aX~OWUXY!aXq!aXu!aX%}!aX~OW)wO~Ou#OO%}TO&P#SO&R#SO&q)yO~Og^Oh^O%}TO&P!wO&RWO~PFdOq&]OY&pa~Ou#OO%}TO&P#SO&R#SO&q&WO~OY)|O~OY*PO&n&bO~Oq&eOY&wa~Og^Oh^Ov{O|*XO!u}O%}TO&P!wO&RWO&tdO~PFdO!P*YO~OW^iZ#XXu^i!P^i!b^i#]^i#_^i#a^i#b^i#d^i#e^i#f^i#g^i#h^i#i^i#k^i#o^i#r^i&^^i&_^i&n^i&v^iY^i#p^is^iq^i|^i~OW*iO~Os*jO~P9oOz*kO&PSO&R!qO~O!P]iY]i#p]is]iq]i|]i~P9oOq*lOY&eX!P&eX~P9oOY*nO~O#f$SO#g$TO#k$YO#r$WO!P#^i#_#^i#a#^i#b#^i#d#^i#e#^i#o#^i&^#^i&_#^i&n#^iY#^i#p#^is#^iq#^i|#^i~O#h$UO#i$UO~P!AmO#_#|O#d$QO#e$RO#f$SO#g$TO#h$UO#i$UO#k$YO#r$WO&^#zO&_#zO&n#{O!P#^i#b#^i#o#^iY#^i#p#^is#^iq#^i|#^i~O#a#^i~P!CUO#a#}O~P!CUO#_#|O#f$SO#g$TO#h$UO#i$UO#k$YO#r$WO&^#zO&_#zO!P#^i#a#^i#b#^i#d#^i#e#^i#o#^iY#^i#p#^is#^iq#^i|#^i~O&n#^i~P!DtO&n#{O~P!DtO#f$SO#g$TO#k$YO#r$WO!P#^i#a#^i#b#^i#e#^i#o#^iY#^i#p#^is#^iq#^i|#^i~O#_#|O#d$QO#h$UO#i$UO&^#zO&_#zO&n#{O~P!FdO#k$YO#r$WO!P#^i#_#^i#a#^i#b#^i#d#^i#e#^i#f#^i#h#^i#i#^i#o#^i&^#^i&_#^i&n#^iY#^i#p#^is#^iq#^i|#^i~O#g$TO~P!G{O#g#^i~P!G{O#h#^i#i#^i~P!AmO#p*oO~P9oO#_&aX#a&aX#b&aX#d&aX#e&aX#f&aX#g&aX#h&aX#i&aX#k&aX#o&aX#r&aX&_&aX#p&aXs&aX|&aX~P!9SO!P#liY#li#p#lis#liq#li|#li~P9oO|*rO~P$wO}'^O~O}'^O!r'`O~Oo'_O}'^O!r'`O~O%}TO&P#SO&R#SO|&sP!P&sP~PFdO}'eO~Og^Oh^Ov{O|+PO!P*}O!u}O!z|O%}TO&P!wO&RWO&_!hO&tdO~PFdO}'hO~Oo'iO}'hO~Os+RO~P:|Ou+TO%}TO~Ou'mO})fO%}TOW#Zi!P#Zi#_#Zi#a#Zi#b#Zi#d#Zi#e#Zi#f#Zi#g#Zi#h#Zi#i#Zi#k#Zi#o#Zi#r#Zi&^#Zi&_#Zi&n#Zi&v#ZiY#Zi#p#Zis#Ziq#Zi|#Zi~O}'^OW&diu&di!P&di#_&di#a&di#b&di#d&di#e&di#f&di#g&di#h&di#i&di#k&di#o&di#r&di&^&di&_&di&n&di&v&diY&di#p&dis&diq&di|&di~O#}+]O$P+^O$R+^O$S+_O$T+`O~O|+[O~P##nO$Z+aO&PSO&R!qO~OW+bO!P+cO~O$a+dOZ$_i_$_i`$_ia$_ib$_ic$_ie$_ig$_ih$_ip$_iv$_iw$_iz$_i}$_i!P$_i!S$_i!T$_i!U$_i!V$_i!W$_i!X$_i!Y$_i!Z$_i![$_i!]$_i!^$_i!_$_i!u$_i!z$_i#f$_i#r$_i#t$_i#u$_i#y$_i#z$_i$W$_i$Y$_i$`$_i$c$_i$e$_i$h$_i$l$_i$n$_i$s$_i$u$_i$w$_i$y$_i$|$_i%O$_i%w$_i%}$_i&P$_i&R$_i&X$_i&t$_i|$_i$q$_i~Og^Oh^O$h#sO&P!wO&RWO~O!P+hO~P:|O!P+iO~OZ`O_VO`VOaVObVOcVOeVOg^Oh^Op!POv{OwkOz!OO}cO!PvO!SyO!TyO!UyO!VyO!WyO!XyO!YyO!Z+nO![!`O!]yO!^yO!_yO!u}O!z|O#fpO#roO#tpO#upO#y!RO#z!QO$W!SO$Y!TO$`!UO$c!VO$e!XO$h!WO$l!YO$n!ZO$q+oO$s![O$u!]O$w!^O$y!_O$|!aO%O!bO%}TO&PRO&RQO&XUO&tdO~O|+mO~P#)QOW&QXY&QXZ&QXu&QX!P&QX&viX&v&QX~P?XOWUXYUXZUXuUX!PUX&vUX&v&]X~P>lOW#tOu#uO&v#vO~OW&UXY%XXu&UX!P%XX&v&UX~OZ#XX~P#.VOY+uO!P+sO~O%Q(hO%U(iOZ$}i_$}i`$}ia$}ib$}ic$}ie$}ig$}ih$}ip$}iv$}iw$}iz$}i}$}i!P$}i!S$}i!T$}i!U$}i!V$}i!W$}i!X$}i!Y$}i!Z$}i![$}i!]$}i!^$}i!_$}i!u$}i!z$}i#f$}i#r$}i#t$}i#u$}i#y$}i#z$}i$W$}i$Y$}i$`$}i$c$}i$e$}i$h$}i$l$}i$n$}i$s$}i$u$}i$w$}i$y$}i$|$}i%O$}i%w$}i%}$}i&P$}i&R$}i&X$}i&t$}i|$}i$a$}i$q$}i~OZ+xO~O%Q(hO%U(iOZ%Vi_%Vi`%Via%Vib%Vic%Vie%Vig%Vih%Vip%Viv%Viw%Viz%Vi}%Vi!P%Vi!S%Vi!T%Vi!U%Vi!V%Vi!W%Vi!X%Vi!Y%Vi!Z%Vi![%Vi!]%Vi!^%Vi!_%Vi!u%Vi!z%Vi#f%Vi#r%Vi#t%Vi#u%Vi#y%Vi#z%Vi$W%Vi$Y%Vi$`%Vi$c%Vi$e%Vi$h%Vi$l%Vi$n%Vi$s%Vi$u%Vi$w%Vi$y%Vi$|%Vi%O%Vi%w%Vi%}%Vi&P%Vi&R%Vi&X%Vi&t%Vi|%Vi$a%Vi$q%Vi~Ou#OO%}TO}&oa!P&oa!m&oa~O!P,OO~Oo(tOq!fa&^!fa~Oq(vO&^&ma~O!m%gO}&li!P&li~O|,XO~P]OW,ZO~P5xOW&UXu&UX#_&UX#a&UX#b&UX#d&UX#e&UX#f&UX#g&UX#h&UX#i&UX#k&UX#o&UX#r&UX&^&UX&_&UX&n&UX&v&UX~OZ#xO!P&UX~P#8^OW$gOZ#xO&v#vO~Op,]Ow,]O~Oq,^O}&rX!P&rX~O!b,`O#]#wOY&UXZ#XX~P#8^OY&SXq&SX|&SX!P&SX~P9oO})]O|&yP~P:|OY&SXg%[Xh%[X%}%[X&P%[X&R%[Xq&SX|&SX!P&SX~Oq,cOY&zX~OY,eO~O})fO|&kP~P:|Oq&jX!P&jX|&jXY&jX~P9oO&bTa~PC[Oo)oOp)oOqna&^na~Oq)pO&^&`a~OW,mO~Ow,nO~Ou#OO%}TO&P,rO&R,qO~Og^Oh^Ov#pO!u#rO&P!wO&RWO&t#oO~Og^Oh^Ov{O|,wO!u}O%}TO&P!wO&RWO&tdO~PFdOw-SO&PSO&R!qO&_#YO~Oq*lOY&ea!P&ea~O#_ma#ama#bma#dma#ema#fma#gma#hma#ima#kma#oma#rma&_ma#pmasma|ma~PEnO|-WO~P$wOZ#xO}'^Oq!|X|!|X!P!|X~Oq-[O|&sX!P&sX~O|-_O!P-^O~O&_!hO~P5VOg^Oh^Ov{O|-cO!P*}O!u}O!z|O%}TO&P!wO&RWO&_!hO&tdO~PFdOs-dO~P9oOs-dO~P:|O}'^OW&dqu&dq!P&dq#_&dq#a&dq#b&dq#d&dq#e&dq#f&dq#g&dq#h&dq#i&dq#k&dq#o&dq#r&dq&^&dq&_&dq&n&dq&v&dqY&dq#p&dqs&dqq&dq|&dq~O|-hO~P##nO!W-lO$O-lO&PSO&R!qO~O!P-oO~O$Z-pO&PSO&R!qO~O!b%vO#p-rOq!`X!P!`X~O!P-tO~P9oO!P-tO~P:|O!P-wO~P9oO|-yO~P#)QO![$aO#p-zO~O!P-|O~O!b-}O~OY.QOZ$lO_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO%}TO&P(_O&R(^O&XUO~PFdOY.QO!P.RO~O%Q(hO%U(iOZ%Vq_%Vq`%Vqa%Vqb%Vqc%Vqe%Vqg%Vqh%Vqp%Vqv%Vqw%Vqz%Vq}%Vq!P%Vq!S%Vq!T%Vq!U%Vq!V%Vq!W%Vq!X%Vq!Y%Vq!Z%Vq![%Vq!]%Vq!^%Vq!_%Vq!u%Vq!z%Vq#f%Vq#r%Vq#t%Vq#u%Vq#y%Vq#z%Vq$W%Vq$Y%Vq$`%Vq$c%Vq$e%Vq$h%Vq$l%Vq$n%Vq$s%Vq$u%Vq$w%Vq$y%Vq$|%Vq%O%Vq%w%Vq%}%Vq&P%Vq&R%Vq&X%Vq&t%Vq|%Vq$a%Vq$q%Vq~Ou#OO%}TO}&oi!P&oi!m&oi~O&n&bOq!ga&^!ga~O!m%gO}&lq!P&lq~O|.^O~P]Op.`Ow&vOz&tO&PSO&R!qO&_#YO~O!P.aO~Oq,^O}&ra!P&ra~O})]O~P:|Oq.gO|&yX~O|.iO~Oq,cOY&za~Oq.mO|&kX~O|.oO~Ow.pO~Oq!aXu!aX!P!aX!b!aX%}!aX~OZ&QX~P#N{OZUX~P#N{O!P.qO~OZ.rO~OW^yZ#XXu^y!P^y!b^y#]^y#_^y#a^y#b^y#d^y#e^y#f^y#g^y#h^y#i^y#k^y#o^y#r^y&^^y&_^y&n^y&v^yY^y#p^ys^yq^y|^y~OY%`aq%`a!P%`a~P9oO!P#nyY#ny#p#nys#nyq#ny|#ny~P9oO}'^Oq!|a|!|a!P!|a~OZ#xO}'^Oq!|a|!|a!P!|a~O%}TO&P#SO&R#SOq%jX|%jX!P%jX~PFdOq-[O|&sa!P&sa~O|!}X~P$wO|/PO~Os/QO~P9oOW%jO!P/RO~OW%jO$Q/WO&PSO&R!qO!P&|P~OW%jO$U/XO~O!P/YO~O!b%vO#p/[Oq!`X!P!`X~OY/^O~O!P/_O~P9oO#p/`O~P9oO!b/bO~OY/cOZ$lO_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO%}TO&P(_O&R(^O&XUO~PFdOW#[Ou&[X%}&[X&P&[X&R&[X'O&[X~O&_#YO~P$)QOu#OO%}TO'O/eO&P%SX&R%SX~O&n&bOq!gi&^!gi~Op/iO&PSO&R!qO~OW*iOZ#xO~O!P/kO~OY&SXq&SX~P9oO})]Oq%nX|%nX~P:|Oq.gO|&ya~O!b/nO~O})fOq%cX|%cX~P:|Oq.mO|&ka~OY/qO~O!P/rO~OZ/sO~O}'^Oq!|i|!|i!P!|i~O|!}a~P$wOW%jO!P/wO~OW%jOq/xO!P&|X~OY/|O~P9oOY0OO~OY%Xq!P%Xq~P9oO'O/eO&P%Sa&R%Sa~OY0TO~O!P0WO~Ou#OO!P0YO!Z0ZO%}TO~OY0[O~Oq/xO!P&|a~O!P0_O~OW%jOq/xO!P&}X~OY0aO~P9oOY0bO~OY%Xy!P%Xy~P9oOu#OO%}TO&P%ua&R%ua'O%ua~OY0cO~O!P0dO~Ou#OO!P0eO!Z0fO%}TO~OW%jOq%ra!P%ra~Oq/xO!P&}a~O!P0jO~Ou#OO!P0jO!Z0kO%}TO~O!P0lO~O!P0nO~O#p&QXY&QXs&QXq&QX|&QX~P&bO#pUXYUXsUXqUX|UX~P(iO`Q_P#g%y&P&Xc&X~",goto:"#+S'OPPPP'P'd*x.OP'dPP.d.h0PPPPPP1nP3ZPP4v7l:[<z=d?[PPP?bPA{PPPBu3ZPDqPPElPFcFkPPPPPPPPPPPPGvH_PKjKrLOLjLpLvNiNmNmNuP! U!!^!#R!#]P!#r!!^P!#x!$S!!y!$cP!%S!%^!%d!!^!%g!%mFcFc!%q!%{!&O3Z!'m3Z3Z!)iP.hP!)mPP!*_PPPPPP.hP.h!+O.hPP.hP.hPP.h!,g!,qPP!,w!-QPPPPPPPP'PP'PPP!-U!-U!-i!-UPP!-UP!-UP!.S!.VP!-U!.m!-UP!-UP!.p!.sP!-UP!-UP!-UP!-UP!-U!-UP!-UP!.wP!.}!/Q!/WP!-U!/d!/gP!/o!0R!4T!4Z!4a!5g!5m!5{!7R!7X!7_!7i!7o!7u!7{!8R!8X!8_!8e!8k!8q!8w!8}!9T!9_!9e!9o!9uPPP!9{!-U!:pP!>WP!?[P!Ap!BW!E]3ZPPP!F|!Jm!MaPP#!P#!SP#$`#$f#&V#&f#&n#'p#(Y#)T#)^#)a#)oP#)r#*OP#*V#*^P#*aP#*lP#*o#*r#*u#*y#+PstOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y'urOPXY`acopx!Y![!_!a!e!f!h!i!o!x#P#T#Y#[#_#`#e#i#l#n#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$]$_$e$l$m$n$o$p$q%O%S%V%Z%^%_%b%d%g%k%u%v%{%|&R&S&[&]&`&b&d&i'X'^'_'`'e'h'i'm'n'p'{'|(O(T(U(`(l(t(v({(})O)Q)R)])f)o)p*P*T*W*l*o*p*q*z*{+O+T+d+f+h+i+l+o+r+s+x+},W,Y,^,`,u-[-^-a-r-t-}.R.V.g.m/O/[/_/b/d/n/q0R0X0Z0[0f0h0k0r#xhO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0kt!sT!Q!S!T!{!}$k%p+]+^+_+`-k-m/W/X/x0oQ#mdS&Y#`(}Q&l#oU&q#t$g,ZQ&x#vW(b%O+s.R/dU)Y%j'v+bQ)Z%kS)u&S,WU*f&s-R._Q*k&yQ,t*TQ-P*iQ.j,cR.t,uu!sT!Q!S!T!{!}$k%p+]+^+_+`-k-m/W/X/x0oT%l!r)l#{qO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0k#zlO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0kX(c%O+s.R/d$TVO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0k$TkO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0k&O[OPX`ceopx!O!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$f$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i&t'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s,Y,^,`-^-r-t-}.R.g.m/O/[/_/b/d/n0Z0f0k0rQ&Q#[Q)s&RV.T+x.X/e&O[OPX`ceopx!O!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$f$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i&t'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s,Y,^,`-^-r-t-}.R.g.m/O/[/_/b/d/n0Z0f0k0rV.T+x.X/e&O]OPX`ceopx!O!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$f$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i&t'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s,Y,^,`-^-r-t-}.R.g.m/O/[/_/b/d/n0Z0f0k0rV.U+x.X/eS#Z[.TS$f!O&tS&s#t$gQ&y#vQ)V%dQ-R*iR._,Z$kZO`copx!Y![!_!a#Y#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$_$l$m$n$o$p$q%O%d%g%k%v&b&d'_'`'i'm(O(T(U(t)Q)R)])f)o)p*P*l*o+T+d+h+i+l+o+s,Y,^,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kQ&O#YR,k)p&P_OPX`ceopx!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s+x,Y,^,`-^-r-t-}.R.X.g.m/O/[/_/b/d/e/n0Z0f0k0r!o#QY!e!x#R#T#`#n$]%R%S%V%^%u%|&S&[&`'X'|(`(l({(}*T*p*z+f+r+},W,u-a.V/q0R0X0[0h$SkO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kQ$m!UQ$n!VQ$s!ZQ$|!`R+p(WQ#yiS'q$e*hQ*e&rQ+X'rS,[)T)UQ-O*gQ-Y*vQ.b,]Q.x-QQ.{-ZQ/j.`Q/u.yR0V/iQ'a$bW*[&m'b'c'dQ+W'qU,x*]*^*_Q-X*vQ-f+XS.u,y,zS.z-Y-ZQ/t.vR/v.{]!mP!o'^*q-^/OreOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!gP!o'^*q-^/OW#b`#e%b&]Q'}$oW(d%O+s.R/dS*U&i*WS*w'e-[S*|'h+OR.X+xh#VY!W!e#n#s%V'|*T*z+f,u-aQ)j%wQ)v&WR,o)y#xnOcopx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0k^!kP!g!o'^*q-^/Ov#TY!W#`#n#s%w&W&[&`'|(`(})y*T+f+r,u.W/hQ#g`Q$b{Q$c|Q$d}W%S!e%V*z-aS%Y!h(vQ%`!iQ&m#pQ&n#qQ&o#rQ(u%ZS(y%^({Q*R&eS*v'e-[R-Z*wU)h%v)f.mR+V'p[!mP!o'^*q-^/OT*}'h+O^!iP!g!o'^*q-^/OQ'd$bQ'l$dQ*_&mQ*d&oV*{'h*|+OQ%[!hR,S(vQ(s%YR,R(u#znO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0kQ%c!kS(l%S(yR(|%`T#e`%bU#c`#e%bR)z&]Q%f!lQ(n%UQ(r%XQ,U(zR.],VrvOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!mP!o'^*q-^/OQ%P!bQ%a!jQ%i!pQ'[$ZQ([$|Q(k%QQ(p%WQ+z(iR.Y+yrtOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!mP!o'^*q-^/OS*V&i*WT*}'h+OQ'c$bS*^&m'dR,z*_Q'b$bQ'g$cU*]&m'c'dQ*a&nS,y*^*_R.v,zQ*u'`R+Q'iQ'k$dS*c&o'lR,}*dQ'j$dU*b&o'k'lS,|*c*dR.w,}rtOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!mP!o'^*q-^/OT*}'h+OQ'f$cS*`&n'gR,{*aQ*x'eR.|-[R-`*yQ&j#mR*Z&lT*V&i*WQ%e!lS(q%X%fR,P(rR)R%dWk%O+s.R/d#{lO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0k$SiO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kU&r#t$g,ZS*g&s._Q-Q*iR.y-RT'o$e'p!_#|m#a$r$z$}&w&z&{'O'P'Q'R'S'W'Z)[)g+S+g+j-T-V-e-v-{.e/Z/a/}0Q!]$Pm#a$r$z$}&w&z&{'O'P'R'S'W'Z)[)g+S+g+j-T-V-e-v-{.e/Z/a/}0Q#{nO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0ka)^%k)],`.g/n0Z0f0kQ)`%kR.k,cQ't$hQ)b%oR,f)cT+Y's+ZsvOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,YruOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,YQ$w!]R$y!^R$p!XrvOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,YR(O$oR$q!XR(V$sT+k(U+lX(f%P(g(k+{R+y(hQ.W+xR/h.XQ(j%PQ+w(gQ+|(kR.Z+{R%Q!bQ(e%OV.P+s.R/dQxOQ#lcW$`x#l)Q,YQ)Q%dR,Y)RrXOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Yn!fP!o#e&]&i'^'e'h*W*q+O+x-[-^/Ol!zX!f#P#_#i$[%Z%_%{&R'n'{)O0r!j#PY!e!x#T#`#n$]%S%V%^%u%|&S&[&`'X'|(`(l({(}*T*p*z+f+r+},W,u-a.V/q0R0X0[0hQ#_`Q#ia#d$[op!Y!_!a#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$l%g%k%v&b&d'_'`'i'm(O(T(t)])f)o*P*l*o+T+h+i+o,^,`-r-t-}.g.m/[/_/b/n0Z0f0kS%Z!h(vS%_!i*{S%{#Y)pQ&R#[S'n$e'pY'{$o%O+s.R/dQ)O%bR0r$YQ!uUR%m!uQ)q&OR,l)q^#RY#`$]'X'|(`*px%R!e!x#n%V%^%|&S&[&`({(}*T*z+f+r,W,u-a.V0R[%t#R%R%u+}0X0hS%u#T%SQ+}(lQ0X/qR0h0[Q*m&{R-U*mQ!oPU%h!o*q/OQ*q'^R/O-^!pbOP`cx![!o#e#l$_$m$n$o$p$q%O%b%d&]&i'^'e'h(U)Q)R*W*q+O+d+l+s+x,Y-[-^.R/O/dY!yX!f#_'{)OT#jb!yQ.n,gR/p.nQ%x#VR)k%xQ&c#fS*O&c.[R.[,QQ(w%[R,T(wQ&^#cR){&^Q,_)WR.d,_Q+O'hR-b+OQ-]*xR.}-]Q*W&iR,v*WQ'p$eR+U'pQ&f#gR*S&fQ.h,aR/m.hQ,d)`R.l,dQ+Z'sR-g+ZQ-k+]R/T-kQ/y/US0^/y0`R0`/{Q+l(UR-x+lQ(g%PS+v(g+{R+{(kQ/f.VR0S/fQ+t(eR.S+t`wOcx#l%d)Q)R,YQ$t![Q']$_Q'y$mQ'z$nQ(Q$pQ(R$qS+k(U+lR-q+d'dsOPXY`acopx!Y![!_!a!e!f!h!i!o!x#P#T#Y#[#_#`#e#i#l#n#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$]$_$e$l$m$n$o$p$q%O%S%V%Z%^%_%b%d%g%u%v%{%|&R&S&[&]&`&b&d&i'X'^'_'`'e'h'i'm'n'p'{'|(O(T(U(`(l(t(v({(})O)Q)R)f)o)p*P*T*W*l*o*p*q*z*{+O+T+d+f+h+i+l+o+r+s+x+},W,Y,^,u-[-^-a-r-t-}.R.V.m/O/[/_/b/d/q0R0X0[0h0ra)_%k)],`.g/n0Z0f0kQ!rTQ$h!QQ$i!SQ$j!TQ%o!{Q%q!}Q'x$kQ)c%pQ)l0oS-i+]+_Q-m+^Q-n+`Q/S-kS/U-m/WQ/{/XR0]/x%uSOT`cdopx!Q!S!T!Y![!_!a!{!}#`#l#o#t#u#v#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$g$k$l$m$n$o$p$q%O%d%j%k%p%v&S&d&s&y'm'v(O(T(U(})Q)R)])f*P*T*i*l*o+T+]+^+_+`+b+d+h+i+l+o+s,W,Y,Z,`,c,u-R-k-m-r-t-}.R._.g.m/W/X/[/_/b/d/n/x0Z0f0k0oQ)a%kQ,a)]S.f,`/nQ/l.gQ0g0ZQ0i0fR0m0krmOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,YS#a`$lQ$WoQ$^pQ$r!YQ$z!_Q$}!aQ&w#uQ&z#wY&{#x$o+h-t/_Q&}#|Q'O#}Q'P$OQ'Q$PQ'R$QQ'S$RQ'T$SQ'U$TQ'V$UQ'W$VQ'Z$Z^)[%k)].g/n0Z0f0kU)g%v)f.mQ*Q&dQ+S'mQ+g(OQ+j(TQ,p*PQ-T*lQ-V*oQ-e+TQ-v+iQ-{+oQ.e,`Q/Z-rQ/a-}Q/}/[R0Q/b#xgO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0kW(a%O+s.R/dR)S%drYOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!eP!o'^*q-^/OW!xX$[%{'{Q#``Q#ne#S$]op!Y!_!a#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$l%k%v&d'm(O(T)])f*P*l*o+T+h+i+o,`-r-t-}.g.m/[/_/b/n0Z0f0kQ%V!gS%^!i*{d%|#Y%g&b'_'`'i(t)o)p,^Q&S#_Q&[#bS&`#e&]Q'X$YQ'|$oW(`%O+s.R/dQ({%_Q(}%bS*T&i*WQ*p0rS*z'h+OQ+f'}Q+r(dQ,W)OQ,u*UQ-a*|S.V+x.XR0R/e&O_OPX`ceopx!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s+x,Y,^,`-^-r-t-}.R.X.g.m/O/[/_/b/d/e/n0Z0f0k0rQ$e!OQ'r$fR*h&t&ZWOPX`ceopx!O!Y![!_!a!g!i!o#Y#[#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$f$l$m$n$o$p$q%O%_%b%d%g%k%v%{&R&]&b&d&i&t'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s+x,Y,^,`-^-r-t-}.R.X.g.m/O/[/_/b/d/e/n0Z0f0k0rR&P#Y$QjOcopx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kQ#f`Q&O#YQ'Y$YU)W%g'`'iQ)}&bQ*s'_Q,Q(tQ,j)oQ,k)pR.c,^Q)n%}R,i)m$SfO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kT&p#t,ZQ&|#xQ(P$oQ-u+hQ/]-tR0P/_]!nP!o'^*q-^/O#PaOPX`bcx![!f!o!y#_#e#l$_$m$n$o$p$q%O%b%d&]&i'^'e'h'{(U)O)Q)R*W*q+O+d+l+s+x,Y-[-^.R/O/dU#WY!W'|Q%T!eU&k#n#s+fQ(o%VS,s*T*zT.s,u-aj#UY!W!e#n#s%V%w&W)y*T*z,u-aU&V#`&`(}Q)x&[Q+e'|Q+q(`Q-s+fQ.O+rQ/g.WR0U/hQ)i%vQ,g)fR/o.mR,h)f`!jP!o'^'h*q+O-^/OT%W!g*|R%]!hW%U!e%V*z-aQ(z%^R,V({S#d`%bR&a#eQ)X%gT*t'`'iR*y'e[!lP!o'^*q-^/OR%X!gR#h`R,b)]R)a%kT-j+]-kQ/V-mR/z/WR/z/X",nodeNames:"\u26A0 LineComment BlockComment Program ModuleDeclaration MarkerAnnotation Identifier ScopedIdentifier . Annotation ) ( AnnotationArgumentList AssignmentExpression FieldAccess IntegerLiteral FloatingPointLiteral BooleanLiteral CharacterLiteral StringLiteral TextBlock null ClassLiteral void PrimitiveType TypeName ScopedTypeName GenericType TypeArguments AnnotatedType Wildcard extends super , ArrayType ] Dimension [ class this ParenthesizedExpression ObjectCreationExpression new ArgumentList } { ClassBody ; FieldDeclaration Modifiers public protected private abstract static final strictfp default synchronized native transient volatile VariableDeclarator Definition AssignOp ArrayInitializer MethodDeclaration TypeParameters TypeParameter TypeBound FormalParameters ReceiverParameter FormalParameter SpreadParameter Throws throws Block ClassDeclaration Superclass SuperInterfaces implements InterfaceTypeList InterfaceDeclaration interface ExtendsInterfaces InterfaceBody ConstantDeclaration EnumDeclaration enum EnumBody EnumConstant EnumBodyDeclarations AnnotationTypeDeclaration AnnotationTypeBody AnnotationTypeElementDeclaration StaticInitializer ConstructorDeclaration ConstructorBody ExplicitConstructorInvocation ArrayAccess MethodInvocation MethodName MethodReference ArrayCreationExpression Dimension AssignOp BinaryExpression CompareOp CompareOp LogicOp LogicOp BitOp BitOp BitOp ArithOp ArithOp ArithOp BitOp InstanceofExpression instanceof LambdaExpression InferredParameters TernaryExpression LogicOp : UpdateExpression UpdateOp UnaryExpression LogicOp BitOp CastExpression ElementValueArrayInitializer ElementValuePair open module ModuleBody ModuleDirective requires transitive exports to opens uses provides with PackageDeclaration package ImportDeclaration import Asterisk ExpressionStatement LabeledStatement Label IfStatement if else WhileStatement while ForStatement for ForSpec LocalVariableDeclaration var EnhancedForStatement ForSpec AssertStatement assert SwitchStatement switch SwitchBlock SwitchLabel case DoStatement do BreakStatement break ContinueStatement continue ReturnStatement return SynchronizedStatement ThrowStatement throw TryStatement try CatchClause catch CatchFormalParameter CatchType FinallyClause finally TryWithResourcesStatement ResourceSpecification Resource ClassContent",maxTerm:276,nodeProps:[["isolate",-4,1,2,18,19,""],["group",-26,4,47,76,77,82,87,92,145,147,150,151,153,156,158,161,163,165,167,172,174,176,178,180,181,183,191,"Statement",-25,6,13,14,15,16,17,18,19,20,21,22,39,40,41,99,100,102,103,106,118,120,122,125,127,130,"Expression",-7,23,24,25,26,27,29,34,"Type"],["openedBy",10,"(",44,"{"],["closedBy",11,")",45,"}"]],propSources:[n],skippedNodes:[0,1,2],repeatNodeCount:28,tokenData:"#'f_R!_OX%QXY'fYZ)bZ^'f^p%Qpq'fqr*|rs,^st%Qtu4euv5zvw7[wx8rxyAZyzAwz{Be{|CZ|}Dq}!OE_!O!PFx!P!Q! r!Q!R!,h!R![!0`![!]!>p!]!^!@Q!^!_!@n!_!`!BX!`!a!B{!a!b!Di!b!c!EX!c!}!LT!}#O!Mj#O#P%Q#P#Q!NW#Q#R!Nt#R#S4e#S#T%Q#T#o4e#o#p# h#p#q#!U#q#r##n#r#s#$[#s#y%Q#y#z'f#z$f%Q$f$g'f$g#BY4e#BY#BZ#$x#BZ$IS4e$IS$I_#$x$I_$I|4e$I|$JO#$x$JO$JT4e$JT$JU#$x$JU$KV4e$KV$KW#$x$KW&FU4e&FU&FV#$x&FV;'S4e;'S;=`5t<%lO4eS%VV&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QS%qO&YSS%tVOY&ZYZ%lZr&Zrs&ys;'S&Z;'S;=`'`<%lO&ZS&^VOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QS&vP;=`<%l%QS&|UOY&ZYZ%lZr&Zs;'S&Z;'S;=`'`<%lO&ZS'cP;=`<%l&Z_'mk&YS%yZOX%QXY'fYZ)bZ^'f^p%Qpq'fqr%Qrs%qs#y%Q#y#z'f#z$f%Q$f$g'f$g#BY%Q#BY#BZ'f#BZ$IS%Q$IS$I_'f$I_$I|%Q$I|$JO'f$JO$JT%Q$JT$JU'f$JU$KV%Q$KV$KW'f$KW&FU%Q&FU&FV'f&FV;'S%Q;'S;=`&s<%lO%Q_)iY&YS%yZX^*Xpq*X#y#z*X$f$g*X#BY#BZ*X$IS$I_*X$I|$JO*X$JT$JU*X$KV$KW*X&FU&FV*XZ*^Y%yZX^*Xpq*X#y#z*X$f$g*X#BY#BZ*X$IS$I_*X$I|$JO*X$JT$JU*X$KV$KW*X&FU&FV*XV+TX#tP&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`+p!`;'S%Q;'S;=`&s<%lO%QU+wV#_Q&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT,aXOY,|YZ%lZr,|rs3Ys#O,|#O#P2d#P;'S,|;'S;=`3S<%lO,|T-PXOY-lYZ%lZr-lrs.^s#O-l#O#P.x#P;'S-l;'S;=`2|<%lO-lT-qX&YSOY-lYZ%lZr-lrs.^s#O-l#O#P.x#P;'S-l;'S;=`2|<%lO-lT.cVcPOY&ZYZ%lZr&Zrs&ys;'S&Z;'S;=`'`<%lO&ZT.}V&YSOY-lYZ/dZr-lrs1]s;'S-l;'S;=`2|<%lO-lT/iW&YSOY0RZr0Rrs0ns#O0R#O#P0s#P;'S0R;'S;=`1V<%lO0RP0UWOY0RZr0Rrs0ns#O0R#O#P0s#P;'S0R;'S;=`1V<%lO0RP0sOcPP0vTOY0RYZ0RZ;'S0R;'S;=`1V<%lO0RP1YP;=`<%l0RT1`XOY,|YZ%lZr,|rs1{s#O,|#O#P2d#P;'S,|;'S;=`3S<%lO,|T2QUcPOY&ZYZ%lZr&Zs;'S&Z;'S;=`'`<%lO&ZT2gVOY-lYZ/dZr-lrs1]s;'S-l;'S;=`2|<%lO-lT3PP;=`<%l-lT3VP;=`<%l,|T3_VcPOY&ZYZ%lZr&Zrs3ts;'S&Z;'S;=`'`<%lO&ZT3yR&WSXY4SYZ4`pq4SP4VRXY4SYZ4`pq4SP4eO&XP_4lb&YS&PZOY%QYZ%lZr%Qrs%qst%Qtu4eu!Q%Q!Q![4e![!c%Q!c!}4e!}#R%Q#R#S4e#S#T%Q#T#o4e#o$g%Q$g;'S4e;'S;=`5t<%lO4e_5wP;=`<%l4eU6RX#hQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QU6uV#]Q&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QV7cZ&nR&YSOY%QYZ%lZr%Qrs%qsv%Qvw8Uw!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QU8]V#aQ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT8wZ&YSOY9jYZ%lZr9jrs:xsw9jwx%Qx#O9j#O#P<S#P;'S9j;'S;=`AT<%lO9jT9oX&YSOY%QYZ%lZr%Qrs%qsw%Qwx:[x;'S%Q;'S;=`&s<%lO%QT:cVbP&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT:{XOY&ZYZ%lZr&Zrs&ysw&Zwx;hx;'S&Z;'S;=`'`<%lO&ZT;mVbPOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT<XZ&YSOY<zYZ%lZr<zrs=rsw<zwx9jx#O<z#O#P9j#P;'S<z;'S;=`?^<%lO<zT=PZ&YSOY<zYZ%lZr<zrs=rsw<zwx:[x#O<z#O#P%Q#P;'S<z;'S;=`?^<%lO<zT=uZOY>hYZ%lZr>hrs?dsw>hwx;hx#O>h#O#P&Z#P;'S>h;'S;=`@}<%lO>hT>kZOY<zYZ%lZr<zrs=rsw<zwx:[x#O<z#O#P%Q#P;'S<z;'S;=`?^<%lO<zT?aP;=`<%l<zT?gZOY>hYZ%lZr>hrs@Ysw>hwx;hx#O>h#O#P&Z#P;'S>h;'S;=`@}<%lO>hP@]VOY@YZw@Ywx@rx#O@Y#P;'S@Y;'S;=`@w<%lO@YP@wObPP@zP;=`<%l@YTAQP;=`<%l>hTAWP;=`<%l9j_AbVZZ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QVBOVYR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QVBnX$ZP&YS#gQOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QVCbZ#fR&YSOY%QYZ%lZr%Qrs%qs{%Q{|DT|!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QVD[V#rR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QVDxVqR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QVEf[#fR&YSOY%QYZ%lZr%Qrs%qs}%Q}!ODT!O!_%Q!_!`6n!`!aF[!a;'S%Q;'S;=`&s<%lO%QVFcV&xR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_GPZWY&YSOY%QYZ%lZr%Qrs%qs!O%Q!O!PGr!P!Q%Q!Q![IQ![;'S%Q;'S;=`&s<%lO%QVGwX&YSOY%QYZ%lZr%Qrs%qs!O%Q!O!PHd!P;'S%Q;'S;=`&s<%lO%QVHkV&qR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QTIXc&YS`POY%QYZ%lZr%Qrs%qs!Q%Q!Q![IQ![!f%Q!f!gJd!g!hKQ!h!iJd!i#R%Q#R#SNz#S#W%Q#W#XJd#X#YKQ#Y#ZJd#Z;'S%Q;'S;=`&s<%lO%QTJkV&YS`POY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QTKV]&YSOY%QYZ%lZr%Qrs%qs{%Q{|LO|}%Q}!OLO!O!Q%Q!Q![Lp![;'S%Q;'S;=`&s<%lO%QTLTX&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![Lp![;'S%Q;'S;=`&s<%lO%QTLwc&YS`POY%QYZ%lZr%Qrs%qs!Q%Q!Q![Lp![!f%Q!f!gJd!g!h%Q!h!iJd!i#R%Q#R#SNS#S#W%Q#W#XJd#X#Y%Q#Y#ZJd#Z;'S%Q;'S;=`&s<%lO%QTNXZ&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![Lp![#R%Q#R#SNS#S;'S%Q;'S;=`&s<%lO%QT! PZ&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![IQ![#R%Q#R#SNz#S;'S%Q;'S;=`&s<%lO%Q_! y]&YS#gQOY%QYZ%lZr%Qrs%qsz%Qz{!!r{!P%Q!P!Q!)e!Q!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%Q_!!wX&YSOY!!rYZ!#dZr!!rrs!%Psz!!rz{!&_{;'S!!r;'S;=`!'s<%lO!!r_!#iT&YSOz!#xz{!$[{;'S!#x;'S;=`!$y<%lO!#xZ!#{TOz!#xz{!$[{;'S!#x;'S;=`!$y<%lO!#xZ!$_VOz!#xz{!$[{!P!#x!P!Q!$t!Q;'S!#x;'S;=`!$y<%lO!#xZ!$yOQZZ!$|P;=`<%l!#x_!%SXOY!%oYZ!#dZr!%ors!'ysz!%oz{!(i{;'S!%o;'S;=`!)_<%lO!%o_!%rXOY!!rYZ!#dZr!!rrs!%Psz!!rz{!&_{;'S!!r;'S;=`!'s<%lO!!r_!&dZ&YSOY!!rYZ!#dZr!!rrs!%Psz!!rz{!&_{!P!!r!P!Q!'V!Q;'S!!r;'S;=`!'s<%lO!!r_!'^V&YSQZOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_!'vP;=`<%l!!r_!'|XOY!%oYZ!#dZr!%ors!#xsz!%oz{!(i{;'S!%o;'S;=`!)_<%lO!%o_!(lZOY!!rYZ!#dZr!!rrs!%Psz!!rz{!&_{!P!!r!P!Q!'V!Q;'S!!r;'S;=`!'s<%lO!!r_!)bP;=`<%l!%o_!)lV&YSPZOY!)eYZ%lZr!)ers!*Rs;'S!)e;'S;=`!+X<%lO!)e_!*WVPZOY!*mYZ%lZr!*mrs!+_s;'S!*m;'S;=`!,b<%lO!*m_!*rVPZOY!)eYZ%lZr!)ers!*Rs;'S!)e;'S;=`!+X<%lO!)e_!+[P;=`<%l!)e_!+dVPZOY!*mYZ%lZr!*mrs!+ys;'S!*m;'S;=`!,b<%lO!*mZ!,OSPZOY!+yZ;'S!+y;'S;=`!,[<%lO!+yZ!,_P;=`<%l!+y_!,eP;=`<%l!*mT!,ou&YS_POY%QYZ%lZr%Qrs%qs!O%Q!O!P!/S!P!Q%Q!Q![!0`![!d%Q!d!e!3j!e!f%Q!f!gJd!g!hKQ!h!iJd!i!n%Q!n!o!2U!o!q%Q!q!r!5h!r!z%Q!z!{!7`!{#R%Q#R#S!2r#S#U%Q#U#V!3j#V#W%Q#W#XJd#X#YKQ#Y#ZJd#Z#`%Q#`#a!2U#a#c%Q#c#d!5h#d#l%Q#l#m!7`#m;'S%Q;'S;=`&s<%lO%QT!/Za&YS`POY%QYZ%lZr%Qrs%qs!Q%Q!Q![IQ![!f%Q!f!gJd!g!hKQ!h!iJd!i#W%Q#W#XJd#X#YKQ#Y#ZJd#Z;'S%Q;'S;=`&s<%lO%QT!0gi&YS_POY%QYZ%lZr%Qrs%qs!O%Q!O!P!/S!P!Q%Q!Q![!0`![!f%Q!f!gJd!g!hKQ!h!iJd!i!n%Q!n!o!2U!o#R%Q#R#S!2r#S#W%Q#W#XJd#X#YKQ#Y#ZJd#Z#`%Q#`#a!2U#a;'S%Q;'S;=`&s<%lO%QT!2]V&YS_POY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT!2wZ&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!0`![#R%Q#R#S!2r#S;'S%Q;'S;=`&s<%lO%QT!3oY&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q!R!4_!R!S!4_!S;'S%Q;'S;=`&s<%lO%QT!4f`&YS_POY%QYZ%lZr%Qrs%qs!Q%Q!Q!R!4_!R!S!4_!S!n%Q!n!o!2U!o#R%Q#R#S!3j#S#`%Q#`#a!2U#a;'S%Q;'S;=`&s<%lO%QT!5mX&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q!Y!6Y!Y;'S%Q;'S;=`&s<%lO%QT!6a_&YS_POY%QYZ%lZr%Qrs%qs!Q%Q!Q!Y!6Y!Y!n%Q!n!o!2U!o#R%Q#R#S!5h#S#`%Q#`#a!2U#a;'S%Q;'S;=`&s<%lO%QT!7e_&YSOY%QYZ%lZr%Qrs%qs!O%Q!O!P!8d!P!Q%Q!Q![!:r![!c%Q!c!i!:r!i#T%Q#T#Z!:r#Z;'S%Q;'S;=`&s<%lO%QT!8i]&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!9b![!c%Q!c!i!9b!i#T%Q#T#Z!9b#Z;'S%Q;'S;=`&s<%lO%QT!9gc&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!9b![!c%Q!c!i!9b!i!r%Q!r!sKQ!s#R%Q#R#S!8d#S#T%Q#T#Z!9b#Z#d%Q#d#eKQ#e;'S%Q;'S;=`&s<%lO%QT!:yi&YS_POY%QYZ%lZr%Qrs%qs!O%Q!O!P!<h!P!Q%Q!Q![!:r![!c%Q!c!i!:r!i!n%Q!n!o!2U!o!r%Q!r!sKQ!s#R%Q#R#S!=r#S#T%Q#T#Z!:r#Z#`%Q#`#a!2U#a#d%Q#d#eKQ#e;'S%Q;'S;=`&s<%lO%QT!<ma&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!9b![!c%Q!c!i!9b!i!r%Q!r!sKQ!s#T%Q#T#Z!9b#Z#d%Q#d#eKQ#e;'S%Q;'S;=`&s<%lO%QT!=w]&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!:r![!c%Q!c!i!:r!i#T%Q#T#Z!:r#Z;'S%Q;'S;=`&s<%lO%QV!>wX#pR&YSOY%QYZ%lZr%Qrs%qs![%Q![!]!?d!];'S%Q;'S;=`&s<%lO%QV!?kV&vR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QV!@XV!PR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_!@uY&_Z&YSOY%QYZ%lZr%Qrs%qs!^%Q!^!_!Ae!_!`+p!`;'S%Q;'S;=`&s<%lO%QU!AlX#iQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QV!B`X!bR&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`+p!`;'S%Q;'S;=`&s<%lO%QV!CSY&^R&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`+p!`!a!Cr!a;'S%Q;'S;=`&s<%lO%QU!CyY#iQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`!a!Ae!a;'S%Q;'S;=`&s<%lO%Q_!DrV&bX#oQ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_!E`X%}Z&YSOY%QYZ%lZr%Qrs%qs#]%Q#]#^!E{#^;'S%Q;'S;=`&s<%lO%QV!FQX&YSOY%QYZ%lZr%Qrs%qs#b%Q#b#c!Fm#c;'S%Q;'S;=`&s<%lO%QV!FrX&YSOY%QYZ%lZr%Qrs%qs#h%Q#h#i!G_#i;'S%Q;'S;=`&s<%lO%QV!GdX&YSOY%QYZ%lZr%Qrs%qs#X%Q#X#Y!HP#Y;'S%Q;'S;=`&s<%lO%QV!HUX&YSOY%QYZ%lZr%Qrs%qs#f%Q#f#g!Hq#g;'S%Q;'S;=`&s<%lO%QV!HvX&YSOY%QYZ%lZr%Qrs%qs#Y%Q#Y#Z!Ic#Z;'S%Q;'S;=`&s<%lO%QV!IhX&YSOY%QYZ%lZr%Qrs%qs#T%Q#T#U!JT#U;'S%Q;'S;=`&s<%lO%QV!JYX&YSOY%QYZ%lZr%Qrs%qs#V%Q#V#W!Ju#W;'S%Q;'S;=`&s<%lO%QV!JzX&YSOY%QYZ%lZr%Qrs%qs#X%Q#X#Y!Kg#Y;'S%Q;'S;=`&s<%lO%QV!KnV&tR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_!L[b&RZ&YSOY%QYZ%lZr%Qrs%qst%Qtu!LTu!Q%Q!Q![!LT![!c%Q!c!}!LT!}#R%Q#R#S!LT#S#T%Q#T#o!LT#o$g%Q$g;'S!LT;'S;=`!Md<%lO!LT_!MgP;=`<%l!LT_!MqVuZ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QV!N_VsR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QU!N{X#eQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QV# oV}R&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_#!_Z'OX#dQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`#p%Q#p#q##Q#q;'S%Q;'S;=`&s<%lO%QU##XV#bQ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QV##uV|R&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT#$cV#uP&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_#%Ru&YS%yZ&PZOX%QXY'fYZ)bZ^'f^p%Qpq'fqr%Qrs%qst%Qtu4eu!Q%Q!Q![4e![!c%Q!c!}4e!}#R%Q#R#S4e#S#T%Q#T#o4e#o#y%Q#y#z'f#z$f%Q$f$g'f$g#BY4e#BY#BZ#$x#BZ$IS4e$IS$I_#$x$I_$I|4e$I|$JO#$x$JO$JT4e$JT$JU#$x$JU$KV4e$KV$KW#$x$KW&FU4e&FU&FV#$x&FV;'S4e;'S;=`5t<%lO4e",tokenizers:[0,1,2,3],topRules:{Program:[0,3],ClassContent:[1,194]},dynamicPrecedences:{27:1,232:-1,243:-1},specialized:[{term:231,get:Q=>_[Q]||-1}],tokenPrec:7144}),i=S.define({name:"java",parser:d.configure({props:[s.add({IfStatement:$({except:/^\s*({|else\b)/}),TryStatement:$({except:/^\s*({|catch|finally)\b/}),LabeledStatement:t,SwitchBlock:Q=>{let P=Q.textAfter,a=/^\s*\}/.test(P),r=/^\s*(case|default)\b/.test(P);return Q.baseIndent+(a?0:r?1:2)*Q.unit},Block:Z({closing:"}"}),BlockComment:()=>null,Statement:$({except:/^{/})}),e.add({"Block SwitchBlock ClassBody ElementValueArrayInitializer ModuleBody EnumBody ConstructorBody InterfaceBody ArrayInitializer":X,BlockComment(Q){return{from:Q.from+2,to:Q.to-2}}})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/}});function R(){return new o(i)}export{i as n,R as t};
import{D as b,J as e,N as r,T as s,q as a,r as t,s as P,u as S,y as Q}from"./dist-DBwNzi3C.js";var n={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},i=t.deserialize({version:14,states:"!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",stateData:"!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O",goto:"xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV",nodeNames:"\u26A0 LineComment BlockComment Module ) ( App Identifier Type Keyword Number String",maxTerm:17,nodeProps:[["isolate",-3,1,2,11,""],["openedBy",4,"("],["closedBy",5,")"],["group",-6,6,7,8,9,10,11,"Expression"]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"0o~R^XY}YZ}]^}pq}rs!Stu#pxy'Uyz(e{|(j}!O(j!Q!R(s!R![*p!]!^.^#T#o.{~!SO_~~!VVOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j<%lO!S~!qOZ~~!tRO;'S!S;'S;=`!};=`O!S~#QWOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j;=`<%l!S<%lO!S~#mP;=`<%l!S~#siqr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%b~%giV~qr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%b~'ZPT~!]!^'^~'aTO!]'^!]!^'p!^;'S'^;'S;=`(_<%lO'^~'sVOy'^yz(Yz!]'^!]!^'p!^;'S'^;'S;=`(_<%lO'^~(_OQ~~(bP;=`<%l'^~(jOS~~(mQ!Q!R(s!R![*p~(xUY~!O!P)[!Q![*p!g!h){#R#S+U#X#Y){#l#m+[~)aRY~!Q![)j!g!h){#X#Y){~)oSY~!Q![)j!g!h){#R#S*j#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dQY~!Q![*_#R#S*X~*mP!Q![)j~*uTY~!O!P)[!Q![*p!g!h){#R#S+U#X#Y){~+XP!Q![*p~+_R!Q![+h!c!i+h#T#Z+h~+mVY~!O!P,S!Q![+h!c!i+h!r!s-P#R#S+[#T#Z+h#d#e-P~,XTY~!Q![,h!c!i,h!r!s-P#T#Z,h#d#e-P~,mUY~!Q![,h!c!i,h!r!s-P#R#S.Q#T#Z,h#d#e-P~-ST{|-c}!O-c!Q![-o!c!i-o#T#Z-o~-fR!Q![-o!c!i-o#T#Z-o~-tSY~!Q![-o!c!i-o#R#S-c#T#Z-o~.TR!Q![,h!c!i,h#T#Z,h~.aP!]!^.d~.iSP~OY.dZ;'S.d;'S;=`.u<%lO.d~.xP;=`<%l.d~/QiX~qr.{st.{tu.{uv.{vw.{wx.{z{.{{|.{}!O.{!O!P.{!P!Q.{!Q![.{![!].{!^!_.{!_!`.{!`!a.{!a!b.{!b!c.{!c!}.{#Q#R.{#R#S.{#S#T.{#T#o.{#p#q.{#r#s.{",tokenizers:[0],topRules:{Module:[0,3]},specialized:[{term:9,get:O=>n[O]||-1}],tokenPrec:0}),o=P.define({name:"wast",parser:i.configure({props:[r.add({App:Q({closing:")",align:!1})}),b.add({App:s,BlockComment(O){return{from:O.from+2,to:O.to-2}}}),a({Keyword:e.keyword,Type:e.typeName,Number:e.number,String:e.string,Identifier:e.variableName,LineComment:e.lineComment,BlockComment:e.blockComment,"( )":e.paren})]}),languageData:{commentTokens:{line:";;",block:{open:"(;",close:";)"}},closeBrackets:{brackets:["(",'"']}}});function p(){return new S(o)}export{o as n,p as t};
import{Bt as ue,D as lt,G as ce,H as N,I as de,J as m,N as pe,O as me,Q as q,R as ge,St as ke,Ut as xe,X as E,Z as ht,at as Le,c as be,d as Se,en as O,et as Ce,l as ft,nt as we,q as ut,tt as v,u as ct,v as ye,zt as H}from"./dist-DBwNzi3C.js";import{t as Ae}from"./dist-ChS0Dc_R.js";import{n as Ie,r as Te}from"./dist-Btv5Rh1v.js";var dt=class le{static create(e,r,n,s,i){return new le(e,r,n,s+(s<<8)+e+(r<<4)|0,i,[],[])}constructor(e,r,n,s,i,o,a){this.type=e,this.value=r,this.from=n,this.hash=s,this.end=i,this.children=o,this.positions=a,this.hashProp=[[E.contextHash,s]]}addChild(e,r){e.prop(E.contextHash)!=this.hash&&(e=new v(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new v(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(s,i,o)=>new v(q.none,s,i,o,this.hashProp)})}},u;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(u||(u={}));var ve=class{constructor(t,e){this.start=t,this.content=e,this.marks=[],this.parsers=[]}},Be=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}skipSpace(t){return R(this.text,t)}reset(t){for(this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}moveBaseColumn(t){this.baseIndent=t,this.basePos=this.findColumn(t)}addMarker(t){this.markers.push(t)}countIndent(t,e=0,r=0){for(let n=e;n<t;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return r}findColumn(t){let e=0;for(let r=0;e<this.text.length&&r<t;e++)r+=this.text.charCodeAt(e)==9?4-r%4:1;return e}scrub(){if(!this.baseIndent)return this.text;let t="";for(let e=0;e<this.basePos;e++)t+=" ";return t+this.text.slice(this.basePos)}};function pt(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==u.OrderedList?V:_)(r,e,!1);return n>0&&(t.type!=u.BulletList||Z(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}var mt={[u.Blockquote](t,e,r){return r.next==62?(r.markers.push(g(u.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(w(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0):!1},[u.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[u.OrderedList]:pt,[u.BulletList]:pt,[u.Document](){return!0}};function w(t){return t==32||t==9||t==10||t==13}function R(t,e=0){for(;e<t.length&&w(t.charCodeAt(e));)e++;return e}function gt(t,e,r){for(;e>r&&w(t.charCodeAt(e-1));)e--;return e}function kt(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function xt(t){return t.next==62?t.text.charCodeAt(t.pos+1)==32?2:1:-1}function Z(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let s=t.pos+1;s<t.text.length;s++){let i=t.text.charCodeAt(s);if(i==t.next)n++;else if(!w(i))return-1}return r&&t.next==45&&St(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(It.SetextHeading)>-1||n<3?-1:1}function Lt(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function _(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||w(t.text.charCodeAt(t.pos+1)))&&(!r||Lt(e,u.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function V(t,e,r){let n=t.pos,s=t.next;for(;s>=48&&s<=57;){if(n++,n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||s!=46&&s!=41||n<t.text.length-1&&!w(t.text.charCodeAt(n+1))||r&&!Lt(e,u.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function bt(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function St(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&w(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}var G=/^[ \t]*$/,Ct=/-->/,wt=/\?>/,J=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Ct],[/^\s*<\?/,wt],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,G],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,G]];function yt(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let s=0,i=J.length-(r?1:0);s<i;s++)if(J[s][0].test(n))return s;return-1}function At(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function y(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==u.CodeText?t[n].to=r:t.push(g(u.CodeText,e,r))}var j={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),s=t.lineStart+n,i=t.lineStart+e.text.length,o=[],a=[];for(y(o,s,i);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){y(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let h of a)h.type==u.CodeText?y(o,h.from,h.to):o.push(h);a=[]}y(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);i=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<i&&y(o,l,i)}}return a.length&&(a=a.filter(l=>l.type!=u.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-s).finish(u.CodeBlock,i-s),s),!0},FencedCode(t,e){let r=kt(e);if(r<0)return!1;let n=t.lineStart+e.pos,s=e.next,i=r-e.pos,o=e.skipSpace(r),a=gt(e.text,e.text.length,o),l=[g(u.CodeMark,n,n+i)];o<a&&l.push(g(u.CodeInfo,t.lineStart+o,t.lineStart+a));for(let h=!0,f=!0,d=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let c=e.pos;if(e.indent-e.baseIndent<4)for(;c<e.text.length&&e.text.charCodeAt(c)==s;)c++;if(c-e.pos>=i&&e.skipSpace(c)==e.text.length){for(let p of e.markers)l.push(p);f&&d&&y(l,t.lineStart-1,t.lineStart),l.push(g(u.CodeMark,t.lineStart+e.pos,t.lineStart+c)),t.nextLine();break}else{d=!0,h||(y(l,t.lineStart-1,t.lineStart),f=!1);for(let S of e.markers)l.push(S);let p=t.lineStart+e.basePos,k=t.lineStart+e.text.length;p<k&&(y(l,p,k),f=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish(u.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=xt(e);return r<0?!1:(t.startContext(u.Blockquote,e.pos),t.addNode(u.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(Z(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(u.HorizontalRule,r),!0},BulletList(t,e){let r=_(e,t,!1);if(r<0)return!1;t.block.type!=u.BulletList&&t.startContext(u.BulletList,e.basePos,e.next);let n=At(e,e.pos+1);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=V(e,t,!1);if(r<0)return!1;t.block.type!=u.OrderedList&&t.startContext(u.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=At(e,e.pos+r);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=bt(e);if(r<0)return!1;let n=e.pos,s=t.lineStart+n,i=gt(e.text,e.text.length,n),o=i;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==i||o==n||!w(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(u.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,o),s+r+1),-s);o<e.text.length&&a.write(u.HeaderMark,o-n,i-n);let l=a.finish(u.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,s),!0},HTMLBlock(t,e){let r=yt(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,s=J[r][1],i=[],o=s!=G;for(;!s.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)i.push(h)}o&&t.nextLine();let a=s==Ct?u.CommentBlock:s==wt?u.ProcessingInstructionBlock:u.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(i,-n).finish(a,l-n),n),!0},SetextHeading:void 0},Ee=class{constructor(t){this.stage=0,this.elts=[],this.pos=0,this.start=t.start,this.advance(t.content)}nextLine(t,e,r){if(this.stage==-1)return!1;let n=r.content+`
`+e.scrub(),s=this.advance(n);return s>-1&&s<n.length?this.complete(t,r,s):!1}finish(t,e){return(this.stage==2||this.stage==3)&&R(e.content,this.pos)==e.content.length?this.complete(t,e,e.content.length):!1}complete(t,e,r){return t.addLeafElement(e,g(u.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(t){return t?(this.pos=t.to-this.start,this.elts.push(t),this.stage++,!0):(t===!1&&(this.stage=-1),!1)}advance(t){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Rt(t,this.pos,this.start,!0)))return-1;if(t.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(g(u.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Nt(t,R(t,this.pos),this.start)))return-1}else if(this.stage==2){let e=R(t,this.pos),r=0;if(e>this.pos){let n=Ot(t,e,this.start);if(n){let s=K(t,n.to-this.start);s>0&&(this.nextStage(n),r=s)}}return r||(r=K(t,this.pos)),r>0&&r<t.length?r:-1}else return K(t,this.pos)}}};function K(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!w(r))return-1}return e}var He=class{nextLine(t,e,r){let n=e.depth<t.stack.length?-1:St(e),s=e.next;if(n<0)return!1;let i=g(u.HeaderMark,t.lineStart+e.pos,t.lineStart+n);return t.nextLine(),t.addLeafElement(r,g(s==61?u.SetextHeading1:u.SetextHeading2,r.start,t.prevLineEnd(),[...t.parser.parseInline(r.content,r.start),i])),!0}finish(){return!1}},It={LinkReference(t,e){return e.content.charCodeAt(0)==91?new Ee(e):null},SetextHeading(){return new He}},Me=[(t,e)=>bt(e)>=0,(t,e)=>kt(e)>=0,(t,e)=>xt(e)>=0,(t,e)=>_(e,t,!0)>=0,(t,e)=>V(e,t,!0)>=0,(t,e)=>Z(e,t,!0)>=0,(t,e)=>yt(e,t,!0)>=0],Pe={text:"",end:0},Ne=class{constructor(t,e,r,n){this.parser=t,this.input=e,this.ranges=n,this.line=new Be,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=n[n.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=n[0].from,this.block=dt.create(u.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new ze(r,e):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:t}=this;for(;;){for(let r=0;;){let n=t.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<t.markers.length&&(!n||t.markers[r].from<n.end);){let s=t.markers[r++];this.addNode(s.type,s.from,s.to)}if(!n)break;this.finishContext()}if(t.pos<t.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(t.basePos))return null;t:for(;;){for(let r of this.parser.blockParsers)if(r){let n=r(this,t);if(n!=0){if(n==1)return null;t.forward();continue t}}break}let e=new ve(this.lineStart+t.pos,t.text.slice(t.pos));for(let r of this.parser.leafBlockParsers)if(r){let n=r(this,e);n&&e.parsers.push(n)}t:for(;this.nextLine()&&t.pos!=t.text.length;){if(t.indent<t.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,t,e))break t}for(let r of e.parsers)if(r.nextLine(this,t,e))return null;e.content+=`
`+t.scrub();for(let r of t.markers)e.marks.push(r)}return this.finishLeaf(e),null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=t}reuseFragment(t){if(!this.fragments.moveTo(this.absoluteLineStart+t,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let e=this.fragments.takeNodes(this);return e?(this.absoluteLineStart+=e,this.lineStart=Xt(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(t=this.depth-1){return this.parser.nodeSet.types[this.stack[t].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(t){let e=Pe;if(e.end=t,t>=this.to)e.text="";else if(e.text=this.lineChunkAt(t),e.end+=e.text.length,this.ranges.length>1){let r=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<e.end;){n++;let s=this.ranges[n].from,i=this.lineChunkAt(s);e.end=s+i.length,e.text=e.text.slice(0,this.ranges[n-1].to-r)+i,r=e.end-e.text.length}}return e}readLine(){let{line:t}=this,{text:e,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,t.reset(e);t.depth<this.stack.length;t.depth++){let n=this.stack[t.depth],s=this.parser.skipContextMarkup[n.type];if(!s)throw Error("Unhandled block context "+u[n.type]);let i=this.line.markers.length;if(!s(n,this,t)){this.line.markers.length>i&&(n.end=this.line.markers[this.line.markers.length-1].to),t.forward();break}t.forward()}}lineChunkAt(t){let e=this.input.chunk(t),r;if(this.input.lineChunks)r=e==`
`?"":e;else{let n=e.indexOf(`
`);r=n<0?e:e.slice(0,n)}return t+r.length>this.to?r.slice(0,this.to-t):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(t,e,r=0){this.block=dt.create(t,r,this.lineStart+e,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(t,e,r=0){this.startContext(this.parser.getNodeType(t),e,r)}addNode(t,e,r){typeof t=="number"&&(t=new v(this.parser.nodeSet.types[t],M,M,(r??this.prevLineEnd())-e)),this.block.addChild(t,e-this.block.from)}addElement(t){this.block.addChild(t.toTree(this.parser.nodeSet),t.from-this.block.from)}addLeafElement(t,e){this.addNode(this.buffer.writeElements(et(e.children,t.marks),-e.from).finish(e.type,e.to-e.from),e.from)}finishContext(){let t=this.stack.pop(),e=this.stack[this.stack.length-1];e.addChild(t.toTree(this.parser.nodeSet),t.from-e.from),this.block=e}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(t){return this.ranges.length>1?Tt(this.ranges,0,t.topNode,this.ranges[0].from,this.reusePlaceholders):t}finishLeaf(t){for(let r of t.parsers)if(r.finish(this,t))return;let e=et(this.parser.parseInline(t.content,t.start),t.marks);this.addNode(this.buffer.writeElements(e,-t.start).finish(u.Paragraph,t.content.length),t.start)}elt(t,e,r,n){return typeof t=="string"?g(this.parser.getNodeType(t),e,r,n):new Ht(t,e)}get buffer(){return new Et(this.parser.nodeSet)}};function Tt(t,e,r,n,s){let i=t[e].to,o=[],a=[],l=r.from+n;function h(f,d){for(;d?f>=i:f>i;){let c=t[e+1].from-i;n+=c,f+=c,e++,i=t[e].to}}for(let f=r.firstChild;f;f=f.nextSibling){h(f.from+n,!0);let d=f.from+n,c,p=s.get(f.tree);p?c=p:f.to+n>i?(c=Tt(t,e,f,n,s),h(f.to+n,!1)):c=f.toTree(),o.push(c),a.push(d-l)}return h(r.to+n,!1),new v(r.type,o,a,r.to+n-l,r.tree?r.tree.propValues:void 0)}var vt=class he extends Ce{constructor(e,r,n,s,i,o,a,l,h){super(),this.nodeSet=e,this.blockParsers=r,this.leafBlockParsers=n,this.blockNames=s,this.endLeafBlock=i,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=h,this.nodeTypes=Object.create(null);for(let f of e.types)this.nodeTypes[f.name]=f.id}createParse(e,r,n){let s=new Ne(this,e,r,n);for(let i of this.wrappers)s=i(s,e,r,n);return s}configure(e){let r=W(e);if(!r)return this;let{nodeSet:n,skipContextMarkup:s}=this,i=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),h=this.inlineNames.slice(),f=this.endLeafBlock.slice(),d=this.wrappers;if(X(r.defineNodes)){s=Object.assign({},s);let c=n.types.slice(),p;for(let k of r.defineNodes){let{name:S,block:A,composite:L,style:b}=typeof k=="string"?{name:k}:k;if(c.some(T=>T.name==S))continue;L&&(s[c.length]=(T,P,fe)=>L(P,fe,T.value));let x=c.length,I=L?["Block","BlockContext"]:A?x>=u.ATXHeading1&&x<=u.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;c.push(q.define({id:x,name:S,props:I&&[[E.group,I]]})),b&&(p||(p={}),Array.isArray(b)||b instanceof ce?p[S]=b:Object.assign(p,b))}n=new ht(c),p&&(n=n.extend(ut(p)))}if(X(r.props)&&(n=n.extend(...r.props)),X(r.remove))for(let c of r.remove){let p=this.blockNames.indexOf(c),k=this.inlineNames.indexOf(c);p>-1&&(i[p]=o[p]=void 0),k>-1&&(l[k]=void 0)}if(X(r.parseBlock))for(let c of r.parseBlock){let p=a.indexOf(c.name);if(p>-1)i[p]=c.parse,o[p]=c.leaf;else{let k=c.before?U(a,c.before):c.after?U(a,c.after)+1:a.length-1;i.splice(k,0,c.parse),o.splice(k,0,c.leaf),a.splice(k,0,c.name)}c.endLeaf&&f.push(c.endLeaf)}if(X(r.parseInline))for(let c of r.parseInline){let p=h.indexOf(c.name);if(p>-1)l[p]=c.parse;else{let k=c.before?U(h,c.before):c.after?U(h,c.after)+1:h.length-1;l.splice(k,0,c.parse),h.splice(k,0,c.name)}}return r.wrap&&(d=d.concat(r.wrap)),new he(n,i,o,a,f,s,l,h,d)}getNodeType(e){let r=this.nodeTypes[e];if(r==null)throw RangeError(`Unknown node type '${e}'`);return r}parseInline(e,r){let n=new tt(this,e,r);t:for(let s=r;s<n.end;){let i=n.char(s);for(let o of this.inlineParsers)if(o){let a=o(n,i,s);if(a>=0){s=a;continue t}}s++}return n.resolveMarkers(0)}};function X(t){return t!=null&&t.length>0}function W(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=W(t[0]);if(t.length==1)return e;let r=W(t.slice(1));if(!r||!e)return e||r;let n=(o,a)=>(o||M).concat(a||M),s=e.wrap,i=r.wrap;return{props:n(e.props,r.props),defineNodes:n(e.defineNodes,r.defineNodes),parseBlock:n(e.parseBlock,r.parseBlock),parseInline:n(e.parseInline,r.parseInline),remove:n(e.remove,r.remove),wrap:s?i?(o,a,l,h)=>s(i(o,a,l,h),a,l,h):s:i}}function U(t,e){let r=t.indexOf(e);if(r<0)throw RangeError(`Position specified relative to unknown parser ${e}`);return r}var Bt=[q.none];for(let t=1,e;e=u[t];t++)Bt[t]=q.define({id:t,name:e,props:t>=u.Escape?[]:[[E.group,t in mt?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});var M=[],Et=class{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,e,r,n=0){return this.content.push(t,e,r,4+n*4),this}writeElements(t,e=0){for(let r of t)r.writeTo(this,e);return this}finish(t,e){return v.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:e})}},z=class{constructor(t,e,r,n=M){this.type=t,this.from=e,this.to=r,this.children=n}writeTo(t,e){let r=t.content.length;t.writeElements(this.children,e),t.content.push(this.type,this.from+e,this.to+e,t.content.length+4-r)}toTree(t){return new Et(t).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},Ht=class{constructor(t,e){this.tree=t,this.from=e}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return M}writeTo(t,e){t.nodes.push(this.tree),t.content.push(t.nodes.length-1,this.from+e,this.to+e,-1)}toTree(){return this.tree}};function g(t,e,r,n){return new z(t,e,r,n)}var Mt={resolve:"Emphasis",mark:"EmphasisMark"},Pt={resolve:"Emphasis",mark:"EmphasisMark"},B={},Q={},C=class{constructor(t,e,r,n){this.type=t,this.from=e,this.to=r,this.side=n}},Oe="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",D=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{D=RegExp("[\\p{S}|\\p{P}]","u")}catch{}var Y={Escape(t,e,r){if(e!=92||r==t.end-1)return-1;let n=t.char(r+1);for(let s=0;s<32;s++)if(Oe.charCodeAt(s)==n)return t.append(g(u.Escape,r,r+2));return-1},Entity(t,e,r){if(e!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(r+1,r+31));return n?t.append(g(u.Entity,r,r+1+n[0].length)):-1},InlineCode(t,e,r){if(e!=96||r&&t.char(r-1)==96)return-1;let n=r+1;for(;n<t.end&&t.char(n)==96;)n++;let s=n-r,i=0;for(;n<t.end;n++)if(t.char(n)==96){if(i++,i==s&&t.char(n+1)!=96)return t.append(g(u.InlineCode,r,n+1,[g(u.CodeMark,r,r+s),g(u.CodeMark,n+1-s,n+1)]))}else i=0;return-1},HTMLTag(t,e,r){if(e!=60||r==t.end-1)return-1;let n=t.slice(r+1,t.end),s=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(s)return t.append(g(u.Autolink,r,r+1+s[0].length,[g(u.LinkMark,r,r+1),g(u.URL,r+1,r+s[0].length),g(u.LinkMark,r+s[0].length,r+1+s[0].length)]));let i=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(i)return t.append(g(u.Comment,r,r+1+i[0].length));let o=/^\?[^]*?\?>/.exec(n);if(o)return t.append(g(u.ProcessingInstruction,r,r+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return a?t.append(g(u.HTMLTag,r,r+1+a[0].length)):-1},Emphasis(t,e,r){if(e!=95&&e!=42)return-1;let n=r+1;for(;t.char(n)==e;)n++;let s=t.slice(r-1,r),i=t.slice(n,n+1),o=D.test(s),a=D.test(i),l=/\s|^$/.test(s),h=/\s|^$/.test(i),f=!h&&(!a||l||o),d=!l&&(!o||h||a),c=f&&(e==42||!d||o),p=d&&(e==42||!f||a);return t.append(new C(e==95?Mt:Pt,r,n,(c?1:0)|(p?2:0)))},HardBreak(t,e,r){if(e==92&&t.char(r+1)==10)return t.append(g(u.HardBreak,r,r+2));if(e==32){let n=r+1;for(;t.char(n)==32;)n++;if(t.char(n)==10&&n>=r+2)return t.append(g(u.HardBreak,r,n+1))}return-1},Link(t,e,r){return e==91?t.append(new C(B,r,r+1,1)):-1},Image(t,e,r){return e==33&&t.char(r+1)==91?t.append(new C(Q,r,r+2,1)):-1},LinkEnd(t,e,r){if(e!=93)return-1;for(let n=t.parts.length-1;n>=0;n--){let s=t.parts[n];if(s instanceof C&&(s.type==B||s.type==Q)){if(!s.side||t.skipSpace(s.to)==r&&!/[(\[]/.test(t.slice(r+1,r+2)))return t.parts[n]=null,-1;let i=t.takeContent(n),o=t.parts[n]=Re(t,i,s.type==B?u.Link:u.Image,s.from,r+1);if(s.type==B)for(let a=0;a<n;a++){let l=t.parts[a];l instanceof C&&l.type==B&&(l.side=0)}return o.to}}return-1}};function Re(t,e,r,n,s){let{text:i}=t,o=t.char(s),a=s;if(e.unshift(g(u.LinkMark,n,n+(r==u.Image?2:1))),e.push(g(u.LinkMark,s-1,s)),o==40){let l=t.skipSpace(s+1),h=Nt(i,l-t.offset,t.offset),f;h&&(l=t.skipSpace(h.to),l!=h.to&&(f=Ot(i,l-t.offset,t.offset),f&&(l=t.skipSpace(f.to)))),t.char(l)==41&&(e.push(g(u.LinkMark,s,s+1)),a=l+1,h&&e.push(h),f&&e.push(f),e.push(g(u.LinkMark,l,a)))}else if(o==91){let l=Rt(i,s-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return g(r,n,a,e)}function Nt(t,e,r){if(t.charCodeAt(e)==60){for(let n=e+1;n<t.length;n++){let s=t.charCodeAt(n);if(s==62)return g(u.URL,e+r,n+1+r);if(s==60||s==10)return!1}return null}else{let n=0,s=e;for(let i=!1;s<t.length;s++){let o=t.charCodeAt(s);if(w(o))break;if(i)i=!1;else if(o==40)n++;else if(o==41){if(!n)break;n--}else o==92&&(i=!0)}return s>e?g(u.URL,e+r,s+r):s==t.length?null:!1}}function Ot(t,e,r){let n=t.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let s=n==40?41:n;for(let i=e+1,o=!1;i<t.length;i++){let a=t.charCodeAt(i);if(o)o=!1;else{if(a==s)return g(u.LinkTitle,e+r,i+1+r);a==92&&(o=!0)}}return null}function Rt(t,e,r,n){for(let s=!1,i=e+1,o=Math.min(t.length,i+999);i<o;i++){let a=t.charCodeAt(i);if(s)s=!1;else{if(a==93)return n?!1:g(u.LinkLabel,e+r,i+1+r);if(n&&!w(a)&&(n=!1),a==91)return!1;a==92&&(s=!0)}}return null}var tt=class{constructor(t,e,r){this.parser=t,this.text=e,this.offset=r,this.parts=[]}char(t){return t>=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,e){return this.text.slice(t-this.offset,e-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,e,r,n,s){return this.append(new C(t,e,r,(n?1:0)|(s?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let e=this.parts[t];if(e instanceof C&&(e.type==B||e.type==Q))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let r=t;r<this.parts.length;r++){let n=this.parts[r];if(!(n instanceof C&&n.type.resolve&&n.side&2))continue;let s=n.type==Mt||n.type==Pt,i=n.to-n.from,o,a=r-1;for(;a>=t;a--){let p=this.parts[a];if(p instanceof C&&p.side&1&&p.type==n.type&&!(s&&(n.side&1||p.side&2)&&(p.to-p.from+i)%3==0&&((p.to-p.from)%3||i%3))){o=p;break}}if(!o)continue;let l=n.type.resolve,h=[],f=o.from,d=n.to;if(s){let p=Math.min(2,o.to-o.from,i);f=o.to-p,d=n.from+p,l=p==1?"Emphasis":"StrongEmphasis"}o.type.mark&&h.push(this.elt(o.type.mark,f,o.to));for(let p=a+1;p<r;p++)this.parts[p]instanceof z&&h.push(this.parts[p]),this.parts[p]=null;n.type.mark&&h.push(this.elt(n.type.mark,n.from,d));let c=this.elt(l,f,d,h);this.parts[a]=s&&o.from!=f?new C(o.type,o.from,f,o.side):null,(this.parts[r]=s&&n.to!=d?new C(n.type,d,n.to,n.side):null)?this.parts.splice(r,0,c):this.parts[r]=c}let e=[];for(let r=t;r<this.parts.length;r++){let n=this.parts[r];n instanceof z&&e.push(n)}return e}findOpeningDelimiter(t){for(let e=this.parts.length-1;e>=0;e--){let r=this.parts[e];if(r instanceof C&&r.type==t&&r.side&1)return e}return null}takeContent(t){let e=this.resolveMarkers(t);return this.parts.length=t,e}getDelimiterAt(t){let e=this.parts[t];return e instanceof C?e:null}skipSpace(t){return R(this.text,t-this.offset)+this.offset}elt(t,e,r,n){return typeof t=="string"?g(this.parser.getNodeType(t),e,r,n):new Ht(t,e)}};tt.linkStart=B,tt.imageStart=Q;function et(t,e){if(!e.length)return t;if(!t.length)return e;let r=t.slice(),n=0;for(let s of e){for(;n<r.length&&r[n].to<s.to;)n++;if(n<r.length&&r[n].from<s.from){let i=r[n];i instanceof z&&(r[n]=new z(i.type,i.from,i.to,et(i.children,[s])))}else r.splice(n++,0,s)}return r}var Xe=[u.CodeBlock,u.ListItem,u.OrderedList,u.BulletList],ze=class{constructor(t,e){this.fragments=t,this.input=e,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,t.length&&(this.fragment=t[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(t,e){for(;this.fragment&&this.fragment.to<=t;)this.nextFragment();if(!this.fragment||this.fragment.from>(t?t-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
`;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let n=t+this.fragment.offset;for(;r.to<=n;)if(!r.parent())return!1;for(;;){if(r.from>=n)return this.fragment.from<=e;if(!r.childAfter(n))return!1}}matches(t){let e=this.cursor.tree;return e&&e.prop(E.contextHash)==t}takeNodes(t){let e=this.cursor,r=this.fragment.offset,n=this.fragmentEnd-(this.fragment.openEnd?1:0),s=t.absoluteLineStart,i=s,o=t.block.children.length,a=i,l=o;for(;;){if(e.to-r>n){if(e.type.isAnonymous&&e.firstChild())continue;break}let h=Xt(e.from-r,t.ranges);if(e.to-r<=t.ranges[t.rangeI].to)t.addNode(e.tree,h);else{let f=new v(t.parser.nodeSet.types[u.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(f,e.tree),t.addNode(f,h)}if(e.type.is("Block")&&(Xe.indexOf(e.type.id)<0?(i=e.to-r,o=t.block.children.length):(i=a,o=l),a=e.to-r,l=t.block.children.length),!e.nextSibling())break}for(;t.block.children.length>o;)t.block.children.pop(),t.block.positions.pop();return i-s}};function Xt(t,e){let r=t;for(let n=1;n<e.length;n++){let s=e[n-1].to,i=e[n].from;s<t&&(r-=i-s)}return r}var De=ut({"Blockquote/...":m.quote,HorizontalRule:m.contentSeparator,"ATXHeading1/... SetextHeading1/...":m.heading1,"ATXHeading2/... SetextHeading2/...":m.heading2,"ATXHeading3/...":m.heading3,"ATXHeading4/...":m.heading4,"ATXHeading5/...":m.heading5,"ATXHeading6/...":m.heading6,"Comment CommentBlock":m.comment,Escape:m.escape,Entity:m.character,"Emphasis/...":m.emphasis,"StrongEmphasis/...":m.strong,"Link/... Image/...":m.link,"OrderedList/... BulletList/...":m.list,"BlockQuote/...":m.quote,"InlineCode CodeText":m.monospace,"URL Autolink":m.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":m.processingInstruction,"CodeInfo LinkLabel":m.labelName,LinkTitle:m.string,Paragraph:m.content}),$e=new vt(new ht(Bt).extend(De),Object.keys(j).map(t=>j[t]),Object.keys(j).map(t=>It[t]),Object.keys(j),Me,mt,Object.keys(Y).map(t=>Y[t]),Object.keys(Y),[]);function Fe(t,e,r){let n=[];for(let s=t.firstChild,i=e;;s=s.nextSibling){let o=s?s.from:r;if(o>i&&n.push({from:i,to:o}),!s)break;i=s.to}return n}function qe(t){let{codeParser:e,htmlParser:r}=t;return{wrap:we((n,s)=>{let i=n.type.id;if(e&&(i==u.CodeBlock||i==u.FencedCode)){let o="";if(i==u.FencedCode){let l=n.node.getChild(u.CodeInfo);l&&(o=s.read(l.from,l.to))}let a=e(o);if(a)return{parser:a,overlay:l=>l.type.id==u.CodeText,bracketed:i==u.FencedCode}}else if(r&&(i==u.HTMLBlock||i==u.HTMLTag||i==u.CommentBlock))return{parser:r,overlay:Fe(n.node,n.from,n.to)};return null})}}var je={resolve:"Strikethrough",mark:"StrikethroughMark"},Ue={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":m.strikethrough}},{name:"StrikethroughMark",style:m.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,r){if(e!=126||t.char(r+1)!=126||t.char(r+2)==126)return-1;let n=t.slice(r-1,r),s=t.slice(r+2,r+3),i=/\s|^$/.test(n),o=/\s|^$/.test(s),a=D.test(n),l=D.test(s);return t.addDelimiter(je,r,r+2,!o&&(!l||i||a),!i&&(!a||o||l))},after:"Emphasis"}]};function $(t,e,r=0,n,s=0){let i=0,o=!0,a=-1,l=-1,h=!1,f=()=>{n.push(t.elt("TableCell",s+a,s+l,t.parser.parseInline(e.slice(a,l),s+a)))};for(let d=r;d<e.length;d++){let c=e.charCodeAt(d);c==124&&!h?((!o||a>-1)&&i++,o=!1,n&&(a>-1&&f(),n.push(t.elt("TableDelimiter",d+s,d+s+1))),a=l=-1):(h||c!=32&&c!=9)&&(a<0&&(a=d),l=d+1),h=!h&&c==92}return a>-1&&(i++,n&&f()),i}function zt(t,e){for(let r=e;r<t.length;r++){let n=t.charCodeAt(r);if(n==124)return!0;n==92&&r++}return!1}var Dt=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,$t=class{constructor(){this.rows=null}nextLine(t,e,r){if(this.rows==null){this.rows=!1;let n;if((e.next==45||e.next==58||e.next==124)&&Dt.test(n=e.text.slice(e.pos))){let s=[];$(t,r.content,0,s,r.start)==$(t,n,e.pos)&&(this.rows=[t.elt("TableHeader",r.start,r.start+r.content.length,s),t.elt("TableDelimiter",t.lineStart+e.pos,t.lineStart+e.text.length)])}}else if(this.rows){let n=[];$(t,e.text,e.pos,n,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+e.pos,t.lineStart+e.text.length,n))}return!1}finish(t,e){return this.rows?(t.addLeafElement(e,t.elt("Table",e.start,e.start+e.content.length,this.rows)),!0):!1}},Qe={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":m.heading}},"TableRow",{name:"TableCell",style:m.content},{name:"TableDelimiter",style:m.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return zt(e.content,0)?new $t:null},endLeaf(t,e,r){if(r.parsers.some(s=>s instanceof $t)||!zt(e.text,e.basePos))return!1;let n=t.peekLine();return Dt.test(n)&&$(t,e.text,e.basePos)==$(t,n,e.basePos)},before:"SetextHeading"}]},Ze=class{nextLine(){return!1}finish(t,e){return t.addLeafElement(e,t.elt("Task",e.start,e.start+e.content.length,[t.elt("TaskMarker",e.start,e.start+3),...t.parser.parseInline(e.content.slice(3),e.start+3)])),!0}},_e={defineNodes:[{name:"Task",block:!0,style:m.list},{name:"TaskMarker",style:m.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Ze:null},after:"SetextHeading"}]},Ft=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,qt=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Ve=/[\w-]+\.[\w-]+($|\/)/,jt=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Ut=/\/[a-zA-Z\d@.]+/gy;function Qt(t,e,r,n){let s=0;for(let i=e;i<r;i++)t[i]==n&&s++;return s}function Ge(t,e){qt.lastIndex=e;let r=qt.exec(t);if(!r||Ve.exec(r[0])[0].indexOf("_")>-1)return-1;let n=e+r[0].length;for(;;){let s=t[n-1],i;if(/[?!.,:*_~]/.test(s)||s==")"&&Qt(t,e,n,")")>Qt(t,e,n,"("))n--;else if(s==";"&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,n))))n=e+i.index;else break}return n}function Zt(t,e){jt.lastIndex=e;let r=jt.exec(t);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:e+r[0].length-(n=="."?1:0)}var Je=[Qe,_e,Ue,{parseInline:[{name:"Autolink",parse(t,e,r){let n=r-t.offset;if(n&&/\w/.test(t.text[n-1]))return-1;Ft.lastIndex=n;let s=Ft.exec(t.text),i=-1;return!s||(s[1]||s[2]?(i=Ge(t.text,n+s[0].length),i>-1&&t.hasOpenLink&&(i=n+/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(n,i))[0].length)):s[3]?i=Zt(t.text,n):(i=Zt(t.text,n+s[0].length),i>-1&&s[0]=="xmpp:"&&(Ut.lastIndex=i,s=Ut.exec(t.text),s&&(i=s.index+s[0].length))),i<0)?-1:(t.addElement(t.elt("URL",r,i+t.offset)),i+t.offset)}}]}];function _t(t,e,r){return(n,s,i)=>{if(s!=t||n.char(i+1)==t)return-1;let o=[n.elt(r,i,i+1)];for(let a=i+1;a<n.end;a++){let l=n.char(a);if(l==t)return n.addElement(n.elt(e,i,a+1,o.concat(n.elt(r,a,a+1))));if(l==92&&o.push(n.elt("Escape",a,a+++2)),w(l))break}return-1}}var Ke={defineNodes:[{name:"Superscript",style:m.special(m.content)},{name:"SuperscriptMark",style:m.processingInstruction}],parseInline:[{name:"Superscript",parse:_t(94,"Superscript","SuperscriptMark")}]},We={defineNodes:[{name:"Subscript",style:m.special(m.content)},{name:"SubscriptMark",style:m.processingInstruction}],parseInline:[{name:"Subscript",parse:_t(126,"Subscript","SubscriptMark")}]},Ye={defineNodes:[{name:"Emoji",style:m.character}],parseInline:[{name:"Emoji",parse(t,e,r){let n;return e!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(t.slice(r+1,t.end)))?-1:t.addElement(t.elt("Emoji",r,r+1+n[0].length))}}]},Vt=ye({commentTokens:{block:{open:"<!--",close:"-->"}}}),Gt=new E,Jt=$e.configure({props:[lt.add(t=>!t.is("Block")||t.is("Document")||rt(t)!=null||tr(t)?void 0:(e,r)=>({from:r.doc.lineAt(e.from).to,to:e.to})),Gt.add(rt),pe.add({Document:()=>null}),ge.add({Document:Vt})]});function rt(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function tr(t){return t.name=="OrderedList"||t.name=="BulletList"}function er(t,e){let r=t;for(;;){let n=r.nextSibling,s;if(!n||(s=rt(n.type))!=null&&s<=e)break;r=n}return r.to}var rr=me.of((t,e,r)=>{for(let n=N(t).resolveInner(r,-1);n&&!(n.from<e);n=n.parent){let s=n.type.prop(Gt);if(s==null)continue;let i=er(n,s);if(i>r)return{from:r,to:i}}return null});function nt(t){return new be(Vt,t,[],"markdown")}var Kt=nt(Jt),F=nt(Jt.configure([Je,We,Ke,Ye,{props:[lt.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]));function nr(t,e){return r=>{if(r&&t){let n=null;if(r=/\S*/.exec(r)[0],n=typeof t=="function"?t(r):ft.matchLanguageName(t,r,!0),n instanceof ft)return n.support?n.support.language.parser:Se.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}var st=class{constructor(t,e,r,n,s,i,o){this.node=t,this.from=e,this.to=r,this.spaceBefore=n,this.spaceAfter=s,this.type=i,this.item=o}blank(t,e=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){for(;r.length<t;)r+=" ";return r}else{for(let n=this.to-this.from-r.length-this.spaceAfter.length;n>0;n--)r+=" ";return r+(e?this.spaceAfter:"")}}marker(t,e){let r=this.node.name=="OrderedList"?String(+Yt(this.item,t)[2]+e):"";return this.spaceBefore+r+this.type+this.spaceAfter}};function Wt(t,e){let r=[],n=[];for(let s=t;s;s=s.parent){if(s.name=="FencedCode")return n;(s.name=="ListItem"||s.name=="Blockquote")&&r.push(s)}for(let s=r.length-1;s>=0;s--){let i=r[s],o,a=e.lineAt(i.from),l=i.from-a.from;if(i.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))n.push(new st(i,l,l+o[0].length,"",o[1],">",null));else if(i.name=="ListItem"&&i.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let h=o[3],f=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),n.push(new st(i.parent,l,l+f,o[1],h,o[2],i))}else if(i.name=="ListItem"&&i.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let h=o[4],f=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),f-=4);let d=o[2];o[3]&&(d+=o[3].replace(/[xX]/," ")),n.push(new st(i.parent,l,l+f,o[1],h,d,i))}}return n}function Yt(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function it(t,e,r,n=0){for(let s=-1,i=t;;){if(i.name=="ListItem"){let a=Yt(i,e),l=+a[2];if(s>=0){if(l!=s+1)return;r.push({from:i.from+a[1].length,to:i.from+a[0].length,insert:String(s+2+n)})}s=l}let o=i.nextSibling;if(!o)break;i=o}}function ot(t,e){let r=/^[ \t]*/.exec(t)[0].length;if(!r||e.facet(de)!=" ")return t;let n=O(t,4,r),s="";for(let i=n;i>0;)i>=4?(s+=" ",i-=4):(s+=" ",i--);return s+t.slice(r)}var te=(t={})=>({state:e,dispatch:r})=>{let n=N(e),{doc:s}=e,i=null,o=e.changeByRange(a=>{if(!a.empty||!F.isActiveAt(e,a.from,-1)&&!F.isActiveAt(e,a.from,1))return i={range:a};let l=a.from,h=s.lineAt(l),f=Wt(n.resolveInner(l,-1),s);for(;f.length&&f[f.length-1].from>l-h.from;)f.pop();if(!f.length)return i={range:a};let d=f[f.length-1];if(d.to-d.spaceAfter.length>l-h.from)return i={range:a};let c=l>=d.to-d.spaceAfter.length&&!/\S/.test(h.text.slice(d.to));if(d.item&&c){let L=d.node.firstChild,b=d.node.getChild("ListItem","ListItem");if(L.to>=l||b&&b.to<l||h.from>0&&!/[^\s>]/.test(s.lineAt(h.from-1).text)||t.nonTightLists===!1){let x=f.length>1?f[f.length-2]:null,I,T="";x&&x.item?(I=h.from+x.from,T=x.marker(s,1)):I=h.from+(x?x.to:0);let P=[{from:I,to:l,insert:T}];return d.node.name=="OrderedList"&&it(d.item,s,P,-2),x&&x.node.name=="OrderedList"&&it(x.item,s,P),{range:H.cursor(I+T.length),changes:P}}else{let x=ne(f,e,h);return{range:H.cursor(l+x.length+1),changes:{from:h.from,insert:x+e.lineBreak}}}}if(d.node.name=="Blockquote"&&c&&h.from){let L=s.lineAt(h.from-1),b=/>\s*$/.exec(L.text);if(b&&b.index==d.from){let x=e.changes([{from:L.from+b.index,to:L.to},{from:h.from+d.from,to:h.to}]);return{range:a.map(x),changes:x}}}let p=[];d.node.name=="OrderedList"&&it(d.item,s,p);let k=d.item&&d.item.from<h.from,S="";if(!k||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=d.to)for(let L=0,b=f.length-1;L<=b;L++)S+=L==b&&!k?f[L].marker(s,1):f[L].blank(L<b?O(h.text,4,f[L+1].from)-S.length:null);let A=l;for(;A>h.from&&/\s/.test(h.text.charAt(A-h.from-1));)A--;return S=ot(S,e),sr(d.node,e.doc)&&(S=ne(f,e,h)+e.lineBreak+S),p.push({from:A,to:l,insert:e.lineBreak+S}),{range:H.cursor(A+S.length+1),changes:p}});return i?!1:(r(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},ee=te();function re(t){return t.name=="QuoteMark"||t.name=="ListMark"}function sr(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let r=t.firstChild,n=t.getChild("ListItem","ListItem");if(!n)return!1;let s=e.lineAt(r.to),i=e.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1)<i.number}function ne(t,e,r){let n="";for(let s=0,i=t.length-2;s<=i;s++)n+=t[s].blank(s<i?O(r.text,4,t[s+1].from)-n.length:null,s<i);return ot(n,e)}function ir(t,e){let r=t.resolveInner(e,-1),n=e;re(r)&&(n=r.from,r=r.parent);for(let s;s=r.childBefore(n);)if(re(s))n=s.from;else if(s.name=="OrderedList"||s.name=="BulletList")r=s.lastChild,n=r.to;else break;return r}var se=({state:t,dispatch:e})=>{let r=N(t),n=null,s=t.changeByRange(i=>{let o=i.from,{doc:a}=t;if(i.empty&&F.isActiveAt(t,i.from)){let l=a.lineAt(o),h=Wt(ir(r,o),a);if(h.length){let f=h[h.length-1],d=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(o-l.from>d&&!/\S/.test(l.text.slice(d,o-l.from)))return{range:H.cursor(l.from+d),changes:{from:l.from+d,to:o}};if(o-l.from==d&&(!f.item||l.from<=f.item.from||!/\S/.test(l.text.slice(0,f.to)))){let c=l.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(l.text.slice(f.from,f.to))){let p=f.blank(O(l.text,4,f.to)-O(l.text,4,f.from));return c==l.from&&(p=ot(p,t)),{range:H.cursor(c+p.length),changes:{from:c,to:l.from+f.to,insert:p}}}if(c<o)return{range:H.cursor(c),changes:{from:c,to:o}}}}}return n={range:i}});return n?!1:(e(t.update(s,{scrollIntoView:!0,userEvent:"delete"})),!0)},ie=[{key:"Enter",run:ee},{key:"Backspace",run:se}],oe=Ie({matchClosingTags:!1});function or(t={}){let{codeLanguages:e,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:s}=Kt,completeHTMLTags:i=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=oe}=t;if(!(s instanceof vt))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],h=[a.support,rr],f;o&&h.push(ae),r instanceof ct?(h.push(r.support),f=r.language):r&&(f=r);let d=e||f?nr(e,f):void 0;l.push(qe({codeParser:d,htmlParser:a.language.parser})),n&&h.push(xe.high(ke.of(ie)));let c=nt(s.configure(l));return i&&h.push(c.data.of({autocomplete:ar})),new ct(c,h)}function ar(t){let{state:e,pos:r}=t,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r-25,r));if(!n)return null;let s=N(e).resolveInner(r,-1);for(;s&&!s.type.isTop;){if(s.name=="CodeBlock"||s.name=="FencedCode"||s.name=="ProcessingInstructionBlock"||s.name=="CommentBlock"||s.name=="Link"||s.name=="Image")return null;s=s.parent}return{from:r-n[0].length,to:r,options:lr(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var at=null;function lr(){if(at)return at;let t=Te(new Ae(ue.create({extensions:oe}),0,!0));return at=t?t.options:[]}var hr=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,ae=Le.domEventHandlers({paste:(t,e)=>{var o;let{main:r}=e.state.selection;if(r.empty)return!1;let n=(o=t.clipboardData)==null?void 0:o.getData("text/plain");if(!n||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(n)||(/^www\./.test(n)&&(n="https://"+n),!F.isActiveAt(e.state,r.from,1)))return!1;let s=N(e.state),i=!1;return s.iterate({from:r.from,to:r.to,enter:a=>{(a.from>r.from||hr.test(a.name))&&(i=!0)},leave:a=>{a.to<r.to&&(i=!0)}}),i?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${n})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});export{or as a,ae as c,te as i,se as n,ie as o,ee as r,F as s,Kt as t};
import"./dist-DBwNzi3C.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import{i,n as r,r as a,t as o}from"./dist-CEaOyZOW.js";export{o as closePercentBrace,r as liquid,a as liquidCompletionSource,i as liquidLanguage};
import{D as s,J as r,N as Q,T as n,g as t,q as o,r as c,s as i,u as l}from"./dist-DBwNzi3C.js";var g=o({String:r.string,Number:r.number,"True False":r.bool,PropertyName:r.propertyName,Null:r.null,", :":r.separator,"[ ]":r.squareBracket,"{ }":r.brace}),p=c.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[g],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),m=()=>a=>{try{JSON.parse(a.state.doc.toString())}catch(O){if(!(O instanceof SyntaxError))throw O;let e=u(O,a.state.doc);return[{from:e,message:O.message,severity:"error",to:e}]}return[]};function u(a,O){let e;return(e=a.message.match(/at position (\d+)/))?Math.min(+e[1],O.length):(e=a.message.match(/at line (\d+) column (\d+)/))?Math.min(O.line(+e[1]).from+ +e[2]-1,O.length):0}var P=i.define({name:"json",parser:p.configure({props:[Q.add({Object:t({except:/^\s*\}/}),Array:t({except:/^\s*\]/})}),s.add({"Object Array":n})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function R(){return new l(P)}export{P as n,m as r,R as t};
import"./dist-DBwNzi3C.js";import{a,i as t,n as o,o as s,r as m,t as i}from"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";export{i as autoCloseTags,o as html,m as htmlCompletionSource,t as htmlCompletionSourceWith,a as htmlLanguage,s as htmlPlain};
import{D as Pt,H as W,J as S,N as Vt,at as wt,h as Tt,n as X,nt as vt,q as Xt,r as yt,s as kt,t as $t,u as qt,zt as _t}from"./dist-DBwNzi3C.js";import{r as D,t as Qt}from"./dist-Dcqqg9UU.js";import{a as $,d as At,i as Yt,o as Ct,u as Mt}from"./dist-sMh6mJ2d.js";var Rt=54,Zt=1,Bt=55,Et=2,zt=56,Wt=3,G=4,Dt=5,y=6,I=7,j=8,U=9,N=10,Gt=11,It=12,jt=13,q=57,Ut=14,F=58,H=20,Nt=22,K=23,Ft=24,_=26,J=27,Ht=28,Kt=31,Jt=34,Lt=36,te=37,ee=0,ae=1,le={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},re={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},L={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function ne(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function tt(t){return t==9||t==10||t==13||t==32}var et=null,at=null,lt=0;function Q(t,a){let r=t.pos+a;if(lt==r&&at==t)return et;let l=t.peek(a);for(;tt(l);)l=t.peek(++a);let e="";for(;ne(l);)e+=String.fromCharCode(l),l=t.peek(++a);return at=t,lt=r,et=e?e.toLowerCase():l==se||l==oe?void 0:null}var rt=60,k=62,A=47,se=63,oe=33,Oe=45;function nt(t,a){this.name=t,this.parent=a}var ie=[y,N,I,j,U],ue=new $t({start:null,shift(t,a,r,l){return ie.indexOf(a)>-1?new nt(Q(l,1)||"",t):t},reduce(t,a){return a==H&&t?t.parent:t},reuse(t,a,r,l){let e=a.type.id;return e==y||e==Lt?new nt(Q(l,1)||"",t):t},strict:!1}),pe=new X((t,a)=>{if(t.next!=rt){t.next<0&&a.context&&t.acceptToken(q);return}t.advance();let r=t.next==A;r&&t.advance();let l=Q(t,0);if(l===void 0)return;if(!l)return t.acceptToken(r?Ut:y);let e=a.context?a.context.name:null;if(r){if(l==e)return t.acceptToken(Gt);if(e&&re[e])return t.acceptToken(q,-2);if(a.dialectEnabled(ee))return t.acceptToken(It);for(let s=a.context;s;s=s.parent)if(s.name==l)return;t.acceptToken(jt)}else{if(l=="script")return t.acceptToken(I);if(l=="style")return t.acceptToken(j);if(l=="textarea")return t.acceptToken(U);if(le.hasOwnProperty(l))return t.acceptToken(N);e&&L[e]&&L[e][l]?t.acceptToken(q,-1):t.acceptToken(y)}},{contextual:!0}),ce=new X(t=>{for(let a=0,r=0;;r++){if(t.next<0){r&&t.acceptToken(F);break}if(t.next==Oe)a++;else if(t.next==k&&a>=2){r>=3&&t.acceptToken(F,-2);break}else a=0;t.advance()}});function de(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}var me=new X((t,a)=>{if(t.next==A&&t.peek(1)==k){let r=a.dialectEnabled(ae)||de(a.context);t.acceptToken(r?Dt:G,2)}else t.next==k&&t.acceptToken(G,1)});function Y(t,a,r){let l=2+t.length;return new X(e=>{for(let s=0,o=0,O=0;;O++){if(e.next<0){O&&e.acceptToken(a);break}if(s==0&&e.next==rt||s==1&&e.next==A||s>=2&&s<l&&e.next==t.charCodeAt(s-2))s++,o++;else if((s==2||s==l)&&tt(e.next))o++;else if(s==l&&e.next==k){O>o?e.acceptToken(a,-o):e.acceptToken(r,-(o-2));break}else if((e.next==10||e.next==13)&&O){e.acceptToken(a,1);break}else s=o=0;e.advance()}})}var fe=Y("script",Rt,Zt),Se=Y("style",Bt,Et),he=Y("textarea",zt,Wt),ge=Xt({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),xe=yt.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ue,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[ge],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebhSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXhSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vchS`P!a`!cpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WihSkWc!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QchSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[fe,Se,he,me,pe,ce,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:509},tokenPrec:511});function st(t,a){let r=Object.create(null);for(let l of t.getChildren(K)){let e=l.getChild(Ft),s=l.getChild(_)||l.getChild(J);e&&(r[a.read(e.from,e.to)]=s?s.type.id==_?a.read(s.from+1,s.to-1):a.read(s.from,s.to):"")}return r}function ot(t,a){let r=t.getChild(Nt);return r?a.read(r.from,r.to):" "}function C(t,a,r){let l;for(let e of r)if(!e.attrs||e.attrs(l||(l=st(t.node.parent.firstChild,a))))return{parser:e.parser};return null}function Ot(t=[],a=[]){let r=[],l=[],e=[],s=[];for(let O of t)(O.tag=="script"?r:O.tag=="style"?l:O.tag=="textarea"?e:s).push(O);let o=a.length?Object.create(null):null;for(let O of a)(o[O.name]||(o[O.name]=[])).push(O);return vt((O,i)=>{let h=O.type.id;if(h==Ht)return C(O,i,r);if(h==Kt)return C(O,i,l);if(h==Jt)return C(O,i,e);if(h==H&&s.length){let u=O.node,p=u.firstChild,c=p&&ot(p,i),f;if(c){for(let d of s)if(d.tag==c&&(!d.attrs||d.attrs(f||(f=st(p,i))))){let x=u.lastChild,g=x.type.id==te?x.from:u.to;if(g>p.to)return{parser:d.parser,overlay:[{from:p.to,to:g}]}}}}if(o&&h==K){let u=O.node,p;if(p=u.firstChild){let c=o[i.read(p.from,p.to)];if(c)for(let f of c){if(f.tagName&&f.tagName!=ot(u.parent,i))continue;let d=u.lastChild;if(d.type.id==_){let x=d.from+1,g=d.lastChild,v=d.to-(g&&g.isError?0:1);if(v>x)return{parser:f.parser,overlay:[{from:x,to:v}]}}else if(d.type.id==J)return{parser:f.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}var V=["_blank","_self","_top","_parent"],M=["ascii","utf-8","utf-16","latin1","latin1"],R=["get","post","put","delete"],Z=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],m=["true","false"],n={},be={a:{attrs:{href:null,ping:null,type:null,media:null,target:V,hreflang:null}},abbr:n,address:n,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:n,aside:n,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:n,base:{attrs:{href:null,target:V}},bdi:n,bdo:n,blockquote:{attrs:{cite:null}},body:n,br:n,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Z,formmethod:R,formnovalidate:["novalidate"],formtarget:V,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:n,center:n,cite:n,code:n,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:n,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:n,div:n,dl:n,dt:n,em:n,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:n,figure:n,footer:n,form:{attrs:{action:null,name:null,"accept-charset":M,autocomplete:["on","off"],enctype:Z,method:R,novalidate:["novalidate"],target:V}},h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:n,hgroup:n,hr:n,html:{attrs:{manifest:null}},i:n,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Z,formmethod:R,formnovalidate:["novalidate"],formtarget:V,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:n,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:n,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:n,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:M,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:n,noscript:n,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:n,param:{attrs:{name:null,value:null}},pre:n,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:n,rt:n,ruby:n,samp:n,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:M}},section:n,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:n,source:{attrs:{src:null,type:null,media:null}},span:n,strong:n,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:n,summary:n,sup:n,table:n,tbody:n,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:n,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:n,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:n,time:{attrs:{datetime:null}},title:n,tr:n,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:n,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:n},it={accesskey:null,class:null,contenteditable:m,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:m,autocorrect:m,autocapitalize:m,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":m,"aria-autocomplete":["inline","list","both","none"],"aria-busy":m,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":m,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":m,"aria-hidden":m,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":m,"aria-multiselectable":m,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":m,"aria-relevant":null,"aria-required":m,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},ut="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of ut)it[t]=null;var w=class{constructor(t,a){this.tags=Object.assign(Object.assign({},be),t),this.globalAttrs=Object.assign(Object.assign({},it),a),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};w.default=new w;function b(t,a,r=t.length){if(!a)return"";let l=a.firstChild,e=l&&l.getChild("TagName");return e?t.sliceString(e.from,Math.min(e.to,r)):""}function P(t,a=!1){for(;t;t=t.parent)if(t.name=="Element")if(a)a=!1;else return t;return null}function pt(t,a,r){var l;return((l=r.tags[b(t,P(a))])==null?void 0:l.children)||r.allTags}function B(t,a){let r=[];for(let l=P(a);l&&!l.type.isTop;l=P(l.parent)){let e=b(t,l);if(e&&l.lastChild.name=="CloseTag")break;e&&r.indexOf(e)<0&&(a.name=="EndTag"||a.from>=l.firstChild.to)&&r.push(e)}return r}var ct=/^[:\-\.\w\u00b7-\uffff]*$/;function dt(t,a,r,l,e){let s=/\s*>/.test(t.sliceDoc(e,e+5))?"":">",o=P(r,!0);return{from:l,to:e,options:pt(t.doc,o,a).map(O=>({label:O,type:"type"})).concat(B(t.doc,r).map((O,i)=>({label:"/"+O,apply:"/"+O+s,type:"type",boost:99-i}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function mt(t,a,r,l){let e=/\s*>/.test(t.sliceDoc(l,l+5))?"":">";return{from:r,to:l,options:B(t.doc,a).map((s,o)=>({label:s,apply:s+e,type:"type",boost:99-o})),validFor:ct}}function Pe(t,a,r,l){let e=[],s=0;for(let o of pt(t.doc,r,a))e.push({label:"<"+o,type:"type"});for(let o of B(t.doc,r))e.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:l,to:l,options:e,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Ve(t,a,r,l,e){let s=P(r),o=s?a.tags[b(t.doc,s)]:null,O=o&&o.attrs?Object.keys(o.attrs):[];return{from:l,to:e,options:(o&&o.globalAttrs===!1?O:O.length?O.concat(a.globalAttrNames):a.globalAttrNames).map(i=>({label:i,type:"property"})),validFor:ct}}function we(t,a,r,l,e){var i;let s=(i=r.parent)==null?void 0:i.getChild("AttributeName"),o=[],O;if(s){let h=t.sliceDoc(s.from,s.to),u=a.globalAttrs[h];if(!u){let p=P(r),c=p?a.tags[b(t.doc,p)]:null;u=(c==null?void 0:c.attrs)&&c.attrs[h]}if(u){let p=t.sliceDoc(l,e).toLowerCase(),c='"',f='"';/^['"]/.test(p)?(O=p[0]=='"'?/^[^"]*$/:/^[^']*$/,c="",f=t.sliceDoc(e,e+1)==p[0]?"":p[0],p=p.slice(1),l++):O=/^[^\s<>='"]*$/;for(let d of u)o.push({label:d,apply:c+d+f,type:"constant"})}}return{from:l,to:e,options:o,validFor:O}}function ft(t,a){let{state:r,pos:l}=a,e=W(r).resolveInner(l,-1),s=e.resolve(l);for(let o=l,O;s==e&&(O=e.childBefore(o));){let i=O.lastChild;if(!i||!i.type.isError||i.from<i.to)break;s=e=O,o=i.from}return e.name=="TagName"?e.parent&&/CloseTag$/.test(e.parent.name)?mt(r,e,e.from,l):dt(r,t,e,e.from,l):e.name=="StartTag"?dt(r,t,e,l,l):e.name=="StartCloseTag"||e.name=="IncompleteCloseTag"?mt(r,e,l,l):e.name=="OpenTag"||e.name=="SelfClosingTag"||e.name=="AttributeName"?Ve(r,t,e,e.name=="AttributeName"?e.from:l,l):e.name=="Is"||e.name=="AttributeValue"||e.name=="UnquotedAttributeValue"?we(r,t,e,e.name=="Is"?l:e.from,l):a.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Pe(r,t,e,l):null}function Te(t){return ft(w.default,t)}function St(t){let{extraTags:a,extraGlobalAttributes:r}=t,l=r||a?new w(a,r):w.default;return e=>ft(l,e)}var ve=$.parser.configure({top:"SingleExpression"}),ht=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:At.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:Ct.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:Mt.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:ve},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:$.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:D.parser}],gt=[{name:"style",parser:D.parser.configure({top:"Styles"})}].concat(ut.map(t=>({name:t,parser:$.parser}))),E=kt.define({name:"html",parser:xe.configure({props:[Vt.add({Element(t){let a=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+a[0].length?t.continue():t.lineIndent(t.node.from)+(a[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let a=null,r;for(let l=t.node;;){let e=l.lastChild;if(!e||e.name!="Element"||e.to!=l.to)break;a=l=e}return a&&!((r=a.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?t.lineIndent(a.from)+t.unit:null}}),Pt.add({Element(t){let a=t.firstChild,r=t.lastChild;return!a||a.name!="OpenTag"?null:{from:a.to,to:r.name=="CloseTag"?r.from:t.to}}}),Tt.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),T=E.configure({wrap:Ot(ht,gt)});function Xe(t={}){let a="",r;return t.matchClosingTags===!1&&(a="noMatch"),t.selfClosingTags===!0&&(a=(a?a+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(r=Ot((t.nestedLanguages||[]).concat(ht),(t.nestedAttributes||[]).concat(gt))),new qt(r?E.configure({wrap:r,dialect:a}):a?T.configure({dialect:a}):T,[T.data.of({autocomplete:St(t)}),t.autoCloseTags===!1?[]:bt,Yt().support,Qt().support])}var xt=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),bt=wt.inputHandler.of((t,a,r,l,e)=>{if(t.composing||t.state.readOnly||a!=r||l!=">"&&l!="/"||!T.isActiveAt(t.state,a,-1))return!1;let s=e(),{state:o}=s,O=o.changeByRange(i=>{var f,d,x;let h=o.doc.sliceString(i.from-1,i.to)==l,{head:u}=i,p=W(o).resolveInner(u,-1),c;if(h&&l==">"&&p.name=="EndTag"){let g=p.parent;if(((d=(f=g.parent)==null?void 0:f.lastChild)==null?void 0:d.name)!="CloseTag"&&(c=b(o.doc,g.parent,u))&&!xt.has(c))return{range:i,changes:{from:u,to:u+(o.doc.sliceString(u,u+1)===">"?1:0),insert:`</${c}>`}}}else if(h&&l=="/"&&p.name=="IncompleteCloseTag"){let g=p.parent;if(p.from==u-2&&((x=g.lastChild)==null?void 0:x.name)!="CloseTag"&&(c=b(o.doc,g,u))&&!xt.has(c)){let v=u+(o.doc.sliceString(u,u+1)===">"?1:0),z=`${c}>`;return{range:_t.cursor(u+z.length,-1),changes:{from:u,to:v,insert:z}}}}return{range:i}});return O.changes.empty?!1:(t.dispatch([s,o.update(O,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{T as a,St as i,Xe as n,E as o,Te as r,bt as t};
import"./dist-DBwNzi3C.js";import{a,c as s,d as t,f as e,i as o,l as p,n as i,o as n,r,s as c,t as g,u}from"./dist-sMh6mJ2d.js";export{g as autoCloseTags,i as completionPath,r as esLint,o as javascript,a as javascriptLanguage,n as jsxLanguage,c as localCompletionSource,s as scopeCompletionSource,p as snippets,u as tsxLanguage,t as typescriptLanguage,e as typescriptSnippets};
import"./dist-DBwNzi3C.js";import{n as s,r as a,t as n}from"./dist-BpuNldXk.js";export{n as json,s as jsonLanguage,a as jsonParseLinter};
import{s as b}from"./chunk-LvLJmgfZ.js";import{t as v}from"./react-Bj1aDYRI.js";import{t as m}from"./emotion-is-prop-valid.esm-C59xfSYt.js";var O=function(){let r=Array.prototype.slice.call(arguments).filter(Boolean),e={},a=[];r.forEach(s=>{(s?s.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){let[,o]=l.split("_");e[o]=l}else a.push(l)})});let t=[];for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(e[s]);return t.push(...a),t.join(" ")},f=b(v(),1),x=r=>r.toUpperCase()===r,R=r=>e=>r.indexOf(e)===-1,_=(r,e)=>{let a={};return Object.keys(r).filter(R(e)).forEach(t=>{a[t]=r[t]}),a};function g(r,e,a){let t=_(e,a);if(!r){let s=typeof m=="function"?{default:m}:m;Object.keys(t).forEach(l=>{s.default(l)||delete t[l]})}return t}function k(r){return e=>{let a=(s,l)=>{let{as:o=r,class:y=""}=s,n=g(e.propsAsIs===void 0?!(typeof o=="string"&&o.indexOf("-")===-1&&!x(o[0])):e.propsAsIs,s,["as","class"]);n.ref=l,n.className=e.atomic?O(e.class,n.className||y):O(n.className||y,e.class);let{vars:c}=e;if(c){let p={};for(let i in c){let E=c[i],u=E[0],j=E[1]||"",N=typeof u=="function"?u(s):u;e.name,p[`--${i}`]=`${N}${j}`}let d=n.style||{},h=Object.keys(d);h.length>0&&h.forEach(i=>{p[i]=d[i]}),n.style=p}return r.__linaria&&r!==o?(n.as=o,f.createElement(r,n)):f.createElement(o,n)},t=f.forwardRef?f.forwardRef(a):s=>a(_(s,["innerRef"]),s.innerRef);return t.displayName=e.name,t.__linaria={className:e.class||"",extends:r},t}}var w=k;export{w as t};

Sorry, the diff of this file is too big to display

import"./dist-DBwNzi3C.js";import{n as a,r as t,t as m}from"./dist-CNW1zLeq.js";export{m as yaml,a as yamlFrontmatter,t as yamlLanguage};
import{t as g}from"./chunk-LvLJmgfZ.js";var p=g((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"})),f=g((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var t=p();function R(r){return t.relativeFirstCharacters.indexOf(r[0])>-1}function m(r){return r.replace(t.ctrlCharactersRegex,"").replace(t.htmlEntitiesRegex,function(l,a){return String.fromCharCode(a)})}function x(r){return URL.canParse(r)}function s(r){try{return decodeURIComponent(r)}catch{return r}}function C(r){if(!r)return t.BLANK_URL;var l,a=s(r.trim());do a=m(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),a=s(a),l=a.match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex);while(l&&l.length>0);var i=a;if(!i)return t.BLANK_URL;if(R(i))return i;var h=i.trimStart(),u=h.match(t.urlSchemeRegex);if(!u)return i;var n=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(n))return t.BLANK_URL;var o=h.replace(/\\/g,"/");if(n==="mailto:"||n.includes("://"))return o;if(n==="http:"||n==="https:"){if(!x(o))return t.BLANK_URL;var c=new URL(o);return c.protocol=c.protocol.toLowerCase(),c.hostname=c.hostname.toLowerCase(),c.toString()}return o}e.sanitizeUrl=C}));export{f as t};
import{$ as x,D as w,H as s,J as O,N as k,T as h,Y as d,g as $,i as y,n as u,q as f,r as j,s as g,t as U,u as G,x as b,y as Z}from"./dist-DBwNzi3C.js";import{m as P,s as q,u as _}from"./dist-ChS0Dc_R.js";var E=177,v=179,D=184,C=12,z=13,F=17,B=20,N=25,I=53,L=95,A=142,J=144,M=145,H=148,K=10,OO=13,QO=32,eO=9,l=47,aO=41,XO=125,iO=new u((Q,e)=>{for(let t=0,a=Q.next;(e.context&&(a<0||a==K||a==OO||a==l&&Q.peek(t+1)==l)||a==aO||a==XO)&&Q.acceptToken(E),!(a!=QO&&a!=eO);)a=Q.peek(++t)},{contextual:!0}),PO=new Set([L,D,B,C,F,J,M,A,H,z,I,N]),tO=new U({start:!1,shift:(Q,e)=>e==v?Q:PO.has(e)}),nO=f({"func interface struct chan map const type var":O.definitionKeyword,"import package":O.moduleKeyword,"switch for go select return break continue goto fallthrough case if else defer":O.controlKeyword,range:O.keyword,Bool:O.bool,String:O.string,Rune:O.character,Number:O.number,Nil:O.null,VariableName:O.variableName,DefName:O.definition(O.variableName),TypeName:O.typeName,LabelName:O.labelName,FieldName:O.propertyName,"FunctionDecl/DefName":O.function(O.definition(O.variableName)),"TypeSpec/DefName":O.definition(O.typeName),"CallExpr/VariableName":O.function(O.variableName),LineComment:O.lineComment,BlockComment:O.blockComment,LogicOp:O.logicOperator,ArithOp:O.arithmeticOperator,BitOp:O.bitwiseOperator,"DerefOp .":O.derefOperator,"UpdateOp IncDecOp":O.updateOperator,CompareOp:O.compareOperator,"= :=":O.definitionOperator,"<-":O.operator,'~ "*"':O.modifier,"; ,":O.separator,"... :":O.punctuation,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),oO={__proto__:null,package:10,import:18,true:380,false:380,nil:383,struct:48,func:68,interface:78,chan:94,map:118,make:157,new:159,const:204,type:212,var:224,if:236,else:238,switch:242,case:248,default:250,for:260,range:266,go:270,select:274,return:284,break:288,continue:290,goto:292,fallthrough:296,defer:300},cO=j.deserialize({version:14,states:"!=xO#{QQOOP$SOQOOO&UQTO'#CbO&]QRO'#FlO]QQOOOOQP'#Cn'#CnOOQP'#Co'#CoO&eQQO'#C|O(kQQO'#C{O)]QRO'#GiO+tQQO'#D_OOQP'#Ge'#GeO+{QQO'#GeO.aQTO'#GaO.hQQO'#D`OOQP'#Gm'#GmO.mQRO'#GdO/hQQO'#DgOOQP'#Gd'#GdO/uQQO'#DrO2bQQO'#DsO4QQTO'#GqO,^QTO'#GaO4XQQO'#DxO4^QQO'#D{OOQO'#EQ'#EQOOQO'#ER'#EROOQO'#ES'#ESOOQO'#ET'#ETO4cQQO'#EPO5}QQO'#EPOOQP'#Ga'#GaO6UQQO'#E`O6^QQO'#EcOOQP'#G`'#G`O6cQQO'#EsOOQP'#G_'#G_O&]QRO'#FnOOQO'#Fn'#FnO9QQQO'#G^QOQQOOO&]QROOO9XQQO'#C`O9^QSO'#CdO9lQQO'#C}O9tQQO'#DSO9yQQO'#D[O:kQQO'#CsO:pQQO'#DhO:uQQO'#EeO:}QQO'#EiO;VQQO'#EoO;_QQO'#EuO<uQQO'#ExO<|QQO'#FRO4cQQO'#FWO=WQQO'#FYO=]QRO'#F_O=jQRO'#FaO=uQQO'#FaOOQP'#Fe'#FeO4cQQO'#FgP=zOWO'#C^POOO)CAz)CAzOOQO'#G]'#G]OOQO,5<W,5<WOOQO-E9j-E9jO?TQTO'#CqOOQO'#C|'#C|OOQP,59g,59gO?tQQO'#D_O@fQSO'#FuO@kQQO'#C}O@pQQO'#D[O9XQQO'#FqO@uQRO,5=TOAyQQO,59yOCVQSO,5:[O@kQQO'#C}OCaQQO'#DjOOQP,59^,59^OOQO,5<a,5<aO?tQQO'#DeOOQO,5:e,5:eOOQO-E9s-E9sOOQP,59z,59zOOQP,59|,59|OCqQSO,5:QO(kQQO,5:ROC{QQO,5:RO&]QRO'#FxOOQO'#Fx'#FxOFjQQO'#GpOFwQQO,5:^OF|QQO,5:_OHdQQO,5:`OHlQQO,5:aOHvQRO'#FyOIaQRO,5=]OIuQQO'#DzOOQP,5:d,5:dOOQO'#EV'#EVOOQO'#EW'#EWOOQO'#EX'#EXOOQO'#EZ'#EZOOQO'#E['#E[O4cQQO,5:pO4cQQO,5:pO4cQQO,5:pO4cQQO,5:pO4cQQO,5:pO4cQQO,5:wOOQP,5:x,5:xO?tQQO'#EOOOQP,5:g,5:gOOQP,5:k,5:kO9yQQO,59vO4cQQO,5:zO4cQQO,5:}OI|QRO,5;_OOQO,5<Y,5<YOOQO-E9l-E9lO]QQOOOOQP'#Cb'#CbOOQP,58z,58zOOQP'#Cf'#CfOJWQQO'#CfOJ]QSO'#CkOOQP,59O,59OOJkQQO'#DPOLZQQO,5<UOLbQQO,59iOLsQQO,5<TOMpQQO'#DUOOQP,59n,59nOOQP,59v,59vONfQQO,59vONmQQO'#CwOOQP,59_,59_O?tQQO,5:SONxQRO'#EgO! VQQO'#EhOOQP,5;P,5;PO! |QQO'#EkO!!WQQO'#EnOOQP,5;T,5;TO!!`QRO'#EqO!!mQQO'#ErOOQP,5;Z,5;ZO!!uQTO'#CbO!!|QTO,5;aO&]QRO,5;aO!#WQQO,5;jO!$yQTO,5;dO!%WQQO'#EzOOQP,5;d,5;dO&]QRO,5;dO!%cQSO,5;mO!%mQQO'#E`O!%uQQO'#EcO!%zQQO'#FTO!&UQQO'#FTOOQP,5;m,5;mO!&ZQQO,5;mO!&`QTO,5;rO!&mQQO'#F[OOQP,5;t,5;tO!&xQTO'#GqOOQP,5;y,5;yOOQP'#Et'#EtOOQP,5;{,5;{O!']QTO,5<RPOOO'#Fk'#FkP!'jOWO,58xPOOO,58x,58xO!'uQQO,59yO!'zQQO'#GgOOQP,59i,59iO(kQQO,59vOOQP,5<],5<]OOQP-E9o-E9oOOQP1G/e1G/eOOQP1G/v1G/vO!([QSO'#DlO!(lQQO'#DlO!(wQQO'#DkOOQO'#Go'#GoO!(|QQO'#GoO!)UQQO,5:UO!)ZQQO'#GnO!)fQQO,5:PPOQO'#Cq'#CqO(kQQO1G/lOOQP1G/m1G/mO(kQQO1G/mOOQO,5<d,5<dOOQO-E9v-E9vOOQP1G/x1G/xO!)kQSO1G/yOOQP'#Cy'#CyOOQP1G/z1G/zO?tQQO1G/}O!)xQSO1G/{O!*YQQO1G/|O!*gQTO,5<eOOQP-E9w-E9wOOQP,5:f,5:fO!+QQQO,5:fOOQP1G0[1G0[O!,vQTO1G0[O!.wQTO1G0[O!/OQTO1G0[O!0pQTO1G0[O!1QQTO1G0cO!1bQQO,5:jOOQP1G/b1G/bOOQP1G0f1G0fOOQP1G0i1G0iOOQP1G0y1G0yOOQP,59Q,59QO&]QRO'#FmO!1mQSO,59VOOQP,59V,59VOOQO'#DQ'#DQO?tQQO'#DQO!1{QQO'#DQOOQO'#Gh'#GhO!2SQQO'#GhO!2[QQO,59kO!2aQSO'#CqOJkQQO'#DPOOQP,5=R,5=RO@kQQO1G1pOOQP1G/w1G/wO.hQQO'#ElO!2rQRO1G1oO@kQQO1G1oO@kQQO'#DVO?tQQO'#DWOOQP'#Gk'#GkO!2}QRO'#GjOOQP'#Gj'#GjO&]QRO'#FsO!3`QQO,59pOOQP,59p,59pO!3gQRO'#CxO!3uQQO'#CxO!3|QRO'#CxO.hQQO'#CxO&]QRO'#FoO!4XQQO,59cOOQP,59c,59cO!4dQQO1G/nO4cQQO,5;RO!4iQQO,5;RO&]QRO'#FzO!4nQQO,5;SOOQP,5;S,5;SO!6aQQO'#DgO?tQQO,5;VOOQP,5;V,5;VO&]QRO'#F}O!6hQQO,5;YOOQP,5;Y,5;YO!6pQRO,5;]O4cQQO,5;]O&]QRO'#GOO!6{QQO,5;^OOQP,5;^,5;^O!7TQRO1G0{O!7`QQO1G0{O4cQQO1G1UO!8vQQO1G1UOOQP1G1O1G1OO!9OQQO'#GPO!9YQQO,5;fOOQP,5;f,5;fO4cQQO'#E{O!9eQQO'#E{O<uQQO1G1OOOQP1G1X1G1XO!9jQQO,5:zO!9jQQO,5:}O!9tQSO,5;oO!:OQQO,5;oO!:VQQO,5;oO!9OQQO'#GRO!:aQQO,5;vOOQP,5;v,5;vO!<PQQO'#F]O!<WQQO'#F]POOO-E9i-E9iPOOO1G.d1G.dO!<]QQO,5:VO!<gQQO,5=ZO!<tQQO,5=ZOOQP1G/p1G/pO!<|QQO,5=YO!=WQQO,5=YOOQP1G/k1G/kOOQP7+%W7+%WOOQP7+%X7+%XOOQP7+%e7+%eO!=cQQO7+%eO!=hQQO7+%iOOQP7+%g7+%gO!=mQQO7+%gO!=rQQO7+%hO!>PQSO7+%hOOQP7+%h7+%hO4cQQO7+%hOOQP1G0Q1G0QO!>^QQO1G0QOOQP1G0U1G0UO!>fQQO1G0UOF|QQO1G0UOOQO,5<X,5<XOOQO-E9k-E9kOOQP1G.q1G.qOOQO,59l,59lO?tQQO,59lO!?cQQO,5=SO!?jQQO,5=SOOQP1G/V1G/VO!?rQQO,59yO!?}QRO7+'[O!@YQQO'#EmO!@dQQO'#HOO!@lQQO,5;WOOQP7+'Z7+'ZO!@qQRO7+'ZOOQP,59q,59qOOQP,59r,59rOOQO'#DZ'#DZO!@]QQO'#FtO!@|QRO,59tOOQO,5<_,5<_OOQO-E9q-E9qOOQP1G/[1G/[OOQP,59d,59dOHgQQO'#FpO!3uQQO,59dO!A_QRO,59dO!AjQRO,59dOOQO,5<Z,5<ZOOQO-E9m-E9mOOQP1G.}1G.}O(kQQO7+%YOOQP1G0m1G0mO4cQQO1G0mOOQO,5<f,5<fOOQO-E9x-E9xOOQP1G0n1G0nO!AxQQO'#GdOOQP1G0q1G0qOOQO,5<i,5<iOOQO-E9{-E9{OOQP1G0t1G0tO4cQQO1G0wOOQP1G0w1G0wOOQO,5<j,5<jOOQO-E9|-E9|OOQP1G0x1G0xO!B]QQO7+&gO!BeQSO7+&gO!CsQSO7+&pO!CzQQO7+&pOOQO,5<k,5<kOOQO-E9}-E9}OOQP1G1Q1G1QO!DRQQO,5;gOOQO,5;g,5;gO!DWQSO7+&jOOQP7+&j7+&jO!DbQQO7+&pO!7`QQO1G1[O!DgQQO1G1ZOOQO1G1Z1G1ZO!DnQSO1G1ZOOQO,5<m,5<mOOQO-E:P-E:POOQP1G1b1G1bO!DxQSO'#GqO!E]QQO'#F^O!EbQQO'#F^O!EgQQO,5;wOOQO,5;w,5;wO!ElQSO1G/qOOQO1G/q1G/qO!EyQSO'#DoO!FZQQO'#DoO!FfQQO'#DnOOQO,5<c,5<cO!FkQQO1G2uOOQO-E9u-E9uOOQO,5<b,5<bO!FxQQO1G2tOOQO-E9t-E9tOOQP<<IP<<IPOOQP<<IT<<ITOOQP<<IR<<IRO!GSQSO<<ISOOQP<<IS<<ISO4cQQO<<ISO!GaQSO<<ISOOQP7+%l7+%lO!GkQQO7+%lOOQP7+%p7+%pO!GpQQO7+%pO!GuQQO7+%pOOQO1G/W1G/WOOQO,5<^,5<^O!G}QQO1G2nOOQO-E9p-E9pOOQP<<Jv<<JvO.hQQO'#F{O!@YQQO,5;XOOQO,5;X,5;XO!HUQQO,5=jO!H^QQO,5=jOOQO1G0r1G0rOOQP<<Ju<<JuOOQP,5<`,5<`OOQP-E9r-E9rOOQO,5<[,5<[OOQO-E9n-E9nO!HfQRO1G/OOOQP1G/O1G/OOOQP<<Ht<<HtOOQP7+&X7+&XO!HqQQO'#DeOOQP7+&c7+&cOOQP<<JR<<JRO!HxQRO<<JRO!ITQQO<<J[O!I]QQO<<J[OOQO1G1R1G1ROOQP<<JU<<JUO4cQQO<<J[O!IbQSO7+&vOOQO7+&u7+&uO!IlQQO7+&uO4cQQO,5;xOOQO1G1c1G1cO!<]QQO,5:YP!<]QQO'#FwP?tQQO'#FvOOQPAN>nAN>nO4cQQOAN>nO!IsQSOAN>nOOQP<<IW<<IWOOQP<<I[<<I[O!I}QQO<<I[P!>nQQO'#FrOOQO,5<g,5<gOOQO-E9y-E9yOOQO1G0s1G0sOOQO,5<h,5<hO!JVQQO1G3UOOQO-E9z-E9zOOQP7+$j7+$jO!J_QQO'#GnO!B]QQOAN?mO!JjQQOAN?vO!JqQQOAN?vO!KzQSOAN?vOOQO<<Ja<<JaO!LRQSO1G1dO!L]QSO1G/tOOQO1G/t1G/tO!LjQSOG24YOOQPG24YG24YOOQPAN>vAN>vO!LtQQOAN>vP.hQQO'#F|OOQPG25XG25XO!LyQQOG25bO!MOQQO'#FPOOQPG25bG25bO!MZQQOG25bOOQPLD)tLD)tOOQPG24bG24bO!JqQQOLD*|O!9OQQO'#GQO!McQQO,5;kOOQP,5;k,5;kO?tQQO'#FQO!MnQQO'#FQO!MsQQOLD*|OOQP!$'Nh!$'NhOOQO,5<l,5<lOOQO-E:O-E:OOOQP1G1V1G1VO!MzQQO,5;lOOQO,5;l,5;lO!NPQQO!$'NhOOQO1G1W1G1WO!JqQQO!)9DSOOQP!.K9n!.K9nO# {QTO'#CqO#!`QTO'#CqO##}QSO'#CqO#$XQSO'#CqO#&]QSO'#CqO#&gQQO'#FyO#&tQQO'#FyO#'OQQO,5=]O#'ZQQO,5=]O#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO!7`QQO,5:wO!7`QQO,5:zO!7`QQO,5:}O#(yQSO'#CbO#)}QSO'#CbO#*bQSO'#GqO#*rQSO'#GqO#+PQRO'#GgO#+yQSO,5<eO#,ZQSO,5<eO#,hQSO1G0[O#-rQTO1G0[O#-yQSO1G0[O#.TQSO1G0[O#0{QTO1G0[O#1SQSO1G0[O#2eQSO1G0[O#2lQTO1G0[O#2sQSO1G0[O#4XQSO1G0[O#4`QTO1G0[O#4jQSO1G0[O#4wQSO1G0cO#5dQTO'#CqO#5kQTO'#CqO#6bQSO'#GqO#'cQQO'#EPO!7`QQO'#EPOF|QQO'#EPO#8]QQO'#EPO#8gQQO'#EPO#8qQQO'#EPO#8{QQO'#E`O#9TQQO'#EcO@kQQO'#C}O?tQQO,5:RO#9YQQO,59vO#:iQQO,59vO?tQQO,59vO?tQQO1G/lO?tQQO1G/mO?tQQO7+%YO?tQQO'#C{O#:pQQO'#DgO#9YQQO'#D[O#:wQQO'#D[O#:|QSO,5:QO#;WQQO,5:RO#;]QQO1G/nO?tQQO,5:SO#;bQQO'#Dh",stateData:"#;m~O$yOSPOS$zPQ~OVvOX{O[oO^YOaoOdoOh!POjcOr|Ow}O!P!OO!QnO!WaO!]!QO!phO!qhO#Y!RO#^!SO#d!TO#j!UO#m!VO#v!WO#{!XO#}!YO$S!ZO$U![O$V![O$W!]O$Y!^O$[!_O%OQO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO$v%QP~OTzO~P]O$z!`O~OVeXZeX^eX^!TXj!TXnUXneX!QeX!WeX!W!TX!|eX#ReX#TeX#UeX#WUX$weX%YeX%`eX%feX%geX%ieX%jeX%keX%leX%meX%neX%oeX%peX%qeX~O!a#hX~P$XOV!bO$w!bO~O[!wX^pX^!wXa!wXd!wXhpXh!wXrpXr!wXwpXw!wX!PpX!P!wX!QpX!Q!wX!WpX!W!wX!]pX!]!wX!p!wX!q!wX%OpX%O!wX%U!wX%V!wX%YpX%Y!wX%f!wX%g!wX%h!wX%i!wX%j!wX~O^!hOh!POr!jOw}O!P!OO!Q!kO!WaO!]!QO%O!eO%Y!fO~On!lO#W%]XV%]X^%]Xh%]Xr%]Xw%]X!P%]X!Q%]X!W%]X!]%]X#T%]X$w%]X%O%]X%Y%]Xu%]X~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!WaO!]!QO!phO!qhO%O+wO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O!Q-OO~P*aOj!qO^%XX]%XXn%XX!V%XX~O!W!tOV%TXZ%TX^%TXn%TX!Q%TX!W%TX!|%TX#R%TX#T%TX#U%TX$w%TX%Y%TX%`%TX%f%TX%g%TX%i%TX%j%TX%k%TX%l%TX%m%TX%n%TX%o%TX%p%TX%q%TX]%TX!V%TXj%TXi%TX!a%TXu%TX~OZ!sO~P,^O%O!eO~O!W!tO^%WXj%WX]%WXn%WX!V%WXu%WXV%WX$w%WX%`%WX#T%WX[%WX!a%WX~Ou!{O!QnO!V!zO~P*aOV!}O[oO^YOaoOdoOh!POjcOr!pOw}O!P!OO!QnO!WaO!]!QO!phO!qhO#Y!RO#^!SO#d!TO#j!UO#m!VO#v!WO#{!XO#}!YO$S!ZO$U![O$V![O$W!]O$Y!^O$[!_O%OQO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlOi%dP~O^#QO~OZ#RO^#VOn#TO!Q#cO!W#SO#R#dO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]OV`X#T%eX#U%eX$w`X~O!|#`O~P2gO^#VO~O^#eO~O!QnO~P*aO[oO^YOaoOdoOh!POr!pOw}O!QnO!WaO!]!QO!phO!qhO%O+wO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O!P#hO~P4jO#T#iO#U#iO~O#W#jO~O!a#kO~OVvO[oO^YOaoOdoOh!POjcOr|Ow}O!P!OO!QnO!WaO!]!QO!phO!qhO#Y!RO#^!SO#d!TO#j!UO#m!VO#v!WO#{!XO#}!YO$S!ZO$U![O$V![O$W!]O$Y!^O$[!_O%OQO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O$v%QX~P6hO%O#oO~OZ#rO[#qO^#sO%O#oO~O^#uO%O#oO~Oj#yO~O^!hOh!POr!jOw}O!P!OO!Q#|O!WaO!]!QO%O!eO%Y!fO~Oj#}O~O!W$PO~O^$RO%O#oO~O^$UO%O#oO~O^$XO%O#oO~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!Q-PO!WaO!]!QO!phO!qhO%O$ZO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~Oj$`O~P;_OV$fOjcO~P;_Oj$kO~O!QnOV$RX$w$RX~P*aO%O$oOV$TX$w$TX~O%O$oO~O${$rO$|$rO$}$tO~OZeX^!TX!W!TXj!TXn!TXh!TXr!TXw!TX{!TX!P!TX!Q!TX!]!TX%O!TX%Y!TX~O]!TX!V!TXu!TX#T!TXV!TX$w!TX%`!TX[!TX!a!TX~P>VO^!hOh!POr-TOw}O!P-_O!Q-`O!W-^O!]-eO%O!eO%Y!fO~OZ!sO~O^#uO~O!P$xO~On!lO#W%]aV%]a^%]ah%]ar%]aw%]a!P%]a!Q%]a!W%]a!]%]a#T%]a$w%]a%O%]a%Y%]au%]a~O]${O^#QO~OZ#RO^#VO!W#SO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]O~O]$|O!|,WO~PBROj!qOn%QO!QnOi%cP~P*aO!V%WO!|#`O~PBRO!V%YO~OV!}O[oO^YOaoOdoOh!POjcOr!pOw}O!P!OO!QnO!WaO!]!QO!phO!qhO#Y!RO#^!SO#d!TO#j!UO#m!VO#v!WO#{!XO#}!YO$S!ZO$U![O$V![O$W!]O$Y!^O$[!_O%OQO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~Oi%dX#p%dX#q%dX~PDQOi%]O~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!Q-QO!WaO!]!QO!phO!qhO%O+{O%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O^%aO%O%_O~O!QnO!a%cO~P*aO!QnOn$mX#T$mX#U$mXV$mX$w$mX!a$mX~P*aOn#TO#T%ea#U%eaV%ea$w%ea!a%ea~O]%fO~PF|OV#ga$w#ga~PDTO[%sO~OZ#rO[#qO]%vO%O#oO~O^!hOh!POn%zOr-TOu%xOw}O!P-_O!Q-`O!W-^O!]-eO%O,dO%Y!fO]%[P~O^&OOh!POr!jOw}O!P!OO!Q!kO!WaO!]!QO%Y!fO^%ZXj%ZX~O%O%}O~PKfOjcO^qa]qanqa!Vqa~O^#uO!W&SO~O^!hOh!POr-TOw}O{&WO!P-_O!Q-`O!W-^O!]-eO%O,xO%Y!fO~Oi&^O~PL{O^!hOh!POr!jOw}O!Q!kO!WaO!]!QO%O!eO%Y!fO~O!P#hO~PMwOi&eO%O,yO%Y!fO~O#T&gOV#ZX$w#ZX~P?tO]&kO%O#oO~O^!hOh!POr-TOw}O!P-_O!Q-`O!]-eO%O!eO%Y!fO~O!W&lO#T&mO~P! _O]&qO%O#oO~O#T&sOV#eX$w#eX~P?tO]&vO%O#oO~OjeX~P$XOjcO!|,XO~P2gOn!lO#W&yO#W%]X~O^#VOn#TO!Q#cO!W#SO!|,XO#R#dO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]OV`X#T%eX#U%eX~OZ&zOj$`O$w`X~P!#cOi'OO#p'PO#q'QO~OZ#ROjcO~P!#cO#T'TO#U#iO~O#W'UO~OV'WO!QnO~P*aOV'XO~OjcO~O!|#`OV#za$w#za~PBROi'[O#p']O#q'^O~On#TO!|#`OV%eX$w%eX!a%eX~PBRO!|#`OV$Za$w$Za~PBRO${$rO$|$rO$}'`O~O]${O~O%O!eO]%ZXn%ZX!V%ZX~PKfO!|#`Oi!_Xn!_X!a!`X~PBROi!_Xn!_X!a!`X~O!a'aO~On'bOi%cX~Oi'dO~On'eO!V%bX!a%bX~O!V'gO~O]'jOn'kO!|,YO~PBROn'nO!V'mO!a'oO!|#`O~PBRO!QnO!V'qO!a'rO~P*aO!|#`On$ma#T$ma#U$maV$ma$w$ma!a$ma~PBRO]'sOu'tO~O%Y#XO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOV!xiZ!xi^!xin!xi!Q!xi!W!xi!|!xi#R!xi#T!xi#U!xi$w!xi%`!xi%f!xi%g!xi%i!xi%p!xi%q!xi~O!V!xii!xi!a!xi~P!+YO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOV!xiZ!xi^!xin!xi!Q!xi!W!xi#R!xi#T!xi#U!xi$w!xi%p!xi%q!xi!V!xii!xi!a!xi~O!|!xi~P!-TO!|#`O~P!-TO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[OV!xiZ!xi^!xin!xi!Q!xi!W!xi#R!xi#T!xi#U!xi$w!xi%q!xi~O!|#`O!V!xii!xi!a!xi~P!/VO!|#`OV#Pi$w#Pi!a#Pi~PBRO]'uOn'wOu'vO~OZ#rO[#qO]'zO%O#oO~Ou'|O~P?tOn'}O]%[X~O](PO~OZeX^mX^!TXj!TX!W!TX~OjcOV$]i$w$]i~O%`(ZOV%^X$w%^Xn%^X!V%^X~Oi(`O~PL{O[(aO!W!tOVlX$wlX~On(bO~P?tO[(aOVlX$wlX~Oi(hO%O,yO%Y!fO~O!V(iO~O#T(kO~O](nO%O#oO~O[oO^YOaoOdoOh!POr!pOu-bOw}O!P!OO!QnO!V-UO!WaO!]!QO!phO!qhO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O%O+zO~P!4vO](sO%O#oO~O#T(tOV#ea$w#ea~O](xO%O#oO~O#k(yOV#ii$w#ii~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!Q-PO!WaO!]!QO!phO!qhO%O+xO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O^(|O%O%_O~O#p%dP#q%dP~P/uOi)PO#p'PO#q'QO~O!a)RO~O!QnO#y)VO~P*aOV)WO!|#`O~PBROj#wa~P;_OV)WO!QnO~P*aOi)]O#p']O#q'^O~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!QnO!WaO!]!QO!phO!qhO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O%O,eO~P!:lO!a)bO~Oj!qO!QnO~P*aOj!qO!QnOi%ca~P*aOn)iOi%ca~O!V%ba!a%ba~P?tOn)lO!V%ba!a%ba~O])nO~O])oO~O!V)pO~O!QnO!V)rO!a)sO~P*aO!V)rO!a)sO!|#`O~PBRO])uOn)vO~O])wOn)xO~O^!hOh!POr-TOu%xOw}O!P-_O!Q-`O!W-^O!]-eO%O,dO%Y!fO~O]%[a~P!>nOn)|O]%[a~O]${O]tXntX~OjcOV$^q$w$^q~On*PO{&WO~P?tOn*SO!V%rX~O!V*UO~OjcOV$]q$w$]q~O%`(ZOV|a$w|an|a!V|a~O[*]OVla$wla~O[*]O!W!tOVla$wla~On*PO{&WO!W*`O^%WXj%WX~P! _OjcO#j!UO~OjcO!|,XO~PBROZ*dO^#VO!W#SO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]O~O!|#`O~P!BoO#^*eO~P?tO!a*fO~Oj$`O!|,XO~P!BoO#W*hO~Oj#wi~P;_OV*kO!|#`O~PBROn#TO!Q#cO!|#`O!a$QX#T%eX~PBRO#T*lO~O#W*lO~O!a*mO~O!|#`Oi!_in!_i~PBRO!|#`Oi!bXn!bX!a!cX~PBROi!bXn!bX!a!cX~O!a*nO~Oj!qO!QnOi%ci~P*aO!V%bi!a%bi~P?tO!V*qO!a*rO!|#`O~PBRO!V*qO!|#`O~PBRO]*tO~O]*uO~O]*uOu*vO~O]%[i~P!>nO%O!eO!V%ra~On*|O!V%ra~O[+OOVli$wli~O%O+yO~P!4vO#k+QOV#iy$w#iy~O^+RO%O%_O~O]+SO~O!|,XOj#xq~PBROj#wq~P;_O!V+ZO!|#`O~PBRO]+[On+]O~O%O!eO!V%ri~O^#QOn'eO!V%bX~O#^+`O~P?tOj+aO~O^#VO!W#SO!|#`O%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]O~OZ+cO~P!JvO!|#`O!a$Qi~PBRO!|#`Oi!bin!bi~PBRO!V+dO!|#`O~PBRO]+eO~O]+fO~Oi+iO#p+jO#q+kO~O^+lO%O%_O~Oi+pO#p+jO#q+kO~O!a+rO~O#^+sO~P?tO!a+tO~O]+uO~OZeX^eX^!TXj!TX!WeX!W!TX!|eX%YeX%`eX%feX%geX%ieX%jeX%keX%leX%meX%neX%oeX%peX%qeXVeXneX!QeX#ReX#TeX#UeX$weX~O]eX]!TX!VeXieX!aeX~P!NUOjeX~P!NUOZeX^eX^!TXj!TX!WeX!W!TX!|eX%YeX%`eX%feX%geX%ieX%jeX%keX%leX%meX%neX%oeX%peX%qeXn!TX!VeX~O]eX!V!TX~P#!gOh!TXr!TXw!TX{!TX!P!TX!Q!TX!]!TX%O!TX%Y!TX~P#!gOZeX^eX^!TXj!TXneX!WeX!W!TX!|eX%YeX%`eX%feX%geX%ieX%jeX%keX%leX%meX%neX%oeX%peX%qeX~O]eXueX~P#$xO]$mXn$mXu$mX~PF|Oj$mXn$mX~P!7`On+|O]%eau%ea~On+}Oj%ea~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!Q-OO!WaO!]!QO!phO!qhO%O+yO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~OZeX]!TX^UXhUXnUXn!TXrUXuUXwUX!PUX!QUX!WUX!W!TX!]UX%OUX%YUX~OnUX!QeX!aeX#TeX#WUX~P#$xOn+|O!|,YO]%eXu%eX~PBROn+}O!|,XOj%eX~PBRO^&OOV%ZXj%ZX$w%ZX]%ZXn%ZX!V%ZXu%ZX%`%ZX#T%ZX[%ZX!a%ZX~P?wO!|,YO]$man$mau$ma~PBRO!|,XOj$man$ma~PBRO%Y#XO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOZ!xi]!xi^!xi!W!xi!|!xi%`!xi%f!xi%g!xi%i!xi%p!xi%q!xi~Oj!xi~P!+YOn!xiu!xi~P#,hO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOZ!xi]!xi^!xi!W!xi!|!xi%p!xi%q!xi~O%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOV!xiZ!xi^!xij!xin!xi!Q!xi!W!xi#R!xi#T!xi#U!xi$w!xi%p!xi%q!xi~O!|!xi~P#/_On!xiu!xi~P#.TO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOZ!xi]!xi^!xi!W!xi%p!xi%q!xi~O!|,WO~P#1^O!|,XO~P#/_O!|,YOn!xiu!xi~P#1^O%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[OZ!xi]!xi^!xi!W!xi%q!xi~O!|,WO~P#3QO!|,XOj!xi~P!/VO!|,YOn!xiu!xi~P#3QO!|,XOj#Pi~PBROV!TXZeX^mX!W!TX$w!TX~O%`!TX~P#5RO[!TXhmXnmXrmXwmX!PmX!QmX!WmX!]mX%OmX%YmX~P#5ROn#TO!Q,aO!|,XO#R#dOj`X#T%eX#U%eX~PBRO[oO^YOaoOdoOh!POr!pOw}O!P#hO!WaO!]!QO!phO!qhO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O!Q-OO%O+yO~P#6{O!Q-PO%O+xO~P#6{O!Q-QO%O+{O~P#6{O#T,bO#U,bO~O#W,cO~O^!hOh!POr-TOw}O!P-_O!Q-WO!W-^O!]-eO%O!eO%Y!fO~O^!hOh!POr-TOw}O!Q-`O!W-^O!]-eO%O!eO%Y!fO~O!P-VO~P#9zO%O+wO~P!4vO!P-XO~O!V-YO!|#`O~PBRO!V-ZO~O!V-[O~O!W-dO~OP%ka%Oa~",goto:"!FW%sPP%tP%wP%zP'SP'XPPPP'`'cP'u'uP)w'u-_PPP0j0m0qP1V4b1VP7s8WP1VP8a8d8hP8p8w1VPP1V8{<`?vPPCY-_-_-_PCdCuCxPC{DQ'u'uDV'uES'u'u'u'uGUIW'uPPJR'uJUMjMjMj'u! r! r!#SP!$`!%d!&d'cP'cPP'cP!&yP!'V!'^!&yP!'a!'h!'n!'w!&yP!'z!(R!&y!(U!(fPP!&yP!(x!)UPP!&y!)Y!)c!&yP!)g!)gP!&yP!&yP!)j!)m!&v!&yP!&yPPP!&yP!&yP!)q!)q!)w!)}!*U!*[!*d!*j!*p!*w!*}!+T!+Z!.q!.x!/O!/X!/m!/s!/z!0Q!0W!0^!0d!0jPPPPPPPPP!0p!1f!1k!1{!2kPP!7P!:^P!>u!?Z!?_!@Z!@fP!@p!D_!Df!Di!DuPPPPPPPPPPPP!FSR!aPRyO!WXOScw!R!T!U!W#O#k#n#u$R$X&O&j&u&|'W'Y']'})W)|*k*w+gQ#pzU#r{#s%uQ#x|U$T!S$U&pQ$^!VQ$y!lR)U'RVROS#nQ#t{T%t#s%uR#t{qrOScw!U!V!W#O#k#n&|'W'Y)W*k+g%PoOSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^%O]OSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^#u!iW^!O!h!t!z#e#h#u#v#y#|#}$P$Q$T$W$v$x%W%Y%a%x%y&O&S&W&]&`&b&d&m'e'|'}(S([(c(i(o(|)l)|*P*Q*S*p*w*|+R+^+j+l,h-U-V-W-X-Y-Z-[-]-_-d'cbOSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dR$O!PT&c#}&dW%`#R&z*d+cQ&Q#vS&V#y&]S&`#}&dR*Y(b'cZOSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-d%fWOSWYacmnw!O!U!V!W!X!Z!_!q!z#O#Q#S#T#V#^#_#`#a#b#c#h#i#j#k#n#v#|$f$v$x%W%Y%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(i(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^S&b#}&d!{-]!h!t#e#u#y$P$Q$T$W%a%x%y&O&W&]&`&m'e'|'}(S([(c(o(|)l)|*Q*p*w+R+j+l,h-U-V-W-X-Y-Z-[-]-_-dQ#v|S$v!j!pU&P#v$v,hZ,h#x&Q&U&V-TS%{#u&OV){'})|*wR#z}T&[#y&]]&X#y&](S([(o*QZ&Z#y&](S(o*QT([&Y(]'s_OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|#}$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&S&W&]&`&b&d&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*P*Q*S*`*h*k*l*n*o*p*r*w*|+R+^+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-d'r_OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|#}$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&S&W&]&`&b&d&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*P*Q*S*`*h*k*l*n*o*p*r*w*|+R+^+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dR!w^'bbOSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dS&a#}&dR(d&bS!u]fX!x`&_(e(oQ!r[Q%O!qQ)d'aU)f'b)i*oR+X*nR%R!qR%P!qV)h'b)i*oV)g'b)i*odtOScw#O#k#n&|'Y+gQ$h!WQ&R#wQ&w$[S'S$c$iQ(V&TQ*O(RQ*V(WQ*b(yQ*c(zR+_+Q%PfOSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^%PgOSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^!q#Weg!o!y$[$_$c$j$m$q$}%^%b%d%m'V'p(z({)S)Y)^)c)e)q)t*i*s+T+V+W+Y,f,g,i,j,w,z-aR#fh#^mOSacmnw!X!Z!_!q#O#S#T#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&y&|'P'T'U'X'Y']'a'b'o'r(k(t)i)s*`*h*l*n*o*r+g-^!W#_e!y$j$m$q$}%b%d%j%k%l%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aW,T!o,n,q,tj,U$[$_$c(z)S*i,g,j,o,r,u,w,z[,V%^,f,i,p,s,v`,{Y,Q,T,W,Z,^,{-Ox,|!U!V!W&x'R'W)V)W*k+},R,U,X,[,_,a,b,c,|-Pg,}#Q#V'w+|,S,V,Y,],`,}-Q#^mOSacmnw!X!Z!_!q#O#S#T#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&y&|'P'T'U'X'Y']'a'b'o'r(k(t)i)s*`*h*l*n*o*r+g-^`,{Y,Q,T,W,Z,^,{-Ox,|!U!V!W&x'R'W)V)W*k+},R,U,X,[,_,a,b,c,|-Pg,}#Q#V'w+|,S,V,Y,],`,}-Q!Y#^e!y$j$m$q$}%b%d%i%j%k%l%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aY,Q!o,k,n,q,tl,R$[$_$c(z)S*i,g,j,l,o,r,u,w,z_,S%^,f,i,m,p,s,v!W#_e!y$j$m$q$}%b%d%j%k%l%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aW,T!o,n,q,tj,U$[$_$c(z)S*i,g,j,o,r,u,w,z],V%^,f,i,p,s,v!S#ae!y$j$m$q$}%b%d%l%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aS,Z!o,tf,[$[$_$c(z)S*i,g,j,u,w,zX,]%^,f,i,v!Q#be!y$j$m$q$}%b%d%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aQ,^!od,_$[$_$c(z)S*i,g,j,w,zV,`%^,f,iprOScw!U!V!W#O#k#n&|'W'Y)W*k+gR)a']etOScw#O#k#n&|'Y+gQ$S!RT&i$R&jR$S!RQ$V!ST&o$U&pQ&U#xR&m$TS(T&S&lV*{*S*|+^R$V!SQ$Y!TT&t$X&uR$Y!TdsOScw#O#k#n&|'Y+gT$p![!]dtOScw#O#k#n&|'Y+gQ*b(yR+_+QQ$a!VQ&{$_Q)T'RR*g)ST&|$`&}Q+b+SQ+m+fR+v+uT+g+a+hR$i!WR$l!YT'Y$k'ZXuOSw#nQ$s!`R'_$sSSO#nR!dSQ%u#sR'y%uUwOS#nR#mwQ&d#}R(g&dQ(c&`R*Z(cS!mX$^R$z!mQ(O%{R)}(OQ&]#yR(_&]Q(]&YR*X(]'r^OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|#}$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&S&W&]&`&b&d&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*P*Q*S*`*h*k*l*n*o*p*r*w*|+R+^+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dR!v^S'f%T+PR)m'fQ'c%RR)j'cW#Oc&|'Y+gR%[#O^#Ue$[$_$c$m)^,zU%e#U,O,PQ,O,fR,P,gQ&j$RR(m&jS*Q(S(oR*y*QQ*T(TR*}*TQ&p$UR(r&pQ&u$XR(w&uQ&}$`R)O&}Q+h+aR+o+hQ'Z$kR)['ZQ!cRQ#luQ#nyQ%Z!|Q&x$]Q'R$bQ'x%tQ(^&[Q(f&cQ(l&iQ(q&oR(v&tVxOS#nWuOSw#nY!|c#O&|'Y+gR%r#kdtOScw#O#k#n&|'Y+gQ$]!UQ$b!VQ$g!WQ)X'WQ*j)WR+U*kdeOScw#O#k#n&|'Y+gQ!oYQ!ya`#gmn,{,|,}-O-P-QQ$[!UQ$_!VQ$c!WQ$j!Xd$m!Z#i#j&g&s'P'T'U(k(tQ$q!_Q$}!qQ%^#QQ%b#SQ%d#TW%h#^,Q,R,SQ%i#_Q%j#`Q%k#aQ%l#bQ%m#cQ'V$fQ'p%cQ(z&xQ({&yQ)S'RQ)Y'XQ)^']Q)c'aU)e'b)i*oQ)q'oQ)t'rQ*i)VQ*s)sQ+T*hQ+V*lQ+W*nQ+Y*rS,f#V'wS,g,b,cQ,i+|Q,j+}Q,k,TQ,l,UQ,m,VQ,n,WQ,o,XQ,p,YQ,q,ZQ,r,[Q,s,]Q,t,^Q,u,_Q,v,`Q,w,aU,z'W)W*kV-a&l*`-^#bZW!O!h!t!z#e#h#u#v#y#|$P$Q$T$W$v$x%W%Y%a%x%y&O&W&]&`&m'e'|'}(S([(c(i(o(|)l)|*Q*p*w+R+j+l,h-U-V-W-X-Y-Z-[-]-_-d%P[OSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^$zdOSacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^S!gW-]Q!nYS#{!O-_Q$u!hS%T!t+jS%X!z-UQ%n#e[%o#h#|$x-V-W-XW%w#u'})|*wU&P#v$v,h[&X#y&](S([(o*QQ&f$PQ&h$QQ&n$TQ&r$WS'h%W-YS'i%Y-ZW'l%a(|+R+lS'{%x%yQ(Q&OQ(Y&WQ(d&`Q(p&mU)k'e)l*pQ)z'|Q*[(cS*^(i-[Q+P*`R-c-dS#w|!pS$w!j-TQ&T#xQ(R&QQ(W&UR(X&VT%|#u&OhqOScw!U!V#O#k#n&|'Y+gU$Q!R$R&jU$W!T$X&uQ$e!WY%y#u&O'})|*wQ)`']V-S'W)W*kS&[#y&]S*R(S(oR*z*QY&Y#y&](S(o*QR*W(['``OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dS&_#}&dW(S&S*S*|+^Q(e&bQ(o&lR*x*PS%U!t*`R+q+jR%S!qQ#PcQ(}&|Q)Z'YR+n+ghpOScw!U!V#O#k#n&|'Y+gQ$d!WQ$n!ZQ%g#VU%p#i'T,bU%q#j'U,cQ(j&gQ(u&sQ)Q'PQ)_']Q)y'wQ*_(kQ*a(tV-R'W)W*kT(U&S&l",nodeNames:"\u26A0 LineComment BlockComment SourceFile PackageClause package DefName ; ImportDecl import ImportSpec . String ) ( SpecList ExprStatement Number Bool Nil Rune VariableName TypedLiteral StructType struct } { StructBody FieldDecl FieldName , PointerType * FunctionType func Parameters Parameter ... InterfaceType interface InterfaceBody MethodElem UnderlyingType ~ TypeElem LogicOp ChannelType chan <- ParenthesizedType QualifiedType TypeName ParameterizedType ] [ TypeArgs ArrayType SliceType MapType map LiteralValue Element Key : Element Key ParenthesizedExpr FunctionLiteral Block Conversion SelectorExpr IndexExpr SliceExpr TypeAssertion CallExpr ParameterizedExpr Arguments CallExpr make new Arguments UnaryExp ArithOp LogicOp BitOp DerefOp BinaryExp ArithOp BitOp BitOp CompareOp LogicOp LogicOp SendStatement IncDecStatement IncDecOp Assignment = UpdateOp VarDecl := ConstDecl const ConstSpec SpecList TypeDecl type TypeSpec TypeParams TypeParam SpecList VarDecl var VarSpec SpecList LabeledStatement LabelName IfStatement if else SwitchStatement switch SwitchBlock Case case default TypeSwitchStatement SwitchBlock Case ForStatement for ForClause RangeClause range GoStatement go SelectStatement select SelectBlock Case ReceiveStatement ReturnStatement return GotoStatement break continue goto FallthroughStatement fallthrough DeferStatement defer FunctionDecl MethodDecl",maxTerm:218,context:tO,nodeProps:[["isolate",-3,2,12,20,""],["group",-18,12,17,18,19,20,21,22,66,67,69,70,71,72,73,74,77,81,86,"Expr",-20,16,68,93,94,96,99,101,105,111,115,117,120,126,129,134,136,141,143,147,149,"Statement",-12,23,31,33,38,46,49,50,51,52,56,57,58,"Type"],["openedBy",13,"(",25,"{",53,"["],["closedBy",14,")",26,"}",54,"]"]],propSources:[nO],skippedNodes:[0,1,2,153],repeatNodeCount:23,tokenData:":b~RvXY#iYZ#i]^#ipq#iqr#zrs$Xuv&Pvw&^wx&yxy(qyz(vz{({{|)T|})e}!O)j!O!P)u!P!Q+}!Q!R,y!R![-t![!]2^!]!^2k!^!_2p!_!`3]!`!a3e!c!}3x!}#O4j#P#Q4o#Q#R4t#R#S4|#S#T9X#T#o3x#o#p9q#p#q9v#q#r:W#r#s:]$g;'S3x;'S;=`4d<%lO3x~#nS$y~XY#iYZ#i]^#ipq#iU$PP%hQ!_!`$SS$XO!|S~$^W[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y<%lO$X~${O[~~%ORO;'S$X;'S;=`%X;=`O$X~%^X[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y;=`<%l$X<%lO$X~%|P;=`<%l$X~&UP%l~!_!`&X~&^O#U~~&cR%j~vw&l!_!`&X#Q#R&q~&qO%p~~&vP%o~!_!`&X~'OWd~OY&yZw&ywx'hx#O&y#O#P'm#P;'S&y;'S;=`(k<%lO&y~'mOd~~'pRO;'S&y;'S;=`'y;=`O&y~(OXd~OY&yZw&ywx'hx#O&y#O#P'm#P;'S&y;'S;=`(k;=`<%l&y<%lO&y~(nP;=`<%l&y~(vO^~~({O]~~)QP%Y~!_!`&X~)YQ%f~{|)`!_!`&X~)eO#R~~)jOn~~)oQ%g~}!O)`!_!`&X~)zRZS!O!P*T!Q![*`#R#S+w~*WP!O!P*Z~*`Ou~Q*eTaQ!Q![*`!g!h*t#R#S+w#X#Y*t#]#^+rQ*wS{|+T}!O+T!Q![+^#R#S+lQ+WQ!Q![+^#R#S+lQ+cRaQ!Q![+^#R#S+l#]#^+rQ+oP!Q![+^Q+wOaQQ+zP!Q![*`~,SR%k~z{,]!P!Q,b!_!`&X~,bO$z~~,gSP~OY,bZ;'S,b;'S;=`,s<%lO,b~,vP;=`<%l,bQ-O[aQ!O!P*`!Q![-t!d!e.c!g!h*t!q!r/Z!z!{/x#R#S.]#U#V.c#X#Y*t#]#^+r#c#d/Z#l#m/xQ-yUaQ!O!P*`!Q![-t!g!h*t#R#S.]#X#Y*t#]#^+rQ.`P!Q![-tQ.fR!Q!R.o!R!S.o#R#S/QQ.tSaQ!Q!R.o!R!S.o#R#S/Q#]#^+rQ/TQ!Q!R.o!R!S.oQ/^Q!Q!Y/d#R#S/rQ/iRaQ!Q!Y/d#R#S/r#]#^+rQ/uP!Q!Y/dQ/{T!O!P0[!Q![1c!c!i1c#R#S2Q#T#Z1cQ0_S!Q![0k!c!i0k#R#S1V#T#Z0kQ0pVaQ!Q![0k!c!i0k!r!s*t#R#S1V#T#Z0k#]#^+r#d#e*tQ1YR!Q![0k!c!i0k#T#Z0kQ1hWaQ!O!P0k!Q![1c!c!i1c!r!s*t#R#S2Q#T#Z1c#]#^+r#d#e*tQ2TR!Q![1c!c!i1c#T#Z1c~2cP!a~!_!`2f~2kO#W~~2pOV~~2uR!|S}!O3O!^!_3T!_!`$S~3TO!Q~~3YP%m~!_!`&X~3bP#T~!_!`$S~3jQ!|S!_!`$S!`!a3p~3uP%n~!_!`&X~3}V%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~4gP;=`<%l3x~4oO!W~~4tO!V~~4yP%i~!_!`&X~5RV%O~!Q![5h!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~5o^aQ%O~!O!P*`!Q![5h!c!g3x!g!h6k!h!}3x#R#S4|#T#X3x#X#Y6k#Y#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~6pX%O~{|+T}!O+T!Q![7]!c!}3x#R#S8P#T#o3x$g;'S3x;'S;=`4d<%lO3x~7dXaQ%O~!Q![7]!c!}3x#R#S8P#T#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~8UV%O~!Q![7]!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~8rVaQ%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~9[TO#S9X#S#T$v#T;'S9X;'S;=`9k<%lO9X~9nP;=`<%l9X~9vOj~~9{Q%`~!_!`&X#p#q:R~:WO%q~~:]Oi~~:bO{~",tokenizers:[iO,1,2,new y("j~RQYZXz{^~^O$|~~aP!P!Qd~iO$}~~",25,181)],topRules:{SourceFile:[0,3]},dynamicPrecedences:{19:1,51:-1,55:2,69:-1,108:-1},specialized:[{term:184,get:Q=>oO[Q]||-1}],tokenPrec:5451}),S=[P("func ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"declaration",type:"keyword"}),P("func (${receiver}) ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"method declaration",type:"keyword"}),P("var ${name} = ${value}",{label:"var",detail:"declaration",type:"keyword"}),P("type ${name} ${type}",{label:"type",detail:"declaration",type:"keyword"}),P("const ${name} = ${value}",{label:"const",detail:"declaration",type:"keyword"}),P("type ${name} = ${type}",{label:"type",detail:"alias declaration",type:"keyword"}),P("for ${init}; ${test}; ${update} {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),P("for ${i} := range ${value} {\n ${}\n}",{label:"for",detail:"range",type:"keyword"}),P(`select {
\${}
}`,{label:"select",detail:"statement",type:"keyword"}),P("case ${}:\n${}",{label:"case",type:"keyword"}),P("switch ${} {\n ${}\n}",{label:"switch",detail:"statement",type:"keyword"}),P("switch ${}.(${type}) {\n ${}\n}",{label:"switch",detail:"type statement",type:"keyword"}),P("if ${} {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),P(`if \${} {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),P('import ${name} "${module}"\n${}',{label:"import",detail:"declaration",type:"keyword"})],T=new x,p=new Set(["SourceFile","Block","FunctionDecl","MethodDecl","FunctionLiteral","ForStatement","SwitchStatement","TypeSwitchStatement","IfStatement"]);function o(Q,e){return(t,a)=>{O:for(let X=t.node.firstChild,c=0,i=null;;){for(;!X;){if(!c)break O;c--,X=i.nextSibling,i=i.parent}e&&X.name==e||X.name=="SpecList"?(c++,i=X,X=X.firstChild):(X.name=="DefName"&&a(X,Q),X=X.nextSibling)}return!0}}var rO={FunctionDecl:o("function"),VarDecl:o("var","VarSpec"),ConstDecl:o("constant","ConstSpec"),TypeDecl:o("type","TypeSpec"),ImportDecl:o("constant","ImportSpec"),Parameter:o("var"),__proto__:null};function W(Q,e){let t=T.get(e);if(t)return t;let a=[],X=!0;function c(i,n){let R=Q.sliceString(i.from,i.to);a.push({label:R,type:n})}return e.cursor(d.IncludeAnonymous).iterate(i=>{if(X)X=!1;else if(i.name){let n=rO[i.name];if(n&&n(i,c)||p.has(i.name))return!1}else if(i.to-i.from>8192){for(let n of W(Q,i.node))a.push(n);return!1}}),T.set(e,a),a}var V=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,m=["String","LineComment","BlockComment","DefName","LabelName","FieldName",".","?."],Y=Q=>{let e=s(Q.state).resolveInner(Q.pos,-1);if(m.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&V.test(Q.state.sliceDoc(e.from,e.to));if(!t&&!Q.explicit)return null;let a=[];for(let X=e;X;X=X.parent)p.has(X.name)&&(a=a.concat(W(Q.state.doc,X)));return{options:a,from:t?e.from:Q.pos,validFor:V}},r=g.define({name:"go",parser:cO.configure({props:[k.add({IfStatement:$({except:/^\s*({|else\b)/}),LabeledStatement:b,"SwitchBlock SelectBlock":Q=>{let e=Q.textAfter,t=/^\s*\}/.test(e),a=/^\s*(case|default)\b/.test(e);return Q.baseIndent+(t||a?0:Q.unit)},Block:Z({closing:"}"}),BlockComment:()=>null,Statement:$({except:/^{/})}),w.add({"Block SwitchBlock SelectBlock LiteralValue InterfaceType StructType SpecList":h,BlockComment(Q){return{from:Q.from+2,to:Q.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case\b|default\b|\})$/}}),$O="interface struct chan map package go return break continue goto fallthrough else defer range true false nil".split(" ").map(Q=>({label:Q,type:"keyword"}));function lO(){let Q=S.concat($O);return new G(r,[r.data.of({autocomplete:_(m,q(Q))}),r.data.of({autocomplete:Y})])}export{S as i,r as n,Y as r,lO as t};
import"./dist-DBwNzi3C.js";import{n as a,t}from"./dist-B83wRp_v.js";export{t as wast,a as wastLanguage};
import"./dist-DBwNzi3C.js";import"./dist-Dcqqg9UU.js";import{n as s,r as a,t as o}from"./dist-DLgWirXg.js";export{o as sass,s as sassCompletionSource,a as sassLanguage};
import{s as o}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-Bj1aDYRI.js";import{t as n}from"./react-dom-CSu739Rf.js";import{t as d}from"./jsx-runtime-ZmTK25f3.js";import{a as u}from"./button-CZ3Cs4qb.js";var v=o(p(),1);n();var w=o(d(),1),b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((a,r)=>{let t=u(`Primitive.${r}`),i=v.forwardRef((e,m)=>{let{asChild:s,...f}=e,l=s?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,w.jsx)(l,{...f,ref:m})});return i.displayName=`Primitive.${r}`,{...a,[r]:i}},{});export{b as t};
import{D as v,H as y,J as t,N as u,at as k,n as l,nt as _,q as W,r as T,s as Y,u as R,y as w,zt as U}from"./dist-DBwNzi3C.js";import{n as G}from"./dist-Btv5Rh1v.js";var X=1,j=2,z=3,S=180,x=4,Z=181,E=5,V=182,D=6;function F(O){return O>=65&&O<=90||O>=97&&O<=122}var N=new l(O=>{let a=O.pos;for(;;){let{next:e}=O;if(e<0)break;if(e==123){let $=O.peek(1);if($==123){if(O.pos>a)break;O.acceptToken(X,2);return}else if($==37){if(O.pos>a)break;let i=2,n=2;for(;;){let r=O.peek(i);if(r==32||r==10)++i;else if(r==35)for(++i;;){let Q=O.peek(i);if(Q<0||Q==10)break;i++}else if(r==45&&n==2)n=++i;else{let Q=r==101&&O.peek(i+1)==110&&O.peek(i+2)==100;O.acceptToken(Q?z:j,n);return}}}}if(O.advance(),e==10)break}O.pos>a&&O.acceptToken(S)});function P(O,a,e){return new l($=>{let i=$.pos;for(;;){let{next:n}=$;if(n==123&&$.peek(1)==37){let r=2;for(;;r++){let c=$.peek(r);if(c!=32&&c!=10)break}let Q="";for(;;r++){let c=$.peek(r);if(!F(c))break;Q+=String.fromCharCode(c)}if(Q==O){if($.pos>i)break;$.acceptToken(e,2);break}}else if(n<0)break;if($.advance(),n==10)break}$.pos>i&&$.acceptToken(a)})}var C=P("endcomment",V,E),I=P("endraw",Z,x),A=new l(O=>{if(O.next==35){for(O.advance();!(O.next==10||O.next<0||(O.next==37||O.next==125)&&O.peek(1)==125);)O.advance();O.acceptToken(D)}}),B={__proto__:null,contains:32,or:36,and:36,true:50,false:50,empty:52,forloop:54,tablerowloop:56,continue:58,in:128,with:194,for:196,as:198,if:234,endif:238,unless:244,endunless:248,elsif:252,else:256,case:262,endcase:266,when:270,endfor:278,tablerow:284,endtablerow:288,break:292,cycle:298,echo:302,render:306,include:312,assign:316,capture:322,endcapture:326,increment:330,decrement:334},H={__proto__:null,if:82,endif:86,elsif:90,else:94,unless:100,endunless:104,case:110,endcase:114,when:118,for:126,endfor:136,tablerow:142,endtablerow:146,break:150,continue:154,cycle:158,comment:164,endcomment:170,raw:176,endraw:182,echo:186,render:190,include:202,assign:206,capture:212,endcapture:216,increment:220,decrement:224,liquid:228},L=T.deserialize({version:14,states:"HOQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DQO#{OPO'#DTO$ZOPO'#D^O$iOPO'#DcO$wOPO'#DkO%VOPO'#DsO%eOSO'#EOO%jOQO'#EUO%oOPO'#EhOOOP'#G`'#G`OOOP'#G]'#G]OOOP'#Fz'#FzQYOPOOOOOP-E9y-E9yOOQW'#Cg'#CgO&`Q!jO,59QO&gQ!jO'#G^OsQhO'#CsOOQW'#G^'#G^OOOP,59l,59lO)PQhO,59lOsQhO,59pOsQhO,59tO)ZQhO,59vOsQhO,59yOsQhO,5:OOsQhO,5:SO!]QhO,5:WO!]QhO,5:`O)`QhO,5:dO)eQhO,5:fO)jQhO,5:hO)oQhO,5:kO)tQhO,5:qOsQhO,5:vOsQhO,5:xOsQhO,5;OOsQhO,5;QOsQhO,5;TOsQhO,5;XOsQhO,5;ZO+TQhO,5;]O+[OPO'#CdOOOP,59o,59oO#{OPO,59oO+jQxO'#DWOOOP,59x,59xO$ZOPO,59xO+oQxO'#DaOOOP,59},59}O$iOPO,59}O+tQxO'#DfOOOP,5:V,5:VO$wOPO,5:VO+yQxO'#DqOOOP,5:_,5:_O%VOPO,5:_O,OQxO'#DvOOOS'#GQ'#GQO,TOSO'#ERO,]OSO,5:jOOOQ'#GR'#GRO,bOQO'#EXO,jOQO,5:pOOOP,5;S,5;SO%oOPO,5;SO,oQxO'#EkOOOP-E9x-E9xO,tQ#|O,59SOsQhO,59VOsQhO,59VO,yQhO'#C|OOQW'#F|'#F|O-OQhO1G.lOOOP1G.l1G.lOsQhO,59VOsQhO,59ZO-WQ!jO,59_O-iQ!jO1G/WO-pQhO1G/WOOOP1G/W1G/WO-xQ!jO1G/[O.ZQ!jO1G/`OOOP1G/b1G/bO.lQ!jO1G/eO.}Q!jO1G/jO/qQ!jO1G/nO/xQhO1G/rO/}QhO1G/zOOOP1G0O1G0OOOOP1G0Q1G0QO0SQhO1G0SOOOS1G0V1G0VOOOQ1G0]1G0]O0_Q!jO1G0bO0fQ!jO1G0dO1QQ!jO1G0jO1cQ!jO1G0lO1jQ!jO1G0oO1{Q!jO1G0sO2^Q!jO1G0uO2oQhO'#EsO2vQhO'#ExO2}QhO'#FRO3UQhO'#FYO3]QhO'#F^O3dQhO'#FqOOQW'#Ga'#GaOOQW'#GT'#GTO3kQhO1G0wOsQhO'#EtOsQhO'#EyOsQhO'#E}OOQW'#FP'#FPOsQhO'#FSOsQhO'#FWO!]QhO'#FZO!]QhO'#F_OOQW'#Fc'#FcOOQW'#Fe'#FeO3rQhO'#FfOsQhO'#FhOsQhO'#FjOsQhO'#FmOsQhO'#FoOsQhO'#FrOsQhO'#FvOsQhO'#FxOOOP1G0w1G0wOOOP1G/Z1G/ZO3wQhO,59rOOOP1G/d1G/dO3|QhO,59{OOOP1G/i1G/iO4RQhO,5:QOOOP1G/q1G/qO4WQhO,5:]OOOP1G/y1G/yO4]QhO,5:bOOOS-E:O-E:OOOOP1G0U1G0UO4bQxO'#ESOOOQ-E:P-E:POOOP1G0[1G0[O4gQxO'#EYOOOP1G0n1G0nO4lQhO,5;VOOQW1G.n1G.nOOQW1G.q1G.qO7QQ!jO1G.qOOQW'#DO'#DOO7[QhO,59hOOQW-E9z-E9zOOOP7+$W7+$WO9UQ!jO1G.qO9`Q!jO1G.uOsQhO1G.yO;uQhO7+$rOOOP7+$r7+$rOOOP7+$v7+$vOOOP7+$z7+$zOOOP7+%P7+%POOOP7+%U7+%UOsQhO'#F}O;}QhO7+%YOOOP7+%Y7+%YOsQhO7+%^OsQhO7+%fO<VQhO'#GPO<[QhO7+%nOOOP7+%n7+%nO<dQhO7+%nO<iQhO7+%|OOOP7+%|7+%|O!]QhO'#E`OOQW'#GS'#GSO<qQhO7+&OOsQhO'#E`OOOP7+&O7+&OOOOP7+&U7+&UO=PQhO7+&WOOOP7+&W7+&WOOOP7+&Z7+&ZOOOP7+&_7+&_OOOP7+&a7+&aOOQW,5;_,5;_O2oQhO,5;_OOQW'#Ev'#EvOOQW,5;d,5;dO2vQhO,5;dOOQW'#E{'#E{OOQW,5;m,5;mO2}QhO,5;mOOQW'#FU'#FUOOQW,5;t,5;tO3UQhO,5;tOOQW'#F['#F[OOQW,5;x,5;xO3]QhO,5;xOOQW'#Fa'#FaOOQW,5<],5<]O3dQhO,5<]OOQW'#Ft'#FtOOQW-E:R-E:ROOOP7+&c7+&cO=XQ!jO,5;`O>rQ!jO,5;eO@]Q!jO,5;iOBYQ!jO,5;nOCsQ!jO,5;rOEfQhO,5;uOEkQhO,5;yOEpQhO,5<QOGgQ!jO,5<SOIYQ!jO,5<UOKYQ!jO,5<XOMVQ!jO,5<ZONxQ!jO,5<^O!!cQ!jO,5<bO!$`Q!jO,5<dOOOP1G/^1G/^OOOP1G/g1G/gOOOP1G/l1G/lOOOP1G/w1G/wOOOP1G/|1G/|O!&]QhO,5:nO!&bQhO,5:tOOOP1G0q1G0qOsQhO1G/SO!&gQ!jO7+$eOOOP<<H^<<H^O!&xQ!jO,5<iOOQW-E9{-E9{OOOP<<Ht<<HtO!)ZQ!jO<<HxO!)bQ!jO<<IQOOQW,5<k,5<kOOQW-E9}-E9}OOOP<<IY<<IYO!)iQhO<<IYOOOP<<Ih<<IhO!)qQhO,5:zOOQW-E:Q-E:QOOOP<<Ij<<IjO!)vQ!jO,5:zOOOP<<Ir<<IrOOQW1G0y1G0yOOQW1G1O1G1OOOQW1G1X1G1XOOQW1G1`1G1`OOQW1G1d1G1dOOQW1G1w1G1wO!*eQhO1G1^OsQhO1G1aOsQhO1G1eO!,XQhO1G1lO!-{QhO1G1lO!.QQhO1G1nO!]QhO'#FlOOQW'#GU'#GUO!/tQhO1G1pO!1hQhO1G1uOOOP1G0Y1G0YOOOP1G0`1G0`O!3[Q!jO7+$nOOQW<<HP<<HPOOQW'#Dp'#DpO!5_QhO'#DoOOQW'#GO'#GOO!6xQhOAN>dOOOPAN>dAN>dO!7QQhOAN>lOOOPAN>lAN>lO!7YQhOAN>tOOOPAN>tAN>tOsQhO1G0fO!]QhO1G0fO!7bQ!jO7+&{O!8qQ!jO7+'PO!:QQhO7+'WO!;tQhO,5<WOOQW-E:S-E:SOsQhO,5:ZOOQW-E9|-E9|OOOPG24OG24OOOOPG24WG24WOOOPG24`G24`O!;yQ!jO7+&QOOQW7+&Q7+&QO!<eQhO<<JgO!=uQhO<<JkO!?VQhO<<JrOsQhO1G1rO!@yQ!jO1G/uO!BmQ!jO7+'^",stateData:"!Dm~O%OOSUOS~OPROQSO$zPO~O$zPOPWXQWX$yWX~OfeOifOjfOkfOlfOmfOnfOofO%RbO~OuhOvgOyiO}jO!PkO!SlO!XmO!]nO!aoO!ipO!mqO!orO!qsO!ttO!zuO#PvO#RwO#XxO#ZyO#^zO#b{O#d|O#f}O~OPROQSOR!RO$zPO~OPROQSOR!UO$zPO~OPROQSOR!XO$zPO~OPROQSOR![O$zPO~OPROQSOR!_O$zPO~O$|!`O~O${!cO~OPROQSOR!hO$zPO~O]!jO`!qOa!kOb!lOq!mO~OX!pO~P%}Od!rOX%QX]%QX`%QXa%QXb%QXq%QXh%QXv%QX!^%QX#T%QX#U%QXm%QX#i%QX#k%QX#n%QX#r%QX#t%QX#w%QX#{%QX$S%QX$W%QX$Z%QX$]%QX$_%QX$b%QX$d%QX$g%QX$k%QX$m%QX#p%QX#y%QX$i%QXe%QX%R%QX#V%QX$P%QX$U%QX~Oq!mOv!vO~PsOv!yO~Ov#PO~Ov#QO~On#RO~Ov#SO~Ov#TO~Om#oO#U#lO#i#fO#n#gO#r#hO#t#iO#w#jO#{#kO$S#mO$W#nO$Z#pO$]#qO$_#rO$b#sO$d#tO$g#uO$k#vO$m#wO~Ov#xO~P)yO$zPOPWXQWXRWX~O{#zO~O!U#|O~O!Z$OO~O!f$QO~O!k$SO~O$|!`OT!uX~OT$VO~O${!cOS!{X~OS$YO~O#`$[O~O^$]O~O%R$`O~OX$cOq!mO~O]!jO`!qOa!kOb!lOh$fO~Ov$hO~P%}Oq!mOv$hO~O]!jO`!qOa!kOb!lOv$iO~O]!jO`!qOa!kOb!lOv$jO~O]!jO`!qOa!kOb!lOv$kO~O]!jO`!qOa!kOb!lOv$lO~O]!jO`!qOa!kOb!lO!^$mO~Ov$oO~P/`O!b$pO~O!b$qO~Os$uOv$tO!^$rO~Ov$wO~P%}O]!jO`!qOa!kOb!lOv$|O!^$xO#T${O#U${O~O]!jO`!qOa!kOb!lOv$}O~Ov%PO~P%}O]!jO`!qOa!kOb!lOv%QO~O]!jO`!qOa!kOb!lOv%RO~O]!jO`!qOa!kOb!lOv%SO~O#k%VO~P)yO#p%YO~P)yO#y%]O~P)yO$P%`O~P)yO$U%cO~P)yO$i%fO~P)yOv%hO~P)yOn%pO~Ov%xO~Ov%yO~Ov%zO~Ov%{O~Ov%|O~O!w%}O~O!}&OO~Ov&PO~Oa!kOX_i]_iq_ih_iv_i!^_i#T_i#U_im_i#i_i#k_i#n_i#r_i#t_i#w_i#{_i$S_i$W_i$Z_i$]_i$__i$b_i$d_i$g_i$k_i$m_i#p_i#y_i$i_ie_i%R_i#V_i$P_i$U_i~O`!qOb!lO~P4qOs&QOXpaqpavpampa#Upa#ipa#npa#rpa#tpa#wpa#{pa$Spa$Wpa$Zpa$]pa$_pa$bpa$dpa$gpa$kpa$mpa#kpa#ppa#ypa$Ppa$Upa$ipa~O`_ib_i~P4qO`!qOa!kOb!lOXci]ciqcihcivci!^ci#Tci#Ucimci#ici#kci#nci#rci#tci#wci#{ci$Sci$Wci$Zci$]ci$_ci$bci$dci$gci$kci$mci#pci#yci$icieci%Rci#Vci$Pci$Uci~Oq!mOv&SO~Ov&VO!^$mO~On&YO~Ov&[O!^$rO~On&]O~Oq!mOv&^O~Ov&aO!^$xO#T${O#U${O~Oq!mOv&cO~O]!jO`!qOa!kOb!lOm#ha#U#ha#i#ha#k#ha#n#ha#r#ha#t#ha#w#ha#{#ha$S#ha$W#ha$Z#ha$]#ha$_#ha$b#ha$d#ha$g#ha$k#ha$m#ha~O]!jO`!qOa!kOb!lOm#ma#U#ma#i#ma#n#ma#p#ma#r#ma#t#ma#w#ma#{#ma$S#ma$W#ma$Z#ma$]#ma$_#ma$b#ma$d#ma$g#ma$k#ma$m#ma~O]!jO`!qOa!kOb!lOm#qav#qa#U#qa#i#qa#n#qa#r#qa#t#qa#w#qa#{#qa$S#qa$W#qa$Z#qa$]#qa$_#qa$b#qa$d#qa$g#qa$k#qa$m#qa#k#qa#p#qa#y#qa$P#qa$U#qa$i#qa~O]!jO`!qOa!kOb!lOm#va#U#va#i#va#n#va#r#va#t#va#w#va#y#va#{#va$S#va$W#va$Z#va$]#va$_#va$b#va$d#va$g#va$k#va$m#va~Om#zav#za#U#za#i#za#n#za#r#za#t#za#w#za#{#za$S#za$W#za$Z#za$]#za$_#za$b#za$d#za$g#za$k#za$m#za#k#za#p#za#y#za$P#za$U#za$i#za~P/`O!b&kO~O!b&lO~Os&nO!^$rOm$Yav$Ya#U$Ya#i$Ya#n$Ya#r$Ya#t$Ya#w$Ya#{$Ya$S$Ya$W$Ya$Z$Ya$]$Ya$_$Ya$b$Ya$d$Ya$g$Ya$k$Ya$m$Ya#k$Ya#p$Ya#y$Ya$P$Ya$U$Ya$i$Ya~Om$[av$[a#U$[a#i$[a#n$[a#r$[a#t$[a#w$[a#{$[a$S$[a$W$[a$Z$[a$]$[a$_$[a$b$[a$d$[a$g$[a$k$[a$m$[a#k$[a#p$[a#y$[a$P$[a$U$[a$i$[a~P%}O]!jO`!qOa!kOb!lO!^&pOm$^av$^a#U$^a#i$^a#n$^a#r$^a#t$^a#w$^a#{$^a$S$^a$W$^a$Z$^a$]$^a$_$^a$b$^a$d$^a$g$^a$k$^a$m$^a#k$^a#p$^a#y$^a$P$^a$U$^a$i$^a~O]!jO`!qOa!kOb!lOm$aav$aa#U$aa#i$aa#n$aa#r$aa#t$aa#w$aa#{$aa$S$aa$W$aa$Z$aa$]$aa$_$aa$b$aa$d$aa$g$aa$k$aa$m$aa#k$aa#p$aa#y$aa$P$aa$U$aa$i$aa~Om$cav$ca#U$ca#i$ca#n$ca#r$ca#t$ca#w$ca#{$ca$S$ca$W$ca$Z$ca$]$ca$_$ca$b$ca$d$ca$g$ca$k$ca$m$ca#k$ca#p$ca#y$ca$P$ca$U$ca$i$ca~P%}O]!jO`!qOa!kOb!lOm$fa#U$fa#i$fa#n$fa#r$fa#t$fa#w$fa#{$fa$S$fa$W$fa$Z$fa$]$fa$_$fa$b$fa$d$fa$g$fa$i$fa$k$fa$m$fa~O]!jO`!qOa!kOb!lOm$jav$ja#U$ja#i$ja#n$ja#r$ja#t$ja#w$ja#{$ja$S$ja$W$ja$Z$ja$]$ja$_$ja$b$ja$d$ja$g$ja$k$ja$m$ja#k$ja#p$ja#y$ja$P$ja$U$ja$i$ja~O]!jO`!qOa!kOb!lOm$lav$la#U$la#i$la#n$la#r$la#t$la#w$la#{$la$S$la$W$la$Z$la$]$la$_$la$b$la$d$la$g$la$k$la$m$la#k$la#p$la#y$la$P$la$U$la$i$la~Ov&tO~Ov&uO~O]!jO`!qOa!kOb!lOe&wO~O]!jO`!qOa!kOb!lOv$qa!^$qam$qa#U$qa#i$qa#n$qa#r$qa#t$qa#w$qa#{$qa$S$qa$W$qa$Z$qa$]$qa$_$qa$b$qa$d$qa$g$qa$k$qa$m$qa#k$qa#p$qa#y$qa$P$qa$U$qa$i$qa~O]!jO`!qOa!kOb!lO%R&xO~Ov&|O~P!(xOv'OO~P!(xOv'QO!^$rO~Os'RO~O]!jO`!qOa!kOb!lO#V'SOv#Sa!^#Sa#T#Sa#U#Sa~O!^$mOm#ziv#zi#U#zi#i#zi#n#zi#r#zi#t#zi#w#zi#{#zi$S#zi$W#zi$Z#zi$]#zi$_#zi$b#zi$d#zi$g#zi$k#zi$m#zi#k#zi#p#zi#y#zi$P#zi$U#zi$i#zi~O!^$rOm$Yiv$Yi#U$Yi#i$Yi#n$Yi#r$Yi#t$Yi#w$Yi#{$Yi$S$Yi$W$Yi$Z$Yi$]$Yi$_$Yi$b$Yi$d$Yi$g$Yi$k$Yi$m$Yi#k$Yi#p$Yi#y$Yi$P$Yi$U$Yi$i$Yi~On'VO~Oq!mOm$[iv$[i#U$[i#i$[i#n$[i#r$[i#t$[i#w$[i#{$[i$S$[i$W$[i$Z$[i$]$[i$_$[i$b$[i$d$[i$g$[i$k$[i$m$[i#k$[i#p$[i#y$[i$P$[i$U$[i$i$[i~O!^&pOm$^iv$^i#U$^i#i$^i#n$^i#r$^i#t$^i#w$^i#{$^i$S$^i$W$^i$Z$^i$]$^i$_$^i$b$^i$d$^i$g$^i$k$^i$m$^i#k$^i#p$^i#y$^i$P$^i$U$^i$i$^i~Oq!mOm$civ$ci#U$ci#i$ci#n$ci#r$ci#t$ci#w$ci#{$ci$S$ci$W$ci$Z$ci$]$ci$_$ci$b$ci$d$ci$g$ci$k$ci$m$ci#k$ci#p$ci#y$ci$P$ci$U$ci$i$ci~O]!jO`!qOa!kOb!lOXpqqpqvpqmpq#Upq#ipq#npq#rpq#tpq#wpq#{pq$Spq$Wpq$Zpq$]pq$_pq$bpq$dpq$gpq$kpq$mpq#kpq#ppq#ypq$Ppq$Upq$ipq~Os'YOv!cX%R!cXm!cX#U!cX#i!cX#n!cX#r!cX#t!cX#w!cX#{!cX$P!cX$S!cX$W!cX$Z!cX$]!cX$_!cX$b!cX$d!cX$g!cX$k!cX$m!cX$U!cX~Ov'[O%R&xO~Ov']O%R&xO~Ov'^O!^$rO~Om#}q#U#}q#i#}q#n#}q#r#}q#t#}q#w#}q#{#}q$P#}q$S#}q$W#}q$Z#}q$]#}q$_#}q$b#}q$d#}q$g#}q$k#}q$m#}q~P!(xOm$Rq#U$Rq#i$Rq#n$Rq#r$Rq#t$Rq#w$Rq#{$Rq$S$Rq$U$Rq$W$Rq$Z$Rq$]$Rq$_$Rq$b$Rq$d$Rq$g$Rq$k$Rq$m$Rq~P!(xO!^$rOm$Yqv$Yq#U$Yq#i$Yq#n$Yq#r$Yq#t$Yq#w$Yq#{$Yq$S$Yq$W$Yq$Z$Yq$]$Yq$_$Yq$b$Yq$d$Yq$g$Yq$k$Yq$m$Yq#k$Yq#p$Yq#y$Yq$P$Yq$U$Yq$i$Yq~Os'dO~O]!jO`!qOa!kOb!lOv#Sq!^#Sq#T#Sq#U#Sq~O%R&xOm#}y#U#}y#i#}y#n#}y#r#}y#t#}y#w#}y#{#}y$P#}y$S#}y$W#}y$Z#}y$]#}y$_#}y$b#}y$d#}y$g#}y$k#}y$m#}y~O%R&xOm$Ry#U$Ry#i$Ry#n$Ry#r$Ry#t$Ry#w$Ry#{$Ry$S$Ry$U$Ry$W$Ry$Z$Ry$]$Ry$_$Ry$b$Ry$d$Ry$g$Ry$k$Ry$m$Ry~O!^$rOm$Yyv$Yy#U$Yy#i$Yy#n$Yy#r$Yy#t$Yy#w$Yy#{$Yy$S$Yy$W$Yy$Z$Yy$]$Yy$_$Yy$b$Yy$d$Yy$g$Yy$k$Yy$m$Yy#k$Yy#p$Yy#y$Yy$P$Yy$U$Yy$i$Yy~O]!jO`!qOa!kOb!lOv!ci%R!cim!ci#U!ci#i!ci#n!ci#r!ci#t!ci#w!ci#{!ci$P!ci$S!ci$W!ci$Z!ci$]!ci$_!ci$b!ci$d!ci$g!ci$k!ci$m!ci$U!ci~O]!jO`!qOa!kOb!lOm$`qv$`q!^$`q#U$`q#i$`q#n$`q#r$`q#t$`q#w$`q#{$`q$S$`q$W$`q$Z$`q$]$`q$_$`q$b$`q$d$`q$g$`q$k$`q$m$`q#k$`q#p$`q#y$`q$P$`q$U$`q$i$`q~O",goto:"7o%UPPPPPPPP%VP%V%g&zPP&zPPP&zPPP&zPPPPPPPP'xP(YP(]PP(](mP(}P(]P(]P(])TP)eP(])kP){P(]PP(]*RPP*c*m*wP(]*}P+_P(]P(]P(]P(]+eP+u+xP(]+{P,],`P(]P(]P,cPPP(]P(]P(],gP,wP(]P(]P(]P,}-_P-oP,}-uP.VP,}P,}P,}.]P.mP,}P,}.s/TP,}/ZP/kP,}P,},}P,}P,}P/q,}P,}P,}/uP0VP,}P,}P0]0{1c2R2]2o3R3X3_3e4TPPPPPP4Z4kP%V7_m^OTUVWX[`!Q!T!W!Z!^!g!vdRehijlmnvwxyz{|!k!l!q!r#f#g#h#j#k#q#r#s#t#u#v#w$f$m$p$q${&Q&k&l'R'Y'dQ!}oQ#OpQ%n#lQ%o#mQ&_$xQ'W&pR'`'S!wfRehijlmnvwxyz{|!k!l!q!r#f#g#h#j#k#q#r#s#t#u#v#w$f$m$p$q${&Q&k&l'R'Y'dm!nch!o!t!u#U#X$g$v%O%q%t&o&sR$a!mm]OTUVWX[`!Q!T!W!Z!^!gmTOTUVWX[`!Q!T!W!Z!^!gQ!PTR#y!QmUOTUVWX[`!Q!T!W!Z!^!gQ!SUR#{!TmVOTUVWX[`!Q!T!W!Z!^!gQ!VVR#}!WmWOTUVWX[`!Q!T!W!Z!^!ga&z&W&X&{&}'T'U'a'ba&y&W&X&{&}'T'U'a'bQ!YWR$P!ZmXOTUVWX[`!Q!T!W!Z!^!gQ!]XR$R!^mYOTUVWX[`!Q!T!W!Z!^!gR!bYR$U!bmZOTUVWX[`!Q!T!W!Z!^!gR!eZR$X!eT$y#V$zm[OTUVWX[`!Q!T!W!Z!^!gQ!f[R$Z!gm#c}#]#^#_#`#a#b#e%U%X%[%_%b%em#]}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%T#]R&d%Um#^}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%W#^R&e%Xm#_}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%Z#_R&f%[m#`}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%^#`R&g%_m#a}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%a#aR&h%bT&q%r&rm#b}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%d#bR&i%eQ`OQ!QTQ!TUQ!WVQ!ZWQ!^XQ!g[_!i`!Q!T!W!Z!^!gSQO`SaQ!Oi!OTUVWX[!Q!T!W!Z!^!gQ!ocQ!uh^$b!o!u$g$v%O&o&sQ$g!tQ$v#UQ%O#XQ&o%qR&s%tQ$n!|S&U$n&jR&j%mQ&{&WQ&}&XW'Z&{&}'a'bQ'a'TR'b'UQ$s#RW&Z$s&m'P'cQ&m%pQ'P&]R'c'VQ!aYR$T!aQ!dZR$W!dQ$z#VR&`$zQ#e}Q%U#]Q%X#^Q%[#_Q%_#`Q%b#aQ%e#b_%g#e%U%X%[%_%b%eQ&r%rR'X&rm_OTUVWX[`!Q!T!W!Z!^!gQcRQ!seQ!thQ!wiQ!xjQ!zlQ!{mQ!|nQ#UvQ#VwQ#WxQ#XyQ#YzQ#Z{Q#[|Q$^!kQ$_!lQ$d!qQ$e!rQ%i#fQ%j#gQ%k#hQ%l#jQ%m#kQ%q#qQ%r#rQ%s#sQ%t#tQ%u#uQ%v#vQ%w#wQ&R$fQ&T$mQ&W$pQ&X$qQ&b${Q&v&QQ'T&kQ'U&lQ'_'RQ'e'YR'f'dm#d}#]#^#_#`#a#b#e%U%X%[%_%b%e",nodeNames:"\u26A0 {{ {% {% {% {% InlineComment Template Text }} Interpolation VariableName MemberExpression . PropertyName BinaryExpression contains CompareOp LogicOp AssignmentExpression AssignOp ) ( RangeExpression .. BooleanLiteral empty forloop tablerowloop continue StringLiteral NumberLiteral Filter | FilterName : Tag TagName %} IfDirective Tag if EndTag endif Tag elsif Tag else UnlessDirective Tag unless EndTag endunless CaseDirective Tag case EndTag endcase Tag when , ForDirective Tag for in Parameter ParameterName EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag continue Tag cycle Comment Tag comment CommentText EndTag endcomment RawDirective Tag raw RawText EndTag endraw Tag echo Tag render RenderParameter with for as Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement Tag liquid IfDirective Tag if EndTag endif UnlessDirective Tag unless EndTag endunless Tag elsif Tag else CaseDirective Tag case EndTag endcase Tag when ForDirective Tag EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag Tag cycle Tag echo Tag render RenderParameter Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement",maxTerm:189,nodeProps:[["closedBy",1,"}}",-4,2,3,4,5,"%}",22,")"],["openedBy",9,"{{",21,"(",38,"{%"],["group",-12,11,12,15,19,23,25,26,27,28,29,30,31,"Expression"]],skippedNodes:[0,6],repeatNodeCount:11,tokenData:")Q~RkXY!vYZ!v]^!vpq!vqr#Xrs#duv$Uwx$axy$|yz%R{|%W|}&r}!O&w!O!P'T!Q![&a![!]'e!^!_'j!_!`'r!`!a'j!c!}'z#R#S'z#T#o'z#p#q(p#q#r(u%W;'S'z;'S;:j(j<%lO'z~!{S%O~XY!vYZ!v]^!vpq!v~#[P!_!`#_~#dOa~~#gUOY#dZr#drs#ys;'S#d;'S;=`$O<%lO#d~$OOn~~$RP;=`<%l#d~$XP#q#r$[~$aOv~~$dUOY$aZw$awx#yx;'S$a;'S;=`$v<%lO$a~$yP;=`<%l$a~%ROf~~%WOe~P%ZQ!O!P%a!Q![&aP%dP!Q![%gP%lRoP!Q![%g!g!h%u#X#Y%uP%xR{|&R}!O&R!Q![&XP&UP!Q![&XP&^PoP!Q![&XP&fSoP!O!P%a!Q![&a!g!h%u#X#Y%u~&wO!^~~&zRuv$U!O!P%a!Q![&a~'YQ]S!O!P'`!Q![%g~'eOh~~'jOs~~'oPa~!_!`#_~'wPd~!_!`#__(TV^WuQ%RT!Q!['z!c!}'z#R#S'z#T#o'z%W;'S'z;'S;:j(j<%lO'z_(mP;=`<%l'z~(uOq~~(xP#q#r({~)QOX~",tokenizers:[N,I,C,A,0,1,2,3],topRules:{Template:[0,7]},specialized:[{term:187,get:O=>B[O]||-1},{term:37,get:O=>H[O]||-1}],tokenPrec:0});function o(O,a){return O.split(" ").map(e=>({label:e,type:a}))}var p=o("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where","function"),q=o("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include","keyword"),d=o("empty forloop tablerowloop in with as contains","keyword"),M=o("first index index0 last length rindex","property"),K=o("col col0 col_first col_last first index index0 last length rindex rindex0 row","property");function J(O){var r;let{state:a,pos:e}=O,$=y(a).resolveInner(e,-1).enterUnfinishedNodesBefore(e),i=((r=$.childBefore(e))==null?void 0:r.name)||$.name;if($.name=="FilterName")return{type:"filter",node:$};if(O.explicit&&i=="|")return{type:"filter"};if($.name=="TagName")return{type:"tag",node:$};if(O.explicit&&i=="{%")return{type:"tag"};if($.name=="PropertyName"&&$.parent.name=="MemberExpression")return{type:"property",node:$,target:$.parent};if($.name=="."&&$.parent.name=="MemberExpression")return{type:"property",target:$.parent};if($.name=="MemberExpression"&&i==".")return{type:"property",target:$};if($.name=="VariableName")return{type:"expression",from:$.from};let n=O.matchBefore(/[\w\u00c0-\uffff]+$/);return n?{type:"expression",from:n.from}:O.explicit&&$.name!="CommentText"&&$.name!="StringLiteral"&&$.name!="NumberLiteral"&&$.name!="InlineComment"?{type:"expression"}:null}function OO(O,a,e,$){let i=[];for(;;){let n=a.getChild("Expression");if(!n)return[];if(n.name=="forloop")return i.length?[]:M;if(n.name=="tablerowloop")return i.length?[]:K;if(n.name=="VariableName"){i.unshift(O.sliceDoc(n.from,n.to));break}else if(n.name=="MemberExpression"){let r=n.getChild("PropertyName");r&&i.unshift(O.sliceDoc(r.from,r.to)),a=n}else return[]}return $?$(i,O,e):[]}function f(O={}){let a=O.filters?O.filters.concat(p):p,e=O.tags?O.tags.concat(q):q,$=O.variables?O.variables.concat(d):d,{properties:i}=O;return n=>{let r=J(n);if(!r)return null;let Q=r.from??(r.node?r.node.from:n.pos),c;return c=r.type=="filter"?a:r.type=="tag"?e:r.type=="expression"?$:OO(n.state,r.target,n,i),c.length?{options:c,from:Q,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var h=k.inputHandler.of((O,a,e,$)=>$!="%"||a!=e||O.state.doc.sliceString(a-1,e+1)!="{}"?!1:(O.dispatch(O.state.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:"%%"},range:U.cursor(i.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function s(O){return a=>{let e=O.test(a.textAfter);return a.lineIndent(a.node.from)+(e?0:a.unit)}}var $O=Y.define({name:"liquid",parser:L.configure({props:[W({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":t.keyword,"empty forloop tablerowloop":t.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":t.controlKeyword,"assign capture endcapture":t.definitionKeyword,contains:t.operatorKeyword,"render include":t.moduleKeyword,VariableName:t.variableName,TagName:t.tagName,FilterName:t.function(t.variableName),PropertyName:t.propertyName,CompareOp:t.compareOperator,AssignOp:t.definitionOperator,LogicOp:t.logicOperator,NumberLiteral:t.number,StringLiteral:t.string,BooleanLiteral:t.bool,InlineComment:t.lineComment,CommentText:t.blockComment,"{% %} {{ }}":t.brace,"( )":t.paren,".":t.derefOperator,", .. : |":t.punctuation}),u.add({Tag:w({closing:"%}"}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":s(/^\s*(\{%-?\s*)?end\w/),IfDirective:s(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:s(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),v.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(O){let a=O.firstChild,e=O.lastChild;return!a||a.name!="Tag"?null:{from:a.to,to:e.name=="EndTag"?e.from:O.to}}})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),m=G();function g(O){return $O.configure({wrap:_(a=>a.type.isTop?{parser:O.parser,overlay:e=>e.name=="Text"||e.name=="RawText"}:null)},"liquid")}var b=g(m.language);function aO(O={}){let a=O.base||m,e=a.language==m.language?b:g(a.language);return new R(e,[a.support,e.data.of({autocomplete:f(O)}),a.language.data.of({closeBrackets:{brackets:["{"]}}),h])}export{b as i,aO as n,f as r,h as t};
import{J as r,n as l,nt as o,q as P,r as g,s as R,u as $}from"./dist-DBwNzi3C.js";import{n as m}from"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import{a as Q}from"./dist-sMh6mJ2d.js";var c=1,b=33,v=34,W=35,f=36,d=new l(O=>{let e=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>e&&O.acceptToken(c)});function n(O,e,a){return new l(t=>{let q=t.pos;for(;t.next!=O&&t.next>=0&&(a||t.next!=38&&(t.next!=123||t.peek(1)!=123));)t.advance();t.pos>q&&t.acceptToken(e)})}var C=n(39,b,!1),T=n(34,v,!1),x=n(39,W,!0),V=n(34,f,!0),U=g.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<<GrOOQO<<Gr<<GrOOQO1G/[1G/[OOOS-E6x-E6xOOQO1G.}1G.}OOOQ-E6y-E6yOOQOAN=^AN=^",stateData:"&d~OvOS~OPROSQOVROWRO~OZTO[XO^VOaUOhWO~OR]OU^O~O[`O^aO~O[bO~O[cO~O[dO~ObeO~ObfO~ObgO~ORhO~O]kOwiO~O[lO~O_mO~OynOzoO~OysOztO~O[uO~O]wOwiO~O_yOwiO~OtzO~Os|O~OSQOV!OOW!OOr!OOy!QO~OSQOV!ROW!ROq!ROz!QO~O_!TOwiO~O]!UO~Oy!VO~Oz!VO~OSQOV!OOW!OOr!OOy!XO~OSQOV!ROW!ROq!ROz!XO~O]!ZO~O",goto:"#dyPPPPPzPPPP!WPPPPP!WPP!Z!^!a!d!dP!g!j!m!p!v#Q#WPPPPPPPP#^SROSS!Os!PT!Rt!SRYPRqeR{nR}oRZPRqfR[PRqgQSOR_SQj`SvjxRxlQ!PsR!W!PQ!StR!Y!SQpeRrf",nodeNames:"\u26A0 Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue",maxTerm:42,nodeProps:[["openedBy",3,"{{",15,"("],["closedBy",4,"}}",14,")"],["isolate",-4,5,19,25,27,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mqr#rrs%jst&Qtv#rvw&hwx)zxy*byz*xz{+`{}#r}!O+v!O!P-]!P!Q#r!Q![+v![!]+v!]!_#r!_!`-s!`!c#r!c!}+v!}#O.Z#O#P#r#P#Q.q#Q#R#r#R#S+v#S#T#r#T#o+v#o#p/X#p#q#r#q#r0Z#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vQ#wTUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rQ$ZSO#q#r#r;'S#r;'S;=`$g<%lO#rQ$jP;=`<%l#rR$t[UQvPOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mq#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR%qTyPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&XTaPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&oXUQWPOp'[pq#rq!]'[!]!^#r!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R'aXUQOp'[pq#rq!]'[!]!^'|!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R(TTVPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR(gXOp'[pq#rq!]'[!]!^'|!^#q'[#q#r)S#r;'S'[;'S;=`)t<%lO'[P)VUOp)Sq!])S!]!^)i!^;'S)S;'S;=`)n<%lO)SP)nOVPP)qP;=`<%l)SR)wP;=`<%l'[R*RTzPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR*iT^PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+PT_PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+gThPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+}b[PUQO}#r}!O+v!O!Q#r!Q![+v![!]+v!]!c#r!c!}+v!}#R#r#R#S+v#S#T#r#T#o+v#o#q#r#q#r$W#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vR-YP;=`<%l+vR-dTwPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR-zTUQbPO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.bTZPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.xT]PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/^VUQO#o#r#o#p/s#p#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/zTSPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#r~0^TO#q#r#q#r0m#r;'S#r;'S;=`$g<%lO#r~0rOR~",tokenizers:[d,C,T,x,V,0,1],topRules:{Content:[0,2],Attribute:[1,9]},tokenPrec:0}),w=Q.parser.configure({top:"SingleExpression"}),S=U.configure({props:[P({Text:r.content,Is:r.definitionOperator,AttributeName:r.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":r.attributeValue,Entity:r.character,InvalidEntity:r.invalid,"BoundAttributeName/Identifier":r.attributeName,"EventName/Identifier":r.special(r.attributeName),"ReferenceName/Identifier":r.variableName,"DirectiveName/Identifier":r.keyword,"{{ }}":r.brace,"( )":r.paren,"[ ]":r.bracket,"# '*'":r.punctuation})]}),i={parser:w},y={parser:Q.parser},A=S.configure({wrap:o((O,e)=>O.name=="InterpolationContent"?i:null)}),N=S.configure({wrap:o((O,e)=>{var a;return O.name=="InterpolationContent"?i:O.name=="AttributeInterpolation"?((a=O.node.parent)==null?void 0:a.name)=="StatementAttributeValue"?y:i:null}),top:"Attribute"}),E={parser:A},k={parser:N},p=m({selfClosingTags:!0});function s(O){return O.configure({wrap:o(z)},"angular")}var u=s(p.language);function z(O,e){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(e.read(O.from,O.to))?k:null;case"Text":return E}return null}function I(O={}){let e=p;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof R))throw RangeError("The base option must be the result of calling html(...)");e=O.base}return new $(e.language==p.language?u:s(e.language),[e.support,e.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{I as angular,u as angularLanguage};
import{D as U,H as _,J as m,N as Z,at as B,h as D,n as R,q as M,r as F,s as J,t as K,u as H,zt as L}from"./dist-DBwNzi3C.js";var W=1,OO=2,tO=3,eO=4,oO=5,rO=36,nO=37,aO=38,lO=11,sO=13;function iO(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function cO(O){return O==9||O==10||O==13||O==32}var E=null,z=null,G=0;function w(O,t){let e=O.pos+t;if(z==O&&G==e)return E;for(;cO(O.peek(t));)t++;let o="";for(;;){let s=O.peek(t);if(!iO(s))break;o+=String.fromCharCode(s),t++}return z=O,G=e,E=o||null}function A(O,t){this.name=O,this.parent=t}var $O=new K({start:null,shift(O,t,e,o){return t==W?new A(w(o,1)||"",O):O},reduce(O,t){return t==lO&&O?O.parent:O},reuse(O,t,e,o){let s=t.type.id;return s==W||s==sO?new A(w(o,1)||"",O):O},strict:!1}),SO=new R((O,t)=>{if(O.next==60){if(O.advance(),O.next==47){O.advance();let e=w(O,0);if(!e)return O.acceptToken(oO);if(t.context&&e==t.context.name)return O.acceptToken(OO);for(let o=t.context;o;o=o.parent)if(o.name==e)return O.acceptToken(tO,-2);O.acceptToken(eO)}else if(O.next!=33&&O.next!=63)return O.acceptToken(W)}},{contextual:!0});function Q(O,t){return new R(e=>{let o=0,s=t.charCodeAt(0);O:for(;!(e.next<0);e.advance(),o++)if(e.next==s){for(let a=1;a<t.length;a++)if(e.peek(a)!=t.charCodeAt(a))continue O;break}o&&e.acceptToken(O)})}var pO=Q(rO,"-->"),gO=Q(nO,"?>"),mO=Q(aO,"]]>"),uO=M({Text:m.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":m.angleBracket,TagName:m.tagName,"MismatchedCloseTag/TagName":[m.tagName,m.invalid],AttributeName:m.attributeName,AttributeValue:m.attributeValue,Is:m.definitionOperator,"EntityReference CharacterReference":m.character,Comment:m.blockComment,ProcessingInst:m.processingInstruction,DoctypeDecl:m.documentMeta,Cdata:m.special(m.string)}),xO=F.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(hO#tO'#CnO(vO&jO'#CnOOOO1G.q1G.qO)UOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO)^O#tO,59YOOOO,59Y,59YOOOO'#C{'#C{O)lO&jO,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.tOOOO-E6y-E6y",stateData:")z~OPQOSVOTWOVWOWWOXWOiXOyPO!QTO!SUO~OvZOx]O~O^`Oz^O~OPQOQcOSVOTWOVWOWWOXWOyPO!QTO!SUO~ORdO~P!SOteO!PgO~OuhO!RjO~O^lOz^O~OvZOxoO~O^qOz^O~O[vO`sOdwOz^O~ORyO~P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",goto:"%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:"\u26A0 StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",maxTerm:50,context:$O,nodeProps:[["closedBy",1,"SelfCloseEndTag EndTag",13,"CloseTag MissingCloseTag"],["openedBy",12,"StartTag StartCloseTag",19,"OpenTag",20,"StartTag"],["isolate",-6,13,18,19,21,22,24,""]],propSources:[uO],skippedNodes:[0],repeatNodeCount:9,tokenData:"!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q#T#o4n#o%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U$q4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qi$zXVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qa%nVVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%gP&YTVPOv&Tw!^&T!_;'S&T;'S;=`&i<%lO&TP&lP;=`<%l&T`&tS!O`Ov&ox;'S&o;'S;=`'Q<%lO&o`'TP;=`<%l&oa'ZP;=`<%l%gX'eWVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^W(ST|WOr'}sv'}w;'S'};'S;=`(c<%lO'}W(fP;=`<%l'}X(lP;=`<%l'^h(vV|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oh)`P;=`<%l(oi)fP;=`<%l$qo)t`VP|W!O`zUOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk+PV{YVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%g~+iast,n![!]-r!c!}-r#R#S-r#T#o-r%W%o-r%p&a-r&b1p-r4U4d-r4e$IS-r$I`$Ib-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~,qQ!Q![,w#l#m-V~,zQ!Q![,w!]!^-Q~-VOX~~-YR!Q![-c!c!i-c#T#Z-c~-fS!Q![-c!]!^-Q!c!i-c#T#Z-c~-ug}!O-r!O!P-r!Q![-r![!]-r!]!^/^!c!}-r#R#S-r#T#o-r$}%O-r%W%o-r%p&a-r&b1p-r1p4U-r4U4d-r4e$IS-r$I`$Ib-r$Je$Jg-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~/cOW~~/fP;=`<%l-rk/rW}bVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^k0eZVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O1W!O!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk1aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a2S!a;'S$q;'S;=`)c<%lO$qk2_X!PQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qm3TZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a3v!a;'S$q;'S;=`)c<%lO$qm4RXdSVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo4{!P`S^QVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O4n!O!P4n!P!Q$q!Q![4n![!]4n!]!^$q!^!_(o!_!c$q!c!}4n!}#R$q#R#S4n#S#T$q#T#o4n#o$}$q$}%O4n%O%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U4n4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Je$q$Je$Jg4n$Jg$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qo8RP;=`<%l4ni8]Y|W!O`Oq(oqr8{rs&osv(owx'}x!a(o!a!b!#U!b;'S(o;'S;=`)]<%lO(oi9S_|W!O`Or(ors&osv(owx'}x}(o}!O:R!O!f(o!f!g;e!g!}(o!}#ODh#O#W(o#W#XLp#X;'S(o;'S;=`)]<%lO(oi:YX|W!O`Or(ors&osv(owx'}x}(o}!O:u!O;'S(o;'S;=`)]<%lO(oi;OV!QP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oi;lX|W!O`Or(ors&osv(owx'}x!q(o!q!r<X!r;'S(o;'S;=`)]<%lO(oi<`X|W!O`Or(ors&osv(owx'}x!e(o!e!f<{!f;'S(o;'S;=`)]<%lO(oi=SX|W!O`Or(ors&osv(owx'}x!v(o!v!w=o!w;'S(o;'S;=`)]<%lO(oi=vX|W!O`Or(ors&osv(owx'}x!{(o!{!|>c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[SO,pO,gO,mO,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function v(O,t){let e=t&&t.getChild("TagName");return e?O.sliceString(e.from,e.to):""}function y(O,t){let e=t&&t.firstChild;return!e||e.name!="OpenTag"?"":v(O,e)}function fO(O,t,e){let o=t&&t.getChildren("Attribute").find(a=>a.from<=e&&a.to>=e),s=o&&o.getChild("AttributeName");return s?O.sliceString(s.from,s.to):""}function X(O){for(let t=O&&O.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function qO(O,t){var s;let e=_(O).resolveInner(t,-1),o=null;for(let a=e;!o&&a.parent;a=a.parent)(a.name=="OpenTag"||a.name=="CloseTag"||a.name=="SelfClosingTag"||a.name=="MismatchedCloseTag")&&(o=a);if(o&&(o.to>t||o.lastChild.type.isError)){let a=o.parent;if(e.name=="TagName")return o.name=="CloseTag"||o.name=="MismatchedCloseTag"?{type:"closeTag",from:e.from,context:a}:{type:"openTag",from:e.from,context:X(a)};if(e.name=="AttributeName")return{type:"attrName",from:e.from,context:o};if(e.name=="AttributeValue")return{type:"attrValue",from:e.from,context:o};let l=e==o||e.name=="Attribute"?e.childBefore(t):e;return(l==null?void 0:l.name)=="StartTag"?{type:"openTag",from:t,context:X(a)}:(l==null?void 0:l.name)=="StartCloseTag"&&l.to<=t?{type:"closeTag",from:t,context:a}:(l==null?void 0:l.name)=="Is"?{type:"attrValue",from:t,context:o}:l?{type:"attrName",from:t,context:o}:null}else if(e.name=="StartCloseTag")return{type:"closeTag",from:t,context:e.parent};for(;e.parent&&e.to==t&&!((s=e.lastChild)!=null&&s.type.isError);)e=e.parent;return e.name=="Element"||e.name=="Text"||e.name=="Document"?{type:"tag",from:t,context:e.name=="Element"?e:X(e)}:null}var dO=class{constructor(O,t,e){this.attrs=t,this.attrValues=e,this.children=[],this.name=O.name,this.completion=Object.assign(Object.assign({type:"type"},O.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"</"+this.name+">",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=O.textContent?O.textContent.map(o=>({label:o,type:"text"})):[]}},V=/^[:\-\.\w\u00b7-\uffff]*$/;function k(O){return Object.assign(Object.assign({type:"property"},O.completion||{}),{label:O.name})}function Y(O){return typeof O=="string"?{label:`"${O}"`,type:"constant"}:/^"/.test(O.label)?O:Object.assign(Object.assign({},O),{label:`"${O.label}"`})}function I(O,t){let e=[],o=[],s=Object.create(null);for(let n of t){let r=k(n);e.push(r),n.global&&o.push(r),n.values&&(s[n.name]=n.values.map(Y))}let a=[],l=[],u=Object.create(null);for(let n of O){let r=o,g=s;n.attributes&&(r=r.concat(n.attributes.map(c=>typeof c=="string"?e.find(S=>S.label==c)||{label:c,type:"property"}:(c.values&&(g==s&&(g=Object.create(g)),g[c.name]=c.values.map(Y)),k(c)))));let i=new dO(n,r,g);u[i.name]=i,a.push(i),n.top&&l.push(i)}l.length||(l=a);for(let n=0;n<a.length;n++){let r=O[n],g=a[n];if(r.children)for(let i of r.children)u[i]&&g.children.push(u[i]);else g.children=a}return n=>{var f,q,x,d;let{doc:r}=n.state,g=qO(n.state,n.pos);if(!g||g.type=="tag"&&!n.explicit)return null;let{type:i,from:c,context:S}=g;if(i=="openTag"){let $=l,p=y(r,S);return p&&($=((f=u[p])==null?void 0:f.children)||a),{from:c,options:$.map(P=>P.completion),validFor:V}}else if(i=="closeTag"){let $=y(r,S);return $?{from:c,to:n.pos+(r.sliceString(n.pos,n.pos+1)==">"?1:0),options:[((q=u[$])==null?void 0:q.closeNameCompletion)||{label:$+">",type:"type"}],validFor:V}:null}else{if(i=="attrName")return{from:c,options:((x=u[v(r,S)])==null?void 0:x.attrs)||o,validFor:V};if(i=="attrValue"){let $=fO(r,S,c);if(!$)return null;let p=(((d=u[v(r,S)])==null?void 0:d.attrValues)||s)[$];return!p||!p.length?null:{from:c,to:n.pos+(r.sliceString(n.pos,n.pos+1)=='"'?1:0),options:p,validFor:/^"[^"]*"?$/}}else if(i=="tag"){let $=y(r,S),p=u[$],P=[],C=S&&S.lastChild;$&&(!C||C.name!="CloseTag"||v(r,C)!=$)&&P.push(p?p.closeCompletion:{label:"</"+$+">",type:"type",boost:2});let b=P.concat(((p==null?void 0:p.children)||(S?a:l)).map(T=>T.openCompletion));if(S&&(p!=null&&p.text.length)){let T=S.firstChild;T.to>n.pos-20&&!/\S/.test(n.state.sliceDoc(T.to,n.pos))&&(b=b.concat(p.text))}return{from:c,options:b,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}}var h=J.define({name:"xml",parser:xO.configure({props:[Z.add({Element(O){let t=/^\s*<\//.test(O.textAfter);return O.lineIndent(O.node.from)+(t?0:O.unit)},"OpenTag CloseTag SelfClosingTag"(O){return O.column(O.node.from)+O.unit}}),U.add({Element(O){let t=O.firstChild,e=O.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:e.name=="CloseTag"?e.from:O.to}}}),D.add({"OpenTag CloseTag":O=>O.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/$/}});function PO(O={}){let t=[h.data.of({autocomplete:I(O.elements||[],O.attributes||[])})];return O.autoCloseTags!==!1&&t.push(j),new H(h,t)}function N(O,t,e=O.length){if(!t)return"";let o=t.firstChild,s=o&&o.getChild("TagName");return s?O.sliceString(s.from,Math.min(s.to,e)):""}var j=B.inputHandler.of((O,t,e,o,s)=>{if(O.composing||O.state.readOnly||t!=e||o!=">"&&o!="/"||!h.isActiveAt(O.state,t,-1))return!1;let a=s(),{state:l}=a,u=l.changeByRange(n=>{var S,f,q;let{head:r}=n,g=l.doc.sliceString(r-1,r)==o,i=_(l).resolveInner(r,-1),c;if(g&&o==">"&&i.name=="EndTag"){let x=i.parent;if(((f=(S=x.parent)==null?void 0:S.lastChild)==null?void 0:f.name)!="CloseTag"&&(c=N(l.doc,x.parent,r)))return{range:n,changes:{from:r,to:r+(l.doc.sliceString(r,r+1)===">"?1:0),insert:`</${c}>`}}}else if(g&&o=="/"&&i.name=="StartCloseTag"){let x=i.parent;if(i.from==r-2&&((q=x.lastChild)==null?void 0:q.name)!="CloseTag"&&(c=N(l.doc,x,r))){let d=r+(l.doc.sliceString(r,r+1)===">"?1:0),$=`${c}>`;return{range:L.cursor(r+$.length,-1),changes:{from:r,to:d,insert:$}}}}return{range:n}});return u.changes.empty?!1:(O.dispatch([a,l.update(u,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{h as i,I as n,PO as r,j as t};
import{D as m,H as u,J as r,N as x,at as Z,i as G,n as l,nt as b,q as R,r as h,s as k,u as w,y as X,zt as T}from"./dist-DBwNzi3C.js";import{n as y}from"./dist-Btv5Rh1v.js";var U=1,z=2,j=3,Y=155,E=4,W=156;function _(O){return O>=65&&O<=90||O>=97&&O<=122}var V=new l(O=>{let e=O.pos;for(;;){let{next:t}=O;if(t<0)break;if(t==123){let i=O.peek(1);if(i==123){if(O.pos>e)break;O.acceptToken(U,2);return}else if(i==35){if(O.pos>e)break;O.acceptToken(z,2);return}else if(i==37){if(O.pos>e)break;let a=2,Q=2;for(;;){let P=O.peek(a);if(P==32||P==10)++a;else if(P==35)for(++a;;){let n=O.peek(a);if(n<0||n==10)break;a++}else if(P==45&&Q==2)Q=++a;else{O.acceptToken(j,Q);return}}}}if(O.advance(),t==10)break}O.pos>e&&O.acceptToken(Y)});function q(O,e,t){return new l(i=>{let a=i.pos;for(;;){let{next:Q}=i;if(Q==123&&i.peek(1)==37){let P=2;for(;;P++){let o=i.peek(P);if(o!=32&&o!=10)break}let n="";for(;;P++){let o=i.peek(P);if(!_(o))break;n+=String.fromCharCode(o)}if(n==O){if(i.pos>a)break;i.acceptToken(t,2);break}}else if(Q<0)break;if(i.advance(),Q==10)break}i.pos>a&&i.acceptToken(e)})}var F=q("endraw",W,E),N={__proto__:null,in:38,is:40,and:46,or:48,not:52,if:78,else:80,true:98,false:98,self:100,super:102,loop:104,recursive:136,scoped:160,required:162,as:256,import:260,ignore:268,missing:270,with:272,without:274,context:276},D={__proto__:null,if:112,elif:118,else:122,endif:126,for:132,endfor:140,raw:146,endraw:152,block:158,endblock:166,macro:172,endmacro:182,call:188,endcall:192,filter:198,endfilter:202,set:208,endset:212,trans:218,pluralize:222,endtrans:226,with:232,endwith:236,autoescape:242,endautoescape:246,import:254,from:258,include:266},C=h.deserialize({version:14,states:"!*dQVOPOOOOOP'#F`'#F`OeOTO'#CbOvQSO'#CdO!kOPO'#DcO!yOPO'#DnO#XOQO'#DuO#^OPO'#D{O#lOPO'#ESO#zOPO'#E[O$YOPO'#EaO$hOPO'#EfO$vOPO'#EkO%UOPO'#ErO%dOPO'#EwOOOP'#F|'#F|O%rQWO'#E|O&sO#tO'#F]OOOP'#Fq'#FqOOOP'#F_'#F_QVOPOOOOOP-E9^-E9^OOQO'#Ce'#CeO'sQSO,59OO'zQSO'#DWO(RQSO'#DXO(YQ`O'#DZOOQO'#Fr'#FrOvQSO'#CuO(aOPO'#CbOOOP'#Fd'#FdO!kOPO,59}OOOP,59},59}O(oOPO,59}O(}QWO'#E|OOOP,5:Y,5:YO)[OPO,5:YO!yOPO,5:YO)jQWO'#E|OOOQ'#Ff'#FfO)tOQO'#DxO)|OQO,5:aOOOP,5:g,5:gO#^OPO,5:gO*RQWO'#E|OOOP,5:n,5:nO#lOPO,5:nO*YQWO'#E|OOOP,5:v,5:vO#zOPO,5:vO*aQWO'#E|OOOP,5:{,5:{O$YOPO,5:{O*hQWO'#E|OOOP,5;Q,5;QO$hOPO,5;QO*oQWO'#E|OOOP,5;V,5;VO*vOPO,5;VO$vOPO,5;VO+UQWO'#E|OOOP,5;^,5;^O%UOPO,5;^O+`QWO'#E|OOOP,5;c,5;cO%dOPO,5;cO+gQWO'#E|O+nQSO,5;hOvQSO,5:OO+uQSO,5:ZO+zQSO,5:bO+uQSO,5:hO+uQSO,5:oO,PQSO,5:wO,XQpO,5:|O+uQSO,5;RO,^QSO,5;WO,fQSO,5;_OvQSO,5;dOvQSO,5;jOvQSO,5;jOvQSO,5;pOOOO'#Fk'#FkO,nO#tO,5;wOOOP-E9]-E9]O,vQ!bO,59QOvQSO,59TOvQSO,59UOvQSO,59UOvQSO,59UOvQSO,59UO,{QSO'#C}O,XQpO,59cOOQO,59q,59qOOOP1G.j1G.jOvQSO,59UO-SQSO,59UOvQSO,59UOvQSO,59UOvQSO,59nO-wQSO'#FxO.RQSO,59rO.WQSO,59tOOQO,59s,59sO.bQSO'#D[O.iQWO'#F{O.qQWO,59uO0WQSO,59aOOOP-E9b-E9bOOOP1G/i1G/iO(oOPO1G/iO(oOPO1G/iO)TQWO'#E|OvQSO,5:SO0nQSO,5:UO0sQSO,5:WOOOP1G/t1G/tO)[OPO1G/tO)mQWO'#E|O)[OPO1G/tO0xQSO,5:_OOOQ-E9d-E9dOOOP1G/{1G/{O0}QWO'#DyOOOP1G0R1G0RO1SQSO,5:lOOOP1G0Y1G0YO1[QSO,5:tOOOP1G0b1G0bO1aQSO,5:yOOOP1G0g1G0gO1fQSO,5;OOOOP1G0l1G0lO1kQSO,5;TOOOP1G0q1G0qO*vOPO1G0qO+XQWO'#E|O*vOPO1G0qOvQSO,5;YO1pQSO,5;[OOOP1G0x1G0xO1uQSO,5;aOOOP1G0}1G0}O1zQSO,5;fO2PQSO1G1SOOOP1G1S1G1SO2WQSO1G/jOOQO'#Dq'#DqO2_QSO1G/uOOOQ1G/|1G/|O2gQSO1G0SO2rQSO1G0ZO2zQSO'#EVO3SQSO1G0cO,SQSO1G0cO4fQSO'#FvOOQO'#Fv'#FvO5]QSO1G0hO5bQSO1G0mOOOP1G0r1G0rO5mQSO1G0rO5rQSO'#GOO5zQSO1G0yO6PQSO1G1OO6WQSO1G1UO6_QSO1G1UO6fQSO1G1[OOOO-E9i-E9iOOOP1G1c1G1cOOQO1G.l1G.lO6vQSO1G.oO8wQSO1G.pO:oQSO1G.pO:vQSO1G.pO<nQSO1G.pO<uQSO'#FwO>QQSO'#FrO>XQSO'#FwO>aQSO,59iOOQO1G.}1G.}O>fQSO1G.pO@aQSO1G.pOB_QSO1G.pOBfQSO1G.pOD^QSO1G/YOvQSO'#FbODeQSO,5<dOOQO1G/^1G/^ODmQSO1G/_OOQO1G/`1G/`ODuQSO,59vOvQSO'#FcOEjQWO,5<gOOQO1G/a1G/aPErQWO'#E|OOOP7+%T7+%TO(oOPO7+%TOEyQSO1G/nOOOP1G/p1G/pOOOP1G/r1G/rOOOP7+%`7+%`O)[OPO7+%`OOOP1G/y1G/yOFQQSO,5:eOOOP1G0W1G0WOFVQSO1G0WOOOP1G0`1G0`OOOP1G0e1G0eOOOP1G0j1G0jOOOP1G0o1G0oOOOP7+&]7+&]O*vOPO7+&]OF[QSO1G0tOOOP1G0v1G0vOOOP1G0{1G0{OOOP1G1Q1G1QOOOP7+&n7+&nOOOP7+%U7+%UO+uQSO'#FeOFcQSO7+%aOvQSO7+%aOOOP7+%n7+%nOFkQSO7+%nOFpQSO7+%nOOOP7+%u7+%uOFxQSO7+%uOF}QSO'#F}OGQQSO'#F}OGYQSO,5:qOOOP7+%}7+%}OG_QSO7+%}OGdQSO7+%}OOQO,59f,59fOOOP7+&S7+&SOGlQSO7+&oOOOP7+&X7+&XOvQSO7+&oOvQSO7+&^OGtQSO,5<jOvQSO,5<jOOOP7+&e7+&eOOOP7+&j7+&jO+uQSO7+&pOG|QSO7+&pOOOP7+&v7+&vOHRQSO7+&vOHWQSO7+&vOOQO7+$Z7+$ZOvQSO'#FaOH]QSO,5<cOvQSO,59jOOQO1G/T1G/TOOQO7+$[7+$[OvQSO7+$tOHeQSO,5;|OOQO-E9`-E9`OOQO7+$y7+$yOImQ`O1G/bOIwQSO'#D^OOQO,5;},5;}OOQO-E9a-E9aOOOP<<Ho<<HoOOOP7+%Y7+%YOOOP<<Hz<<HzOOOP1G0P1G0POOOP7+%r7+%rOOOP<<Iw<<IwOOOP7+&`7+&`OOQO,5<P,5<POOQO-E9c-E9cOvQSO<<H{OJOQSO<<H{OOOP<<IY<<IYOJYQSO<<IYOOOP<<Ia<<IaOvQSO,5:rO+uQSO'#FgOJ_QSO,5<iOOQO1G0]1G0]OOOP<<Ii<<IiOJgQSO<<IiOvQSO<<JZOJlQSO<<JZOJsQSO<<IxOvQSO1G2UOJ}QSO1G2UOKXQSO<<J[OK^QSO'#CeOOQO'#FT'#FTOKiQSO'#FTOKnQSO<<J[OKvQSO<<JbOK{QSO<<JbOLWQSO,5;{OLbQSO'#FrOOQO,5;{,5;{OOQO-E9_-E9_OLiQSO1G/UOM}QSO<<H`O! ]Q`O,59aODuQSO,59xO! sQSOAN>gOOOPAN>gAN>gO! }QSOAN>gOOOPAN>tAN>tO!!SQSO1G0^O!!^QSO,5<ROOQO,5<R,5<ROOQO-E9e-E9eOOOPAN?TAN?TO!!iQSOAN?uOOOPAN?uAN?uO+uQSO'#FhO!!pQSOAN?dOOOPAN?dAN?dO!!xQSO7+'pO+uQSO'#FiO!#SQSO7+'pOOOPAN?vAN?vO+uQSO,5;oOG|QSO'#FjO!#[QSOAN?vOOOPAN?|AN?|O!#dQSOAN?|OvQSO,59mO!$sQ`O1G.pO!%{Q`O1G.pO!&SQ`O1G.pO!'[Q`O1G.pO!'cQ`O'#FvO!'jQ`O1G.pO!(uQ`O1G.pO!*TQ`O1G.pO!*[Q`O1G.pO!+dQ`O1G/YO!+kQ`O1G/dOOOPG24RG24RO!+uQSOG24ROvQSO,5:sOOOPG25aG25aO!+zQSO,5<SOOQO-E9f-E9fOOOPG25OG25OO!,PQSO<<K[O!,XQSO,5<TOOQO-E9g-E9gOOQO1G1Z1G1ZOOQO,5<U,5<UOOQO-E9h-E9hOOOPG25bG25bO!,aQSOG25hO!,fQSO1G/XOOOPLD)mLD)mO!,pQSO1G0_OvQSO1G1nO!,zQSO1G1oOvQSO1G1oOOOPLD+SLD+SO!-wQ`O<<H`O!.[QSO7+'YOvQSO7+'ZO!.fQSO7+'ZO!.pQSO<<JuODuQSO'#CuODuQSO,59UODuQSO,59UODuQSO,59UODuQSO,59UO!.zQpO,59cODuQSO,59UO!/PQSO,59UODuQSO,59UODuQSO,59UODuQSO,59nO!/tQSO1G.pP!0RQSO1G/YODuQSO7+$tO!0YQ`O1G.pP!0gQ`O1G/YO-SQSO,59UPvQSO,59nO!0nQSO,59aP!3XQSO1G.pP!3`QSO1G.pP!5aQSO1G/YP!5hQSO<<H`O!/PQSO,59UPDuQSO,59nP!6_QSO1G/YP!7pQ`O1G/YO-SQSO'#CuO-SQSO,59UO-SQSO,59UO-SQSO,59UO-SQSO,59UO-SQSO,59UP-SQSO,59UP-SQSO,59UP-SQSO,59nO!7wQSO1G.pO!9xQSO1G.pO!:PQSO1G.pO!;UQSO1G.pP-SQSO7+$tO!<XQ`O,59aP!>SQ`O1G.pP!>ZQ`O1G.pP!>bQ`O1G/YP!?QQ`O<<H`O!/PQSO'#CuO!/PQSO,59UO!/PQSO,59UO!/PQSO,59UO!/PQSO,59UO!/PQSO,59UP!/PQSO,59UP!/PQSO,59UP!/PQSO,59nP!/PQSO7+$tP-SQSO,59nP!/PQSO,59nO!?zQ`O1G.pO!@RQ`O1G.pO!@fQ`O1G.pO!@yQ`O1G.p",stateData:"!Ac~O$dOS~OPROQaOR`O$aPO~O$aPOPUXQUXRUX$`UX~OekOfkOjlOpiO!RkO!SkO!TkO!UkO$gfO$ihO$njO~OPROQaORrO$aPO~OPROQaORvO$aPO~O$bwO~OPROQaOR|O$aPO~OPROQaOR!PO$aPO~OPROQaOR!SO$aPO~OPROQaOR!VO$aPO~OPROQaOR!YO$aPO~OPROQaOR!^O$aPO~OPROQaOR!aO$aPO~OPROQaOR!dO$aPO~O!X!eO!Y!fO!d!gO!k!hO!q!iO!x!jO#Q!kO#V!lO#[!mO#a!nO#h!oO#m!pO#s!qO#u!rO#y!sO~O$s!tO~OZ!wO_!yO`!zOa!{Ob!|Oc#ROd#SOg#TOh#UOl#OOp!}Ow#VO$i!xO~OV#QO~P&xO$h$lP~PvOo#ZO~PvO$m$oP~PvO$aPOPUXQUXRUX~OPROQaOR#dO$aPO~O!]#eO!_#fO!a#gO~P%rOPROQaOR#jO$aPO~O!_#fO!h#lO~P%rO$bwOS!lX~OS#oO~O!u#qO~P%rO!}#sO~P%rO#S#uO~P%rO#X#wO~P%rO#^#yO~P%rOPROQaOR#|O$aPO~O#c$OO#e$PO~P%rO#j$RO~P%rO#o$TO~P%rO!Z$VO~PvO$g$XO~O!Z$ZO~Op$^O$gfO~Om$aO~O!Z$eO$g$XO~O$g$XO!Z$rP~O$Q$nO$s!tO~O[$oO~Oo$kP~PvOekOfkOj)fOpiO!RkO!SkO!TkO!UkO$gfO$ihO$njO~Ot%PO$h$lX~P&xO$h%RO~Oo%TOt%PO~P&xO!P%UO~P&xOt%VO$m$oX~O$m%XO~OZ!wOp!}O$i!xOViagiahialiawiatia$hiaoia!Pia!Zia#tia#via#zia#|ia#}iaxia!fia~O_!yO`!zOa!{Ob!|Oc#ROd#SO~P.vO!Z%^O~O!Z%_O~O!Z%bO~O!n%cO~O!Z%dO$g$XO~O!Z%fO~O!Z%gO~O!Z%hO~O!Z%iO~O!Z%mO~O!Z%nO~O!Z%oO~O!Z%pO~P&xO!Z%qO~P&xOc%tOt%rO~O!Z%uO!r%wO!s%vO~Op$^O!Z%xO~O$g$XOo$qP~Op!}O!Z%}O~Op!}OZ$jX_$jX`$jXa$jXb$jXc$jXd$jXg$jXh$jXl$jXw$jX$i$jXt$jXe$jXf$jX$g$jXx$jX~O!Z$jXV$jX$h$jXo$jX!P$jX#t$jX#v$jX#z$jX#|$jX#}$jX!f$jX~P3[O!Z&RO~Os&UOt%rO!Z&TO~Os&VO~Os&XOt%rO~O!Z&YO~O!Z&ZO~P&xO#t&[O~P&xO#v&]O~P&xO!Z&^O#z&`O#|&_O#}&_O~P&xO$h&aO~P&xOZ!wOp!}O$i!xOV^i`^ia^ib^ic^id^ig^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ie^if^i$g^ix^i!f^i~O_^i~P6}OZ!wO_!yOp!}O$i!xOV^ia^ib^ic^id^ig^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~O`^i~P9OO`!zO~P9OOZ!wO_!yO`!zOa!{Op!}O$i!xOV^ic^id^ig^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Ob^i~P:}Ot&bOo$kX~P&xOZ$fX_$fX`$fXa$fXb$fXc$fXd$fXg$fXh$fXl$fXo$fXp$fXt$fXw$fX$i$fX~Os&dO~P=POt&bOo$kX~Oo&eO~Ob!|O~P:}OZ!wO_)gO`)hOa)iOb)jOc)kOp!}O$i!xOV^id^ig^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Oe&fOf&fO$gfO~P>mOZ!wO_!yO`!zOa!{Ob!|Oc#ROd#SOp!}O$i!xOV^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Og^i~P@nOg#TO~P@nOZ!wO_!yO`!zOa!{Ob!|Oc#ROd#SOg#TOh#UOp!}O$i!xOVvilviwvitvi$hviovi!Pvi!Zvi#tvi#vvi#zvi#|vi#}vi!fvi~Ox&gO~PBmOt%PO$h$la~Oo&jOt%PO~OekOfkOj(yOpiO!RkO!SkO!TkO!UkO$gfO$ihO$njO~Ot%VO$m$oa~O!]#eO~P%rO!Z&pO~P&xO!Z&rO~O!Z&sO~O!Z&uO~P&xOc&xOt%rO~O!Z&zO~O!Z&zO!s&{O~O!Z&|O~Os&}Ot'OOo$qX~Oo'QO~O!Z'RO~Op!}O!Z'RO~Os'TOt%rO~Os'WOt%rO~O$g'ZO~O$O'_O~O#{'`O~Ot&bOo$ka~Ot$Ua$h$Uao$Ua~P&xOZ!wO_(zO`({Oa(|Ob(}Oc)POd)QOg)ROh)SOl)OOp!}Ow)TO$i!xO~Ot!Oi$m!Oi~PHrO!P'hO~P&xO!Z'jO!f'kO~P&xO!Z'lO~Ot'OOo$qa~O!Z'qO~O!Z'sO~P&xOt'tO!Z'vO~P&xOt'xO!Z$ri~P&xO!Z'zO~Ot!eX!Z!eX#tXX~O#t'{O~Ot'|O!Z'zO~O!Z(OO~O!Z(OO#|(PO#}(PO~Oo$Tat$Ta~P&xOs(QO~P=POoritri~P&xOZ!wOp!}O$i!xOVvylvywvytvy$hvyovy!Pvy!Zvy#tvy#vvy#zvy#|vy#}vyxvy!fvy~O_!yO`!zOa!{Ob!|Oc#ROd#SOg#TOh#UO~PLsOZ!wOp!}O$i!xOgiahialiatiawia$miaxia~O_(zO`({Oa(|Ob(}Oc)POd)QO~PNkO!Z(^O!f(_O~P&xO!Z(^O~Oo!zit!zi~P&xOs(`Oo$Zat$Za~O!Z(aO~P&xOt'tO!Z(dO~Ot'xO!Z$rq~P&xOt'xO!Z$rq~Ot'|O!Z(kO~O$O(lO~OZ!wOp!}O$i!xO`^ia^ib^ic^id^ig^ih^il^it^iw^i$m^ie^if^i$g^ix^i~O_^i~P!#iOZ!wO_(zOp!}O$i!xOa^ib^ic^id^ig^ih^il^it^iw^i$m^ix^i~O`^i~P!$zO`({O~P!$zOZ!wO_(zO`({Oa(|Op!}O$i!xOc^id^ig^ih^il^it^iw^i$m^ix^i~Ob^i~P!&ZO$m$jX~P3[Ob(}O~P!&ZOZ!wO_)zO`){Oa)|Ob)}Oc*OOp!}O$i!xOd^ig^ih^il^it^iw^i$m^ix^i~Oe&fOf&fO$gfO~P!'qOZ!wO_(zO`({Oa(|Ob(}Oc)POd)QOp!}O$i!xOh^il^it^iw^i$m^ix^i~Og^i~P!)SOg)RO~P!)SOZ!wO_(zO`({Oa(|Ob(}Oc)POd)QOg)ROh)SOp!}O$i!xOlvitviwvi$mvi~Ox)WO~P!*cOt!Qi$m!Qi~PHrO!Z(nO~Os(pO~Ot'xO!Z$ry~Os(rOt%rO~O!Z(sO~Oouitui~P&xOo!{it!{i~P&xOs(vOt%rO~OZ!wO_(zO`({Oa(|Ob(}Oc)POd)QOg)ROh)SOp!}O$i!xO~Olvytvywvy$mvyxvy~P!-SOt$[q!Z$[q~P&xOt$]q!Z$]q~P&xOt$]y!Z$]y~P&xOm(VO~OekOfkOj)yOpiO!RkO!SkO!TkO!UkO$gfO$ihO$njO~Oe^if^i$g^i~P>mOxvi~PBmOe^if^i$g^i~P!'qOxvi~P!*cO_)gO`)hOa)iOb)jOc)kOd)ZOeiafia$gia~P.vOZ!wO_)gO`)hOa)iOb)jOc)kOd)ZOp!}O$i!xOV^ie^if^ih^il^iw^i$g^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Og^i~P!1_Og)lO~P!1_OZ!wO_)gO`)hOa)iOb)jOc)kOd)ZOg)lOh)mOp!}O$i!xOVvievifvilviwvi$gvitvi$hviovi!Pvi!Zvi#tvi#vvi#zvi#|vi#}vi!fvi~Ox)sO~P!3gO_)gO`)hOa)iOb)jOc)kOd)ZOg)lOh)mOevyfvy$gvy~PLsOxvi~P!3gOZ!wO_)zO`){Oa)|Ob)}Oc*OOd)bOg*POh*QOp!}O$i!xOevifvilvitviwvi$gvi$mvi~Oxvi~P!6fO_)gO~P6}OZ!wO_)gO`)hOp!}O$i!xOV^ib^ic^id^ie^if^ig^ih^il^iw^i$g^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Oa^i~P!8OOa)iO~P!8OOZ!wOp!}O$i!xOc^id^ie^if^ig^ih^il^iw^i$g^it^ix^i~O_)gO`)hOa)iOb)jOV^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^i!f^i~P!:WO_)zO`){Oa)|Ob)}Oc*OOd)bOeiafia$gia~PNkOZ!wO_)zO`){Oa)|Ob)}Oc*OOd)bOp!}O$i!xOe^if^ih^il^it^iw^i$g^i$m^ix^i~Og^i~P!<xOg*PO~P!<xOx*SO~P!6fOZ!wO_)zO`){Oa)|Ob)}Op!}O$i!xO~Oc*OOd)bOg*POh*QOevyfvylvytvywvy$gvy$mvyxvy~P!>iO_)zO~P!#iO_)zO`){Oa^ib^i$m^i~P!:WO_)zO`){Oa)|Ob^i$m^i~P!:WO_)zO`){Oa)|Ob)}O$m^i~P!:WOfaZa~",goto:"Cy$sPPPPPP$tP$t%j'sPP's'sPPPPPPPPPP'sP'sPP)jPP)o+nPP+q'sPP's's's's's+tP+wPPPP+z,pPPP-fP-jP-vP+z.UP.zP/zP+z0YP1O1RP+z1UPPP1zP+z2QP2v2|3P3SP+z3YP4OP+z4UP4zP+z5QP5vP+z5|P6rP6xP+z7WP7|P+z8SP8xP$t$t$tPPPP9O$tPPPPPP$tP9U:j;f;m;w;}<T<g<m<t<z=U=[PPPPP=b>YPPPCcCjCmPPCp$tCsCv!gbOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%k$dkRhijl!e!f!p!q!r!s!x!y!z!{!|#R#S#T#U#V#e$O%P%U%V%t&U&V&X&d&g&x&}'T'W'h(Q(`(p(r(v(y(z({(|(})P)Q)R)S)T)W)Z)[)b)c)f)g)h)i)j)k)l)m)n)s)y)z){)|)}*O*P*Q*R*S*T*UQ$_!kQ$v!}Q&P$`S&f${(XS']&]'|R'b&b$ikRhijl!e!f!p!q!r!s!x!y!z!{!|!}#R#S#T#U#V#e$O%P%U%V%t&U&V&X&b&d&g&x&}'T'W'h(Q(`(p(r(v(y(z({(|(})P)Q)R)S)T)W)Z)[)b)c)f)g)h)i)j)k)l)m)n)s)y)z){)|)}*O*P*Q*R*S*T*UV$b!l#O)O$d#Pg#W#Y#[#_$U$W$i$j$k$l$p$q$r$s$t$u$z${$|$}%O%]%l&h&k&l&y'U'V'X'a'e'f'g'i'm'r'w(R(S(T(U(W(X(Y(Z([(](m(o(t(u(w(x)U)V)X)Y)])^)_)`)a)d)e)o)p)q)r)t)u)v)w)x*V*W*X*YQ&O$_S&Q$a(VR'S&PR$w!}R'c&bR#]jR&m%V!g_OSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%k!gSOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kTnSoQqSQtTQ#boR#kuQpSS#aoqS%Z#b#cR&o%[!gTOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ$Y!gQ$[!iQ$]!jQ$d!mQ$f!nQ$g!oQ%e#qQ%z$^Q&v%rQ'Y&[S'[&]'|Q'n'OQ(b'tQ(f'xR(h'{QsTS#htuS%`#i#kR&q%a!gUOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kRyUR#ny!gVOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQzVR#p{!gWOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ$`!kR%y$]R%{$^R'o'OQ}WR#r!O!gXOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!QXR#t!R!gYOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!TYR#v!U!gZOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!WZR#x!X!g[OSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ![[R#}!]Q!Z[S#z![!]S%j#{#}R&t%k!g]OSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!_]R$Q!`!g^OSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!b^R$S!cQ'^&]R(i'|QdOQuTQ{VQ!OWQ!RXQ!UYQ!XZQ!][Q!`]Q!c^p!vdu{!O!R!U!X!]!`!c#c#i#{%[%a%kQ#cqQ#itQ#{![Q%[#bQ%a#kR%k#}SQOdSeQm!cmSTVWXYZ[]^oqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kS&c$u$wR'd&cQ%Q#WQ%S#YT&i%Q%SQ%W#]R&n%WQoSR#`oQ%s$YQ&S$dQ&W$gW&w%s&S&W(qR(q(fQxUR#mxS'P%z%{R'p'PQ'u'VR(c'uQ'y'XQ(e'wT(g'y(eQ'}'^R(j'}Q!uaR$m!u!bcOTVWXYZ[]^dqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kTnSoQgRQ#WhQ#YiQ#[jQ#_lQ$U!eQ$W!fQ$i!pQ$j!qQ$k!rQ$l!sQ$p!xS$q!y)gQ$r!zQ$s!{Q$t!|Q$u!}Q$z#RQ${#SQ$|#TQ$}#UQ%O#VQ%]#eQ%l$OQ&h%PQ&k%UQ&l%VQ&y%tQ'U&UQ'V&VQ'X&XQ'a&bQ'e&dQ'f&gQ'g(yQ'i&xQ'm&}Q'r'TQ'w'WS(R(z)zQ(S({Q(T(|Q(U(}Q(W)PQ(X)QQ(Y)RQ(Z)SQ([)TQ(]'hQ(m(QQ(o(`Q(t)WQ(u(pQ(w(rQ(x(vQ)U)ZQ)V)[Q)X)bQ)Y)cQ)])fQ)^)lQ)_)mQ)`)nQ)a)sQ)d*TQ)e*UQ)o)hQ)p)iQ)q)jQ)r)kQ)t)yQ)u*PQ)v*QQ)w*RQ)x*SQ*V){Q*W)|Q*X)}R*Y*OQ$c!lT$y#O)OR$x!}R#XhR#^jR%|$^R$h!o",nodeNames:"\u26A0 {{ {# {% {% Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression ConcatOp ArithOp ArithOp CompareOp in is StringLiteral NumberLiteral and or NotExpression not FilterExpression FilterOp FilterName FilterCall ) ( ArgumentList NamedArgument AssignOp , NamedArgument ConditionalExpression if else CallExpression ArrayExpression TupleExpression ParenthesizedExpression DictExpression Entry : Entry BooleanLiteral self super loop IfStatement Tag TagName if %} Tag elif Tag else EndTag endif ForStatement Tag for Definition recursive EndTag endfor RawStatement Tag raw RawText EndTag endraw BlockStatement Tag block scoped required EndTag endblock MacroStatement Tag macro ParamList OptionalParameter OptionalParameter EndTag endmacro CallStatement Tag call EndTag endcall FilterStatement Tag filter EndTag endfilter SetStatement Tag set EndTag endset TransStatement Tag trans Tag pluralize EndTag endtrans WithStatement Tag with EndTag endwith AutoescapeStatement Tag autoescape EndTag endautoescape Tag Tag Tag import as from import ImportItem Tag include ignore missing with without context Comment #}",maxTerm:173,nodeProps:[["closedBy",1,"}}",2,"#}",-2,3,4,"%}",32,")"],["openedBy",7,"{{",31,"(",57,"{%",140,"{#"],["group",-18,9,10,13,14,21,22,25,27,38,41,42,43,44,45,49,50,51,52,"Expression",-11,53,64,71,77,84,92,97,102,107,114,119,"Statement"]],skippedNodes:[0],repeatNodeCount:13,tokenData:".|~RqXY#YYZ#Y]^#Ypq#Yqr#krs#vuv&nwx&{xy)nyz)sz{)x{|*V|}+|}!O,R!O!P,g!P!Q,o!Q![+h![!],w!^!_,|!_!`-U!`!a,|!c!}-^!}#O.U#P#Q.Z#R#S-^#T#o-^#o#p.`#p#q.e#q#r.j#r#s.w%W;'S-^;'S;:j.O<%lO-^~#_S$d~XY#YYZ#Y]^#Ypq#Y~#nP!_!`#q~#vOb~~#yWOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~$hOe~~$kYOY#vYZ#vZr#vrs%Zs#O#v#O#P$h#P;'S#v;'S;=`&O;=`<%l#v<%lO#v~%`We~OY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~%{P;=`<%l#v~&RXOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x;=`<%l#v<%lO#v~&sP`~#q#r&v~&{O!Z~~'OWOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~'kYOY&{YZ&{Zw&{wx(Zx#O&{#O#P'h#P;'S&{;'S;=`)O;=`<%l&{<%lO&{~(`We~OY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~({P;=`<%l&{~)RXOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x;=`<%l&{<%lO&{~)sOp~~)xOo~~)}P`~z{*Q~*VO`~~*[Qa~!O!P*b!Q![+h~*eP!Q![*h~*mSf~!Q![*h!g!h*y#R#S*h#X#Y*y~*|R{|+V}!O+V!Q![+]~+YP!Q![+]~+bQf~!Q![+]#R#S+]~+mTf~!O!P*b!Q![+h!g!h*y#R#S+h#X#Y*y~,ROt~~,WRa~uv,a!O!P*b!Q![+h~,dP#q#r&v~,lPZ~!Q![*h~,tP`~!P!Q*Q~,|O!P~~-RPb~!_!`#q~-ZPs~!_!`#q!`-iVm`[p!XS$gY!Q![-^!c!}-^#R#S-^#T#o-^%W;'S-^;'S;:j.O<%lO-^!`.RP;=`<%l-^~.ZO$i~~.`O$h~~.eO$n~~.jOl~^.oP$m[#q#r.rQ.wOVQ~.|O_~",tokenizers:[V,F,1,2,3,4,5,new G("b~RPstU~XP#q#r[~aO$Q~~",17,173)],topRules:{Template:[0,5]},specialized:[{term:161,get:O=>N[O]||-1},{term:55,get:O=>D[O]||-1}],tokenPrec:3602});function S(O,e){return O.split(" ").map(t=>({label:t,type:e}))}var A=S("abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr","function"),I=S("boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace","function"),L=S("loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller","keyword"),s=I.concat(L),p=S("raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends","keyword");function H(O){var P;let{state:e,pos:t}=O,i=u(e).resolveInner(t,-1).enterUnfinishedNodesBefore(t),a=((P=i.childBefore(t))==null?void 0:P.name)||i.name;if(i.name=="FilterName")return{type:"filter",node:i};if(O.explicit&&(a=="FilterOp"||a=="filter"))return{type:"filter"};if(i.name=="TagName")return{type:"tag",node:i};if(O.explicit&&a=="{%")return{type:"tag"};if(i.name=="PropertyName"&&i.parent.name=="MemberExpression")return{type:"prop",node:i,target:i.parent};if(i.name=="."&&i.parent.name=="MemberExpression")return{type:"prop",target:i.parent};if(i.name=="MemberExpression"&&a==".")return{type:"prop",target:i};if(i.name=="VariableName")return{type:"expr",from:i.from};if(i.name=="Comment"||i.name=="StringLiteral"||i.name=="NumberLiteral")return null;let Q=O.matchBefore(/[\w\u00c0-\uffff]+$/);return Q?{type:"expr",from:Q.from}:O.explicit?{type:"expr"}:null}function B(O,e,t,i){let a=[];for(;;){let Q=e.getChild("Expression");if(!Q)return[];if(Q.name=="VariableName"){a.unshift(O.sliceDoc(Q.from,Q.to));break}else if(Q.name=="MemberExpression"){let P=Q.getChild("PropertyName");P&&a.unshift(O.sliceDoc(P.from,P.to)),e=Q}else return[]}return i(a,O,t)}function f(O={}){let e=O.tags?O.tags.concat(p):p,t=O.variables?O.variables.concat(s):s,{properties:i}=O;return a=>{let Q=H(a);if(!Q)return null;let P=Q.from??(Q.node?Q.node.from:a.pos),n;return n=Q.type=="filter"?A:Q.type=="tag"?e:Q.type=="expr"?t:i?B(a.state,Q.target,a,i):[],n.length?{options:n,from:P,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var c=Z.inputHandler.of((O,e,t,i)=>i!="%"||e!=t||O.state.doc.sliceString(e-1,t+1)!="{}"?!1:(O.dispatch(O.state.changeByRange(a=>({changes:{from:a.from,to:a.to,insert:"%%"},range:T.cursor(a.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function v(O){return e=>{let t=O.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)}}var J=k.define({name:"jinja",parser:C.configure({props:[R({"TagName raw endraw filter endfilter as trans pluralize endtrans with endwith autoescape endautoescape":r.keyword,"required scoped recursive with without context ignore missing":r.modifier,self:r.self,"loop super":r.standard(r.variableName),"if elif else endif for endfor call endcall":r.controlKeyword,"block endblock set endset macro endmacro import from include":r.definitionKeyword,"Comment/...":r.blockComment,VariableName:r.variableName,Definition:r.definition(r.variableName),PropertyName:r.propertyName,FilterName:r.special(r.variableName),ArithOp:r.arithmeticOperator,AssignOp:r.definitionOperator,"not and or":r.logicOperator,CompareOp:r.compareOperator,"in is":r.operatorKeyword,"FilterOp ConcatOp":r.operator,StringLiteral:r.string,NumberLiteral:r.number,BooleanLiteral:r.bool,"{% %} {# #} {{ }} { }":r.brace,"( )":r.paren,".":r.derefOperator,": , .":r.punctuation}),x.add({Tag:X({closing:"%}"}),"IfStatement ForStatement":v(/^\s*(\{%-?\s*)?(endif|endfor|else|elif)\b/),Statement:v(/^\s*(\{%-?\s*)?end\w/)}),m.add({"Statement Comment"(O){let e=O.firstChild,t=O.lastChild;return!e||e.name!="Tag"&&e.name!="{#"?null:{from:e.to,to:t.name=="EndTag"||t.name=="#}"?t.from:O.to}}})]}),languageData:{indentOnInput:/^\s*{%-?\s*(?:end|elif|else)$/}}),$=y();function d(O){return J.configure({wrap:b(e=>e.type.isTop?{parser:O.parser,overlay:t=>t.name=="Text"||t.name=="RawText"}:null)},"jinja")}var g=d($.language);function K(O={}){let e=O.base||$,t=e.language==$.language?g:d(e.language);return new w(t,[e.support,t.data.of({autocomplete:f(O)}),e.language.data.of({closeBrackets:{brackets:["{"]}}),c])}export{g as i,K as n,f as r,c as t};
import{D as E,J as P,N as B,T as L,n as R,nt as j,q as T,r as D,s as Y,t as N,u as d,y as q}from"./dist-DBwNzi3C.js";var i=63,W=64,F=1,A=2,U=3,H=4,Z=5,I=6,M=7,y=65,K=66,J=8,OO=9,nO=10,eO=11,tO=12,z=13,aO=19,PO=20,QO=29,rO=33,oO=34,sO=47,cO=0,S=1,k=2,X=3,b=4,s=class{constructor(O,n,e){this.parent=O,this.depth=n,this.type=e,this.hash=(O?O.hash+O.hash<<8:0)+n+(n<<4)+e}};s.top=new s(null,-1,cO);function f(O,n){for(let e=0,t=n-O.pos-1;;t--,e++){let Q=O.peek(t);if(r(Q)||Q==-1)return e}}function x(O){return O==32||O==9}function r(O){return O==10||O==13}function V(O){return x(O)||r(O)}function c(O){return O<0||V(O)}var iO=new N({start:s.top,reduce(O,n){return O.type==X&&(n==PO||n==oO)?O.parent:O},shift(O,n,e,t){if(n==U)return new s(O,f(t,t.pos),S);if(n==y||n==Z)return new s(O,f(t,t.pos),k);if(n==i)return O.parent;if(n==aO||n==rO)return new s(O,0,X);if(n==z&&O.type==b)return O.parent;if(n==sO){let Q=/[1-9]/.exec(t.read(t.pos,e.pos));if(Q)return new s(O,O.depth+ +Q[0],b)}return O},hash(O){return O.hash}});function p(O,n,e=0){return O.peek(e)==n&&O.peek(e+1)==n&&O.peek(e+2)==n&&c(O.peek(e+3))}var pO=new R((O,n)=>{if(O.next==-1&&n.canShift(W))return O.acceptToken(W);let e=O.peek(-1);if((r(e)||e<0)&&n.context.type!=X){if(p(O,45))if(n.canShift(i))O.acceptToken(i);else return O.acceptToken(F,3);if(p(O,46))if(n.canShift(i))O.acceptToken(i);else return O.acceptToken(A,3);let t=0;for(;O.next==32;)t++,O.advance();(t<n.context.depth||t==n.context.depth&&n.context.type==S&&(O.next!=45||!c(O.peek(1))))&&O.next!=-1&&!r(O.next)&&O.next!=35&&O.acceptToken(i,-t)}},{contextual:!0}),XO=new R((O,n)=>{if(n.context.type==X){O.next==63&&(O.advance(),c(O.next)&&O.acceptToken(M));return}if(O.next==45)O.advance(),c(O.next)&&O.acceptToken(n.context.type==S&&n.context.depth==f(O,O.pos-1)?H:U);else if(O.next==63)O.advance(),c(O.next)&&O.acceptToken(n.context.type==k&&n.context.depth==f(O,O.pos-1)?I:Z);else{let e=O.pos;for(;;)if(x(O.next)){if(O.pos==e)return;O.advance()}else if(O.next==33)_(O);else if(O.next==38)m(O);else if(O.next==42){m(O);break}else if(O.next==39||O.next==34){if($(O,!0))break;return}else if(O.next==91||O.next==123){if(!lO(O))return;break}else{w(O,!0,!1,0);break}for(;x(O.next);)O.advance();if(O.next==58){if(O.pos==e&&n.canShift(QO))return;c(O.peek(1))&&O.acceptTokenTo(n.context.type==k&&n.context.depth==f(O,e)?K:y,e)}}},{contextual:!0});function fO(O){return O>32&&O<127&&O!=34&&O!=37&&O!=44&&O!=60&&O!=62&&O!=92&&O!=94&&O!=96&&O!=123&&O!=124&&O!=125}function C(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function G(O,n){return O.next==37?(O.advance(),C(O.next)&&O.advance(),C(O.next)&&O.advance(),!0):fO(O.next)||n&&O.next==44?(O.advance(),!0):!1}function _(O){if(O.advance(),O.next==60){for(O.advance();;)if(!G(O,!0)){O.next==62&&O.advance();break}}else for(;G(O,!1););}function m(O){for(O.advance();!c(O.next)&&u(O.tag)!="f";)O.advance()}function $(O,n){let e=O.next,t=!1,Q=O.pos;for(O.advance();;){let a=O.next;if(a<0)break;if(O.advance(),a==e)if(a==39)if(O.next==39)O.advance();else break;else break;else if(a==92&&e==34)O.next>=0&&O.advance();else if(r(a)){if(n)return!1;t=!0}else if(n&&O.pos>=Q+1024)return!1}return!t}function lO(O){for(let n=[],e=O.pos+1024;;)if(O.next==91||O.next==123)n.push(O.next),O.advance();else if(O.next==39||O.next==34){if(!$(O,!0))return!1}else if(O.next==93||O.next==125){if(n[n.length-1]!=O.next-2)return!1;if(n.pop(),O.advance(),!n.length)return!0}else{if(O.next<0||O.pos>e||r(O.next))return!1;O.advance()}}var RO="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function u(O){return O<33?"u":O>125?"s":RO[O-33]}function g(O,n){let e=u(O);return e!="u"&&!(n&&e=="f")}function w(O,n,e,t){if(u(O.next)=="s"||(O.next==63||O.next==58||O.next==45)&&g(O.peek(1),e))O.advance();else return!1;let Q=O.pos;for(;;){let a=O.next,o=0,l=t+1;for(;V(a);){if(r(a)){if(n)return!1;l=0}else l++;a=O.peek(++o)}if(!(a>=0&&(a==58?g(O.peek(o+1),e):a==35?O.peek(o-1)!=32:g(a,e)))||!e&&l<=t||l==0&&!e&&(p(O,45,o)||p(O,46,o)))break;if(n&&u(a)=="f")return!1;for(let v=o;v>=0;v--)O.advance();if(n&&O.pos>Q+1024)return!1}return!0}var uO=new R((O,n)=>{if(O.next==33)_(O),O.acceptToken(tO);else if(O.next==38||O.next==42){let e=O.next==38?nO:eO;m(O),O.acceptToken(e)}else O.next==39||O.next==34?($(O,!1),O.acceptToken(OO)):w(O,!1,n.context.type==X,n.context.depth)&&O.acceptToken(J)}),dO=new R((O,n)=>{let e=n.context.type==b?n.context.depth:-1,t=O.pos;O:for(;;){let Q=0,a=O.next;for(;a==32;)a=O.peek(++Q);if(!Q&&(p(O,45,Q)||p(O,46,Q))||!r(a)&&(e<0&&(e=Math.max(n.context.depth+1,Q)),Q<e))break;for(;;){if(O.next<0)break O;let o=r(O.next);if(O.advance(),o)continue O;t=O.pos}}O.acceptTokenTo(z,t)}),SO=T({DirectiveName:P.keyword,DirectiveContent:P.attributeValue,"DirectiveEnd DocEnd":P.meta,QuotedLiteral:P.string,BlockLiteralHeader:P.special(P.string),BlockLiteralContent:P.content,Literal:P.content,"Key/Literal Key/QuotedLiteral":P.definition(P.propertyName),"Anchor Alias":P.labelName,Tag:P.typeName,Comment:P.lineComment,": , -":P.separator,"?":P.punctuation,"[ ]":P.squareBracket,"{ }":P.brace}),kO=D.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"\u26A0 DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:iO,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[SO],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[pO,XO,uO,dO,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),bO=D.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"\u26A0 Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),h=Y.define({name:"yaml",parser:kO.configure({props:[B.add({Stream:O=>{for(let n=O.node.resolve(O.pos,-1);n&&n.to>=O.pos;n=n.parent){if(n.name=="BlockLiteralContent"&&n.from<n.to)return O.baseIndentFor(n);if(n.name=="BlockLiteral")return O.baseIndentFor(n)+O.unit;if(n.name=="BlockSequence"||n.name=="BlockMapping")return O.column(n.from,1);if(n.name=="QuotedLiteral")return null;if(n.name=="Literal"){let e=O.column(n.from,1);if(e==O.lineIndent(n.from,1))return e;if(n.to>O.pos)return null}}return null},FlowMapping:q({closing:"}"}),FlowSequence:q({closing:"]"})}),E.add({"FlowMapping FlowSequence":L,"Item Pair BlockLiteral":(O,n)=>({from:n.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function xO(){return new d(h)}var mO=Y.define({name:"yaml-frontmatter",parser:bO.configure({props:[T({DashLine:P.meta})]})});function $O(O){let{language:n,support:e}=O.content instanceof d?O.content:{language:O.content,support:[]};return new d(mO.configure({wrap:j(t=>t.name=="FrontmatterContent"?{parser:h.parser}:t.name=="Body"?{parser:n.parser}:null)}),e)}export{$O as n,h as r,xO as t};
import{$ as B,D as K,H as M,J as Q,N as OO,T as iO,Y as aO,n as $,q as nO,r as QO,s as eO,t as rO,u as tO,y}from"./dist-DBwNzi3C.js";import{m as d,s as oO,u as dO}from"./dist-ChS0Dc_R.js";var TO=1,x=194,_=195,sO=196,U=197,lO=198,SO=199,pO=200,qO=2,V=3,G=201,PO=24,$O=25,mO=49,hO=50,gO=55,cO=56,XO=57,yO=59,zO=60,fO=61,WO=62,vO=63,RO=65,kO=238,uO=71,xO=241,_O=242,UO=243,VO=244,GO=245,bO=246,ZO=247,jO=248,b=72,wO=249,EO=250,YO=251,FO=252,JO=253,AO=254,CO=255,NO=256,IO=73,DO=77,HO=263,LO=112,BO=130,KO=151,MO=152,Oi=155,T=10,S=13,z=32,m=9,f=35,ii=40,ai=46,W=123,Z=125,j=39,w=34,E=92,ni=111,Qi=120,ei=78,ri=117,ti=85,oi=new Set([$O,mO,hO,HO,RO,BO,cO,XO,kO,WO,vO,b,IO,DO,zO,fO,KO,MO,Oi,LO]);function v(O){return O==T||O==S}function R(O){return O>=48&&O<=57||O>=65&&O<=70||O>=97&&O<=102}var di=new $((O,i)=>{let a;if(O.next<0)O.acceptToken(SO);else if(i.context.flags&h)v(O.next)&&O.acceptToken(lO,1);else if(((a=O.peek(-1))<0||v(a))&&i.canShift(U)){let n=0;for(;O.next==z||O.next==m;)O.advance(),n++;(O.next==T||O.next==S||O.next==f)&&O.acceptToken(U,-n)}else v(O.next)&&O.acceptToken(sO,1)},{contextual:!0}),Ti=new $((O,i)=>{let a=i.context;if(a.flags)return;let n=O.peek(-1);if(n==T||n==S){let e=0,r=0;for(;;){if(O.next==z)e++;else if(O.next==m)e+=8-e%8;else break;O.advance(),r++}e!=a.indent&&O.next!=T&&O.next!=S&&O.next!=f&&(e<a.indent?O.acceptToken(_,-r):O.acceptToken(x))}}),h=1,Y=2,p=4,s=8,l=16,q=32;function g(O,i,a){this.parent=O,this.indent=i,this.flags=a,this.hash=(O?O.hash+O.hash<<8:0)+i+(i<<4)+a+(a<<6)}var si=new g(null,0,0);function li(O){let i=0;for(let a=0;a<O.length;a++)i+=O.charCodeAt(a)==m?8-i%8:1;return i}var F=new Map([[xO,0],[_O,p],[UO,s],[VO,s|p],[GO,l],[bO,l|p],[ZO,l|s],[jO,s|20],[wO,q],[EO,q|p],[YO,q|s],[FO,s|36],[JO,q|l],[AO,l|36],[CO,l|40],[NO,60]].map(([O,i])=>[O,i|Y])),Si=new rO({start:si,reduce(O,i,a,n){return O.flags&h&&oi.has(i)||(i==uO||i==b)&&O.flags&Y?O.parent:O},shift(O,i,a,n){return i==x?new g(O,li(n.read(n.pos,a.pos)),0):i==_?O.parent:i==PO||i==gO||i==yO||i==V?new g(O,0,h):F.has(i)?new g(O,0,F.get(i)|O.flags&h):O},hash(O){return O.hash}}),pi=new $(O=>{for(let i=0;i<5;i++){if(O.next!="print".charCodeAt(i))return;O.advance()}if(!/\w/.test(String.fromCharCode(O.next)))for(let i=0;;i++){let a=O.peek(i);if(!(a==z||a==m)){a!=ii&&a!=ai&&a!=T&&a!=S&&a!=f&&O.acceptToken(TO);return}}}),qi=new $((O,i)=>{let{flags:a}=i.context,n=a&p?w:j,e=(a&s)>0,r=!(a&l),t=(a&q)>0,o=O.pos;for(;!(O.next<0);)if(t&&O.next==W)if(O.peek(1)==W)O.advance(2);else{if(O.pos==o){O.acceptToken(V,1);return}break}else if(r&&O.next==E){if(O.pos==o){O.advance();let P=O.next;P>=0&&(O.advance(),Pi(O,P)),O.acceptToken(qO);return}break}else if(O.next==E&&!r&&O.peek(1)>-1)O.advance(2);else if(O.next==n&&(!e||O.peek(1)==n&&O.peek(2)==n)){if(O.pos==o){O.acceptToken(G,e?3:1);return}break}else if(O.next==T){if(e)O.advance();else if(O.pos==o){O.acceptToken(G);return}break}else O.advance();O.pos>o&&O.acceptToken(pO)});function Pi(O,i){if(i==ni)for(let a=0;a<2&&O.next>=48&&O.next<=55;a++)O.advance();else if(i==Qi)for(let a=0;a<2&&R(O.next);a++)O.advance();else if(i==ri)for(let a=0;a<4&&R(O.next);a++)O.advance();else if(i==ti)for(let a=0;a<8&&R(O.next);a++)O.advance();else if(i==ei&&O.next==W){for(O.advance();O.next>=0&&O.next!=Z&&O.next!=j&&O.next!=w&&O.next!=T;)O.advance();O.next==Z&&O.advance()}}var $i=nO({'async "*" "**" FormatConversion FormatSpec':Q.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":Q.controlKeyword,"in not and or is del":Q.operatorKeyword,"from def class global nonlocal lambda":Q.definitionKeyword,import:Q.moduleKeyword,"with as print":Q.keyword,Boolean:Q.bool,None:Q.null,VariableName:Q.variableName,"CallExpression/VariableName":Q.function(Q.variableName),"FunctionDefinition/VariableName":Q.function(Q.definition(Q.variableName)),"ClassDefinition/VariableName":Q.definition(Q.className),PropertyName:Q.propertyName,"CallExpression/MemberExpression/PropertyName":Q.function(Q.propertyName),Comment:Q.lineComment,Number:Q.number,String:Q.string,FormatString:Q.special(Q.string),Escape:Q.escape,UpdateOp:Q.updateOperator,"ArithOp!":Q.arithmeticOperator,BitOp:Q.bitwiseOperator,CompareOp:Q.compareOperator,AssignOp:Q.definitionOperator,Ellipsis:Q.punctuation,At:Q.meta,"( )":Q.paren,"[ ]":Q.squareBracket,"{ }":Q.brace,".":Q.derefOperator,", ;":Q.separator}),mi={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},J=QO.deserialize({version:14,states:"##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQdO,59aO'vQdO,59aO:zQdO,59aOOQS,59y,59yO;PQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;_QdO,5:QO;dQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;uQdO,5:UO;zQdO,5:WOOOW'#Fy'#FyO<POWO,5:aOOQS,5:a,5:aO<[QdO'#HwOOOW'#Dw'#DwOOOW'#Fz'#FzO<lOWO,5:bOOQS,5:b,5:bOOQS'#F}'#F}O<zQtO,5:iO?lQtO,5=`O@VQ#xO,5=`O@vQtO,5=`OOQS,5:},5:}OA_QeO'#GWOBqQdO,5;^OOQV,5=^,5=^OB|QtO'#IPOCkQdO,5;tOOQS-E:[-E:[OOQV,5;s,5;sO4dQdO'#FQOOQV-E9o-E9oOCsQtO,59]OEzQtO,59iOFeQdO'#HVOFpQdO'#HVO1XQdO'#HVOF{QdO'#DTOGTQdO,59mOGYQdO'#HZO'vQdO'#HZO0rQdO,5=tOOQS,5=t,5=tO0rQdO'#EROOQS'#ES'#ESOGwQdO'#GPOHXQdO,58|OHXQdO,58|O*xQdO,5:oOHgQtO'#H]OOQS,5:r,5:rOOQS,5:z,5:zOHzQdO,5;OOI]QdO'#IOO1XQdO'#H}OOQS,5;Q,5;QOOQS'#GT'#GTOIqQtO,5;QOJPQdO,5;QOJUQdO'#IQOOQS,5;T,5;TOJdQdO'#H|OOQS,5;W,5;WOJuQdO,5;YO4iQdO,5;`O4iQdO,5;cOJ}QtO'#ITO'vQdO'#ITOKXQdO,5;eO4VQdO,5;eO0rQdO,5;jO1XQdO,5;lOK^QeO'#EuOLjQgO,5;fO!!kQdO'#IUO4iQdO,5;jO!!vQdO,5;lO!#OQdO,5;qO!#ZQtO,5;vO'vQdO,5;vPOOO,5=[,5=[P!#bOSO,5=[P!#jOdO,5=[O!&bQtO1G.jO!&iQtO1G.jO!)YQtO1G.jO!)dQtO1G.jO!+}QtO1G.jO!,bQtO1G.jO!,uQdO'#HcO!-TQtO'#GuO0rQdO'#HcO!-_QdO'#HbOOQS,5:Z,5:ZO!-gQdO,5:ZO!-lQdO'#HeO!-wQdO'#HeO!.[QdO,5>OOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!/[QtO1G.|O!/cQtO1G.|O1lQdO1G.|O!0OQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!0VQdO1G/eO!0gQdO1G/eO!0oQdO1G/fO'vQdO'#H[O!0tQdO'#H[O!0yQtO1G.{O!1ZQdO,59iO!2aQdO,5=zO!2qQdO,5=zO!2yQdO1G/mO!3OQtO1G/mOOQS1G/l1G/lO!3`QdO,5=uO!4VQdO,5=uO0rQdO1G/qO!4tQdO1G/sO!4yQtO1G/sO!5ZQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!5kQdO'#HxO0rQdO'#HxO!5|QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!6[Q#xO1G2zO!6{QtO1G2zO'vQdO,5<jOOQS,5<j,5<jOOQS-E9|-E9|OOQS,5<r,5<rOOQS-E:U-E:UOOQV1G0x1G0xO1XQdO'#GRO!7dQtO,5>kOOQS1G1`1G1`O!8RQdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!8WQdO'#FrO!8cQdO,59oO!8kQdO1G/XO!8uQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!9fQdO'#GtOOQS,5<k,5<kOOQS-E9}-E9}O!9wQdO1G.hOOQS1G0Z1G0ZO!:VQdO,5=wO!:gQdO,5=wO0rQdO1G0jO0rQdO1G0jO!:xQdO,5>jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!<RQdO,5>lO!<aQdO,5>lO!<oQdO,5>hO!=VQdO,5>hO!=hQdO'#EpO0rQdO1G0tO!=sQdO1G0tO!=xQgO1G0zO!AvQgO1G0}O!EqQdO,5>oO!E{QdO,5>oO!FTQtO,5>oO0rQdO1G1PO!F_QdO1G1PO4iQdO1G1UO!!vQdO1G1WOOQV,5;a,5;aO!FdQfO,5;aO!FiQgO1G1QO!JjQdO'#GZO4iQdO1G1QO4iQdO1G1QO!JzQdO,5>pO!KXQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!KaQdO'#FSO!KrQ!fO1G1WO!KzQdO1G1WOOQV1G1]1G1]O4iQdO1G1]O!LPQdO1G1]O!LXQdO'#F^OOQV1G1b1G1bO!#ZQtO1G1bPOOO1G2v1G2vP!L^OSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!LfQdO,5=|O!LyQdO,5=|OOQS1G/u1G/uO!MRQdO,5>PO!McQdO,5>PO!MkQdO,5>PO!NOQdO,5>PO!N`QdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!8kQdO7+$pO#!RQdO1G.|O#!YQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO#!aQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO#!qQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO#!vQdO7+%PO##OQdO7+%QO##TQdO1G3fOOQS7+%X7+%XO##eQdO1G3fO##mQdO7+%XOOQS,5<_,5<_O'vQdO,5<_O##rQdO1G3aOOQS-E9q-E9qO#$iQdO7+%]OOQS7+%_7+%_O#$wQdO1G3aO#%fQdO7+%_O#%kQdO1G3gO#%{QdO1G3gO#&TQdO7+%]O#&YQdO,5>dO#&sQdO,5>dO#&sQdO,5>dOOQS'#Dx'#DxO#'UO&jO'#DzO#'aO`O'#HyOOOW1G3}1G3}O#'fQdO1G3}O#'nQdO1G3}O#'yQ#xO7+(fO#(jQtO1G2UP#)TQdO'#GOOOQS,5<m,5<mOOQS-E:P-E:POOQS7+&z7+&zOOQS1G3]1G3]OOQS,5<^,5<^OOQS-E9p-E9pOOQS7+$s7+$sO#)bQdO,5=`O#){QdO,5=`O#*^QtO,5<aO#*qQdO1G3cOOQS-E9s-E9sOOQS7+&U7+&UO#+RQdO7+&UO#+aQdO,5<nO#+uQdO1G4UOOQS-E:Q-E:QO#,WQdO1G4UOOQS1G4T1G4TOOQS7+&W7+&WO#,iQdO7+&WOOQS,5<p,5<pO#,tQdO1G4WOOQS-E:S-E:SOOQS,5<l,5<lO#-SQdO1G4SOOQS-E:O-E:OO1XQdO'#EqO#-jQdO'#EqO#-uQdO'#IRO#-}QdO,5;[OOQS7+&`7+&`O0rQdO7+&`O#.SQgO7+&fO!JmQdO'#GXO4iQdO7+&fO4iQdO7+&iO#2QQtO,5<tO'vQdO,5<tO#2[QdO1G4ZOOQS-E:W-E:WO#2fQdO1G4ZO4iQdO7+&kO0rQdO7+&kOOQV7+&p7+&pO!KrQ!fO7+&rO!KzQdO7+&rO`QeO1G0{OOQV-E:X-E:XO4iQdO7+&lO4iQdO7+&lOOQV,5<u,5<uO#2nQdO,5<uO!JmQdO,5<uOOQV7+&l7+&lO#2yQgO7+&lO#6tQdO,5<vO#7PQdO1G4[OOQS-E:Y-E:YO#7^QdO1G4[O#7fQdO'#IWO#7tQdO'#IWO1XQdO'#IWOOQS'#IW'#IWO#8PQdO'#IVOOQS,5;n,5;nO#8XQdO,5;nO0rQdO'#FUOOQV7+&r7+&rO4iQdO7+&rOOQV7+&w7+&wO4iQdO7+&wO#8^QfO,5;xOOQV7+&|7+&|POOO7+(b7+(bO#8cQdO1G3iOOQS,5<c,5<cO#8qQdO1G3hOOQS-E9u-E9uO#9UQdO,5<dO#9aQdO,5<dO#9tQdO1G3kOOQS-E9v-E9vO#:UQdO1G3kO#:^QdO1G3kO#:nQdO1G3kO#:UQdO1G3kOOQS<<H[<<H[O#:yQtO1G1zOOQS<<Hk<<HkP#;WQdO'#FtO8vQdO1G3bO#;eQdO1G3bO#;jQdO<<HkOOQS<<Hl<<HlO#;zQdO7+)QOOQS<<Hs<<HsO#<[QtO1G1yP#<{QdO'#FsO#=YQdO7+)RO#=jQdO7+)RO#=rQdO<<HwO#=wQdO7+({OOQS<<Hy<<HyO#>nQdO,5<bO'vQdO,5<bOOQS-E9t-E9tOOQS<<Hw<<HwOOQS,5<g,5<gO0rQdO,5<gO#>sQdO1G4OOOQS-E9y-E9yO#?^QdO1G4OO<[QdO'#H{OOOO'#D{'#D{OOOO'#F|'#F|O#?oO&jO,5:fOOOW,5>e,5>eOOOW7+)i7+)iO#?zQdO7+)iO#@SQdO1G2zO#@mQdO1G2zP'vQdO'#FuO0rQdO<<IpO1XQdO1G2YP1XQdO'#GSO#AOQdO7+)pO#AaQdO7+)pOOQS<<Ir<<IrP1XQdO'#GUP0rQdO'#GQOOQS,5;],5;]O#ArQdO,5>mO#BQQdO,5>mOOQS1G0v1G0vOOQS<<Iz<<IzOOQV-E:V-E:VO4iQdO<<JQOOQV,5<s,5<sO4iQdO,5<sOOQV<<JQ<<JQOOQV<<JT<<JTO#BYQtO1G2`P#BdQdO'#GYO#BkQdO7+)uO#BuQgO<<JVO4iQdO<<JVOOQV<<J^<<J^O4iQdO<<J^O!KrQ!fO<<J^O#FpQgO7+&gOOQV<<JW<<JWO#FzQgO<<JWOOQV1G2a1G2aO1XQdO1G2aO#JuQdO1G2aO4iQdO<<JWO1XQdO1G2bP0rQdO'#G[O#KQQdO7+)vO#K_QdO7+)vOOQS'#FT'#FTO0rQdO,5>rO#KgQdO,5>rO#KrQdO,5>rO#K}QdO,5>qO#L`QdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<<Jc<<JcO#LhQdO1G1dOOQS7+)T7+)TP#LmQdO'#FwO#L}QdO1G2OO#MbQdO1G2OO#MrQdO1G2OP#M}QdO'#FxO#N[QdO7+)VO#NlQdO7+)VO#NlQdO7+)VO#NtQdO7+)VO$ UQdO7+(|O8vQdO7+(|OOQSAN>VAN>VO$ oQdO<<LmOOQSAN>cAN>cO0rQdO1G1|O$!PQtO1G1|P$!ZQdO'#FvOOQS1G2R1G2RP$!hQdO'#F{O$!uQdO7+)jO$#`QdO,5>gOOOO-E9z-E9zOOOW<<MT<<MTO$#nQdO7+(fOOQSAN?[AN?[OOQS7+'t7+'tO$$XQdO<<M[OOQS,5<q,5<qO$$jQdO1G4XOOQS-E:T-E:TOOQVAN?lAN?lOOQV1G2_1G2_O4iQdOAN?qO$$xQgOAN?qOOQVAN?xAN?xO4iQdOAN?xOOQV<<JR<<JRO4iQdOAN?rO4iQdO7+'{OOQV7+'{7+'{O1XQdO7+'{OOQVAN?rAN?rOOQS7+'|7+'|O$(sQdO<<MbOOQS1G4^1G4^O0rQdO1G4^OOQS,5<w,5<wO$)QQdO1G4]OOQS-E:Z-E:ZOOQU'#G_'#G_O$)cQfO7+'OO$)nQdO'#F_O$*uQdO7+'jO$+VQdO7+'jOOQS7+'j7+'jO$+bQdO<<LqO$+rQdO<<LqO$+rQdO<<LqO$+zQdO'#H^OOQS<<Lh<<LhO$,UQdO<<LhOOQS7+'h7+'hOOQS'#D|'#D|OOOO1G4R1G4RO$,oQdO1G4RO$,wQdO1G4RP!=hQdO'#GVOOQVG25]G25]O4iQdOG25]OOQVG25dG25dOOQVG25^G25^OOQV<<Kg<<KgO4iQdO<<KgOOQS7+)x7+)xP$-SQdO'#G]OOQU-E:]-E:]OOQV<<Jj<<JjO$-vQtO'#FaOOQS'#Fc'#FcO$.WQdO'#FbO$.xQdO'#FbOOQS'#Fb'#FbO$.}QdO'#IYO$)nQdO'#FiO$)nQdO'#FiO$/fQdO'#FjO$)nQdO'#FkO$/mQdO'#IZOOQS'#IZ'#IZO$0[QdO,5;yOOQS<<KU<<KUO$0dQdO<<KUO$0tQdOANB]O$1UQdOANB]O$1^QdO'#H_OOQS'#H_'#H_O1sQdO'#DcO$1wQdO,5=xOOQSANBSANBSOOOO7+)m7+)mO$2`QdO7+)mOOQVLD*wLD*wOOQVANARANARO5uQ!fO'#GaO$2hQtO,5<SO$)nQdO'#FmOOQS,5<W,5<WOOQS'#Fd'#FdO$3YQdO,5;|O$3_QdO,5;|OOQS'#Fg'#FgO$)nQdO'#G`O$4PQdO,5<QO$4kQdO,5>tO$4{QdO,5>tO1XQdO,5<PO$5^QdO,5<TO$5cQdO,5<TO$)nQdO'#I[O$5hQdO'#I[O$5mQdO,5<UOOQS,5<V,5<VO0rQdO'#FpOOQU1G1e1G1eO4iQdO1G1eOOQSAN@pAN@pO$5rQdOG27wO$6SQdO,59}OOQS1G3d1G3dOOOO<<MX<<MXOOQS,5<{,5<{OOQS-E:_-E:_O$6XQtO'#FaO$6`QdO'#I]O$6nQdO'#I]O$6vQdO,5<XOOQS1G1h1G1hO$6{QdO1G1hO$7QQdO,5<zOOQS-E:^-E:^O$7lQdO,5=OO$8TQdO1G4`OOQS-E:b-E:bOOQS1G1k1G1kOOQS1G1o1G1oO$8eQdO,5>vO$)nQdO,5>vOOQS1G1p1G1pOOQS,5<[,5<[OOQU7+'P7+'PO$+zQdO1G/iO$)nQdO,5<YO$8sQdO,5>wO$8zQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$)nQdO'#GdO$9SQdO1G4bO$9^QdO1G4bO$9fQdO1G4bOOQS7+%T7+%TO$9tQdO1G1tO$:SQtO'#FaO$:ZQdO,5<}OOQS,5<},5<}O$:iQdO1G4cOOQS-E:a-E:aO$)nQdO,5<|O$:pQdO,5<|O$:uQdO7+)|OOQS-E:`-E:`O$;PQdO7+)|O$)nQdO,5<ZP$)nQdO'#GcO$;XQdO1G2hO$)nQdO1G2hP$;gQdO'#GbO$;nQdO<<MhO$;xQdO1G1uO$<WQdO7+(SO8vQdO'#C}O8vQdO,59bO8vQdO,59bO8vQdO,59bO$<fQtO,5=`O8vQdO1G.|O0rQdO1G/XO0rQdO7+$pP$<yQdO'#GOO'vQdO'#GtO$=WQdO,59bO$=]QdO,59bO$=dQdO,59mO$=iQdO1G/UO1sQdO'#DRO8vQdO,59j",stateData:"$>S~O%cOS%^OSSOS%]PQ~OPdOVaOfoOhYOopOs!POvqO!PrO!Q{O!T!SO!U!RO!XZO!][O!h`O!r`O!s`O!t`O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#l!QO#o!TO#s!UO#u!VO#z!WO#}hO$P!XO%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~O%]!YO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%j![O%k!]O%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aO~Ok%xXl%xXm%xXn%xXo%xXp%xXs%xXz%xX{%xX!x%xX#g%xX%[%xX%_%xX%z%xXg%xX!T%xX!U%xX%{%xX!W%xX![%xX!Q%xX#[%xXt%xX!m%xX~P%SOfoOhYO!XZO!][O!h`O!r`O!s`O!t`O%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~Oz%wX{%wX#g%wX%[%wX%_%wX%z%wX~Ok!pOl!qOm!oOn!oOo!rOp!sOs!tO!x%wX~P)pOV!zOg!|Oo0cOv0qO!PrO~P'vOV#OOo0cOv0qO!W#PO~P'vOV#SOa#TOo0cOv0qO![#UO~P'vOQ#XO%`#XO%a#ZO~OQ#^OR#[O%`#^O%a#`O~OV%iX_%iXa%iXh%iXk%iXl%iXm%iXn%iXo%iXp%iXs%iXz%iX!X%iX!f%iX%j%iX%k%iX%l%iX%m%iX%n%iX%o%iX%p%iX%q%iX%r%iX%s%iXg%iX!T%iX!U%iX~O&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O{%iX!x%iX#g%iX%[%iX%_%iX%z%iX%{%iX!W%iX![%iX!Q%iX#[%iXt%iX!m%iX~P,eOz#dO{%hX!x%hX#g%hX%[%hX%_%hX%z%hX~Oo0cOv0qO~P'vO#g#gO%[#iO%_#iO~O%uWO~O!T#nO#u!VO#z!WO#}hO~OopO~P'vOV#sOa#tO%uWO{wP~OV#xOo0cOv0qO!Q#yO~P'vO{#{O!x$QO%z#|O#g!yX%[!yX%_!yX~OV#xOo0cOv0qO#g#SX%[#SX%_#SX~P'vOo0cOv0qO#g#WX%[#WX%_#WX~P'vOh$WO%uWO~O!f$YO!r$YO%uWO~OV$eO~P'vO!U$gO#s$hO#u$iO~O{$jO~OV$qO~P'vOS$sO%[$rO%_$rO%c$tO~OV$}Oa$}Og%POo0cOv0qO~P'vOo0cOv0qO{%SO~P'vO&Y%UO~Oa!bOh!iO!X!kO!f!mOVba_bakbalbambanbaobapbasbazba{ba!xba#gba%[ba%_ba%jba%kba%lba%mba%nba%oba%pba%qba%rba%sba%zbagba!Tba!Uba%{ba!Wba![ba!Qba#[batba!mba~On%ZO~Oo%ZO~P'vOo0cO~P'vOk0eOl0fOm0dOn0dOo0mOp0nOs0rOg%wX!T%wX!U%wX%{%wX!W%wX![%wX!Q%wX#[%wX!m%wX~P)pO%{%]Og%vXz%vX!T%vX!U%vX!W%vX{%vX~Og%_Oz%`O!T%dO!U%cO~Og%_O~Oz%gO!T%dO!U%cO!W&SX~O!W%kO~Oz%lO{%nO!T%dO!U%cO![%}X~O![%rO~O![%sO~OQ#XO%`#XO%a%uO~OV%wOo0cOv0qO!PrO~P'vOQ#^OR#[O%`#^O%a%zO~OV!qa_!qaa!qah!qak!qal!qam!qan!qao!qap!qas!qaz!qa{!qa!X!qa!f!qa!x!qa#g!qa%[!qa%_!qa%j!qa%k!qa%l!qa%m!qa%n!qa%o!qa%p!qa%q!qa%r!qa%s!qa%z!qag!qa!T!qa!U!qa%{!qa!W!qa![!qa!Q!qa#[!qat!qa!m!qa~P#yOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P%SOV&OOopOvqO{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P'vOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#g$zX%[$zX%_$zX~P'vO#g#gO%[&TO%_&TO~O!f&UOh&sX%[&sXz&sX#[&sX#g&sX%_&sX#Z&sXg&sX~Oh!iO%[&WO~Okealeameaneaoeapeaseazea{ea!xea#gea%[ea%_ea%zeagea!Tea!Uea%{ea!Wea![ea!Qea#[eatea!mea~P%SOsqazqa{qa#gqa%[qa%_qa%zqa~Ok!pOl!qOm!oOn!oOo!rOp!sO!xqa~PEcO%z&YOz%yX{%yX~O%uWOz%yX{%yX~Oz&]O{wX~O{&_O~Oz%lO#g%}X%[%}X%_%}Xg%}X{%}X![%}X!m%}X%z%}X~OV0lOo0cOv0qO!PrO~P'vO%z#|O#gUa%[Ua%_Ua~Oz&hO#g&PX%[&PX%_&PXn&PX~P%SOz&kO!Q&jO#g#Wa%[#Wa%_#Wa~Oz&lO#[&nO#g&rX%[&rX%_&rXg&rX~O!f$YO!r$YO#Z&qO%uWO~O#Z&qO~Oz&sO#g&tX%[&tX%_&tX~Oz&uO#g&pX%[&pX%_&pX{&pX~O!X&wO%z&xO~Oz&|On&wX~P%SOn'PO~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO%['UO~P'vOt'YO#p'WO#q'XOP#naV#naf#nah#nao#nas#nav#na!P#na!Q#na!T#na!U#na!X#na!]#na!h#na!r#na!s#na!t#na!{#na!}#na#P#na#R#na#T#na#X#na#Z#na#^#na#_#na#a#na#c#na#l#na#o#na#s#na#u#na#z#na#}#na$P#na%X#na%o#na%p#na%t#na%u#na&Z#na&[#na&]#na&^#na&_#na&`#na&a#na&b#na&c#na&d#na&e#na&f#na&g#na&h#na&i#na&j#na%Z#na%_#na~Oz'ZO#[']O{&xX~Oh'_O!X&wO~Oh!iO{$jO!X&wO~O{'eO~P%SO%['hO%_'hO~OS'iO%['hO%_'hO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%k!]O~P!#uO%kWi~P!#uOV!aO_!aOa!bOh!iO!X!kO!f!mO%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%m!_O%n!_O~P!&pO%mWi%nWi~P!&pOa!bOh!iO!X!kO!f!mOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%mWi%nWi%oWi%pWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~OV!aO_!aO%q!aO%r!aO%s!aO~P!)nOVWi_Wi%qWi%rWi%sWi~P!)nO!T%dO!U%cOg&VXz&VX~O%z'kO%{'kO~P,eOz'mOg&UX~Og'oO~Oz'pO{'rO!W&XX~Oo0cOv0qOz'pO{'sO!W&XX~P'vO!W'uO~Om!oOn!oOo!rOp!sOkjisjizji{ji!xji#gji%[ji%_ji%zji~Ol!qO~P!.aOlji~P!.aOk0eOl0fOm0dOn0dOo0mOp0nO~Ot'wO~P!/jOV'|Og'}Oo0cOv0qO~P'vOg'}Oz(OO~Og(QO~O!U(SO~Og(TOz(OO!T%dO!U%cO~P%SOk0eOl0fOm0dOn0dOo0mOp0nOgqa!Tqa!Uqa%{qa!Wqa![qa!Qqa#[qatqa!mqa~PEcOV'|Oo0cOv0qO!W&Sa~P'vOz(WO!W&Sa~O!W(XO~Oz(WO!T%dO!U%cO!W&Sa~P%SOV(]Oo0cOv0qO![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~P'vOz(^O![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~O![(aO~Oz(^O!T%dO!U%cO![%}a~P%SOz(dO!T%dO!U%cO![&Ta~P%SOz(gO{&lX![&lX!m&lX%z&lX~O{(kO![(mO!m(nO%z(jO~OV&OOopOvqO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~P'vOz(pO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~O!f&UOh&sa%[&saz&sa#[&sa#g&sa%_&sa#Z&sag&sa~O%[(uO~OV#sOa#tO%uWO~Oz&]O{wa~OopOvqO~P'vOz(^O#g%}a%[%}a%_%}ag%}a{%}a![%}a!m%}a%z%}a~P%SOz(zO#g%hX%[%hX%_%hX%z%hX~O%z#|O#gUi%[Ui%_Ui~O#g&Pa%[&Pa%_&Pan&Pa~P'vOz(}O#g&Pa%[&Pa%_&Pan&Pa~O%uWO#g&ra%[&ra%_&rag&ra~Oz)SO#g&ra%[&ra%_&rag&ra~Og)VO~OV)WOh$WO%uWO~O#Z)XO~O%uWO#g&ta%[&ta%_&ta~Oz)ZO#g&ta%[&ta%_&ta~Oo0cOv0qO#g&pa%[&pa%_&pa{&pa~P'vOz)^O#g&pa%[&pa%_&pa{&pa~OV)`Oa)`O%uWO~O%z)eO~Ot)hO#j)gOP#hiV#hif#hih#hio#his#hiv#hi!P#hi!Q#hi!T#hi!U#hi!X#hi!]#hi!h#hi!r#hi!s#hi!t#hi!{#hi!}#hi#P#hi#R#hi#T#hi#X#hi#Z#hi#^#hi#_#hi#a#hi#c#hi#l#hi#o#hi#s#hi#u#hi#z#hi#}#hi$P#hi%X#hi%o#hi%p#hi%t#hi%u#hi&Z#hi&[#hi&]#hi&^#hi&_#hi&`#hi&a#hi&b#hi&c#hi&d#hi&e#hi&f#hi&g#hi&h#hi&i#hi&j#hi%Z#hi%_#hi~Ot)iOP#kiV#kif#kih#kio#kis#kiv#ki!P#ki!Q#ki!T#ki!U#ki!X#ki!]#ki!h#ki!r#ki!s#ki!t#ki!{#ki!}#ki#P#ki#R#ki#T#ki#X#ki#Z#ki#^#ki#_#ki#a#ki#c#ki#l#ki#o#ki#s#ki#u#ki#z#ki#}#ki$P#ki%X#ki%o#ki%p#ki%t#ki%u#ki&Z#ki&[#ki&]#ki&^#ki&_#ki&`#ki&a#ki&b#ki&c#ki&d#ki&e#ki&f#ki&g#ki&h#ki&i#ki&j#ki%Z#ki%_#ki~OV)kOn&wa~P'vOz)lOn&wa~Oz)lOn&wa~P%SOn)pO~O%Y)tO~Ot)wO#p'WO#q)vOP#niV#nif#nih#nio#nis#niv#ni!P#ni!Q#ni!T#ni!U#ni!X#ni!]#ni!h#ni!r#ni!s#ni!t#ni!{#ni!}#ni#P#ni#R#ni#T#ni#X#ni#Z#ni#^#ni#_#ni#a#ni#c#ni#l#ni#o#ni#s#ni#u#ni#z#ni#}#ni$P#ni%X#ni%o#ni%p#ni%t#ni%u#ni&Z#ni&[#ni&]#ni&^#ni&_#ni&`#ni&a#ni&b#ni&c#ni&d#ni&e#ni&f#ni&g#ni&h#ni&i#ni&j#ni%Z#ni%_#ni~OV)zOo0cOv0qO{$jO~P'vOo0cOv0qO{&xa~P'vOz*OO{&xa~OV*SOa*TOg*WO%q*UO%uWO~O{$jO&{*YO~Oh'_O~Oh!iO{$jO~O%[*_O~O%[*aO%_*aO~OV$}Oa$}Oo0cOv0qOg&Ua~P'vOz*dOg&Ua~Oo0cOv0qO{*gO!W&Xa~P'vOz*hO!W&Xa~Oo0cOv0qOz*hO{*kO!W&Xa~P'vOo0cOv0qOz*hO!W&Xa~P'vOz*hO{*kO!W&Xa~Om0dOn0dOo0mOp0nOgjikjisjizji!Tji!Uji%{ji!Wji{ji![ji#gji%[ji%_ji!Qji#[jitji!mji%zji~Ol0fO~P!NkOlji~P!NkOV'|Og*pOo0cOv0qO~P'vOn*rO~Og*pOz*tO~Og*uO~OV'|Oo0cOv0qO!W&Si~P'vOz*vO!W&Si~O!W*wO~OV(]Oo0cOv0qO![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~P'vOz*zO!T%dO!U%cO![&Ti~Oz*}O![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~O![+OO~Oa+QOo0cOv0qO![&Ti~P'vOz*zO![&Ti~O![+SO~OV+UOo0cOv0qO{&la![&la!m&la%z&la~P'vOz+VO{&la![&la!m&la%z&la~O!]+YO&n+[O![!nX~O![+^O~O{(kO![+_O~O{(kO![+_O!m+`O~OV&OOopOvqO{%hq!x%hq#g%hq%[%hq%_%hq%z%hq~P'vOz$ri{$ri!x$ri#g$ri%[$ri%_$ri%z$ri~P%SOV&OOopOvqO~P'vOV&OOo0cOv0qO#g%ha%[%ha%_%ha%z%ha~P'vOz+aO#g%ha%[%ha%_%ha%z%ha~Oz$ia#g$ia%[$ia%_$ian$ia~P%SO#g&Pi%[&Pi%_&Pin&Pi~P'vOz+dO#g#Wq%[#Wq%_#Wq~O#[+eOz$va#g$va%[$va%_$vag$va~O%uWO#g&ri%[&ri%_&rig&ri~Oz+gO#g&ri%[&ri%_&rig&ri~OV+iOh$WO%uWO~O%uWO#g&ti%[&ti%_&ti~Oo0cOv0qO#g&pi%[&pi%_&pi{&pi~P'vO{#{Oz#eX!W#eX~Oz+mO!W&uX~O!W+oO~Ot+rO#j)gOP#hqV#hqf#hqh#hqo#hqs#hqv#hq!P#hq!Q#hq!T#hq!U#hq!X#hq!]#hq!h#hq!r#hq!s#hq!t#hq!{#hq!}#hq#P#hq#R#hq#T#hq#X#hq#Z#hq#^#hq#_#hq#a#hq#c#hq#l#hq#o#hq#s#hq#u#hq#z#hq#}#hq$P#hq%X#hq%o#hq%p#hq%t#hq%u#hq&Z#hq&[#hq&]#hq&^#hq&_#hq&`#hq&a#hq&b#hq&c#hq&d#hq&e#hq&f#hq&g#hq&h#hq&i#hq&j#hq%Z#hq%_#hq~On$|az$|a~P%SOV)kOn&wi~P'vOz+yOn&wi~Oz,TO{$jO#[,TO~O#q,VOP#nqV#nqf#nqh#nqo#nqs#nqv#nq!P#nq!Q#nq!T#nq!U#nq!X#nq!]#nq!h#nq!r#nq!s#nq!t#nq!{#nq!}#nq#P#nq#R#nq#T#nq#X#nq#Z#nq#^#nq#_#nq#a#nq#c#nq#l#nq#o#nq#s#nq#u#nq#z#nq#}#nq$P#nq%X#nq%o#nq%p#nq%t#nq%u#nq&Z#nq&[#nq&]#nq&^#nq&_#nq&`#nq&a#nq&b#nq&c#nq&d#nq&e#nq&f#nq&g#nq&h#nq&i#nq&j#nq%Z#nq%_#nq~O#[,WOz%Oa{%Oa~Oo0cOv0qO{&xi~P'vOz,YO{&xi~O{#{O%z,[Og&zXz&zX~O%uWOg&zXz&zX~Oz,`Og&yX~Og,bO~O%Y,eO~O!T%dO!U%cOg&Viz&Vi~OV$}Oa$}Oo0cOv0qOg&Ui~P'vO{,hOz$la!W$la~Oo0cOv0qO{,iOz$la!W$la~P'vOo0cOv0qO{*gO!W&Xi~P'vOz,lO!W&Xi~Oo0cOv0qOz,lO!W&Xi~P'vOz,lO{,oO!W&Xi~Og$hiz$hi!W$hi~P%SOV'|Oo0cOv0qO~P'vOn,qO~OV'|Og,rOo0cOv0qO~P'vOV'|Oo0cOv0qO!W&Sq~P'vOz$gi![$gi#g$gi%[$gi%_$gig$gi{$gi!m$gi%z$gi~P%SOV(]Oo0cOv0qO~P'vOa+QOo0cOv0qO![&Tq~P'vOz,sO![&Tq~O![,tO~OV(]Oo0cOv0qO![%}q#g%}q%[%}q%_%}qg%}q{%}q!m%}q%z%}q~P'vO{,uO~OV+UOo0cOv0qO{&li![&li!m&li%z&li~P'vOz,zO{&li![&li!m&li%z&li~O!]+YO&n+[O![!na~O{(kO![,}O~OV&OOo0cOv0qO#g%hi%[%hi%_%hi%z%hi~P'vOz-OO#g%hi%[%hi%_%hi%z%hi~O%uWO#g&rq%[&rq%_&rqg&rq~Oz-RO#g&rq%[&rq%_&rqg&rq~OV)`Oa)`O%uWO!W&ua~Oz-TO!W&ua~On$|iz$|i~P%SOV)kO~P'vOV)kOn&wq~P'vOt-XOP#myV#myf#myh#myo#mys#myv#my!P#my!Q#my!T#my!U#my!X#my!]#my!h#my!r#my!s#my!t#my!{#my!}#my#P#my#R#my#T#my#X#my#Z#my#^#my#_#my#a#my#c#my#l#my#o#my#s#my#u#my#z#my#}#my$P#my%X#my%o#my%p#my%t#my%u#my&Z#my&[#my&]#my&^#my&_#my&`#my&a#my&b#my&c#my&d#my&e#my&f#my&g#my&h#my&i#my&j#my%Z#my%_#my~O%Z-]O%_-]O~P`O#q-^OP#nyV#nyf#nyh#nyo#nys#nyv#ny!P#ny!Q#ny!T#ny!U#ny!X#ny!]#ny!h#ny!r#ny!s#ny!t#ny!{#ny!}#ny#P#ny#R#ny#T#ny#X#ny#Z#ny#^#ny#_#ny#a#ny#c#ny#l#ny#o#ny#s#ny#u#ny#z#ny#}#ny$P#ny%X#ny%o#ny%p#ny%t#ny%u#ny&Z#ny&[#ny&]#ny&^#ny&_#ny&`#ny&a#ny&b#ny&c#ny&d#ny&e#ny&f#ny&g#ny&h#ny&i#ny&j#ny%Z#ny%_#ny~Oz-aO{$jO#[-aO~Oo0cOv0qO{&xq~P'vOz-dO{&xq~O%z,[Og&zaz&za~O{#{Og&zaz&za~OV*SOa*TO%q*UO%uWOg&ya~Oz-hOg&ya~O$S-lO~OV$}Oa$}Oo0cOv0qO~P'vOo0cOv0qO{-mOz$li!W$li~P'vOo0cOv0qOz$li!W$li~P'vO{-mOz$li!W$li~Oo0cOv0qO{*gO~P'vOo0cOv0qO{*gO!W&Xq~P'vOz-pO!W&Xq~Oo0cOv0qOz-pO!W&Xq~P'vOs-sO!T%dO!U%cOg&Oq!W&Oq![&Oqz&Oq~P!/jOa+QOo0cOv0qO![&Ty~P'vOz$ji![$ji~P%SOa+QOo0cOv0qO~P'vOV+UOo0cOv0qO~P'vOV+UOo0cOv0qO{&lq![&lq!m&lq%z&lq~P'vO{(kO![-xO!m-yO%z-wO~OV&OOo0cOv0qO#g%hq%[%hq%_%hq%z%hq~P'vO%uWO#g&ry%[&ry%_&ryg&ry~OV)`Oa)`O%uWO!W&ui~Ot-}OP#m!RV#m!Rf#m!Rh#m!Ro#m!Rs#m!Rv#m!R!P#m!R!Q#m!R!T#m!R!U#m!R!X#m!R!]#m!R!h#m!R!r#m!R!s#m!R!t#m!R!{#m!R!}#m!R#P#m!R#R#m!R#T#m!R#X#m!R#Z#m!R#^#m!R#_#m!R#a#m!R#c#m!R#l#m!R#o#m!R#s#m!R#u#m!R#z#m!R#}#m!R$P#m!R%X#m!R%o#m!R%p#m!R%t#m!R%u#m!R&Z#m!R&[#m!R&]#m!R&^#m!R&_#m!R&`#m!R&a#m!R&b#m!R&c#m!R&d#m!R&e#m!R&f#m!R&g#m!R&h#m!R&i#m!R&j#m!R%Z#m!R%_#m!R~Oo0cOv0qO{&xy~P'vOV*SOa*TO%q*UO%uWOg&yi~O$S-lO%Z.VO%_.VO~OV.aOh._O!X.^O!].`O!h.YO!s.[O!t.[O%p.XO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O~Oo0cOv0qOz$lq!W$lq~P'vO{.fOz$lq!W$lq~Oo0cOv0qO{*gO!W&Xy~P'vOz.gO!W&Xy~Oo0cOv.kO~P'vOs-sO!T%dO!U%cOg&Oy!W&Oy![&Oyz&Oy~P!/jO{(kO![.nO~O{(kO![.nO!m.oO~OV*SOa*TO%q*UO%uWO~Oh.tO!f.rOz$TX#[$TX%j$TXg$TX~Os$TX{$TX!W$TX![$TX~P$-bO%o.vO%p.vOs$UXz$UX{$UX#[$UX%j$UX!W$UXg$UX![$UX~O!h.xO~Oz.|O#[/OO%j.yOs&|X{&|X!W&|Xg&|X~Oa/RO~P$)zOh.tOs&}Xz&}X{&}X#[&}X%j&}X!W&}Xg&}X![&}X~Os/VO{$jO~Oo0cOv0qOz$ly!W$ly~P'vOo0cOv0qO{*gO!W&X!R~P'vOz/ZO!W&X!R~Og&RXs&RX!T&RX!U&RX!W&RX![&RXz&RX~P!/jOs-sO!T%dO!U%cOg&Qa!W&Qa![&Qaz&Qa~O{(kO![/^O~O!f.rOh$[as$[az$[a{$[a#[$[a%j$[a!W$[ag$[a![$[a~O!h/eO~O%o.vO%p.vOs$Uaz$Ua{$Ua#[$Ua%j$Ua!W$Uag$Ua![$Ua~O%j.yOs$Yaz$Ya{$Ya#[$Ya!W$Yag$Ya![$Ya~Os&|a{&|a!W&|ag&|a~P$)nOz/jOs&|a{&|a!W&|ag&|a~O!W/mO~Og/mO~O{/oO~O![/pO~Oo0cOv0qO{*gO!W&X!Z~P'vO{/sO~O%z/tO~P$-bOz/uO#[/OO%j.yOg'PX~Oz/uOg'PX~Og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)nOz/zO#[/OO%j.yO!['Oa~Og'Pa~P$)nOz0SOg'Pa~Oa0UO!['Oi~P$)zOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-bO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)nO{0^O~Oa0UO!['Oq~P$)zOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)zOa0UO!['Oy~P$)zO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",goto:"!=j'QPPPPPP'RP'Z*s+[+t,_,y-fP.SP'Z.r.r'ZPPP'Z2[PPPPPP2[5PPP5PP7b7k=sPP=v>h>kPP'Z'ZPP>zPP'Z'ZPP'Z'Z'Z'Z'Z?O?w'ZP?zP@QDXGuGyPG|HWH['ZPPPH_Hk'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPHqH}IVPI^IdPI^PI^I^PPPI^PKrPK{LVL]KrPI^LfPI^PLmLsPLwM]MzNeLwLwNkNxLwLwLwLw! ^! d! g! l! o! y!!P!!]!!o!!u!#P!#V!#s!#y!$P!$Z!$a!$g!$y!%T!%Z!%a!%k!%q!%w!%}!&T!&Z!&e!&k!&u!&{!'U!'[!'k!'s!'}!(UPPPPPPPPPPP!([!(_!(e!(n!(x!)TPPPPPPPPPPPP!-u!/Z!3^!6oPP!6w!7W!7a!8Y!8P!8c!8i!8l!8o!8r!8z!9jPPPPPPPPPPPPPPPPP!9m!9q!9wP!:]!:a!:m!:v!;S!;j!;m!;p!;v!;|!<S!<VP!<_!<h!=d!=g]eOn#g$j)t,P'}`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r{!cQ#c#p$R$d$p%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g}!dQ#c#p$R$d$p$u%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!P!eQ#c#p$R$d$p$u$v%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!R!fQ#c#p$R$d$p$u$v$w%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!T!gQ#c#p$R$d$p$u$v$w$x%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!V!hQ#c#p$R$d$p$u$v$w$x$y%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!Z!hQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g'}TOTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r&eVOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0n0r%oXOYZ[dnrxy}!P!Q!U!i!k#[#d#g#y#{#}$Q$h$j$}%S%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/V/Z0i0j0kQ#vqQ/[.kR0o0q't`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rh#jhz{$W$Z&l&q)S)X+f+g-RW#rq&].k0qQ$]|Q$a!OQ$n!VQ$o!WW$|!i'm*d,gS&[#s#tQ'S$iQ(s&UQ)U&nU)Y&s)Z+jW)a&w+m-T-{Q*Q']W*R'_,`-h.TQ+l)`S,_*S*TQ-Q+eQ-_,TQ-c,WQ.R-al.W-l.^._.a.z.|/R/j/o/t/y0U0Z0^Q/S.`Q/a.tQ/l/OU0P/u0S0[X0V/z0W0_0`R&Z#r!_!wYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZR%^!vQ!{YQ%x#[Q&d#}Q&g$QR,{+YT.j-s/s!Y!jQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gQ&X#kQ'c$oR*^'dR'l$|Q%V!mR/_.r'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rS#a_#b!P.[-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rT#a_#bT#^^#_R(o%xa(l%x(n(o+`,{-y-z.oT+[(k+]R-z,{Q$PsQ+l)aQ,^*RR-e,_X#}s$O$P&fQ&y$aQ'a$nQ'd$oR)s'SQ)b&wV-S+m-T-{ZgOn$j)t,PXkOn)t,PQ$k!TQ&z$bQ&{$cQ'^$mQ'b$oQ)q'RQ)x'WQ){'XQ)|'YQ*Z'`S*]'c'dQ+s)gQ+u)hQ+v)iQ+z)oS+|)r*[Q,Q)vQ,R)wS,S)y)zQ,d*^Q-V+rQ-W+tQ-Y+{S-Z+},OQ-`,UQ-b,VQ-|-XQ.O-[Q.P-^Q.Q-_Q.p-}Q.q.RQ/W.dR/r/XWkOn)t,PR#mjQ'`$nS)r'S'aR,O)sQ,]*RR-f,^Q*['`Q+})rR-[,OZiOjn)t,PQ'f$pR*`'gT-j,e-ku.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^t.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^Q/S.`X0V/z0W0_0`!P.Z-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`Q.w.YR/f.xg.z.].{/b/i/n/|0O0Q0]0a0bu.b-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^X.u.W.b/a0PR/c.tV0R/u0S0[R/X.dQnOS#on,PR,P)tQ&^#uR(x&^S%m#R#wS(_%m(bT(b%p&`Q%a!yQ%h!}W(P%a%h(U(YQ(U%eR(Y%jQ&i$RR)O&iQ(e%qQ*{(`T+R(e*{Q'n%OR*e'nS'q%R%SY*i'q*j,m-q.hU*j'r's'tU,m*k*l*mS-q,n,oR.h-rQ#Y]R%t#YQ#_^R%y#_Q(h%vS+W(h+XR+X(iQ+](kR,|+]Q#b_R%{#bQ#ebQ%}#cW&Q#e%}({+bQ({&cR+b0gQ$OsS&e$O&fR&f$PQ&v$_R)_&vQ&V#jR(t&VQ&m$VS)T&m+hR+h)UQ$Z{R&p$ZQ&t$]R)[&tQ+n)bR-U+nQ#hfR&S#hQ)f&zR+q)fQ&}$dS)m&})nR)n'OQ'V$kR)u'VQ'[$lS*P'[,ZR,Z*QQ,a*VR-i,aWjOn)t,PR#ljQ-k,eR.U-kd.{.]/b/i/n/|0O0Q0]0a0bR/h.{U.s.W/a0PR/`.sQ/{/nS0X/{0YR0Y/|S/v/b/cR0T/vQ.}.]R/k.}R!ZPXmOn)t,PWlOn)t,PR'T$jYfOn$j)t,PR&R#g[sOn#g$j)t,PR&d#}&dQOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0n0rQ!nTQ#caQ#poU$Rt%c(SS$d!R$gQ$p!XQ$u!cQ$v!dQ$w!eQ$x!fQ$y!gQ$z!hQ%e!zQ%j#OQ%p#SQ%q#TQ&`#xQ'O$eQ'g$qQ(q&OU(|&h(}+cW)j&|)l+x+yQ*o'|Q*x(]Q+w)kQ,v+QR0g0lQ!yYQ!}ZQ$b!PQ$c!QQ%R!kQ't%S^'{%`%g(O(W*q*t*v^*f'p*h,k,l-p.g/ZQ*l'rQ*m'sQ+t)gQ,j*gQ,n*kQ-n,hQ-o,iQ-r,oQ.e-mR/Y.f[bOn#g$j)t,P!^!vYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZQ#R[Q#fdS#wrxQ$UyW$_}$Q'P)pS$l!U$hW${!i'm*d,gS%v#[+Y`&P#d%|(p(r(z+a-O0kQ&a#yQ&b#{Q&c#}Q'j$}Q'z%^W([%l(^*y*}Q(`%nQ(i%wQ(v&ZS(y&_0iQ)P&jQ)Q&kU)]&u)^+kQ)d&xQ)y'WY)}'Z*O,X,Y-dQ*b'lS*n'w0jW+P(d*z,s,wW+T(g+V,y,zQ+p)eQ,U)zQ,c*YQ,x+UQ-P+dQ-e,]Q-v,uQ.S-fR/q/VhUOn#d#g$j%|&_'w(p(r)t,P%U!uYZ[drxy}!P!Q!U!i!k#[#y#{#}$Q$h$}%S%^%`%g%l%n%w&Z&j&k&u&x'P'W'Z'l'm'p'r's(O(W(^(d(g(z)^)e)g)p)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/V/Z0i0j0kQ#qpW%W!o!s0d0nQ%X!pQ%Y!qQ%[!tQ%f0cS'v%Z0hQ'x0eQ'y0fQ,p*rQ-u,qS.i-s/sR0p0rU#uq.k0qR(w&][cOn#g$j)t,PZ!xY#[#}$Q+YQ#W[Q#zrR$TxQ%b!yQ%i!}Q%o#RQ'j${Q(V%eQ(Z%jQ(c%pQ(f%qQ*|(`Q,f*bQ-t,pQ.m-uR/].lQ$StQ(R%cR*s(SQ.l-sR/}/sR#QZR#V[R%Q!iQ%O!iV*c'm*d,g!Z!lQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gR%T!kT#]^#_Q%x#[R,{+YQ(m%xS+_(n(oQ,}+`Q-x,{S.n-y-zR/^.oT+Z(k+]Q$`}Q&g$QQ)o'PR+{)pQ$XzQ)W&qR+i)XQ$XzQ&o$WQ)W&qR+i)XQ#khW$Vz$W&q)XQ$[{Q&r$ZZ)R&l)S+f+g-RR$^|R)c&wXlOn)t,PQ$f!RR'Q$gQ$m!UR'R$hR*X'_Q*V'_V-g,`-h.TQ.d-lQ/P.^R/Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",nodeNames:"\u26A0 print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:277,context:Si,nodeProps:[["isolate",-5,4,71,72,73,77,""],["group",-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,"Statement Statement",-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,"Expression",-10,114,116,119,121,122,126,128,133,135,138,"Statement",-9,143,144,147,148,150,151,152,153,154,"Pattern"],["openedBy",23,"(",54,"[",58,"{"],["closedBy",24,")",55,"]",59,"}"]],propSources:[$i],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[pi,Ti,di,qi,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:O=>mi[O]||-1}],tokenPrec:7668}),A=new B,C=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function c(O){return(i,a,n)=>{if(n)return!1;let e=i.node.getChild("VariableName");return e&&a(e,O),!0}}var hi={FunctionDefinition:c("function"),ClassDefinition:c("class"),ForStatement(O,i,a){if(a){for(let n=O.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")i(n,"variable");else if(n.name=="in")break}},ImportStatement(O,i){var e,r;let{node:a}=O,n=((e=a.firstChild)==null?void 0:e.name)=="from";for(let t=a.getChild("import");t;t=t.nextSibling)t.name=="VariableName"&&((r=t.nextSibling)==null?void 0:r.name)!="as"&&i(t,n?"variable":"namespace")},AssignStatement(O,i){for(let a=O.node.firstChild;a;a=a.nextSibling)if(a.name=="VariableName")i(a,"variable");else if(a.name==":"||a.name=="AssignOp")break},ParamList(O,i){for(let a=null,n=O.node.firstChild;n;n=n.nextSibling)n.name=="VariableName"&&(!a||!/\*|AssignOp/.test(a.name))&&i(n,"variable"),a=n},CapturePattern:c("variable"),AsPattern:c("variable"),__proto__:null};function N(O,i){let a=A.get(i);if(a)return a;let n=[],e=!0;function r(t,o){let P=O.sliceString(t.from,t.to);n.push({label:P,type:o})}return i.cursor(aO.IncludeAnonymous).iterate(t=>{if(t.name){let o=hi[t.name];if(o&&o(t,r,e)||!e&&C.has(t.name))return!1;e=!1}else if(t.to-t.from>8192){for(let o of N(O,t.node))n.push(o);return!1}}),A.set(i,n),n}var I=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,D=["String","FormatString","Comment","PropertyName"];function H(O){let i=M(O.state).resolveInner(O.pos,-1);if(D.indexOf(i.name)>-1)return null;let a=i.name=="VariableName"||i.to-i.from<20&&I.test(O.state.sliceDoc(i.from,i.to));if(!a&&!O.explicit)return null;let n=[];for(let e=i;e;e=e.parent)C.has(e.name)&&(n=n.concat(N(O.state.doc,e)));return{options:n,from:a?i.from:O.pos,validFor:I}}var gi=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(O=>({label:O,type:"constant"})).concat("ArithmeticError.AssertionError.AttributeError.BaseException.BlockingIOError.BrokenPipeError.BufferError.BytesWarning.ChildProcessError.ConnectionAbortedError.ConnectionError.ConnectionRefusedError.ConnectionResetError.DeprecationWarning.EOFError.Ellipsis.EncodingWarning.EnvironmentError.Exception.FileExistsError.FileNotFoundError.FloatingPointError.FutureWarning.GeneratorExit.IOError.ImportError.ImportWarning.IndentationError.IndexError.InterruptedError.IsADirectoryError.KeyError.KeyboardInterrupt.LookupError.MemoryError.ModuleNotFoundError.NameError.NotADirectoryError.NotImplemented.NotImplementedError.OSError.OverflowError.PendingDeprecationWarning.PermissionError.ProcessLookupError.RecursionError.ReferenceError.ResourceWarning.RuntimeError.RuntimeWarning.StopAsyncIteration.StopIteration.SyntaxError.SyntaxWarning.SystemError.SystemExit.TabError.TimeoutError.TypeError.UnboundLocalError.UnicodeDecodeError.UnicodeEncodeError.UnicodeError.UnicodeTranslateError.UnicodeWarning.UserWarning.ValueError.Warning.ZeroDivisionError".split(".").map(O=>({label:O,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(O=>({label:O,type:"class"}))).concat("abs.aiter.all.anext.any.ascii.bin.breakpoint.callable.chr.compile.delattr.dict.dir.divmod.enumerate.eval.exec.exit.filter.format.getattr.globals.hasattr.hash.help.hex.id.input.isinstance.issubclass.iter.len.license.locals.max.min.next.oct.open.ord.pow.print.property.quit.repr.reversed.round.setattr.slice.sorted.sum.vars.zip".split(".").map(O=>({label:O,type:"function"}))),ci=[d("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),d("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),d("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),d("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),d(`if \${}:
`,{label:"if",detail:"block",type:"keyword"}),d("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),d("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),d("import ${module}",{label:"import",detail:"statement",type:"keyword"}),d("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],L=dO(D,oO(gi.concat(ci)));function k(O){let{node:i,pos:a}=O,n=O.lineIndent(a,-1),e=null;for(;;){let r=i.childBefore(a);if(r)if(r.name=="Comment")a=r.from;else if(r.name=="Body"||r.name=="MatchBody")O.baseIndentFor(r)+O.unit<=n&&(e=r),i=r;else if(r.name=="MatchClause")i=r;else if(r.type.is("Statement"))i=r;else break;else break}return e}function u(O,i){let a=O.baseIndentFor(i),n=O.lineAt(O.pos,-1),e=n.from+n.text.length;return/^\s*($|#)/.test(n.text)&&O.node.to<e+100&&!/\S/.test(O.state.sliceDoc(e,O.node.to))&&O.lineIndent(O.pos,-1)<=a||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(O.textAfter)&&O.lineIndent(O.pos,-1)>a?null:a+O.unit}var X=eO.define({name:"python",parser:J.configure({props:[OO.add({Body:O=>u(O,/^\s*(#|$)/.test(O.textAfter)&&k(O)||O.node)??O.continue(),MatchBody:O=>u(O,k(O)||O.node)??O.continue(),IfStatement:O=>/^\s*(else:|elif )/.test(O.textAfter)?O.baseIndent:O.continue(),"ForStatement WhileStatement":O=>/^\s*else:/.test(O.textAfter)?O.baseIndent:O.continue(),TryStatement:O=>/^\s*(except[ :]|finally:|else:)/.test(O.textAfter)?O.baseIndent:O.continue(),MatchStatement:O=>/^\s*case /.test(O.textAfter)?O.baseIndent+O.unit:O.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":y({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":y({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":y({closing:"]"}),MemberExpression:O=>O.baseIndent+O.unit,"String FormatString":()=>null,Script:O=>{let i=k(O);return(i&&u(O,i))??O.continue()}}),K.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":iO,Body:(O,i)=>({from:O.from+1,to:O.to-(O.to==i.doc.length?0:1)}),"String FormatString":(O,i)=>({from:i.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Xi(){return new tO(X,[X.data.of({autocomplete:H}),X.data.of({autocomplete:L})])}export{J as a,X as i,H as n,Xi as r,L as t};
import{D as i,J as O,N as $,T as y,g as X,n as S,q as P,r as m,s as n,u as c}from"./dist-DBwNzi3C.js";import{i as f}from"./dist-Dcqqg9UU.js";var p=110,r=1,s=2,t=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function e(T){return T>=65&&T<=90||T>=97&&T<=122||T>=161}function W(T){return T>=48&&T<=57}var Z=new S((T,Q)=>{if(T.next==40){let a=T.peek(-1);(e(a)||W(a)||a==95||a==45)&&T.acceptToken(s,1)}}),w=new S(T=>{if(t.indexOf(T.peek(-1))>-1){let{next:Q}=T;(e(Q)||Q==95||Q==35||Q==46||Q==91||Q==58||Q==45)&&T.acceptToken(p)}}),h=new S(T=>{if(t.indexOf(T.peek(-1))<0){let{next:Q}=T;if(Q==37&&(T.advance(),T.acceptToken(r)),e(Q)){do T.advance();while(e(T.next));T.acceptToken(r)}}}),d=P({"import charset namespace keyframes media supports when":O.definitionKeyword,"from to selector":O.keyword,NamespaceName:O.namespace,KeyframeName:O.labelName,TagName:O.tagName,ClassName:O.className,PseudoClassName:O.constant(O.className),IdName:O.labelName,"FeatureName PropertyName PropertyVariable":O.propertyName,AttributeName:O.attributeName,NumberLiteral:O.number,KeywordQuery:O.keyword,UnaryQueryOp:O.operatorKeyword,"CallTag ValueName":O.atom,VariableName:O.variableName,"AtKeyword Interpolation":O.special(O.variableName),Callee:O.operatorKeyword,Unit:O.unit,"UniversalSelector NestingSelector":O.definitionOperator,MatchOp:O.compareOperator,"ChildOp SiblingOp, LogicOp":O.logicOperator,BinOp:O.arithmeticOperator,Important:O.modifier,"Comment LineComment":O.blockComment,ColorLiteral:O.color,"ParenthesizedContent StringLiteral":O.string,Escape:O.special(O.string),": ...":O.punctuation,"PseudoOp #":O.derefOperator,"; ,":O.separator,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),z={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},u={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":160,"@keyframes":166,"@supports":178},U=m.deserialize({version:14,states:"@^O!gQWOOO!nQaO'#CeOOQP'#Cd'#CdO$RQWO'#CgO$xQaO'#EaO%cQWO'#CiO%kQWO'#DZO%pQWO'#D^O%uQaO'#DfOOQP'#Es'#EsO'YQWO'#DlO'yQWO'#DyO(QQWO'#D{O(xQWO'#D}O)TQWO'#EQO'bQWO'#EWO)YQ`O'#FTO)]Q`O'#FTO)hQ`O'#FTO)vQWO'#EYOOQO'#Er'#ErOOQO'#FV'#FVOOQO'#Ec'#EcO){QWO'#EqO*WQWO'#EqQOQWOOOOQP'#Ch'#ChOOQP,59R,59RO$RQWO,59RO*bQWO'#EdO+PQWO,58|O+_QWO,59TO%kQWO,59uO%pQWO,59xO*bQWO,59{O*bQWO,59}OOQO'#De'#DeO*bQWO,5:OO,bQpO'#E}O,iQWO'#DkOOQO,58|,58|O(QQWO,58|O,pQWO,5:{OOQO,5:{,5:{OOQT'#Cl'#ClO-UQeO,59TO.cQ[O,59TOOQP'#D]'#D]OOQP,59u,59uOOQO'#D_'#D_O.hQpO,59xOOQO'#EZ'#EZO.pQ`O,5;oOOQO,5;o,5;oO/OQWO,5:WO/VQWO,5:WOOQS'#Dn'#DnO/rQWO'#DsO/yQ!fO'#FRO0eQWO'#DtOOQS'#FS'#FSO+YQWO,5:eO'bQWO'#DrOOQS'#Cu'#CuO(QQWO'#CwO0jQ!hO'#CyO2^Q!fO,5:gO2oQWO'#DWOOQS'#Ex'#ExO(QQWO'#DQOOQO'#EP'#EPO2tQWO,5:iO2yQWO,5:iOOQO'#ES'#ESO3RQWO,5:lO3WQ!fO,5:rO3iQ`O'#EkO.pQ`O,5;oOOQO,5:|,5:|O3zQWO,5:tOOQO,5:},5:}O4XQWO,5;]OOQO-E8a-E8aOOQP1G.m1G.mOOQP'#Ce'#CeO5RQaO,5;OOOQP'#Df'#DfOOQO-E8b-E8bOOQO1G.h1G.hO(QQWO1G.hO5fQWO1G.hO5nQeO1G.oO.cQ[O1G.oOOQP1G/a1G/aO6{QpO1G/dO7fQaO1G/gO8cQaO1G/iO9`QaO1G/jO:]Q!fO'#FOO:yQ!fO'#ExOOQO'#FO'#FOOOQO,5;i,5;iO<^QWO,5;iO<iQWO,5:VO<nQ!fO1G.hOOQO1G0g1G0gO=PQWO'#CnOOQP1G.o1G.oO=WQWO'#CqOOQP1G/d1G/dO(QQWO1G/dO=_Q`O1G1ZOOQO1G1Z1G1ZO=mQWO1G/rO=rQ!fO'#FQO>WQWO1G/rO>]Q!fO'#DnO>qQWO,5:ZO>vQ!fO,5:_OOQO'#DP'#DPO'bQWO,5:]O?XQWO'#DwOOQS,5:b,5:bO?`QWO,5:dO'bQWO'#EiO?gQWO,5;mO*bQWO,5:`OOQO1G0P1G0PO?uQ!fO,5:^O@aQ!fO,59cOOQS,59e,59eO(QQWO,59iOOQS,59n,59nO@rQWO,59pOOQO1G0R1G0RO@yQ#tO,59rOARQ!fO,59lOOQO1G0T1G0TOBrQWO1G0TOBwQWO'#ETOOQO1G0W1G0WOOQO1G0^1G0^OOQO,5;V,5;VOOQO-E8i-E8iOCVQ!fO1G0bOCvQWO1G0`O%kQWO'#E_O$RQWO'#E`OEZQWO'#E^OOQO1G0b1G0bPEkQWO'#EcO<nQ!fO7+$SOOQO7+$S7+$SO(QQWO7+$SOOQP7+$Z7+$ZOOQP7+%O7+%OO(QQWO7+%OOEpQ!fO'#EeOF}QWO,5;jO(QQWO,5;jOOQO,5;j,5;jO+gQpO'#EgOG[QWO1G1TOOQO1G1T1G1TOOQO1G/q1G/qOGgQaO'#EvOGnQWO,59YOGsQWO'#EwOG}QWO,59]OHSQ!fO7+%OOOQO7+&u7+&uOOQO7+%^7+%^O(QQWO'#EhOHeQWO,5;lOHmQWO7+%^O(QQWO1G/uOOQS1G/y1G/yOOQS1G/w1G/wOHrQWO,5:cOHwQ!fO1G0OOOQS1G0O1G0OOIYQ!fO,5;TOOQO-E8g-E8gOItQaO1G/zOOQS1G.}1G.}OOQS1G/T1G/TOI{Q!fO1G/[OOQS1G/[1G/[OJ^QWO1G/^OOQO7+%o7+%oOJcQYO'#CyO+YQWO'#EjOJkQWO,5:oOOQO,5:o,5:oOJyQ!fO'#ElO(QQWO'#ElOL^QWO7+%|OOQO7+%|7+%|OOQO7+%z7+%zOOQO,5:y,5:yOOQO,5:z,5:zOLqQaO,5:xOOQO,5:x,5:xOOQO<<Gn<<GnO<nQ!fO<<GnOMRQ!fO<<HjOOQO-E8c-E8cOMdQWO1G1UOOQO,5;R,5;ROOQO-E8e-E8eOOQO7+&o7+&oOMqQWO,5;bOOQP1G.t1G.tO(QQWO'#EfOMyQWO,5;cOOQT1G.w1G.wOOQP<<Hj<<HjONRQ!fO,5;SOOQO-E8f-E8fO/OQWO<<HxONgQWO7+%aOOQS1G/}1G/}OOQS7+%j7+%jOOQS7+%f7+%fOOQS7+$v7+$vOOQS7+$x7+$xOOQO,5;U,5;UOOQO-E8h-E8hOOQO1G0Z1G0ZONnQ!fO,5;WOOQO-E8j-E8jOOQO<<Ih<<IhOOQO1G0d1G0dOOQOAN=YAN=YOOQPAN>UAN>UO!!RQWO,5;QOOQO-E8d-E8dO!!]QWOAN>dOOQS<<H{<<H{OOQOG24OG24O",stateData:"!!n~O#dOSROSSOS~OVXOYXO^TO_TOfaOgbOoaOpWOyVO!OUO!aYO!nZO!p[O!r]O!u^O!{_O#hPO#iRO~O#a#eP~P]O^XX^!}X_XXcXXjXXp!}XyXX!OXX!UXX!ZXX![XX!^XX#PXX#aXX#bXX#iXX#oXX#pXX#p!}X#x!}X!]XX~O#hjO~O^oO_oOcmOyqO!OpO!UrO#bsO#ilO#otO#ptO~OjvO![yO!^wO#P{O!Z#TX#a#TX!]#TX~P$WOd!OO#h|O~O#h!PO~O#h!RO~O#h!TO#p!VO#x!VO^!YX^#wX_!YXc!YXj!YXy!YX!O!YX!U!YX!Z!YX![!YX!^!YX#P!YX#a!YX#b!YX#i!YX#o!YX#p!YX!]!YX~Oj!XOn!WO~Og!^Oj!ZOo!^Op!^Ou!`O!i!]O#h!YO~O!^#uP~P'bOf!fOg!fOh!fOj!bOl!fOn!fOo!fOp!fOu!gO{!eO#h!aO#m!cO~On!iO{!eO#h!hO~O#h!kO~Op!nO#p!VO#x!VO^#wX~OjvO#p!VO#x!VO^#wX~O^!qO~O!Z!rO#a#eX!]#eX~O#a#eX!]#eX~P]OVXOYXO^TO_TOp!xOyVO!OUO#h!vO#iRO~OcmOjvO![!{O!^wO~Od#OO#h|O~Of!fOg#VOh!fOj!bOl!fOn!fOo!fOp!fOu!gO{!eO#h!aO#m!cO#s#WO~Oa#XO~P+gO!]#eP~P]O![!{O!^wO#P#]O!Z#Ta#a#Ta!]#Ta~OQ#^O^]a_]ac]aj]ay]a!O]a!U]a!Z]a![]a!^]a#P]a#a]a#b]a#i]a#o]a#p]a!]]aa]a~OQ#`O~Ow#aO!S#bO~Op!nO#p#dO#x#dO^#wa~O!Z#uP~P'bOa#tP~P(QOg!^Oj!ZOo!^Op!^Ou!`O!i!]O~O#h#hO~P/^OQ#mOc#pOr#lOy#oO#n#kO!^#uX!Z#uXa#uX~Oj#rO~OP#vOQmXrmXymX!ZmX#nmX^mXamXcmXfmXgmXhmXjmXlmXnmXomXpmXumX{mX#hmX#mmX!^mX#PmX#amXwmX!]mX~OQ#`Or#wOy#yO!Z#zO#n#kO~Oj#{O~O!Z#}O~On$OO{!eO~O!^$PO~OQ#mOr#lOy#oO!^wO#n#kO~O#h!TO^#_Xp#_X#p#_X#x#_X~O!O$WO!^wO#i$XO~P(QO!Z!rO#a#ea!]#ea~O^oO_oOyqO!OpO!UrO#bsO#ilO#otO#ptO~Oc#Waj#Wa![#Wa!^#Waa#Wa~P4dO![$_O!^wO~OQ#^O^]i_]ic]ij]iy]i!O]i!U]i!Z]i![]i!^]i#P]i#a]i#b]i#i]i#o]i#p]i!]]ia]i~Ow$aO!S$bO~O^oO_oOyqO!OpO#ilO~Oc!Tij!Ti!U!Ti!Z!Ti![!Ti!^!Ti#P!Ti#a!Ti#b!Ti#o!Ti#p!Ti!]!Tia!Ti~P7TOc!Vij!Vi!U!Vi!Z!Vi![!Vi!^!Vi#P!Vi#a!Vi#b!Vi#o!Vi#p!Vi!]!Via!Vi~P7TOc!Wij!Wi!U!Wi!Z!Wi![!Wi!^!Wi#P!Wi#a!Wi#b!Wi#o!Wi#p!Wi!]!Wia!Wi~P7TOQ#`O^$eOr#wOy#yO#n#kOa#rXc#rX!Z#rX~P(QO#s$fOQ#lX^#lXa#lXc#lXf#lXg#lXh#lXj#lXl#lXn#lXo#lXp#lXr#lXu#lXy#lX{#lX!Z#lX#h#lX#m#lX#n#lX~Oa$iOc$gO!Z$gO~O!]$jO~OQ#`Or#wOy#yO!^wO#n#kO~Oa#jP~P*bOa#kP~P(QOp!nO#p$pO#x$pO^#wi~O!Z$qO~OQ#`Oc$rOr#wOy#yO#n#kOa#tX~Oa$tO~OQ!bX^!dXa!bXr!bXy!bX#n!bX~O^$uO~OQ#mOa$vOr#lOy#oO#n#kO~Oa#uP~P'bOw$zO~P(QOc#pO!^#ua!Z#uaa#ua~OQ#mOr#lOy#oO#n#kOc!fa!^!fa!Z!faa!fa~OQ#`Oa%OOr#wOy#yO#n#kO~Ow%RO~P(QOn%SO|%SO~OQ#`Or#wOy#yO#n#kO!Zta^taatactaftagtahtajtaltantaotaptauta{ta#hta#mta!^ta#Pta#atawta!]ta~O!Z%TO~O!]%XO!x%VO!y%VO#m%UO~OQ#`Oc%ZOr#wOy#yO#P%]O#n#kO!Z#Oi#a#Oi!]#Oi~P(QO!Z%^OV!|iY!|i^!|i_!|if!|ig!|io!|ip!|iy!|i!O!|i!a!|i!n!|i!p!|i!r!|i!u!|i!{!|i#a!|i#h!|i#i!|i!]!|i~OjvO!Z#QX#a#QX!]#QX~P*bO!Z!rO~OQ#`Or#wOy#yO#n#kOa#XXc#XXf#XXg#XXh#XXj#XXl#XXn#XXo#XXp#XXu#XX{#XX!Z#XX#h#XX#m#XX~Oa#rac#ra!Z#ra~P(QOa%jOc$gO!Z$gO~Oa#jX~P$WOa%lO~Oc%mOa#kX~P(QOa%oO~OQ#`Or#wOw%pOy#yO#n#kO~Oc$rOa#ta~On%sO~Oa%uO~OQ#`Or#wOw%vOy#yO#n#kO~OQ#mOr#lOy#oO#n#kOc#]a!^#]a!Z#]aa#]a~Oa%wO~P4dOQ#`Or#wOw%xOy#yO#n#kO~Oa%yO~OP#vO!^mX~O!]%|O!x%VO!y%VO#m%UO~OQ#`Or#wOy#yO#n#kOc#`Xf#`Xg#`Xh#`Xj#`Xl#`Xn#`Xo#`Xp#`Xu#`X{#`X!Z#`X#P#`X#a#`X#h#`X#m#`X!]#`X~Oc%ZO#P&PO!Z#Oq#a#Oq!]#Oq~P(QOjvO!Z#Qa#a#Qa!]#Qa~P4dOQ#`Or#wOw&SOy#yO#n#kO~Oa#ric#ri!Z#ri~P(QOcmOa#ja~Oc%mOa#ka~OQ#`Or#wOy#yO#n#kOa#[ac#[a~Oa&WO~P(QOQ#`Or#wOy#yO#n#kOc#`af#`ag#`ah#`aj#`al#`an#`ao#`ap#`au#`a{#`a!Z#`a#P#`a#a#`a#h#`a#m#`a!]#`a~Oa#Yac#Ya~P(QO!Z&XO~Of#dpg#m|#iRSRr~",goto:"0^#zPPPPPP#{P$Q$^P$Q$j$QPP$sP$yPP%PPPP%jP%jP&ZPPP%jP'O%jP%jP%jP'jPP$QP(a$Q(jP$QP$Q$Q(p$QPPPP(w#{P)f)f)q)f)f)f)fP)f)t)f#{P#{P#{P){#{P*O*RPP#{P#{*U*aP*f*i*i*a*a*l*s*}+e+k+q+w+},T,_PPPP,e,k,pPP-[-_-bPPPP.u/UP/[/_/k0QP0VVdOhweXOhmrsuw#^#r$YeQOhmrsuw#^#r$YQkRQ!ulR%`$XQ}TR!}oQ#_}R$`!}Q#_!Or#x!d#U#[#f#u#|$U$]$c$o$y%Q%Y%d%e%q%}R$`#O!]!f[vy!X!b!g!q!{#U#`#b#o#w#y$U$_$b$d$e$g$m$r$u%Z%[%g%m%t&T![!f[vy!X!b!g!q!{#U#`#b#o#w#y$U$_$b$d$e$g$m$r$u%Z%[%g%m%t&TT%V$P%WY#l![!m#j#t${s#w!d#U#[#f#u#|$U$]$c$o$y%Q%Y%d%e%q%}![!f[vy!X!b!g!q!{#U#`#b#o#w#y$U$_$b$d$e$g$m$r$u%Z%[%g%m%t&TQ!i]R$O!jQ!QUQ#PpR%_$WQ!SVR#QqZuS!w$k$}%aQxSS!znzQ#s!_Q$R!mQ$V!qS$^!|#[Q%c$]Q%z%VR&R%dc!^Z_!W!Z!`#l#m#p%sR#i!ZZ#n![!m#j#t${R!j]R!l^R$Q!lU`OhwQ!UWR$S!nVeOhwR$Z!qR$Y!qShOwR!thQnSS!yn%kR%k$kQ$d#UQ$m#`Y%f$d$m%g%t&TQ%g$eQ%t$uR&T%mQ%n$mR&U%nQ$h#YR%i$hQ$s#fR%r$sQ#q![R$|#qQ%W$PR%{%WQ!o`Q#c!UT$T!o#cQ%[$UR&O%[QiOR#ZwVfOhwUSOhwQ!wmQ#RrQ#SsQ#TuQ$k#^Q$}#rR%a$YR$l#^R$n#`Q!d[S#Uv$gQ#[yQ#f!XQ#u!bQ#|!gQ$U!qQ$]!{d$c#U#`$d$e$m$u%g%m%t&TQ$o#bQ$y#oQ%P#wQ%Q#yS%Y$U%[Q%d$_Q%e$bQ%q$rR%}%ZQzSQ!pbQ!|nQ%b$YR&Q%aQ#YvR%h$gR#g!XQ!_ZQ#e!WQ$x#mR&V%sW![Z!W#m%sQ!m_Q#j!ZQ#t!`Q$w#lR${#pVcOhwSgOwR!sh",nodeNames:"\u26A0 Unit ( Comment LineComment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName ) ArgList , PseudoClassName ArgList VariableName AtKeyword PropertyVariable ValueName ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral Escape Interpolation BinaryExpression BinOp LogicOp UnaryExpression UnaryQueryOp CallExpression ] SubscriptExpression [ CallLiteral CallTag ParenthesizedContent IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp InterpolatedSelector ; when } { Block ImportStatement import KeywordQuery FeatureQuery FeatureName BinaryQuery UnaryQuery ParenthesizedQuery SelectorQuery selector CallQuery ArgList SubscriptQuery MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports DetachedRuleSet PropertyName Declaration Important Inclusion IdSelector ClassSelector Inclusion CallExpression",maxTerm:133,nodeProps:[["isolate",-3,3,4,30,""],["openedBy",17,"(",59,"{"],["closedBy",26,")",60,"}"]],propSources:[d],skippedNodes:[0,3,4],repeatNodeCount:10,tokenData:"!2q~R!ZOX$tX^%l^p$tpq%lqr)Ors-xst/ltu6Zuv$tvw8^wx:Uxy;syz<Uz{<Z{|<t|}BQ}!OBc!O!PDo!P!QFY!Q![Jw![!]Kr!]!^Ln!^!_MP!_!`M{!`!aNl!a!b$t!b!c! m!c!}!&R!}#O!'y#O#P$t#P#Q!([#Q#R!(m#R#T$t#T#o!&R#o#p!)S#p#q!(m#q#r!)e#r#s!)v#s#y$t#y#z%l#z$f$t$f$g%l$g#BY$t#BY#BZ%l#BZ$IS$t$IS$I_%l$I_$I|$t$I|$JO%l$JO$JT$t$JT$JU%l$JU$KV$t$KV$KW%l$KW&FU$t&FU&FV%l&FV;'S$t;'S;=`!2k<%lO$t`$wSOy%Tz;'S%T;'S;=`%f<%lO%T`%YS|`Oy%Tz;'S%T;'S;=`%f<%lO%T`%iP;=`<%l%T~%qh#d~OX%TX^']^p%Tpq']qy%Tz#y%T#y#z']#z$f%T$f$g']$g#BY%T#BY#BZ']#BZ$IS%T$IS$I_']$I_$I|%T$I|$JO']$JO$JT%T$JT$JU']$JU$KV%T$KV$KW']$KW&FU%T&FU&FV']&FV;'S%T;'S;=`%f<%lO%T~'dh#d~|`OX%TX^']^p%Tpq']qy%Tz#y%T#y#z']#z$f%T$f$g']$g#BY%T#BY#BZ']#BZ$IS%T$IS$I_']$I_$I|%T$I|$JO']$JO$JT%T$JT$JU']$JU$KV%T$KV$KW']$KW&FU%T&FU&FV']&FV;'S%T;'S;=`%f<%lO%Tk)RUOy%Tz#]%T#]#^)e#^;'S%T;'S;=`%f<%lO%Tk)jU|`Oy%Tz#a%T#a#b)|#b;'S%T;'S;=`%f<%lO%Tk*RU|`Oy%Tz#d%T#d#e*e#e;'S%T;'S;=`%f<%lO%Tk*jU|`Oy%Tz#c%T#c#d*|#d;'S%T;'S;=`%f<%lO%Tk+RU|`Oy%Tz#f%T#f#g+e#g;'S%T;'S;=`%f<%lO%Tk+jU|`Oy%Tz#h%T#h#i+|#i;'S%T;'S;=`%f<%lO%Tk,RU|`Oy%Tz#T%T#T#U,e#U;'S%T;'S;=`%f<%lO%Tk,jU|`Oy%Tz#b%T#b#c,|#c;'S%T;'S;=`%f<%lO%Tk-RU|`Oy%Tz#h%T#h#i-e#i;'S%T;'S;=`%f<%lO%Tk-lS#PZ|`Oy%Tz;'S%T;'S;=`%f<%lO%T~-{WOY-xZr-xrs.es#O-x#O#P.j#P;'S-x;'S;=`/f<%lO-x~.jOn~~.mRO;'S-x;'S;=`.v;=`O-x~.yXOY-xZr-xrs.es#O-x#O#P.j#P;'S-x;'S;=`/f;=`<%l-x<%lO-x~/iP;=`<%l-xo/qY!OROy%Tz!Q%T!Q![0a![!c%T!c!i0a!i#T%T#T#Z0a#Z;'S%T;'S;=`%f<%lO%Tm0fY|`Oy%Tz!Q%T!Q![1U![!c%T!c!i1U!i#T%T#T#Z1U#Z;'S%T;'S;=`%f<%lO%Tm1ZY|`Oy%Tz!Q%T!Q![1y![!c%T!c!i1y!i#T%T#T#Z1y#Z;'S%T;'S;=`%f<%lO%Tm2QYl]|`Oy%Tz!Q%T!Q![2p![!c%T!c!i2p!i#T%T#T#Z2p#Z;'S%T;'S;=`%f<%lO%Tm2wYl]|`Oy%Tz!Q%T!Q![3g![!c%T!c!i3g!i#T%T#T#Z3g#Z;'S%T;'S;=`%f<%lO%Tm3lY|`Oy%Tz!Q%T!Q![4[![!c%T!c!i4[!i#T%T#T#Z4[#Z;'S%T;'S;=`%f<%lO%Tm4cYl]|`Oy%Tz!Q%T!Q![5R![!c%T!c!i5R!i#T%T#T#Z5R#Z;'S%T;'S;=`%f<%lO%Tm5WY|`Oy%Tz!Q%T!Q![5v![!c%T!c!i5v!i#T%T#T#Z5v#Z;'S%T;'S;=`%f<%lO%Tm5}Sl]|`Oy%Tz;'S%T;'S;=`%f<%lO%Tm6^YOy%Tz!_%T!_!`6|!`!c%T!c!}7a!}#T%T#T#o7a#o;'S%T;'S;=`%f<%lO%Td7TS!SS|`Oy%Tz;'S%T;'S;=`%f<%lO%Tm7h[h]|`Oy%Tz}%T}!O7a!O!Q%T!Q![7a![!c%T!c!}7a!}#T%T#T#o7a#o;'S%T;'S;=`%f<%lO%Ta8c[YPOy%Tz}%T}!O9X!O!Q%T!Q![9X![!c%T!c!}9X!}#T%T#T#o9X#o;'S%T;'S;=`%f<%lO%Ta9`[YP|`Oy%Tz}%T}!O9X!O!Q%T!Q![9X![!c%T!c!}9X!}#T%T#T#o9X#o;'S%T;'S;=`%f<%lO%T~:XWOY:UZw:Uwx.ex#O:U#O#P:q#P;'S:U;'S;=`;m<%lO:U~:tRO;'S:U;'S;=`:};=`O:U~;QXOY:UZw:Uwx.ex#O:U#O#P:q#P;'S:U;'S;=`;m;=`<%l:U<%lO:U~;pP;=`<%l:Uo;xSj_Oy%Tz;'S%T;'S;=`%f<%lO%T~<ZOa~m<bUVPrWOy%Tz!_%T!_!`6|!`;'S%T;'S;=`%f<%lO%To<{Y#pQrWOy%Tz!O%T!O!P=k!P!Q%T!Q![@p![#R%T#R#SAm#S;'S%T;'S;=`%f<%lO%Tm=pU|`Oy%Tz!Q%T!Q![>S![;'S%T;'S;=`%f<%lO%Tm>ZY#m]|`Oy%Tz!Q%T!Q![>S![!g%T!g!h>y!h#X%T#X#Y>y#Y;'S%T;'S;=`%f<%lO%Tm?OY|`Oy%Tz{%T{|?n|}%T}!O?n!O!Q%T!Q![@V![;'S%T;'S;=`%f<%lO%Tm?sU|`Oy%Tz!Q%T!Q![@V![;'S%T;'S;=`%f<%lO%Tm@^U#m]|`Oy%Tz!Q%T!Q![@V![;'S%T;'S;=`%f<%lO%Tm@w[#m]|`Oy%Tz!O%T!O!P>S!P!Q%T!Q![@p![!g%T!g!h>y!h#X%T#X#Y>y#Y;'S%T;'S;=`%f<%lO%TbAtS#xQ|`Oy%Tz;'S%T;'S;=`%f<%lO%TkBVScZOy%Tz;'S%T;'S;=`%f<%lO%TmBhXrWOy%Tz}%T}!OCT!O!P=k!P!Q%T!Q![@p![;'S%T;'S;=`%f<%lO%TmCYW|`Oy%Tz!c%T!c!}Cr!}#T%T#T#oCr#o;'S%T;'S;=`%f<%lO%TmCy[f]|`Oy%Tz}%T}!OCr!O!Q%T!Q![Cr![!c%T!c!}Cr!}#T%T#T#oCr#o;'S%T;'S;=`%f<%lO%ToDtW#iROy%Tz!O%T!O!PE^!P!Q%T!Q![>S![;'S%T;'S;=`%f<%lO%TlEcU|`Oy%Tz!O%T!O!PEu!P;'S%T;'S;=`%f<%lO%TlE|S#s[|`Oy%Tz;'S%T;'S;=`%f<%lO%T~F_VrWOy%Tz{Ft{!P%T!P!QIl!Q;'S%T;'S;=`%f<%lO%T~FyU|`OyFtyzG]z{Hd{;'SFt;'S;=`If<%lOFt~G`TOzG]z{Go{;'SG];'S;=`H^<%lOG]~GrVOzG]z{Go{!PG]!P!QHX!Q;'SG];'S;=`H^<%lOG]~H^OR~~HaP;=`<%lG]~HiW|`OyFtyzG]z{Hd{!PFt!P!QIR!Q;'SFt;'S;=`If<%lOFt~IYS|`R~Oy%Tz;'S%T;'S;=`%f<%lO%T~IiP;=`<%lFt~IsV|`S~OYIlYZ%TZyIlyzJYz;'SIl;'S;=`Jq<%lOIl~J_SS~OYJYZ;'SJY;'S;=`Jk<%lOJY~JnP;=`<%lJY~JtP;=`<%lIlmJ|[#m]Oy%Tz!O%T!O!P>S!P!Q%T!Q![@p![!g%T!g!h>y!h#X%T#X#Y>y#Y;'S%T;'S;=`%f<%lO%TkKwU^ZOy%Tz![%T![!]LZ!];'S%T;'S;=`%f<%lO%TcLbS_R|`Oy%Tz;'S%T;'S;=`%f<%lO%TkLsS!ZZOy%Tz;'S%T;'S;=`%f<%lO%ThMUUrWOy%Tz!_%T!_!`Mh!`;'S%T;'S;=`%f<%lO%ThMoS|`rWOy%Tz;'S%T;'S;=`%f<%lO%TlNSW!SSrWOy%Tz!^%T!^!_Mh!_!`%T!`!aMh!a;'S%T;'S;=`%f<%lO%TjNsV!UQrWOy%Tz!_%T!_!`Mh!`!a! Y!a;'S%T;'S;=`%f<%lO%Tb! aS!UQ|`Oy%Tz;'S%T;'S;=`%f<%lO%To! rYg]Oy%Tz!b%T!b!c!!b!c!}!#R!}#T%T#T#o!#R#o#p!$O#p;'S%T;'S;=`%f<%lO%Tm!!iWg]|`Oy%Tz!c%T!c!}!#R!}#T%T#T#o!#R#o;'S%T;'S;=`%f<%lO%Tm!#Y[g]|`Oy%Tz}%T}!O!#R!O!Q%T!Q![!#R![!c%T!c!}!#R!}#T%T#T#o!#R#o;'S%T;'S;=`%f<%lO%To!$TW|`Oy%Tz!c%T!c!}!$m!}#T%T#T#o!$m#o;'S%T;'S;=`%f<%lO%To!$r^|`Oy%Tz}%T}!O!$m!O!Q%T!Q![!$m![!c%T!c!}!$m!}#T%T#T#o!$m#o#q%T#q#r!%n#r;'S%T;'S;=`%f<%lO%To!%uSp_|`Oy%Tz;'S%T;'S;=`%f<%lO%To!&W[#h_Oy%Tz}%T}!O!&|!O!Q%T!Q![!&|![!c%T!c!}!&|!}#T%T#T#o!&|#o;'S%T;'S;=`%f<%lO%To!'T[#h_|`Oy%Tz}%T}!O!&|!O!Q%T!Q![!&|![!c%T!c!}!&|!}#T%T#T#o!&|#o;'S%T;'S;=`%f<%lO%Tk!(OSyZOy%Tz;'S%T;'S;=`%f<%lO%Tm!(aSw]Oy%Tz;'S%T;'S;=`%f<%lO%Td!(pUOy%Tz!_%T!_!`6|!`;'S%T;'S;=`%f<%lO%Tk!)XS!^ZOy%Tz;'S%T;'S;=`%f<%lO%Tk!)jS!]ZOy%Tz;'S%T;'S;=`%f<%lO%To!){Y#oQOr%Trs!*ksw%Twx!.wxy%Tz!_%T!_!`6|!`;'S%T;'S;=`%f<%lO%Tm!*pZ|`OY!*kYZ%TZr!*krs!+csy!*kyz!+vz#O!*k#O#P!-j#P;'S!*k;'S;=`!.q<%lO!*km!+jSo]|`Oy%Tz;'S%T;'S;=`%f<%lO%T]!+yWOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d<%lO!+v]!,hOo]]!,kRO;'S!+v;'S;=`!,t;=`O!+v]!,wXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!+v<%lO!+v]!-gP;=`<%l!+vm!-oU|`Oy!*kyz!+vz;'S!*k;'S;=`!.R;=`<%l!+v<%lO!*km!.UXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!*k<%lO!+vm!.tP;=`<%l!*km!.|Z|`OY!.wYZ%TZw!.wwx!+cxy!.wyz!/oz#O!.w#O#P!1^#P;'S!.w;'S;=`!2e<%lO!.w]!/rWOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W<%lO!/o]!0_RO;'S!/o;'S;=`!0h;=`O!/o]!0kXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!/o<%lO!/o]!1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[w,h,Z,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:T=>z[T]||-1},{term:23,get:T=>u[T]||-1}],tokenPrec:2180}),l=n.define({name:"less",parser:U.configure({props:[$.add({Declaration:X()}),i.add({Block:y})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"@-"}}),o=f(T=>T.name=="VariableName"||T.name=="AtKeyword");function g(){return new c(l,l.data.of({autocomplete:o}))}export{o as n,l as r,g as t};
import"./dist-DBwNzi3C.js";import{a,c as s,i as r,n,o as e,r as o,s as m,t as i}from"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";export{i as commonmarkLanguage,n as deleteMarkupBackward,o as insertNewlineContinueMarkup,r as insertNewlineContinueMarkupCommand,a as markdown,e as markdownKeymap,m as markdownLanguage,s as pasteURLAsLink};
import{Bt as he,Gt as T,It as de,Jt as H,K as nt,L as it,M as st,Nt as lt,Rt as ue,Ut as j,Vt as me,Wt as ge,Yt as pe,_t as Ae,at as O,ct as at,lt as z,ot as X,qt as G,rt as w}from"./dist-DBwNzi3C.js";var b=class rt{constructor(t,o,i,n){this.fromA=t,this.toA=o,this.fromB=i,this.toB=n}offset(t,o=t){return new rt(this.fromA+t,this.toA+t,this.fromB+o,this.toB+o)}};function E(e,t,o,i,n,r){if(e==i)return[];let s=te(e,t,o,i,n,r),l=re(e,t+s,o,i,n+s,r);t+=s,o-=l,n+=s,r-=l;let f=o-t,h=r-n;if(!f||!h)return[new b(t,o,n,r)];if(f>h){let c=e.slice(t,o).indexOf(i.slice(n,r));if(c>-1)return[new b(t,t+c,n,n),new b(t+c+h,o,r,r)]}else if(h>f){let c=i.slice(n,r).indexOf(e.slice(t,o));if(c>-1)return[new b(t,t,n,n+c),new b(o,o,n+c+f,r)]}if(f==1||h==1)return[new b(t,o,n,r)];let a=be(e,t,o,i,n,r);if(a){let[c,d,u]=a;return E(e,t,c,i,n,d).concat(E(e,c+u,o,i,d+u,r))}return ft(e,t,o,i,n,r)}var U=1e9,q=0,Z=!1;function ft(e,t,o,i,n,r){let s=o-t,l=r-n;if(U<1e9&&Math.min(s,l)>U*16||q>0&&Date.now()>q)return Math.min(s,l)>U*64?[new b(t,o,n,r)]:Ce(e,t,o,i,n,r);let f=Math.ceil((s+l)/2);_.reset(f),ee.reset(f);let h=(u,g)=>e.charCodeAt(t+u)==i.charCodeAt(n+g),a=(u,g)=>e.charCodeAt(o-u-1)==i.charCodeAt(r-g-1),c=(s-l)%2==0?null:ee,d=c?null:_;for(let u=0;u<f;u++){if(u>U||q>0&&!(u&63)&&Date.now()>q)return Ce(e,t,o,i,n,r);let g=_.advance(u,s,l,f,c,!1,h)||ee.advance(u,s,l,f,d,!0,a);if(g)return ct(e,t,o,t+g[0],i,n,r,n+g[1])}return[new b(t,o,n,r)]}var ve=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let t=0;t<this.len;t++)this.vec[t]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,t,o,i,n,r,s){for(let l=-e+this.start;l<=e-this.end;l+=2){let f=i+l,h=l==-e||l!=e&&this.vec[f-1]<this.vec[f+1]?this.vec[f+1]:this.vec[f-1]+1,a=h-l;for(;h<t&&a<o&&s(h,a);)h++,a++;if(this.vec[f]=h,h>t)this.end+=2;else if(a>o)this.start+=2;else if(n){let c=i+(t-o)-l;if(c>=0&&c<this.len&&n.vec[c]!=-1)if(r){let d=n.vec[c];if(d>=t-h)return[d,i+d-c]}else{let d=t-n.vec[c];if(h>=d)return[h,a]}}}return null}},_=new ve,ee=new ve;function ct(e,t,o,i,n,r,s,l){let f=!1;return!N(e,i)&&++i==o&&(f=!0),!N(n,l)&&++l==s&&(f=!0),f?[new b(t,o,r,s)]:E(e,t,i,n,r,l).concat(E(e,i,o,n,l,s))}function Be(e,t){let o=1,i=Math.min(e,t);for(;o<i;)o<<=1;return o}function te(e,t,o,i,n,r){if(t==o||t==r||e.charCodeAt(t)!=i.charCodeAt(n))return 0;let s=Be(o-t,r-n);for(let l=t,f=n;;){let h=l+s,a=f+s;if(h>o||a>r||e.slice(l,h)!=i.slice(f,a)){if(s==1)return l-t-(N(e,l)?0:1);s>>=1}else{if(h==o||a==r)return h-t;l=h,f=a}}}function re(e,t,o,i,n,r){if(t==o||n==r||e.charCodeAt(o-1)!=i.charCodeAt(r-1))return 0;let s=Be(o-t,r-n);for(let l=o,f=r;;){let h=l-s,a=f-s;if(h<t||a<n||e.slice(h,l)!=i.slice(a,f)){if(s==1)return o-l-(N(e,l)?0:1);s>>=1}else{if(h==t||a==n)return o-h;l=h,f=a}}}function oe(e,t,o,i,n,r,s,l){let f=i.slice(n,r),h=null;for(;;){if(h||s<l)return h;for(let a=t+s;;){N(e,a)||a++;let c=a+s;if(N(e,c)||(c+=c==a+1?1:-1),c>=o)break;let d=e.slice(a,c),u=-1;for(;(u=f.indexOf(d,u+1))!=-1;){let g=te(e,c,o,i,n+u+d.length,r),p=re(e,t,a,i,n,n+u),m=d.length+g+p;(!h||h[2]<m)&&(h=[a-p,n+u-p,m])}a=c}if(l<0)return h;s>>=1}}function be(e,t,o,i,n,r){let s=o-t,l=r-n;if(s<l){let f=be(i,n,r,e,t,o);return f&&[f[1],f[0],f[2]]}return s<4||l*2<s?null:oe(e,t,o,i,n,r,Math.floor(s/4),-1)}function Ce(e,t,o,i,n,r){Z=!0;let s=o-t,l=r-n,f;if(s<l){let d=oe(i,n,r,e,t,o,Math.floor(s/6),50);f=d&&[d[1],d[0],d[2]]}else f=oe(e,t,o,i,n,r,Math.floor(l/6),50);if(!f)return[new b(t,o,n,r)];let[h,a,c]=f;return E(e,t,h,i,n,a).concat(E(e,h+c,o,i,a+c,r))}function we(e,t){for(let o=1;o<e.length;o++){let i=e[o-1],n=e[o];i.toA>n.fromA-t&&i.toB>n.fromB-t&&(e[o-1]=new b(i.fromA,n.toA,i.fromB,n.toB),e.splice(o--,1))}}function ht(e,t,o){for(;;){we(o,1);let i=!1;for(let n=0;n<o.length;n++){let r=o[n],s,l;(s=te(e,r.fromA,r.toA,t,r.fromB,r.toB))&&(r=o[n]=new b(r.fromA+s,r.toA,r.fromB+s,r.toB)),(l=re(e,r.fromA,r.toA,t,r.fromB,r.toB))&&(r=o[n]=new b(r.fromA,r.toA-l,r.fromB,r.toB-l));let f=r.toA-r.fromA,h=r.toB-r.fromB;if(f&&h)continue;let a=r.fromA-(n?o[n-1].toA:0),c=(n<o.length-1?o[n+1].fromA:e.length)-r.toA;if(!a||!c)continue;let d=f?e.slice(r.fromA,r.toA):t.slice(r.fromB,r.toB);a<=d.length&&e.slice(r.fromA-a,r.fromA)==d.slice(d.length-a)?(o[n]=new b(r.fromA-a,r.toA-a,r.fromB-a,r.toB-a),i=!0):c<=d.length&&e.slice(r.toA,r.toA+c)==d.slice(0,c)&&(o[n]=new b(r.fromA+c,r.toA+c,r.fromB+c,r.toB+c),i=!0)}if(!i)break}return o}function dt(e,t,o){for(let i=0,n=0;n<e.length;n++){let r=e[n],s=r.toA-r.fromA,l=r.toB-r.fromB;if(s&&l||s>3||l>3){let f=n==e.length-1?t.length:e[n+1].fromA,h=r.fromA-i,a=f-r.toA,c=Le(t,r.fromA,h),d=Oe(t,r.toA,a),u=r.fromA-c,g=d-r.toA;if((!s||!l)&&u&&g){let p=Math.max(s,l),[m,A,D]=s?[t,r.fromA,r.toA]:[o,r.fromB,r.toB];p>u&&t.slice(c,r.fromA)==m.slice(D-u,D)?(r=e[n]=new b(c,c+s,r.fromB-u,r.toB-u),c=r.fromA,d=Oe(t,r.toA,f-r.toA)):p>g&&t.slice(r.toA,d)==m.slice(A,A+g)&&(r=e[n]=new b(d-s,d,r.fromB+g,r.toB+g),d=r.toA,c=Le(t,r.fromA,r.fromA-i)),u=r.fromA-c,g=d-r.toA}if(u||g)r=e[n]=new b(r.fromA-u,r.toA+g,r.fromB-u,r.toB+g);else if(s){if(!l){let p=ye(t,r.fromA,r.toA),m,A=p<0?-1:Ee(t,r.toA,r.fromA);p>-1&&(m=p-r.fromA)<=a&&t.slice(r.fromA,p)==t.slice(r.toA,r.toA+m)?r=e[n]=r.offset(m):A>-1&&(m=r.toA-A)<=h&&t.slice(r.fromA-m,r.fromA)==t.slice(A,r.toA)&&(r=e[n]=r.offset(-m))}}else{let p=ye(o,r.fromB,r.toB),m,A=p<0?-1:Ee(o,r.toB,r.fromB);p>-1&&(m=p-r.fromB)<=a&&o.slice(r.fromB,p)==o.slice(r.toB,r.toB+m)?r=e[n]=r.offset(m):A>-1&&(m=r.toB-A)<=h&&o.slice(r.fromB-m,r.fromB)==o.slice(A,r.toB)&&(r=e[n]=r.offset(-m))}}i=r.toA}return we(e,3),e}var y;try{y=RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function ke(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function xe(e,t){if(t==e.length)return 0;let o=e.charCodeAt(t);return o<192?ke(o)?1:0:y?!Se(o)||t==e.length-1?y.test(String.fromCharCode(o))?1:0:y.test(e.slice(t,t+2))?2:0:0}function Me(e,t){if(!t)return 0;let o=e.charCodeAt(t-1);return o<192?ke(o)?1:0:y?!Te(o)||t==1?y.test(String.fromCharCode(o))?1:0:y.test(e.slice(t-2,t))?2:0:0}var De=8;function Oe(e,t,o){if(t==e.length||!Me(e,t))return t;for(let i=t,n=t+o,r=0;r<De;r++){let s=xe(e,i);if(!s||i+s>n)return i;i+=s}return t}function Le(e,t,o){if(!t||!xe(e,t))return t;for(let i=t,n=t-o,r=0;r<De;r++){let s=Me(e,i);if(!s||i-s<n)return i;i-=s}return t}function Ee(e,t,o){for(;t!=o;t--)if(e.charCodeAt(t-1)==10)return t;return-1}function ye(e,t,o){for(;t!=o;t++)if(e.charCodeAt(t)==10)return t;return-1}var Se=e=>e>=55296&&e<=56319,Te=e=>e>=56320&&e<=57343;function N(e,t){return!t||t==e.length||!Se(e.charCodeAt(t-1))||!Te(e.charCodeAt(t))}function ut(e,t,o){return U=((o==null?void 0:o.scanLimit)??1e9)>>1,q=o!=null&&o.timeout?Date.now()+o.timeout:0,Z=!1,ht(e,t,E(e,0,e.length,t,0,t.length))}function Ge(){return!Z}function Ne(e,t,o){return dt(ut(e,t,o),e,t)}var k=me.define({combine:e=>e[0]}),ne=G.define(),Re=me.define(),M=H.define({create(e){return null},update(e,t){for(let o of t.effects)o.is(ne)&&(e=o.value);for(let o of t.state.facet(Re))e=o(e,t);return e}}),S=class ot{constructor(t,o,i,n,r,s=!0){this.changes=t,this.fromA=o,this.toA=i,this.fromB=n,this.toB=r,this.precise=s}offset(t,o){return t||o?new ot(this.changes,this.fromA+t,this.toA+t,this.fromB+o,this.toB+o,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(t,o,i){return Ue(Ne(t.toString(),o.toString(),i),t,o,0,0,Ge())}static updateA(t,o,i,n,r){return je(Ie(t,n,!0,i.length),t,o,i,r)}static updateB(t,o,i,n,r){return je(Ie(t,n,!1,o.length),t,o,i,r)}};function Ve(e,t,o,i){let n=o.lineAt(e),r=i.lineAt(t);return n.to==e&&r.to==t&&e<o.length&&t<i.length?[e+1,t+1]:[n.from,r.from]}function He(e,t,o,i){let n=o.lineAt(e),r=i.lineAt(t);return n.from==e&&r.from==t?[e,t]:[n.to+1,r.to+1]}function Ue(e,t,o,i,n,r){let s=[];for(let l=0;l<e.length;l++){let f=e[l],[h,a]=Ve(f.fromA+i,f.fromB+n,t,o),[c,d]=He(f.toA+i,f.toB+n,t,o),u=[f.offset(-h+i,-a+n)];for(;l<e.length-1;){let g=e[l+1],[p,m]=Ve(g.fromA+i,g.fromB+n,t,o);if(p>c+1&&m>d+1)break;u.push(g.offset(-h+i,-a+n)),[c,d]=He(g.toA+i,g.toB+n,t,o),l++}s.push(new S(u,h,Math.max(h,c),a,Math.max(a,d),r))}return s}var W=1e3;function qe(e,t,o,i){let n=0,r=e.length;for(;;){if(n==r){let a=0,c=0;n&&({toA:a,toB:c}=e[n-1]);let d=t-(o?a:c);return[a+d,c+d]}let s=n+r>>1,l=e[s],[f,h]=o?[l.fromA,l.toA]:[l.fromB,l.toB];if(f>t)r=s;else if(h<=t)n=s+1;else return i?[l.fromA,l.fromB]:[l.toA,l.toB]}}function Ie(e,t,o,i){let n=[];return t.iterChangedRanges((r,s,l,f)=>{let h=0,a=o?t.length:i,c=0,d=o?i:t.length;r>W&&([h,c]=qe(e,r-W,o,!0)),s<t.length-W&&([a,d]=qe(e,s+W,o,!1));let u=f-l-(s-r),g,[p,m]=o?[u,0]:[0,u];n.length&&(g=n[n.length-1]).toA>=h?n[n.length-1]={fromA:g.fromA,fromB:g.fromB,toA:a,toB:d,diffA:g.diffA+p,diffB:g.diffB+m}:n.push({fromA:h,toA:a,fromB:c,toB:d,diffA:p,diffB:m})}),n}function je(e,t,o,i,n){if(!e.length)return t;let r=[];for(let s=0,l=0,f=0,h=0;;s++){let a=s==e.length?null:e[s],c=a?a.fromA+l:o.length,d=a?a.fromB+f:i.length;for(;h<t.length;){let m=t[h];if(Math.min(o.length,m.toA+l)>c||Math.min(i.length,m.toB+f)>d)break;r.push(m.offset(l,f)),h++}if(!a)break;let u=a.toA+l+a.diffA,g=a.toB+f+a.diffB,p=Ne(o.sliceString(c,u),i.sliceString(d,g),n);for(let m of Ue(p,o,i,c,d,Ge()))r.push(m);for(l+=a.diffA,f+=a.diffB;h<t.length;){let m=t[h];if(m.fromA+l>u&&m.fromB+f>g)break;h++}}return r}var ze={scanLimit:500},Y=at.fromClass(class{constructor(e){({deco:this.deco,gutter:this.gutter}=Je(e))}update(e){(e.docChanged||e.viewportChanged||mt(e.startState,e.state)||gt(e.startState,e.state))&&({deco:this.deco,gutter:this.gutter}=Je(e.view))}},{decorations:e=>e.deco}),F=j.low(Ae({class:"cm-changeGutter",markers:e=>{var t;return((t=e.plugin(Y))==null?void 0:t.gutter)||ge.empty}}));function mt(e,t){return e.field(M,!1)!=t.field(M,!1)}function gt(e,t){return e.facet(k)!=t.facet(k)}var We=w.line({class:"cm-changedLine"}),Ye=w.mark({class:"cm-changedText"}),pt=w.mark({tagName:"ins",class:"cm-insertedLine"}),At=w.mark({tagName:"del",class:"cm-deletedLine"}),Fe=new class extends X{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function vt(e,t,o,i,n,r){let s=o?e.fromA:e.fromB,l=o?e.toA:e.toB,f=0;if(s!=l){n.add(s,s,We),n.add(s,l,o?At:pt),r&&r.add(s,s,Fe);for(let h=t.iterRange(s,l-1),a=s;!h.next().done;){if(h.lineBreak){a++,n.add(a,a,We),r&&r.add(a,a,Fe);continue}let c=a+h.value.length;if(i)for(;f<e.changes.length;){let d=e.changes[f],u=s+(o?d.fromA:d.fromB),g=s+(o?d.toA:d.toB),p=Math.max(a,u),m=Math.min(c,g);if(p<m&&n.add(p,m,Ye),g<c)f++;else break}a=c}}}function Je(e){let t=e.state.field(M),{side:o,highlightChanges:i,markGutter:n,overrideChunk:r}=e.state.facet(k),s=o=="a",l=new T,f=n?new T:null,{from:h,to:a}=e.viewport;for(let c of t){if((s?c.fromA:c.fromB)>=a)break;(s?c.toA:c.toB)>h&&(!r||!r(e.state,c,l,f))&&vt(c,e.state.doc,s,i,l,f)}return{deco:l.finish(),gutter:f&&f.finish()}}var J=class extends z{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},K=G.define({map:(e,t)=>e.map(t)}),I=H.define({create:()=>w.none,update:(e,t)=>{for(let o of t.effects)if(o.is(K))return o.value;return e.map(t.changes)},provide:e=>O.decorations.from(e)}),P=.01;function Ke(e,t){if(e.size!=t.size)return!1;let o=e.iter(),i=t.iter();for(;o.value;){if(o.from!=i.from||Math.abs(o.value.spec.widget.height-i.value.spec.widget.height)>1)return!1;o.next(),i.next()}return!0}function Bt(e,t,o){let i=new T,n=new T,r=e.state.field(I).iter(),s=t.state.field(I).iter(),l=0,f=0,h=0,a=0,c=e.viewport,d=t.viewport;for(let m=0;;m++){let A=m<o.length?o[m]:null,D=A?A.fromA:e.state.doc.length,C=A?A.fromB:t.state.doc.length;if(l<D){let v=e.lineBlockAt(l).top+h-(t.lineBlockAt(f).top+a);v<-P?(h-=v,i.add(l,l,w.widget({widget:new J(-v),block:!0,side:-1}))):v>P&&(a+=v,n.add(f,f,w.widget({widget:new J(v),block:!0,side:-1})))}if(D>l+1e3&&l<c.from&&D>c.from&&f<d.from&&C>d.from){let v=Math.min(c.from-l,d.from-f);l+=v,f+=v,m--}else if(A)l=A.toA,f=A.toB;else break;for(;r.value&&r.from<l;)h-=r.value.spec.widget.height,r.next();for(;s.value&&s.from<f;)a-=s.value.spec.widget.height,s.next()}for(;r.value;)h-=r.value.spec.widget.height,r.next();for(;s.value;)a-=s.value.spec.widget.height,s.next();let u=e.contentHeight+h-(t.contentHeight+a);u<P?i.add(e.state.doc.length,e.state.doc.length,w.widget({widget:new J(-u),block:!0,side:1})):u>P&&n.add(t.state.doc.length,t.state.doc.length,w.widget({widget:new J(u),block:!0,side:1}));let g=i.finish(),p=n.finish();Ke(g,e.state.field(I))||e.dispatch({effects:K.of(g)}),Ke(p,t.state.field(I))||t.dispatch({effects:K.of(p)})}var ie=G.define({map:(e,t)=>t.mapPos(e)}),bt=class extends z{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let t=document.createElement("div");return t.className="cm-collapsedLines",t.textContent=e.state.phrase("$ unchanged lines",this.lines),t.addEventListener("click",o=>{let i=e.posAtDOM(o.target);e.dispatch({effects:ie.of(i)});let{side:n,sibling:r}=e.state.facet(k);r&&r().dispatch({effects:ie.of(Ct(i,e.state.field(M),n=="a"))})}),t}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}};function Ct(e,t,o){let i=0,n=0;for(let r=0;;r++){let s=r<t.length?t[r]:null;if(!s||(o?s.fromA:s.fromB)>=e)return n+(e-i);[i,n]=o?[s.toA,s.toB]:[s.toB,s.toA]}}var wt=H.define({create(e){return w.none},update(e,t){e=e.map(t.changes);for(let o of t.effects)o.is(ie)&&(e=e.update({filter:i=>i!=o.value}));return e},provide:e=>O.decorations.from(e)});function se({margin:e=3,minSize:t=4}){return wt.init(o=>kt(o,e,t))}function kt(e,t,o){let i=new T,n=e.facet(k).side=="a",r=e.field(M),s=1;for(let l=0;;l++){let f=l<r.length?r[l]:null,h=l?s+t:1,a=f?e.doc.lineAt(n?f.fromA:f.fromB).number-1-t:e.doc.lines,c=a-h+1;if(c>=o&&i.add(e.doc.line(h).from,e.doc.line(a).to,w.replace({widget:new bt(c),block:!0})),!f)break;s=e.doc.lineAt(Math.min(e.doc.length,n?f.toA:f.toB)).number}return i.finish()}var xt=O.styleModule.of(new lt({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),Pe=O.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"\u299A"',marginInlineEnd:"7px"},"&:after":{content:'"\u299A"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),$e=new ue,$=new ue,Mt=class{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||ze;let t=[j.low(Y),Pe,xt,I,O.updateListener.of(a=>{this.measuring<0&&(a.heightChanged||a.viewportChanged)&&!a.transactions.some(c=>c.effects.some(d=>d.is(K)))&&this.measure()})],o=[k.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&o.push(F);let i=he.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],O.editorAttributes.of({class:"cm-merge-a"}),$.of(o),t]}),n=[k.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&n.push(F);let r=he.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],O.editorAttributes.of({class:"cm-merge-b"}),$.of(n),t]});this.chunks=S.build(i.doc,r.doc,this.diffConf);let s=[M.init(()=>this.chunks),$e.of(e.collapseUnchanged?se(e.collapseUnchanged):[])];i=i.update({effects:G.appendConfig.of(s)}).state,r=r.update({effects:G.appendConfig.of(s)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let l=e.orientation||"a-b",f=document.createElement("div");f.className="cm-mergeViewEditor";let h=document.createElement("div");h.className="cm-mergeViewEditor",this.editorDOM.appendChild(l=="a-b"?f:h),this.editorDOM.appendChild(l=="a-b"?h:f),this.a=new O({state:i,parent:f,root:e.root,dispatchTransactions:a=>this.dispatch(a,this.a)}),this.b=new O({state:r,parent:h,root:e.root,dispatchTransactions:a=>this.dispatch(a,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,t){if(e.some(o=>o.docChanged)){let o=e[e.length-1],i=e.reduce((r,s)=>r.compose(s.changes),de.empty(e[0].startState.doc.length));this.chunks=t==this.a?S.updateA(this.chunks,o.newDoc,this.b.state.doc,i,this.diffConf):S.updateB(this.chunks,this.a.state.doc,o.newDoc,i,this.diffConf),t.update([...e,o.state.update({effects:ne.of(this.chunks)})]);let n=t==this.a?this.b:this.a;n.update([n.state.update({effects:ne.of(this.chunks)})]),this.scheduleMeasure()}else t.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let n=e.orientation!="b-a";if(n!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let r=this.a.dom.parentNode,s=this.b.dom.parentNode;r.remove(),s.remove(),this.editorDOM.insertBefore(n?r:s,this.editorDOM.firstChild),this.editorDOM.appendChild(n?s:r),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let n=!!this.revertDOM,r=this.revertToA,s=this.renderRevert;"revertControls"in e&&(n=!!e.revertControls,r=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(s=e.renderRevertControl),this.setupRevertControls(n,r,s)}let t="highlightChanges"in e,o="gutter"in e,i="collapseUnchanged"in e;if(t||o||i){let n=[],r=[];if(t||o){let s=this.a.state.facet(k),l=o?e.gutter!==!1:s.markGutter,f=t?e.highlightChanges!==!1:s.highlightChanges;n.push($.reconfigure([k.of({side:"a",sibling:()=>this.b,highlightChanges:f,markGutter:l}),l?F:[]])),r.push($.reconfigure([k.of({side:"b",sibling:()=>this.a,highlightChanges:f,markGutter:l}),l?F:[]]))}if(i){let s=$e.reconfigure(e.collapseUnchanged?se(e.collapseUnchanged):[]);n.push(s),r.push(s)}this.a.dispatch({effects:n}),this.b.dispatch({effects:r})}this.scheduleMeasure()}setupRevertControls(e,t,o){this.revertToA=t,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=o,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){this.measuring<0&&(this.measuring=(this.dom.ownerDocument.defaultView||window).requestAnimationFrame(()=>{this.measuring=-1,this.measure()}))}measure(){Bt(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,t=e.firstChild,o=this.a.viewport,i=this.b.viewport;for(let n=0;n<this.chunks.length;n++){let r=this.chunks[n];if(r.fromA>o.to||r.fromB>i.to)break;if(r.fromA<o.from||r.fromB<i.from)continue;let s=this.a.lineBlockAt(r.fromA).top+"px";for(;t&&+t.dataset.chunk<n;)t=Qe(t);t&&t.dataset.chunk==String(n)?(t.style.top!=s&&(t.style.top=s),t=t.nextSibling):e.insertBefore(this.renderRevertButton(s,n),t)}for(;t;)t=Qe(t)}renderRevertButton(e,t){let o;if(this.renderRevert)o=this.renderRevert();else{o=document.createElement("button");let i=this.a.state.phrase("Revert this chunk");o.setAttribute("aria-label",i),o.setAttribute("title",i),o.textContent=this.revertToLeft?"\u21DC":"\u21DD"}return o.style.top=e,o.setAttribute("data-chunk",String(t)),o}revertClicked(e){let t=e.target,o;for(;t&&t.parentNode!=this.revertDOM;)t=t.parentNode;if(t&&(o=this.chunks[t.dataset.chunk])){let[i,n,r,s,l,f]=this.revertToA?[this.b,this.a,o.fromB,o.toB,o.fromA,o.toA]:[this.a,this.b,o.fromA,o.toA,o.fromB,o.toB],h=i.state.sliceDoc(r,Math.max(r,s-1));r!=s&&f<=n.state.doc.length&&(h+=i.state.lineBreak),n.dispatch({changes:{from:l,to:Math.min(n.state.doc.length,f),insert:h},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function Qe(e){let t=e.nextSibling;return e.remove(),t}var Dt=new class extends X{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Ot=j.low(Ae({class:"cm-changeGutter",markers:e=>{var t;return((t=e.plugin(Y))==null?void 0:t.gutter)||ge.empty},widgetMarker:(e,t)=>t instanceof Ze?Dt:null}));function Lt(e){let t=typeof e.original=="string"?pe.of(e.original.split(/\r?\n/)):e.original,o=e.diffConfig||ze;return[j.low(Y),Tt,Pe,O.editorAttributes.of({class:"cm-merge-b"}),Re.of((i,n)=>{let r=n.effects.find(s=>s.is(le));return r&&(i=S.updateA(i,r.value.doc,n.startState.doc,r.value.changes,o)),n.docChanged&&(i=S.updateB(i,n.state.field(R),n.newDoc,n.changes,o)),i}),k.of({highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1,syntaxHighlightDeletions:e.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:e.mergeControls??!0,overrideChunk:e.allowInlineDiffs?Vt:void 0,side:"b"}),R.init(()=>t),e.gutter===!1?[]:Ot,e.collapseUnchanged?se(e.collapseUnchanged):[],M.init(i=>S.build(t,i.doc,o))]}var le=G.define(),R=H.define({create:()=>pe.empty,update(e,t){for(let o of t.effects)o.is(le)&&(e=o.value.doc);return e}}),Xe=new WeakMap,Ze=class extends z{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}};function Et(e,t,o){let i=Xe.get(t.changes);if(i)return i;let n=w.widget({block:!0,side:-1,widget:new Ze(r=>{let{highlightChanges:s,syntaxHighlightDeletions:l,syntaxHighlightDeletionsMaxLength:f,mergeControls:h}=e.facet(k),a=document.createElement("div");if(a.className="cm-deletedChunk",h){let C=a.appendChild(document.createElement("div"));C.className="cm-chunkButtons";let v=B=>{B.preventDefault(),yt(r,r.posAtDOM(a))},L=B=>{B.preventDefault(),St(r,r.posAtDOM(a))};if(typeof h=="function")C.appendChild(h("accept",v)),C.appendChild(h("reject",L));else{let B=C.appendChild(document.createElement("button"));B.name="accept",B.textContent=e.phrase("Accept"),B.onmousedown=v;let x=C.appendChild(document.createElement("button"));x.name="reject",x.textContent=e.phrase("Reject"),x.onmousedown=L}}if(o||t.fromA>=t.toA)return a;let c=r.state.field(R).sliceString(t.fromA,t.endA),d=l&&e.facet(it),u=A(),g=t.changes,p=0,m=!1;function A(){let C=a.appendChild(document.createElement("div"));return C.className="cm-deletedLine",C.appendChild(document.createElement("del"))}function D(C,v,L){for(let B=C;B<v;){if(c.charAt(B)==`
`){u.firstChild||u.appendChild(document.createElement("br")),u=A(),B++;continue}let x=v,ae=L+(m?" cm-deletedText":""),fe=!1,Q=c.indexOf(`
`,B);if(Q>-1&&Q<v&&(x=Q),s&&p<g.length){let V=Math.max(0,m?g[p].toA:g[p].fromA);V<=x&&(x=V,m&&p++,fe=!0)}if(x>B){let V=document.createTextNode(c.slice(B,x));if(ae){let ce=u.appendChild(document.createElement("span"));ce.className=ae,ce.appendChild(V)}else u.appendChild(V);B=x}fe&&(m=!m)}}if(d&&t.toA-t.fromA<=f){let C=d.parser.parse(c),v=0;nt(C,{style:L=>st(e,L)},(L,B,x)=>{L>v&&D(v,L,""),D(L,B,x),v=B}),D(v,c.length,"")}else D(0,c.length,"");return u.firstChild||u.appendChild(document.createElement("br")),a})});return Xe.set(t.changes,n),n}function yt(e,t){let{state:o}=e,i=t??o.selection.main.head,n=e.state.field(M).find(f=>f.fromB<=i&&f.endB>=i);if(!n)return!1;let r=e.state.sliceDoc(n.fromB,Math.max(n.fromB,n.toB-1)),s=e.state.field(R);n.fromB!=n.toB&&n.toA<=s.length&&(r+=e.state.lineBreak);let l=de.of({from:n.fromA,to:Math.min(s.length,n.toA),insert:r},s.length);return e.dispatch({effects:le.of({doc:l.apply(s),changes:l}),userEvent:"accept"}),!0}function St(e,t){let{state:o}=e,i=t??o.selection.main.head,n=o.field(M).find(s=>s.fromB<=i&&s.endB>=i);if(!n)return!1;let r=o.field(R).sliceString(n.fromA,Math.max(n.fromA,n.toA-1));return n.fromA!=n.toA&&n.toB<=o.doc.length&&(r+=o.lineBreak),e.dispatch({changes:{from:n.fromB,to:Math.min(o.doc.length,n.toB),insert:r},userEvent:"revert"}),!0}function _e(e){let t=new T;for(let o of e.field(M)){let i=e.facet(k).overrideChunk&&tt(e,o);t.add(o.fromB,o.fromB,Et(e,o,!!i))}return t.finish()}var Tt=H.define({create:e=>_e(e),update(e,t){return t.state.field(M,!1)==t.startState.field(M,!1)?e:_e(t.state)},provide:e=>O.decorations.from(e)}),et=new WeakMap;function tt(e,t){let o=et.get(t);if(o!==void 0)return o;o=null;let i=e.field(R),n=e.doc,r=i.lineAt(t.endA).number-i.lineAt(t.fromA).number+1,s=n.lineAt(t.endB).number-n.lineAt(t.fromB).number+1;e:if(r==s&&r<10){let l=[],f=0,h=t.fromA,a=t.fromB;for(let c of t.changes){if(c.fromA<c.toA){f+=c.toA-c.fromA;let d=i.sliceString(h+c.fromA,h+c.toA);if(/\n/.test(d))break e;l.push(w.widget({widget:new Gt(d),side:-1}).range(a+c.fromB))}c.fromB<c.toB&&l.push(Ye.range(a+c.fromB,a+c.toB))}f<t.endA-t.fromA-r*2&&(o=l)}return et.set(t,o),o}var Gt=class extends z{constructor(e){super(),this.text=e}eq(e){return this.text==e.text}toDOM(e){let t=document.createElement("del");return t.className="cm-deletedText",t.textContent=this.text,t}},Nt=new class extends X{constructor(){super(...arguments),this.elementClass="cm-inlineChangedLineGutter"}},Rt=w.line({class:"cm-inlineChangedLine"});function Vt(e,t,o,i){let n=tt(e,t),r=0;if(!n)return!1;for(let s=e.doc.lineAt(t.fromB);;){for(i&&i.add(s.from,s.from,Nt),o.add(s.from,s.from,Rt);r<n.length&&n[r].to<=s.to;){let l=n[r++];o.add(l.from,l.to,l.value)}if(s.to>=t.endB)break;s=e.doc.lineAt(s.to+1)}return!0}export{Lt as n,Mt as t};
import"./dist-DBwNzi3C.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import{i as a,n as r,r as o,t as i}from"./dist-CLc5WXWw.js";export{i as closePercentBrace,r as jinja,o as jinjaCompletionSource,a as jinjaLanguage};
import{$ as x,D as q,H as j,J as r,N as G,T as R,Y as E,g as T,i as U,n as c,q as Z,r as C,s as V,u as _}from"./dist-DBwNzi3C.js";var W=122,g=1,F=123,N=124,$=2,I=125,D=3,B=4,y=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],K=58,J=40,P=95,A=91,p=45,L=46,H=35,M=37,ee=38,Oe=92,ae=10,te=42;function d(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function m(e){return e>=48&&e<=57}function b(e){return m(e)||e>=97&&e<=102||e>=65&&e<=70}var f=(e,t,l)=>(O,a)=>{for(let o=!1,i=0,Q=0;;Q++){let{next:n}=O;if(d(n)||n==p||n==P||o&&m(n))!o&&(n!=p||Q>0)&&(o=!0),i===Q&&n==p&&i++,O.advance();else if(n==Oe&&O.peek(1)!=ae){if(O.advance(),b(O.next)){do O.advance();while(b(O.next));O.next==32&&O.advance()}else O.next>-1&&O.advance();o=!0}else{o&&O.acceptToken(i==2&&a.canShift($)?t:n==J?l:e);break}}},re=new c(f(F,$,N)),le=new c(f(I,D,B)),oe=new c(e=>{if(y.includes(e.peek(-1))){let{next:t}=e;(d(t)||t==P||t==H||t==L||t==te||t==A||t==K&&d(e.peek(1))||t==p||t==ee)&&e.acceptToken(W)}}),ie=new c(e=>{if(!y.includes(e.peek(-1))){let{next:t}=e;if(t==M&&(e.advance(),e.acceptToken(g)),d(t)){do e.advance();while(d(e.next)||m(e.next));e.acceptToken(g)}}}),Qe=Z({"AtKeyword import charset namespace keyframes media supports":r.definitionKeyword,"from to selector":r.keyword,NamespaceName:r.namespace,KeyframeName:r.labelName,KeyframeRangeName:r.operatorKeyword,TagName:r.tagName,ClassName:r.className,PseudoClassName:r.constant(r.className),IdName:r.labelName,"FeatureName PropertyName":r.propertyName,AttributeName:r.attributeName,NumberLiteral:r.number,KeywordQuery:r.keyword,UnaryQueryOp:r.operatorKeyword,"CallTag ValueName":r.atom,VariableName:r.variableName,Callee:r.operatorKeyword,Unit:r.unit,"UniversalSelector NestingSelector":r.definitionOperator,"MatchOp CompareOp":r.compareOperator,"ChildOp SiblingOp, LogicOp":r.logicOperator,BinOp:r.arithmeticOperator,Important:r.modifier,Comment:r.blockComment,ColorLiteral:r.color,"ParenthesizedContent StringLiteral":r.string,":":r.punctuation,"PseudoOp #":r.derefOperator,"; ,":r.separator,"( )":r.paren,"[ ]":r.squareBracket,"{ }":r.brace}),ne={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},se={__proto__:null,or:98,and:98,not:106,only:106,layer:170},de={__proto__:null,selector:112,layer:166},ce={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},pe={__proto__:null,to:207},me=C.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"\u26A0 Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[Qe],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[oe,ie,re,le,1,2,3,4,new U("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:e=>ne[e]||-1},{term:125,get:e=>se[e]||-1},{term:4,get:e=>de[e]||-1},{term:25,get:e=>ce[e]||-1},{term:123,get:e=>pe[e]||-1}],tokenPrec:1963}),u=null;function S(){if(!u&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],l=new Set;for(let O in e)O!="cssText"&&O!="cssFloat"&&typeof e[O]=="string"&&(/[A-Z]/.test(O)&&(O=O.replace(/[A-Z]/g,a=>"-"+a.toLowerCase())),l.has(O)||(t.push(O),l.add(O)));u=t.sort().map(O=>({type:"property",label:O,apply:O+": "}))}return u||[]}var X="active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where".split(".").map(e=>({type:"class",label:e})),k="above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small".split(".").map(e=>({type:"keyword",label:e})).concat("aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen".split(".").map(e=>({type:"constant",label:e}))),ue="a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul".split(".").map(e=>({type:"type",label:e})),Se=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),s=/^(\w[\w-]*|-\w[\w-]*|)$/,he=/^-(-[\w-]*)?$/;function ge(e,t){var O;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let l=(O=e.parent)==null?void 0:O.firstChild;return(l==null?void 0:l.name)=="Callee"?t.sliceString(l.from,l.to)=="var":!1}var z=new x,$e=["Declaration"];function ye(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function v(e,t,l){if(t.to-t.from>4096){let O=z.get(t);if(O)return O;let a=[],o=new Set,i=t.cursor(E.IncludeAnonymous);if(i.firstChild())do for(let Q of v(e,i.node,l))o.has(Q.label)||(o.add(Q.label),a.push(Q));while(i.nextSibling());return z.set(t,a),a}else{let O=[],a=new Set;return t.cursor().iterate(o=>{var i;if(l(o)&&o.matchContext($e)&&((i=o.node.nextSibling)==null?void 0:i.name)==":"){let Q=e.sliceString(o.from,o.to);a.has(Q)||(a.add(Q),O.push({label:Q,type:"variable"}))}}),O}}var w=e=>t=>{let{state:l,pos:O}=t,a=j(l).resolveInner(O,-1),o=a.type.isError&&a.from==a.to-1&&l.doc.sliceString(a.from,a.to)=="-";if(a.name=="PropertyName"||(o||a.name=="TagName")&&/^(Block|Styles)$/.test(a.resolve(a.to).name))return{from:a.from,options:S(),validFor:s};if(a.name=="ValueName")return{from:a.from,options:k,validFor:s};if(a.name=="PseudoClassName")return{from:a.from,options:X,validFor:s};if(e(a)||(t.explicit||o)&&ge(a,l.doc))return{from:e(a)||o?a.from:O,options:v(l.doc,ye(a),e),validFor:he};if(a.name=="TagName"){for(let{parent:n}=a;n;n=n.parent)if(n.name=="Block")return{from:a.from,options:S(),validFor:s};return{from:a.from,options:ue,validFor:s}}if(a.name=="AtKeyword")return{from:a.from,options:Se,validFor:s};if(!t.explicit)return null;let i=a.resolve(O),Q=i.childBefore(O);return Q&&Q.name==":"&&i.name=="PseudoClassSelector"?{from:O,options:X,validFor:s}:Q&&Q.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:O,options:k,validFor:s}:i.name=="Block"||i.name=="Styles"?{from:O,options:S(),validFor:s}:null},Y=w(e=>e.name=="VariableName"),h=V.define({name:"css",parser:me.configure({props:[G.add({Declaration:T()}),q.add({"Block KeyframeList":R})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Pe(){return new _(h,h.data.of({autocomplete:Y}))}export{w as i,Y as n,h as r,Pe as t};
import{D as f,J as e,N as Y,T as _,g as W,n as r,q as x,r as g,s as V,t as E,u as N}from"./dist-DBwNzi3C.js";import{i as C}from"./dist-Dcqqg9UU.js";var h=168,P=169,I=170,D=1,F=2,w=3,K=171,L=172,z=4,T=173,A=5,B=174,Z=175,G=176,s=177,q=6,U=7,H=8,J=9,c=0,i=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],M=58,OO=40,m=95,$O=91,S=45,eO=46,p=35,QO=37,k=123,tO=125,l=47,d=42,n=10,j=61,aO=43,nO=38;function o(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function u(O){return O>=48&&O<=57}function y(O){let $;return O.next==l&&(($=O.peek(1))==l||$==d)}var RO=new r((O,$)=>{if($.dialectEnabled(c)){let Q;if(O.next<0&&$.canShift(G))O.acceptToken(G);else if(((Q=O.peek(-1))==n||Q<0)&&$.canShift(Z)){let t=0;for(;O.next!=n&&i.includes(O.next);)O.advance(),t++;O.next==n||y(O)?O.acceptToken(Z,-t):t&&O.acceptToken(s)}else if(O.next==n)O.acceptToken(B,1);else if(i.includes(O.next)){for(O.advance();O.next!=n&&i.includes(O.next);)O.advance();O.acceptToken(s)}}else{let Q=0;for(;i.includes(O.next);)O.advance(),Q++;Q&&O.acceptToken(s)}},{contextual:!0}),iO=new r((O,$)=>{if(y(O)){if(O.advance(),$.dialectEnabled(c)){let Q=-1;for(let t=1;;t++){let R=O.peek(-t-1);if(R==n||R<0){Q=t+1;break}else if(!i.includes(R))break}if(Q>-1){let t=O.next==d,R=0;for(O.advance();O.next>=0;)if(O.next==n){O.advance();let a=0;for(;O.next!=n&&i.includes(O.next);)a++,O.advance();if(a<Q){R=-a-1;break}}else if(t&&O.next==d&&O.peek(1)==l){R=2;break}else O.advance();O.acceptToken(t?U:q,R);return}}if(O.next==l){for(;O.next!=n&&O.next>=0;)O.advance();O.acceptToken(q)}else{for(O.advance();O.next>=0;){let{next:Q}=O;if(O.advance(),Q==d&&O.next==l){O.advance();break}}O.acceptToken(U)}}}),rO=new r((O,$)=>{(O.next==aO||O.next==j)&&$.dialectEnabled(c)&&O.acceptToken(O.next==j?H:J,1)}),oO=new r((O,$)=>{if(!$.dialectEnabled(c))return;let Q=$.context.depth;if(O.next<0&&Q){O.acceptToken(P);return}if(O.peek(-1)==n){let t=0;for(;O.next!=n&&i.includes(O.next);)O.advance(),t++;t!=Q&&O.next!=n&&!y(O)&&(t<Q?O.acceptToken(P,-t):O.acceptToken(h))}}),SO=new r((O,$)=>{for(let Q=!1,t=0,R=0;;R++){let{next:a}=O;if(o(a)||a==S||a==m||Q&&u(a))!Q&&(a!=S||R>0)&&(Q=!0),t===R&&a==S&&t++,O.advance();else if(a==p&&O.peek(1)==k){O.acceptToken(A,2);break}else{Q&&O.acceptToken(t==2&&$.canShift(z)?z:$.canShift(T)?T:a==OO?K:L);break}}}),lO=new r(O=>{if(O.next==tO){for(O.advance();o(O.next)||O.next==S||O.next==m||u(O.next);)O.advance();O.next==p&&O.peek(1)==k?O.acceptToken(F,2):O.acceptToken(D)}}),dO=new r(O=>{if(i.includes(O.peek(-1))){let{next:$}=O;(o($)||$==m||$==p||$==eO||$==$O||$==M&&o(O.peek(1))||$==S||$==nO||$==d)&&O.acceptToken(I)}}),cO=new r(O=>{if(!i.includes(O.peek(-1))){let{next:$}=O;if($==QO&&(O.advance(),O.acceptToken(w)),o($)){do O.advance();while(o(O.next)||u(O.next));O.acceptToken(w)}}});function b(O,$){this.parent=O,this.depth=$,this.hash=(O?O.hash+O.hash<<8:0)+$+($<<4)}var XO=new E({start:new b(null,0),shift(O,$,Q,t){return $==h?new b(O,Q.pos-t.pos):$==P?O.parent:O},hash(O){return O.hash}}),PO=x({"AtKeyword import charset namespace keyframes media supports include mixin use forward extend at-root":e.definitionKeyword,"Keyword selector":e.keyword,ControlKeyword:e.controlKeyword,NamespaceName:e.namespace,KeyframeName:e.labelName,KeyframeRangeName:e.operatorKeyword,TagName:e.tagName,"ClassName Suffix":e.className,PseudoClassName:e.constant(e.className),IdName:e.labelName,"FeatureName PropertyName":e.propertyName,AttributeName:e.attributeName,NumberLiteral:e.number,KeywordQuery:e.keyword,UnaryQueryOp:e.operatorKeyword,"CallTag ValueName":e.atom,VariableName:e.variableName,SassVariableName:e.special(e.variableName),Callee:e.operatorKeyword,Unit:e.unit,"UniversalSelector NestingSelector IndentedMixin IndentedInclude":e.definitionOperator,MatchOp:e.compareOperator,"ChildOp SiblingOp, LogicOp":e.logicOperator,BinOp:e.arithmeticOperator,"Important Global Default":e.modifier,Comment:e.blockComment,LineComment:e.lineComment,ColorLiteral:e.color,"ParenthesizedContent StringLiteral":e.string,"InterpolationStart InterpolationContinue InterpolationEnd":e.meta,': "..."':e.punctuation,"PseudoOp #":e.derefOperator,"; ,":e.separator,"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace}),sO={__proto__:null,not:62,using:197,as:207,with:211,without:211,hide:225,show:225,if:263,from:269,to:271,through:273,in:279},mO={__proto__:null,url:82,"url-prefix":82,domain:82,regexp:82,lang:104,"nth-child":104,"nth-last-child":104,"nth-of-type":104,"nth-last-of-type":104,dir:104,"host-context":104},pO={__proto__:null,"@import":162,"@include":194,"@mixin":200,"@function":200,"@use":204,"@extend":214,"@at-root":218,"@forward":222,"@media":228,"@charset":232,"@namespace":236,"@keyframes":242,"@supports":254,"@if":258,"@else":260,"@for":266,"@each":276,"@while":282,"@debug":286,"@warn":286,"@error":286,"@return":286},uO={__proto__:null,layer:166,not:184,only:184,selector:190},yO=g.deserialize({version:14,states:"!$WQ`Q+tOOO#fQ+tOOP#mOpOOOOQ#U'#Ch'#ChO#rQ(pO'#CjOOQ#U'#Ci'#CiO%_Q)QO'#GXO%rQ.jO'#CnO&mQ#dO'#D]O'dQ(pO'#CgO'kQ)OO'#D_O'vQ#dO'#DfO'{Q#dO'#DiO(QQ#dO'#DqOOQ#U'#GX'#GXO(VQ(pO'#GXO(^Q(nO'#DuO%rQ.jO'#D}O%rQ.jO'#E`O%rQ.jO'#EcO%rQ.jO'#EeO(cQ)OO'#EjO)TQ)OO'#ElO%rQ.jO'#EnO)bQ)OO'#EqO%rQ.jO'#EsO)|Q)OO'#EuO*XQ)OO'#ExO*aQ)OO'#FOO*uQ)OO'#FbOOQ&Z'#GW'#GWOOQ&Y'#Fe'#FeO+PQ(nO'#FeQ`Q+tOOO%rQ.jO'#FQO+[Q(nO'#FUO+aQ)OO'#FZO%rQ.jO'#F^O%rQ.jO'#F`OOQ&Z'#Fm'#FmO+iQ+uO'#GaO+vQ(oO'#GaQOQ#SOOP,XO#SO'#GVPOOO)CAz)CAzOOQ#U'#Cm'#CmOOQ#U,59W,59WOOQ#i'#Cp'#CpO%rQ.jO'#CsO,xQ.wO'#CuO/dQ.^O,59YO%rQ.jO'#CzOOQ#S'#DP'#DPO/uQ(nO'#DUO/zQ)OO'#DZOOQ#i'#GZ'#GZO0SQ(nO'#DOOOQ#U'#D^'#D^OOQ#U,59w,59wO&mQ#dO,59wO0XQ)OO,59yO'vQ#dO,5:QO'{Q#dO,5:TO(cQ)OO,5:WO(cQ)OO,5:YO(cQ)OO,5:ZO(cQ)OO'#FlO0dQ(nO,59RO0oQ+tO'#DsO0vQ#TO'#DsOOQ&Z,59R,59ROOQ#U'#Da'#DaOOQ#S'#Dd'#DdOOQ#U,59y,59yO0{Q(nO,59yO1QQ(nO,59yOOQ#U'#Dh'#DhOOQ#U,5:Q,5:QOOQ#S'#Dj'#DjO1VQ9`O,5:TOOQ#U'#Dr'#DrOOQ#U,5:],5:]O2YQ.jO,5:aO2dQ.jO,5:iO3`Q.jO,5:zO3mQ.YO,5:}O4OQ.jO,5;POOQ#U'#Cj'#CjO4wQ(pO,5;UO5UQ(pO,5;WOOQ&Z,5;W,5;WO5]Q)OO,5;WO5bQ.jO,5;YOOQ#S'#ET'#ETO6TQ.jO'#E]O6kQ(nO'#GcO*aQ)OO'#EZO7PQ(nO'#E^OOQ#S'#Gd'#GdO0gQ(nO,5;]O4UQ.YO,5;_OOQ#d'#Ew'#EwO+PQ(nO,5;aO7UQ)OO,5;aOOQ#S'#Ez'#EzO7^Q(nO,5;dO7cQ(nO,5;jO7nQ(nO,5;|OOQ&Z'#Gf'#GfOOQ&Y,5<P,5<POOQ&Y-E9c-E9cO3mQ.YO,5;lO7|Q)OO,5;pO8RQ)OO'#GhO8ZQ)OO,5;uO3mQ.YO,5;xO4UQ.YO,5;zOOQ&Z-E9k-E9kO8`Q(oO,5<{OOQ&Z'#Gb'#GbO8qQ+uO'#FpO8`Q(oO,5<{POO#S'#Fd'#FdP9UO#SO,5<qPOOO,5<q,5<qO9dQ.YO,59_OOQ#i,59a,59aO%rQ.jO,59cO%rQ.jO,59hO%rQ.jO'#FiO9rQ#WO1G.tOOQ#k1G.t1G.tO9zQ.oO,59fO<pQ! lO,59pOOQ#d'#D['#D[OOQ#d'#Fh'#FhO<{Q)OO,59uOOQ#i,59u,59uO={Q.jO'#DQOOQ#i,59j,59jOOQ#U1G/c1G/cOOQ#U1G/e1G/eO0{Q(nO1G/eO1QQ(nO1G/eOOQ#U1G/l1G/lO>VQ9`O1G/oO>pQ(pO1G/rO?dQ(pO1G/tO@WQ(pO1G/uO@zQ(pO,5<WOOQ#S-E9j-E9jOOQ&Z1G.m1G.mOAXQ(nO,5:_OA^Q+uO,5:_OAeQ)OO'#DeOAlQ.jO'#DcOOQ#U1G/o1G/oO%rQ.jO1G/oOBkQ.jO'#DwOBuQ.kO1G/{OOQ#T1G/{1G/{OCrQ)OO'#EQO+PQ(nO1G0TO2pQ)OO1G0TODaQ+uO'#GfOOQ&Z1G0f1G0fO0SQ(nO1G0fOOQ&Z1G0i1G0iOOQ&Z1G0k1G0kO0SQ(nO1G0kOFyQ)OO1G0kOOQ&Z1G0p1G0pOOQ&Z1G0r1G0rOGRQ)OO1G0rOGWQ(nO1G0rOG]Q)OO1G0tOOQ&Z1G0t1G0tOGkQ.jO'#FsOG{Q#dO1G0tOHQQ!N^O'#CuOH]Q!NUO'#ETOHkQ!NUO,5:pOHsQ(nO,5:wOOQ#S'#Ge'#GeOHnQ!NUO,5:sO*aQ)OO,5:rOH{Q)OO'#FrOI`Q(nO,5<}OIqQ(nO,5:uO(cQ)OO,5:xOOQ&Z1G0w1G0wOOQ&Z1G0y1G0yOOQ&Z1G0{1G0{O+PQ(nO1G0{OJYQ)OO'#E{OOQ&Z1G1O1G1OOOQ&Z1G1U1G1UOOQ&Z1G1h1G1hOJeQ+uO1G1WO%rQ.jO1G1[OL}Q)OO'#FxOMYQ)OO,5=SO%rQ.jO1G1aOOQ&Z1G1d1G1dOOQ&Z1G1f1G1fOMbQ(oO1G2gOMsQ+uO,5<[OOQ#T,5<[,5<[OOQ#T-E9n-E9nPOO#S-E9b-E9bPOOO1G2]1G2]OOQ#i1G.y1G.yONWQ.oO1G.}OOQ#i1G/S1G/SO!!|Q.^O,5<TOOQ#W-E9g-E9gOOQ#k7+$`7+$`OOQ#i1G/[1G/[O!#_Q(nO1G/[OOQ#d-E9f-E9fOOQ#i1G/a1G/aO!#dQ.jO'#FfO!$qQ.jO'#G]O!&]Q.jO'#GZO!&dQ(nO,59lOOQ#U7+%P7+%POOQ#U7+%Z7+%ZO%rQ.jO7+%ZOOQ&Z1G/y1G/yO!&iQ#TO1G/yO!&nQ(pO'#G_O!&xQ(nO,5:PO!&}Q.jO'#G^O!'XQ(nO,59}O!'^Q.YO7+%ZO!'lQ.YO'#GZO!'}Q(nO,5:cOOQ#T,5:c,5:cO!(VQ.kO'#FoO%rQ.jO'#FoO!)yQ.kO7+%gOOQ#T7+%g7+%gO!*mQ#dO,5:lOOQ&Z7+%o7+%oO+PQ(nO7+%oO7nQ(nO7+&QO+PQ(nO7+&VOOQ#d'#Eh'#EhO!*rQ)OO7+&VO!+QQ(nO7+&^O*aQ)OO7+&^OOQ#d-E9q-E9qOOQ&Z7+&`7+&`O!+VQ.jO'#GgOOQ#d,5<_,5<_OF|Q(nO7+&`O%rQ.jO1G0[O!+qQ.jO1G0_OOQ#S1G0c1G0cOOQ#S1G0^1G0^O!+xQ(nO,5<^OOQ#S-E9p-E9pO!,^Q(pO1G0dOOQ&Z7+&g7+&gO,gQ(vO'#CuOOQ#S'#E}'#E}O!,eQ(nO'#E|OOQ#S'#E|'#E|O!,sQ(nO'#FuO!-OQ)OO,5;gOOQ&Z,5;g,5;gO!-ZQ+uO7+&rO!/sQ)OO7+&rO!0OQ.jO7+&vOOQ#d,5<d,5<dOOQ#d-E9v-E9vO3mQ.YO7+&{OOQ#T1G1v1G1vOOQ#i7+$v7+$vOOQ#d-E9d-E9dO!0aQ.jO'#FgO!0nQ(nO,5<wO!0nQ(nO,5<wO%rQ.jO,5<wOOQ#i1G/W1G/WO!0vQ.YO<<HuOOQ&Z7+%e7+%eO!1UQ)OO'#FkO!1`Q(nO,5<yOOQ#U1G/k1G/kO!1hQ.jO'#FjO!1rQ(nO,5<xOOQ#U1G/i1G/iOOQ#U<<Hu<<HuO1_Q.jO,5<YO!1zQ(nO'#FnOOQ#S-E9l-E9lOOQ#T1G/}1G/}O!2PQ.kO,5<ZOOQ#e-E9m-E9mOOQ#T<<IR<<IROOQ#S'#ES'#ESO!3sQ(nO1G0WOOQ&Z<<IZ<<IZOOQ&Z<<Il<<IlOOQ&Z<<Iq<<IqO0SQ(nO<<IqO*aQ)OO<<IxO!3{Q(nO<<IxO!4TQ.jO'#FtO!4hQ)OO,5=ROG]Q)OO<<IzO!4yQ.jO7+%vOOQ#S'#EV'#EVO!5QQ!NUO7+%yOOQ#S7+&O7+&OOOQ#S,5;h,5;hOJ]Q)OO'#FvO!,sQ(nO,5<aOOQ#d,5<a,5<aOOQ#d-E9s-E9sOOQ&Z1G1R1G1ROOQ&Z-E9u-E9uO!/sQ)OO<<J^O%rQ.jO,5<cOOQ&Z<<J^<<J^O%rQ.jO<<JbOOQ&Z<<Jg<<JgO!5YQ.jO,5<RO!5gQ.jO,5<ROOQ#S-E9e-E9eO!5nQ(nO1G2cO!5vQ.jO1G2cOOQ#UAN>aAN>aO!6QQ(pO,5<VOOQ#S-E9i-E9iO!6[Q.jO,5<UOOQ#S-E9h-E9hO!6fQ.YO1G1tO!6oQ(nO1G1tO!*mQ#dO'#FqO!6zQ(nO7+%rOOQ#d7+%r7+%rO+PQ(nOAN?]O!7SQ(nOAN?dO0gQ(nOAN?dO!7[Q.jO,5<`OOQ#d-E9r-E9rOG]Q)OOAN?fOOQ&ZAN?fAN?fOOQ#S<<Ib<<IbOOQ#S<<Ie<<IeO!7vQ.jO<<IeOOQ#S,5<b,5<bOOQ#S-E9t-E9tOOQ#d1G1{1G1{P!8_Q)OO'#FwOOQ&ZAN?xAN?xO3mQ.YO1G1}O3mQ.YOAN?|OOQ#S1G1m1G1mO%rQ.jO1G1mO!8dQ(nO7+'}OOQ#S7+'`7+'`OOQ#S,5<],5<]OOQ#S-E9o-E9oOOQ#d<<I^<<I^OOQ&ZG24wG24wO0gQ(nOG25OOOQ&ZG25OG25OOOQ&ZG25QG25QO!8lQ(nOAN?POOQ&Z7+'i7+'iOOQ&ZG25hG25hO!8qQ.jO7+'XOOQ&ZLD*jLD*jOOQ#SG24kG24k",stateData:"!9R~O$wOSVOSUOS$uQQ~OS`OTVOWcOXbO_UOc`OqWOuYO|[O!SYO!ZZO!rmO!saO#TbO#WcO#YdO#_eO#afO#cgO#fhO#hiO#jjO#mkO#slO#urO#ysO$OtO$RuO$TvO$rSO$|RO%S]O~O$m%TP~P`O$u{O~Oq^Xu^Xu!jXw^X|^X!S^X!Z^X!a^X!d^X!h^X$p^X$t^X~Oq${Xu${Xw${X|${X!S${X!Z${X!a${X!d${X!h${X$p${X$t${X~O$r}O!o${X$v${Xf${Xe${X~P$jOS!XOTVO_!XOc!XOf!QOh!XOj!XOo!TOy!VO|!WO$q!UO$r!PO%O!RO~O$r!ZO~Oq!]Ou!^O|!`O!S!^O!Z!_O!a!aO!d!cO!h!fO$p!bO$t!gO~Ow!dO~P&rO!U!mO$q!jO$r!iO~O$r!nO~O$r!pO~O$r!rO~Ou!tO~P$jOu!tO~OTVO_UOqWOuYO|[O!SYO!ZZO$r!yO$|RO%S]O~Of!}O!h!fO$t!gO~P(cOTVOc#UOf#QO#O#SO#R#TO$s#PO!h%VP$t%VP~Oj#YOy!VO$r#XO~Oj#[O$r#[O~OTVOc#UOf#QO#O#SO#R#TO$s#PO~O!o%VP$v%VP~P)bO!o#`O$t#`O$v#`O~Oc#dO~Oc#eO$P%[P~O$m%TX!p%TX$o%TX~P`O!o#kO$t#kO$m%TX!p%TX$o%TX~OU#nOV#nO$t#pO$w#nO~OR#rO$tiX!hiXeiXwiX~OPiXQiXliXmiXqiXTiXciXfiX!oiX!uiX#OiX#RiX$siX$viX#UiX#ZiX#]iX#diXSiX_iXhiXjiXoiXyiX|iX!liX!miX!niX$qiX$riX%OiX$miXviX{iX#{iX#|iX!piX$oiX~P,gOP#wOQ#uOl#sOm#sOq#tO~Of#yO~O{#}O$r#zO~Of$OO~O!U$TO$q!jO$r!iO~Ow!dO!h!fO$t!gO~O!p%TP~P`O$n$_O~Of$`O~Of$aO~O{$bO!_$cO~OS!XOTVO_!XOc!XOf$dOh!XOj!XOo!TOy!VO|!WO$q!UO$r!PO%O!RO~O!h!fO$t!gO~P1_Ol#sOm#sOq#tO!u$gO!o%VP$t%VP$v%VP~P*aOl#sOm#sOq#tO!o#`O$v#`O~O!h!fO#U$lO$t$jO~P2}Ol#sOm#sOq#tO!h!fO$t!gO~O#Z$pO#]$oO$t#`O~P2}Oq!]Ou!^O|!`O!S!^O!Z!_O!a!aO!d!cO$p!bO~O!o#`O$t#`O$v#`O~P4]Of$sO~P&rO#]$tO~O#Z$xO#d$wO$t#`O~P2}OS$}Oh$}Oj$}Oy!VO$q!UO%O$yO~OTVOc#UOf#QO#O#SO#R#TO$s$zO~P5oOm%POw%QO!h%VX$t%VX!o%VX$v%VX~Of%TO~Oj%XOy!VO~O!h%YO~Om%PO!h!fO$t!gO~O!h!fO!o#`O$t$jO$v#`O~O#z%_O~Ow%`O$P%[X~O$P%bO~O!o#kO$t#kO$m%Ta!p%Ta$o%Ta~O!o$dX$m$dX$t$dX!p$dX$o$dX~P`OU#nOV#nO$t%jO$w#nO~Oe%kOl#sOm#sOq#tO~OP%pOQ#uO~Ol#sOm#sOq#tOPnaQnaTnacnafna!ona!una#Ona#Rna$sna$tna$vna!hna#Una#Zna#]na#dnaenaSna_nahnajnaonawnayna|na!lna!mna!nna$qna$rna%Ona$mnavna{na#{na#|na!pna$ona~Oe%qOj%rOz%rO~O{%tO$r#zO~OS!XOTVO_!XOf!QOh!XOj!XOo!TOy!VO|!WO$q!UO$r!PO%O!RO~Oc%wOe%PP~P=TO{%zO!_%{O~Oq!]Ou!^O|!`O!S!^O!Z!_O~Ow!`i!a!`i!d!`i!h!`i$p!`i$t!`i!o!`i$v!`if!`ie!`i~P>_Ow!bi!a!bi!d!bi!h!bi$p!bi$t!bi!o!bi$v!bif!bie!bi~P>_Ow!ci!a!ci!d!ci!h!ci$p!ci$t!ci!o!ci$v!cif!cie!ci~P>_Ow$`a!h$`a$t$`a~P4]O!p%|O~O$o%TP~P`Oe%RP~P(cOe%QP~P%rOS!XOTVO_!XOc!XOf!QOh!XOo!TOy!VO|!WO$q!UO$r!PO%O!RO~Oe&VOj&TO~PAsOl#sOm#sOq#tOw&XO!l&ZO!m&ZO!n&ZO!o!ii$t!ii$v!ii$m!ii!p!ii$o!ii~P%rOf&[OT!tXc!tX!o!tX#O!tX#R!tX$s!tX$t!tX$v!tX~O$n$_OS%YXT%YXW%YXX%YX_%YXc%YXq%YXu%YX|%YX!S%YX!Z%YX!r%YX!s%YX#T%YX#W%YX#Y%YX#_%YX#a%YX#c%YX#f%YX#h%YX#j%YX#m%YX#s%YX#u%YX#y%YX$O%YX$R%YX$T%YX$m%YX$r%YX$|%YX%S%YX!p%YX!o%YX$t%YX$o%YX~O$r!PO$|&aO~O#]&cO~Ou&dO~O!o#`O#d$wO$t#`O$v#`O~O!o%ZP#d%ZP$t%ZP$v%ZP~P%rO$r!PO~OR#rO!|iXeiX~Oe!wXm!wXu!yX!|!yX~Ou&jO!|&kO~Oe&lOm%PO~Ow$fX!h$fX$t$fX!o$fX$v$fX~P*aOw%QO!h%Va$t%Va!o%Va$v%Va~Om%POw!}a!h!}a$t!}a!o!}a$v!}ae!}a~O!p&xO$r&sO%O&rO~O#v&zOS#tiT#tiW#tiX#ti_#tic#tiq#tiu#ti|#ti!S#ti!Z#ti!r#ti!s#ti#T#ti#W#ti#Y#ti#_#ti#a#ti#c#ti#f#ti#h#ti#j#ti#m#ti#s#ti#u#ti#y#ti$O#ti$R#ti$T#ti$m#ti$r#ti$|#ti%S#ti!p#ti!o#ti$t#ti$o#ti~Oc&|Ow$lX$P$lX~Ow%`O$P%[a~O!o#kO$t#kO$m%Ti!p%Ti$o%Ti~O!o$da$m$da$t$da!p$da$o$da~P`Oq#tOPkiQkilkimkiTkickifki!oki!uki#Oki#Rki$ski$tki$vki!hki#Uki#Zki#]ki#dkiekiSki_kihkijkiokiwkiyki|ki!lki!mki!nki$qki$rki%Oki$mkivki{ki#{ki#|ki!pki$oki~Ol#sOm#sOq#tOP$]aQ$]a~Oe'QO~Ol#sOm#sOq#tOS$YXT$YX_$YXc$YXe$YXf$YXh$YXj$YXo$YXv$YXw$YXy$YX|$YX$q$YX$r$YX%O$YX~Ov'UOw'SOe%PX~P%rOS$}XT$}X_$}Xc$}Xe$}Xf$}Xh$}Xj$}Xl$}Xm$}Xo$}Xq$}Xv$}Xw$}Xy$}X|$}X$q$}X$r$}X%O$}X~Ou'VO~P!%OOe'WO~O$o'YO~Ow'ZOe%RX~P4]Oe']O~Ow'^Oe%QX~P%rOe'`O~Ol#sOm#sOq#tO{'aO~Ou'bOe$}Xl$}Xm$}Xq$}X~Oe'eOj'cO~Ol#sOm#sOq#tOS$cXT$cX_$cXc$cXf$cXh$cXj$cXo$cXw$cXy$cX|$cX!l$cX!m$cX!n$cX!o$cX$q$cX$r$cX$t$cX$v$cX%O$cX$m$cX!p$cX$o$cX~Ow&XO!l'hO!m'hO!n'hO!o!iq$t!iq$v!iq$m!iq!p!iq$o!iq~P%rO$r'iO~O!o#`O#]'nO$t#`O$v#`O~Ou'oO~Ol#sOm#sOq#tOw'qO!o%ZX#d%ZX$t%ZX$v%ZX~O$s'uO~P5oOm%POw$fa!h$fa$t$fa!o$fa$v$fa~Oe'wO~P4]O%O&rOw#pX!h#pX$t#pX~Ow'yO!h!fO$t!gO~O!p'}O$r&sO%O&rO~O#v(POS#tqT#tqW#tqX#tq_#tqc#tqq#tqu#tq|#tq!S#tq!Z#tq!r#tq!s#tq#T#tq#W#tq#Y#tq#_#tq#a#tq#c#tq#f#tq#h#tq#j#tq#m#tq#s#tq#u#tq#y#tq$O#tq$R#tq$T#tq$m#tq$r#tq$|#tq%S#tq!p#tq!o#tq$t#tq$o#tq~O!h!fO#w(QO$t!gO~Ol#sOm#sOq#tO#{(SO#|(SO~Oc(VOe$ZXw$ZX~P=TOw'SOe%Pa~Ol#sOm#sOq#tO{(ZO~Oe$_Xw$_X~P(cOw'ZOe%Ra~Oe$^Xw$^X~P%rOw'^Oe%Qa~Ou'bO~Ol#sOm#sOq#tOS$caT$ca_$cac$caf$cah$caj$cao$caw$cay$ca|$ca!l$ca!m$ca!n$ca!o$ca$q$ca$r$ca$t$ca$v$ca%O$ca$m$ca!p$ca$o$ca~Oe(dOq(bO~Oe(gOm%PO~Ow$hX!o$hX#d$hX$t$hX$v$hX~P%rOw'qO!o%Za#d%Za$t%Za$v%Za~Oe(lO~P%rOe(mO!|(nO~Ov(vOe$Zaw$Za~P%rOu(wO~P!%OOw'SOe%Pi~Ow'SOe%Pi~P%rOe$_aw$_a~P4]Oe$^aw$^a~P%rOl#sOm#sOq#tOw(yOe$bij$bi~Oe(|Oq(bO~Oe)OOm%PO~Ol#sOm#sOq#tOw$ha!o$ha#d$ha$t$ha$v$ha~OS$}Oh$}Oj$}Oy!VO$q!UO$s'uO%O&rO~O#w(QO~Ow'SOe%Pq~Oe)WO~Oe$Zqw$Zq~P%rO%Oql!dl~",goto:"=Y%]PPPPPPPPPPP%^%h%h%{P%h&`&cP(UPP)ZP*YP)ZPP)ZP)ZP+f,j-lPPP-xPPPP)Z/S%h/W%hP/^P/d/j/p%hP/v%h/|P%hP%h%hP%h0S0VP1k1}2XPPPPP%^PP2_P2b'w'w2h'w'wP'wP'w'wP%^PP%^P%^PP2qP%^P%^P%^PP%^P%^P%^P2w%^P2z2}3Q3X%^P%^PPP%^PPPP%^PP%^P%^P%^P3^3d3j4Y4h4n4t4z5Q5W5d5j5p5z6Q6W6b6h6n6t6zPPPPPPPPPPPP7Q7T7aP8WP:_:b:eP:h:q:w;T;p;y=S=VanOPqx!f#l$_%fs^OPefqx!a!b!c!d!f#l$_$`%T%f'ZsTOPefqx!a!b!c!d!f#l$_$`%T%f'ZR!OUb^ef!a!b!c!d$`%T'Z`_OPqx!f#l$_%f!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)Ug#Uhlm!u#Q#S$i%P%Q&d'o!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)UQ&b$pR&i$x!y!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)U!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)UU$}#Q&k(nU&u%Y&w'yR'x&t!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)UV$}#Q&k(n#P!YVabcdgiruv!Q!T!t#Q#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j&k'S'V'^'b'q't(Q(S(U(Y(^(n(w)UQ$P!YQ&_$lQ&`$oR(e'n!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)UQ#YjU$}#Q&k(nR%X#ZT#{!W#|Q![WR$Q!]Q!kYR$R!^Q$R!mR%y$TQ!lYR$S!^Q$R!lR%y$SQ!oZR$U!_Q!q[R$V!`R!s]Q!hXQ!|fQ$]!eQ$f!tQ$k!vQ$m!wQ$r!{Q%U#VQ%[#^Q%]#_Q%^#cQ%c#gQ'l&_Q'{&vQ(R&zQ(T'OQ(q'zQ(s(PQ)P(gQ)S(tQ)T(uR)V)OSpOqUyP!f$_Q#jxQ%g#lR'P%fa`OPqx!f#l$_%fQ$f!tR(a'bR$i!uQ'j&[R(z(bQ${#QQ'v&kR)R(nQ&b$pR's&iR#ZjR#]kR%Z#]S&v%Y&wR(o'yV&t%Y&w'yQ#o{R%i#oQqOR#bqQ%v$OQ&Q$a^'R%v&Q't(U(Y(^)UQ't&jQ(U'SQ(Y'VQ(^'^R)U(wQ'T%vU(W'T(X(xQ(X'UR(x(YQ#|!WR%s#|Q#v!SR%o#vQ'_&QR(_'_Q'[&OR(]'[Q!eXR$[!eUxP!f$_S#ix%fR%f#lQ&U$dR'd&UQ&Y$eR'g&YQ#myQ%e#jT%h#m%eQ(c'jR({(cQ%R#RR&o%RQ$u#OS&e$u(jR(j'sQ'r&gR(i'rQ&w%YR'|&wQ'z&vR(p'zQ&y%^R(O&yQ%a#eR&}%aR|QSoOq]wPx!f#l$_%f`XOPqx!f#l$_%fQ!zeQ!{fQ$W!aQ$X!bQ$Y!cQ$Z!dQ&O$`Q&p%TR(['ZQ!SVQ!uaQ!vbQ!wcQ!xdQ#OgQ#WiQ#crQ#guQ#hvS#q!Q$dQ#x!TQ$e!tQ%l#sQ%m#tQ%n#ul%u$O$a%v&Q&j'S'V'^'t(U(Y(^(w)UQ&S$cS&W$e&YQ&g$wQ&{%_Q'O%bQ'X%{Q'f&XQ(`'bQ(h'qQ(t(QR(u(SR%x$OR&R$aR&P$`QzPQ$^!fR%}$_X#ly#j#m%eQ#VhQ#_mQ$h!uR&^$iW#Rhm!u$iQ#^lQ$|#QQ%S#SQ&m%PQ&n%QQ'p&dR(f'oQ%O#QQ'v&kR)R(nQ#apQ$k!vQ$n!xQ$q!zQ$v#OQ%V#WQ%W#YQ%]#_Q%d#hQ&]$hQ&f$uQ&q%XQ'k&^Q'l&_S'm&`&bQ(k'sQ(}(eR)Q(jR&h$wR#ft",nodeNames:"\u26A0 InterpolationEnd InterpolationContinue Unit VariableName InterpolationStart LineComment Comment IndentedMixin IndentedInclude StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector SuffixedSelector Suffix Interpolation SassVariableName ValueName ) ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp LogicOp UnaryExpression LogicOp NamespacedValue . CallExpression Callee ArgList : ... , CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName ClassSelector ClassName PseudoClassSelector :: PseudoClassName PseudoClassName ArgList PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp PlaceholderSelector ClassName Block { Declaration PropertyName Map Important Global Default ; } ImportStatement AtKeyword import Layer layer LayerName KeywordQuery FeatureQuery FeatureName BinaryQuery ComparisonQuery CompareOp UnaryQuery LogicOp ParenthesizedQuery SelectorQuery selector IncludeStatement include Keyword MixinStatement mixin UseStatement use Keyword Star Keyword ExtendStatement extend RootStatement at-root ForwardStatement forward Keyword MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports IfStatement ControlKeyword ControlKeyword Keyword ForStatement ControlKeyword Keyword Keyword Keyword EachStatement ControlKeyword Keyword WhileStatement ControlKeyword OutputStatement ControlKeyword AtRule Styles",maxTerm:196,context:XO,nodeProps:[["openedBy",1,"InterpolationStart",5,"InterpolationEnd",21,"(",43,"[",78,"{"],["isolate",-3,6,7,26,""],["closedBy",22,")",44,"]",70,"}"]],propSources:[PO],skippedNodes:[0,6,7,146],repeatNodeCount:21,tokenData:"!$Q~RyOq#rqr$jrs0jst2^tu8{uv;hvw;{wx<^xy={yz>^z{>c{|>||}Co}!ODQ!O!PDo!P!QFY!Q![Fk![!]Gf!]!^Hb!^!_Hs!_!`Is!`!aJ^!a!b#r!b!cKa!c!}#r!}#OMn#O#P#r#P#QNP#Q#RNb#R#T#r#T#UNw#U#c#r#c#d!!Y#d#o#r#o#p!!o#p#qNb#q#r!#Q#r#s!#c#s;'S#r;'S;=`!#z<%lO#rW#uSOy$Rz;'S$R;'S;=`$d<%lO$RW$WSzWOy$Rz;'S$R;'S;=`$d<%lO$RW$gP;=`<%l$RY$m[Oy$Rz!_$R!_!`%c!`#W$R#W#X%v#X#Z$R#Z#[)Z#[#]$R#]#^,V#^;'S$R;'S;=`$d<%lO$RY%jSzWlQOy$Rz;'S$R;'S;=`$d<%lO$RY%{UzWOy$Rz#X$R#X#Y&_#Y;'S$R;'S;=`$d<%lO$RY&dUzWOy$Rz#Y$R#Y#Z&v#Z;'S$R;'S;=`$d<%lO$RY&{UzWOy$Rz#T$R#T#U'_#U;'S$R;'S;=`$d<%lO$RY'dUzWOy$Rz#i$R#i#j'v#j;'S$R;'S;=`$d<%lO$RY'{UzWOy$Rz#`$R#`#a(_#a;'S$R;'S;=`$d<%lO$RY(dUzWOy$Rz#h$R#h#i(v#i;'S$R;'S;=`$d<%lO$RY(}S!nQzWOy$Rz;'S$R;'S;=`$d<%lO$RY)`UzWOy$Rz#`$R#`#a)r#a;'S$R;'S;=`$d<%lO$RY)wUzWOy$Rz#c$R#c#d*Z#d;'S$R;'S;=`$d<%lO$RY*`UzWOy$Rz#U$R#U#V*r#V;'S$R;'S;=`$d<%lO$RY*wUzWOy$Rz#T$R#T#U+Z#U;'S$R;'S;=`$d<%lO$RY+`UzWOy$Rz#`$R#`#a+r#a;'S$R;'S;=`$d<%lO$RY+yS!mQzWOy$Rz;'S$R;'S;=`$d<%lO$RY,[UzWOy$Rz#a$R#a#b,n#b;'S$R;'S;=`$d<%lO$RY,sUzWOy$Rz#d$R#d#e-V#e;'S$R;'S;=`$d<%lO$RY-[UzWOy$Rz#c$R#c#d-n#d;'S$R;'S;=`$d<%lO$RY-sUzWOy$Rz#f$R#f#g.V#g;'S$R;'S;=`$d<%lO$RY.[UzWOy$Rz#h$R#h#i.n#i;'S$R;'S;=`$d<%lO$RY.sUzWOy$Rz#T$R#T#U/V#U;'S$R;'S;=`$d<%lO$RY/[UzWOy$Rz#b$R#b#c/n#c;'S$R;'S;=`$d<%lO$RY/sUzWOy$Rz#h$R#h#i0V#i;'S$R;'S;=`$d<%lO$RY0^S!lQzWOy$Rz;'S$R;'S;=`$d<%lO$R~0mWOY0jZr0jrs1Vs#O0j#O#P1[#P;'S0j;'S;=`2W<%lO0j~1[Oj~~1_RO;'S0j;'S;=`1h;=`O0j~1kXOY0jZr0jrs1Vs#O0j#O#P1[#P;'S0j;'S;=`2W;=`<%l0j<%lO0j~2ZP;=`<%l0jZ2cY!ZPOy$Rz!Q$R!Q![3R![!c$R!c!i3R!i#T$R#T#Z3R#Z;'S$R;'S;=`$d<%lO$RY3WYzWOy$Rz!Q$R!Q![3v![!c$R!c!i3v!i#T$R#T#Z3v#Z;'S$R;'S;=`$d<%lO$RY3{YzWOy$Rz!Q$R!Q![4k![!c$R!c!i4k!i#T$R#T#Z4k#Z;'S$R;'S;=`$d<%lO$RY4rYhQzWOy$Rz!Q$R!Q![5b![!c$R!c!i5b!i#T$R#T#Z5b#Z;'S$R;'S;=`$d<%lO$RY5iYhQzWOy$Rz!Q$R!Q![6X![!c$R!c!i6X!i#T$R#T#Z6X#Z;'S$R;'S;=`$d<%lO$RY6^YzWOy$Rz!Q$R!Q![6|![!c$R!c!i6|!i#T$R#T#Z6|#Z;'S$R;'S;=`$d<%lO$RY7TYhQzWOy$Rz!Q$R!Q![7s![!c$R!c!i7s!i#T$R#T#Z7s#Z;'S$R;'S;=`$d<%lO$RY7xYzWOy$Rz!Q$R!Q![8h![!c$R!c!i8h!i#T$R#T#Z8h#Z;'S$R;'S;=`$d<%lO$RY8oShQzWOy$Rz;'S$R;'S;=`$d<%lO$R_9O`Oy$Rz}$R}!O:Q!O!Q$R!Q![:Q![!_$R!_!`;T!`!c$R!c!}:Q!}#R$R#R#S:Q#S#T$R#T#o:Q#o;'S$R;'S;=`$d<%lO$RZ:X^zWcROy$Rz}$R}!O:Q!O!Q$R!Q![:Q![!c$R!c!}:Q!}#R$R#R#S:Q#S#T$R#T#o:Q#o;'S$R;'S;=`$d<%lO$R[;[S!_SzWOy$Rz;'S$R;'S;=`$d<%lO$RZ;oS%SPlQOy$Rz;'S$R;'S;=`$d<%lO$RZ<QS_ROy$Rz;'S$R;'S;=`$d<%lO$R~<aWOY<^Zw<^wx1Vx#O<^#O#P<y#P;'S<^;'S;=`=u<%lO<^~<|RO;'S<^;'S;=`=V;=`O<^~=YXOY<^Zw<^wx1Vx#O<^#O#P<y#P;'S<^;'S;=`=u;=`<%l<^<%lO<^~=xP;=`<%l<^Z>QSfROy$Rz;'S$R;'S;=`$d<%lO$R~>cOe~_>jU$|PlQOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RZ?TWlQ!dPOy$Rz!O$R!O!P?m!P!Q$R!Q![Br![;'S$R;'S;=`$d<%lO$RZ?rUzWOy$Rz!Q$R!Q![@U![;'S$R;'S;=`$d<%lO$RZ@]YzW%OROy$Rz!Q$R!Q![@U![!g$R!g!h@{!h#X$R#X#Y@{#Y;'S$R;'S;=`$d<%lO$RZAQYzWOy$Rz{$R{|Ap|}$R}!OAp!O!Q$R!Q![BX![;'S$R;'S;=`$d<%lO$RZAuUzWOy$Rz!Q$R!Q![BX![;'S$R;'S;=`$d<%lO$RZB`UzW%OROy$Rz!Q$R!Q![BX![;'S$R;'S;=`$d<%lO$RZBy[zW%OROy$Rz!O$R!O!P@U!P!Q$R!Q![Br![!g$R!g!h@{!h#X$R#X#Y@{#Y;'S$R;'S;=`$d<%lO$RZCtSwROy$Rz;'S$R;'S;=`$d<%lO$RZDVWlQOy$Rz!O$R!O!P?m!P!Q$R!Q![Br![;'S$R;'S;=`$d<%lO$RZDtWqROy$Rz!O$R!O!PE^!P!Q$R!Q![@U![;'S$R;'S;=`$d<%lO$RYEcUzWOy$Rz!O$R!O!PEu!P;'S$R;'S;=`$d<%lO$RYE|SvQzWOy$Rz;'S$R;'S;=`$d<%lO$RYF_SlQOy$Rz;'S$R;'S;=`$d<%lO$RZFp[%OROy$Rz!O$R!O!P@U!P!Q$R!Q![Br![!g$R!g!h@{!h#X$R#X#Y@{#Y;'S$R;'S;=`$d<%lO$RkGkUucOy$Rz![$R![!]G}!];'S$R;'S;=`$d<%lO$RXHUS!SPzWOy$Rz;'S$R;'S;=`$d<%lO$RZHgS!oROy$Rz;'S$R;'S;=`$d<%lO$RjHzU!|`lQOy$Rz!_$R!_!`I^!`;'S$R;'S;=`$d<%lO$RjIgS!|`zWlQOy$Rz;'S$R;'S;=`$d<%lO$RnIzU!|`!_SOy$Rz!_$R!_!`%c!`;'S$R;'S;=`$d<%lO$RkJgV!aP!|`lQOy$Rz!_$R!_!`I^!`!aJ|!a;'S$R;'S;=`$d<%lO$RXKTS!aPzWOy$Rz;'S$R;'S;=`$d<%lO$RXKdYOy$Rz}$R}!OLS!O!c$R!c!}Lq!}#T$R#T#oLq#o;'S$R;'S;=`$d<%lO$RXLXWzWOy$Rz!c$R!c!}Lq!}#T$R#T#oLq#o;'S$R;'S;=`$d<%lO$RXLx[!rPzWOy$Rz}$R}!OLq!O!Q$R!Q![Lq![!c$R!c!}Lq!}#T$R#T#oLq#o;'S$R;'S;=`$d<%lO$RZMsS|ROy$Rz;'S$R;'S;=`$d<%lO$R_NUS{VOy$Rz;'S$R;'S;=`$d<%lO$R[NeUOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RkNzUOy$Rz#b$R#b#c! ^#c;'S$R;'S;=`$d<%lO$Rk! cUzWOy$Rz#W$R#W#X! u#X;'S$R;'S;=`$d<%lO$Rk! |SmczWOy$Rz;'S$R;'S;=`$d<%lO$Rk!!]UOy$Rz#f$R#f#g! u#g;'S$R;'S;=`$d<%lO$RZ!!tS!hROy$Rz;'S$R;'S;=`$d<%lO$RZ!#VS!pROy$Rz;'S$R;'S;=`$d<%lO$R]!#hU!dPOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RW!#}P;=`<%l#r",tokenizers:[oO,dO,lO,cO,SO,RO,iO,rO,0,1,2,3,4],topRules:{StyleSheet:[0,10],Styles:[1,145]},dialects:{indented:0},specialized:[{term:172,get:O=>sO[O]||-1},{term:171,get:O=>mO[O]||-1},{term:80,get:O=>pO[O]||-1},{term:173,get:O=>uO[O]||-1}],tokenPrec:3217}),X=V.define({name:"sass",parser:yO.configure({props:[f.add({Block:_,Comment(O,$){return{from:O.from+2,to:$.sliceDoc(O.to-2,O.to)=="*/"?O.to-2:O.to}}}),Y.add({Declaration:W()})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"$-"}}),fO=X.configure({dialect:"indented",props:[Y.add({"Block RuleSet":O=>O.baseIndent+O.unit}),f.add({Block:O=>({from:O.from,to:O.to})})]}),v=C(O=>O.name=="VariableName"||O.name=="SassVariableName");function YO(O){return new N(O!=null&&O.indented?fO:X,X.data.of({autocomplete:v}))}export{v as n,X as r,YO as t};
import"./dist-DBwNzi3C.js";import{i as s,n as a,r as o,t as e}from"./dist-Dcqqg9UU.js";export{e as css,a as cssCompletionSource,o as cssLanguage,s as defineCSSCompletionSource};
import"./dist-DBwNzi3C.js";import{i as a,n as o,r as s,t as r}from"./dist-C5H5qIvq.js";export{r as go,o as goLanguage,s as localCompletionSource,a as snippets};
import{J as e,i as r,nt as a,q as p,r as u,s as m,u as S}from"./dist-DBwNzi3C.js";import{n as b}from"./dist-Btv5Rh1v.js";import{a as c}from"./dist-sMh6mJ2d.js";var Q=u.deserialize({version:14,states:"%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",stateData:"$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",goto:"!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso",nodeNames:"\u26A0 Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity",maxTerm:36,nodeProps:[["isolate",-3,3,13,17,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",tokenizers:[6,7,new r("b~RP#q#rU~XP#q#r[~aOT~~",17,4),new r("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~",72,2),new r("[~RPwxU~ZOp~~",11,15),new r("[~RPrsU~ZOn~~",11,14),new r("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~",66,35),new r("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~",66,33)],topRules:{Content:[0,1],Attribute:[1,7]},tokenPrec:157}),P=c.parser.configure({top:"SingleExpression"}),o=Q.configure({props:[p({Text:e.content,Is:e.definitionOperator,AttributeName:e.attributeName,VueAttributeName:e.keyword,Identifier:e.variableName,"AttributeValue ScriptAttributeValue":e.attributeValue,Entity:e.character,"{{ }}":e.brace,"@ :":e.punctuation})]}),i={parser:P},y=o.configure({wrap:a((O,t)=>O.name=="InterpolationContent"?i:null)}),g=o.configure({wrap:a((O,t)=>O.name=="AttributeScript"?i:null),top:"Attribute"}),X={parser:y},f={parser:g},n=b();function s(O){return O.configure({dialect:"selfClosing",wrap:a(R)},"vue")}var l=s(n.language);function R(O,t){switch(O.name){case"Attribute":return/^(@|:|v-)/.test(t.read(O.from,O.from+2))?f:null;case"Text":return X}return null}function T(O={}){let t=n;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof m))throw RangeError("The base option must be the result of calling html(...)");t=O.base}return new S(t.language==n.language?l:s(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["{",'"']}})])}export{l as n,T as t};
import{s as wt}from"./chunk-LvLJmgfZ.js";import{t as De}from"./react-Bj1aDYRI.js";import{t as ke}from"./react-dom-CSu739Rf.js";import{r as $t}from"./useEventListener-Cb-RVVEn.js";import{t as He}from"./jsx-runtime-ZmTK25f3.js";import{C as xt,E as je,_ as st,g as Fe}from"./Combination-BAEdC-rz.js";var R=wt(De(),1);function Nt(t){let[e,r]=R.useState(void 0);return xt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});let n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;let o=i[0],l,a;if("borderBoxSize"in o){let s=o.borderBoxSize,u=Array.isArray(s)?s[0]:s;l=u.inlineSize,a=u.blockSize}else l=t.offsetWidth,a=t.offsetHeight;r({width:l,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var We=["top","right","bottom","left"],J=Math.min,_=Math.max,ft=Math.round,ct=Math.floor,N=t=>({x:t,y:t}),_e={left:"right",right:"left",bottom:"top",top:"bottom"},Be={start:"end",end:"start"};function vt(t,e,r){return _(t,J(e,r))}function q(t,e){return typeof t=="function"?t(e):t}function G(t){return t.split("-")[0]}function U(t){return t.split("-")[1]}function bt(t){return t==="x"?"y":"x"}function At(t){return t==="y"?"height":"width"}var Me=new Set(["top","bottom"]);function V(t){return Me.has(G(t))?"y":"x"}function Rt(t){return bt(V(t))}function ze(t,e,r){r===void 0&&(r=!1);let n=U(t),i=Rt(t),o=At(i),l=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(l=ut(l)),[l,ut(l)]}function $e(t){let e=ut(t);return[St(t),e,St(e)]}function St(t){return t.replace(/start|end/g,e=>Be[e])}var Vt=["left","right"],It=["right","left"],Ne=["top","bottom"],Ve=["bottom","top"];function Ie(t,e,r){switch(t){case"top":case"bottom":return r?e?It:Vt:e?Vt:It;case"left":case"right":return e?Ne:Ve;default:return[]}}function Ye(t,e,r,n){let i=U(t),o=Ie(G(t),r==="start",n);return i&&(o=o.map(l=>l+"-"+i),e&&(o=o.concat(o.map(St)))),o}function ut(t){return t.replace(/left|right|bottom|top/g,e=>_e[e])}function Xe(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yt(t){return typeof t=="number"?{top:t,right:t,bottom:t,left:t}:Xe(t)}function dt(t){let{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function Xt(t,e,r){let{reference:n,floating:i}=t,o=V(e),l=Rt(e),a=At(l),s=G(e),u=o==="y",f=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2,c;switch(s){case"top":c={x:f,y:n.y-i.height};break;case"bottom":c={x:f,y:n.y+n.height};break;case"right":c={x:n.x+n.width,y:d};break;case"left":c={x:n.x-i.width,y:d};break;default:c={x:n.x,y:n.y}}switch(U(e)){case"start":c[l]-=h*(r&&u?-1:1);break;case"end":c[l]+=h*(r&&u?-1:1);break}return c}var qe=async(t,e,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:l}=r,a=o.filter(Boolean),s=await(l.isRTL==null?void 0:l.isRTL(e)),u=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:d}=Xt(u,n,s),h=n,c={},p=0;for(let m=0;m<a.length;m++){let{name:y,fn:g}=a[m],{x:w,y:x,data:v,reset:b}=await g({x:f,y:d,initialPlacement:n,placement:h,strategy:i,middlewareData:c,rects:u,platform:l,elements:{reference:t,floating:e}});f=w??f,d=x??d,c={...c,[y]:{...c[y],...v}},b&&p<=50&&(p++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(u=b.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:f,y:d}=Xt(u,h,s)),m=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:c}};async function rt(t,e){e===void 0&&(e={});let{x:r,y:n,platform:i,rects:o,elements:l,strategy:a}=t,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=q(e,t),c=Yt(h),p=l[d?f==="floating"?"reference":"floating":f],m=dt(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(p))??!0?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:u,strategy:a})),y=f==="floating"?{x:r,y:n,width:o.floating.width,height:o.floating.height}:o.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),w=await(i.isElement==null?void 0:i.isElement(g))&&await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1},x=dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:g,strategy:a}):y);return{top:(m.top-x.top+c.top)/w.y,bottom:(x.bottom-m.bottom+c.bottom)/w.y,left:(m.left-x.left+c.left)/w.x,right:(x.right-m.right+c.right)/w.x}}var Ge=t=>({name:"arrow",options:t,async fn(e){let{x:r,y:n,placement:i,rects:o,platform:l,elements:a,middlewareData:s}=e,{element:u,padding:f=0}=q(t,e)||{};if(u==null)return{};let d=Yt(f),h={x:r,y:n},c=Rt(i),p=At(c),m=await l.getDimensions(u),y=c==="y",g=y?"top":"left",w=y?"bottom":"right",x=y?"clientHeight":"clientWidth",v=o.reference[p]+o.reference[c]-h[c]-o.floating[p],b=h[c]-o.reference[c],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u)),P=S?S[x]:0;(!P||!await(l.isElement==null?void 0:l.isElement(S)))&&(P=a.floating[x]||o.floating[p]);let O=v/2-b/2,D=P/2-m[p]/2-1,F=J(d[g],D),H=J(d[w],D),j=F,E=P-m[p]-H,T=P/2-m[p]/2+O,W=vt(j,T,E),L=!s.arrow&&U(i)!=null&&T!==W&&o.reference[p]/2-(T<j?F:H)-m[p]/2<0,C=L?T<j?T-j:T-E:0;return{[c]:h[c]+C,data:{[c]:W,centerOffset:T-W-C,...L&&{alignmentOffset:C}},reset:L}}}),Je=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var F,H,j,E;var r;let{placement:n,middlewareData:i,rects:o,initialPlacement:l,platform:a,elements:s}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:c="none",flipAlignment:p=!0,...m}=q(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let y=G(n),g=V(l),w=G(l)===l,x=await(a.isRTL==null?void 0:a.isRTL(s.floating)),v=d||(w||!p?[ut(l)]:$e(l)),b=c!=="none";!d&&b&&v.push(...Ye(l,p,c,x));let S=[l,...v],P=await rt(e,m),O=[],D=((F=i.flip)==null?void 0:F.overflows)||[];if(u&&O.push(P[y]),f){let T=ze(n,o,x);O.push(P[T[0]],P[T[1]])}if(D=[...D,{placement:n,overflows:O}],!O.every(T=>T<=0)){let T=(((H=i.flip)==null?void 0:H.index)||0)+1,W=S[T];if(W&&(!(f==="alignment"&&g!==V(W))||D.every(C=>C.overflows[0]>0&&V(C.placement)===g)))return{data:{index:T,overflows:D},reset:{placement:W}};let L=(j=D.filter(C=>C.overflows[0]<=0).sort((C,A)=>C.overflows[1]-A.overflows[1])[0])==null?void 0:j.placement;if(!L)switch(h){case"bestFit":{let C=(E=D.filter(A=>{if(b){let k=V(A.placement);return k===g||k==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(k=>k>0).reduce((k,$)=>k+$,0)]).sort((A,k)=>A[1]-k[1])[0])==null?void 0:E[0];C&&(L=C);break}case"initialPlacement":L=l;break}if(n!==L)return{reset:{placement:L}}}return{}}}};function qt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Gt(t){return We.some(e=>t[e]>=0)}var Ke=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:r}=e,{strategy:n="referenceHidden",...i}=q(t,e);switch(n){case"referenceHidden":{let o=qt(await rt(e,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Gt(o)}}}case"escaped":{let o=qt(await rt(e,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Gt(o)}}}default:return{}}}}},Jt=new Set(["left","top"]);async function Qe(t,e){let{placement:r,platform:n,elements:i}=t,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),l=G(r),a=U(r),s=V(r)==="y",u=Jt.has(l)?-1:1,f=o&&s?-1:1,d=q(e,t),{mainAxis:h,crossAxis:c,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(c=a==="end"?p*-1:p),s?{x:c*f,y:h*u}:{x:h*u,y:c*f}}var Ue=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var s;var r;let{x:n,y:i,placement:o,middlewareData:l}=e,a=await Qe(e,t);return o===((s=l.offset)==null?void 0:s.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+a.x,y:i+a.y,data:{...a,placement:o}}}}},Ze=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:i}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:a={fn:y=>{let{x:g,y:w}=y;return{x:g,y:w}}},...s}=q(t,e),u={x:r,y:n},f=await rt(e,s),d=V(G(i)),h=bt(d),c=u[h],p=u[d];if(o){let y=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=c+f[y],x=c-f[g];c=vt(w,c,x)}if(l){let y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=p+f[y],x=p-f[g];p=vt(w,p,x)}let m=a.fn({...e,[h]:c,[d]:p});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:o,[d]:l}}}}}},tn=function(t){return t===void 0&&(t={}),{options:t,fn(e){var g,w;let{x:r,y:n,placement:i,rects:o,middlewareData:l}=e,{offset:a=0,mainAxis:s=!0,crossAxis:u=!0}=q(t,e),f={x:r,y:n},d=V(i),h=bt(d),c=f[h],p=f[d],m=q(a,e),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){let x=h==="y"?"height":"width",v=o.reference[h]-o.floating[x]+y.mainAxis,b=o.reference[h]+o.reference[x]-y.mainAxis;c<v?c=v:c>b&&(c=b)}if(u){let x=h==="y"?"width":"height",v=Jt.has(G(i)),b=o.reference[d]-o.floating[x]+(v&&((g=l.offset)==null?void 0:g[d])||0)+(v?0:y.crossAxis),S=o.reference[d]+o.reference[x]+(v?0:((w=l.offset)==null?void 0:w[d])||0)-(v?y.crossAxis:0);p<b?p=b:p>S&&(p=S)}return{[h]:c,[d]:p}}}},en=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;let{placement:i,rects:o,platform:l,elements:a}=e,{apply:s=()=>{},...u}=q(t,e),f=await rt(e,u),d=G(i),h=U(i),c=V(i)==="y",{width:p,height:m}=o.floating,y,g;d==="top"||d==="bottom"?(y=d,g=h===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,y=h==="end"?"top":"bottom");let w=m-f.top-f.bottom,x=p-f.left-f.right,v=J(m-f[y],w),b=J(p-f[g],x),S=!e.middlewareData.shift,P=v,O=b;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(O=x),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(P=w),S&&!h){let F=_(f.left,0),H=_(f.right,0),j=_(f.top,0),E=_(f.bottom,0);c?O=p-2*(F!==0||H!==0?F+H:_(f.left,f.right)):P=m-2*(j!==0||E!==0?j+E:_(f.top,f.bottom))}await s({...e,availableWidth:O,availableHeight:P});let D=await l.getDimensions(a.floating);return p!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function Z(t){return Kt(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function I(t){var e;return(e=(Kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kt(t){return pt()?t instanceof Node||t instanceof B(t).Node:!1}function M(t){return pt()?t instanceof Element||t instanceof B(t).Element:!1}function Y(t){return pt()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Qt(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}var nn=new Set(["inline","contents"]);function it(t){let{overflow:e,overflowX:r,overflowY:n,display:i}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!nn.has(i)}var rn=new Set(["table","td","th"]);function on(t){return rn.has(Z(t))}var ln=[":popover-open",":modal"];function ht(t){return ln.some(e=>{try{return t.matches(e)}catch{return!1}})}var an=["transform","translate","scale","rotate","perspective"],sn=["transform","translate","scale","rotate","perspective","filter"],fn=["paint","layout","strict","content"];function Pt(t){let e=Tt(),r=M(t)?z(t):t;return an.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||sn.some(n=>(r.willChange||"").includes(n))||fn.some(n=>(r.contain||"").includes(n))}function cn(t){let e=K(t);for(;Y(e)&&!tt(e);){if(Pt(e))return e;if(ht(e))return null;e=K(e)}return null}function Tt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var un=new Set(["html","body","#document"]);function tt(t){return un.has(Z(t))}function z(t){return B(t).getComputedStyle(t)}function mt(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(Z(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Qt(t)&&t.host||I(t);return Qt(e)?e.host:e}function Ut(t){let e=K(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Y(e)&&it(e)?e:Ut(e)}function ot(t,e,r){var l;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=Ut(t),i=n===((l=t.ownerDocument)==null?void 0:l.body),o=B(n);if(i){let a=Ct(o);return e.concat(o,o.visualViewport||[],it(n)?n:[],a&&r?ot(a):[])}return e.concat(n,ot(n,[],r))}function Ct(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){let e=z(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Y(t),o=i?t.offsetWidth:r,l=i?t.offsetHeight:n,a=ft(r)!==o||ft(n)!==l;return a&&(r=o,n=l),{width:r,height:n,$:a}}function Et(t){return M(t)?t:t.contextElement}function et(t){let e=Et(t);if(!Y(e))return N(1);let r=e.getBoundingClientRect(),{width:n,height:i,$:o}=Zt(e),l=(o?ft(r.width):r.width)/n,a=(o?ft(r.height):r.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}var dn=N(0);function te(t){let e=B(t);return!Tt()||!e.visualViewport?dn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pn(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==B(t)?!1:e}function Q(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),o=Et(t),l=N(1);e&&(n?M(n)&&(l=et(n)):l=et(t));let a=pn(o,r,n)?te(o):N(0),s=(i.left+a.x)/l.x,u=(i.top+a.y)/l.y,f=i.width/l.x,d=i.height/l.y;if(o){let h=B(o),c=n&&M(n)?B(n):n,p=h,m=Ct(p);for(;m&&n&&c!==p;){let y=et(m),g=m.getBoundingClientRect(),w=z(m),x=g.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,v=g.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;s*=y.x,u*=y.y,f*=y.x,d*=y.y,s+=x,u+=v,p=B(m),m=Ct(p)}}return dt({width:f,height:d,x:s,y:u})}function Lt(t,e){let r=mt(t).scrollLeft;return e?e.left+r:Q(I(t)).left+r}function ee(t,e,r){r===void 0&&(r=!1);let n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-(r?0:Lt(t,n)),y:n.top+e.scrollTop}}function hn(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t,o=i==="fixed",l=I(n),a=e?ht(e.floating):!1;if(n===l||a&&o)return r;let s={scrollLeft:0,scrollTop:0},u=N(1),f=N(0),d=Y(n);if((d||!d&&!o)&&((Z(n)!=="body"||it(l))&&(s=mt(n)),Y(n))){let c=Q(n);u=et(n),f.x=c.x+n.clientLeft,f.y=c.y+n.clientTop}let h=l&&!d&&!o?ee(l,s,!0):N(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-s.scrollLeft*u.x+f.x+h.x,y:r.y*u.y-s.scrollTop*u.y+f.y+h.y}}function mn(t){return Array.from(t.getClientRects())}function gn(t){let e=I(t),r=mt(t),n=t.ownerDocument.body,i=_(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=_(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),l=-r.scrollLeft+Lt(t),a=-r.scrollTop;return z(n).direction==="rtl"&&(l+=_(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:l,y:a}}function yn(t,e){let r=B(t),n=I(t),i=r.visualViewport,o=n.clientWidth,l=n.clientHeight,a=0,s=0;if(i){o=i.width,l=i.height;let u=Tt();(!u||u&&e==="fixed")&&(a=i.offsetLeft,s=i.offsetTop)}return{width:o,height:l,x:a,y:s}}var wn=new Set(["absolute","fixed"]);function xn(t,e){let r=Q(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Y(t)?et(t):N(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:n*o.y}}function ne(t,e,r){let n;if(e==="viewport")n=yn(t,r);else if(e==="document")n=gn(I(t));else if(M(e))n=xn(e,r);else{let i=te(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return dt(n)}function re(t,e){let r=K(t);return r===e||!M(r)||tt(r)?!1:z(r).position==="fixed"||re(r,e)}function vn(t,e){let r=e.get(t);if(r)return r;let n=ot(t,[],!1).filter(a=>M(a)&&Z(a)!=="body"),i=null,o=z(t).position==="fixed",l=o?K(t):t;for(;M(l)&&!tt(l);){let a=z(l),s=Pt(l);!s&&a.position==="fixed"&&(i=null),(o?!s&&!i:!s&&a.position==="static"&&i&&wn.has(i.position)||it(l)&&!s&&re(t,l))?n=n.filter(u=>u!==l):i=a,l=K(l)}return e.set(t,n),n}function bn(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t,o=[...r==="clippingAncestors"?ht(e)?[]:vn(e,this._c):[].concat(r),n],l=o[0],a=o.reduce((s,u)=>{let f=ne(e,u,i);return s.top=_(f.top,s.top),s.right=J(f.right,s.right),s.bottom=J(f.bottom,s.bottom),s.left=_(f.left,s.left),s},ne(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function An(t){let{width:e,height:r}=Zt(t);return{width:e,height:r}}function Rn(t,e,r){let n=Y(e),i=I(e),o=r==="fixed",l=Q(t,!0,o,e),a={scrollLeft:0,scrollTop:0},s=N(0);function u(){s.x=Lt(i)}if(n||!n&&!o)if((Z(e)!=="body"||it(i))&&(a=mt(e)),n){let d=Q(e,!0,o,e);s.x=d.x+e.clientLeft,s.y=d.y+e.clientTop}else i&&u();o&&!n&&i&&u();let f=i&&!n&&!o?ee(i,a):N(0);return{x:l.left+a.scrollLeft-s.x-f.x,y:l.top+a.scrollTop-s.y-f.y,width:l.width,height:l.height}}function Ot(t){return z(t).position==="static"}function ie(t,e){if(!Y(t)||z(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return I(t)===r&&(r=r.ownerDocument.body),r}function oe(t,e){let r=B(t);if(ht(t))return r;if(!Y(t)){let i=K(t);for(;i&&!tt(i);){if(M(i)&&!Ot(i))return i;i=K(i)}return r}let n=ie(t,e);for(;n&&on(n)&&Ot(n);)n=ie(n,e);return n&&tt(n)&&Ot(n)&&!Pt(n)?r:n||cn(t)||r}var Sn=async function(t){let e=this.getOffsetParent||oe,r=this.getDimensions,n=await r(t.floating);return{reference:Rn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Pn(t){return z(t).direction==="rtl"}var Tn={convertOffsetParentRelativeRectToViewportRelativeRect:hn,getDocumentElement:I,getClippingRect:bn,getOffsetParent:oe,getElementRects:Sn,getClientRects:mn,getDimensions:An,getScale:et,isElement:M,isRTL:Pn};function le(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Cn(t,e){let r=null,n,i=I(t);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function l(a,s){a===void 0&&(a=!1),s===void 0&&(s=1),o();let u=t.getBoundingClientRect(),{left:f,top:d,width:h,height:c}=u;if(a||e(),!h||!c)return;let p=ct(d),m=ct(i.clientWidth-(f+h)),y=ct(i.clientHeight-(d+c)),g=ct(f),w={rootMargin:-p+"px "+-m+"px "+-y+"px "+-g+"px",threshold:_(0,J(1,s))||1},x=!0;function v(b){let S=b[0].intersectionRatio;if(S!==s){if(!x)return l();S?l(!1,S):n=setTimeout(()=>{l(!1,1e-7)},1e3)}S===1&&!le(u,t.getBoundingClientRect())&&l(),x=!1}try{r=new IntersectionObserver(v,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(v,w)}r.observe(t)}return l(!0),o}function En(t,e,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=n,u=Et(t),f=i||o?[...u?ot(u):[],...ot(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",r,{passive:!0}),o&&g.addEventListener("resize",r)});let d=u&&a?Cn(u,r):null,h=-1,c=null;l&&(c=new ResizeObserver(g=>{let[w]=g;w&&w.target===u&&c&&(c.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=c)==null||x.observe(e)})),r()}),u&&!s&&c.observe(u),c.observe(e));let p,m=s?Q(t):null;s&&y();function y(){let g=Q(t);m&&!le(m,g)&&r(),m=g,p=requestAnimationFrame(y)}return r(),()=>{var g;f.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),d==null||d(),(g=c)==null||g.disconnect(),c=null,s&&cancelAnimationFrame(p)}}var Ln=Ue,On=Ze,Dn=Je,kn=en,Hn=Ke,ae=Ge,jn=tn,Fn=(t,e,r)=>{let n=new Map,i={platform:Tn,...r},o={...i.platform,_c:n};return qe(t,e,{...i,platform:o})},Wn=wt(ke(),1),gt=typeof document<"u"?R.useLayoutEffect:function(){};function yt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!yt(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!(o==="_owner"&&t.$$typeof)&&!yt(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function se(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function fe(t,e){let r=se(t);return Math.round(e*r)/r}function Dt(t){let e=R.useRef(t);return gt(()=>{e.current=t}),e}function _n(t){t===void 0&&(t={});let{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:s,open:u}=t,[f,d]=R.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,c]=R.useState(n);yt(h,n)||c(n);let[p,m]=R.useState(null),[y,g]=R.useState(null),w=R.useCallback(A=>{A!==S.current&&(S.current=A,m(A))},[]),x=R.useCallback(A=>{A!==P.current&&(P.current=A,g(A))},[]),v=o||p,b=l||y,S=R.useRef(null),P=R.useRef(null),O=R.useRef(f),D=s!=null,F=Dt(s),H=Dt(i),j=Dt(u),E=R.useCallback(()=>{if(!S.current||!P.current)return;let A={placement:e,strategy:r,middleware:h};H.current&&(A.platform=H.current),Fn(S.current,P.current,A).then(k=>{let $={...k,isPositioned:j.current!==!1};T.current&&!yt(O.current,$)&&(O.current=$,Wn.flushSync(()=>{d($)}))})},[h,e,r,H,j]);gt(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);let T=R.useRef(!1);gt(()=>(T.current=!0,()=>{T.current=!1}),[]),gt(()=>{if(v&&(S.current=v),b&&(P.current=b),v&&b){if(F.current)return F.current(v,b,E);E()}},[v,b,E,F,D]);let W=R.useMemo(()=>({reference:S,floating:P,setReference:w,setFloating:x}),[w,x]),L=R.useMemo(()=>({reference:v,floating:b}),[v,b]),C=R.useMemo(()=>{let A={position:r,left:0,top:0};if(!L.floating)return A;let k=fe(L.floating,f.x),$=fe(L.floating,f.y);return a?{...A,transform:"translate("+k+"px, "+$+"px)",...se(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:$}},[r,a,L.floating,f.x,f.y]);return R.useMemo(()=>({...f,update:E,refs:W,elements:L,floatingStyles:C}),[f,E,W,L,C])}var Bn=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){let{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current==null?{}:ae({element:n.current,padding:i}).fn(r):n?ae({element:n,padding:i}).fn(r):{}}}},Mn=(t,e)=>({...Ln(t),options:[t,e]}),zn=(t,e)=>({...On(t),options:[t,e]}),$n=(t,e)=>({...jn(t),options:[t,e]}),Nn=(t,e)=>({...Dn(t),options:[t,e]}),Vn=(t,e)=>({...kn(t),options:[t,e]}),In=(t,e)=>({...Hn(t),options:[t,e]}),Yn=(t,e)=>({...Bn(t),options:[t,e]}),X=wt(He(),1),Xn="Arrow",ce=R.forwardRef((t,e)=>{let{children:r,width:n=10,height:i=5,...o}=t;return(0,X.jsx)(st.svg,{...o,ref:e,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:(0,X.jsx)("polygon",{points:"0,0 30,0 15,10"})})});ce.displayName=Xn;var qn=ce,kt="Popper",[ue,Gn]=je(kt),[Jn,de]=ue(kt),pe=t=>{let{__scopePopper:e,children:r}=t,[n,i]=R.useState(null);return(0,X.jsx)(Jn,{scope:e,anchor:n,onAnchorChange:i,children:r})};pe.displayName=kt;var he="PopperAnchor",me=R.forwardRef((t,e)=>{let{__scopePopper:r,virtualRef:n,...i}=t,o=de(he,r),l=R.useRef(null),a=$t(e,l),s=R.useRef(null);return R.useEffect(()=>{let u=s.current;s.current=(n==null?void 0:n.current)||l.current,u!==s.current&&o.onAnchorChange(s.current)}),n?null:(0,X.jsx)(st.div,{...i,ref:a})});me.displayName=he;var Ht="PopperContent",[Kn,Qn]=ue(Ht),ge=R.forwardRef((t,e)=>{var Ft,Wt,_t,Bt,Mt,zt;let{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:s=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:c="optimized",onPlaced:p,...m}=t,y=de(Ht,r),[g,w]=R.useState(null),x=$t(e,nt=>w(nt)),[v,b]=R.useState(null),S=Nt(v),P=(S==null?void 0:S.width)??0,O=(S==null?void 0:S.height)??0,D=n+(o==="center"?"":"-"+o),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(u)?u:[u],j=H.length>0,E={padding:F,boundary:H.filter(Zn),altBoundary:j},{refs:T,floatingStyles:W,placement:L,isPositioned:C,middlewareData:A}=_n({strategy:"fixed",placement:D,whileElementsMounted:(...nt)=>En(...nt,{animationFrame:c==="always"}),elements:{reference:y.anchor},middleware:[Mn({mainAxis:i+O,alignmentAxis:l}),s&&zn({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?$n():void 0,...E}),s&&Nn({...E}),Vn({...E,apply:({elements:nt,rects:Te,availableWidth:Ce,availableHeight:Ee})=>{let{width:Le,height:Oe}=Te.reference,at=nt.floating.style;at.setProperty("--radix-popper-available-width",`${Ce}px`),at.setProperty("--radix-popper-available-height",`${Ee}px`),at.setProperty("--radix-popper-anchor-width",`${Le}px`),at.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),v&&Yn({element:v,padding:a}),tr({arrowWidth:P,arrowHeight:O}),h&&In({strategy:"referenceHidden",...E})]}),[k,$]=xe(L),lt=Fe(p);xt(()=>{C&&(lt==null||lt())},[C,lt]);let be=(Ft=A.arrow)==null?void 0:Ft.x,Ae=(Wt=A.arrow)==null?void 0:Wt.y,Re=((_t=A.arrow)==null?void 0:_t.centerOffset)!==0,[Se,Pe]=R.useState();return xt(()=>{g&&Pe(window.getComputedStyle(g).zIndex)},[g]),(0,X.jsx)("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:C?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(Bt=A.transformOrigin)==null?void 0:Bt.x,(Mt=A.transformOrigin)==null?void 0:Mt.y].join(" "),...((zt=A.hide)==null?void 0:zt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,X.jsx)(Kn,{scope:r,placedSide:k,onArrowChange:b,arrowX:be,arrowY:Ae,shouldHideArrow:Re,children:(0,X.jsx)(st.div,{"data-side":k,"data-align":$,...m,ref:x,style:{...m.style,animation:C?void 0:"none"}})})})});ge.displayName=Ht;var ye="PopperArrow",Un={top:"bottom",right:"left",bottom:"top",left:"right"},we=R.forwardRef(function(t,e){let{__scopePopper:r,...n}=t,i=Qn(ye,r),o=Un[i.placedSide];return(0,X.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,X.jsx)(qn,{...n,ref:e,style:{...n.style,display:"block"}})})});we.displayName=ye;function Zn(t){return t!==null}var tr=t=>({name:"transformOrigin",options:t,fn(e){var m,y,g;let{placement:r,rects:n,middlewareData:i}=e,o=((m=i.arrow)==null?void 0:m.centerOffset)!==0,l=o?0:t.arrowWidth,a=o?0:t.arrowHeight,[s,u]=xe(r),f={start:"0%",center:"50%",end:"100%"}[u],d=(((y=i.arrow)==null?void 0:y.x)??0)+l/2,h=(((g=i.arrow)==null?void 0:g.y)??0)+a/2,c="",p="";return s==="bottom"?(c=o?f:`${d}px`,p=`${-a}px`):s==="top"?(c=o?f:`${d}px`,p=`${n.floating.height+a}px`):s==="right"?(c=`${-a}px`,p=o?f:`${h}px`):s==="left"&&(c=`${n.floating.width+a}px`,p=o?f:`${h}px`),{data:{x:c,y:p}}}});function xe(t){let[e,r="center"]=t.split("-");return[e,r]}var er=pe,nr=me,rr=ge,ir=we,ve=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),or="VisuallyHidden",jt=R.forwardRef((t,e)=>(0,X.jsx)(st.span,{...t,ref:e,style:{...ve,...t.style}}));jt.displayName=or;var lr=jt;export{ir as a,Gn as c,nr as i,Nt as l,ve as n,rr as o,jt as r,er as s,lr as t};
import"./dist-DBwNzi3C.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import{n as p,t as o}from"./dist-8kKeYgOg.js";export{o as php,p as phpLanguage};
import"./dist-DBwNzi3C.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import{n as o,t as r}from"./dist-Dv0MupEh.js";export{r as vue,o as vueLanguage};
import"./dist-DBwNzi3C.js";import"./dist-Dcqqg9UU.js";import{n as s,r as a,t as e}from"./dist-CRjEDsfC.js";export{e as less,s as lessCompletionSource,a as lessLanguage};
import"./dist-DBwNzi3C.js";import{i as o,n as a,r as t,t as s}from"./dist-CoCQUAeM.js";export{s as globalCompletion,a as localCompletionSource,t as python,o as pythonLanguage};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import"./dist-DBwNzi3C.js";import{i as a,n as s,r as m,t as o}from"./dist-CF4gkF4y.js";export{o as autoCloseTags,s as completeFromSchema,m as xml,a as xmlLanguage};
import{t as o}from"./simple-mode-BmS_AmGQ.js";var e="from",l=RegExp("^(\\s*)\\b("+e+")\\b","i"),n=["run","cmd","entrypoint","shell"],s=RegExp("^(\\s*)("+n.join("|")+")(\\s+\\[)","i"),t="expose",x=RegExp("^(\\s*)("+t+")(\\s+)","i"),r="("+[e,t].concat(n,["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"]).join("|")+")",g=RegExp("^(\\s*)"+r+"(\\s*)(#.*)?$","i"),k=RegExp("^(\\s*)"+r+"(\\s+)","i");const a=o({start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:l,token:[null,"keyword"],sol:!0,next:"from"},{regex:g,token:[null,"keyword",null,"error"],sol:!0},{regex:s,token:[null,"keyword",null],sol:!0,next:"array"},{regex:x,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:k,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],languageData:{commentTokens:{line:"#"}}});export{a as dockerFile};
import{s as a}from"./chunk-LvLJmgfZ.js";import{u as p}from"./useEvent-BhXAndur.js";import{t as s}from"./react-Bj1aDYRI.js";import{Nn as l,in as n}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as c}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import{t as u}from"./RenderHTML-D-of_-s7.js";import"./purify.es-DZrAQFIu.js";import{t as d}from"./empty-state-B8Cxr9nj.js";var x=c();s();var e=a(f(),1),v=()=>{let o=(0,x.c)(5),{documentation:r}=p(n);if(!r){let i;return o[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,e.jsx)(d,{title:"View docs as you type",description:"Move your text cursor over a symbol to see its documentation.",icon:(0,e.jsx)(l,{})}),o[0]=i):i=o[0],i}let t;o[1]===r?t=o[2]:(t=u({html:r}),o[1]=r,o[2]=t);let m;return o[3]===t?m=o[4]:(m=(0,e.jsx)("div",{className:"p-3 overflow-y-auto overflow-x-hidden h-full docs-documentation flex flex-col gap-4",children:t}),o[3]=t,o[4]=m),m};export{v as default};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);export{t};
var le=Object.defineProperty;var se=(r,e,t)=>e in r?le(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var D=(r,e,t)=>se(r,typeof e!="symbol"?e+"":e,t);import{s as C,t as I}from"./chunk-LvLJmgfZ.js";import{t as G}from"./react-Bj1aDYRI.js";import{ri as ue}from"./cells-DPp5cDaO.js";import{t as V}from"./compiler-runtime-B3qBwwSJ.js";import{d as q}from"./hotkeys-BHHWjLlp.js";import{t as ce}from"./jsx-runtime-ZmTK25f3.js";import{t as B}from"./cn-BKtXLv3a.js";import{t as de}from"./requests-B4FYHTZl.js";import{t as fe}from"./createLucideIcon-BCdY6lG5.js";import{t as j}from"./use-toast-BDYuj3zG.js";import{n as me}from"./paths-BzSgteR-.js";import{d as pe}from"./popover-CH1FzjxU.js";import{r as H}from"./errors-TZBmrJmc.js";import{t as W}from"./dist-CDXJRSCj.js";import{t as X}from"./html-to-image-CIQqSu-S.js";var ve=fe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Y=r=>{let e,t=new Set,a=(l,s)=>{let c=typeof l=="function"?l(e):l;if(!Object.is(c,e)){let d=e;e=s??(typeof c!="object"||!c)?c:Object.assign({},e,c),t.forEach(u=>u(e,d))}},n=()=>e,i={setState:a,getState:n,getInitialState:()=>o,subscribe:l=>(t.add(l),()=>t.delete(l)),destroy:()=>{t.clear()}},o=e=r(a,n,i);return i},he=r=>r?Y(r):Y,ge=I((r=>{var e=G(),t=pe();function a(d,u){return d===u&&(d!==0||1/d==1/u)||d!==d&&u!==u}var n=typeof Object.is=="function"?Object.is:a,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,s=e.useMemo,c=e.useDebugValue;r.useSyncExternalStoreWithSelector=function(d,u,f,g,m){var p=o(null);if(p.current===null){var x={hasValue:!1,value:null};p.current=x}else x=p.current;p=s(function(){function M(y){if(!T){if(T=!0,S=y,y=g(y),m!==void 0&&x.hasValue){var N=x.value;if(m(N,y))return $=N}return $=y}if(N=$,n(S,y))return N;var A=g(y);return m!==void 0&&m(N,A)?(S=y,N):(S=y,$=A)}var T=!1,S,$,U=f===void 0?null:f;return[function(){return M(u())},U===null?void 0:function(){return M(U())}]},[u,f,g,m]);var b=i(d,p[0],p[1]);return l(function(){x.hasValue=!0,x.value=b},[b]),c(b),b}})),ye=I(((r,e)=>{e.exports=ge()}));const h={toMarkdown:r=>h.replace(r,"md"),toHTML:r=>h.replace(r,"html"),toPNG:r=>h.replace(r,"png"),toPDF:r=>h.replace(r,"pdf"),toPY:r=>h.replace(r,"py"),withoutExtension:r=>{let e=r.split(".");return e.length===1?r:e.slice(0,-1).join(".")},replace:(r,e)=>r.endsWith(`.${e}`)?r:`${h.withoutExtension(r)}.${e}`};var P=320,L=180;function z(r){if(!r||r==="about:blank")return null;try{let e=new URL(r,window.location.href);return e.origin===window.location.origin?null:e.href}catch{return r}}function we(r,e,t){let a=[],n="";for(let i of e){let o=n+i;r.measureText(o).width<=t?n=o:(n&&a.push(n),n=i)}return n&&a.push(n),a}function k(r){let e=window.devicePixelRatio||1,t=document.createElement("canvas");t.width=P*e,t.height=L*e;let a=t.getContext("2d");if(!a)return t.toDataURL("image/png");a.scale(e,e),a.fillStyle="#f3f4f6",a.fillRect(0,0,P,L),a.strokeStyle="#d1d5db",a.strokeRect(.5,.5,P-1,L-1),a.fillStyle="#6b7280",a.font="8px sans-serif",a.textAlign="center",a.textBaseline="middle";let n=P-32,i=r?we(a,r,n):[],o=(L-(1+i.length)*14)/2+14/2;a.fillText("External iframe",P/2,o),o+=14;for(let l of i)a.fillText(l,P/2,o),o+=14;return t.toDataURL("image/png")}async function xe(r){var n;let e=r.querySelector("iframe");if(!e)return null;let t=z(e.getAttribute("src"));if(t)return k(t);let a;try{let i=e.contentDocument||((n=e.contentWindow)==null?void 0:n.document);if(!(i!=null&&i.body))return null;a=i}catch{return k(null)}for(let i of a.querySelectorAll("iframe")){let o=z(i.getAttribute("src"));if(o)return k(o)}return null}var J=class ie{constructor(e){D(this,"progress",0);D(this,"listeners",new Set);this.total=e}static indeterminate(){return new ie("indeterminate")}addTotal(e){this.total==="indeterminate"?this.total=e:this.total+=e,this.notifyListeners()}increment(e){this.progress+=e,this.notifyListeners()}getProgress(){return this.total==="indeterminate"?"indeterminate":this.progress/this.total*100}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notifyListeners(){let e=this.getProgress();for(let t of this.listeners)t(e)}},v=C(G(),1),w=C(ce(),1);function be(r,e=[]){let t=[];function a(i,o){let l=v.createContext(o);l.displayName=i+"Context";let s=t.length;t=[...t,o];let c=u=>{var b;let{scope:f,children:g,...m}=u,p=((b=f==null?void 0:f[r])==null?void 0:b[s])||l,x=v.useMemo(()=>m,Object.values(m));return(0,w.jsx)(p.Provider,{value:x,children:g})};c.displayName=i+"Provider";function d(u,f){var p;let g=((p=f==null?void 0:f[r])==null?void 0:p[s])||l,m=v.useContext(g);if(m)return m;if(o!==void 0)return o;throw Error(`\`${u}\` must be used within \`${i}\``)}return[c,d]}let n=()=>{let i=t.map(o=>v.createContext(o));return function(o){let l=(o==null?void 0:o[r])||i;return v.useMemo(()=>({[`__scope${r}`]:{...o,[r]:l}}),[o,l])}};return n.scopeName=r,[a,Ne(n,...e)]}function Ne(...r){let e=r[0];if(r.length===1)return e;let t=()=>{let a=r.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(n){let i=a.reduce((o,{useScope:l,scopeName:s})=>{let c=l(n)[`__scope${s}`];return{...o,...c}},{});return v.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return t.scopeName=e.scopeName,t}var O="Progress",_=100,[Pe,nt]=be(O),[Se,$e]=Pe(O),K=v.forwardRef((r,e)=>{let{__scopeProgress:t,value:a=null,max:n,getValueLabel:i=je,...o}=r;(n||n===0)&&!te(n)&&console.error(Le(`${n}`,"Progress"));let l=te(n)?n:_;a!==null&&!re(a,l)&&console.error(Ee(`${a}`,"Progress"));let s=re(a,l)?a:null,c=E(s)?i(s,l):void 0;return(0,w.jsx)(Se,{scope:t,value:s,max:l,children:(0,w.jsx)(W.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":E(s)?s:void 0,"aria-valuetext":c,role:"progressbar","data-state":ee(s,l),"data-value":s??void 0,"data-max":l,...o,ref:e})})});K.displayName=O;var Q="ProgressIndicator",Z=v.forwardRef((r,e)=>{let{__scopeProgress:t,...a}=r,n=$e(Q,t);return(0,w.jsx)(W.div,{"data-state":ee(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...a,ref:e})});Z.displayName=Q;function je(r,e){return`${Math.round(r/e*100)}%`}function ee(r,e){return r==null?"indeterminate":r===e?"complete":"loading"}function E(r){return typeof r=="number"}function te(r){return E(r)&&!isNaN(r)&&r>0}function re(r,e){return E(r)&&!isNaN(r)&&r<=e&&r>=0}function Le(r,e){return`Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${_}\`.`}function Ee(r,e){return`Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${_} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var ne=K,Re=Z,De=V(),F=v.forwardRef((r,e)=>{let t=(0,De.c)(20),a,n,i,o;t[0]===r?(a=t[1],n=t[2],i=t[3],o=t[4]):({className:a,value:o,indeterminate:n,...i}=r,t[0]=r,t[1]=a,t[2]=n,t[3]=i,t[4]=o);let l;t[5]===a?l=t[6]:(l=B("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",a),t[5]=a,t[6]=l);let s=n?"w-1/3 animate-progress-indeterminate":"w-full transition-transform duration-300 ease-out",c;t[7]===s?c=t[8]:(c=B("h-full flex-1 bg-primary",s),t[7]=s,t[8]=c);let d;t[9]!==n||t[10]!==o?(d=n?void 0:{transform:`translateX(-${100-(o||0)}%)`},t[9]=n,t[10]=o,t[11]=d):d=t[11];let u;t[12]!==c||t[13]!==d?(u=(0,w.jsx)(Re,{className:c,style:d}),t[12]=c,t[13]=d,t[14]=u):u=t[14];let f;return t[15]!==i||t[16]!==e||t[17]!==l||t[18]!==u?(f=(0,w.jsx)(ne,{ref:e,className:l,...i,children:u}),t[15]=i,t[16]=e,t[17]=l,t[18]=u,t[19]=f):f=t[19],f});F.displayName=ne.displayName;var ke=V();const Oe=r=>{let e=(0,ke.c)(13),{progress:t,showPercentage:a}=r,n=a===void 0?!1:a,i,o;e[0]===t?(i=e[1],o=e[2]):(i=g=>t.subscribe(g),o=()=>t.getProgress(),e[0]=t,e[1]=i,e[2]=o);let l=(0,v.useSyncExternalStore)(i,o),s=l==="indeterminate"||l===100,c=s?void 0:l,d;e[3]!==s||e[4]!==c?(d=(0,w.jsx)(F,{value:c,indeterminate:s}),e[3]=s,e[4]=c,e[5]=d):d=e[5];let u;e[6]!==s||e[7]!==n||e[8]!==l?(u=!s&&n&&(0,w.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground text-right",children:[Math.round(l),"%"]}),e[6]=s,e[7]=n,e[8]=l,e[9]=u):u=e[9];let f;return e[10]!==d||e[11]!==u?(f=(0,w.jsxs)("div",{className:"mt-2 w-full min-w-[200px]",children:[d,u]}),e[10]=d,e[11]=u,e[12]=f):f=e[12],f};async function _e(r,e){let t=J.indeterminate(),a=j({title:r,description:v.createElement(Oe,{progress:t}),duration:1/0});try{let n=await e(t);return a.dismiss(),n}catch(n){throw a.dismiss(),n}}function Fe(r){let e=document.getElementById(ue.create(r));if(!e){q.error(`Output element not found for cell ${r}`);return}return e}var Me=500,Te=`
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }
`;async function ae(r){let e=Fe(r);if(!e)return;let t=await xe(e);if(t)return t;let a=Date.now(),n=await X(e,{extraStyleContent:Te,style:{maxHeight:"none",overflow:"visible"},height:e.scrollHeight}),i=Date.now()-a;return i>Me&&q.debug("toPng operation for element",e,`took ${i} ms (exceeds threshold)`),n}async function Ue(r,e){try{let t=await ae(r);if(!t)throw Error("Failed to get image data URL");R(t,h.toPNG(e))}catch(t){j({title:"Failed to download PNG",description:H(t),variant:"danger"})}}const Ae=()=>(document.body.classList.add("printing"),()=>{document.body.classList.remove("printing")});async function Ce(r){let{element:e,filename:t,prepare:a}=r,n=document.getElementById("App"),i=(n==null?void 0:n.scrollTop)??0,o;a&&(o=a(e));try{R(await X(e),h.toPNG(t))}catch{j({title:"Error",description:"Failed to download as PNG.",variant:"danger"})}finally{o==null||o(),document.body.classList.contains("printing")&&document.body.classList.remove("printing"),requestAnimationFrame(()=>{n==null||n.scrollTo(0,i)})}}function R(r,e){let t=document.createElement("a");t.href=r,t.download=e,t.click(),t.remove()}function oe(r,e){let t=URL.createObjectURL(r);R(t,e),URL.revokeObjectURL(t)}async function Ie(r){let e=de(),{filename:t,webpdf:a}=r;try{let n=await e.exportAsPDF({webpdf:a}),i=me.basename(t);oe(n,h.toPDF(i))}catch(n){throw j({title:"Failed to download",description:H(n),variant:"danger"}),n}}export{Ue as a,_e as c,h as d,ye as f,R as i,F as l,ve as m,Ie as n,Ce as o,he as p,oe as r,ae as s,Ae as t,J as u};
import{s as Ne}from"./chunk-LvLJmgfZ.js";import{t as wr}from"./react-Bj1aDYRI.js";import{t as gr}from"./compiler-runtime-B3qBwwSJ.js";import{n as Ie,r as G}from"./useEventListener-Cb-RVVEn.js";import{t as xr}from"./jsx-runtime-ZmTK25f3.js";import{t as ke}from"./cn-BKtXLv3a.js";import{t as yr}from"./createLucideIcon-BCdY6lG5.js";import{t as _r}from"./check-Dr3SxUsb.js";import{t as br}from"./chevron-right--18M_6o9.js";import{E as ue,S as ce,_ as S,a as Mr,c as Se,d as Cr,f as B,g as ee,i as Dr,m as jr,o as Rr,r as Nr,s as Ir,t as kr,u as Sr,v as Er,w as v,x as ne,y as Or}from"./Combination-BAEdC-rz.js";import{a as Tr,c as Ee,i as Pr,o as Fr,s as Oe}from"./dist-DwV58Fb1.js";import{a as Te,c as Ar,d as Pe,i as Fe,l as Kr,n as Lr,o as Gr,r as Ae,s as Ur,u as Ke}from"./menu-items-BMjcEb2j.js";var Le=yr("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),i=Ne(wr(),1),l=Ne(xr(),1),de="rovingFocusGroup.onEntryFocus",Vr={bubbles:!1,cancelable:!0},X="RovingFocusGroup",[pe,Ge,Br]=Pe(X),[Xr,fe]=ue(X,[Br]),[Hr,zr]=Xr(X),Ue=i.forwardRef((n,t)=>(0,l.jsx)(pe.Provider,{scope:n.__scopeRovingFocusGroup,children:(0,l.jsx)(pe.Slot,{scope:n.__scopeRovingFocusGroup,children:(0,l.jsx)(Yr,{...n,ref:t})})}));Ue.displayName=X;var Yr=i.forwardRef((n,t)=>{let{__scopeRovingFocusGroup:e,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:d=!1,...c}=n,m=i.useRef(null),x=G(t,m),w=Ke(a),[R,g]=ce({prop:s,defaultProp:u??null,onChange:p,caller:X}),[D,_]=i.useState(!1),b=ee(f),q=Ge(e),U=i.useRef(!1),[J,T]=i.useState(0);return i.useEffect(()=>{let M=m.current;if(M)return M.addEventListener(de,b),()=>M.removeEventListener(de,b)},[b]),(0,l.jsx)(Hr,{scope:e,orientation:r,dir:w,loop:o,currentTabStopId:R,onItemFocus:i.useCallback(M=>g(M),[g]),onItemShiftTab:i.useCallback(()=>_(!0),[]),onFocusableItemAdd:i.useCallback(()=>T(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>T(M=>M-1),[]),children:(0,l.jsx)(S.div,{tabIndex:D||J===0?-1:0,"data-orientation":r,...c,ref:x,style:{outline:"none",...n.style},onMouseDown:v(n.onMouseDown,()=>{U.current=!0}),onFocus:v(n.onFocus,M=>{let A=!U.current;if(M.target===M.currentTarget&&A&&!D){let P=new CustomEvent(de,Vr);if(M.currentTarget.dispatchEvent(P),!P.defaultPrevented){let V=q().filter(N=>N.focusable);Xe([V.find(N=>N.active),V.find(N=>N.id===R),...V].filter(Boolean).map(N=>N.ref.current),d)}}U.current=!1}),onBlur:v(n.onBlur,()=>_(!1))})})}),Ve="RovingFocusGroupItem",Be=i.forwardRef((n,t)=>{let{__scopeRovingFocusGroup:e,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...u}=n,p=B(),f=a||p,d=zr(Ve,e),c=d.currentTabStopId===f,m=Ge(e),{onFocusableItemAdd:x,onFocusableItemRemove:w,currentTabStopId:R}=d;return i.useEffect(()=>{if(r)return x(),()=>w()},[r,x,w]),(0,l.jsx)(pe.ItemSlot,{scope:e,id:f,focusable:r,active:o,children:(0,l.jsx)(S.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...u,ref:t,onMouseDown:v(n.onMouseDown,g=>{r?d.onItemFocus(f):g.preventDefault()}),onFocus:v(n.onFocus,()=>d.onItemFocus(f)),onKeyDown:v(n.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;let D=$r(g,d.orientation,d.dir);if(D!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let _=m().filter(b=>b.focusable).map(b=>b.ref.current);if(D==="last")_.reverse();else if(D==="prev"||D==="next"){D==="prev"&&_.reverse();let b=_.indexOf(g.currentTarget);_=d.loop?qr(_,b+1):_.slice(b+1)}setTimeout(()=>Xe(_))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:R!=null}):s})})});Be.displayName=Ve;var Wr={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Zr(n,t){return t==="rtl"?n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n:n}function $r(n,t,e){let r=Zr(n.key,e);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Wr[r]}function Xe(n,t=!1){let e=document.activeElement;for(let r of n)if(r===e||(r.focus({preventScroll:t}),document.activeElement!==e))return}function qr(n,t){return n.map((e,r)=>n[(t+r)%n.length])}var He=Ue,ze=Be,me=["Enter"," "],Jr=["ArrowDown","PageUp","Home"],Ye=["ArrowUp","PageDown","End"],Qr=[...Jr,...Ye],et={ltr:[...me,"ArrowRight"],rtl:[...me,"ArrowLeft"]},nt={ltr:["ArrowLeft"],rtl:["ArrowRight"]},H="Menu",[z,rt,tt]=Pe(H),[F,he]=ue(H,[tt,Ee,fe]),Y=Ee(),We=fe(),[Ze,E]=F(H),[ot,W]=F(H),$e=n=>{let{__scopeMenu:t,open:e=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=n,u=Y(t),[p,f]=i.useState(null),d=i.useRef(!1),c=ee(a),m=Ke(o);return i.useEffect(()=>{let x=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),(0,l.jsx)(Oe,{...u,children:(0,l.jsx)(Ze,{scope:t,open:e,onOpenChange:c,content:p,onContentChange:f,children:(0,l.jsx)(ot,{scope:t,onClose:i.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:m,modal:s,children:r})})})};$e.displayName=H;var at="MenuAnchor",ve=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n,o=Y(e);return(0,l.jsx)(Pr,{...o,...r,ref:t})});ve.displayName=at;var we="MenuPortal",[st,qe]=F(we,{forceMount:void 0}),Je=n=>{let{__scopeMenu:t,forceMount:e,children:r,container:o}=n,a=E(we,t);return(0,l.jsx)(st,{scope:t,forceMount:e,children:(0,l.jsx)(ne,{present:e||a.open,children:(0,l.jsx)(Cr,{asChild:!0,container:o,children:r})})})};Je.displayName=we;var j="MenuContent",[it,ge]=F(j),Qe=i.forwardRef((n,t)=>{let e=qe(j,n.__scopeMenu),{forceMount:r=e.forceMount,...o}=n,a=E(j,n.__scopeMenu),s=W(j,n.__scopeMenu);return(0,l.jsx)(z.Provider,{scope:n.__scopeMenu,children:(0,l.jsx)(ne,{present:r||a.open,children:(0,l.jsx)(z.Slot,{scope:n.__scopeMenu,children:s.modal?(0,l.jsx)(lt,{...o,ref:t}):(0,l.jsx)(ut,{...o,ref:t})})})})}),lt=i.forwardRef((n,t)=>{let e=E(j,n.__scopeMenu),r=i.useRef(null),o=G(t,r);return i.useEffect(()=>{let a=r.current;if(a)return Nr(a)},[]),(0,l.jsx)(xe,{...n,ref:o,trapFocus:e.open,disableOutsidePointerEvents:e.open,disableOutsideScroll:!0,onFocusOutside:v(n.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>e.onOpenChange(!1)})}),ut=i.forwardRef((n,t)=>{let e=E(j,n.__scopeMenu);return(0,l.jsx)(xe,{...n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>e.onOpenChange(!1)})}),ct=Or("MenuContent.ScrollLock"),xe=i.forwardRef((n,t)=>{let{__scopeMenu:e,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:u,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:m,onDismiss:x,disableOutsideScroll:w,...R}=n,g=E(j,e),D=W(j,e),_=Y(e),b=We(e),q=rt(e),[U,J]=i.useState(null),T=i.useRef(null),M=G(t,T,g.onContentChange),A=i.useRef(0),P=i.useRef(""),V=i.useRef(0),N=i.useRef(null),Ce=i.useRef("right"),se=i.useRef(0),mr=w?kr:i.Fragment,hr=w?{as:ct,allowPinchZoom:!0}:void 0,vr=h=>{var De,je;let C=P.current+h,I=q().filter(k=>!k.disabled),ie=document.activeElement,le=(De=I.find(k=>k.ref.current===ie))==null?void 0:De.textValue,Q=bt(I.map(k=>k.textValue),C,le),L=(je=I.find(k=>k.textValue===Q))==null?void 0:je.ref.current;(function k(Re){P.current=Re,window.clearTimeout(A.current),Re!==""&&(A.current=window.setTimeout(()=>k(""),1e3))})(C),L&&setTimeout(()=>L.focus())};i.useEffect(()=>()=>window.clearTimeout(A.current),[]),Mr();let K=i.useCallback(h=>{var C,I;return Ce.current===((C=N.current)==null?void 0:C.side)&&Ct(h,(I=N.current)==null?void 0:I.area)},[]);return(0,l.jsx)(it,{scope:e,searchRef:P,onItemEnter:i.useCallback(h=>{K(h)&&h.preventDefault()},[K]),onItemLeave:i.useCallback(h=>{var C;K(h)||((C=T.current)==null||C.focus(),J(null))},[K]),onTriggerLeave:i.useCallback(h=>{K(h)&&h.preventDefault()},[K]),pointerGraceTimerRef:V,onPointerGraceIntentChange:i.useCallback(h=>{N.current=h},[]),children:(0,l.jsx)(mr,{...hr,children:(0,l.jsx)(Dr,{asChild:!0,trapped:o,onMountAutoFocus:v(a,h=>{var C;h.preventDefault(),(C=T.current)==null||C.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,l.jsx)(jr,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:m,onDismiss:x,children:(0,l.jsx)(He,{asChild:!0,...b,dir:D.dir,orientation:"vertical",loop:r,currentTabStopId:U,onCurrentTabStopIdChange:J,onEntryFocus:v(p,h=>{D.isUsingKeyboardRef.current||h.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,l.jsx)(Fr,{role:"menu","aria-orientation":"vertical","data-state":gn(g.open),"data-radix-menu-content":"",dir:D.dir,..._,...R,ref:M,style:{outline:"none",...R.style},onKeyDown:v(R.onKeyDown,h=>{let C=h.target.closest("[data-radix-menu-content]")===h.currentTarget,I=h.ctrlKey||h.altKey||h.metaKey,ie=h.key.length===1;C&&(h.key==="Tab"&&h.preventDefault(),!I&&ie&&vr(h.key));let le=T.current;if(h.target!==le||!Qr.includes(h.key))return;h.preventDefault();let Q=q().filter(L=>!L.disabled).map(L=>L.ref.current);Ye.includes(h.key)&&Q.reverse(),yt(Q)}),onBlur:v(n.onBlur,h=>{h.currentTarget.contains(h.target)||(window.clearTimeout(A.current),P.current="")}),onPointerMove:v(n.onPointerMove,$(h=>{let C=h.target,I=se.current!==h.clientX;h.currentTarget.contains(C)&&I&&(Ce.current=h.clientX>se.current?"right":"left",se.current=h.clientX)}))})})})})})})});Qe.displayName=j;var dt="MenuGroup",ye=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n;return(0,l.jsx)(S.div,{role:"group",...r,ref:t})});ye.displayName=dt;var pt="MenuLabel",en=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n;return(0,l.jsx)(S.div,{...r,ref:t})});en.displayName=pt;var re="MenuItem",nn="menu.itemSelect",te=i.forwardRef((n,t)=>{let{disabled:e=!1,onSelect:r,...o}=n,a=i.useRef(null),s=W(re,n.__scopeMenu),u=ge(re,n.__scopeMenu),p=G(t,a),f=i.useRef(!1),d=()=>{let c=a.current;if(!e&&c){let m=new CustomEvent(nn,{bubbles:!0,cancelable:!0});c.addEventListener(nn,x=>r==null?void 0:r(x),{once:!0}),Er(c,m),m.defaultPrevented?f.current=!1:s.onClose()}};return(0,l.jsx)(rn,{...o,ref:p,disabled:e,onClick:v(n.onClick,d),onPointerDown:c=>{var m;(m=n.onPointerDown)==null||m.call(n,c),f.current=!0},onPointerUp:v(n.onPointerUp,c=>{var m;f.current||((m=c.currentTarget)==null||m.click())}),onKeyDown:v(n.onKeyDown,c=>{let m=u.searchRef.current!=="";e||m&&c.key===" "||me.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});te.displayName=re;var rn=i.forwardRef((n,t)=>{let{__scopeMenu:e,disabled:r=!1,textValue:o,...a}=n,s=ge(re,e),u=We(e),p=i.useRef(null),f=G(t,p),[d,c]=i.useState(!1),[m,x]=i.useState("");return i.useEffect(()=>{let w=p.current;w&&x((w.textContent??"").trim())},[a.children]),(0,l.jsx)(z.ItemSlot,{scope:e,disabled:r,textValue:o??m,children:(0,l.jsx)(ze,{asChild:!0,...u,focusable:!r,children:(0,l.jsx)(S.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:f,onPointerMove:v(n.onPointerMove,$(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:v(n.onPointerLeave,$(w=>s.onItemLeave(w))),onFocus:v(n.onFocus,()=>c(!0)),onBlur:v(n.onBlur,()=>c(!1))})})})}),ft="MenuCheckboxItem",tn=i.forwardRef((n,t)=>{let{checked:e=!1,onCheckedChange:r,...o}=n;return(0,l.jsx)(un,{scope:n.__scopeMenu,checked:e,children:(0,l.jsx)(te,{role:"menuitemcheckbox","aria-checked":oe(e)?"mixed":e,...o,ref:t,"data-state":Me(e),onSelect:v(o.onSelect,()=>r==null?void 0:r(oe(e)?!0:!e),{checkForDefaultPrevented:!1})})})});tn.displayName=ft;var on="MenuRadioGroup",[mt,ht]=F(on,{value:void 0,onValueChange:()=>{}}),an=i.forwardRef((n,t)=>{let{value:e,onValueChange:r,...o}=n,a=ee(r);return(0,l.jsx)(mt,{scope:n.__scopeMenu,value:e,onValueChange:a,children:(0,l.jsx)(ye,{...o,ref:t})})});an.displayName=on;var sn="MenuRadioItem",ln=i.forwardRef((n,t)=>{let{value:e,...r}=n,o=ht(sn,n.__scopeMenu),a=e===o.value;return(0,l.jsx)(un,{scope:n.__scopeMenu,checked:a,children:(0,l.jsx)(te,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Me(a),onSelect:v(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,e)},{checkForDefaultPrevented:!1})})})});ln.displayName=sn;var _e="MenuItemIndicator",[un,vt]=F(_e,{checked:!1}),cn=i.forwardRef((n,t)=>{let{__scopeMenu:e,forceMount:r,...o}=n,a=vt(_e,e);return(0,l.jsx)(ne,{present:r||oe(a.checked)||a.checked===!0,children:(0,l.jsx)(S.span,{...o,ref:t,"data-state":Me(a.checked)})})});cn.displayName=_e;var wt="MenuSeparator",dn=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n;return(0,l.jsx)(S.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});dn.displayName=wt;var gt="MenuArrow",pn=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n,o=Y(e);return(0,l.jsx)(Tr,{...o,...r,ref:t})});pn.displayName=gt;var be="MenuSub",[xt,fn]=F(be),mn=n=>{let{__scopeMenu:t,children:e,open:r=!1,onOpenChange:o}=n,a=E(be,t),s=Y(t),[u,p]=i.useState(null),[f,d]=i.useState(null),c=ee(o);return i.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),(0,l.jsx)(Oe,{...s,children:(0,l.jsx)(Ze,{scope:t,open:r,onOpenChange:c,content:f,onContentChange:d,children:(0,l.jsx)(xt,{scope:t,contentId:B(),triggerId:B(),trigger:u,onTriggerChange:p,children:e})})})};mn.displayName=be;var Z="MenuSubTrigger",hn=i.forwardRef((n,t)=>{let e=E(Z,n.__scopeMenu),r=W(Z,n.__scopeMenu),o=fn(Z,n.__scopeMenu),a=ge(Z,n.__scopeMenu),s=i.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:p}=a,f={__scopeMenu:n.__scopeMenu},d=i.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{let c=u.current;return()=>{window.clearTimeout(c),p(null)}},[u,p]),(0,l.jsx)(ve,{asChild:!0,...f,children:(0,l.jsx)(rn,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":e.open,"aria-controls":o.contentId,"data-state":gn(e.open),...n,ref:Ie(t,o.onTriggerChange),onClick:c=>{var m;(m=n.onClick)==null||m.call(n,c),!(n.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),e.open||e.onOpenChange(!0))},onPointerMove:v(n.onPointerMove,$(c=>{a.onItemEnter(c),!c.defaultPrevented&&!n.disabled&&!e.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{e.onOpenChange(!0),d()},100))})),onPointerLeave:v(n.onPointerLeave,$(c=>{var x,w;d();let m=(x=e.content)==null?void 0:x.getBoundingClientRect();if(m){let R=(w=e.content)==null?void 0:w.dataset.side,g=R==="right",D=g?-5:5,_=m[g?"left":"right"],b=m[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+D,y:c.clientY},{x:_,y:m.top},{x:b,y:m.top},{x:b,y:m.bottom},{x:_,y:m.bottom}],side:R}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:v(n.onKeyDown,c=>{var x;let m=a.searchRef.current!=="";n.disabled||m&&c.key===" "||et[r.dir].includes(c.key)&&(e.onOpenChange(!0),(x=e.content)==null||x.focus(),c.preventDefault())})})})});hn.displayName=Z;var vn="MenuSubContent",wn=i.forwardRef((n,t)=>{let e=qe(j,n.__scopeMenu),{forceMount:r=e.forceMount,...o}=n,a=E(j,n.__scopeMenu),s=W(j,n.__scopeMenu),u=fn(vn,n.__scopeMenu),p=i.useRef(null),f=G(t,p);return(0,l.jsx)(z.Provider,{scope:n.__scopeMenu,children:(0,l.jsx)(ne,{present:r||a.open,children:(0,l.jsx)(z.Slot,{scope:n.__scopeMenu,children:(0,l.jsx)(xe,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:f,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var c;s.isUsingKeyboardRef.current&&((c=p.current)==null||c.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:v(n.onFocusOutside,d=>{d.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:v(n.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:v(n.onKeyDown,d=>{var x;let c=d.currentTarget.contains(d.target),m=nt[s.dir].includes(d.key);c&&m&&(a.onOpenChange(!1),(x=u.trigger)==null||x.focus(),d.preventDefault())})})})})})});wn.displayName=vn;function gn(n){return n?"open":"closed"}function oe(n){return n==="indeterminate"}function Me(n){return oe(n)?"indeterminate":n?"checked":"unchecked"}function yt(n){let t=document.activeElement;for(let e of n)if(e===t||(e.focus(),document.activeElement!==t))return}function _t(n,t){return n.map((e,r)=>n[(t+r)%n.length])}function bt(n,t,e){let r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=e?n.indexOf(e):-1,a=_t(n,Math.max(o,0));r.length===1&&(a=a.filter(u=>u!==e));let s=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return s===e?void 0:s}function Mt(n,t){let{x:e,y:r}=n,o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){let u=t[a],p=t[s],f=u.x,d=u.y,c=p.x,m=p.y;d>r!=m>r&&e<(c-f)*(r-d)/(m-d)+f&&(o=!o)}return o}function Ct(n,t){return t?Mt({x:n.clientX,y:n.clientY},t):!1}function $(n){return t=>t.pointerType==="mouse"?n(t):void 0}var xn=$e,yn=ve,_n=Je,bn=Qe,Mn=ye,Cn=en,Dn=te,jn=tn,Rn=an,Nn=ln,In=cn,kn=dn,Sn=pn,En=mn,On=hn,Tn=wn,ae="DropdownMenu",[Dt,mo]=ue(ae,[he]),y=he(),[jt,Pn]=Dt(ae),Fn=n=>{let{__scopeDropdownMenu:t,children:e,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:u=!0}=n,p=y(t),f=i.useRef(null),[d,c]=ce({prop:o,defaultProp:a??!1,onChange:s,caller:ae});return(0,l.jsx)(jt,{scope:t,triggerId:B(),triggerRef:f,contentId:B(),open:d,onOpenChange:c,onOpenToggle:i.useCallback(()=>c(m=>!m),[c]),modal:u,children:(0,l.jsx)(xn,{...p,open:d,onOpenChange:c,dir:r,modal:u,children:e})})};Fn.displayName=ae;var An="DropdownMenuTrigger",Kn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,disabled:r=!1,...o}=n,a=Pn(An,e),s=y(e);return(0,l.jsx)(yn,{asChild:!0,...s,children:(0,l.jsx)(S.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ie(t,a.triggerRef),onPointerDown:v(n.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:v(n.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});Kn.displayName=An;var Rt="DropdownMenuPortal",Ln=n=>{let{__scopeDropdownMenu:t,...e}=n,r=y(t);return(0,l.jsx)(_n,{...r,...e})};Ln.displayName=Rt;var Gn="DropdownMenuContent",Un=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=Pn(Gn,e),a=y(e),s=i.useRef(!1);return(0,l.jsx)(bn,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:v(n.onCloseAutoFocus,u=>{var p;s.current||((p=o.triggerRef.current)==null||p.focus()),s.current=!1,u.preventDefault()}),onInteractOutside:v(n.onInteractOutside,u=>{let p=u.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,d=p.button===2||f;(!o.modal||d)&&(s.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Un.displayName=Gn;var Nt="DropdownMenuGroup",Vn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Mn,{...o,...r,ref:t})});Vn.displayName=Nt;var It="DropdownMenuLabel",Bn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Cn,{...o,...r,ref:t})});Bn.displayName=It;var kt="DropdownMenuItem",Xn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Dn,{...o,...r,ref:t})});Xn.displayName=kt;var St="DropdownMenuCheckboxItem",Hn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(jn,{...o,...r,ref:t})});Hn.displayName=St;var Et="DropdownMenuRadioGroup",Ot=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Rn,{...o,...r,ref:t})});Ot.displayName=Et;var Tt="DropdownMenuRadioItem",zn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Nn,{...o,...r,ref:t})});zn.displayName=Tt;var Pt="DropdownMenuItemIndicator",Yn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(In,{...o,...r,ref:t})});Yn.displayName=Pt;var Ft="DropdownMenuSeparator",Wn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(kn,{...o,...r,ref:t})});Wn.displayName=Ft;var At="DropdownMenuArrow",Kt=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Sn,{...o,...r,ref:t})});Kt.displayName=At;var Lt=n=>{let{__scopeDropdownMenu:t,children:e,open:r,onOpenChange:o,defaultOpen:a}=n,s=y(t),[u,p]=ce({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,l.jsx)(En,{...s,open:u,onOpenChange:p,children:e})},Gt="DropdownMenuSubTrigger",Zn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(On,{...o,...r,ref:t})});Zn.displayName=Gt;var Ut="DropdownMenuSubContent",$n=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Tn,{...o,...r,ref:t,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$n.displayName=Ut;var Vt=Fn,Bt=Kn,Xt=Ln,qn=Un,Ht=Vn,Jn=Bn,Qn=Xn,er=Hn,nr=zn,rr=Yn,tr=Wn,zt=Lt,or=Zn,ar=$n,O=gr(),Yt=Vt,Wt=Bt,Zt=Ht,sr=Ir(Xt),$t=Se(qn),qt=Se(ar),Jt=zt,ir=i.forwardRef((n,t)=>{let e=(0,O.c)(17),r,o,a,s,u;e[0]===n?(r=e[1],o=e[2],a=e[3],s=e[4],u=e[5]):({className:o,inset:a,showChevron:u,children:r,...s}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=u);let p=u===void 0?!0:u,f;e[6]!==o||e[7]!==a?(f=Kr({className:o,inset:a}),e[6]=o,e[7]=a,e[8]=f):f=e[8];let d;e[9]===p?d=e[10]:(d=p&&(0,l.jsx)(br,{className:"ml-auto h-4 w-4"}),e[9]=p,e[10]=d);let c;return e[11]!==r||e[12]!==s||e[13]!==t||e[14]!==f||e[15]!==d?(c=(0,l.jsxs)(or,{ref:t,className:f,...s,children:[r,d]}),e[11]=r,e[12]=s,e[13]=t,e[14]=f,e[15]=d,e[16]=c):c=e[16],c});ir.displayName=or.displayName;var lr=i.forwardRef((n,t)=>{let e=(0,O.c)(9),r,o;e[0]===n?(r=e[1],o=e[2]):({className:r,...o}=n,e[0]=n,e[1]=r,e[2]=o);let a;e[3]===r?a=e[4]:(a=ke(Ae({subcontent:!0}),"animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",r),e[3]=r,e[4]=a);let s;return e[5]!==o||e[6]!==t||e[7]!==a?(s=(0,l.jsx)(qt,{ref:t,className:a,...o}),e[5]=o,e[6]=t,e[7]=a,e[8]=s):s=e[8],s});lr.displayName=ar.displayName;var ur=i.forwardRef((n,t)=>{let e=(0,O.c)(17),r,o,a,s;e[0]===n?(r=e[1],o=e[2],a=e[3],s=e[4]):({className:r,scrollable:a,sideOffset:s,...o}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s);let u=a===void 0?!0:a,p=s===void 0?4:s,f;e[5]!==r||e[6]!==u?(f=ke(Ae(),"animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 print:hidden",u&&"overflow-auto",r),e[5]=r,e[6]=u,e[7]=f):f=e[7];let d=u?`calc(var(--radix-dropdown-menu-content-available-height) - ${Rr}px)`:void 0,c;e[8]!==o.style||e[9]!==d?(c={...o.style,maxHeight:d},e[8]=o.style,e[9]=d,e[10]=c):c=e[10];let m;return e[11]!==o||e[12]!==t||e[13]!==p||e[14]!==f||e[15]!==c?(m=(0,l.jsx)(sr,{children:(0,l.jsx)(Sr,{children:(0,l.jsx)($t,{ref:t,sideOffset:p,className:f,style:c,...o})})}),e[11]=o,e[12]=t,e[13]=p,e[14]=f,e[15]=c,e[16]=m):m=e[16],m});ur.displayName=qn.displayName;var cr=i.forwardRef((n,t)=>{let e=(0,O.c)(13),r,o,a,s;e[0]===n?(r=e[1],o=e[2],a=e[3],s=e[4]):({className:r,inset:o,variant:s,...a}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s);let u;e[5]!==r||e[6]!==o||e[7]!==s?(u=Gr({className:r,inset:o,variant:s}),e[5]=r,e[6]=o,e[7]=s,e[8]=u):u=e[8];let p;return e[9]!==a||e[10]!==t||e[11]!==u?(p=(0,l.jsx)(Qn,{ref:t,className:u,...a}),e[9]=a,e[10]=t,e[11]=u,e[12]=p):p=e[12],p});cr.displayName=Qn.displayName;var dr=i.forwardRef((n,t)=>{let e=(0,O.c)(15),r,o,a,s;e[0]===n?(r=e[1],o=e[2],a=e[3],s=e[4]):({className:a,children:o,checked:r,...s}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s);let u;e[5]===a?u=e[6]:(u=Te({className:a}),e[5]=a,e[6]=u);let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=Fe(),e[7]=p):p=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=(0,l.jsx)("span",{className:p,children:(0,l.jsx)(rr,{children:(0,l.jsx)(_r,{className:"h-4 w-4"})})}),e[8]=f):f=e[8];let d;return e[9]!==r||e[10]!==o||e[11]!==s||e[12]!==t||e[13]!==u?(d=(0,l.jsxs)(er,{ref:t,className:u,checked:r,...s,children:[f,o]}),e[9]=r,e[10]=o,e[11]=s,e[12]=t,e[13]=u,e[14]=d):d=e[14],d});dr.displayName=er.displayName;var Qt=i.forwardRef((n,t)=>{let e=(0,O.c)(13),r,o,a;e[0]===n?(r=e[1],o=e[2],a=e[3]):({className:o,children:r,...a}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a);let s;e[4]===o?s=e[5]:(s=Te({className:o}),e[4]=o,e[5]=s);let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=Fe(),e[6]=u):u=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)("span",{className:u,children:(0,l.jsx)(rr,{children:(0,l.jsx)(Le,{className:"h-2 w-2 fill-current"})})}),e[7]=p):p=e[7];let f;return e[8]!==r||e[9]!==a||e[10]!==t||e[11]!==s?(f=(0,l.jsxs)(nr,{ref:t,className:s,...a,children:[p,r]}),e[8]=r,e[9]=a,e[10]=t,e[11]=s,e[12]=f):f=e[12],f});Qt.displayName=nr.displayName;var pr=i.forwardRef((n,t)=>{let e=(0,O.c)(11),r,o,a;e[0]===n?(r=e[1],o=e[2],a=e[3]):({className:r,inset:o,...a}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a);let s;e[4]!==r||e[5]!==o?(s=Ur({className:r,inset:o}),e[4]=r,e[5]=o,e[6]=s):s=e[6];let u;return e[7]!==a||e[8]!==t||e[9]!==s?(u=(0,l.jsx)(Jn,{ref:t,className:s,...a}),e[7]=a,e[8]=t,e[9]=s,e[10]=u):u=e[10],u});pr.displayName=Jn.displayName;var fr=i.forwardRef((n,t)=>{let e=(0,O.c)(9),r,o;e[0]===n?(r=e[1],o=e[2]):({className:r,...o}=n,e[0]=n,e[1]=r,e[2]=o);let a;e[3]===r?a=e[4]:(a=Ar({className:r}),e[3]=r,e[4]=a);let s;return e[5]!==o||e[6]!==t||e[7]!==a?(s=(0,l.jsx)(tr,{ref:t,className:a,...o}),e[5]=o,e[6]=t,e[7]=a,e[8]=s):s=e[8],s});fr.displayName=tr.displayName;var eo=Lr;export{he as A,Rn as C,En as D,kn as E,He as M,fe as N,Tn as O,Le as P,_n as S,xn as T,bn as _,cr as a,In as b,fr as c,lr as d,ir as f,jn as g,Sn as h,Zt as i,ze as j,On as k,eo as l,yn as m,dr as n,pr as o,Wt as p,ur as r,sr as s,Yt as t,Jt as u,Mn as v,Nn as w,Cn as x,Dn as y};
import{t}from"./dtd-Fe_Eikw6.js";export{t as dtd};
var a;function u(e,t){return a=t,e}function l(e,t){var n=e.next();if(n=="<"&&e.eat("!")){if(e.eatWhile(/[\-]/))return t.tokenize=s,s(e,t);if(e.eatWhile(/[\w]/))return u("keyword","doindent")}else{if(n=="<"&&e.eat("?"))return t.tokenize=o("meta","?>"),u("meta",n);if(n=="#"&&e.eatWhile(/[\w]/))return u("atom","tag");if(n=="|")return u("keyword","separator");if(n.match(/[\(\)\[\]\-\.,\+\?>]/))return u(null,n);if(n.match(/[\[\]]/))return u("rule",n);if(n=='"'||n=="'")return t.tokenize=c(n),t.tokenize(e,t);if(e.eatWhile(/[a-zA-Z\?\+\d]/)){var r=e.current();return r.substr(r.length-1,r.length).match(/\?|\+/)!==null&&e.backUp(1),u("tag","tag")}else return n=="%"||n=="*"?u("number","number"):(e.eatWhile(/[\w\\\-_%.{,]/),u(null,null))}}function s(e,t){for(var n=0,r;(r=e.next())!=null;){if(n>=2&&r==">"){t.tokenize=l;break}n=r=="-"?n+1:0}return u("comment","comment")}function c(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){n.tokenize=l;break}r=!r&&i=="\\"}return u("string","tag")}}function o(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=l;break}n.next()}return e}}const k={name:"dtd",startState:function(){return{tokenize:l,baseIndent:0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t),r=t.stack[t.stack.length-1];return e.current()=="["||a==="doindent"||a=="["?t.stack.push("rule"):a==="endtag"?t.stack[t.stack.length-1]="endtag":e.current()=="]"||a=="]"||a==">"&&r=="rule"?t.stack.pop():a=="["&&t.stack.push("["),n},indent:function(e,t,n){var r=e.stack.length;return t.charAt(0)==="]"?r--:t.substr(t.length-1,t.length)===">"&&(t.substr(0,1)==="<"||a=="doindent"&&t.length>1||(a=="doindent"?r--:a==">"&&t.length>1||a=="tag"&&t!==">"||(a=="tag"&&e.stack[e.stack.length-1]=="rule"?r--:a=="tag"?r++:t===">"&&e.stack[e.stack.length-1]=="rule"&&a===">"?r--:t===">"&&e.stack[e.stack.length-1]=="rule"||(t.substr(0,1)!=="<"&&t.substr(0,1)===">"?--r:t===">"||--r))),(a==null||a=="]")&&r--),e.baseIndent+r*n.unit},languageData:{indentOnInput:/^\s*[\]>]$/}};export{k as t};
const e=JSON.parse(`{"array_agg":{"description":"Returns a LIST containing all the values of a column.","example":"list(A)"},"array_aggr":{"description":"Executes the aggregate function name on the elements of list","example":"list_aggregate([1, 2, NULL], 'min')"},"array_aggregate":{"description":"Executes the aggregate function name on the elements of list","example":"list_aggregate([1, 2, NULL], 'min')"},"array_apply":{"description":"Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details","example":"list_transform([1, 2, 3], x -> x + 1)"},"array_cat":{"description":"Concatenates two lists.","example":"list_concat([2, 3], [4, 5, 6])"},"array_concat":{"description":"Concatenates two lists.","example":"list_concat([2, 3], [4, 5, 6])"},"array_contains":{"description":"Returns true if the list contains the element.","example":"list_contains([1, 2, NULL], 1)"},"array_cosine_distance":{"description":"Compute the cosine distance between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_cosine_distance([1, 2, 3], [1, 2, 3])"},"array_cosine_similarity":{"description":"Compute the cosine similarity between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_cosine_similarity([1, 2, 3], [1, 2, 3])"},"array_cross_product":{"description":"Compute the cross product of two arrays of size 3. The array elements can not be NULL.","example":"array_cross_product([1, 2, 3], [1, 2, 3])"},"array_distance":{"description":"Compute the distance between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_distance([1, 2, 3], [1, 2, 3])"},"array_distinct":{"description":"Removes all duplicates and NULLs from a list. Does not preserve the original order","example":"list_distinct([1, 1, NULL, -3, 1, 5])"},"array_dot_product":{"description":"Compute the inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_inner_product([1, 2, 3], [1, 2, 3])"},"array_extract":{"description":"Extract the indexth (1-based) value from the array.","example":"array_extract('DuckDB', 2)"},"array_filter":{"description":"Constructs a list from those elements of the input list for which the lambda function returns true","example":"list_filter([3, 4, 5], x -> x > 4)"},"array_grade_up":{"description":"Returns the index of their sorted position.","example":"list_grade_up([3, 6, 1, 2])"},"array_has":{"description":"Returns true if the list contains the element.","example":"list_contains([1, 2, NULL], 1)"},"array_has_all":{"description":"Returns true if all elements of l2 are in l1. NULLs are ignored.","example":"list_has_all([1, 2, 3], [2, 3])"},"array_has_any":{"description":"Returns true if the lists have any element in common. NULLs are ignored.","example":"list_has_any([1, 2, 3], [2, 3, 4])"},"array_indexof":{"description":"Returns the index of the element if the list contains the element. If the element is not found, it returns NULL.","example":"list_position([1, 2, NULL], 2)"},"array_inner_product":{"description":"Compute the inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_inner_product([1, 2, 3], [1, 2, 3])"},"array_length":{"description":"Returns the length of the \`list\`.","example":"array_length([1,2,3])"},"array_negative_dot_product":{"description":"Compute the negative inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_negative_inner_product([1, 2, 3], [1, 2, 3])"},"array_negative_inner_product":{"description":"Compute the negative inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_negative_inner_product([1, 2, 3], [1, 2, 3])"},"array_position":{"description":"Returns the index of the element if the list contains the element. If the element is not found, it returns NULL.","example":"list_position([1, 2, NULL], 2)"},"array_reduce":{"description":"Returns a single value that is the result of applying the lambda function to each element of the input list, starting with the first element and then repeatedly applying the lambda function to the result of the previous application and the next element of the list. When an initial value is provided, it is used as the first argument to the lambda function","example":"list_reduce([1, 2, 3], (x, y) -> x + y)"},"array_resize":{"description":"Resizes the list to contain size elements. Initializes new elements with value or NULL if value is not set.","example":"list_resize([1, 2, 3], 5, 0)"},"array_reverse_sort":{"description":"Sorts the elements of the list in reverse order","example":"list_reverse_sort([3, 6, 1, 2])"},"array_select":{"description":"Returns a list based on the elements selected by the index_list.","example":"list_select([10, 20, 30, 40], [1, 4])"},"array_slice":{"description":"list_slice with added step feature.","example":"list_slice([4, 5, 6], 2, 3)"},"array_sort":{"description":"Sorts the elements of the list","example":"list_sort([3, 6, 1, 2])"},"array_transform":{"description":"Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details","example":"list_transform([1, 2, 3], x -> x + 1)"},"array_unique":{"description":"Counts the unique elements of a list","example":"list_unique([1, 1, NULL, -3, 1, 5])"},"array_value":{"description":"Create an ARRAY containing the argument values.","example":"array_value(4, 5, 6)"},"array_where":{"description":"Returns a list with the BOOLEANs in mask_list applied as a mask to the value_list.","example":"list_where([10, 20, 30, 40], [true, false, false, true])"},"array_zip":{"description":"Zips k LISTs to a new LIST whose length will be that of the longest list. Its elements are structs of k elements from each list list_1, \u2026, list_k, missing elements are replaced with NULL. If truncate is set, all lists are truncated to the smallest list length.","example":"list_zip([1, 2], [3, 4], [5, 6])"},"cast_to_type":{"description":"Casts the first argument to the type of the second argument","example":"cast_to_type('42', NULL::INTEGER)"},"concat":{"description":"Concatenates many strings together.","example":"concat('Hello', ' ', 'World')"},"concat_ws":{"description":"Concatenates strings together separated by the specified separator.","example":"concat_ws(', ', 'Banana', 'Apple', 'Melon')"},"contains":{"description":"Returns true if the \`list\` contains the \`element\`.","example":"contains([1, 2, NULL], 1)"},"count":{"description":"Returns the number of non-null values in arg.","example":"count(A)"},"count_if":{"description":"Counts the total number of TRUE values for a boolean column","example":"count_if(A)"},"countif":{"description":"Counts the total number of TRUE values for a boolean column","example":"count_if(A)"},"date_diff":{"description":"The number of partition boundaries between the timestamps","example":"date_diff('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"date_part":{"description":"Get subfield (equivalent to extract)","example":"date_part('minute', TIMESTAMP '1992-09-20 20:38:40')"},"date_sub":{"description":"The number of complete partitions between the timestamps","example":"date_sub('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"date_trunc":{"description":"Truncate to specified precision","example":"date_trunc('hour', TIMESTAMPTZ '1992-09-20 20:38:40')"},"datediff":{"description":"The number of partition boundaries between the timestamps","example":"date_diff('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"datepart":{"description":"Get subfield (equivalent to extract)","example":"date_part('minute', TIMESTAMP '1992-09-20 20:38:40')"},"datesub":{"description":"The number of complete partitions between the timestamps","example":"date_sub('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"datetrunc":{"description":"Truncate to specified precision","example":"date_trunc('hour', TIMESTAMPTZ '1992-09-20 20:38:40')"},"day":{"description":"Extract the day component from a date or timestamp","example":"day(timestamp '2021-08-03 11:59:44.123456')"},"dayname":{"description":"The (English) name of the weekday","example":"dayname(TIMESTAMP '1992-03-22')"},"dayofmonth":{"description":"Extract the dayofmonth component from a date or timestamp","example":"dayofmonth(timestamp '2021-08-03 11:59:44.123456')"},"dayofweek":{"description":"Extract the dayofweek component from a date or timestamp","example":"dayofweek(timestamp '2021-08-03 11:59:44.123456')"},"dayofyear":{"description":"Extract the dayofyear component from a date or timestamp","example":"dayofyear(timestamp '2021-08-03 11:59:44.123456')"},"generate_series":{"description":"Create a list of values between start and stop - the stop parameter is inclusive","example":"generate_series(2, 5, 3)"},"histogram":{"description":"Returns a LIST of STRUCTs with the fields bucket and count.","example":"histogram(A)"},"histogram_exact":{"description":"Returns a LIST of STRUCTs with the fields bucket and count matching the buckets exactly.","example":"histogram_exact(A, [0, 1, 2])"},"string_agg":{"description":"Concatenates the column string values with an optional separator.","example":"string_agg(A, '-')"},"string_split":{"description":"Splits the \`string\` along the \`separator\`","example":"string_split('hello-world', '-')"},"string_split_regex":{"description":"Splits the \`string\` along the \`regex\`","example":"string_split_regex('hello world; 42', ';? ')"},"string_to_array":{"description":"Splits the \`string\` along the \`separator\`","example":"string_split('hello-world', '-')"},"struct_concat":{"description":"Merge the multiple STRUCTs into a single STRUCT.","example":"struct_concat(struct_pack(i := 4), struct_pack(s := 'string'))"},"struct_extract":{"description":"Extract the named entry from the STRUCT.","example":"struct_extract({'i': 3, 'v2': 3, 'v3': 0}, 'i')"},"struct_extract_at":{"description":"Extract the entry from the STRUCT by position (starts at 1!).","example":"struct_extract_at({'i': 3, 'v2': 3, 'v3': 0}, 2)"},"struct_insert":{"description":"Adds field(s)/value(s) to an existing STRUCT with the argument values. The entry name(s) will be the bound variable name(s)","example":"struct_insert({'a': 1}, b := 2)"},"struct_pack":{"description":"Create a STRUCT containing the argument values. The entry name will be the bound variable name.","example":"struct_pack(i := 4, s := 'string')"},"substring":{"description":"Extract substring of \`length\` characters starting from character \`start\`. Note that a start value of 1 refers to the first character of the \`string\`.","example":"substring('Hello', 2, 2)"},"substring_grapheme":{"description":"Extract substring of \`length\` grapheme clusters starting from character \`start\`. Note that a start value of 1 refers to the first character of the \`string\`.","example":"substring_grapheme('\u{1F986}\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F\u{1F926}\u{1F3FD}\u200D\u2640\uFE0F\u{1F986}', 3, 2)"},"to_base":{"description":"Converts a value to a string in the given base radix, optionally padding with leading zeros to the minimum length","example":"to_base(42, 16)"},"to_base64":{"description":"Converts a \`blob\` to a base64 encoded \`string\`.","example":"base64('A'::BLOB)"},"to_binary":{"description":"Converts the value to binary representation","example":"bin(42)"},"to_centuries":{"description":"Construct a century interval","example":"to_centuries(5)"},"to_days":{"description":"Construct a day interval","example":"to_days(5)"},"to_decades":{"description":"Construct a decade interval","example":"to_decades(5)"},"to_hex":{"description":"Converts the value to hexadecimal representation.","example":"hex(42)"},"to_hours":{"description":"Construct a hour interval","example":"to_hours(5)"},"to_microseconds":{"description":"Construct a microsecond interval","example":"to_microseconds(5)"},"to_millennia":{"description":"Construct a millennium interval","example":"to_millennia(1)"},"to_milliseconds":{"description":"Construct a millisecond interval","example":"to_milliseconds(5.5)"},"to_minutes":{"description":"Construct a minute interval","example":"to_minutes(5)"},"to_months":{"description":"Construct a month interval","example":"to_months(5)"},"to_quarters":{"description":"Construct a quarter interval","example":"to_quarters(5)"},"to_seconds":{"description":"Construct a second interval","example":"to_seconds(5.5)"},"to_timestamp":{"description":"Converts secs since epoch to a timestamp with time zone","example":"to_timestamp(1284352323.5)"},"to_weeks":{"description":"Construct a week interval","example":"to_weeks(5)"},"to_years":{"description":"Construct a year interval","example":"to_years(5)"},"trim":{"description":"Removes any spaces from either side of the string.","example":"trim('>>>>test<<', '><')"}}`);var t={keywords:e};export{t as default,e as keywords};
import{t as a}from"./dylan-DjUZAjRK.js";export{a as dylan};
function p(e,n){for(var t=0;t<e.length;t++)n(e[t],t)}function k(e,n){for(var t=0;t<e.length;t++)if(n(e[t],t))return!0;return!1}var i={unnamedDefinition:["interface"],namedDefinition:["module","library","macro","C-struct","C-union","C-function","C-callable-wrapper"],typeParameterizedDefinition:["class","C-subtype","C-mapped-subtype"],otherParameterizedDefinition:["method","function","C-variable","C-address"],constantSimpleDefinition:["constant"],variableSimpleDefinition:["variable"],otherSimpleDefinition:["generic","domain","C-pointer-type","table"],statement:["if","block","begin","method","case","for","select","when","unless","until","while","iterate","profiling","dynamic-bind"],separator:["finally","exception","cleanup","else","elseif","afterwards"],other:["above","below","by","from","handler","in","instance","let","local","otherwise","slot","subclass","then","to","keyed-by","virtual"],signalingCalls:["signal","error","cerror","break","check-type","abort"]};i.otherDefinition=i.unnamedDefinition.concat(i.namedDefinition).concat(i.otherParameterizedDefinition),i.definition=i.typeParameterizedDefinition.concat(i.otherDefinition),i.parameterizedDefinition=i.typeParameterizedDefinition.concat(i.otherParameterizedDefinition),i.simpleDefinition=i.constantSimpleDefinition.concat(i.variableSimpleDefinition).concat(i.otherSimpleDefinition),i.keyword=i.statement.concat(i.separator).concat(i.other);var f="[-_a-zA-Z?!*@<>$%]+",x=RegExp("^"+f),l={symbolKeyword:f+":",symbolClass:"<"+f+">",symbolGlobal:"\\*"+f+"\\*",symbolConstant:"\\$"+f},D={symbolKeyword:"atom",symbolClass:"tag",symbolGlobal:"variableName.standard",symbolConstant:"variableName.constant"};for(var s in l)l.hasOwnProperty(s)&&(l[s]=RegExp("^"+l[s]));l.keyword=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var c={};c.keyword="keyword",c.definition="def",c.simpleDefinition="def",c.signalingCalls="builtin";var b={},h={};p(["keyword","definition","simpleDefinition","signalingCalls"],function(e){p(i[e],function(n){b[n]=e,h[n]=c[e]})});function u(e,n,t){return n.tokenize=t,t(e,n)}function m(e,n){var t=e.peek();if(t=="'"||t=='"')return e.next(),u(e,n,y(t,"string"));if(t=="/"){if(e.next(),e.eat("*"))return u(e,n,v);if(e.eat("/"))return e.skipToEnd(),"comment";e.backUp(1)}else if(/[+\-\d\.]/.test(t)){if(e.match(/^[+-]?[0-9]*\.[0-9]*([esdx][+-]?[0-9]+)?/i)||e.match(/^[+-]?[0-9]+([esdx][+-]?[0-9]+)/i)||e.match(/^[+-]?\d+/))return"number"}else{if(t=="#")return e.next(),t=e.peek(),t=='"'?(e.next(),u(e,n,y('"',"string"))):t=="b"?(e.next(),e.eatWhile(/[01]/),"number"):t=="x"?(e.next(),e.eatWhile(/[\da-f]/i),"number"):t=="o"?(e.next(),e.eatWhile(/[0-7]/),"number"):t=="#"?(e.next(),"punctuation"):t=="["||t=="("?(e.next(),"bracket"):e.match(/f|t|all-keys|include|key|next|rest/i)?"atom":(e.eatWhile(/[-a-zA-Z]/),"error");if(t=="~")return e.next(),t=e.peek(),t=="="&&(e.next(),t=e.peek(),t=="="&&e.next()),"operator";if(t==":"){if(e.next(),t=e.peek(),t=="=")return e.next(),"operator";if(t==":")return e.next(),"punctuation"}else{if("[](){}".indexOf(t)!=-1)return e.next(),"bracket";if(".,".indexOf(t)!=-1)return e.next(),"punctuation";if(e.match("end"))return"keyword"}}for(var o in l)if(l.hasOwnProperty(o)){var r=l[o];if(r instanceof Array&&k(r,function(a){return e.match(a)})||e.match(r))return D[o]}return/[+\-*\/^=<>&|]/.test(t)?(e.next(),"operator"):e.match("define")?"def":(e.eatWhile(/[\w\-]/),b.hasOwnProperty(e.current())?h[e.current()]:e.current().match(x)?"variable":(e.next(),"variableName.standard"))}function v(e,n){for(var t=!1,o=!1,r=0,a;a=e.next();){if(a=="/"&&t)if(r>0)r--;else{n.tokenize=m;break}else a=="*"&&o&&r++;t=a=="*",o=a=="/"}return"comment"}function y(e,n){return function(t,o){for(var r=!1,a,d=!1;(a=t.next())!=null;){if(a==e&&!r){d=!0;break}r=!r&&a=="\\"}return(d||!r)&&(o.tokenize=m),n}}const g={name:"dylan",startState:function(){return{tokenize:m,currentIndent:0}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},languageData:{commentTokens:{block:{open:"/*",close:"*/"}}}};export{g as t};
var c={slash:0,parenthesis:1},a={comment:0,_string:1,characterClass:2};const r={name:"ebnf",startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(e,t){if(e){switch(t.stack.length===0&&(e.peek()=='"'||e.peek()=="'"?(t.stringType=e.peek(),e.next(),t.stack.unshift(a._string)):e.match("/*")?(t.stack.unshift(a.comment),t.commentType=c.slash):e.match("(*")&&(t.stack.unshift(a.comment),t.commentType=c.parenthesis)),t.stack[0]){case a._string:for(;t.stack[0]===a._string&&!e.eol();)e.peek()===t.stringType?(e.next(),t.stack.shift()):e.peek()==="\\"?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return t.lhs?"property":"string";case a.comment:for(;t.stack[0]===a.comment&&!e.eol();)t.commentType===c.slash&&e.match("*/")||t.commentType===c.parenthesis&&e.match("*)")?(t.stack.shift(),t.commentType=null):e.match(/^.[^\*]*/);return"comment";case a.characterClass:for(;t.stack[0]===a.characterClass&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(".")||t.stack.shift();return"operator"}var s=e.peek();switch(s){case"[":return e.next(),t.stack.unshift(a.characterClass),"bracket";case":":case"|":case";":return e.next(),"operator";case"%":if(e.match("%%"))return"header";if(e.match(/[%][A-Za-z]+/))return"keyword";if(e.match(/[%][}]/))return"bracket";break;case"/":if(e.match(/[\/][A-Za-z]+/))return"keyword";case"\\":if(e.match(/[\][a-z]+/))return"string.special";case".":if(e.match("."))return"atom";case"*":case"-":case"+":case"^":if(e.match(s))return"atom";case"$":if(e.match("$$"))return"builtin";if(e.match(/[$][0-9]+/))return"variableName.special";case"<":if(e.match(/<<[a-zA-Z_]+>>/))return"builtin"}return e.match("//")?(e.skipToEnd(),"comment"):e.match("return")?"operator":e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?e.match(/(?=[\(.])/)?"variable":e.match(/(?=[\s\n]*[:=])/)?"def":"variableName.special":["[","]","(",")"].indexOf(e.peek())==-1?(e.eatSpace()||e.next(),null):(e.next(),"bracket")}}};export{r as ebnf};
import{t as e}from"./ecl-qgyT1LqI.js";export{e as ecl};
function s(e){for(var n={},t=e.split(" "),r=0;r<t.length;++r)n[t[r]]=!0;return n}function b(e,n){return n.startOfLine?(e.skipToEnd(),"meta"):!1}var v=s("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"),x=s("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),k=s("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"),m=s("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),w=s("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),l=s("catch class do else finally for if switch try while"),E=s("true false null"),f={"#":b},h=/[+\-*&%=<>!?|\/]/,o;function c(e,n){var t=e.next();if(f[t]){var r=f[t](e,n);if(r!==!1)return r}if(t=='"'||t=="'")return n.tokenize=I(t),n.tokenize(e,n);if(/[\[\]{}\(\),;\:\.]/.test(t))return o=t,null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(t=="/"){if(e.eat("*"))return n.tokenize=y,y(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(h.test(t))return e.eatWhile(h),"operator";e.eatWhile(/[\w\$_]/);var a=e.current().toLowerCase();if(v.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"keyword";if(x.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"variable";if(k.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"modifier";if(m.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"type";if(w.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"builtin";for(var i=a.length-1;i>=0&&(!isNaN(a[i])||a[i]=="_");)--i;if(i>0){var d=a.substr(0,i+1);if(m.propertyIsEnumerable(d))return l.propertyIsEnumerable(d)&&(o="newstatement"),"type"}return E.propertyIsEnumerable(a)?"atom":null}function I(e){return function(n,t){for(var r=!1,a,i=!1;(a=n.next())!=null;){if(a==e&&!r){i=!0;break}r=!r&&a=="\\"}return(i||!r)&&(t.tokenize=c),"string"}}function y(e,n){for(var t=!1,r;r=e.next();){if(r=="/"&&t){n.tokenize=c;break}t=r=="*"}return"comment"}function g(e,n,t,r,a){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=a}function p(e,n,t){return e.context=new g(e.indented,n,t,null,e.context)}function u(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const z={name:"ecl",startState:function(e){return{tokenize:null,context:new g(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align??(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;o=null;var r=(n.tokenize||c)(e,n);if(r=="comment"||r=="meta")return r;if(t.align??(t.align=!0),(o==";"||o==":")&&t.type=="statement")u(n);else if(o=="{")p(n,e.column(),"}");else if(o=="[")p(n,e.column(),"]");else if(o=="(")p(n,e.column(),")");else if(o=="}"){for(;t.type=="statement";)t=u(n);for(t.type=="}"&&(t=u(n));t.type=="statement";)t=u(n)}else o==t.type?u(n):(t.type=="}"||t.type=="top"||t.type=="statement"&&o=="newstatement")&&p(n,e.column(),"statement");return n.startOfLine=!1,r},indent:function(e,n,t){if(e.tokenize!=c&&e.tokenize!=null)return 0;var r=e.context,a=n&&n.charAt(0);r.type=="statement"&&a=="}"&&(r=r.prev);var i=a==r.type;return r.type=="statement"?r.indented+(a=="{"?0:t.unit):r.align?r.column+(i?0:1):r.indented+(i?0:t.unit)},languageData:{indentOnInput:/^\s*[{}]$/}};export{z as t};

Sorry, the diff of this file is too big to display

import{t as e}from"./eiffel-Dgulx8rf.js";export{e as eiffel};
function o(e){for(var r={},t=0,n=e.length;t<n;++t)r[e[t]]=!0;return r}var s=o("note.across.when.variant.until.unique.undefine.then.strip.select.retry.rescue.require.rename.reference.redefine.prefix.once.old.obsolete.loop.local.like.is.inspect.infix.include.if.frozen.from.external.export.ensure.end.elseif.else.do.creation.create.check.alias.agent.separate.invariant.inherit.indexing.feature.expanded.deferred.class.Void.True.Result.Precursor.False.Current.create.attached.detachable.as.and.implies.not.or".split(".")),u=o([":=","and then","and","or","<<",">>"]);function c(e,r,t){return t.tokenize.push(e),e(r,t)}function f(e,r){if(e.eatSpace())return null;var t=e.next();return t=='"'||t=="'"?c(p(t,"string"),e,r):t=="-"&&e.eat("-")?(e.skipToEnd(),"comment"):t==":"&&e.eat("=")?"operator":/[0-9]/.test(t)?(e.eatWhile(/[xXbBCc0-9\.]/),e.eat(/[\?\!]/),"variable"):/[a-zA-Z_0-9]/.test(t)?(e.eatWhile(/[a-zA-Z_0-9]/),e.eat(/[\?\!]/),"variable"):/[=+\-\/*^%<>~]/.test(t)?(e.eatWhile(/[=+\-\/*^%<>~]/),"operator"):null}function p(e,r,t){return function(n,l){for(var a=!1,i;(i=n.next())!=null;){if(i==e&&(t||!a)){l.tokenize.pop();break}a=!a&&i=="%"}return r}}const d={name:"eiffel",startState:function(){return{tokenize:[f]}},token:function(e,r){var t=r.tokenize[r.tokenize.length-1](e,r);if(t=="variable"){var n=e.current();t=s.propertyIsEnumerable(e.current())?"keyword":u.propertyIsEnumerable(e.current())?"operator":/^[A-Z][A-Z_0-9]*$/g.test(n)?"tag":/^0[bB][0-1]+$/g.test(n)||/^0[cC][0-7]+$/g.test(n)||/^0[xX][a-fA-F0-9]+$/g.test(n)||/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(n)||/^[0-9]+$/g.test(n)?"number":"variable"}return t},languageData:{commentTokens:{line:"--"}}};export{d as t};
import{t as c}from"./createLucideIcon-BCdY6lG5.js";var r=c("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);export{r as t};
import{t as c}from"./createLucideIcon-BCdY6lG5.js";var e=c("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);export{e as t};
import{t as e}from"./elm-BvFY4GJb.js";export{e as elm};
function o(t,e,r){return e(r),r(t,e)}var p=/[a-z]/,m=/[A-Z]/,u=/[a-zA-Z0-9_]/,a=/[0-9]/,g=/[0-9A-Fa-f]/,f=/[-&*+.\\/<>=?^|:]/,x=/[(),[\]{}]/,k=/[ \v\f]/;function n(){return function(t,e){if(t.eatWhile(k))return null;var r=t.next();if(x.test(r))return r==="{"&&t.eat("-")?o(t,e,s(1)):r==="["&&t.match("glsl|")?o(t,e,T):"builtin";if(r==="'")return o(t,e,v);if(r==='"')return t.eat('"')?t.eat('"')?o(t,e,d):"string":o(t,e,h);if(m.test(r))return t.eatWhile(u),"type";if(p.test(r)){var i=t.pos===1;return t.eatWhile(u),i?"def":"variable"}if(a.test(r)){if(r==="0"){if(t.eat(/[xX]/))return t.eatWhile(g),"number"}else t.eatWhile(a);return t.eat(".")&&t.eatWhile(a),t.eat(/[eE]/)&&(t.eat(/[-+]/),t.eatWhile(a)),"number"}return f.test(r)?r==="-"&&t.eat("-")?(t.skipToEnd(),"comment"):(t.eatWhile(f),"keyword"):r==="_"?"keyword":"error"}}function s(t){return t==0?n():function(e,r){for(;!e.eol();){var i=e.next();if(i=="{"&&e.eat("-"))++t;else if(i=="-"&&e.eat("}")&&(--t,t===0))return r(n()),"comment"}return r(s(t)),"comment"}}function d(t,e){for(;!t.eol();)if(t.next()==='"'&&t.eat('"')&&t.eat('"'))return e(n()),"string";return"string"}function h(t,e){for(;t.skipTo('\\"');)t.next(),t.next();return t.skipTo('"')?(t.next(),e(n()),"string"):(t.skipToEnd(),e(n()),"error")}function v(t,e){for(;t.skipTo("\\'");)t.next(),t.next();return t.skipTo("'")?(t.next(),e(n()),"string"):(t.skipToEnd(),e(n()),"error")}function T(t,e){for(;!t.eol();)if(t.next()==="|"&&t.eat("]"))return e(n()),"string";return"string"}var W={case:1,of:1,as:1,if:1,then:1,else:1,let:1,in:1,type:1,alias:1,module:1,where:1,import:1,exposing:1,port:1};const y={name:"elm",startState:function(){return{f:n()}},copyState:function(t){return{f:t.f}},token:function(t,e){var r=e.f(t,function(c){e.f=c}),i=t.current();return W.hasOwnProperty(i)?"keyword":r},languageData:{commentTokens:{line:"--"}}};export{y as t};
function i(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,n=i(function(e){return a.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});export{i as n,n as t};
import{s as d}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-Bj1aDYRI.js";import{t as h}from"./compiler-runtime-B3qBwwSJ.js";import{t as u}from"./jsx-runtime-ZmTK25f3.js";var N=h(),g=d(p(),1),c=d(u(),1);const j=f=>{let e=(0,N.c)(15),{title:i,description:x,icon:m,action:n}=f,t;e[0]===m?t=e[1]:(t=m&&g.cloneElement(m,{className:"text-accent-foreground flex-shrink-0"}),e[0]=m,e[1]=t);let s;e[2]===i?s=e[3]:(s=(0,c.jsx)("span",{className:"mt-1 text-accent-foreground",children:i}),e[2]=i,e[3]=s);let r;e[4]!==t||e[5]!==s?(r=(0,c.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[t,s]}),e[4]=t,e[5]=s,e[6]=r):r=e[6];let l;e[7]===x?l=e[8]:(l=(0,c.jsx)("span",{className:"text-muted-foreground text-sm",children:x}),e[7]=x,e[8]=l);let a;e[9]===n?a=e[10]:(a=n&&(0,c.jsx)("div",{className:"mt-2",children:n}),e[9]=n,e[10]=a);let o;return e[11]!==r||e[12]!==l||e[13]!==a?(o=(0,c.jsxs)("div",{className:"mx-6 my-6 flex flex-col gap-2",children:[r,l,a]}),e[11]=r,e[12]=l,e[13]=a,e[14]=o):o=e[14],o};export{j as t};
import{n as g,t as y}from"./toDate-DETS9bBd.js";var b={};function v(){return b}function w(t){let a=y(t),e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),t-+e}function p(t,...a){let e=g.bind(null,t||a.find(n=>typeof n=="object"));return a.map(e)}var M={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const W=(t,a,e)=>{let n,i=M[t];return n=typeof i=="string"?i:a===1?i.one:i.other.replace("{{count}}",a.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function m(t){return(a={})=>{let e=a.width?String(a.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const P={date:m({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:m({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:m({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var k={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const S=(t,a,e,n)=>k[t];function d(t){return(a,e)=>{let n=e!=null&&e.context?String(e.context):"standalone",i;if(n==="formatting"&&t.formattingValues){let r=t.defaultFormattingWidth||t.defaultWidth,o=e!=null&&e.width?String(e.width):r;i=t.formattingValues[o]||t.formattingValues[r]}else{let r=t.defaultWidth,o=e!=null&&e.width?String(e.width):t.defaultWidth;i=t.values[o]||t.values[r]}let u=t.argumentCallback?t.argumentCallback(a):a;return i[u]}}const C={ordinalNumber:(t,a)=>{let e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:d({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:d({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:d({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:d({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:d({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function l(t){return(a,e={})=>{let n=e.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],u=a.match(i);if(!u)return null;let r=u[0],o=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(o)?A(o,h=>h.test(r)):j(o,h=>h.test(r)),s;s=t.valueCallback?t.valueCallback(c):c,s=e.valueCallback?e.valueCallback(s):s;let f=a.slice(r.length);return{value:s,rest:f}}}function j(t,a){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&a(t[e]))return e}function A(t,a){for(let e=0;e<t.length;e++)if(a(t[e]))return e}function T(t){return(a,e={})=>{let n=a.match(t.matchPattern);if(!n)return null;let i=n[0],u=a.match(t.parsePattern);if(!u)return null;let r=t.valueCallback?t.valueCallback(u[0]):u[0];r=e.valueCallback?e.valueCallback(r):r;let o=a.slice(i.length);return{value:r,rest:o}}}const x={code:"en-US",formatDistance:W,formatLong:P,formatRelative:S,localize:C,match:{ordinalNumber:T({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};export{v as i,p as n,w as r,x as t};
var $;import"./purify.es-DZrAQFIu.js";import{u as vt}from"./src-CvyFXpBy.js";import{c as Dt,g as Lt}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as h,r as x,t as Mt}from"./src-CsZby044.js";import{$ as wt,B as Bt,C as Ft,U as Yt,_ as Pt,a as zt,b as J,v as Gt,z as Kt}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as Ut}from"./channel-CdzZX-OR.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import{r as Zt,t as Wt}from"./chunk-N4CR4FBY-BNoQB557.js";import{t as jt}from"./chunk-55IACEB6-njZIr50E.js";import{t as Qt}from"./chunk-QN33PNHL-BOQncxfy.js";var ut=(function(){var i=h(function(r,u,c,s){for(c||(c={}),s=r.length;s--;c[r[s]]=u);return c},"o"),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],o=[1,10],y=[1,11],l=[1,12],a=[1,13],_=[1,20],m=[1,21],E=[1,22],v=[1,23],D=[1,24],N=[1,19],L=[1,25],U=[1,26],M=[1,18],tt=[1,33],et=[1,34],it=[1,35],st=[1,36],nt=[1,37],yt=[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],S=[1,43],w=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],T=[1,58],P=[1,62],z=[1,64],Z=[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],dt=[63,64,65,66,67],pt=[1,81],_t=[1,80],mt=[1,78],gt=[1,79],bt=[6,10,42,47],I=[6,10,13,41,42,47,48,49],W=[1,89],j=[1,88],Q=[1,87],G=[19,56],ft=[1,98],Et=[1,97],rt=[19,56,58,60],at={trace:h(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:h(function(r,u,c,s,d,t,K){var e=t.length-1;switch(d){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:s.addEntity(t[e-4]),s.addEntity(t[e-2]),s.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:s.addEntity(t[e-8]),s.addEntity(t[e-4]),s.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),s.setClass([t[e-8]],t[e-6]),s.setClass([t[e-4]],t[e-2]);break;case 10:s.addEntity(t[e-6]),s.addEntity(t[e-2]),s.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),s.setClass([t[e-6]],t[e-4]);break;case 11:s.addEntity(t[e-6]),s.addEntity(t[e-4]),s.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),s.setClass([t[e-4]],t[e-2]);break;case 12:s.addEntity(t[e-3]),s.addAttributes(t[e-3],t[e-1]);break;case 13:s.addEntity(t[e-5]),s.addAttributes(t[e-5],t[e-1]),s.setClass([t[e-5]],t[e-3]);break;case 14:s.addEntity(t[e-2]);break;case 15:s.addEntity(t[e-4]),s.setClass([t[e-4]],t[e-2]);break;case 16:s.addEntity(t[e]);break;case 17:s.addEntity(t[e-2]),s.setClass([t[e-2]],t[e]);break;case 18:s.addEntity(t[e-6],t[e-4]),s.addAttributes(t[e-6],t[e-1]);break;case 19:s.addEntity(t[e-8],t[e-6]),s.addAttributes(t[e-8],t[e-1]),s.setClass([t[e-8]],t[e-3]);break;case 20:s.addEntity(t[e-5],t[e-3]);break;case 21:s.addEntity(t[e-7],t[e-5]),s.setClass([t[e-7]],t[e-2]);break;case 22:s.addEntity(t[e-3],t[e-1]);break;case 23:s.addEntity(t[e-5],t[e-3]),s.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),s.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),s.setAccDescription(this.$);break;case 32:s.setDirection("TB");break;case 33:s.setDirection("BT");break;case 34:s.setDirection("RL");break;case 35:s.setDirection("LR");break;case 36:this.$=t[e-3],s.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],s.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],s.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.$=s.Cardinality.ZERO_OR_ONE;break;case 70:this.$=s.Cardinality.ZERO_OR_MORE;break;case 71:this.$=s.Cardinality.ONE_OR_MORE;break;case 72:this.$=s.Cardinality.ONLY_ONE;break;case 73:this.$=s.Cardinality.MD_PARENT;break;case 74:this.$=s.Identification.NON_IDENTIFYING;break;case 75:this.$=s.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:y,26:l,28:a,29:14,30:15,31:16,32:17,33:_,34:m,35:E,36:v,37:D,40:N,43:L,44:U,50:M},i(n,[2,7],{1:[2,1]}),i(n,[2,3]),{9:27,11:9,22:o,24:y,26:l,28:a,29:14,30:15,31:16,32:17,33:_,34:m,35:E,36:v,37:D,40:N,43:L,44:U,50:M},i(n,[2,5]),i(n,[2,6]),i(n,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:tt,64:et,65:it,66:st,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},i(n,[2,27]),i(n,[2,28]),i(n,[2,29]),i(n,[2,30]),i(n,[2,31]),i(yt,[2,54]),i(yt,[2,55]),i(n,[2,32]),i(n,[2,33]),i(n,[2,34]),i(n,[2,35]),{16:41,40:O,41:S},{16:44,40:O,41:S},{16:45,40:O,41:S},i(n,[2,4]),{11:46,40:N,50:M},{16:47,40:O,41:S},{18:48,19:[1,49],51:50,52:51,56:w},{11:53,40:N,50:M},{62:54,68:[1,55],69:[1,56]},i(B,[2,69]),i(B,[2,70]),i(B,[2,71]),i(B,[2,72]),i(B,[2,73]),i(n,[2,24]),i(n,[2,25]),i(n,[2,26]),{13:F,38:57,41:Y,42:T,45:59,46:60,48:P,49:z},i(Z,[2,37]),i(Z,[2,38]),{16:65,40:O,41:S,42:T},{13:F,38:66,41:Y,42:T,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},i(n,[2,17],{61:32,12:69,17:[1,70],42:T,63:tt,64:et,65:it,66:st,67:nt}),{19:[1,71]},i(n,[2,14]),{18:72,19:[2,56],51:50,52:51,56:w},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:tt,64:et,65:it,66:st,67:nt},i(dt,[2,74]),i(dt,[2,75]),{6:pt,10:_t,39:77,42:mt,47:gt},{40:[1,82],41:[1,83]},i(bt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),i(I,[2,45]),i(I,[2,50]),i(I,[2,51]),i(I,[2,52]),i(I,[2,53]),i(n,[2,41],{42:T}),{6:pt,10:_t,39:85,42:mt,47:gt},{14:86,40:W,50:j,70:Q},{16:90,40:O,41:S},{11:91,40:N,50:M},{18:92,19:[1,93],51:50,52:51,56:w},i(n,[2,12]),{19:[2,57]},i(G,[2,58],{54:94,55:95,57:96,59:ft,60:Et}),i([19,56,59,60],[2,63]),i(n,[2,22],{15:[1,100],17:[1,99]}),i([40,50],[2,68]),i(n,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},i(n,[2,47]),i(n,[2,48]),i(n,[2,49]),i(Z,[2,39]),i(Z,[2,40]),i(I,[2,46]),i(n,[2,42]),i(n,[2,8]),i(n,[2,76]),i(n,[2,77]),i(n,[2,78]),{13:[1,102],42:T},{13:[1,104],15:[1,103]},{19:[1,105]},i(n,[2,15]),i(G,[2,59],{55:106,58:[1,107],60:Et}),i(G,[2,60]),i(rt,[2,64]),i(G,[2,67]),i(rt,[2,66]),{18:108,19:[1,109],51:50,52:51,56:w},{16:110,40:O,41:S},i(bt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:W,50:j,70:Q},{16:112,40:O,41:S},{14:113,40:W,50:j,70:Q},i(n,[2,13]),i(G,[2,61]),{57:114,59:ft},{19:[1,115]},i(n,[2,20]),i(n,[2,23],{17:[1,116],42:T}),i(n,[2,11]),{13:[1,117],42:T},i(n,[2,10]),i(rt,[2,65]),i(n,[2,18]),{18:118,19:[1,119],51:50,52:51,56:w},{14:120,40:W,50:j,70:Q},{19:[1,121]},i(n,[2,21]),i(n,[2,9]),i(n,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:h(function(r,u){if(u.recoverable)this.trace(r);else{var c=Error(r);throw c.hash=u,c}},"parseError"),parse:h(function(r){var u=this,c=[0],s=[],d=[null],t=[],K=this.table,e="",q=0,kt=0,Ot=0,It=2,St=1,Ct=t.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(A.yy[ct]=this.yy[ct]);p.setInput(r,A.yy),A.yy.lexer=p,A.yy.parser=this,p.yylloc===void 0&&(p.yylloc={});var ot=p.yylloc;t.push(ot);var xt=p.options&&p.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $t(f){c.length-=2*f,d.length-=f,t.length-=f}h($t,"popStack");function Tt(){var f=s.pop()||p.lex()||St;return typeof f!="number"&&(f instanceof Array&&(s=f,f=s.pop()),f=u.symbols_[f]||f),f}h(Tt,"lex");for(var g,lt,R,b,ht,C={},H,k,Nt,V;;){if(R=c[c.length-1],this.defaultActions[R]?b=this.defaultActions[R]:(g??(g=Tt()),b=K[R]&&K[R][g]),b===void 0||!b.length||!b[0]){var At="";for(H in V=[],K[R])this.terminals_[H]&&H>It&&V.push("'"+this.terminals_[H]+"'");At=p.showPosition?"Parse error on line "+(q+1)+`:
`+p.showPosition()+`
Expecting `+V.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(q+1)+": Unexpected "+(g==St?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(At,{text:p.match,token:this.terminals_[g]||g,line:p.yylineno,loc:ot,expected:V})}if(b[0]instanceof Array&&b.length>1)throw Error("Parse Error: multiple actions possible at state: "+R+", token: "+g);switch(b[0]){case 1:c.push(g),d.push(p.yytext),t.push(p.yylloc),c.push(b[1]),g=null,lt?(g=lt,lt=null):(kt=p.yyleng,e=p.yytext,q=p.yylineno,ot=p.yylloc,Ot>0&&Ot--);break;case 2:if(k=this.productions_[b[1]][1],C.$=d[d.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},xt&&(C._$.range=[t[t.length-(k||1)].range[0],t[t.length-1].range[1]]),ht=this.performAction.apply(C,[e,kt,q,A.yy,b[1],d,t].concat(Ct)),ht!==void 0)return ht;k&&(c=c.slice(0,-1*k*2),d=d.slice(0,-1*k),t=t.slice(0,-1*k)),c.push(this.productions_[b[1]][0]),d.push(C.$),t.push(C._$),Nt=K[c[c.length-2]][c[c.length-1]],c.push(Nt);break;case 3:return!0}}return!0},"parse")};at.lexer=(function(){return{EOF:1,parseError:h(function(r,u){if(this.yy.parser)this.yy.parser.parseError(r,u);else throw Error(r)},"parseError"),setInput:h(function(r,u){return this.yy=u||this.yy||{},this._input=r,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 r=this._input[0];return this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r,r.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:h(function(r){var u=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var s=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 d=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===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),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(r){this.unput(this.match.slice(r))},"less"),pastInput:h(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var r=this.pastInput(),u=Array(r.length+1).join("-");return r+this.upcomingInput()+`
`+u+"^"},"showPosition"),test_match:h(function(r,u){var c,s,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),s=r[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],c=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in d)this[t]=d[t];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,u,c,s;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),t=0;t<d.length;t++)if(c=this._input.match(this.rules[d[t]]),c&&(!u||c[0].length>u[0].length)){if(u=c,s=t,this.options.backtrack_lexer){if(r=this.test_match(c,d[t]),r!==!1)return r;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(r=this.test_match(u,d[s]),r===!1?!1:r):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(){return this.next()||this.lex()},"lex"),begin:h(function(r){this.conditionStack.push(r)},"begin"),popState:h(function(){return this.conditionStack.length-1>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(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},"topState"),pushState:h(function(r){this.begin(r)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(r,u,c,s){switch(c){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 u.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 u.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}}}})();function X(){this.yy={}}return h(X,"Parser"),X.prototype=at,at.Parser=X,new X})();ut.parser=ut;var Xt=ut,qt=($=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=Bt,this.getAccTitle=Gt,this.setAccDescription=Kt,this.getAccDescription=Pt,this.setDiagramTitle=Yt,this.getDiagramTitle=Ft,this.getConfig=h(()=>J().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(n,o=""){var y;return this.entities.has(n)?!((y=this.entities.get(n))!=null&&y.alias)&&o&&(this.entities.get(n).alias=o,x.info(`Add alias '${o}' to entity '${n}'`)):(this.entities.set(n,{id:`entity-${n}-${this.entities.size}`,label:n,attributes:[],alias:o,shape:"erBox",look:J().look??"default",cssClasses:"default",cssStyles:[]}),x.info("Added new entity :",n)),this.entities.get(n)}getEntity(n){return this.entities.get(n)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(n,o){let y=this.addEntity(n),l;for(l=o.length-1;l>=0;l--)o[l].keys||(o[l].keys=[]),o[l].comment||(o[l].comment=""),y.attributes.push(o[l]),x.debug("Added attribute ",o[l].name)}addRelationship(n,o,y,l){let a=this.entities.get(n),_=this.entities.get(y);if(!a||!_)return;let m={entityA:a.id,roleA:o,entityB:_.id,relSpec:l};this.relationships.push(m),x.debug("Added new relationship :",m)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(n){this.direction=n}getCompiledStyles(n){let o=[];for(let y of n){let l=this.classes.get(y);l!=null&&l.styles&&(o=[...o,...l.styles??[]].map(a=>a.trim())),l!=null&&l.textStyles&&(o=[...o,...l.textStyles??[]].map(a=>a.trim()))}return o}addCssStyles(n,o){for(let y of n){let l=this.entities.get(y);if(!o||!l)return;for(let a of o)l.cssStyles.push(a)}}addClass(n,o){n.forEach(y=>{let l=this.classes.get(y);l===void 0&&(l={id:y,styles:[],textStyles:[]},this.classes.set(y,l)),o&&o.forEach(function(a){if(/color/.exec(a)){let _=a.replace("fill","bgFill");l.textStyles.push(_)}l.styles.push(a)})})}setClass(n,o){for(let y of n){let l=this.entities.get(y);if(l)for(let a of o)l.cssClasses+=" "+a}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],zt()}getData(){let n=[],o=[],y=J();for(let a of this.entities.keys()){let _=this.entities.get(a);_&&(_.cssCompiledStyles=this.getCompiledStyles(_.cssClasses.split(" ")),n.push(_))}let l=0;for(let a of this.relationships){let _={id:Dt(a.entityA,a.entityB,{prefix:"id",counter:l++}),type:"normal",curve:"basis",start:a.entityA,end:a.entityB,label:a.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:a.relSpec.cardB.toLowerCase(),arrowTypeEnd:a.relSpec.cardA.toLowerCase(),pattern:a.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:y.look};o.push(_)}return{nodes:n,edges:o,other:{},config:y,direction:"TB"}}},h($,"ErDB"),$),Rt={};Mt(Rt,{draw:()=>Ht});var Ht=h(async function(i,n,o,y){x.info("REF0:"),x.info("Drawing er diagram (unified)",n);let{securityLevel:l,er:a,layout:_}=J(),m=y.db.getData(),E=jt(n,l);m.type=y.type,m.layoutAlgorithm=Wt(_),m.config.flowchart.nodeSpacing=(a==null?void 0:a.nodeSpacing)||140,m.config.flowchart.rankSpacing=(a==null?void 0:a.rankSpacing)||80,m.direction=y.db.getDirection(),m.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],m.diagramId=n,await Zt(m,E),m.layoutAlgorithm==="elk"&&E.select(".edges").lower();let v=E.selectAll('[id*="-background"]');Array.from(v).length>0&&v.each(function(){let D=vt(this),N=D.attr("id").replace("-background",""),L=E.select(`#${CSS.escape(N)}`);if(!L.empty()){let U=L.attr("transform");D.attr("transform",U)}}),Lt.insertTitle(E,"erDiagramTitleText",(a==null?void 0:a.titleTopMargin)??25,y.db.getDiagramTitle()),Qt(E,8,"erDiagram",(a==null?void 0:a.useMaxWidth)??!0)},"draw"),Vt=h((i,n)=>{let o=Ut;return wt(o(i,"r"),o(i,"g"),o(i,"b"),n)},"fade"),Jt={parser:Xt,get db(){return new qt},renderer:Rt,styles:h(i=>`
.entityBox {
fill: ${i.mainBkg};
stroke: ${i.nodeBorder};
}
.relationshipLabelBox {
fill: ${i.tertiaryColor};
opacity: 0.7;
background-color: ${i.tertiaryColor};
rect {
opacity: 0.5;
}
}
.labelBkg {
background-color: ${Vt(i.tertiaryColor,.5)};
}
.edgeLabel .label {
fill: ${i.nodeBorder};
font-size: 14px;
}
.label {
font-family: ${i.fontFamily};
color: ${i.nodeTextColor||i.textColor};
}
.edge-pattern-dashed {
stroke-dasharray: 8,8;
}
.node rect,
.node circle,
.node ellipse,
.node polygon
{
fill: ${i.mainBkg};
stroke: ${i.nodeBorder};
stroke-width: 1px;
}
.relationshipLine {
stroke: ${i.lineColor};
stroke-width: 1;
fill: none;
}
.marker {
fill: none !important;
stroke: ${i.lineColor} !important;
stroke-width: 1;
}
`,"getStyles")};export{Jt as diagram};
var S=["-type","-spec","-export_type","-opaque"],z=["after","begin","catch","case","cond","end","fun","if","let","of","query","receive","try","when"],W=/[\->,;]/,E=["->",";",","],U=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],A=/[\+\-\*\/<>=\|:!]/,Z=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],q=/[<\(\[\{]/,m=["<<","(","[","{"],D=/[>\)\]\}]/,k=["}","]",")",">>"],N="is_atom.is_binary.is_bitstring.is_boolean.is_float.is_function.is_integer.is_list.is_number.is_pid.is_port.is_record.is_reference.is_tuple.atom.binary.bitstring.boolean.function.integer.list.number.pid.port.record.reference.tuple".split("."),O="abs.adler32.adler32_combine.alive.apply.atom_to_binary.atom_to_list.binary_to_atom.binary_to_existing_atom.binary_to_list.binary_to_term.bit_size.bitstring_to_list.byte_size.check_process_code.contact_binary.crc32.crc32_combine.date.decode_packet.delete_module.disconnect_node.element.erase.exit.float.float_to_list.garbage_collect.get.get_keys.group_leader.halt.hd.integer_to_list.internal_bif.iolist_size.iolist_to_binary.is_alive.is_atom.is_binary.is_bitstring.is_boolean.is_float.is_function.is_integer.is_list.is_number.is_pid.is_port.is_process_alive.is_record.is_reference.is_tuple.length.link.list_to_atom.list_to_binary.list_to_bitstring.list_to_existing_atom.list_to_float.list_to_integer.list_to_pid.list_to_tuple.load_module.make_ref.module_loaded.monitor_node.node.node_link.node_unlink.nodes.notalive.now.open_port.pid_to_list.port_close.port_command.port_connect.port_control.pre_loaded.process_flag.process_info.processes.purge_module.put.register.registered.round.self.setelement.size.spawn.spawn_link.spawn_monitor.spawn_opt.split_binary.statistics.term_to_binary.time.throw.tl.trunc.tuple_size.tuple_to_list.unlink.unregister.whereis".split("."),f=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,j=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;function C(t,e){if(e.in_string)return e.in_string=!v(t),i(e,t,"string");if(e.in_atom)return e.in_atom=!b(t),i(e,t,"atom");if(t.eatSpace())return i(e,t,"whitespace");if(!_(e)&&t.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return a(t.current(),S)?i(e,t,"type"):i(e,t,"attribute");var n=t.next();if(n=="%")return t.skipToEnd(),i(e,t,"comment");if(n==":")return i(e,t,"colon");if(n=="?")return t.eatSpace(),t.eatWhile(f),i(e,t,"macro");if(n=="#")return t.eatSpace(),t.eatWhile(f),i(e,t,"record");if(n=="$")return t.next()=="\\"&&!t.match(j)?i(e,t,"error"):i(e,t,"number");if(n==".")return i(e,t,"dot");if(n=="'"){if(!(e.in_atom=!b(t))){if(t.match(/\s*\/\s*[0-9]/,!1))return t.match(/\s*\/\s*[0-9]/,!0),i(e,t,"fun");if(t.match(/\s*\(/,!1)||t.match(/\s*:/,!1))return i(e,t,"function")}return i(e,t,"atom")}if(n=='"')return e.in_string=!v(t),i(e,t,"string");if(/[A-Z_Ø-ÞÀ-Ö]/.test(n))return t.eatWhile(f),i(e,t,"variable");if(/[a-z_ß-öø-ÿ]/.test(n)){if(t.eatWhile(f),t.match(/\s*\/\s*[0-9]/,!1))return t.match(/\s*\/\s*[0-9]/,!0),i(e,t,"fun");var r=t.current();return a(r,z)?i(e,t,"keyword"):a(r,U)?i(e,t,"operator"):t.match(/\s*\(/,!1)?a(r,O)&&(_(e).token!=":"||_(e,2).token=="erlang")?i(e,t,"builtin"):a(r,N)?i(e,t,"guard"):i(e,t,"function"):F(t)==":"?r=="erlang"?i(e,t,"builtin"):i(e,t,"function"):a(r,["true","false"])?i(e,t,"boolean"):i(e,t,"atom")}var c=/[0-9]/;return c.test(n)?(t.eatWhile(c),t.eat("#")?t.eatWhile(/[0-9a-zA-Z]/)||t.backUp(1):t.eat(".")&&(t.eatWhile(c)?t.eat(/[eE]/)&&(t.eat(/[-+]/)?t.eatWhile(c)||t.backUp(2):t.eatWhile(c)||t.backUp(1)):t.backUp(1)),i(e,t,"number")):g(t,q,m)?i(e,t,"open_paren"):g(t,D,k)?i(e,t,"close_paren"):y(t,W,E)?i(e,t,"separator"):y(t,A,Z)?i(e,t,"operator"):i(e,t,null)}function g(t,e,n){if(t.current().length==1&&e.test(t.current())){for(t.backUp(1);e.test(t.peek());)if(t.next(),a(t.current(),n))return!0;t.backUp(t.current().length-1)}return!1}function y(t,e,n){if(t.current().length==1&&e.test(t.current())){for(;e.test(t.peek());)t.next();for(;0<t.current().length;){if(a(t.current(),n))return!0;t.backUp(1)}t.next()}return!1}function v(t){return w(t,'"',"\\")}function b(t){return w(t,"'","\\")}function w(t,e,n){for(;!t.eol();){var r=t.next();if(r==e)return!0;r==n&&t.next()}return!1}function F(t){var e=t.match(/^\s*([^\s%])/,!1);return e?e[1]:""}function a(t,e){return-1<e.indexOf(t)}function i(t,e,n){switch(M(t,I(n,e)),n){case"atom":return"atom";case"attribute":return"attribute";case"boolean":return"atom";case"builtin":return"builtin";case"close_paren":return null;case"colon":return null;case"comment":return"comment";case"dot":return null;case"error":return"error";case"fun":return"meta";case"function":return"tag";case"guard":return"property";case"keyword":return"keyword";case"macro":return"macroName";case"number":return"number";case"open_paren":return null;case"operator":return"operator";case"record":return"bracket";case"separator":return null;case"string":return"string";case"type":return"def";case"variable":return"variable";default:return null}}function x(t,e,n,r){return{token:t,column:e,indent:n,type:r}}function I(t,e){return x(e.current(),e.column(),e.indentation(),t)}function L(t){return x(t,0,0,t)}function _(t,e){var n=t.tokenStack.length,r=e||1;return n<r?!1:t.tokenStack[n-r]}function M(t,e){e.type=="comment"||e.type=="whitespace"||(t.tokenStack=P(t.tokenStack,e),t.tokenStack=R(t.tokenStack))}function P(t,e){var n=t.length-1;return 0<n&&t[n].type==="record"&&e.type==="dot"?t.pop():(0<n&&t[n].type==="group"&&t.pop(),t.push(e)),t}function R(t){if(!t.length)return t;var e=t.length-1;if(t[e].type==="dot")return[];if(e>1&&t[e].type==="fun"&&t[e-1].token==="fun")return t.slice(0,e-1);switch(t[e].token){case"}":return s(t,{g:["{"]});case"]":return s(t,{i:["["]});case")":return s(t,{i:["("]});case">>":return s(t,{i:["<<"]});case"end":return s(t,{i:["begin","case","fun","if","receive","try"]});case",":return s(t,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return s(t,{r:["when"],m:["try","if","case","receive"]});case";":return s(t,{E:["case","fun","if","receive","try","when"]});case"catch":return s(t,{e:["try"]});case"of":return s(t,{e:["case"]});case"after":return s(t,{e:["receive","try"]});default:return t}}function s(t,e){for(var n in e)for(var r=t.length-1,c=e[n],o=r-1;-1<o;o--)if(a(t[o].token,c)){var u=t.slice(0,o);switch(n){case"m":return u.concat(t[o]).concat(t[r]);case"r":return u.concat(t[r]);case"i":return u;case"g":return u.concat(L("group"));case"E":return u.concat(t[o]);case"e":return u.concat(t[o])}}return n=="E"?[]:t}function $(t,e,n){var r,c=B(e),o=_(t,1),u=_(t,2);return t.in_string||t.in_atom?null:u?o.token=="when"?o.column+n.unit:c==="when"&&u.type==="function"?u.indent+n.unit:c==="("&&o.token==="fun"?o.column+3:c==="catch"&&(r=d(t,["try"]))?r.column:a(c,["end","after","of"])?(r=d(t,["begin","case","fun","if","receive","try"]),r?r.column:null):a(c,k)?(r=d(t,m),r?r.column:null):a(o.token,[",","|","||"])||a(c,[",","|","||"])?(r=G(t),r?r.column+r.token.length:n.unit):o.token=="->"?a(u.token,["receive","case","if","try"])?u.column+n.unit+n.unit:u.column+n.unit:a(o.token,m)?o.column+o.token.length:(r=H(t),l(r)?r.column+n.unit:0):0}function B(t){var e=t.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return l(e)&&e.index===0?e[0]:""}function G(t){var e=t.tokenStack.slice(0,-1),n=p(e,"type",["open_paren"]);return l(e[n])?e[n]:!1}function H(t){var e=t.tokenStack,n=p(e,"type",["open_paren","separator","keyword"]),r=p(e,"type",["operator"]);return l(n)&&l(r)&&n<r?e[n+1]:l(n)?e[n]:!1}function d(t,e){var n=t.tokenStack,r=p(n,"token",e);return l(n[r])?n[r]:!1}function p(t,e,n){for(var r=t.length-1;-1<r;r--)if(a(t[r][e],n))return r;return!1}function l(t){return t!==!1&&t!=null}const J={name:"erlang",startState(){return{tokenStack:[],in_string:!1,in_atom:!1}},token:C,indent:$,languageData:{commentTokens:{line:"%"}}};export{J as t};
import{t as r}from"./erlang-Ba0XOLlj.js";export{r as erlang};
import{s as j}from"./chunk-LvLJmgfZ.js";import{t as y}from"./react-Bj1aDYRI.js";import{t as N}from"./compiler-runtime-B3qBwwSJ.js";import{d as _}from"./hotkeys-BHHWjLlp.js";import{t as C}from"./jsx-runtime-ZmTK25f3.js";import{n as S,t as O}from"./cn-BKtXLv3a.js";import{a as E,c as F,i as V,l as A,n as D,s as T,t as q}from"./alert-dialog-BW4srmS0.js";import{r as z}from"./errors-TZBmrJmc.js";var g=N(),B=j(y(),1),r=j(C(),1);const G=b=>{let e=(0,g.c)(23),{error:l,className:t,action:a}=b,[n,c]=(0,B.useState)(!1);if(!l)return null;_.error(l);let s;e[0]===l?s=e[1]:(s=z(l),e[0]=l,e[1]=s);let o=s,f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>c(!0),e[2]=f):f=e[2];let i;e[3]===o?i=e[4]:(i=(0,r.jsx)("span",{className:"line-clamp-4",children:o}),e[3]=o,e[4]=i);let d;e[5]===a?d=e[6]:(d=a&&(0,r.jsx)("div",{className:"flex justify-end",children:a}),e[5]=a,e[6]=d);let m;e[7]!==t||e[8]!==i||e[9]!==d?(m=(0,r.jsxs)(v,{kind:"danger",className:t,clickable:!0,onClick:f,children:[i,d]}),e[7]=t,e[8]=i,e[9]=d,e[10]=m):m=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=(0,r.jsx)(F,{children:(0,r.jsx)(A,{className:"text-error",children:"Error"})}),e[11]=k):k=e[11];let h;e[12]===o?h=e[13]:(h=(0,r.jsx)(E,{asChild:!0,className:"text-error text-sm p-2 font-mono overflow-auto whitespace-pre-wrap",children:(0,r.jsx)("pre",{children:o})}),e[12]=o,e[13]=h);let w;e[14]===Symbol.for("react.memo_cache_sentinel")?(w=(0,r.jsx)(T,{children:(0,r.jsx)(D,{autoFocus:!0,onClick:()=>c(!1),children:"Ok"})}),e[14]=w):w=e[14];let x;e[15]===h?x=e[16]:(x=(0,r.jsxs)(V,{className:"max-w-[80%] max-h-[80%] overflow-hidden flex flex-col",children:[k,h,w]}),e[15]=h,e[16]=x);let p;e[17]!==n||e[18]!==x?(p=(0,r.jsx)(q,{open:n,onOpenChange:c,children:x}),e[17]=n,e[18]=x,e[19]=p):p=e[19];let u;return e[20]!==p||e[21]!==m?(u=(0,r.jsxs)(r.Fragment,{children:[m,p]}),e[20]=p,e[21]=m,e[22]=u):u=e[22],u};var H=S("text-sm p-2 border whitespace-pre-wrap overflow-hidden",{variants:{kind:{danger:"text-error border-(--red-6) shadow-md-solid shadow-error bg-(--red-1)",info:"text-primary border-(--blue-6) shadow-md-solid shadow-accent bg-(--blue-1)",warn:"border-(--yellow-6) bg-(--yellow-2) dark:bg-(--yellow-4) text-(--yellow-11) dark:text-(--yellow-12)"},clickable:{true:"cursor-pointer"}},compoundVariants:[{clickable:!0,kind:"danger",className:"hover:bg-(--red-3)"},{clickable:!0,kind:"info",className:"hover:bg-(--blue-3)"},{clickable:!0,kind:"warn",className:"hover:bg-(--yellow-3)"}],defaultVariants:{kind:"info"}});const v=b=>{let e=(0,g.c)(14),l,t,a,n,c;e[0]===b?(l=e[1],t=e[2],a=e[3],n=e[4],c=e[5]):({kind:n,clickable:a,className:t,children:l,...c}=b,e[0]=b,e[1]=l,e[2]=t,e[3]=a,e[4]=n,e[5]=c);let s;e[6]!==t||e[7]!==a||e[8]!==n?(s=O(H({kind:n,clickable:a}),t),e[6]=t,e[7]=a,e[8]=n,e[9]=s):s=e[9];let o;return e[10]!==l||e[11]!==c||e[12]!==s?(o=(0,r.jsx)("div",{className:s,...c,children:l}),e[10]=l,e[11]=c,e[12]=s,e[13]=o):o=e[13],o};export{G as n,v as t};
import{s as i}from"./chunk-LvLJmgfZ.js";import"./useEvent-BhXAndur.js";import{t as l}from"./react-Bj1aDYRI.js";import{D as a}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as s}from"./compiler-runtime-B3qBwwSJ.js";import{t as c}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{t as d}from"./createLucideIcon-BCdY6lG5.js";import{t as h}from"./MarimoErrorOutput-Lf9P8Fhl.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import{n as f}from"./cell-link-B9b7J8QK.js";import{t as n}from"./empty-state-B8Cxr9nj.js";var x=d("party-popper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]),y=s();l();var r=i(c(),1),k=()=>{let t=(0,y.c)(5),e=a();if(e.length===0){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=(0,r.jsx)(n,{title:"No errors!",icon:(0,r.jsx)(x,{})}),t[0]=p):p=t[0],p}let o;t[1]===e?o=t[2]:(o=e.map(u),t[1]=e,t[2]=o);let m;return t[3]===o?m=t[4]:(m=(0,r.jsx)("div",{className:"flex flex-col h-full overflow-auto",children:o}),t[3]=o,t[4]=m),m};function u(t){return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs font-mono font-semibold bg-muted border-y px-2 py-1",children:(0,r.jsx)(f,{cellId:t.cellId})}),(0,r.jsx)("div",{className:"px-2",children:(0,r.jsx)(h,{errors:t.output.data,cellId:t.cellId},t.cellId)},t.cellId)]},t.cellId)}export{k as default};
import{s as h}from"./chunk-LvLJmgfZ.js";import{t as f}from"./react-Bj1aDYRI.js";import{t as y}from"./compiler-runtime-B3qBwwSJ.js";import{n as x}from"./constants-B6Cb__3x.js";import{t as E}from"./jsx-runtime-ZmTK25f3.js";import{t as g}from"./button-CZ3Cs4qb.js";var i=h(f()),m=(0,i.createContext)(null),u={didCatch:!1,error:null},v=class extends i.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=u}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(e!==null){var r,t,o=[...arguments];(r=(t=this.props).onReset)==null||r.call(t,{args:o,reason:"imperative-api"}),this.setState(u)}}componentDidCatch(e,r){var t,o;(t=(o=this.props).onError)==null||t.call(o,e,r)}componentDidUpdate(e,r){let{didCatch:t}=this.state,{resetKeys:o}=this.props;if(t&&r.error!==null&&b(e.resetKeys,o)){var s,n;(s=(n=this.props).onReset)==null||s.call(n,{next:o,prev:e.resetKeys,reason:"keys"}),this.setState(u)}}render(){let{children:e,fallbackRender:r,FallbackComponent:t,fallback:o}=this.props,{didCatch:s,error:n}=this.state,a=e;if(s){let l={error:n,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")a=r(l);else if(t)a=(0,i.createElement)(t,l);else if(o!==void 0)a=o;else throw n}return(0,i.createElement)(m.Provider,{value:{didCatch:s,error:n,resetErrorBoundary:this.resetErrorBoundary}},a)}};function b(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==r.length||e.some((t,o)=>!Object.is(t,r[o]))}function B(e){if(e==null||typeof e.didCatch!="boolean"||typeof e.resetErrorBoundary!="function")throw Error("ErrorBoundaryContext not found")}function C(){let e=(0,i.useContext)(m);B(e);let[r,t]=(0,i.useState)({error:null,hasError:!1}),o=(0,i.useMemo)(()=>({resetBoundary:()=>{e.resetErrorBoundary(),t({error:null,hasError:!1})},showBoundary:s=>t({error:s,hasError:!0})}),[e.resetErrorBoundary]);if(r.hasError)throw r.error;return o}var p=y(),d=h(E(),1);const w=e=>{let r=(0,p.c)(2),t;return r[0]===e.children?t=r[1]:(t=(0,d.jsx)(v,{FallbackComponent:j,children:e.children}),r[0]=e.children,r[1]=t),t};var j=e=>{var c;let r=(0,p.c)(9),t;r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,d.jsx)("h1",{className:"text-2xl font-bold",children:"Something went wrong"}),r[0]=t):t=r[0];let o=(c=e.error)==null?void 0:c.message,s;r[1]===o?s=r[2]:(s=(0,d.jsx)("pre",{className:"text-xs bg-muted/40 border rounded-md p-4 max-w-[80%] whitespace-normal",children:o}),r[1]=o,r[2]=s);let n;r[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,d.jsxs)("div",{children:["If this is an issue with marimo, please report it on"," ",(0,d.jsx)("a",{href:x.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]}),r[3]=n):n=r[3];let a;r[4]===e.resetErrorBoundary?a=r[5]:(a=(0,d.jsx)(g,{"data-testid":"reset-error-boundary-button",onClick:e.resetErrorBoundary,variant:"outline",children:"Try again"}),r[4]=e.resetErrorBoundary,r[5]=a);let l;return r[6]!==s||r[7]!==a?(l=(0,d.jsxs)("div",{className:"flex-1 flex items-center justify-center flex-col space-y-4 max-w-2xl mx-auto px-6",children:[t,s,n,a]}),r[6]=s,r[7]=a,r[8]=l):l=r[8],l};export{C as n,w as t};
import{P as n,R as c}from"./zod-H_cgTO0M.js";var s=n({detail:c()}),o=n({error:c()});function i(r){if(!r)return"Unknown error";if(r instanceof Error){let e=s.safeParse(r.cause);return e.success?e.data.detail:u(r.message)}if(typeof r=="object"){let e=s.safeParse(r);if(e.success)return e.data.detail;let t=o.safeParse(r);if(t.success)return t.data.error}try{return JSON.stringify(r)}catch{return String(r)}}function u(r){let e=l(r);if(!e)return r;let t=s.safeParse(e);if(t.success)return t.data.detail;let a=o.safeParse(e);return a.success?a.data.error:r}function l(r){try{return JSON.parse(r)}catch{return r}}var f=class extends Error{constructor(r="The cell containing this UI element has not been run yet. Please run the cell first."){super(r),this.name="CellNotInitializedError"}},d=class extends Error{constructor(r="Not yet connected to a kernel."){super(r),this.name="NoKernelConnectedError"}};export{d as n,i as r,f as t};
import{s as da,t as si}from"./chunk-LvLJmgfZ.js";import{t as di}from"./react-Bj1aDYRI.js";import{t as mi}from"./createLucideIcon-BCdY6lG5.js";import{n as A}from"./Combination-BAEdC-rz.js";import{t as vi}from"./prop-types-DaaA-ptl.js";var ui=mi("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);function xi({path:a,delimiter:i,initialPath:t,restrictNavigation:n}){let e=a.match(/^[\dA-Za-z]+:\/\//),o=/^[A-Za-z]:\\/.test(a),m=e?e[0]:o?a.slice(0,3):"/",r=(o||e?a.slice(m.length):a).split(i).filter(Boolean),d=[];if(o)for(let h=r.length;h>=0;h--){let y=m+r.slice(0,h).join(i);d.push(y)}else{let h=m;for(let y=0;y<=r.length;y++){let z=h+r.slice(0,y).join(i);d.push(z),y<r.length&&!h.endsWith(i)&&(h+=i)}d.reverse()}return n&&(d=d.filter(h=>h.startsWith(t))),{protocol:m,parentDirectories:d}}function fi(a){let i=a.lastIndexOf(".");return[i>0?a.slice(0,i):a,i>0?a.slice(i):""]}const gi=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function C(a,i,t){let n=bi(a),{webkitRelativePath:e}=a,o=typeof i=="string"?i:typeof e=="string"&&e.length>0?e:`./${a.name}`;return typeof n.path!="string"&&La(n,"path",o),t!==void 0&&Object.defineProperty(n,"handle",{value:t,writable:!1,configurable:!1,enumerable:!0}),La(n,"relativePath",o),n}function bi(a){let{name:i}=a;if(i&&i.lastIndexOf(".")!==-1&&!a.type){let t=i.split(".").pop().toLowerCase(),n=gi.get(t);n&&Object.defineProperty(a,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return a}function La(a,i,t){Object.defineProperty(a,i,{value:t,writable:!1,configurable:!1,enumerable:!0})}var hi=[".DS_Store","Thumbs.db"];function yi(a){return A(this,void 0,void 0,function*(){return N(a)&&wi(a.dataTransfer)?Di(a.dataTransfer,a.type):ki(a)?ji(a):Array.isArray(a)&&a.every(i=>"getFile"in i&&typeof i.getFile=="function")?zi(a):[]})}function wi(a){return N(a)}function ki(a){return N(a)&&N(a.target)}function N(a){return typeof a=="object"&&!!a}function ji(a){return ma(a.target.files).map(i=>C(i))}function zi(a){return A(this,void 0,void 0,function*(){return(yield Promise.all(a.map(i=>i.getFile()))).map(i=>C(i))})}function Di(a,i){return A(this,void 0,void 0,function*(){if(a.items){let t=ma(a.items).filter(n=>n.kind==="file");return i==="drop"?Ta(Ma(yield Promise.all(t.map(Oi)))):t}return Ta(ma(a.files).map(t=>C(t)))})}function Ta(a){return a.filter(i=>hi.indexOf(i.name)===-1)}function ma(a){if(a===null)return[];let i=[];for(let t=0;t<a.length;t++){let n=a[t];i.push(n)}return i}function Oi(a){if(typeof a.webkitGetAsEntry!="function")return _a(a);let i=a.webkitGetAsEntry();return i&&i.isDirectory?$a(i):_a(a,i)}function Ma(a){return a.reduce((i,t)=>[...i,...Array.isArray(t)?Ma(t):[t]],[])}function _a(a,i){return A(this,void 0,void 0,function*(){if(globalThis.isSecureContext&&typeof a.getAsFileSystemHandle=="function"){let n=yield a.getAsFileSystemHandle();if(n===null)throw Error(`${a} is not a File`);if(n!==void 0){let e=yield n.getFile();return e.handle=n,C(e)}}let t=a.getAsFile();if(!t)throw Error(`${a} is not a File`);return C(t,(i==null?void 0:i.fullPath)??void 0)})}function Ei(a){return A(this,void 0,void 0,function*(){return a.isDirectory?$a(a):Ai(a)})}function $a(a){let i=a.createReader();return new Promise((t,n)=>{let e=[];function o(){i.readEntries(m=>A(this,void 0,void 0,function*(){if(m.length){let r=Promise.all(m.map(Ei));e.push(r),o()}else try{t(yield Promise.all(e))}catch(r){n(r)}}),m=>{n(m)})}o()})}function Ai(a){return A(this,void 0,void 0,function*(){return new Promise((i,t)=>{a.file(n=>{i(C(n,a.fullPath))},n=>{t(n)})})})}var va=da(si((a=>{a.__esModule=!0,a.default=function(i,t){if(i&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var e=i.name||"",o=(i.type||"").toLowerCase(),m=o.replace(/\/.*$/,"");return n.some(function(r){var d=r.trim().toLowerCase();return d.charAt(0)==="."?e.toLowerCase().endsWith(d):d.endsWith("/*")?m===d.replace(/\/.*$/,""):o===d})}return!0}}))());function Ga(a){return Pi(a)||qi(a)||Ua(a)||Fi()}function Fi(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qi(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Pi(a){if(Array.isArray(a))return ua(a)}function Ba(a,i){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);i&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})),t.push.apply(t,n)}return t}function Ka(a){for(var i=1;i<arguments.length;i++){var t=arguments[i]==null?{}:arguments[i];i%2?Ba(Object(t),!0).forEach(function(n){Ha(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Ba(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function Ha(a,i,t){return i in a?Object.defineProperty(a,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[i]=t,a}function M(a,i){return Ri(a)||Ci(a,i)||Ua(a,i)||Si()}function Si(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ua(a,i){if(a){if(typeof a=="string")return ua(a,i);var t=Object.prototype.toString.call(a).slice(8,-1);if(t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set")return Array.from(a);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ua(a,i)}}function ua(a,i){(i==null||i>a.length)&&(i=a.length);for(var t=0,n=Array(i);t<i;t++)n[t]=a[t];return n}function Ci(a,i){var t=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(t!=null){var n=[],e=!0,o=!1,m,r;try{for(t=t.call(a);!(e=(m=t.next()).done)&&(n.push(m.value),!(i&&n.length===i));e=!0);}catch(d){o=!0,r=d}finally{try{!e&&t.return!=null&&t.return()}finally{if(o)throw r}}return n}}function Ri(a){if(Array.isArray(a))return a}var Ii=typeof va.default=="function"?va.default:va.default.default,Li="file-invalid-type",Ti="file-too-large",Mi="file-too-small",_i="too-many-files",$i=function(){var a=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split(",");return{code:Li,message:`File type must be ${a.length>1?`one of ${a.join(", ")}`:a[0]}`}},Wa=function(a){return{code:Ti,message:`File is larger than ${a} ${a===1?"byte":"bytes"}`}},Na=function(a){return{code:Mi,message:`File is smaller than ${a} ${a===1?"byte":"bytes"}`}},Gi={code:_i,message:"Too many files"};function Bi(a){return a.type===""&&typeof a.getAsFile=="function"}function Za(a,i){var t=a.type==="application/x-moz-file"||Ii(a,i)||Bi(a);return[t,t?null:$i(i)]}function Va(a,i,t){if(F(a.size))if(F(i)&&F(t)){if(a.size>t)return[!1,Wa(t)];if(a.size<i)return[!1,Na(i)]}else{if(F(i)&&a.size<i)return[!1,Na(i)];if(F(t)&&a.size>t)return[!1,Wa(t)]}return[!0,null]}function F(a){return a!=null}function Ki(a){var i=a.files,t=a.accept,n=a.minSize,e=a.maxSize,o=a.multiple,m=a.maxFiles,r=a.validator;return!o&&i.length>1||o&&m>=1&&i.length>m?!1:i.every(function(d){var h=M(Za(d,t),1)[0],y=M(Va(d,n,e),1)[0],z=r?r(d):null;return h&&y&&!z})}function Z(a){return typeof a.isPropagationStopped=="function"?a.isPropagationStopped():a.cancelBubble===void 0?!1:a.cancelBubble}function _(a){return a.dataTransfer?Array.prototype.some.call(a.dataTransfer.types,function(i){return i==="Files"||i==="application/x-moz-file"}):!!a.target&&!!a.target.files}function Ya(a){a.preventDefault()}function Hi(a){return a.indexOf("MSIE")!==-1||a.indexOf("Trident/")!==-1}function Ui(a){return a.indexOf("Edge/")!==-1}function Wi(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Hi(a)||Ui(a)}function k(){var a=[...arguments];return function(i){var t=[...arguments].slice(1);return a.some(function(n){return!Z(i)&&n&&n.apply(void 0,[i].concat(t)),Z(i)})}}function Ni(){return"showOpenFilePicker"in window}function Zi(a){return F(a)?[{description:"Files",accept:Object.entries(a).filter(function(i){var t=M(i,2),n=t[0],e=t[1],o=!0;return Ja(n)||(console.warn(`Skipped "${n}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),o=!1),(!Array.isArray(e)||!e.every(Qa))&&(console.warn(`Skipped "${n}" because an invalid file extension was provided.`),o=!1),o}).reduce(function(i,t){var n=M(t,2),e=n[0],o=n[1];return Ka(Ka({},i),{},Ha({},e,o))},{})}]:a}function Vi(a){if(F(a))return Object.entries(a).reduce(function(i,t){var n=M(t,2),e=n[0],o=n[1];return[].concat(Ga(i),[e],Ga(o))},[]).filter(function(i){return Ja(i)||Qa(i)}).join(",")}function Yi(a){return a instanceof DOMException&&(a.name==="AbortError"||a.code===a.ABORT_ERR)}function Ji(a){return a instanceof DOMException&&(a.name==="SecurityError"||a.code===a.SECURITY_ERR)}function Ja(a){return a==="audio/*"||a==="video/*"||a==="image/*"||a==="text/*"||a==="application/*"||/\w+\/[-+.\w]+/g.test(a)}function Qa(a){return/^.*\.[\w]+$/.test(a)}var c=da(di()),s=da(vi()),Qi=["children"],Xi=["open"],at=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],it=["refKey","onChange","onClick"];function Xa(a){return pt(a)||nt(a)||ai(a)||tt()}function tt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nt(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function pt(a){if(Array.isArray(a))return fa(a)}function xa(a,i){return lt(a)||ot(a,i)||ai(a,i)||et()}function et(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ai(a,i){if(a){if(typeof a=="string")return fa(a,i);var t=Object.prototype.toString.call(a).slice(8,-1);if(t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set")return Array.from(a);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fa(a,i)}}function fa(a,i){(i==null||i>a.length)&&(i=a.length);for(var t=0,n=Array(i);t<i;t++)n[t]=a[t];return n}function ot(a,i){var t=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(t!=null){var n=[],e=!0,o=!1,m,r;try{for(t=t.call(a);!(e=(m=t.next()).done)&&(n.push(m.value),!(i&&n.length===i));e=!0);}catch(d){o=!0,r=d}finally{try{!e&&t.return!=null&&t.return()}finally{if(o)throw r}}return n}}function lt(a){if(Array.isArray(a))return a}function ii(a,i){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);i&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})),t.push.apply(t,n)}return t}function v(a){for(var i=1;i<arguments.length;i++){var t=arguments[i]==null?{}:arguments[i];i%2?ii(Object(t),!0).forEach(function(n){ga(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ii(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function ga(a,i,t){return i in a?Object.defineProperty(a,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[i]=t,a}function V(a,i){if(a==null)return{};var t=ct(a,i),n,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);for(e=0;e<o.length;e++)n=o[e],!(i.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(a,n)&&(t[n]=a[n])}return t}function ct(a,i){if(a==null)return{};var t={},n=Object.keys(a),e,o;for(o=0;o<n.length;o++)e=n[o],!(i.indexOf(e)>=0)&&(t[e]=a[e]);return t}var ba=(0,c.forwardRef)(function(a,i){var t=a.children,n=ni(V(a,Qi)),e=n.open,o=V(n,Xi);return(0,c.useImperativeHandle)(i,function(){return{open:e}},[e]),c.createElement(c.Fragment,null,t(v(v({},o),{},{open:e})))});ba.displayName="Dropzone";var ti={disabled:!1,getFilesFromEvent:yi,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ba.defaultProps=ti,ba.propTypes={children:s.default.func,accept:s.default.objectOf(s.default.arrayOf(s.default.string)),multiple:s.default.bool,preventDropOnDocument:s.default.bool,noClick:s.default.bool,noKeyboard:s.default.bool,noDrag:s.default.bool,noDragEventsBubbling:s.default.bool,minSize:s.default.number,maxSize:s.default.number,maxFiles:s.default.number,disabled:s.default.bool,getFilesFromEvent:s.default.func,onFileDialogCancel:s.default.func,onFileDialogOpen:s.default.func,useFsAccessApi:s.default.bool,autoFocus:s.default.bool,onDragEnter:s.default.func,onDragLeave:s.default.func,onDragOver:s.default.func,onDrop:s.default.func,onDropAccepted:s.default.func,onDropRejected:s.default.func,onError:s.default.func,validator:s.default.func};var ha={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function ni(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=v(v({},ti),a),t=i.accept,n=i.disabled,e=i.getFilesFromEvent,o=i.maxSize,m=i.minSize,r=i.multiple,d=i.maxFiles,h=i.onDragEnter,y=i.onDragLeave,z=i.onDragOver,Y=i.onDrop,J=i.onDropAccepted,Q=i.onDropRejected,X=i.onFileDialogCancel,aa=i.onFileDialogOpen,ya=i.useFsAccessApi,wa=i.autoFocus,ia=i.preventDropOnDocument,ka=i.noClick,ta=i.noKeyboard,ja=i.noDrag,D=i.noDragEventsBubbling,na=i.onError,R=i.validator,I=(0,c.useMemo)(function(){return Vi(t)},[t]),za=(0,c.useMemo)(function(){return Zi(t)},[t]),pa=(0,c.useMemo)(function(){return typeof aa=="function"?aa:pi},[aa]),$=(0,c.useMemo)(function(){return typeof X=="function"?X:pi},[X]),g=(0,c.useRef)(null),w=(0,c.useRef)(null),Da=xa((0,c.useReducer)(rt,ha),2),ea=Da[0],f=Da[1],ei=ea.isFocused,Oa=ea.isFileDialogActive,G=(0,c.useRef)(typeof window<"u"&&window.isSecureContext&&ya&&Ni()),Ea=function(){!G.current&&Oa&&setTimeout(function(){w.current&&(w.current.files.length||(f({type:"closeDialog"}),$()))},300)};(0,c.useEffect)(function(){return window.addEventListener("focus",Ea,!1),function(){window.removeEventListener("focus",Ea,!1)}},[w,Oa,$,G]);var q=(0,c.useRef)([]),O=(0,c.useRef)([]),Aa=function(p){g.current&&g.current.contains(p.target)||(p.preventDefault(),q.current=[])};(0,c.useEffect)(function(){return ia&&(document.addEventListener("dragover",Ya,!1),document.addEventListener("drop",Aa,!1)),function(){ia&&(document.removeEventListener("dragover",Ya),document.removeEventListener("drop",Aa))}},[g,ia]),(0,c.useEffect)(function(){var p=function(b){O.current=[].concat(Xa(O.current),[b.target]),_(b)&&f({isDragGlobal:!0,type:"setDragGlobal"})},l=function(b){O.current=O.current.filter(function(j){return j!==b.target&&j!==null}),!(O.current.length>0)&&f({isDragGlobal:!1,type:"setDragGlobal"})},u=function(){O.current=[],f({isDragGlobal:!1,type:"setDragGlobal"})},x=function(){O.current=[],f({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",p,!1),document.addEventListener("dragleave",l,!1),document.addEventListener("dragend",u,!1),document.addEventListener("drop",x,!1),function(){document.removeEventListener("dragenter",p),document.removeEventListener("dragleave",l),document.removeEventListener("dragend",u),document.removeEventListener("drop",x)}},[g]),(0,c.useEffect)(function(){return!n&&wa&&g.current&&g.current.focus(),function(){}},[g,wa,n]);var E=(0,c.useCallback)(function(p){na?na(p):console.error(p)},[na]),Fa=(0,c.useCallback)(function(p){p.preventDefault(),p.persist(),U(p),q.current=[].concat(Xa(q.current),[p.target]),_(p)&&Promise.resolve(e(p)).then(function(l){if(!(Z(p)&&!D)){var u=l.length,x=u>0&&Ki({files:l,accept:I,minSize:m,maxSize:o,multiple:r,maxFiles:d,validator:R});f({isDragAccept:x,isDragReject:u>0&&!x,isDragActive:!0,type:"setDraggedFiles"}),h&&h(p)}}).catch(function(l){return E(l)})},[e,h,E,D,I,m,o,r,d,R]),qa=(0,c.useCallback)(function(p){p.preventDefault(),p.persist(),U(p);var l=_(p);if(l&&p.dataTransfer)try{p.dataTransfer.dropEffect="copy"}catch{}return l&&z&&z(p),!1},[z,D]),Pa=(0,c.useCallback)(function(p){p.preventDefault(),p.persist(),U(p);var l=q.current.filter(function(x){return g.current&&g.current.contains(x)}),u=l.indexOf(p.target);u!==-1&&l.splice(u,1),q.current=l,!(l.length>0)&&(f({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),_(p)&&y&&y(p))},[g,y,D]),B=(0,c.useCallback)(function(p,l){var u=[],x=[];p.forEach(function(b){var j=xa(Za(b,I),2),la=j[0],ca=j[1],W=xa(Va(b,m,o),2),ra=W[0],sa=W[1],L=R?R(b):null;if(la&&ra&&!L)u.push(b);else{var T=[ca,sa];L&&(T=T.concat(L)),x.push({file:b,errors:T.filter(function(ri){return ri})})}}),(!r&&u.length>1||r&&d>=1&&u.length>d)&&(u.forEach(function(b){x.push({file:b,errors:[Gi]})}),u.splice(0)),f({acceptedFiles:u,fileRejections:x,isDragReject:x.length>0,type:"setFiles"}),Y&&Y(u,x,l),x.length>0&&Q&&Q(x,l),u.length>0&&J&&J(u,l)},[f,r,I,m,o,d,Y,J,Q,R]),K=(0,c.useCallback)(function(p){p.preventDefault(),p.persist(),U(p),q.current=[],_(p)&&Promise.resolve(e(p)).then(function(l){Z(p)&&!D||B(l,p)}).catch(function(l){return E(l)}),f({type:"reset"})},[e,B,E,D]),P=(0,c.useCallback)(function(){if(G.current){f({type:"openDialog"}),pa();var p={multiple:r,types:za};window.showOpenFilePicker(p).then(function(l){return e(l)}).then(function(l){B(l,null),f({type:"closeDialog"})}).catch(function(l){Yi(l)?($(l),f({type:"closeDialog"})):Ji(l)?(G.current=!1,w.current?(w.current.value=null,w.current.click()):E(Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):E(l)});return}w.current&&(f({type:"openDialog"}),pa(),w.current.value=null,w.current.click())},[f,pa,$,ya,B,E,za,r]),Sa=(0,c.useCallback)(function(p){!g.current||!g.current.isEqualNode(p.target)||(p.key===" "||p.key==="Enter"||p.keyCode===32||p.keyCode===13)&&(p.preventDefault(),P())},[g,P]),Ca=(0,c.useCallback)(function(){f({type:"focus"})},[]),Ra=(0,c.useCallback)(function(){f({type:"blur"})},[]),Ia=(0,c.useCallback)(function(){ka||(Wi()?setTimeout(P,0):P())},[ka,P]),S=function(p){return n?null:p},oa=function(p){return ta?null:S(p)},H=function(p){return ja?null:S(p)},U=function(p){D&&p.stopPropagation()},oi=(0,c.useMemo)(function(){return function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=p.refKey,u=l===void 0?"ref":l,x=p.role,b=p.onKeyDown,j=p.onFocus,la=p.onBlur,ca=p.onClick,W=p.onDragEnter,ra=p.onDragOver,sa=p.onDragLeave,L=p.onDrop,T=V(p,at);return v(v(ga({onKeyDown:oa(k(b,Sa)),onFocus:oa(k(j,Ca)),onBlur:oa(k(la,Ra)),onClick:S(k(ca,Ia)),onDragEnter:H(k(W,Fa)),onDragOver:H(k(ra,qa)),onDragLeave:H(k(sa,Pa)),onDrop:H(k(L,K)),role:typeof x=="string"&&x!==""?x:"presentation"},u,g),!n&&!ta?{tabIndex:0}:{}),T)}},[g,Sa,Ca,Ra,Ia,Fa,qa,Pa,K,ta,ja,n]),li=(0,c.useCallback)(function(p){p.stopPropagation()},[]),ci=(0,c.useMemo)(function(){return function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=p.refKey,u=l===void 0?"ref":l,x=p.onChange,b=p.onClick,j=V(p,it);return v(v({},ga({accept:I,multiple:r,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:S(k(x,K)),onClick:S(k(b,li)),tabIndex:-1},u,w)),j)}},[w,t,r,K,n]);return v(v({},ea),{},{isFocused:ei&&!n,getRootProps:oi,getInputProps:ci,rootRef:g,inputRef:w,open:S(P)})}function rt(a,i){switch(i.type){case"focus":return v(v({},a),{},{isFocused:!0});case"blur":return v(v({},a),{},{isFocused:!1});case"openDialog":return v(v({},ha),{},{isFileDialogActive:!0});case"closeDialog":return v(v({},a),{},{isFileDialogActive:!1});case"setDraggedFiles":return v(v({},a),{},{isDragActive:i.isDragActive,isDragAccept:i.isDragAccept,isDragReject:i.isDragReject});case"setFiles":return v(v({},a),{},{acceptedFiles:i.acceptedFiles,fileRejections:i.fileRejections,isDragReject:i.isDragReject});case"setDragGlobal":return v(v({},a),{},{isDragGlobal:i.isDragGlobal});case"reset":return v({},ha);default:return a}}function pi(){}export{ui as i,fi as n,xi as r,ni as t};
import{s as J}from"./chunk-LvLJmgfZ.js";import{t as lt}from"./react-Bj1aDYRI.js";import{t as ht}from"./jsx-runtime-ZmTK25f3.js";import{Bt as A,Dt as ut,E as dt,Et as mt,I as ft,J as e,P as pt,Pt as gt,St as j,V as P,_ as R,a as bt,at as b,bt as V,dt as vt,ft as q,m as St,pt as kt,qt as yt,vt as Ct,w as xt,wt,yt as Et}from"./dist-DBwNzi3C.js";import{C as Tt,_ as Q,g as X,i as Wt,l as Mt,r as Lt,y as Y}from"./dist-CtsanegT.js";import{a as Bt,c as Nt,i as Ht,r as Ot}from"./dist-ChS0Dc_R.js";import{t as Dt}from"./extends-BiFDv3jB.js";import{t as Kt}from"./objectWithoutPropertiesLoose-DfWeGRFv.js";var Z=function(t){t===void 0&&(t={});var{crosshairCursor:i=!1}=t,a=[];t.closeBracketsKeymap!==!1&&(a=a.concat(Bt)),t.defaultKeymap!==!1&&(a=a.concat(X)),t.searchKeymap!==!1&&(a=a.concat(Wt)),t.historyKeymap!==!1&&(a=a.concat(Y)),t.foldKeymap!==!1&&(a=a.concat(dt)),t.completionKeymap!==!1&&(a=a.concat(Nt)),t.lintKeymap!==!1&&(a=a.concat(Mt));var o=[];return t.lineNumbers!==!1&&o.push(wt()),t.highlightActiveLineGutter!==!1&&o.push(Et()),t.highlightSpecialChars!==!1&&o.push(V()),t.history!==!1&&o.push(Q()),t.foldGutter!==!1&&o.push(xt()),t.drawSelection!==!1&&o.push(q()),t.dropCursor!==!1&&o.push(kt()),t.allowMultipleSelections!==!1&&o.push(A.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&o.push(pt()),t.syntaxHighlighting!==!1&&o.push(P(R,{fallback:!0})),t.bracketMatching!==!1&&o.push(St()),t.closeBrackets!==!1&&o.push(Ht()),t.autocompletion!==!1&&o.push(Ot()),t.rectangularSelection!==!1&&o.push(ut()),i!==!1&&o.push(vt()),t.highlightActiveLine!==!1&&o.push(Ct()),t.highlightSelectionMatches!==!1&&o.push(Lt()),t.tabSize&&typeof t.tabSize=="number"&&o.push(ft.of(" ".repeat(t.tabSize))),o.concat([j.of(a.flat())]).filter(Boolean)},zt=function(t){t===void 0&&(t={});var i=[];t.defaultKeymap!==!1&&(i=i.concat(X)),t.historyKeymap!==!1&&(i=i.concat(Y));var a=[];return t.highlightSpecialChars!==!1&&a.push(V()),t.history!==!1&&a.push(Q()),t.drawSelection!==!1&&a.push(q()),t.syntaxHighlighting!==!1&&a.push(P(R,{fallback:!0})),a.concat([j.of(i.flat())]).filter(Boolean)},At="#e5c07b",$="#e06c75",It="#56b6c2",Ft="#ffffff",I="#abb2bf",U="#7d8799",_t="#61afef",jt="#98c379",tt="#d19a66",Pt="#c678dd",Ut="#21252b",et="#2c313a",at="#282c34",G="#353a42",Gt="#3E4451",ot="#528bff",Jt=[b.theme({"&":{color:I,backgroundColor:at},".cm-content":{caretColor:ot},".cm-cursor, .cm-dropCursor":{borderLeftColor:ot},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Gt},".cm-panels":{backgroundColor:Ut,color:I},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:at,color:U,border:"none"},".cm-activeLineGutter":{backgroundColor:et},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:G},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:G,borderBottomColor:G},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:et,color:I}}},{dark:!0}),P(bt.define([{tag:e.keyword,color:Pt},{tag:[e.name,e.deleted,e.character,e.propertyName,e.macroName],color:$},{tag:[e.function(e.variableName),e.labelName],color:_t},{tag:[e.color,e.constant(e.name),e.standard(e.name)],color:tt},{tag:[e.definition(e.name),e.separator],color:I},{tag:[e.typeName,e.className,e.number,e.changed,e.annotation,e.modifier,e.self,e.namespace],color:At},{tag:[e.operator,e.operatorKeyword,e.url,e.escape,e.regexp,e.link,e.special(e.string)],color:It},{tag:[e.meta,e.comment],color:U},{tag:e.strong,fontWeight:"bold"},{tag:e.emphasis,fontStyle:"italic"},{tag:e.strikethrough,textDecoration:"line-through"},{tag:e.link,color:U,textDecoration:"underline"},{tag:e.heading,fontWeight:"bold",color:$},{tag:[e.atom,e.bool,e.special(e.variableName)],color:tt},{tag:[e.processingInstruction,e.string,e.inserted],color:jt},{tag:e.invalid,color:Ft}]))],Rt=b.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),it=function(t){t===void 0&&(t={});var{indentWithTab:i=!0,editable:a=!0,readOnly:o=!1,theme:f="light",placeholder:p="",basicSetup:l=!0}=t,n=[];switch(i&&n.unshift(j.of([Tt])),l&&(typeof l=="boolean"?n.unshift(Z()):n.unshift(Z(l))),p&&n.unshift(mt(p)),f){case"light":n.push(Rt);break;case"dark":n.push(Jt);break;case"none":break;default:n.push(f);break}return a===!1&&n.push(b.editable.of(!1)),o&&n.push(A.readOnly.of(!0)),[...n]},Vt=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(i=>t.state.sliceDoc(i.from,i.to)),selectedText:t.state.selection.ranges.some(i=>!i.empty)}),qt=class{constructor(t,i){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=i,this.timeoutMS=i,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(i=>{try{i()}catch(a){console.error("TimeoutLatch callback error:",a)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},rt=class{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},nt=null,Qt=()=>typeof window>"u"?new rt:(nt||(nt=new rt),nt),s=J(lt()),st=gt.define(),Xt=200,Yt=[];function Zt(t){var{value:i,selection:a,onChange:o,onStatistics:f,onCreateEditor:p,onUpdate:l,extensions:n=Yt,autoFocus:w,theme:E="light",height:T=null,minHeight:v=null,maxHeight:W=null,width:M=null,minWidth:L=null,maxWidth:B=null,placeholder:N="",editable:H=!0,readOnly:O=!1,indentWithTab:D=!0,basicSetup:K=!0,root:F,initialState:C}=t,[S,z]=(0,s.useState)(),[r,d]=(0,s.useState)(),[k,y]=(0,s.useState)(),c=(0,s.useState)(()=>({current:null}))[0],g=(0,s.useState)(()=>({current:null}))[0],_=b.theme({"&":{height:T,minHeight:v,maxHeight:W,width:M,minWidth:L,maxWidth:B},"& .cm-scroller":{height:"100% !important"}}),m=[b.updateListener.of(h=>{h.docChanged&&typeof o=="function"&&!h.transactions.some(u=>u.annotation(st))&&(c.current?c.current.reset():(c.current=new qt(()=>{if(g.current){var u=g.current;g.current=null,u()}c.current=null},Xt),Qt().add(c.current)),o(h.state.doc.toString(),h)),f&&f(Vt(h))}),_,...it({theme:E,editable:H,readOnly:O,placeholder:N,indentWithTab:D,basicSetup:K})];return l&&typeof l=="function"&&m.push(b.updateListener.of(l)),m=m.concat(n),(0,s.useLayoutEffect)(()=>{if(S&&!k){var h={doc:i,selection:a,extensions:m},u=C?A.fromJSON(C.json,h,C.fields):A.create(h);if(y(u),!r){var x=new b({state:u,parent:S,root:F});d(x),p&&p(x,u)}}return()=>{r&&(y(void 0),d(void 0))}},[S,k]),(0,s.useEffect)(()=>{t.container&&z(t.container)},[t.container]),(0,s.useEffect)(()=>()=>{r&&(r.destroy(),d(void 0)),c.current&&(c.current=(c.current.cancel(),null))},[r]),(0,s.useEffect)(()=>{w&&r&&r.focus()},[w,r]),(0,s.useEffect)(()=>{r&&r.dispatch({effects:yt.reconfigure.of(m)})},[E,n,T,v,W,M,L,B,N,H,O,D,K,o,l]),(0,s.useEffect)(()=>{if(i!==void 0){var h=r?r.state.doc.toString():"";if(r&&i!==h){var u=c.current&&!c.current.isDone,x=()=>{r&&i!==r.state.doc.toString()&&r.dispatch({changes:{from:0,to:r.state.doc.toString().length,insert:i||""},annotations:[st.of(!0)]})};u?g.current=x:x()}}},[i,r]),{state:k,setState:y,view:r,setView:d,container:S,setContainer:z}}var $t=J(ht()),te=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],ct=(0,s.forwardRef)((t,i)=>{var{className:a,value:o="",selection:f,extensions:p=[],onChange:l,onStatistics:n,onCreateEditor:w,onUpdate:E,autoFocus:T,theme:v="light",height:W,minHeight:M,maxHeight:L,width:B,minWidth:N,maxWidth:H,basicSetup:O,placeholder:D,indentWithTab:K,editable:F,readOnly:C,root:S,initialState:z}=t,r=Kt(t,te),d=(0,s.useRef)(null),{state:k,view:y,container:c,setContainer:g}=Zt({root:S,value:o,autoFocus:T,theme:v,height:W,minHeight:M,maxHeight:L,width:B,minWidth:N,maxWidth:H,basicSetup:O,placeholder:D,indentWithTab:K,editable:F,readOnly:C,selection:f,onChange:l,onStatistics:n,onCreateEditor:w,onUpdate:E,extensions:p,initialState:z});(0,s.useImperativeHandle)(i,()=>({editor:d.current,state:k,view:y}),[d,c,k,y]);var _=(0,s.useCallback)(m=>{d.current=m,g(m)},[g]);if(typeof o!="string")throw Error("value must be typeof string but got "+typeof o);return(0,$t.jsx)("div",Dt({ref:_,className:(typeof v=="string"?"cm-theme-"+v:"cm-theme")+(a?" "+a:"")},r))});ct.displayName="CodeMirror";var ee=ct;export{it as n,zt as r,ee as t};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

function t(){return t=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},t.apply(null,arguments)}export{t};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var e=a("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);export{e as t};
import{t as e}from"./simple-mode-BmS_AmGQ.js";const t=e({start:[{regex:/#?!.*/,token:"comment"},{regex:/"""/,token:"string",next:"string3"},{regex:/(STRING:)(\s)/,token:["keyword",null],next:"string2"},{regex:/\S*?"/,token:"string",next:"string"},{regex:/(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\-?\d+.?\d*)(?=\s)/,token:"number"},{regex:/((?:GENERIC)|\:?\:)(\s+)(\S+)(\s+)(\()/,token:["keyword",null,"def",null,"bracket"],next:"stack"},{regex:/(M\:)(\s+)(\S+)(\s+)(\S+)/,token:["keyword",null,"def",null,"tag"]},{regex:/USING\:/,token:"keyword",next:"vocabulary"},{regex:/(USE\:|IN\:)(\s+)(\S+)(?=\s|$)/,token:["keyword",null,"tag"]},{regex:/(\S+\:)(\s+)(\S+)(?=\s|$)/,token:["keyword",null,"def"]},{regex:/(?:;|\\|t|f|if|loop|while|until|do|PRIVATE>|<PRIVATE|\.|\S*\[|\]|\S*\{|\})(?=\s|$)/,token:"keyword"},{regex:/\S+[\)>\.\*\?]+(?=\s|$)/,token:"builtin"},{regex:/[\)><]+\S+(?=\s|$)/,token:"builtin"},{regex:/(?:[\+\-\=\/\*<>])(?=\s|$)/,token:"keyword"},{regex:/\S+/,token:"variable"},{regex:/\s+|./,token:null}],vocabulary:[{regex:/;/,token:"keyword",next:"start"},{regex:/\S+/,token:"tag"},{regex:/\s+|./,token:null}],string:[{regex:/(?:[^\\]|\\.)*?"/,token:"string",next:"start"},{regex:/.*/,token:"string"}],string2:[{regex:/^;/,token:"keyword",next:"start"},{regex:/.*/,token:"string"}],string3:[{regex:/(?:[^\\]|\\.)*?"""/,token:"string",next:"start"},{regex:/.*/,token:"string"}],stack:[{regex:/\)/,token:"bracket",next:"start"},{regex:/--/,token:"bracket"},{regex:/\S+/,token:"meta"},{regex:/\s+|./,token:null}],languageData:{name:"factor",dontIndentStates:["start","vocabulary","string","string3","stack"],commentTokens:{line:"!"}}});export{t};
import{t as o}from"./factor-B3fhZG6W.js";export{o as factor};
var d={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},c={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},i={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},s={true:!0,false:!0,nan:!0,real:!0,min:!0,max:!0,cog:!0,cogs:!0},a=/[+\-*&^%:=<>!|\/]/;function u(e,n){var t=e.next();if(/[\d\.]/.test(t))return t=="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):t=="0"?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(t=="/"||t=="("){if(e.eat("*"))return n.tokenize=l,l(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(a.test(t))return e.eatWhile(a),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current().toLowerCase();return d.propertyIsEnumerable(r)||c.propertyIsEnumerable(r)||i.propertyIsEnumerable(r)?"keyword":s.propertyIsEnumerable(r)?"atom":"variable"}function l(e,n){for(var t=!1,r;r=e.next();){if((r=="/"||r==")")&&t){n.tokenize=u;break}t=r=="*"}return"comment"}function f(e,n,t,r,o){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=o}function m(e,n,t){return e.context=new f(e.indented,n,t,null,e.context)}function p(e){if(e.context.prev)return e.context.type=="end_block"&&(e.indented=e.context.indented),e.context=e.context.prev}const k={name:"fcl",startState:function(e){return{tokenize:null,context:new f(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align??(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;var r=(n.tokenize||u)(e,n);if(r=="comment")return r;t.align??(t.align=!0);var o=e.current().toLowerCase();return c.propertyIsEnumerable(o)?m(n,e.column(),"end_block"):i.propertyIsEnumerable(o)&&p(n),n.startOfLine=!1,r},indent:function(e,n,t){if(e.tokenize!=u&&e.tokenize!=null)return 0;var r=e.context,o=i.propertyIsEnumerable(n);return r.align?r.column+(o?0:1):r.indented+(o?0:t.unit)},languageData:{commentTokens:{line:"//",block:{open:"(*",close:"*)"}}}};export{k as fcl};
import{s as p}from"./chunk-LvLJmgfZ.js";import{t as x}from"./compiler-runtime-B3qBwwSJ.js";import{t as g}from"./jsx-runtime-ZmTK25f3.js";import{n as c,t as l}from"./cn-BKtXLv3a.js";import{Q as v,f as b,l as h,m as N,y as w}from"./input-DUrq2DiR.js";import{u as j}from"./select-BVdzZKAh.js";var d=x(),m=p(g(),1),y=c(["text-sm font-medium leading-none","data-disabled:cursor-not-allowed data-disabled:opacity-70","group-data-invalid:text-destructive"]),k=i=>{let t=(0,d.c)(8),a,e;t[0]===i?(a=t[1],e=t[2]):({className:a,...e}=i,t[0]=i,t[1]=a,t[2]=e);let s;t[3]===a?s=t[4]:(s=l(y(),a),t[3]=a,t[4]=s);let r;return t[5]!==e||t[6]!==s?(r=(0,m.jsx)(w,{className:s,...e}),t[5]=e,t[6]=s,t[7]=r):r=t[7],r},Q=i=>{let t=(0,d.c)(8),a,e;t[0]===i?(a=t[1],e=t[2]):({className:a,...e}=i,t[0]=i,t[1]=a,t[2]=e);let s;t[3]===a?s=t[4]:(s=l("text-sm text-muted-foreground",a),t[3]=a,t[4]=s);let r;return t[5]!==e||t[6]!==s?(r=(0,m.jsx)(N,{className:s,...e,slot:"description"}),t[5]=e,t[6]=s,t[7]=r):r=t[7],r},V=i=>{let t=(0,d.c)(8),a,e;t[0]===i?(a=t[1],e=t[2]):({className:a,...e}=i,t[0]=i,t[1]=a,t[2]=e);let s;t[3]===a?s=t[4]:(s=l("text-sm font-medium text-destructive",a),t[3]=a,t[4]=s);let r;return t[5]!==e||t[6]!==s?(r=(0,m.jsx)(b,{className:s,...e}),t[5]=e,t[6]=s,t[7]=r):r=t[7],r},u=c("",{variants:{variant:{default:["relative flex w-full items-center overflow-hidden rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",j(),"data-focus-within:outline-hidden data-focus-within:ring-2 data-focus-within:ring-ring data-focus-within:ring-offset-2","data-disabled:opacity-50"],ghost:""}},defaultVariants:{variant:"default"}}),_=i=>{let t=(0,d.c)(12),a,e,s;t[0]===i?(a=t[1],e=t[2],s=t[3]):({className:a,variant:s,...e}=i,t[0]=i,t[1]=a,t[2]=e,t[3]=s);let r;t[4]===s?r=t[5]:(r=f=>l(u({variant:s}),f),t[4]=s,t[5]=r);let o;t[6]!==a||t[7]!==r?(o=v(a,r),t[6]=a,t[7]=r,t[8]=o):o=t[8];let n;return t[9]!==e||t[10]!==o?(n=(0,m.jsx)(h,{className:o,...e}),t[9]=e,t[10]=o,t[11]=n):n=t[11],n};export{u as a,k as i,_ as n,Q as r,V as t};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var e=a("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);export{e as t};
var Te=Object.defineProperty;var Be=(t,e,i)=>e in t?Te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var R=(t,e,i)=>Be(t,typeof e!="symbol"?e+"":e,i);import{s as ge}from"./chunk-LvLJmgfZ.js";import{i as qe,l as ce,n as A,p as ye,u as ae}from"./useEvent-BhXAndur.js";import{t as $e}from"./react-Bj1aDYRI.js";import{Xr as Ve,Yn as Le,gn as Ue,qr as Ke,w as Ye}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import"./tooltip-DxKBXCGp.js";import{d as Ge,f as Xe}from"./hotkeys-BHHWjLlp.js";import{t as Ze}from"./invariant-CAG_dYON.js";import{p as Je,u as ve}from"./utils-YqBXNpsM.js";import{S as re}from"./config-Q0O7_stz.js";import{t as Qe}from"./jsx-runtime-ZmTK25f3.js";import{n as et,t as I}from"./button-CZ3Cs4qb.js";import{t as he}from"./cn-BKtXLv3a.js";import{St as tt,at}from"./dist-DBwNzi3C.js";import{a as it,c as rt,i as nt,o as st,s as lt}from"./JsonOutput-PE5ko4gi.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{n as ot,r as me}from"./requests-B4FYHTZl.js";import{t as K}from"./createLucideIcon-BCdY6lG5.js";import{t as dt}from"./arrow-left-VDC1u5rq.js";import{n as ct,t as ht}from"./LazyAnyLanguageCodeMirror-DgZ8iknE.js";import{r as mt}from"./x-ZP5cObgf.js";import{i as pt,r as be}from"./download-os8QlW6l.js";import{t as ft}from"./chevron-right--18M_6o9.js";import{f as pe}from"./maps-D2_Mq1pZ.js";import{n as xt}from"./markdown-renderer-DJy8ww5d.js";import{a as S,c as Y,p as ut,r as jt,t as gt}from"./dropdown-menu-ldcmQvIV.js";import{t as we}from"./copy-D-8y6iMN.js";import{t as ke}from"./download-Dg7clfkc.js";import{t as yt}from"./ellipsis-vertical-J1F7_WS9.js";import{t as vt}from"./eye-off-AK_9uodG.js";import{n as Fe,r as bt,t as wt}from"./types-BRfQN3HL.js";import{t as Ce}from"./file-plus-corner-CvAy4H5W.js";import{t as kt}from"./spinner-DA8-7wQv.js";import{t as Ft}from"./refresh-ccw-DN_xCV6A.js";import{t as Ct}from"./refresh-cw-Dx8TEWFP.js";import{t as Nt}from"./save-DZodxFnE.js";import{t as St}from"./trash-2-DDsWrxuJ.js";import{t as Dt}from"./triangle-alert-CebQ7XwA.js";import{i as Pt,n as _t,t as Ot}from"./es-BYgU_srD.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import{t as W}from"./use-toast-BDYuj3zG.js";import{t as fe}from"./paths-BzSgteR-.js";import"./session-BOFn9QrD.js";import{r as zt}from"./useTheme-DQozhcp1.js";import"./Combination-BAEdC-rz.js";import{t as M}from"./tooltip-CMQz28hC.js";import"./dates-CrvjILe3.js";import{o as Mt}from"./alert-dialog-BW4srmS0.js";import"./popover-CH1FzjxU.js";import{n as Ne}from"./ImperativeModal-BNN1HA7x.js";import{r as Rt}from"./errors-TZBmrJmc.js";import{n as At}from"./blob-D-eV0cU3.js";import"./vega-loader.browser-DXARUlxo.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{t as ne}from"./copy-DHrHayPa.js";import"./purify.es-DZrAQFIu.js";import{a as Wt,i as It,n as xe,r as Et,t as Ht}from"./tree-B--q0-tu.js";import{n as Tt,t as Bt}from"./alert-BOoN6gJ1.js";import{n as Se}from"./error-banner-B9ts0mNl.js";import{n as De}from"./useAsyncData-BMGLSTg8.js";import"./chunk-5FQGJX7Z-DPlx2kjA.js";import"./katex-CDLTCvjQ.js";import"./html-to-image-CIQqSu-S.js";import{o as qt}from"./focus-C1YokgL7.js";import{a as $t}from"./renderShortcut-BckyRbYt.js";import{t as Vt}from"./bundle.esm-i_UbZC0w.js";import{t as Lt}from"./links-DWIqY1l5.js";import{t as Ut}from"./icon-32x32-DH9kM4Sh.js";import{t as G}from"./Inputs-GV-aQbOR.js";var Kt=K("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Pe=K("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),_e=K("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]),Yt=K("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Gt=K("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),Xt=K("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),Oe=ie(),F=ge($e(),1),a=ge(Qe(),1),ze=(0,F.createContext)(null);function Zt(){return(0,F.useContext)(ze)??void 0}var Jt=t=>{let e=(0,Oe.c)(3),{children:i}=t,n=It(),s;return e[0]!==i||e[1]!==n?(s=(0,a.jsx)(ze.Provider,{value:n,children:i}),e[0]=i,e[1]=n,e[2]=s):s=e[2],s};const Qt=t=>{let e=(0,Oe.c)(5),{children:i}=t,[n,s]=(0,F.useState)(null),r;e[0]!==i||e[1]!==n?(r=n&&(0,a.jsx)(Wt,{backend:Et,options:{rootElement:n},children:(0,a.jsx)(Jt,{children:i})}),e[0]=i,e[1]=n,e[2]=r):r=e[2];let d;return e[3]===r?d=e[4]:(d=(0,a.jsx)("div",{ref:s,className:"contents",children:r}),e[3]=r,e[4]=d),d};var ue=new Map;const ea=({file:t,onOpenNotebook:e})=>{let{theme:i}=zt(),{sendFileDetails:n,sendUpdateFile:s}=me(),r=ae(Je),d=ae(ve),f=ae(Ke),[h,m]=(0,F.useState)(""),{data:l,isPending:u,error:v,setData:g,refetch:c}=De(async()=>{let o=await n({path:t.path}),j=o.contents||"";return m(ue.get(t.path)||j),o},[t.path]),y=async()=>{h!==(l==null?void 0:l.contents)&&await s({path:t.path,contents:h}).then(o=>{o.success&&(g(j=>({...j,contents:h})),m(h))})},C=(0,F.useRef)(h);if(C.current=h,(0,F.useEffect)(()=>()=>{if(!(l!=null&&l.contents))return;let o=C.current;o===l.contents?ue.delete(t.path):ue.set(t.path,o)},[t.path,l==null?void 0:l.contents]),v)return(0,a.jsx)(Se,{error:v});if(u||!l)return null;let x=l.mimeType||"text/plain",D=x in je,k=f&&l.file.isMarimoFile&&(t.path===f||t.path.endsWith(`/${f}`));if(!l.contents&&!D)return(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-6",children:[(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Name"}),(0,a.jsx)("div",{children:l.file.name}),(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Type"}),(0,a.jsx)("div",{children:x})]});let b=(0,a.jsxs)("div",{className:"text-xs text-muted-foreground p-1 flex justify-end gap-2 border-b",children:[(0,a.jsx)(M,{content:"Refresh",children:(0,a.jsx)(G,{size:"small",onClick:c,children:(0,a.jsx)(Ct,{})})}),t.isMarimoFile&&!re()&&(0,a.jsx)(M,{content:"Open notebook",children:(0,a.jsx)(G,{size:"small",onClick:o=>e(o),children:(0,a.jsx)(pe,{})})}),!d&&(0,a.jsx)(M,{content:"Download",children:(0,a.jsx)(G,{size:"small",onClick:()=>{if(Me(x)){pt(xt(l.contents,x),l.file.name);return}be(new Blob([l.contents||h],{type:x}),l.file.name)},children:(0,a.jsx)(ke,{})})}),!Me(x)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M,{content:"Copy contents to clipboard",children:(0,a.jsx)(G,{size:"small",onClick:async()=>{await ne(h)},children:(0,a.jsx)(we,{})})}),(0,a.jsx)(M,{content:$t("global.save"),children:(0,a.jsx)(G,{size:"small",color:h===l.contents?void 0:"green",onClick:y,disabled:h===l.contents,children:(0,a.jsx)(Nt,{})})})]})]});return x.startsWith("image/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(st,{base64:l.contents,mime:x})})]}):x==="text/csv"&&l.contents?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(it,{contents:l.contents})})]}):x.startsWith("audio/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(nt,{base64:l.contents,mime:x})})]}):x.startsWith("video/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(rt,{base64:l.contents,mime:x})})]}):x.startsWith("application/pdf")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(lt,{base64:l.contents,mime:x})})]}):(0,a.jsxs)(a.Fragment,{children:[b,k&&(0,a.jsxs)(Bt,{variant:"warning",className:"rounded-none",children:[(0,a.jsx)(Dt,{className:"h-4 w-4"}),(0,a.jsx)(Tt,{children:"Editing the notebook file directly while running in marimo's editor may cause unintended changes. Please use with caution."})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:(0,a.jsx)(F.Suspense,{children:(0,a.jsx)(ht,{theme:i==="dark"?"dark":"light",language:je[x]||je.default,className:"border-b",extensions:[at.lineWrapping,tt.of([{key:r.getHotkey("global.save").key,stopPropagation:!0,run:()=>h===l.contents?!1:(y(),!0)}])],value:h,onChange:m})})})]})};var Me=t=>t?t.startsWith("image/")||t.startsWith("audio/")||t.startsWith("video/")||t.startsWith("application/pdf"):!1,je={"application/javascript":"javascript","text/markdown":"markdown","text/html":"html","text/css":"css","text/x-python":"python","application/json":"json","application/xml":"xml","text/x-yaml":"yaml","text/csv":"markdown","text/plain":"markdown",default:"markdown"},ta=class{constructor(t){R(this,"delegate",new xe([]));R(this,"rootPath","");R(this,"onChange",Xe.NOOP);R(this,"path",new fe("/"));R(this,"initialize",async t=>{if(this.onChange=t,this.delegate.data.length===0)try{let e=await this.callbacks.listFiles({path:this.rootPath});this.delegate=new xe(e.files),this.rootPath=e.root,this.path=fe.guessDeliminator(e.root)}catch(e){W({title:"Failed",description:Rt(e)})}this.onChange(this.delegate.data)});R(this,"refreshAll",async t=>{let e=[this.rootPath,...t.map(n=>{var s;return(s=this.delegate.find(n))==null?void 0:s.data.path})].filter(Boolean),i=await Promise.all(e.map(n=>this.callbacks.listFiles({path:n}).catch(()=>({files:[]}))));for(let[n,s]of e.entries()){let r=i[n];s===this.rootPath?this.delegate=new xe(r.files):this.delegate.update({id:s,changes:{children:r.files}})}this.onChange(this.delegate.data)});R(this,"relativeFromRoot",t=>{let e=this.rootPath.endsWith(this.path.deliminator)?this.rootPath:`${this.rootPath}${this.path.deliminator}`;return t.startsWith(e)?t.slice(e.length):t});R(this,"handleResponse",t=>t.success?t:(W({title:"Failed",description:t.message}),null));this.callbacks=t}async expand(t){let e=this.delegate.find(t);if(!e||!e.data.isDirectory)return!1;if(e.children&&e.children.length>0)return!0;let i=await this.callbacks.listFiles({path:e.data.path});return this.delegate.update({id:t,changes:{children:i.files}}),this.onChange(this.delegate.data),!0}async rename(t,e){let i=this.delegate.find(t);if(!i)return;let n=i.data.path,s=this.path.join(this.path.dirname(n),e);await this.callbacks.renameFileOrFolder({path:n,newPath:s}).then(this.handleResponse),this.delegate.update({id:t,changes:{name:e,path:s}}),this.onChange(this.delegate.data),await this.refreshAll([s])}async move(t,e){var n;let i=e?((n=this.delegate.find(e))==null?void 0:n.data.path)??e:this.rootPath;await Promise.all(t.map(s=>{this.delegate.move({id:s,parentId:e,index:0});let r=this.delegate.find(s);if(!r)return Promise.resolve();let d=this.path.join(i,this.path.basename(r.data.path));return this.delegate.update({id:s,changes:{path:d}}),this.callbacks.renameFileOrFolder({path:r.data.path,newPath:d}).then(this.handleResponse)})),this.onChange(this.delegate.data),await this.refreshAll([i])}async createFile(t,e){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,n=await this.callbacks.createFileOrFolder({path:i,type:"file",name:t}).then(this.handleResponse);n!=null&&n.info&&(this.delegate.create({parentId:e,index:0,data:n.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async createFolder(t,e){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,n=await this.callbacks.createFileOrFolder({path:i,type:"directory",name:t}).then(this.handleResponse);n!=null&&n.info&&(this.delegate.create({parentId:e,index:0,data:n.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async delete(t){let e=this.delegate.find(t);e&&(await this.callbacks.deleteFileOrFolder({path:e.data.path}).then(this.handleResponse),this.delegate.drop({id:t}),this.onChange(this.delegate.data))}};const Re=ye(t=>{let e=t(ot);return Ze(e,"no requestClientAtom set"),new ta({listFiles:e.sendListFiles,createFileOrFolder:e.sendCreateFileOrFolder,deleteFileOrFolder:e.sendDeleteFileOrFolder,renameFileOrFolder:e.sendRenameFileOrFolder})}),aa=ye({});async function ia(){await qe.get(Re).refreshAll([])}var ra=ie(),na=1024*1024*100;function Ae(t){let e=(0,ra.c)(7),i;e[0]===t?i=e[1]:(i=t===void 0?{}:t,e[0]=t,e[1]=i);let n=i,{sendCreateFileOrFolder:s}=me(),r;e[2]===s?r=e[3]:(r=async f=>{for(let h of f){let m=ha(ca(h)),l="";m&&(l=fe.guessDeliminator(m).dirname(m));let u=(await At(h)).split(",")[1];await s({path:l,type:"file",name:h.name,contents:u})}await ia()},e[2]=s,e[3]=r);let d;return e[4]!==n||e[5]!==r?(d={multiple:!0,maxSize:na,onError:da,onDropRejected:sa,onDrop:r,...n},e[4]=n,e[5]=r,e[6]=d):d=e[6],Ot(d)}function sa(t){W({title:"File upload failed",description:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:t.map(la)}),variant:"danger"})}function la(t){return(0,a.jsxs)("div",{children:[t.file.name," (",t.errors.map(oa).join(", "),")"]},t.file.name)}function oa(t){return t.message}function da(t){Ge.error(t),W({title:"File upload failed",description:t.message,variant:"danger"})}function ca(t){if(t.webkitRelativePath)return t.webkitRelativePath;if("path"in t&&typeof t.path=="string")return t.path;if("relativePath"in t&&typeof t.relativePath=="string")return t.relativePath}function ha(t){if(t)return t.replace(/^\/+/,"")}var X=ie(),ma=Ve("marimo:showHiddenFiles",!0,Ue,{getOnInit:!0}),We=F.createContext(null);const pa=t=>{let e=(0,X.c)(68),{height:i}=t,n=(0,F.useRef)(null),s=Zt(),[r]=ce(Re),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];let[f,h]=(0,F.useState)(d),[m,l]=(0,F.useState)(null),[u,v]=ce(ma),{openPrompt:g}=Ne(),[c,y]=ce(aa),C;e[1]===r?C=e[2]:(C=()=>r.initialize(h),e[1]=r,e[2]=C);let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=[],e[3]=x):x=e[3];let{isPending:D,error:k}=De(C,x),b;e[4]!==c||e[5]!==r?(b=()=>{r.refreshAll(Object.keys(c).filter(p=>c[p]))},e[4]=c,e[5]=r,e[6]=b):b=e[6];let o=A(b),j;e[7]!==v||e[8]!==u?(j=()=>{v(!u)},e[7]=v,e[8]=u,e[9]=j):j=e[9];let P=A(j),_;e[10]!==g||e[11]!==r?(_=async()=>{g({title:"Folder name",onConfirm:async p=>{r.createFolder(p,null)}})},e[10]=g,e[11]=r,e[12]=_):_=e[12];let N=A(_),O;e[13]!==g||e[14]!==r?(O=async()=>{g({title:"File name",onConfirm:async p=>{r.createFile(p,null)}})},e[13]=g,e[14]=r,e[15]=O):O=e[15];let se=A(O),Z;e[16]===y?Z=e[17]:(Z=()=>{var p;(p=n.current)==null||p.closeAll(),y({})},e[16]=y,e[17]=Z);let le=A(Z),J;e[18]!==f||e[19]!==u?(J=Ee(f,u),e[18]=f,e[19]=u,e[20]=J):J=e[20];let oe=J;if(D){let p;return e[21]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(kt,{size:"medium",centered:!0}),e[21]=p):p=e[21],p}if(k){let p;return e[22]===k?p=e[23]:(p=(0,a.jsx)(Se,{error:k}),e[22]=k,e[23]=p),p}if(m){let p;e[24]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(null),e[24]=p):p=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(I,{onClick:p,"data-testid":"file-explorer-back-button",variant:"text",size:"xs",className:"mb-0",children:(0,a.jsx)(dt,{size:16})}),e[25]=w):w=e[25];let z;e[26]===m.name?z=e[27]:(z=(0,a.jsxs)("div",{className:"flex items-center pl-1 pr-3 shrink-0 border-b justify-between",children:[w,(0,a.jsx)("span",{className:"font-bold",children:m.name})]}),e[26]=m.name,e[27]=z);let L;e[28]!==m.path||e[29]!==r?(L=He=>Ie(He,r.relativeFromRoot(m.path)),e[28]=m.path,e[29]=r,e[30]=L):L=e[30];let U;e[31]!==m||e[32]!==L?(U=(0,a.jsx)(F.Suspense,{children:(0,a.jsx)(ea,{onOpenNotebook:L,file:m})}),e[31]=m,e[32]=L,e[33]=U):U=e[33];let te;return e[34]!==z||e[35]!==U?(te=(0,a.jsxs)(a.Fragment,{children:[z,U]}),e[34]=z,e[35]=U,e[36]=te):te=e[36],te}let E;e[37]!==le||e[38]!==se||e[39]!==N||e[40]!==P||e[41]!==o||e[42]!==r?(E=(0,a.jsx)(xa,{onRefresh:o,onHidden:P,onCreateFile:se,onCreateFolder:N,onCollapseAll:le,tree:r}),e[37]=le,e[38]=se,e[39]=N,e[40]=P,e[41]=o,e[42]=r,e[43]=E):E=e[43];let de=i-33,H,T,B;e[44]===r?(H=e[45],T=e[46],B=e[47]):(H=async p=>{let{ids:w}=p;for(let z of w)await r.delete(z)},T=async p=>{let{id:w,name:z}=p;await r.rename(w,z)},B=async p=>{let{dragIds:w,parentId:z}=p;await r.move(w,z)},e[44]=r,e[45]=H,e[46]=T,e[47]=B);let Q;e[48]===Symbol.for("react.memo_cache_sentinel")?(Q=p=>{let w=p[0];w&&(w.data.isDirectory||l(w.data))},e[48]=Q):Q=e[48];let q;e[49]!==c||e[50]!==y||e[51]!==r?(q=async p=>{if(await r.expand(p)){let w=c[p]??!1;y({...c,[p]:!w})}},e[49]=c,e[50]=y,e[51]=r,e[52]=q):q=e[52];let $;e[53]!==s||e[54]!==c||e[55]!==de||e[56]!==H||e[57]!==T||e[58]!==B||e[59]!==q||e[60]!==oe?($=(0,a.jsx)(Ht,{width:"100%",ref:n,height:de,className:"h-full",data:oe,initialOpenState:c,openByDefault:!1,dndManager:s,renderCursor:ba,disableDrop:wa,onDelete:H,onRename:T,onMove:B,onSelect:Q,onToggle:q,padding:15,rowHeight:30,indent:fa,overscanCount:1e3,disableMultiSelection:!0,children:ga}),e[53]=s,e[54]=c,e[55]=de,e[56]=H,e[57]=T,e[58]=B,e[59]=q,e[60]=oe,e[61]=$):$=e[61];let V;e[62]!==$||e[63]!==r?(V=(0,a.jsx)(We,{value:r,children:$}),e[62]=$,e[63]=r,e[64]=V):V=e[64];let ee;return e[65]!==E||e[66]!==V?(ee=(0,a.jsxs)(a.Fragment,{children:[E,V]}),e[65]=E,e[66]=V,e[67]=ee):ee=e[67],ee};var fa=15,xa=t=>{let e=(0,X.c)(34),{onRefresh:i,onHidden:n,onCreateFile:s,onCreateFolder:r,onCollapseAll:d}=t,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={noDrag:!0,noDragEventsBubbling:!0},e[0]=f):f=e[0];let{getRootProps:h,getInputProps:m}=Ae(f),l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Ce,{size:16}),e[1]=l):l=e[1];let u;e[2]===s?u=e[3]:(u=(0,a.jsx)(M,{content:"Add file",children:(0,a.jsx)(I,{"data-testid":"file-explorer-add-file-button",onClick:s,variant:"text",size:"xs",children:l})}),e[2]=s,e[3]=u);let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(Pe,{size:16}),e[4]=v):v=e[4];let g;e[5]===r?g=e[6]:(g=(0,a.jsx)(M,{content:"Add folder",children:(0,a.jsx)(I,{"data-testid":"file-explorer-add-folder-button",onClick:r,variant:"text",size:"xs",children:v})}),e[5]=r,e[6]=g);let c;e[7]===h?c=e[8]:(c=h({}),e[7]=h,e[8]=c);let y,C;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=et({variant:"text",size:"xs"}),C=(0,a.jsx)(Pt,{size:16}),e[9]=y,e[10]=C):(y=e[9],C=e[10]);let x;e[11]===c?x=e[12]:(x=(0,a.jsx)(M,{content:"Upload file",children:(0,a.jsx)("button",{"data-testid":"file-explorer-upload-button",...c,className:y,children:C})}),e[11]=c,e[12]=x);let D;e[13]===m?D=e[14]:(D=m({}),e[13]=m,e[14]=D);let k;e[15]===D?k=e[16]:(k=(0,a.jsx)("input",{...D,type:"file"}),e[15]=D,e[16]=k);let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsx)(Ft,{size:16}),e[17]=b):b=e[17];let o;e[18]===i?o=e[19]:(o=(0,a.jsx)(M,{content:"Refresh",children:(0,a.jsx)(I,{"data-testid":"file-explorer-refresh-button",onClick:i,variant:"text",size:"xs",children:b})}),e[18]=i,e[19]=o);let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(vt,{size:16}),e[20]=j):j=e[20];let P;e[21]===n?P=e[22]:(P=(0,a.jsx)(M,{content:"Toggle hidden files",children:(0,a.jsx)(I,{"data-testid":"file-explorer-hidden-files-button",onClick:n,variant:"text",size:"xs",children:j})}),e[21]=n,e[22]=P);let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=(0,a.jsx)(Kt,{size:16}),e[23]=_):_=e[23];let N;e[24]===d?N=e[25]:(N=(0,a.jsx)(M,{content:"Collapse all folders",children:(0,a.jsx)(I,{"data-testid":"file-explorer-collapse-button",onClick:d,variant:"text",size:"xs",children:_})}),e[24]=d,e[25]=N);let O;return e[26]!==k||e[27]!==o||e[28]!==P||e[29]!==N||e[30]!==u||e[31]!==g||e[32]!==x?(O=(0,a.jsxs)("div",{className:"flex items-center justify-end px-2 shrink-0 border-b",children:[u,g,x,k,o,P,N]}),e[26]=k,e[27]=o,e[28]=P,e[29]=N,e[30]=u,e[31]=g,e[32]=x,e[33]=O):O=e[33],O},ua=t=>{let e=(0,X.c)(9),{node:i,onOpenMarimoFile:n}=t,s;e[0]===i?s=e[1]:(s=f=>{i.data.isDirectory||(f.stopPropagation(),i.select())},e[0]=i,e[1]=s);let r;e[2]!==i.data.isMarimoFile||e[3]!==n?(r=i.data.isMarimoFile&&!re()&&(0,a.jsxs)("span",{className:"shrink-0 ml-2 text-sm hidden group-hover:inline hover:underline",onClick:n,children:["open ",(0,a.jsx)(pe,{className:"inline ml-1",size:12})]}),e[2]=i.data.isMarimoFile,e[3]=n,e[4]=r):r=e[4];let d;return e[5]!==i.data.name||e[6]!==s||e[7]!==r?(d=(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",onClick:s,children:[i.data.name,r]}),e[5]=i.data.name,e[6]=s,e[7]=r,e[8]=d):d=e[8],d},ja=t=>{let e=(0,X.c)(10),{node:i}=t,n=(0,F.useRef)(null),s,r;e[0]===i.data.name?(s=e[1],r=e[2]):(s=()=>{var m,l;(m=n.current)==null||m.focus(),(l=n.current)==null||l.setSelectionRange(0,i.data.name.lastIndexOf("."))},r=[i.data.name],e[0]=i.data.name,e[1]=s,e[2]=r),(0,F.useEffect)(s,r);let d,f;e[3]===i?(d=e[4],f=e[5]):(d=()=>i.reset(),f=m=>{m.key==="Escape"&&i.reset(),m.key==="Enter"&&i.submit(m.currentTarget.value)},e[3]=i,e[4]=d,e[5]=f);let h;return e[6]!==i.data.name||e[7]!==d||e[8]!==f?(h=(0,a.jsx)("input",{ref:n,className:"flex-1 bg-transparent border border-border text-muted-foreground",defaultValue:i.data.name,onClick:ka,onBlur:d,onKeyDown:f}),e[6]=i.data.name,e[7]=d,e[8]=f,e[9]=h):h=e[9],h},ga=({node:t,style:e,dragHandle:i})=>{let{openFile:n,sendCreateFileOrFolder:s,sendFileDetails:r}=me(),d=ae(ve),f=t.data.isDirectory?"directory":bt(t.data.name),h=wt[f],{openConfirm:m,openPrompt:l}=Ne(),{createNewCell:u}=Ye(),v=qt(),g=o=>{u({code:o,before:!1,cellId:v??"__end__"})},c=(0,F.use)(We),y=async o=>{Ie(o,c?c.relativeFromRoot(t.data.path):t.data.path)},C=async o=>{o.stopPropagation(),o.preventDefault(),m({title:"Delete file",description:`Are you sure you want to delete ${t.data.name}?`,confirmAction:(0,a.jsx)(Mt,{onClick:async()=>{await t.tree.delete(t.id)},"aria-label":"Confirm",children:"Delete"})})},x=A(async()=>{t.open(),l({title:"Folder name",onConfirm:async o=>{c==null||c.createFolder(o,t.id)}})}),D=A(async()=>{t.open(),l({title:"File name",onConfirm:async o=>{c==null||c.createFile(o,t.id)}})}),k=A(async()=>{var _;if(!c||t.data.isDirectory)return;let[o,j]=_t(t.data.name),P=`${o}_copy${j}`;try{let N=await r({path:t.data.path}),O=((_=t.parent)==null?void 0:_.data.path)||"";await s({path:O,type:"file",name:P,contents:N.contents?btoa(N.contents):void 0}),await c.refreshAll([O])}catch{W({title:"Failed to duplicate file",description:"Unable to create a duplicate of the file",variant:"danger"})}}),b=()=>{let o={size:14,strokeWidth:1.5,className:"mr-2"};return(0,a.jsxs)(jt,{align:"end",className:"print:hidden w-[220px]",onClick:j=>j.stopPropagation(),onCloseAutoFocus:j=>j.preventDefault(),children:[!t.data.isDirectory&&(0,a.jsxs)(S,{onSelect:()=>t.select(),children:[(0,a.jsx)(Xt,{...o}),"Open file"]}),!t.data.isDirectory&&!re()&&(0,a.jsxs)(S,{onSelect:()=>{n({path:t.data.path})},children:[(0,a.jsx)(pe,{...o}),"Open file in external editor"]}),t.data.isDirectory&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S,{onSelect:()=>D(),children:[(0,a.jsx)(Ce,{...o}),"Create file"]}),(0,a.jsxs)(S,{onSelect:()=>x(),children:[(0,a.jsx)(Pe,{...o}),"Create folder"]}),(0,a.jsx)(Y,{})]}),(0,a.jsxs)(S,{onSelect:()=>t.edit(),children:[(0,a.jsx)(Yt,{...o}),"Rename"]}),!t.data.isDirectory&&(0,a.jsxs)(S,{onSelect:k,children:[(0,a.jsx)(we,{...o}),"Duplicate"]}),(0,a.jsxs)(S,{onSelect:async()=>{await ne(t.data.path),W({title:"Copied to clipboard"})},children:[(0,a.jsx)(_e,{...o}),"Copy path"]}),c&&(0,a.jsxs)(S,{onSelect:async()=>{await ne(c.relativeFromRoot(t.data.path)),W({title:"Copied to clipboard"})},children:[(0,a.jsx)(_e,{...o}),"Copy relative path"]}),(0,a.jsx)(Y,{}),(0,a.jsxs)(S,{onSelect:()=>{let{path:j}=t.data;g(Fe[f](j))},children:[(0,a.jsx)(ct,{...o}),"Insert snippet for reading file"]}),(0,a.jsxs)(S,{onSelect:async()=>{W({title:"Copied to clipboard",description:"Code to open the file has been copied to your clipboard. You can also drag and drop this file into the editor"});let{path:j}=t.data;await ne(Fe[f](j))},children:[(0,a.jsx)(Le,{...o}),"Copy snippet for reading file"]}),t.data.isMarimoFile&&!re()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Y,{}),(0,a.jsxs)(S,{onSelect:y,children:[(0,a.jsx)(Gt,{...o}),"Open notebook"]})]}),(0,a.jsx)(Y,{}),!t.data.isDirectory&&!d&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S,{onSelect:async()=>{let j=(await r({path:t.data.path})).contents||"";be(new Blob([j]),t.data.name)},children:[(0,a.jsx)(ke,{...o}),"Download"]}),(0,a.jsx)(Y,{})]}),(0,a.jsxs)(S,{onSelect:C,variant:"danger",children:[(0,a.jsx)(St,{...o}),"Delete"]})]})};return(0,a.jsxs)("div",{style:e,ref:i,className:he("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group"),draggable:!0,onClick:o=>{o.stopPropagation(),t.data.isDirectory&&t.toggle()},children:[(0,a.jsx)(ya,{node:t}),(0,a.jsxs)("span",{className:he("flex items-center pl-1 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden group",t.willReceiveDrop&&t.data.isDirectory&&"bg-accent/80 hover:bg-accent/80 text-accent-foreground"),children:[t.data.isMarimoFile?(0,a.jsx)("img",{src:Ut,className:"w-5 h-5 shrink-0 mr-2 filter grayscale",alt:"Marimo"}):(0,a.jsx)(h,{className:"w-5 h-5 shrink-0 mr-2",strokeWidth:1.5}),t.isEditing?(0,a.jsx)(ja,{node:t}):(0,a.jsx)(ua,{node:t,onOpenMarimoFile:y}),(0,a.jsxs)(gt,{modal:!1,children:[(0,a.jsx)(ut,{asChild:!0,tabIndex:-1,onClick:o=>o.stopPropagation(),children:(0,a.jsx)(I,{"data-testid":"file-explorer-more-button",variant:"text",tabIndex:-1,size:"xs",className:"mb-0","aria-label":"More options",children:(0,a.jsx)(yt,{strokeWidth:2,className:"w-5 h-5 hidden group-hover:block"})})}),b()]})]})]})},ya=t=>{let e=(0,X.c)(3),{node:i}=t;if(!i.data.isDirectory){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)("span",{className:"w-5 h-5 shrink-0"}),e[0]=s):s=e[0],s}let n;return e[1]===i.isOpen?n=e[2]:(n=i.isOpen?(0,a.jsx)(mt,{className:"w-5 h-5 shrink-0"}):(0,a.jsx)(ft,{className:"w-5 h-5 shrink-0"}),e[1]=i.isOpen,e[2]=n),n};function Ie(t,e){t.stopPropagation(),t.preventDefault(),Lt(e)}function Ee(t,e){if(e)return t;let i=[];for(let n of t){if(va(n.name))continue;let s=n;if(n.children){let r=Ee(n.children,e);r!==n.children&&(s={...n,children:r})}i.push(s)}return i}function va(t){return!!t.startsWith(".")}function ba(){return null}function wa(t){let{parentNode:e}=t;return!e.data.isDirectory}function ka(t){return t.stopPropagation()}var Fa=ie(),Ca=()=>{let t=(0,Fa.c)(20),{ref:e,height:i}=Vt(),n=i===void 0?1:i,s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={noClick:!0,noKeyboard:!0},t[0]=s):s=t[0];let{getRootProps:r,getInputProps:d,isDragActive:f}=Ae(s),h;t[1]===r?h=t[2]:(h=r(),t[1]=r,t[2]=h);let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=he("flex flex-col flex-1 overflow-hidden relative"),t[3]=m):m=t[3];let l;t[4]===d?l=t[5]:(l=d(),t[4]=d,t[5]=l);let u;t[6]===l?u=t[7]:(u=(0,a.jsx)("input",{...l}),t[6]=l,t[7]=u);let v;t[8]===f?v=t[9]:(v=f&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center uppercase justify-center text-xl font-bold text-primary/90 bg-accent/85 z-10 border-2 border-dashed border-primary/90 rounded-lg pointer-events-none",children:"Drop files here"}),t[8]=f,t[9]=v);let g;t[10]===n?g=t[11]:(g=(0,a.jsx)(pa,{height:n}),t[10]=n,t[11]=g);let c;t[12]!==e||t[13]!==g?(c=(0,a.jsx)("div",{ref:e,className:"flex flex-col flex-1 overflow-hidden",children:g}),t[12]=e,t[13]=g,t[14]=c):c=t[14];let y;return t[15]!==h||t[16]!==u||t[17]!==v||t[18]!==c?(y=(0,a.jsx)(Qt,{children:(0,a.jsxs)("div",{...h,className:m,children:[u,v,c]})}),t[15]=h,t[16]=u,t[17]=v,t[18]=c,t[19]=y):y=t[19],y};export{Ca as default};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]);export{t};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var e=a("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),h=a("file-headphone",[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",key:"1vfytu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",key:"1etmh7"}]]),t=a("file-image",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]),v=a("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);export{e as i,t as n,h as r,v as t};
import{s as I}from"./chunk-LvLJmgfZ.js";import{u as j}from"./useEvent-BhXAndur.js";import{t as M}from"./react-Bj1aDYRI.js";import{nt as O,x as H}from"./cells-DPp5cDaO.js";import{t as S}from"./compiler-runtime-B3qBwwSJ.js";import{d as k}from"./hotkeys-BHHWjLlp.js";import{t as $}from"./jsx-runtime-ZmTK25f3.js";import{t as x}from"./cn-BKtXLv3a.js";import{t as B}from"./mode-Bn7pdJvO.js";var D=S(),h=I(M(),1);function L(){return B()==="edit"?document.getElementById("App"):void 0}function _(t){let e=(0,D.c)(7),[r,o]=(0,h.useState)(void 0),[i,s]=(0,h.useState)(void 0),l=(0,h.useRef)(null),n=(0,h.useRef)(null),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=new Map,e[0]=f):f=e[0];let u=(0,h.useRef)(f),a,m;e[1]===t?(a=e[2],m=e[3]):(a=()=>t.length===0?void 0:(l.current=new IntersectionObserver(d=>{let v=!1;if(d.forEach(p=>{let b=p.target;p.isIntersecting?(!n.current||b.getBoundingClientRect().top<n.current.getBoundingClientRect().top)&&(n.current=b,v=!0):b===n.current&&(n.current=null,v=!0)}),v&&n.current){let p=O(n.current);o("id"in p?p.id:p.path),s(u.current.get(n.current))}},{root:L(),rootMargin:"0px",threshold:0}),t.forEach(d=>{var v;if(d){let p=O(d[0]),b=t.map(T).filter(w=>"id"in p?w.id===p.id:w.textContent===d[0].textContent).indexOf(d[0]);u.current.set(d[0],b),(v=l.current)==null||v.observe(d[0])}}),()=>{l.current&&l.current.disconnect(),n.current=null}),m=[t],e[1]=t,e[2]=a,e[3]=m),(0,h.useEffect)(a,m);let c;return e[4]!==r||e[5]!==i?(c={activeHeaderId:r,activeOccurrences:i},e[4]=r,e[5]=i,e[6]=c):c=e[6],c}function T(t){let[e]=t;return e}function C(t){if(t.length===0)return[];let e=new Map;return t.map(r=>{let o="id"in r.by?r.by.id:r.by.path,i=e.get(o)??0;e.set(o,i+1);let s=N(r,i);return s?[s,o]:null}).filter(Boolean)}function E(t,e){let r=N(t,e);if(!r){k.warn("Could not find element for outline item",t);return}r.scrollIntoView({behavior:"smooth",block:"start"}),r.classList.add("outline-item-highlight"),setTimeout(()=>{r.classList.remove("outline-item-highlight")},3e3)}function N(t,e){return"id"in t.by?document.querySelectorAll(`[id="${CSS.escape(t.by.id)}"]`)[e]:document.evaluate(t.by.path,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}var y=S(),g=I($(),1);const A=()=>{let t=(0,y.c)(19),{items:e}=j(H),r;t[0]===e?r=t[1]:(r=C(e),t[0]=e,t[1]=r);let{activeHeaderId:o,activeOccurrences:i}=_(r),[s,l]=h.useState(!1);if(e.length<2)return null;let n,f,u;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>l(!0),f=()=>l(!1),u=x("fixed top-[25vh] right-8 z-10000","hidden md:block"),t[2]=n,t[3]=f,t[4]=u):(n=t[2],f=t[3],u=t[4]);let a=s?"-left-[280px] opacity-100":"left-[300px] opacity-0",m;t[5]===a?m=t[6]:(m=x("-top-4 max-h-[70vh] bg-background rounded-lg shadow-lg absolute overflow-auto transition-all duration-300 w-[300px] border",a),t[5]=a,t[6]=m);let c;t[7]!==o||t[8]!==i||t[9]!==e||t[10]!==m?(c=(0,g.jsx)(R,{className:m,items:e,activeHeaderId:o,activeOccurrences:i}),t[7]=o,t[8]=i,t[9]=e,t[10]=m,t[11]=c):c=t[11];let d;t[12]!==o||t[13]!==i||t[14]!==e?(d=(0,g.jsx)(P,{items:e,activeHeaderId:o,activeOccurrences:i}),t[12]=o,t[13]=i,t[14]=e,t[15]=d):d=t[15];let v;return t[16]!==c||t[17]!==d?(v=(0,g.jsxs)("div",{onMouseEnter:n,onMouseLeave:f,className:u,children:[c,d]}),t[16]=c,t[17]=d,t[18]=v):v=t[18],v},P=t=>{let e=(0,y.c)(8),{items:r,activeHeaderId:o,activeOccurrences:i}=t,s,l;if(e[0]!==o||e[1]!==i||e[2]!==r){let f=new Map;s="flex flex-col gap-4 items-end max-h-[70vh] overflow-hidden",l=r.map((u,a)=>{let m="id"in u.by?u.by.id:u.by.path,c=f.get(m)??0;return f.set(m,c+1),(0,g.jsx)("div",{className:x("h-[2px] bg-muted-foreground/60",u.level===1&&"w-5",u.level===2&&"w-4",u.level===3&&"w-3",u.level===4&&"w-2",c===i&&o===m&&"bg-foreground"),onClick:()=>E(u,c)},`${m}-${a}`)}),e[0]=o,e[1]=i,e[2]=r,e[3]=s,e[4]=l}else s=e[3],l=e[4];let n;return e[5]!==s||e[6]!==l?(n=(0,g.jsx)("div",{className:s,children:l}),e[5]=s,e[6]=l,e[7]=n):n=e[7],n},R=t=>{let e=(0,y.c)(11),{items:r,activeHeaderId:o,activeOccurrences:i,className:s}=t,l,n;if(e[0]!==o||e[1]!==i||e[2]!==s||e[3]!==r){let u=new Map;e[6]===s?l=e[7]:(l=x("flex flex-col overflow-auto py-4 pl-2",s),e[6]=s,e[7]=l),n=r.map((a,m)=>{let c="id"in a.by?a.by.id:a.by.path,d=u.get(c)??0;return u.set(c,d+1),(0,g.jsx)("div",{className:x("px-2 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l",a.level===1&&"font-semibold",a.level===2&&"ml-3",a.level===3&&"ml-6",a.level===4&&"ml-9",d===i&&o===c&&"text-accent-foreground"),onClick:()=>E(a,d),children:a.name},`${c}-${m}`)}),e[0]=o,e[1]=i,e[2]=s,e[3]=r,e[4]=l,e[5]=n}else l=e[4],n=e[5];let f;return e[8]!==l||e[9]!==n?(f=(0,g.jsx)("div",{className:l,children:n}),e[8]=l,e[9]=n,e[10]=f):f=e[10],f};export{_ as i,R as n,C as r,A as t};
var P1;import"./purify.es-DZrAQFIu.js";import{u as m1}from"./src-CvyFXpBy.js";import{c as et,g as st}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as k,r as Z}from"./src-CsZby044.js";import{$ as Yt,B as Ht,C as Xt,H as Mt,U as qt,_ as Qt,a as Zt,b as p1,s as Jt,u as te,v as ee,z as se}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as ie}from"./channel-CdzZX-OR.js";import{n as re,t as ue}from"./chunk-MI3HLSF2-n3vxgSbN.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import{o as ne}from"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import{r as oe,t as ae}from"./chunk-N4CR4FBY-BNoQB557.js";import{t as le}from"./chunk-FMBD7UC4-CHJv683r.js";import{t as ce}from"./chunk-55IACEB6-njZIr50E.js";import{t as he}from"./chunk-QN33PNHL-BOQncxfy.js";var de="flowchart-",pe=(P1=class{constructor(){this.vertexCounter=0,this.config=p1(),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=Ht,this.setAccDescription=se,this.setDiagramTitle=qt,this.getAccTitle=ee,this.getAccDescription=Qt,this.getDiagramTitle=Xt,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 Jt.sanitizeText(i,this.config)}lookUpDomId(i){for(let r of this.vertices.values())if(r.id===i)return r.domId;return i}addVertex(i,r,u,o,n,g,p={},c){var z,f;if(!i||i.trim().length===0)return;let a;if(c!==void 0){let d;d=c.includes(`
`)?c+`
`:`{
`+c+`
}`,a=re(d,{schema:ue})}let y=this.edges.find(d=>d.id===i);if(y){let d=a;(d==null?void 0:d.animate)!==void 0&&(y.animate=d.animate),(d==null?void 0:d.animation)!==void 0&&(y.animation=d.animation),(d==null?void 0:d.curve)!==void 0&&(y.interpolate=d.curve);return}let T,A=this.vertices.get(i);if(A===void 0&&(A={id:i,labelType:"text",domId:de+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,A)),this.vertexCounter++,r===void 0?A.text===void 0&&(A.text=i):(this.config=p1(),T=this.sanitizeText(r.text.trim()),A.labelType=r.type,T.startsWith('"')&&T.endsWith('"')&&(T=T.substring(1,T.length-1)),A.text=T),u!==void 0&&(A.type=u),o==null||o.forEach(d=>{A.styles.push(d)}),n==null||n.forEach(d=>{A.classes.push(d)}),g!==void 0&&(A.dir=g),A.props===void 0?A.props=p:p!==void 0&&Object.assign(A.props,p),a!==void 0){if(a.shape){if(a.shape!==a.shape.toLowerCase()||a.shape.includes("_"))throw Error(`No such shape: ${a.shape}. Shape names should be lowercase.`);if(!ne(a.shape))throw Error(`No such shape: ${a.shape}.`);A.type=a==null?void 0:a.shape}a!=null&&a.label&&(A.text=a==null?void 0:a.label),a!=null&&a.icon&&(A.icon=a==null?void 0:a.icon,!((z=a.label)!=null&&z.trim())&&A.text===i&&(A.text="")),a!=null&&a.form&&(A.form=a==null?void 0:a.form),a!=null&&a.pos&&(A.pos=a==null?void 0:a.pos),a!=null&&a.img&&(A.img=a==null?void 0:a.img,!((f=a.label)!=null&&f.trim())&&A.text===i&&(A.text="")),a!=null&&a.constraint&&(A.constraint=a.constraint),a.w&&(A.assetWidth=Number(a.w)),a.h&&(A.assetHeight=Number(a.h))}}addSingleLink(i,r,u,o){let n={start:i,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};Z.info("abc78 Got edge...",n);let g=u.text;if(g!==void 0&&(n.text=this.sanitizeText(g.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=g.type),u!==void 0&&(n.type=u.type,n.stroke=u.stroke,n.length=u.length>10?10:u.length),o&&!this.edges.some(p=>p.id===o))n.id=o,n.isUserDefinedId=!0;else{let p=this.edges.filter(c=>c.start===n.start&&c.end===n.end);p.length===0?n.id=et(n.start,n.end,{counter:0,prefix:"L"}):n.id=et(n.start,n.end,{counter:p.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))Z.info("Pushing edge..."),this.edges.push(n);else throw 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 typeof i=="object"&&!!i&&"id"in i&&typeof i.id=="string"}addLink(i,r,u){let o=this.isLinkData(u)?u.id.replace("@",""):void 0;Z.info("addLink",i,r,o);for(let n of i)for(let g of r){let p=n===i[i.length-1],c=g===r[0];p&&c?this.addSingleLink(n,g,u,o):this.addSingleLink(n,g,u,void 0)}}updateLinkInterpolate(i,r){i.forEach(u=>{u==="default"?this.edges.defaultInterpolate=r:this.edges[u].interpolate=r})}updateLink(i,r){i.forEach(u=>{var o,n,g,p,c,a;if(typeof u=="number"&&u>=this.edges.length)throw Error(`The index ${u} 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.)`);u==="default"?this.edges.defaultStyle=r:(this.edges[u].style=r,(((n=(o=this.edges[u])==null?void 0:o.style)==null?void 0:n.length)??0)>0&&!((p=(g=this.edges[u])==null?void 0:g.style)!=null&&p.some(y=>y==null?void 0:y.startsWith("fill")))&&((a=(c=this.edges[u])==null?void 0:c.style)==null||a.push("fill:none")))})}addClass(i,r){let u=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(o=>{let n=this.classes.get(o);n===void 0&&(n={id:o,styles:[],textStyles:[]},this.classes.set(o,n)),u==null||u.forEach(g=>{if(/color/.exec(g)){let p=g.replace("fill","bgFill");n.textStyles.push(p)}n.styles.push(g)})})}setDirection(i){this.direction=i.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,r){for(let u of i.split(",")){let o=this.vertices.get(u);o&&o.classes.push(r);let n=this.edges.find(p=>p.id===u);n&&n.classes.push(r);let g=this.subGraphLookup.get(u);g&&g.classes.push(r)}}setTooltip(i,r){if(r!==void 0){r=this.sanitizeText(r);for(let u of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(u):u,r)}}setClickFun(i,r,u){let o=this.lookUpDomId(i);if(p1().securityLevel!=="loose"||r===void 0)return;let n=[];if(typeof u=="string"){n=u.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let p=0;p<n.length;p++){let c=n[p].trim();c.startsWith('"')&&c.endsWith('"')&&(c=c.substr(1,c.length-2)),n[p]=c}}n.length===0&&n.push(i);let g=this.vertices.get(i);g&&(g.haveCallback=!0,this.funs.push(()=>{let p=document.querySelector(`[id="${o}"]`);p!==null&&p.addEventListener("click",()=>{st.runFunc(r,...n)},!1)}))}setLink(i,r,u){i.split(",").forEach(o=>{let n=this.vertices.get(o);n!==void 0&&(n.link=st.formatUrl(r,this.config),n.linkTarget=u)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,r,u){i.split(",").forEach(o=>{this.setClickFun(o,r,u)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(r=>{r(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 r=m1(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=m1("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),m1(i).select("svg").selectAll("g.node").on("mouseover",u=>{var g;let o=m1(u.currentTarget);if(o.attr("title")===null)return;let n=(g=u.currentTarget)==null?void 0:g.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),r.html(r.html().replace(/&lt;br\/&gt;/g,"<br/>")),o.classed("hover",!0)}).on("mouseout",u=>{r.transition().duration(500).style("opacity",0),m1(u.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=p1(),Zt()}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,r,u){let o=i.text.trim(),n=u.text;i===u&&/\s/.exec(u.text)&&(o=void 0);let g=k(T=>{let A={boolean:{},number:{},string:{}},z=[],f;return{nodeList:T.filter(function(d){let K=typeof d;return d.stmt&&d.stmt==="dir"?(f=d.value,!1):d.trim()===""?!1:K in A?A[K].hasOwnProperty(d)?!1:A[K][d]=!0:z.includes(d)?!1:z.push(d)}),dir:f}},"uniq")(r.flat()),p=g.nodeList,c=g.dir,a=p1().flowchart??{};if(c??(c=a.inheritDir?this.getDirection()??p1().direction??void 0:void 0),this.version==="gen-1")for(let T=0;T<p.length;T++)p[T]=this.lookUpDomId(p[T]);o??(o="subGraph"+this.subCount),n||(n=""),n=this.sanitizeText(n),this.subCount+=1;let y={id:o,nodes:p,title:n.trim(),classes:[],dir:c,labelType:u.type};return Z.info("Adding",y.id,y.nodes,y.dir),y.nodes=this.makeUniq(y,this.subGraphs).nodes,this.subGraphs.push(y),this.subGraphLookup.set(o,y),o}getPosForId(i){for(let[r,u]of this.subGraphs.entries())if(u.id===i)return r;return-1}indexNodes2(i,r){let u=this.subGraphs[r].nodes;if(this.secCount+=1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===i)return{result:!0,count:0};let o=0,n=1;for(;o<u.length;){let g=this.getPosForId(u[o]);if(g>=0){let p=this.indexNodes2(i,g);if(p.result)return{result:!0,count:n+p.count};n+=p.count}o+=1}return{result:!1,count:n}}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 r=i.trim(),u="arrow_open";switch(r[0]){case"<":u="arrow_point",r=r.slice(1);break;case"x":u="arrow_cross",r=r.slice(1);break;case"o":u="arrow_circle",r=r.slice(1);break}let o="normal";return r.includes("=")&&(o="thick"),r.includes(".")&&(o="dotted"),{type:u,stroke:o}}countChar(i,r){let u=r.length,o=0;for(let n=0;n<u;++n)r[n]===i&&++o;return o}destructEndLink(i){let r=i.trim(),u=r.slice(0,-1),o="arrow_open";switch(r.slice(-1)){case"x":o="arrow_cross",r.startsWith("x")&&(o="double_"+o,u=u.slice(1));break;case">":o="arrow_point",r.startsWith("<")&&(o="double_"+o,u=u.slice(1));break;case"o":o="arrow_circle",r.startsWith("o")&&(o="double_"+o,u=u.slice(1));break}let n="normal",g=u.length-1;u.startsWith("=")&&(n="thick"),u.startsWith("~")&&(n="invisible");let p=this.countChar(".",u);return p&&(n="dotted",g=p),{type:o,stroke:n,length:g}}destructLink(i,r){let u=this.destructEndLink(i),o;if(r){if(o=this.destructStartLink(r),o.stroke!==u.stroke)return{type:"INVALID",stroke:"INVALID"};if(o.type==="arrow_open")o.type=u.type;else{if(o.type!==u.type)return{type:"INVALID",stroke:"INVALID"};o.type="double_"+o.type}return o.type==="double_arrow"&&(o.type="double_arrow_point"),o.length=u.length,o}return u}exists(i,r){for(let u of i)if(u.nodes.includes(r))return!0;return!1}makeUniq(i,r){let u=[];return i.nodes.forEach((o,n)=>{this.exists(r,o)||u.push(i.nodes[n])}),{nodes:u}}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,r){return i.find(u=>u.id===r)}destructEdgeType(i){let r="none",u="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":u=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=i.replace("double_",""),u=r;break}return{arrowTypeStart:r,arrowTypeEnd:u}}addNodeFromVertex(i,r,u,o,n,g){var y;let p=u.get(i.id),c=o.get(i.id)??!1,a=this.findNode(r,i.id);if(a)a.cssStyles=i.styles,a.cssCompiledStyles=this.getCompiledStyles(i.classes),a.cssClasses=i.classes.join(" ");else{let T={id:i.id,label:i.text,labelStyle:"",parentId:p,padding:((y=n.flowchart)==null?void 0:y.padding)||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:g,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};c?r.push({...T,isGroup:!0,shape:"rect"}):r.push({...T,isGroup:!1,shape:this.getTypeFromVertex(i)})}}getCompiledStyles(i){let r=[];for(let u of i){let o=this.classes.get(u);o!=null&&o.styles&&(r=[...r,...o.styles??[]].map(n=>n.trim())),o!=null&&o.textStyles&&(r=[...r,...o.textStyles??[]].map(n=>n.trim()))}return r}getData(){let i=p1(),r=[],u=[],o=this.getSubGraphs(),n=new Map,g=new Map;for(let c=o.length-1;c>=0;c--){let a=o[c];a.nodes.length>0&&g.set(a.id,!0);for(let y of a.nodes)n.set(y,a.id)}for(let c=o.length-1;c>=0;c--){let a=o[c];r.push({id:a.id,label:a.title,labelStyle:"",parentId:n.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(" "),shape:"rect",dir:a.dir,isGroup:!0,look:i.look})}this.getVertices().forEach(c=>{this.addNodeFromVertex(c,r,n,g,i,i.look||"classic")});let p=this.getEdges();return p.forEach((c,a)=>{var f;let{arrowTypeStart:y,arrowTypeEnd:T}=this.destructEdgeType(c.type),A=[...p.defaultStyle??[]];c.style&&A.push(...c.style);let z={id:et(c.start,c.end,{counter:a,prefix:"L"},c.id),isUserDefinedId:c.isUserDefinedId,start:c.start,end:c.end,type:c.type??"normal",label:c.text,labelpos:"c",thickness:c.stroke,minlen:c.length,classes:(c==null?void 0:c.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(c==null?void 0:c.stroke)==="invisible"||(c==null?void 0:c.type)==="arrow_open"?"none":y,arrowTypeEnd:(c==null?void 0:c.stroke)==="invisible"||(c==null?void 0:c.type)==="arrow_open"?"none":T,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(c.classes),labelStyle:A,style:A,pattern:c.stroke,look:i.look,animate:c.animate,animation:c.animation,curve:c.interpolate||this.edges.defaultInterpolate||((f=i.flowchart)==null?void 0:f.curve)};u.push(z)}),{nodes:r,edges:u,other:{},config:i}}defaultConfig(){return te.flowchart}},k(P1,"FlowDB"),P1),ge={getClasses:k(function(s,i){return i.db.getClasses()},"getClasses"),draw:k(async function(s,i,r,u){var z;Z.info("REF0:"),Z.info("Drawing state diagram (v2)",i);let{securityLevel:o,flowchart:n,layout:g}=p1(),p;o==="sandbox"&&(p=m1("#i"+i));let c=o==="sandbox"?p.nodes()[0].contentDocument:document;Z.debug("Before getData: ");let a=u.db.getData();Z.debug("Data: ",a);let y=ce(i,o),T=u.db.getDirection();a.type=u.type,a.layoutAlgorithm=ae(g),a.layoutAlgorithm==="dagre"&&g==="elk"&&Z.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."),a.direction=T,a.nodeSpacing=(n==null?void 0:n.nodeSpacing)||50,a.rankSpacing=(n==null?void 0:n.rankSpacing)||50,a.markers=["point","circle","cross"],a.diagramId=i,Z.debug("REF1:",a),await oe(a,y);let A=((z=a.config.flowchart)==null?void 0:z.diagramPadding)??8;st.insertTitle(y,"flowchartTitleText",(n==null?void 0:n.titleTopMargin)||0,u.db.getDiagramTitle()),he(y,A,"flowchart",(n==null?void 0:n.useMaxWidth)||!1);for(let f of a.nodes){let d=m1(`#${i} [id="${f.id}"]`);if(!d||!f.link)continue;let K=c.createElementNS("http://www.w3.org/2000/svg","a");K.setAttributeNS("http://www.w3.org/2000/svg","class",f.cssClasses),K.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),o==="sandbox"?K.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):f.linkTarget&&K.setAttributeNS("http://www.w3.org/2000/svg","target",f.linkTarget);let g1=d.insert(function(){return K},":first-child"),A1=d.select(".label-container");A1&&g1.append(function(){return A1.node()});let b1=d.select(".label");b1&&g1.append(function(){return b1.node()})}},"draw")},it=(function(){var s=k(function(h,D,b,l){for(b||(b={}),l=h.length;l--;b[h[l]]=D);return b},"o"),i=[1,4],r=[1,3],u=[1,5],o=[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],n=[2,2],g=[1,13],p=[1,14],c=[1,15],a=[1,16],y=[1,23],T=[1,25],A=[1,26],z=[1,27],f=[1,49],d=[1,48],K=[1,29],g1=[1,30],A1=[1,31],b1=[1,32],O1=[1,33],$=[1,44],L=[1,46],w=[1,42],I=[1,47],N=[1,43],R=[1,50],P=[1,45],G=[1,51],O=[1,52],M1=[1,34],U1=[1,35],V1=[1,36],W1=[1,37],h1=[1,57],S=[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],J=[1,61],t1=[1,60],e1=[1,62],E1=[8,9,11,75,77,78],rt=[1,78],C1=[1,91],x1=[1,96],D1=[1,95],T1=[1,92],S1=[1,88],F1=[1,94],_1=[1,90],B1=[1,97],v1=[1,93],$1=[1,98],L1=[1,89],k1=[8,9,10,11,40,75,77,78],U=[8,9,10,11,40,46,75,77,78],j=[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],ut=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],w1=[44,60,89,102,105,106,109,111,114,115,116],nt=[1,121],ot=[1,122],z1=[1,124],K1=[1,123],at=[44,60,62,74,89,102,105,106,109,111,114,115,116],lt=[1,133],ct=[1,147],ht=[1,148],dt=[1,149],pt=[1,150],gt=[1,135],At=[1,137],bt=[1,141],kt=[1,142],ft=[1,143],yt=[1,144],mt=[1,145],Et=[1,146],Ct=[1,151],xt=[1,152],Dt=[1,131],Tt=[1,132],St=[1,139],Ft=[1,134],_t=[1,138],Bt=[1,136],X1=[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],vt=[1,154],$t=[1,156],_=[8,9,11],Y=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],m=[1,176],V=[1,172],W=[1,173],E=[1,177],C=[1,174],x=[1,175],I1=[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],Lt=[10,106],d1=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],s1=[1,247],i1=[1,245],r1=[1,249],u1=[1,243],n1=[1,244],o1=[1,246],a1=[1,248],l1=[1,250],N1=[1,268],wt=[8,9,11,106],Q=[8,9,10,11,60,84,105,106,109,110,111,112],q1={trace:k(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:k(function(h,D,b,l,B,t,G1){var e=t.length-1;switch(B){case 2:this.$=[];break;case 3:(!Array.isArray(t[e])||t[e].length>0)&&t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 183:this.$=t[e];break;case 11:l.setDirection("TB"),this.$="TB";break;case 12:l.setDirection(t[e-1]),this.$=t[e-1];break;case 27:this.$=t[e-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=l.addSubGraph(t[e-6],t[e-1],t[e-4]);break;case 34:this.$=l.addSubGraph(t[e-3],t[e-1],t[e-3]);break;case 35:this.$=l.addSubGraph(void 0,t[e-1],void 0);break;case 37:this.$=t[e].trim(),l.setAccTitle(this.$);break;case 38:case 39:this.$=t[e].trim(),l.setAccDescription(this.$);break;case 43:this.$=t[e-1]+t[e];break;case 44:this.$=t[e];break;case 45:l.addVertex(t[e-1][t[e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e]),l.addLink(t[e-3].stmt,t[e-1],t[e-2]),this.$={stmt:t[e-1],nodes:t[e-1].concat(t[e-3].nodes)};break;case 46:l.addLink(t[e-2].stmt,t[e],t[e-1]),this.$={stmt:t[e],nodes:t[e].concat(t[e-2].nodes)};break;case 47:l.addLink(t[e-3].stmt,t[e-1],t[e-2]),this.$={stmt:t[e-1],nodes:t[e-1].concat(t[e-3].nodes)};break;case 48:this.$={stmt:t[e-1],nodes:t[e-1]};break;case 49:l.addVertex(t[e-1][t[e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e]),this.$={stmt:t[e-1],nodes:t[e-1],shapeData:t[e]};break;case 50:this.$={stmt:t[e],nodes:t[e]};break;case 51:this.$=[t[e]];break;case 52:l.addVertex(t[e-5][t[e-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e-4]),this.$=t[e-5].concat(t[e]);break;case 53:this.$=t[e-4].concat(t[e]);break;case 54:this.$=t[e];break;case 55:this.$=t[e-2],l.setClass(t[e-2],t[e]);break;case 56:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"square");break;case 57:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"doublecircle");break;case 58:this.$=t[e-5],l.addVertex(t[e-5],t[e-2],"circle");break;case 59:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"ellipse");break;case 60:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"stadium");break;case 61:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"subroutine");break;case 62:this.$=t[e-7],l.addVertex(t[e-7],t[e-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[e-5],t[e-3]]]));break;case 63:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"cylinder");break;case 64:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"round");break;case 65:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"diamond");break;case 66:this.$=t[e-5],l.addVertex(t[e-5],t[e-2],"hexagon");break;case 67:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"odd");break;case 68:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"trapezoid");break;case 69:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"inv_trapezoid");break;case 70:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"lean_right");break;case 71:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"lean_left");break;case 72:this.$=t[e],l.addVertex(t[e]);break;case 73:t[e-1].text=t[e],this.$=t[e-1];break;case 74:case 75:t[e-2].text=t[e-1],this.$=t[e-2];break;case 76:this.$=t[e];break;case 77:var v=l.destructLink(t[e],t[e-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:t[e-1]};break;case 78:var v=l.destructLink(t[e],t[e-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:t[e-1],id:t[e-3]};break;case 79:this.$={text:t[e],type:"text"};break;case 80:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 81:this.$={text:t[e],type:"string"};break;case 82:this.$={text:t[e],type:"markdown"};break;case 83:var v=l.destructLink(t[e]);this.$={type:v.type,stroke:v.stroke,length:v.length};break;case 84:var v=l.destructLink(t[e]);this.$={type:v.type,stroke:v.stroke,length:v.length,id:t[e-1]};break;case 85:this.$=t[e-1];break;case 86:this.$={text:t[e],type:"text"};break;case 87:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 88:this.$={text:t[e],type:"string"};break;case 89:case 104:this.$={text:t[e],type:"markdown"};break;case 101:this.$={text:t[e],type:"text"};break;case 102:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 103:this.$={text:t[e],type:"text"};break;case 105:this.$=t[e-4],l.addClass(t[e-2],t[e]);break;case 106:this.$=t[e-4],l.setClass(t[e-2],t[e]);break;case 107:case 115:this.$=t[e-1],l.setClickEvent(t[e-1],t[e]);break;case 108:case 116:this.$=t[e-3],l.setClickEvent(t[e-3],t[e-2]),l.setTooltip(t[e-3],t[e]);break;case 109:this.$=t[e-2],l.setClickEvent(t[e-2],t[e-1],t[e]);break;case 110:this.$=t[e-4],l.setClickEvent(t[e-4],t[e-3],t[e-2]),l.setTooltip(t[e-4],t[e]);break;case 111:this.$=t[e-2],l.setLink(t[e-2],t[e]);break;case 112:this.$=t[e-4],l.setLink(t[e-4],t[e-2]),l.setTooltip(t[e-4],t[e]);break;case 113:this.$=t[e-4],l.setLink(t[e-4],t[e-2],t[e]);break;case 114:this.$=t[e-6],l.setLink(t[e-6],t[e-4],t[e]),l.setTooltip(t[e-6],t[e-2]);break;case 117:this.$=t[e-1],l.setLink(t[e-1],t[e]);break;case 118:this.$=t[e-3],l.setLink(t[e-3],t[e-2]),l.setTooltip(t[e-3],t[e]);break;case 119:this.$=t[e-3],l.setLink(t[e-3],t[e-2],t[e]);break;case 120:this.$=t[e-5],l.setLink(t[e-5],t[e-4],t[e]),l.setTooltip(t[e-5],t[e-2]);break;case 121:this.$=t[e-4],l.addVertex(t[e-2],void 0,void 0,t[e]);break;case 122:this.$=t[e-4],l.updateLink([t[e-2]],t[e]);break;case 123:this.$=t[e-4],l.updateLink(t[e-2],t[e]);break;case 124:this.$=t[e-8],l.updateLinkInterpolate([t[e-6]],t[e-2]),l.updateLink([t[e-6]],t[e]);break;case 125:this.$=t[e-8],l.updateLinkInterpolate(t[e-6],t[e-2]),l.updateLink(t[e-6],t[e]);break;case 126:this.$=t[e-6],l.updateLinkInterpolate([t[e-4]],t[e]);break;case 127:this.$=t[e-6],l.updateLinkInterpolate(t[e-4],t[e]);break;case 128:case 130:this.$=[t[e]];break;case 129:case 131:t[e-2].push(t[e]),this.$=t[e-2];break;case 133:this.$=t[e-1]+t[e];break;case 181:this.$=t[e];break;case 182:this.$=t[e-1]+""+t[e];break;case 184:this.$=t[e-1]+""+t[e];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:r,12:u},{1:[3]},s(o,n,{5:6}),{4:7,9:i,10:r,12:u},{4:8,9:i,10:r,12:u},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:g,9:p,10:c,11:a,20:17,22:18,23:19,24:20,25:21,26:22,27:y,33:24,34:T,36:A,38:z,42:28,43:38,44:f,45:39,47:40,60:d,84:K,85:g1,86:A1,87:b1,88:O1,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O,121:M1,122:U1,123:V1,124:W1},s(o,[2,9]),s(o,[2,10]),s(o,[2,11]),{8:[1,54],9:[1,55],10:h1,15:53,18:56},s(S,[2,3]),s(S,[2,4]),s(S,[2,5]),s(S,[2,6]),s(S,[2,7]),s(S,[2,8]),{8:J,9:t1,11:e1,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:J,9:t1,11:e1,21:67},{8:J,9:t1,11:e1,21:68},{8:J,9:t1,11:e1,21:69},{8:J,9:t1,11:e1,21:70},{8:J,9:t1,11:e1,21:71},{8:J,9:t1,10:[1,72],11:e1,21:73},s(S,[2,36]),{35:[1,74]},{37:[1,75]},s(S,[2,39]),s(E1,[2,50],{18:76,39:77,10:h1,40:rt}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:C1,44:x1,60:D1,80:[1,86],89:T1,95:[1,83],97:[1,84],101:85,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1,120:87},s(S,[2,185]),s(S,[2,186]),s(S,[2,187]),s(S,[2,188]),s(k1,[2,51]),s(k1,[2,54],{46:[1,99]}),s(U,[2,72],{113:112,29:[1,100],44:f,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:d,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:$,102:L,105:w,106:I,109:N,111:R,114:P,115:G,116:O}),s(j,[2,181]),s(j,[2,142]),s(j,[2,143]),s(j,[2,144]),s(j,[2,145]),s(j,[2,146]),s(j,[2,147]),s(j,[2,148]),s(j,[2,149]),s(j,[2,150]),s(j,[2,151]),s(j,[2,152]),s(o,[2,12]),s(o,[2,18]),s(o,[2,19]),{9:[1,113]},s(ut,[2,26],{18:114,10:h1}),s(S,[2,27]),{42:115,43:38,44:f,45:39,47:40,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},s(S,[2,40]),s(S,[2,41]),s(S,[2,42]),s(w1,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:nt,81:ot,116:z1,119:K1},{75:[1,125],77:[1,126]},s(at,[2,83]),s(S,[2,28]),s(S,[2,29]),s(S,[2,30]),s(S,[2,31]),s(S,[2,32]),{10:lt,12:ct,14:ht,27:dt,28:127,32:pt,44:gt,60:At,75:bt,80:[1,129],81:[1,130],83:140,84:kt,85:ft,86:yt,87:mt,88:Et,89:Ct,90:xt,91:128,105:Dt,109:Tt,111:St,114:Ft,115:_t,116:Bt},s(X1,n,{5:153}),s(S,[2,37]),s(S,[2,38]),s(E1,[2,48],{44:vt}),s(E1,[2,49],{18:155,10:h1,40:$t}),s(k1,[2,44]),{44:f,47:157,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},{102:[1,158],103:159,105:[1,160]},{44:f,47:161,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},{44:f,47:162,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},s(_,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},s(_,[2,115],{120:167,10:[1,166],14:C1,44:x1,60:D1,89:T1,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1}),s(_,[2,117],{10:[1,168]}),s(Y,[2,183]),s(Y,[2,170]),s(Y,[2,171]),s(Y,[2,172]),s(Y,[2,173]),s(Y,[2,174]),s(Y,[2,175]),s(Y,[2,176]),s(Y,[2,177]),s(Y,[2,178]),s(Y,[2,179]),s(Y,[2,180]),{44:f,47:169,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},{30:170,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:178,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:180,50:[1,179],67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:181,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:182,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:183,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{109:[1,184]},{30:185,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:186,65:[1,187],67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:188,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:189,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:190,67:m,80:V,81:W,82:171,116:E,117:C,118:x},s(j,[2,182]),s(o,[2,20]),s(ut,[2,25]),s(E1,[2,46],{39:191,18:192,10:h1,40:rt}),s(w1,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{77:[1,196],79:197,116:z1,119:K1},s(I1,[2,79]),s(I1,[2,81]),s(I1,[2,82]),s(I1,[2,168]),s(I1,[2,169]),{76:198,79:120,80:nt,81:ot,116:z1,119:K1},s(at,[2,84]),{8:J,9:t1,10:lt,11:e1,12:ct,14:ht,21:200,27:dt,29:[1,199],32:pt,44:gt,60:At,75:bt,83:140,84:kt,85:ft,86:yt,87:mt,88:Et,89:Ct,90:xt,91:201,105:Dt,109:Tt,111:St,114:Ft,115:_t,116:Bt},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:g,9:p,10:c,11:a,20:17,22:18,23:19,24:20,25:21,26:22,27:y,32:[1,202],33:24,34:T,36:A,38:z,42:28,43:38,44:f,45:39,47:40,60:d,84:K,85:g1,86:A1,87:b1,88:O1,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O,121:M1,122:U1,123:V1,124:W1},{10:h1,18:203},{44:[1,204]},s(k1,[2,43]),{10:[1,205],44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:112,114:P,115:G,116:O},{10:[1,206]},{10:[1,207],106:[1,208]},s(Lt,[2,128]),{10:[1,209],44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:112,114:P,115:G,116:O},{10:[1,210],44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:112,114:P,115:G,116:O},{80:[1,211]},s(_,[2,109],{10:[1,212]}),s(_,[2,111],{10:[1,213]}),{80:[1,214]},s(Y,[2,184]),{80:[1,215],98:[1,216]},s(k1,[2,55],{113:112,44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,114:P,115:G,116:O}),{31:[1,217],67:m,82:218,116:E,117:C,118:x},s(d1,[2,86]),s(d1,[2,88]),s(d1,[2,89]),s(d1,[2,153]),s(d1,[2,154]),s(d1,[2,155]),s(d1,[2,156]),{49:[1,219],67:m,82:218,116:E,117:C,118:x},{30:220,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{51:[1,221],67:m,82:218,116:E,117:C,118:x},{53:[1,222],67:m,82:218,116:E,117:C,118:x},{55:[1,223],67:m,82:218,116:E,117:C,118:x},{57:[1,224],67:m,82:218,116:E,117:C,118:x},{60:[1,225]},{64:[1,226],67:m,82:218,116:E,117:C,118:x},{66:[1,227],67:m,82:218,116:E,117:C,118:x},{30:228,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{31:[1,229],67:m,82:218,116:E,117:C,118:x},{67:m,69:[1,230],71:[1,231],82:218,116:E,117:C,118:x},{67:m,69:[1,233],71:[1,232],82:218,116:E,117:C,118:x},s(E1,[2,45],{18:155,10:h1,40:$t}),s(E1,[2,47],{44:vt}),s(w1,[2,75]),s(w1,[2,74]),{62:[1,234],67:m,82:218,116:E,117:C,118:x},s(w1,[2,77]),s(I1,[2,80]),{77:[1,235],79:197,116:z1,119:K1},{30:236,67:m,80:V,81:W,82:171,116:E,117:C,118:x},s(X1,n,{5:237}),s(F,[2,102]),s(S,[2,35]),{43:238,44:f,45:39,47:40,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},{10:h1,18:239},{10:s1,60:i1,84:r1,92:240,105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{10:s1,60:i1,84:r1,92:251,104:[1,252],105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{10:s1,60:i1,84:r1,92:253,104:[1,254],105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{105:[1,255]},{10:s1,60:i1,84:r1,92:256,105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{44:f,47:257,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},s(_,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},s(_,[2,116]),s(_,[2,118],{10:[1,261]}),s(_,[2,119]),s(U,[2,56]),s(d1,[2,87]),s(U,[2,57]),{51:[1,262],67:m,82:218,116:E,117:C,118:x},s(U,[2,64]),s(U,[2,59]),s(U,[2,60]),s(U,[2,61]),{109:[1,263]},s(U,[2,63]),s(U,[2,65]),{66:[1,264],67:m,82:218,116:E,117:C,118:x},s(U,[2,67]),s(U,[2,68]),s(U,[2,70]),s(U,[2,69]),s(U,[2,71]),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),s(w1,[2,78]),{31:[1,265],67:m,82:218,116:E,117:C,118:x},{6:11,7:12,8:g,9:p,10:c,11:a,20:17,22:18,23:19,24:20,25:21,26:22,27:y,32:[1,266],33:24,34:T,36:A,38:z,42:28,43:38,44:f,45:39,47:40,60:d,84:K,85:g1,86:A1,87:b1,88:O1,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O,121:M1,122:U1,123:V1,124:W1},s(k1,[2,53]),{43:267,44:f,45:39,47:40,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},s(_,[2,121],{106:N1}),s(wt,[2,130],{108:269,10:s1,60:i1,84:r1,105:u1,109:n1,110:o1,111:a1,112:l1}),s(Q,[2,132]),s(Q,[2,134]),s(Q,[2,135]),s(Q,[2,136]),s(Q,[2,137]),s(Q,[2,138]),s(Q,[2,139]),s(Q,[2,140]),s(Q,[2,141]),s(_,[2,122],{106:N1}),{10:[1,270]},s(_,[2,123],{106:N1}),{10:[1,271]},s(Lt,[2,129]),s(_,[2,105],{106:N1}),s(_,[2,106],{113:112,44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,114:P,115:G,116:O}),s(_,[2,110]),s(_,[2,112],{10:[1,272]}),s(_,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:J,9:t1,11:e1,21:277},s(S,[2,34]),s(k1,[2,52]),{10:s1,60:i1,84:r1,105:u1,107:278,108:242,109:n1,110:o1,111:a1,112:l1},s(Q,[2,133]),{14:C1,44:x1,60:D1,89:T1,101:279,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1,120:87},{14:C1,44:x1,60:D1,89:T1,101:280,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1,120:87},{98:[1,281]},s(_,[2,120]),s(U,[2,58]),{30:282,67:m,80:V,81:W,82:171,116:E,117:C,118:x},s(U,[2,66]),s(X1,n,{5:283}),s(wt,[2,131],{108:269,10:s1,60:i1,84:r1,105:u1,109:n1,110:o1,111:a1,112:l1}),s(_,[2,126],{120:167,10:[1,284],14:C1,44:x1,60:D1,89:T1,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1}),s(_,[2,127],{120:167,10:[1,285],14:C1,44:x1,60:D1,89:T1,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1}),s(_,[2,114]),{31:[1,286],67:m,82:218,116:E,117:C,118:x},{6:11,7:12,8:g,9:p,10:c,11:a,20:17,22:18,23:19,24:20,25:21,26:22,27:y,32:[1,287],33:24,34:T,36:A,38:z,42:28,43:38,44:f,45:39,47:40,60:d,84:K,85:g1,86:A1,87:b1,88:O1,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O,121:M1,122:U1,123:V1,124:W1},{10:s1,60:i1,84:r1,92:288,105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{10:s1,60:i1,84:r1,92:289,105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},s(U,[2,62]),s(S,[2,33]),s(_,[2,124],{106:N1}),s(_,[2,125],{106:N1})],defaultActions:{},parseError:k(function(h,D){if(D.recoverable)this.trace(h);else{var b=Error(h);throw b.hash=D,b}},"parseError"),parse:k(function(h){var D=this,b=[0],l=[],B=[null],t=[],G1=this.table,e="",v=0,It=0,Nt=0,Wt=2,Rt=1,zt=t.slice.call(arguments,1),M=Object.create(this.lexer),f1={yy:{}};for(var Q1 in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q1)&&(f1.yy[Q1]=this.yy[Q1]);M.setInput(h,f1.yy),f1.yy.lexer=M,f1.yy.parser=this,M.yylloc===void 0&&(M.yylloc={});var Z1=M.yylloc;t.push(Z1);var Kt=M.options&&M.options.ranges;typeof f1.yy.parseError=="function"?this.parseError=f1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(q){b.length-=2*q,B.length-=q,t.length-=q}k(jt,"popStack");function Pt(){var q=l.pop()||M.lex()||Rt;return typeof q!="number"&&(q instanceof Array&&(l=q,q=l.pop()),q=D.symbols_[q]||q),q}k(Pt,"lex");for(var H,J1,y1,X,tt,R1={},Y1,c1,Gt,H1;;){if(y1=b[b.length-1],this.defaultActions[y1]?X=this.defaultActions[y1]:(H??(H=Pt()),X=G1[y1]&&G1[y1][H]),X===void 0||!X.length||!X[0]){var Ot="";for(Y1 in H1=[],G1[y1])this.terminals_[Y1]&&Y1>Wt&&H1.push("'"+this.terminals_[Y1]+"'");Ot=M.showPosition?"Parse error on line "+(v+1)+`:
`+M.showPosition()+`
Expecting `+H1.join(", ")+", got '"+(this.terminals_[H]||H)+"'":"Parse error on line "+(v+1)+": Unexpected "+(H==Rt?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(Ot,{text:M.match,token:this.terminals_[H]||H,line:M.yylineno,loc:Z1,expected:H1})}if(X[0]instanceof Array&&X.length>1)throw Error("Parse Error: multiple actions possible at state: "+y1+", token: "+H);switch(X[0]){case 1:b.push(H),B.push(M.yytext),t.push(M.yylloc),b.push(X[1]),H=null,J1?(H=J1,J1=null):(It=M.yyleng,e=M.yytext,v=M.yylineno,Z1=M.yylloc,Nt>0&&Nt--);break;case 2:if(c1=this.productions_[X[1]][1],R1.$=B[B.length-c1],R1._$={first_line:t[t.length-(c1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(c1||1)].first_column,last_column:t[t.length-1].last_column},Kt&&(R1._$.range=[t[t.length-(c1||1)].range[0],t[t.length-1].range[1]]),tt=this.performAction.apply(R1,[e,It,v,f1.yy,X[1],B,t].concat(zt)),tt!==void 0)return tt;c1&&(b=b.slice(0,-1*c1*2),B=B.slice(0,-1*c1),t=t.slice(0,-1*c1)),b.push(this.productions_[X[1]][0]),B.push(R1.$),t.push(R1._$),Gt=G1[b[b.length-2]][b[b.length-1]],b.push(Gt);break;case 3:return!0}}return!0},"parse")};q1.lexer=(function(){return{EOF:1,parseError:k(function(h,D){if(this.yy.parser)this.yy.parser.parseError(h,D);else throw Error(h)},"parseError"),setInput:k(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:k(function(){var h=this._input[0];return this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h,h.match(/(?:\r\n?|\n).*/g)?(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:k(function(h){var D=h.length,b=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 l=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),b.length-1&&(this.yylineno-=b.length-1);var B=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:b?(b.length===l.length?this.yylloc.first_column:0)+l[l.length-b.length].length-b[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},"unput"),more:k(function(){return this._more=!0,this},"more"),reject:k(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:k(function(h){this.unput(this.match.slice(h))},"less"),pastInput:k(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:k(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:k(function(){var h=this.pastInput(),D=Array(h.length+1).join("-");return h+this.upcomingInput()+`
`+D+"^"},"showPosition"),test_match:k(function(h,D){var b,l,B;if(this.options.backtrack_lexer&&(B={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&&(B.yylloc.range=this.yylloc.range.slice(0))),l=h[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.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],b=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var t in B)this[t]=B[t];return!1}return!1},"test_match"),next:k(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,D,b,l;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),t=0;t<B.length;t++)if(b=this._input.match(this.rules[B[t]]),b&&(!D||b[0].length>D[0].length)){if(D=b,l=t,this.options.backtrack_lexer){if(h=this.test_match(b,B[t]),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,B[l]),h===!1?!1:h):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:k(function(){return this.next()||this.lex()},"lex"),begin:k(function(h){this.conditionStack.push(h)},"begin"),popState:k(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:k(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:k(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:k(function(h){this.begin(h)},"pushState"),stateStackSize:k(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:k(function(h,D,b,l){switch(b){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"),D.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return D.yytext=D.yytext.replace(/\n\s*/g,"<br/>"),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 h.lex.firstGraph()&&this.begin("dir"),12;case 36:return h.lex.firstGraph()&&this.begin("dir"),12;case 37:return h.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}}}})();function j1(){this.yy={}}return k(j1,"Parser"),j1.prototype=q1,q1.Parser=j1,new j1})();it.parser=it;var Ut=it,Vt=Object.assign({},Ut);Vt.parse=s=>{let i=s.replace(/}\s*\n/g,`}
`);return Ut.parse(i)};var Ae=Vt,be=k((s,i)=>{let r=ie;return Yt(r(s,"r"),r(s,"g"),r(s,"b"),i)},"fade"),ke={parser:Ae,get db(){return new pe},renderer:ge,styles:k(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: ${be(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;
}
${le()}
`,"getStyles"),init:k(s=>{s.flowchart||(s.flowchart={}),s.layout&&Mt({layout:s.layout}),s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,Mt({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{ke as diagram};
import{p as s,u as C}from"./useEvent-BhXAndur.js";import{y as a}from"./cells-DPp5cDaO.js";import{t as m}from"./createReducer-B3rBsy4P.js";function p(){return{focusedCellId:null,lastFocusedCellId:null}}var{reducer:V,createActions:b,valueAtom:d,useActions:g}=m(p,{focusCell:(l,e)=>({...l,focusedCellId:e.cellId,lastFocusedCellId:e.cellId}),toggleCell:(l,e)=>l.focusedCellId===e.cellId?{...l,focusedCellId:null}:{...l,focusedCellId:e.cellId,lastFocusedCellId:e.cellId},blurCell:l=>({...l,focusedCellId:null})});const c=s(l=>l(d).lastFocusedCellId);function F(){return C(c)}const _=s(l=>{let e=l(c);return!e||e==="__scratch__"?null:r(e,l(a))});function h(l){return s(e=>r(l,e(a)))}function r(l,e){var o;let{cellData:i,cellHandles:f,cellRuntime:I}=e,u=i[l],t=I[l],n=(o=f[l])==null?void 0:o.current;return!u||!n?null:{cellId:l,name:u.name,config:u.config,status:t?t.status:"idle",getEditorView:()=>n.editorView,hasOutput:(t==null?void 0:t.output)!=null,hasConsoleOutput:(t==null?void 0:t.consoleOutputs)!=null}}export{g as a,c as i,h as n,F as o,_ as r,d as t};
import{s as Me}from"./chunk-LvLJmgfZ.js";import{t as yr}from"./react-Bj1aDYRI.js";import{G as ze,St as wr,qn as Nr}from"./cells-DPp5cDaO.js";import{_ as Te,c as Cr,d as ke,f as Se,g as kr,h as _e,l as Sr,m as _r,o as Rr,p as le,s as Or,t as Re,u as Je,y as Oe}from"./zod-H_cgTO0M.js";import{t as he}from"./compiler-runtime-B3qBwwSJ.js";import{a as Ar,d as Vr,f as Er}from"./hotkeys-BHHWjLlp.js";import{r as Ae}from"./useEventListener-Cb-RVVEn.js";import{t as Pr}from"./jsx-runtime-ZmTK25f3.js";import{r as Lr,t as Be}from"./button-CZ3Cs4qb.js";import{t as q}from"./cn-BKtXLv3a.js";import{t as $r}from"./check-Dr3SxUsb.js";import{r as qr}from"./x-ZP5cObgf.js";import{M as Ir,N as Ke,P as Fr,j as Dr}from"./dropdown-menu-ldcmQvIV.js";import{t as Gr}from"./plus-B7DF33lD.js";import{t as Mr}from"./refresh-ccw-DN_xCV6A.js";import{n as zr,t as Ve}from"./input-DUrq2DiR.js";import{a as V,c as R,d as E,h as Tr,l as P,m as Jr,o as A,r as Ue,u as S,y as Br}from"./textarea-CRI7xDBj.js";import{t as Kr}from"./trash-2-DDsWrxuJ.js";import{t as Ur}from"./badge-DX6CQ6PA.js";import{E as Ze,S as Ee,_ as xe,w as Pe,x as Zr}from"./Combination-BAEdC-rz.js";import{c as Hr,i as He,l as Wr,m as Xr,n as Yr,r as Qr,s as ea,t as ra}from"./select-BVdzZKAh.js";import{l as aa}from"./dist-DwV58Fb1.js";import{t as ta}from"./tooltip-CMQz28hC.js";import{u as sa}from"./menu-items-BMjcEb2j.js";import{i as na,r as la,t as oa}from"./popover-CH1FzjxU.js";import{a as ia,o as ca,r as da,s as ua,t as ma}from"./command-2ElA5IkO.js";import{t as pa}from"./label-E64zk6_7.js";import{t as fa}from"./toggle-zVW4FXNz.js";var We=he(),w=Me(yr(),1),a=Me(Pr(),1);const Xe=(0,w.createContext)({isSelected:()=>!1,onSelect:Er.NOOP}),Le=t=>{let e=(0,We.c)(94),r,n,l,o,i,d,p,s,c,u,f,h,m,j,x,g,v,y,N,C,O;e[0]===t?(r=e[1],n=e[2],l=e[3],o=e[4],i=e[5],d=e[6],p=e[7],s=e[8],c=e[9],u=e[10],f=e[11],h=e[12],m=e[13],j=e[14],x=e[15],g=e[16],v=e[17],y=e[18],N=e[19],C=e[20],O=e[21]):({children:r,displayValue:d,className:l,placeholder:m,value:O,defaultValue:i,onValueChange:f,multiple:g,shouldFilter:v,filterFn:p,open:h,defaultOpen:o,onOpenChange:c,inputPlaceholder:y,search:x,onSearchChange:u,emptyState:N,chips:C,chipsClassName:n,keepPopoverOpenOnSelect:s,...j}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=i,e[6]=d,e[7]=p,e[8]=s,e[9]=c,e[10]=u,e[11]=f,e[12]=h,e[13]=m,e[14]=j,e[15]=x,e[16]=g,e[17]=v,e[18]=y,e[19]=N,e[20]=C,e[21]=O);let k=g===void 0?!1:g,I=v===void 0?!0:v,F=y===void 0?"Search...":y,ne=N===void 0?"Nothing found.":N,$=C===void 0?!1:C,ye=o??!1,oe;e[22]!==c||e[23]!==h||e[24]!==ye?(oe={prop:h,defaultProp:ye,onChange:c},e[22]=c,e[23]=h,e[24]=ye,e[25]=oe):oe=e[25];let[De,M]=Ee(oe),z=De===void 0?!1:De,T;e[26]===f?T=e[27]:(T=_=>{f==null||f(_)},e[26]=f,e[27]=T);let ie;e[28]!==i||e[29]!==T||e[30]!==O?(ie={prop:O,defaultProp:i,onChange:T},e[28]=i,e[29]=T,e[30]=O,e[31]=ie):ie=e[31];let[b,we]=Ee(ie),ce;e[32]===b?ce=e[33]:(ce=_=>Array.isArray(b)?b.includes(_):b===_,e[32]=b,e[33]=ce);let Ne=ce,de;e[34]!==s||e[35]!==k||e[36]!==M||e[37]!==we||e[38]!==b?(de=_=>{let D=_;if(k)if(Array.isArray(b))if(b.includes(D)){let Ge=b.filter(br=>br!==_);D=Ge.length>0?Ge:[]}else D=[...b,D];else D=[D];else b===_&&(D=null);we(D),(s??k)||M(!1)},e[34]=s,e[35]=k,e[36]=M,e[37]=we,e[38]=b,e[39]=de):de=e[39];let J=de,ue;e[40]!==$||e[41]!==d||e[42]!==k||e[43]!==m||e[44]!==b?(ue=()=>k&&$&&m?m:b==null?m??"--":Array.isArray(b)?b.length===0?m??"--":b.length===1&&d!==void 0?d(b[0]):`${b.length} selected`:d===void 0?m??"--":d(b),e[40]=$,e[41]=d,e[42]=k,e[43]=m,e[44]=b,e[45]=ue):ue=e[45];let Ce=ue,me;e[46]===Symbol.for("react.memo_cache_sentinel")?(me=q("relative"),e[46]=me):me=e[46];let B;e[47]===l?B=e[48]:(B=q("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50",l),e[47]=l,e[48]=B);let K;e[49]===Ce?K=e[50]:(K=Ce(),e[49]=Ce,e[50]=K);let U;e[51]===K?U=e[52]:(U=(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:K}),e[51]=K,e[52]=U);let pe;e[53]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,a.jsx)(qr,{className:"ml-3 w-4 h-4 opacity-50 shrink-0"}),e[53]=pe):pe=e[53];let Z;e[54]!==z||e[55]!==B||e[56]!==U?(Z=(0,a.jsx)(na,{asChild:!0,children:(0,a.jsxs)("div",{className:B,"aria-expanded":z,children:[U,pe]})}),e[54]=z,e[55]=B,e[56]=U,e[57]=Z):Z=e[57];let H;e[58]!==F||e[59]!==u||e[60]!==x?(H=(0,a.jsx)(ia,{placeholder:F,rootClassName:"px-1 h-8",autoFocus:!0,value:x,onValueChange:u}),e[58]=F,e[59]=u,e[60]=x,e[61]=H):H=e[61];let W;e[62]===ne?W=e[63]:(W=(0,a.jsx)(da,{children:ne}),e[62]=ne,e[63]=W);let X;e[64]!==J||e[65]!==Ne?(X={isSelected:Ne,onSelect:J},e[64]=J,e[65]=Ne,e[66]=X):X=e[66];let Y;e[67]!==r||e[68]!==X?(Y=(0,a.jsx)(Xe,{value:X,children:r}),e[67]=r,e[68]=X,e[69]=Y):Y=e[69];let Q;e[70]!==W||e[71]!==Y?(Q=(0,a.jsxs)(ua,{className:"max-h-60 py-.5",children:[W,Y]}),e[70]=W,e[71]=Y,e[72]=Q):Q=e[72];let ee;e[73]!==p||e[74]!==I||e[75]!==H||e[76]!==Q?(ee=(0,a.jsx)(la,{className:"w-full min-w-(--radix-popover-trigger-width) p-0",align:"start",children:(0,a.jsxs)(ma,{filter:p,shouldFilter:I,children:[H,Q]})}),e[73]=p,e[74]=I,e[75]=H,e[76]=Q,e[77]=ee):ee=e[77];let re;e[78]!==z||e[79]!==M||e[80]!==Z||e[81]!==ee?(re=(0,a.jsxs)(oa,{open:z,onOpenChange:M,children:[Z,ee]}),e[78]=z,e[79]=M,e[80]=Z,e[81]=ee,e[82]=re):re=e[82];let ae;e[83]!==$||e[84]!==n||e[85]!==d||e[86]!==J||e[87]!==k||e[88]!==b?(ae=k&&$&&(0,a.jsx)("div",{className:q("flex flex-col gap-1 items-start",n),children:Array.isArray(b)&&b.map(_=>_==null?null:(0,a.jsxs)(Ur,{variant:"secondary",children:[(d==null?void 0:d(_))??String(_),(0,a.jsx)(Nr,{onClick:()=>{J(_)},className:"w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"})]},String(_)))}),e[83]=$,e[84]=n,e[85]=d,e[86]=J,e[87]=k,e[88]=b,e[89]=ae):ae=e[89];let fe;return e[90]!==j||e[91]!==re||e[92]!==ae?(fe=(0,a.jsxs)("div",{className:me,...j,children:[re,ae]}),e[90]=j,e[91]=re,e[92]=ae,e[93]=fe):fe=e[93],fe},je=w.forwardRef((t,e)=>{let r=(0,We.c)(17),{children:n,className:l,value:o,onSelect:i,disabled:d}=t,p=typeof o=="object"&&"value"in o?o.value:String(o),s=w.use(Xe),c;r[0]===l?c=r[1]:(c=q("pl-6 m-1 py-1",l),r[0]=l,r[1]=c);let u;r[2]!==s||r[3]!==i||r[4]!==o?(u=()=>{s.onSelect(o),i==null||i(o)},r[2]=s,r[3]=i,r[4]=o,r[5]=u):u=r[5];let f;r[6]!==s||r[7]!==o?(f=s.isSelected(o)&&(0,a.jsx)($r,{className:"absolute left-1 h-4 w-4"}),r[6]=s,r[7]=o,r[8]=f):f=r[8];let h;return r[9]!==n||r[10]!==d||r[11]!==e||r[12]!==c||r[13]!==u||r[14]!==f||r[15]!==p?(h=(0,a.jsxs)(ca,{ref:e,className:c,role:"option",value:p,disabled:d,onSelect:u,children:[f,n]}),r[9]=n,r[10]=d,r[11]=e,r[12]=c,r[13]=u,r[14]=f,r[15]=p,r[16]=h):h=r[16],h});je.displayName="ComboboxItem";const G={of(t){return JSON.stringify(t)},parse(t){if(!t)return{};try{return JSON.parse(t)}catch{return{label:t}}}};function Ye(){return Math.floor(Math.random()*1e5)}var $e="Radio",[ha,Qe]=Ze($e),[xa,ja]=ha($e),er=w.forwardRef((t,e)=>{let{__scopeRadio:r,name:n,checked:l=!1,required:o,disabled:i,value:d="on",onCheck:p,form:s,...c}=t,[u,f]=w.useState(null),h=Ae(e,x=>f(x)),m=w.useRef(!1),j=u?s||!!u.closest("form"):!0;return(0,a.jsxs)(xa,{scope:r,checked:l,disabled:i,children:[(0,a.jsx)(xe.button,{type:"button",role:"radio","aria-checked":l,"data-state":sr(l),"data-disabled":i?"":void 0,disabled:i,value:d,...c,ref:h,onClick:Pe(t.onClick,x=>{l||(p==null||p()),j&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),j&&(0,a.jsx)(tr,{control:u,bubbles:!m.current,name:n,value:d,checked:l,required:o,disabled:i,form:s,style:{transform:"translateX(-100%)"}})]})});er.displayName=$e;var rr="RadioIndicator",ar=w.forwardRef((t,e)=>{let{__scopeRadio:r,forceMount:n,...l}=t,o=ja(rr,r);return(0,a.jsx)(Zr,{present:n||o.checked,children:(0,a.jsx)(xe.span,{"data-state":sr(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:e})})});ar.displayName=rr;var va="RadioBubbleInput",tr=w.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:n=!0,...l},o)=>{let i=w.useRef(null),d=Ae(i,o),p=Xr(r),s=aa(e);return w.useEffect(()=>{let c=i.current;if(!c)return;let u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(p!==r&&f){let h=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(h)}},[p,r,n]),(0,a.jsx)(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});tr.displayName=va;function sr(t){return t?"checked":"unchecked"}var ga=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ve="RadioGroup",[ba,pt]=Ze(ve,[Ke,Qe]),nr=Ke(),lr=Qe(),[ya,wa]=ba(ve),or=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,name:n,defaultValue:l,value:o,required:i=!1,disabled:d=!1,orientation:p,dir:s,loop:c=!0,onValueChange:u,...f}=t,h=nr(r),m=sa(s),[j,x]=Ee({prop:o,defaultProp:l??null,onChange:u,caller:ve});return(0,a.jsx)(ya,{scope:r,name:n,required:i,disabled:d,value:j,onValueChange:x,children:(0,a.jsx)(Ir,{asChild:!0,...h,orientation:p,dir:m,loop:c,children:(0,a.jsx)(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":d?"":void 0,dir:m,...f,ref:e})})})});or.displayName=ve;var ir="RadioGroupItem",cr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,disabled:n,...l}=t,o=wa(ir,r),i=o.disabled||n,d=nr(r),p=lr(r),s=w.useRef(null),c=Ae(e,s),u=o.value===l.value,f=w.useRef(!1);return w.useEffect(()=>{let h=j=>{ga.includes(j.key)&&(f.current=!0)},m=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),(0,a.jsx)(Dr,{asChild:!0,...d,focusable:!i,active:u,children:(0,a.jsx)(er,{disabled:i,required:o.required,checked:u,...p,...l,name:o.name,ref:c,onCheck:()=>o.onValueChange(l.value),onKeyDown:Pe(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Pe(l.onFocus,()=>{var h;f.current&&((h=s.current)==null||h.click())})})})});cr.displayName=ir;var Na="RadioGroupIndicator",dr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,...n}=t;return(0,a.jsx)(ar,{...lr(r),...n,ref:e})});dr.displayName=Na;var ur=or,mr=cr,Ca=dr,pr=he(),qe=w.forwardRef((t,e)=>{let r=(0,pr.c)(9),n,l;r[0]===t?(n=r[1],l=r[2]):({className:n,...l}=t,r[0]=t,r[1]=n,r[2]=l);let o;r[3]===n?o=r[4]:(o=q("grid gap-2",n),r[3]=n,r[4]=o);let i;return r[5]!==l||r[6]!==e||r[7]!==o?(i=(0,a.jsx)(ur,{className:o,...l,ref:e}),r[5]=l,r[6]=e,r[7]=o,r[8]=i):i=r[8],i});qe.displayName=ur.displayName;var Ie=w.forwardRef((t,e)=>{let r=(0,pr.c)(10),n,l;if(r[0]!==t){let{className:p,children:s,...c}=t;n=p,l=c,r[0]=t,r[1]=n,r[2]=l}else n=r[1],l=r[2];let o;r[3]===n?o=r[4]:(o=q("h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xs-solid rounded-full border border-input text-primary ring-offset-background focus:outline-hidden focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",n),r[3]=n,r[4]=o);let i;r[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(Ca,{className:"flex items-center justify-center",children:(0,a.jsx)(Fr,{className:"h-[10px] w-[10px] fill-primary text-current"})}),r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==e||r[8]!==o?(d=(0,a.jsx)(mr,{ref:e,className:o,...l,children:i}),r[6]=l,r[7]=e,r[8]=o,r[9]=d):d=r[9],d});Ie.displayName=mr.displayName;function ka(t){return t instanceof Re.ZodArray}function fr(t){return t instanceof Re.ZodPipe}function Sa(t){return t instanceof Re.ZodTuple}function hr(t){return"unwrap"in t?t.unwrap():t}function ge(t){let e=r=>{if(r instanceof le){let n=[...r.values];return r.values.size===1?n[0]:n}if(r instanceof Je){let n=r.def.defaultValue;return typeof n=="function"?n():n}if(fr(r))return e(r.in);if(Sa(r))return r.def.items.map(n=>e(n));if("unwrap"in r)return e(hr(r))};return t instanceof Oe||t instanceof ke?e(t.options[0]):ka(t)?_a(t)?[ge(t.element)]:[]:t instanceof Te?"":t instanceof Se?t.options[0]:t instanceof _e?Object.fromEntries(Object.entries(t.shape).map(([r,n])=>[r,e(n)])):e(t)}function te(t){if(t instanceof le)return t;if(t instanceof _e){let e=t.shape.type;if(e instanceof le)return e;throw Error("Invalid schema")}if(t instanceof Oe||t instanceof ke)return te(t.options[0]);throw Vr.warn(t),Error("Invalid schema")}function _a(t){return!t.safeParse([]).success}var xr=he(),jr=`
`;const vr=t=>{let e=(0,xr.c)(24),{value:r,options:n,onChange:l,className:o,placeholder:i,textAreaClassName:d,comboBoxClassName:p}=t,[s,c]=(0,w.useState)(!1),u;e[0]===r?u=e[1]:(u=be(r),e[0]=r,e[1]=u);let f=u,h;e[2]!==p||e[3]!==l||e[4]!==n||e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==f?(h=()=>s?(0,a.jsx)(Fe,{value:f,className:d,onChange:l,placeholder:i?`${i}: one per line`:"One value per line"}):(0,a.jsx)(Le,{placeholder:i,displayValue:Ra,className:q("w-full max-w-[400px]",p),multiple:!0,value:f,onValueChange:l,keepPopoverOpenOnSelect:!0,chips:!0,chipsClassName:"flex-row flex-wrap min-w-[210px]",children:n.map(Oa)}),e[2]=p,e[3]=l,e[4]=n,e[5]=i,e[6]=s,e[7]=d,e[8]=f,e[9]=h):h=e[9];let m=h,j;e[10]===o?j=e[11]:(j=q("flex gap-1",o),e[10]=o,e[11]=j);let x;e[12]===m?x=e[13]:(x=m(),e[12]=m,e[13]=x);let g=s?"Switch to multi-select":"Switch to textarea",v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(Br,{className:"w-3 h-3"}),e[14]=v):v=e[14];let y;e[15]===s?y=e[16]:(y=(0,a.jsx)(fa,{size:"xs",onPressedChange:c,pressed:s,children:v}),e[15]=s,e[16]=y);let N;e[17]!==g||e[18]!==y?(N=(0,a.jsx)(ta,{content:g,children:y}),e[17]=g,e[18]=y,e[19]=N):N=e[19];let C;return e[20]!==j||e[21]!==x||e[22]!==N?(C=(0,a.jsxs)("div",{className:j,children:[x,N]}),e[20]=j,e[21]=x,e[22]=N,e[23]=C):C=e[23],C},Fe=t=>{let e=(0,xr.c)(11),{className:r,value:n,onChange:l,placeholder:o}=t,i,d;if(e[0]!==n){let u=be(n);i=Ue,d=u.join(jr),e[0]=n,e[1]=i,e[2]=d}else i=e[1],d=e[2];let p;e[3]===l?p=e[4]:(p=u=>{if(u.target.value===""){l([]);return}l(u.target.value.split(jr))},e[3]=l,e[4]=p);let s=o?`${o}: one per line`:"One value per line",c;return e[5]!==i||e[6]!==r||e[7]!==d||e[8]!==p||e[9]!==s?(c=(0,a.jsx)(i,{value:d,className:r,rows:4,onChange:p,placeholder:s}),e[5]=i,e[6]=r,e[7]=d,e[8]=p,e[9]=s,e[10]=c):c=e[10],c};function be(t){return t==null?[]:Array.isArray(t)?t:[t].filter(e=>e!=null||e!=="")}function Ra(t){return t}function Oa(t){return(0,a.jsx)(je,{value:t,children:t},t)}var se=he();const Aa=t=>{let e=(0,se.c)(11),{schema:r,form:n,path:l,renderers:o,children:i}=t,d=l===void 0?"":l,p;e[0]===o?p=e[1]:(p=o===void 0?[]:o,e[0]=o,e[1]=p);let s=p,c;e[2]!==n||e[3]!==d||e[4]!==s||e[5]!==r?(c=L(r,n,d,s),e[2]=n,e[3]=d,e[4]=s,e[5]=r,e[6]=c):c=e[6];let u;return e[7]!==i||e[8]!==n||e[9]!==c?(u=(0,a.jsxs)(Jr,{...n,children:[i,c]}),e[7]=i,e[8]=n,e[9]=c,e[10]=u):u=e[10],u};function L(t,e,r,n){for(let s of n){let{isMatch:c,Component:u}=s;if(c(t))return(0,a.jsx)(u,{schema:t,form:e,path:r})}let{label:l,description:o,special:i,direction:d="column",minLength:p}=G.parse(t.description||"");if(t instanceof Je){let s=t.unwrap();return s=!s.description&&t.description?s.describe(t.description):s,L(s,e,r,n)}if(t instanceof kr){let s=t.unwrap();return s=!s.description&&t.description?s.describe(t.description):s,L(s,e,r,n)}if(t instanceof _e)return(0,a.jsxs)("div",{className:q("flex",d==="row"?"flex-row gap-6 items-start":d==="two-columns"?"grid grid-cols-2 gap-y-6":"flex-col gap-6"),children:[(0,a.jsx)(S,{children:l}),Ar.entries(t.shape).map(([s,c])=>{let u=c instanceof le,f=L(c,e,$a(r,s),n);return u?(0,a.jsx)(w.Fragment,{children:f},s):(0,a.jsx)("div",{className:"flex flex-row align-start",children:f},s)})]});if(t instanceof Te)return i==="time"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...s,onValueChange:s.onChange,type:"time",className:"my-0"})}),(0,a.jsx)(E,{})]})}):(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Cr)return(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsxs)("div",{className:"flex flex-row items-start space-x-2",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(wr,{"data-testid":"marimo-plugin-data-frames-boolean-checkbox",checked:s.value,onCheckedChange:s.onChange})})]}),(0,a.jsx)(E,{})]})});if(t instanceof _r)return i==="random_number_button"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-random-number-button",variant:"secondary",onClick:()=>{s.onChange(Ye())},children:[(0,a.jsx)(Mr,{className:"w-3.5 h-3.5 mr-1"}),l]})}):(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(zr,{...s,className:"my-0",onValueChange:s.onChange})}),(0,a.jsx)(E,{})]})});if(t instanceof Sr){let s=i==="datetime"?"datetime-local":i==="time"?"time":"date";return(0,a.jsx)(R,{control:e.control,name:r,render:({field:c})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...c,onValueChange:c.onChange,type:s,className:"my-0"})}),(0,a.jsx)(E,{})]})})}if(t instanceof Rr)return(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Se)return(0,a.jsx)(Pa,{schema:t,form:e,path:r,options:t.options.map(s=>s.toString())});if(t instanceof Or){if(i==="text_area_multiline")return(0,a.jsx)(Ea,{schema:t,form:e,path:r});let s=t.element;return s instanceof Se?(0,a.jsx)(La,{schema:t,form:e,path:r,itemLabel:l,options:s.options.map(c=>c.toString())}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(pa,{children:l}),(0,a.jsx)(Va,{schema:t.element,form:e,path:r,minLength:p,renderers:n},r)]})}if(t instanceof ke){let s=t.def,c=s.options,u=s.discriminator,f=h=>c.find(m=>te(m).value===h);return(0,a.jsx)(R,{control:e.control,name:r,render:({field:h})=>{let m=h.value,j=c.map(v=>te(v).value),x=m&&typeof m=="object"&&u in m?m[u]:j[0],g=f(x);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)("div",{className:"flex border-b mb-4 -mt-2",children:j.map(v=>(0,a.jsx)("button",{type:"button",className:`px-4 py-2 ${x===v?"border-b-2 border-primary font-medium":"text-muted-foreground"}`,onClick:()=>{let y=f(v);y?h.onChange(ge(y)):h.onChange({[u]:v})},children:v},v))}),(0,a.jsx)("div",{className:"flex flex-col",children:g&&L(g,e,r,n)},x)]})}})}return t instanceof Oe?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>{let c=t.options,u=s.value,f=c.map(m=>te(m).value);u||(u=f[0]);let h=c.find(m=>te(m).value===u);return(0,a.jsxs)("div",{className:"flex flex-col mb-4 gap-1",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(Wr,{"data-testid":"marimo-plugin-data-frames-union-select",...s,children:f.map(m=>(0,a.jsx)("option",{value:m,children:m},m))}),h&&L(h,e,r,n)]})}}):t instanceof le?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsx)("input",{...s,type:"hidden",value:String([...t.values][0]??"")})}):"unwrap"in t?L(hr(t),e,r,n):fr(t)?L(t.in,e,r,n):(0,a.jsxs)("div",{children:["Unknown schema type"," ",t==null?r:JSON.stringify(t.type??t)]})}var Va=t=>{let e=(0,se.c)(39),{schema:r,form:n,path:l,minLength:o,renderers:i}=t,d;e[0]===r.description?d=e[1]:(d=G.parse(r.description||""),e[0]=r.description,e[1]=d);let{label:p,description:s}=d,c=n.control,u;e[2]!==c||e[3]!==l?(u={control:c,name:l},e[2]=c,e[3]=l,e[4]=u):u=e[4];let{fields:f,append:h,remove:m}=Tr(u),j=o!=null&&f.length<o,x=o==null||f.length>o,g;e[5]===p?g=e[6]:(g=(0,a.jsx)(S,{children:p}),e[5]=p,e[6]=g);let v;e[7]===s?v=e[8]:(v=(0,a.jsx)(A,{children:s}),e[7]=s,e[8]=v);let y;if(e[9]!==x||e[10]!==f||e[11]!==n||e[12]!==l||e[13]!==m||e[14]!==i||e[15]!==r){let F;e[17]!==x||e[18]!==n||e[19]!==l||e[20]!==m||e[21]!==i||e[22]!==r?(F=(ne,$)=>(0,a.jsxs)("div",{className:"flex flex-row pl-2 ml-2 border-l-2 border-disabled hover-actions-parent relative pr-5 pt-1 items-center w-fit",onKeyDown:Lr.onEnter(qa),children:[L(r,n,`${l}[${$}]`,i),x&&(0,a.jsx)(Kr,{className:"w-4 h-4 ml-2 my-1 text-muted-foreground hover:text-destructive cursor-pointer absolute right-0 top-5",onClick:()=>{m($)}})]},ne.id),e[17]=x,e[18]=n,e[19]=l,e[20]=m,e[21]=i,e[22]=r,e[23]=F):F=e[23],y=f.map(F),e[9]=x,e[10]=f,e[11]=n,e[12]=l,e[13]=m,e[14]=i,e[15]=r,e[16]=y}else y=e[16];let N;e[24]!==j||e[25]!==o?(N=j&&(0,a.jsx)("div",{className:"text-destructive text-xs font-semibold",children:(0,a.jsxs)("div",{children:["At least ",o," required."]})}),e[24]=j,e[25]=o,e[26]=N):N=e[26];let C;e[27]!==h||e[28]!==r?(C=()=>{h(ge(r))},e[27]=h,e[28]=r,e[29]=C):C=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(Gr,{className:"w-3.5 h-3.5 mr-1"}),e[30]=O):O=e[30];let k;e[31]===C?k=e[32]:(k=(0,a.jsx)("div",{children:(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-add-array-item",variant:"text",className:"hover:text-accent-foreground",onClick:C,children:[O,"Add"]})}),e[31]=C,e[32]=k);let I;return e[33]!==g||e[34]!==v||e[35]!==y||e[36]!==N||e[37]!==k?(I=(0,a.jsxs)("div",{className:"flex flex-col gap-2 min-w-[220px]",children:[g,v,y,N,k]}),e[33]=g,e[34]=v,e[35]=y,e[36]=N,e[37]=k,e[38]=I):I=e[38],I},gr=t=>{let e=(0,se.c)(21),{schema:r,form:n,path:l}=t,o;e[0]===r.description?o=e[1]:(o=G.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p,disabled:s,inputType:c}=o;if(c==="textarea"){let h;e[2]!==d||e[3]!==s||e[4]!==i||e[5]!==p?(h=j=>{let{field:x}=j;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Ue,{...x,value:x.value,onChange:x.onChange,className:"my-0",placeholder:p,disabled:s})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=s,e[4]=i,e[5]=p,e[6]=h):h=e[6];let m;return e[7]!==n.control||e[8]!==l||e[9]!==h?(m=(0,a.jsx)(R,{control:n.control,name:l,render:h}),e[7]=n.control,e[8]=l,e[9]=h,e[10]=m):m=e[10],m}let u;e[11]!==d||e[12]!==s||e[13]!==c||e[14]!==i||e[15]!==p?(u=h=>{let{field:m}=h;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...m,type:c,value:m.value,onValueChange:m.onChange,className:"my-0",placeholder:p,disabled:s})}),(0,a.jsx)(E,{})]})},e[11]=d,e[12]=s,e[13]=c,e[14]=i,e[15]=p,e[16]=u):u=e[16];let f;return e[17]!==n.control||e[18]!==l||e[19]!==u?(f=(0,a.jsx)(R,{control:n.control,name:l,render:u}),e[17]=n.control,e[18]=l,e[19]=u,e[20]=f):f=e[20],f},Ea=t=>{let e=(0,se.c)(10),{schema:r,form:n,path:l}=t,o;e[0]===r.description?o=e[1]:(o=G.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p}=o,s;e[2]!==d||e[3]!==i||e[4]!==p?(s=u=>{let{field:f}=u;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Fe,{...f,placeholder:p})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=i,e[4]=p,e[5]=s):s=e[5];let c;return e[6]!==n.control||e[7]!==l||e[8]!==s?(c=(0,a.jsx)(R,{control:n.control,name:l,render:s}),e[6]=n.control,e[7]=l,e[8]=s,e[9]=c):c=e[9],c},Pa=t=>{let e=(0,se.c)(22),{schema:r,form:n,path:l,options:o,textTransform:i}=t,d;e[0]===r.description?d=e[1]:(d=G.parse(r.description),e[0]=r.description,e[1]=d);let{label:p,description:s,disabled:c,special:u}=d;if(u==="radio_group"){let m;e[2]!==s||e[3]!==p||e[4]!==o||e[5]!==l?(m=x=>{let{field:g}=x;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:p}),(0,a.jsx)(A,{children:s}),(0,a.jsx)(V,{children:(0,a.jsx)(qe,{className:"flex flex-row gap-2 pt-1 items-center",value:g.value,onValueChange:g.onChange,children:o.map(v=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(Ie,{value:v,id:`${l}-${v}`},v),(0,a.jsx)(S,{className:"whitespace-pre",htmlFor:`${l}-${v}`,children:ze.startCase(v)})]},v))})}),(0,a.jsx)(E,{})]})},e[2]=s,e[3]=p,e[4]=o,e[5]=l,e[6]=m):m=e[6];let j;return e[7]!==c||e[8]!==n.control||e[9]!==l||e[10]!==m?(j=(0,a.jsx)(R,{control:n.control,name:l,disabled:c,render:m}),e[7]=c,e[8]=n.control,e[9]=l,e[10]=m,e[11]=j):j=e[11],j}let f;e[12]!==s||e[13]!==p||e[14]!==o||e[15]!==i?(f=m=>{let{field:j}=m;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:p}),(0,a.jsx)(A,{children:s}),(0,a.jsx)(V,{children:(0,a.jsxs)(ra,{"data-testid":"marimo-plugin-data-frames-select",value:j.value,onValueChange:j.onChange,children:[(0,a.jsx)(ea,{className:"min-w-[180px]",children:(0,a.jsx)(Hr,{placeholder:"--"})}),(0,a.jsx)(Yr,{children:(0,a.jsxs)(Qr,{children:[o.map(x=>(0,a.jsx)(He,{value:x,children:(i==null?void 0:i(x))??x},x)),o.length===0&&(0,a.jsx)(He,{disabled:!0,value:"--",children:"No options"})]})})]})}),(0,a.jsx)(E,{})]})},e[12]=s,e[13]=p,e[14]=o,e[15]=i,e[16]=f):f=e[16];let h;return e[17]!==c||e[18]!==n.control||e[19]!==l||e[20]!==f?(h=(0,a.jsx)(R,{control:n.control,name:l,disabled:c,render:f}),e[17]=c,e[18]=n.control,e[19]=l,e[20]=f,e[21]=h):h=e[21],h},La=t=>{let e=(0,se.c)(15),{schema:r,form:n,path:l,options:o,itemLabel:i,showSwitchable:d}=t,p;e[0]===r.description?p=e[1]:(p=G.parse(r.description),e[0]=r.description,e[1]=p);let{label:s,description:c,placeholder:u}=p,f;e[2]!==i||e[3]!==u?(f=u??(i?`Select ${i==null?void 0:i.toLowerCase()}`:void 0),e[2]=i,e[3]=u,e[4]=f):f=e[4];let h=f,m;e[5]!==c||e[6]!==s||e[7]!==o||e[8]!==h||e[9]!==d?(m=x=>{let{field:g}=x,v=be(g.value);return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:s}),(0,a.jsx)(A,{children:c}),(0,a.jsx)(V,{children:d?(0,a.jsx)(vr,{...g,value:v,options:o,placeholder:h}):(0,a.jsx)(Le,{className:"min-w-[180px]",placeholder:h,displayValue:Ia,multiple:!0,chips:!0,keepPopoverOpenOnSelect:!0,value:v,onValueChange:g.onChange,children:o.map(Fa)})}),(0,a.jsx)(E,{})]})},e[5]=c,e[6]=s,e[7]=o,e[8]=h,e[9]=d,e[10]=m):m=e[10];let j;return e[11]!==n.control||e[12]!==l||e[13]!==m?(j=(0,a.jsx)(R,{control:n.control,name:l,render:m}),e[11]=n.control,e[12]=l,e[13]=m,e[14]=j):j=e[14],j};function $a(...t){return t.filter(e=>e!=="").join(".")}function qa(t){return t.preventDefault()}function Ia(t){return ze.startCase(t)}function Fa(t){return(0,a.jsx)(je,{value:t,children:t},t)}export{be as a,qe as c,Ye as d,Le as f,Fe as i,Ie as l,L as n,ge as o,je as p,vr as r,te as s,Aa as t,G as u};
import{o as a}from"./tooltip-DxKBXCGp.js";function o(r){function n(t){return!!(t!=null&&t.schema)&&Array.isArray(t.schema.fields)&&typeof t.toArray=="function"}return(n(r)?r:f(r)).toArray()}o.responseType="arrayBuffer";function f(r,n){return a(r,n??{useProxy:!0})}export{o as t};
import{t as o}from"./forth-gbBFxz8f.js";export{o as forth};
function r(t){var R=[];return t.split(" ").forEach(function(E){R.push({name:E})}),R}var T=r("INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL"),n=r("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");function O(t,R){var E;for(E=t.length-1;E>=0;E--)if(t[E].name===R.toUpperCase())return t[E]}const S={name:"forth",startState:function(){return{state:"",base:10,coreWordList:T,immediateWordList:n,wordList:[]}},token:function(t,R){var E;if(t.eatSpace())return null;if(R.state===""){if(t.match(/^(\]|:NONAME)(\s|$)/i))return R.state=" compilation","builtin";if(E=t.match(/^(\:)\s+(\S+)(\s|$)+/),E)return R.wordList.push({name:E[2].toUpperCase()}),R.state=" compilation","def";if(E=t.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i),E)return R.wordList.push({name:E[2].toUpperCase()}),"def";if(E=t.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/),E)return"builtin"}else{if(t.match(/^(\;|\[)(\s)/))return R.state="",t.backUp(1),"builtin";if(t.match(/^(\;|\[)($)/))return R.state="","builtin";if(t.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}if(E=t.match(/^(\S+)(\s+|$)/),E)return O(R.wordList,E[1])===void 0?E[1]==="\\"?(t.skipToEnd(),"comment"):O(R.coreWordList,E[1])===void 0?O(R.immediateWordList,E[1])===void 0?E[1]==="("?(t.eatWhile(function(i){return i!==")"}),t.eat(")"),"comment"):E[1]===".("?(t.eatWhile(function(i){return i!==")"}),t.eat(")"),"string"):E[1]==='S"'||E[1]==='."'||E[1]==='C"'?(t.eatWhile(function(i){return i!=='"'}),t.eat('"'),"string"):E[1]-68719476735?"number":"atom":"keyword":"builtin":"variable"}};export{S as t};
function r(e){for(var n={},t=0;t<e.length;++t)n[e[t]]=!0;return n}var s=r("abstract.accept.allocatable.allocate.array.assign.asynchronous.backspace.bind.block.byte.call.case.class.close.common.contains.continue.cycle.data.deallocate.decode.deferred.dimension.do.elemental.else.encode.end.endif.entry.enumerator.equivalence.exit.external.extrinsic.final.forall.format.function.generic.go.goto.if.implicit.import.include.inquire.intent.interface.intrinsic.module.namelist.non_intrinsic.non_overridable.none.nopass.nullify.open.optional.options.parameter.pass.pause.pointer.print.private.program.protected.public.pure.read.recursive.result.return.rewind.save.select.sequence.stop.subroutine.target.then.to.type.use.value.volatile.where.while.write".split(".")),l=r("abort.abs.access.achar.acos.adjustl.adjustr.aimag.aint.alarm.all.allocated.alog.amax.amin.amod.and.anint.any.asin.associated.atan.besj.besjn.besy.besyn.bit_size.btest.cabs.ccos.ceiling.cexp.char.chdir.chmod.clog.cmplx.command_argument_count.complex.conjg.cos.cosh.count.cpu_time.cshift.csin.csqrt.ctime.c_funloc.c_loc.c_associated.c_null_ptr.c_null_funptr.c_f_pointer.c_null_char.c_alert.c_backspace.c_form_feed.c_new_line.c_carriage_return.c_horizontal_tab.c_vertical_tab.dabs.dacos.dasin.datan.date_and_time.dbesj.dbesj.dbesjn.dbesy.dbesy.dbesyn.dble.dcos.dcosh.ddim.derf.derfc.dexp.digits.dim.dint.dlog.dlog.dmax.dmin.dmod.dnint.dot_product.dprod.dsign.dsinh.dsin.dsqrt.dtanh.dtan.dtime.eoshift.epsilon.erf.erfc.etime.exit.exp.exponent.extends_type_of.fdate.fget.fgetc.float.floor.flush.fnum.fputc.fput.fraction.fseek.fstat.ftell.gerror.getarg.get_command.get_command_argument.get_environment_variable.getcwd.getenv.getgid.getlog.getpid.getuid.gmtime.hostnm.huge.iabs.iachar.iand.iargc.ibclr.ibits.ibset.ichar.idate.idim.idint.idnint.ieor.ierrno.ifix.imag.imagpart.index.int.ior.irand.isatty.ishft.ishftc.isign.iso_c_binding.is_iostat_end.is_iostat_eor.itime.kill.kind.lbound.len.len_trim.lge.lgt.link.lle.llt.lnblnk.loc.log.logical.long.lshift.lstat.ltime.matmul.max.maxexponent.maxloc.maxval.mclock.merge.move_alloc.min.minexponent.minloc.minval.mod.modulo.mvbits.nearest.new_line.nint.not.or.pack.perror.precision.present.product.radix.rand.random_number.random_seed.range.real.realpart.rename.repeat.reshape.rrspacing.rshift.same_type_as.scale.scan.second.selected_int_kind.selected_real_kind.set_exponent.shape.short.sign.signal.sinh.sin.sleep.sngl.spacing.spread.sqrt.srand.stat.sum.symlnk.system.system_clock.tan.tanh.time.tiny.transfer.transpose.trim.ttynam.ubound.umask.unlink.unpack.verify.xor.zabs.zcos.zexp.zlog.zsin.zsqrt".split(".")),_=r("c_bool.c_char.c_double.c_double_complex.c_float.c_float_complex.c_funptr.c_int.c_int16_t.c_int32_t.c_int64_t.c_int8_t.c_int_fast16_t.c_int_fast32_t.c_int_fast64_t.c_int_fast8_t.c_int_least16_t.c_int_least32_t.c_int_least64_t.c_int_least8_t.c_intmax_t.c_intptr_t.c_long.c_long_double.c_long_double_complex.c_long_long.c_ptr.c_short.c_signed_char.c_size_t.character.complex.double.integer.logical.real".split(".")),o=/[+\-*&=<>\/\:]/,d=/^\.(and|or|eq|lt|le|gt|ge|ne|not|eqv|neqv)\./i;function m(e,n){if(e.match(d))return"operator";var t=e.next();if(t=="!")return e.skipToEnd(),"comment";if(t=='"'||t=="'")return n.tokenize=u(t),n.tokenize(e,n);if(/[\[\]\(\),]/.test(t))return null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(o.test(t))return e.eatWhile(o),"operator";e.eatWhile(/[\w\$_]/);var i=e.current().toLowerCase();return s.hasOwnProperty(i)?"keyword":l.hasOwnProperty(i)||_.hasOwnProperty(i)?"builtin":"variable"}function u(e){return function(n,t){for(var i=!1,a,c=!1;(a=n.next())!=null;){if(a==e&&!i){c=!0;break}i=!i&&a=="\\"}return(c||!i)&&(t.tokenize=null),"string"}}const p={name:"fortran",startState:function(){return{tokenize:null}},token:function(e,n){return e.eatSpace()?null:(n.tokenize||m)(e,n)}};export{p as t};
import{t as r}from"./fortran-CXijpPbh.js";export{r as fortran};
import{s as b}from"./chunk-LvLJmgfZ.js";import"./useEvent-BhXAndur.js";import{t as y}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import"./compiler-runtime-B3qBwwSJ.js";import{t as P}from"./ErrorBoundary-B9Ifj8Jf.js";import{t as $}from"./jsx-runtime-ZmTK25f3.js";import{r as z}from"./requests-B4FYHTZl.js";import{t as N}from"./spinner-DA8-7wQv.js";import{lt as L,r as M}from"./input-DUrq2DiR.js";import{n as c,t as R}from"./paths-BzSgteR-.js";import{c as v,t as I}from"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import{r as A}from"./errors-TZBmrJmc.js";import{t as f}from"./error-banner-B9ts0mNl.js";import{n as D}from"./useAsyncData-BMGLSTg8.js";import{n as W,t as _}from"./card-OlSjYhmd.js";var p=b(y(),1),e=b($(),1),B=a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase(),w=a=>{let o=R.guessDeliminator(a).deliminator;return a.replace(/\.[^./]+$/,"").split(o).filter(Boolean).map(d=>d.split(/[_-]/).map(B).join(" ")).join(" > ")},F=a=>`${I()}-${encodeURIComponent(a)}`,Y=a=>{try{return new URL(a).protocol==="https:"}catch{return!1}},q=10,E=()=>{let{getWorkspaceFiles:a}=z(),[o,d]=(0,p.useState)(""),n=D(()=>a({includeMarkdown:!1}),[]),t=n.data,m=(0,p.useMemo)(()=>{let r=(t==null?void 0:t.files)??[],i=(t==null?void 0:t.root)??"";return r.filter(s=>!s.isDirectory).map(s=>{var g,x,j;let l=i&&c.isAbsolute(s.path)&&s.path.startsWith(i)?c.rest(s.path,i):s.path,C=((g=s.opengraph)==null?void 0:g.title)??w(c.basename(l)),S=w(c.dirname(l)),U=((x=s.opengraph)==null?void 0:x.description)??"",h=(j=s.opengraph)==null?void 0:j.image,k=h&&Y(h)?h:v(`/og/thumbnail?file=${encodeURIComponent(l)}`).toString();return{...s,relativePath:l,title:C,subtitle:S,description:U,thumbnailUrl:k}}).sort((s,l)=>s.relativePath.localeCompare(l.relativePath))},[t==null?void 0:t.files,t==null?void 0:t.root]),u=(0,p.useMemo)(()=>{if(!o)return m;let r=o.toLowerCase();return m.filter(i=>i.title.toLowerCase().includes(r))},[m,o]);return n.isPending?(0,e.jsx)(N,{centered:!0,size:"xlarge",className:"mt-6"}):n.error?(0,e.jsx)(f,{kind:"danger",className:"rounded p-4",children:A(n.error)}):t?(0,e.jsx)(p.Suspense,{children:(0,e.jsxs)("div",{className:"flex flex-col gap-6 max-w-6xl container pt-5 pb-20 z-10",children:[(0,e.jsx)("img",{src:"logo.png",alt:"marimo logo",className:"w-48 mb-2"}),(0,e.jsx)(P,{children:(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[t.hasMore&&(0,e.jsxs)(f,{kind:"warn",className:"rounded p-4",children:["Showing first ",t.fileCount," files. Your workspace has more files."]}),m.length>q&&(0,e.jsx)(M,{id:"search",value:o,icon:(0,e.jsx)(L,{className:"h-4 w-4"}),onChange:r=>d(r.target.value),placeholder:"Search",rootClassName:"mb-3",className:"mb-0 border-border"}),u.length===0?(0,e.jsx)(f,{kind:"warn",className:"rounded p-4",children:"No marimo apps found."}):(0,e.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:u.map(r=>(0,e.jsx)("a",{href:v(`?file=${encodeURIComponent(r.relativePath)}`).toString(),target:F(r.path),className:"no-underline",children:(0,e.jsxs)(_,{className:"h-full overflow-hidden hover:bg-accent/20 transition-colors",children:[(0,e.jsx)("img",{src:r.thumbnailUrl,alt:r.title,loading:"lazy",className:"w-full aspect-1200/630 object-cover border-b border-border/60"}),(0,e.jsx)(W,{className:"p-6 pt-4",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[r.subtitle&&(0,e.jsx)("div",{className:"text-sm font-semibold text-muted-foreground",children:r.subtitle}),(0,e.jsx)("div",{className:"text-lg font-medium",children:r.title}),r.description&&(0,e.jsx)("div",{className:"text-sm text-muted-foreground line-clamp-3 mt-1",children:r.description})]})})]})},r.path))})]})})]})}):(0,e.jsx)(N,{centered:!0,size:"xlarge",className:"mt-6"})};export{E as default};
import{s as ct,t as vt}from"./chunk-LvLJmgfZ.js";import{t as me}from"./linear-BWciPXnd.js";import{n as ye,o as ke,s as pe}from"./time-DkuObi5n.js";import"./defaultLocale-JieDVWC_.js";import{C as Zt,N as Ut,T as qt,c as Xt,d as ge,f as be,g as ve,h as Te,m as xe,p as we,t as Qt,u as $e,v as Jt,x as Kt}from"./defaultLocale-BLne0bXb.js";import"./purify.es-DZrAQFIu.js";import{o as _e}from"./timer-B6DpdVnC.js";import{u as Dt}from"./src-CvyFXpBy.js";import{g as De}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{a as te,n as u,r as st}from"./src-CsZby044.js";import{B as Se,C as Me,U as Ce,_ as Ee,a as Ye,b as lt,c as Ae,s as Ie,v as Le,z as Fe}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as Oe}from"./dist-C1VXabOr.js";function We(t){return t}var Tt=1,St=2,Mt=3,xt=4,ee=1e-6;function Pe(t){return"translate("+t+",0)"}function ze(t){return"translate(0,"+t+")"}function He(t){return i=>+t(i)}function Ne(t,i){return i=Math.max(0,t.bandwidth()-i*2)/2,t.round()&&(i=Math.round(i)),r=>+t(r)+i}function Be(){return!this.__axis}function ie(t,i){var r=[],n=null,o=null,d=6,k=6,M=3,I=typeof window<"u"&&window.devicePixelRatio>1?0:.5,D=t===Tt||t===xt?-1:1,x=t===xt||t===St?"x":"y",F=t===Tt||t===Mt?Pe:ze;function w($){var z=n??(i.ticks?i.ticks.apply(i,r):i.domain()),Y=o??(i.tickFormat?i.tickFormat.apply(i,r):We),v=Math.max(d,0)+M,C=i.range(),L=+C[0]+I,O=+C[C.length-1]+I,H=(i.bandwidth?Ne:He)(i.copy(),I),N=$.selection?$.selection():$,A=N.selectAll(".domain").data([null]),p=N.selectAll(".tick").data(z,i).order(),m=p.exit(),h=p.enter().append("g").attr("class","tick"),g=p.select("line"),y=p.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(h),g=g.merge(h.append("line").attr("stroke","currentColor").attr(x+"2",D*d)),y=y.merge(h.append("text").attr("fill","currentColor").attr(x,D*v).attr("dy",t===Tt?"0em":t===Mt?"0.71em":"0.32em")),$!==N&&(A=A.transition($),p=p.transition($),g=g.transition($),y=y.transition($),m=m.transition($).attr("opacity",ee).attr("transform",function(s){return isFinite(s=H(s))?F(s+I):this.getAttribute("transform")}),h.attr("opacity",ee).attr("transform",function(s){var c=this.parentNode.__axis;return F((c&&isFinite(c=c(s))?c:H(s))+I)})),m.remove(),A.attr("d",t===xt||t===St?k?"M"+D*k+","+L+"H"+I+"V"+O+"H"+D*k:"M"+I+","+L+"V"+O:k?"M"+L+","+D*k+"V"+I+"H"+O+"V"+D*k:"M"+L+","+I+"H"+O),p.attr("opacity",1).attr("transform",function(s){return F(H(s)+I)}),g.attr(x+"2",D*d),y.attr(x,D*v).text(Y),N.filter(Be).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===St?"start":t===xt?"end":"middle"),N.each(function(){this.__axis=H})}return w.scale=function($){return arguments.length?(i=$,w):i},w.ticks=function(){return r=Array.from(arguments),w},w.tickArguments=function($){return arguments.length?(r=$==null?[]:Array.from($),w):r.slice()},w.tickValues=function($){return arguments.length?(n=$==null?null:Array.from($),w):n&&n.slice()},w.tickFormat=function($){return arguments.length?(o=$,w):o},w.tickSize=function($){return arguments.length?(d=k=+$,w):d},w.tickSizeInner=function($){return arguments.length?(d=+$,w):d},w.tickSizeOuter=function($){return arguments.length?(k=+$,w):k},w.tickPadding=function($){return arguments.length?(M=+$,w):M},w.offset=function($){return arguments.length?(I=+$,w):I},w}function je(t){return ie(Tt,t)}function Ge(t){return ie(Mt,t)}var Ve=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_isoWeek=n()})(t,(function(){var r="day";return function(n,o,d){var k=function(D){return D.add(4-D.isoWeekday(),r)},M=o.prototype;M.isoWeekYear=function(){return k(this).year()},M.isoWeek=function(D){if(!this.$utils().u(D))return this.add(7*(D-this.isoWeek()),r);var x,F,w,$,z=k(this),Y=(x=this.isoWeekYear(),F=this.$u,w=(F?d.utc:d)().year(x).startOf("year"),$=4-w.isoWeekday(),w.isoWeekday()>4&&($+=7),w.add($,r));return z.diff(Y,"week")+1},M.isoWeekday=function(D){return this.$utils().u(D)?this.day()||7:this.day(this.day()%7?D:D-7)};var I=M.startOf;M.startOf=function(D,x){var F=this.$utils(),w=!!F.u(x)||x;return F.p(D)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):I.bind(this)(D,x)}}}))})),Re=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_customParseFormat=n()})(t,(function(){var r={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"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,d=/\d\d/,k=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,I={},D=function(v){return(v=+v)+(v>68?1900:2e3)},x=function(v){return function(C){this[v]=+C}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var L=C.match(/([+-]|\d\d)/g),O=60*L[1]+(+L[2]||0);return O===0?0:L[0]==="+"?-O:O})(v)}],w=function(v){var C=I[v];return C&&(C.indexOf?C:C.s.concat(C.f))},$=function(v,C){var L,O=I.meridiem;if(O){for(var H=1;H<=24;H+=1)if(v.indexOf(O(H,0,C))>-1){L=H>12;break}}else L=v===(C?"pm":"PM");return L},z={A:[M,function(v){this.afternoon=$(v,!1)}],a:[M,function(v){this.afternoon=$(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*v}],SS:[d,function(v){this.milliseconds=10*v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[k,x("seconds")],ss:[k,x("seconds")],m:[k,x("minutes")],mm:[k,x("minutes")],H:[k,x("hours")],h:[k,x("hours")],HH:[k,x("hours")],hh:[k,x("hours")],D:[k,x("day")],DD:[d,x("day")],Do:[M,function(v){var C=I.ordinal;if(this.day=v.match(/\d+/)[0],C)for(var L=1;L<=31;L+=1)C(L).replace(/\[|\]/g,"")===v&&(this.day=L)}],w:[k,x("week")],ww:[d,x("week")],M:[k,x("month")],MM:[d,x("month")],MMM:[M,function(v){var C=w("months"),L=(w("monthsShort")||C.map((function(O){return O.slice(0,3)}))).indexOf(v)+1;if(L<1)throw Error();this.month=L%12||L}],MMMM:[M,function(v){var C=w("months").indexOf(v)+1;if(C<1)throw Error();this.month=C%12||C}],Y:[/[+-]?\d+/,x("year")],YY:[d,function(v){this.year=D(v)}],YYYY:[/\d{4}/,x("year")],Z:F,ZZ:F};function Y(v){for(var C=v,L=I&&I.formats,O=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(g,y,s){var c=s&&s.toUpperCase();return y||L[s]||r[s]||L[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(f,l,b){return l||b.slice(1)}))}))).match(n),H=O.length,N=0;N<H;N+=1){var A=O[N],p=z[A],m=p&&p[0],h=p&&p[1];O[N]=h?{regex:m,parser:h}:A.replace(/^\[|\]$/g,"")}return function(g){for(var y={},s=0,c=0;s<H;s+=1){var f=O[s];if(typeof f=="string")c+=f.length;else{var l=f.regex,b=f.parser,a=g.slice(c),_=l.exec(a)[0];b.call(y,_),g=g.replace(_,"")}}return(function(e){var T=e.afternoon;if(T!==void 0){var S=e.hours;T?S<12&&(e.hours+=12):S===12&&(e.hours=0),delete e.afternoon}})(y),y}}return function(v,C,L){L.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(D=v.parseTwoDigitYear);var O=C.prototype,H=O.parse;O.parse=function(N){var A=N.date,p=N.utc,m=N.args;this.$u=p;var h=m[1];if(typeof h=="string"){var g=m[2]===!0,y=m[3]===!0,s=g||y,c=m[2];y&&(c=m[2]),I=this.$locale(),!g&&c&&(I=L.Ls[c]),this.$d=(function(a,_,e,T){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*a);var S=Y(_)(a),E=S.year,W=S.month,P=S.day,j=S.hours,B=S.minutes,X=S.seconds,ht=S.milliseconds,at=S.zone,gt=S.week,ft=new Date,ot=P||(E||W?1:ft.getDate()),V=E||ft.getFullYear(),et=0;E&&!W||(et=W>0?W-1:ft.getMonth());var Z,R=j||0,nt=B||0,Q=X||0,it=ht||0;return at?new Date(Date.UTC(V,et,ot,R,nt,Q,it+60*at.offset*1e3)):e?new Date(Date.UTC(V,et,ot,R,nt,Q,it)):(Z=new Date(V,et,ot,R,nt,Q,it),gt&&(Z=T(Z).week(gt).toDate()),Z)}catch{return new Date("")}})(A,h,p,L),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),s&&A!=this.format(h)&&(this.$d=new Date("")),I={}}else if(h instanceof Array)for(var f=h.length,l=1;l<=f;l+=1){m[1]=h[l-1];var b=L.apply(this,m);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}l===f&&(this.$d=new Date(""))}else H.call(this,N)}}}))})),Ze=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_advancedFormat=n()})(t,(function(){return function(r,n){var o=n.prototype,d=o.format;o.format=function(k){var M=this,I=this.$locale();if(!this.isValid())return d.bind(this)(k);var D=this.$utils(),x=(k||"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(F){switch(F){case"Q":return Math.ceil((M.$M+1)/3);case"Do":return I.ordinal(M.$D);case"gggg":return M.weekYear();case"GGGG":return M.isoWeekYear();case"wo":return I.ordinal(M.week(),"W");case"w":case"ww":return D.s(M.week(),F==="w"?1:2,"0");case"W":case"WW":return D.s(M.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return D.s(String(M.$H===0?24:M.$H),F==="k"?1:2,"0");case"X":return Math.floor(M.$d.getTime()/1e3);case"x":return M.$d.getTime();case"z":return"["+M.offsetName()+"]";case"zzz":return"["+M.offsetName("long")+"]";default:return F}}));return d.bind(this)(x)}}}))})),Ue=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_duration=n()})(t,(function(){var r,n,o=1e3,d=6e4,k=36e5,M=864e5,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D=31536e6,x=2628e6,F=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,w={years:D,months:x,days:M,hours:k,minutes:d,seconds:o,milliseconds:1,weeks:6048e5},$=function(A){return A instanceof H},z=function(A,p,m){return new H(A,m,p.$l)},Y=function(A){return n.p(A)+"s"},v=function(A){return A<0},C=function(A){return v(A)?Math.ceil(A):Math.floor(A)},L=function(A){return Math.abs(A)},O=function(A,p){return A?v(A)?{negative:!0,format:""+L(A)+p}:{negative:!1,format:""+A+p}:{negative:!1,format:""}},H=(function(){function A(m,h,g){var y=this;if(this.$d={},this.$l=g,m===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return z(m*w[Y(h)],this);if(typeof m=="number")return this.$ms=m,this.parseFromMilliseconds(),this;if(typeof m=="object")return Object.keys(m).forEach((function(f){y.$d[Y(f)]=m[f]})),this.calMilliseconds(),this;if(typeof m=="string"){var s=m.match(F);if(s){var c=s.slice(2).map((function(f){return f==null?0:Number(f)}));return this.$d.years=c[0],this.$d.months=c[1],this.$d.weeks=c[2],this.$d.days=c[3],this.$d.hours=c[4],this.$d.minutes=c[5],this.$d.seconds=c[6],this.calMilliseconds(),this}}return this}var p=A.prototype;return p.calMilliseconds=function(){var m=this;this.$ms=Object.keys(this.$d).reduce((function(h,g){return h+(m.$d[g]||0)*w[g]}),0)},p.parseFromMilliseconds=function(){var m=this.$ms;this.$d.years=C(m/D),m%=D,this.$d.months=C(m/x),m%=x,this.$d.days=C(m/M),m%=M,this.$d.hours=C(m/k),m%=k,this.$d.minutes=C(m/d),m%=d,this.$d.seconds=C(m/o),m%=o,this.$d.milliseconds=m},p.toISOString=function(){var m=O(this.$d.years,"Y"),h=O(this.$d.months,"M"),g=+this.$d.days||0;this.$d.weeks&&(g+=7*this.$d.weeks);var y=O(g,"D"),s=O(this.$d.hours,"H"),c=O(this.$d.minutes,"M"),f=this.$d.seconds||0;this.$d.milliseconds&&(f+=this.$d.milliseconds/1e3,f=Math.round(1e3*f)/1e3);var l=O(f,"S"),b=m.negative||h.negative||y.negative||s.negative||c.negative||l.negative,a=s.format||c.format||l.format?"T":"",_=(b?"-":"")+"P"+m.format+h.format+y.format+a+s.format+c.format+l.format;return _==="P"||_==="-P"?"P0D":_},p.toJSON=function(){return this.toISOString()},p.format=function(m){var h=m||"YYYY-MM-DDTHH:mm:ss",g={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return h.replace(I,(function(y,s){return s||String(g[y])}))},p.as=function(m){return this.$ms/w[Y(m)]},p.get=function(m){var h=this.$ms,g=Y(m);return g==="milliseconds"?h%=1e3:h=g==="weeks"?C(h/w[g]):this.$d[g],h||0},p.add=function(m,h,g){var y;return y=h?m*w[Y(h)]:$(m)?m.$ms:z(m,this).$ms,z(this.$ms+y*(g?-1:1),this)},p.subtract=function(m,h){return this.add(m,h,!0)},p.locale=function(m){var h=this.clone();return h.$l=m,h},p.clone=function(){return z(this.$ms,this)},p.humanize=function(m){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!m)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},A})(),N=function(A,p,m){return A.add(p.years()*m,"y").add(p.months()*m,"M").add(p.days()*m,"d").add(p.hours()*m,"h").add(p.minutes()*m,"m").add(p.seconds()*m,"s").add(p.milliseconds()*m,"ms")};return function(A,p,m){r=m,n=m().$utils(),m.duration=function(y,s){return z(y,{$l:m.locale()},s)},m.isDuration=$;var h=p.prototype.add,g=p.prototype.subtract;p.prototype.add=function(y,s){return $(y)?N(this,y,1):h.bind(this)(y,s)},p.prototype.subtract=function(y,s){return $(y)?N(this,y,-1):g.bind(this)(y,s)}}}))})),qe=Oe(),q=ct(te(),1),Xe=ct(Ve(),1),Qe=ct(Re(),1),Je=ct(Ze(),1),mt=ct(te(),1),Ke=ct(Ue(),1),Ct=(function(){var t=u(function(s,c,f,l){for(f||(f={}),l=s.length;l--;f[s[l]]=c);return f},"o"),i=[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],r=[1,26],n=[1,27],o=[1,28],d=[1,29],k=[1,30],M=[1,31],I=[1,32],D=[1,33],x=[1,34],F=[1,9],w=[1,10],$=[1,11],z=[1,12],Y=[1,13],v=[1,14],C=[1,15],L=[1,16],O=[1,19],H=[1,20],N=[1,21],A=[1,22],p=[1,23],m=[1,25],h=[1,35],g={trace:u(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:u(function(s,c,f,l,b,a,_){var e=a.length-1;switch(b){case 1:return a[e-1];case 2:this.$=[];break;case 3:a[e-1].push(a[e]),this.$=a[e-1];break;case 4:case 5:this.$=a[e];break;case 6:case 7:this.$=[];break;case 8:l.setWeekday("monday");break;case 9:l.setWeekday("tuesday");break;case 10:l.setWeekday("wednesday");break;case 11:l.setWeekday("thursday");break;case 12:l.setWeekday("friday");break;case 13:l.setWeekday("saturday");break;case 14:l.setWeekday("sunday");break;case 15:l.setWeekend("friday");break;case 16:l.setWeekend("saturday");break;case 17:l.setDateFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 18:l.enableInclusiveEndDates(),this.$=a[e].substr(18);break;case 19:l.TopAxis(),this.$=a[e].substr(8);break;case 20:l.setAxisFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 21:l.setTickInterval(a[e].substr(13)),this.$=a[e].substr(13);break;case 22:l.setExcludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 23:l.setIncludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 24:l.setTodayMarker(a[e].substr(12)),this.$=a[e].substr(12);break;case 27:l.setDiagramTitle(a[e].substr(6)),this.$=a[e].substr(6);break;case 28:this.$=a[e].trim(),l.setAccTitle(this.$);break;case 29:case 30:this.$=a[e].trim(),l.setAccDescription(this.$);break;case 31:l.addSection(a[e].substr(8)),this.$=a[e].substr(8);break;case 33:l.addTask(a[e-1],a[e]),this.$="task";break;case 34:this.$=a[e-1],l.setClickEvent(a[e-1],a[e],null);break;case 35:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],a[e]);break;case 36:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],null),l.setLink(a[e-2],a[e]);break;case 37:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-2],a[e-1]),l.setLink(a[e-3],a[e]);break;case 38:this.$=a[e-2],l.setClickEvent(a[e-2],a[e],null),l.setLink(a[e-2],a[e-1]);break;case 39:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-1],a[e]),l.setLink(a[e-3],a[e-2]);break;case 40:this.$=a[e-1],l.setLink(a[e-1],a[e]);break;case 41:case 47:this.$=a[e-1]+" "+a[e];break;case 42:case 43:case 45:this.$=a[e-2]+" "+a[e-1]+" "+a[e];break;case 44:case 46:this.$=a[e-3]+" "+a[e-2]+" "+a[e-1]+" "+a[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:36,11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,5]),t(i,[2,6]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),t(i,[2,23]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),t(i,[2,27]),{32:[1,37]},{34:[1,38]},t(i,[2,30]),t(i,[2,31]),t(i,[2,32]),{39:[1,39]},t(i,[2,8]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),{41:[1,40],43:[1,41]},t(i,[2,4]),t(i,[2,28]),t(i,[2,29]),t(i,[2,33]),t(i,[2,34],{42:[1,42],43:[1,43]}),t(i,[2,40],{41:[1,44]}),t(i,[2,35],{43:[1,45]}),t(i,[2,36]),t(i,[2,38],{42:[1,46]}),t(i,[2,37]),t(i,[2,39])],defaultActions:{},parseError:u(function(s,c){if(c.recoverable)this.trace(s);else{var f=Error(s);throw f.hash=c,f}},"parseError"),parse:u(function(s){var c=this,f=[0],l=[],b=[null],a=[],_=this.table,e="",T=0,S=0,E=0,W=2,P=1,j=a.slice.call(arguments,1),B=Object.create(this.lexer),X={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(X.yy[ht]=this.yy[ht]);B.setInput(s,X.yy),X.yy.lexer=B,X.yy.parser=this,B.yylloc===void 0&&(B.yylloc={});var at=B.yylloc;a.push(at);var gt=B.options&&B.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(U){f.length-=2*U,b.length-=U,a.length-=U}u(ft,"popStack");function ot(){var U=l.pop()||B.lex()||P;return typeof U!="number"&&(U instanceof Array&&(l=U,U=l.pop()),U=c.symbols_[U]||U),U}u(ot,"lex");for(var V,et,Z,R,nt,Q={},it,K,Vt,bt;;){if(Z=f[f.length-1],this.defaultActions[Z]?R=this.defaultActions[Z]:(V??(V=ot()),R=_[Z]&&_[Z][V]),R===void 0||!R.length||!R[0]){var Rt="";for(it in bt=[],_[Z])this.terminals_[it]&&it>W&&bt.push("'"+this.terminals_[it]+"'");Rt=B.showPosition?"Parse error on line "+(T+1)+`:
`+B.showPosition()+`
Expecting `+bt.join(", ")+", got '"+(this.terminals_[V]||V)+"'":"Parse error on line "+(T+1)+": Unexpected "+(V==P?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(Rt,{text:B.match,token:this.terminals_[V]||V,line:B.yylineno,loc:at,expected:bt})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+Z+", token: "+V);switch(R[0]){case 1:f.push(V),b.push(B.yytext),a.push(B.yylloc),f.push(R[1]),V=null,et?(V=et,et=null):(S=B.yyleng,e=B.yytext,T=B.yylineno,at=B.yylloc,E>0&&E--);break;case 2:if(K=this.productions_[R[1]][1],Q.$=b[b.length-K],Q._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},gt&&(Q._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),nt=this.performAction.apply(Q,[e,S,T,X.yy,R[1],b,a].concat(j)),nt!==void 0)return nt;K&&(f=f.slice(0,-1*K*2),b=b.slice(0,-1*K),a=a.slice(0,-1*K)),f.push(this.productions_[R[1]][0]),b.push(Q.$),a.push(Q._$),Vt=_[f[f.length-2]][f[f.length-1]],f.push(Vt);break;case 3:return!0}}return!0},"parse")};g.lexer=(function(){return{EOF:1,parseError:u(function(s,c){if(this.yy.parser)this.yy.parser.parseError(s,c);else throw Error(s)},"parseError"),setInput:u(function(s,c){return this.yy=c||this.yy||{},this._input=s,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 s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:u(function(s){var c=s.length,f=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var l=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),f.length-1&&(this.yylineno-=f.length-1);var b=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:f?(f.length===l.length?this.yylloc.first_column:0)+l[l.length-f.length].length-f[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-c]),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(s){this.unput(this.match.slice(s))},"less"),pastInput:u(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var s=this.pastInput(),c=Array(s.length+1).join("-");return s+this.upcomingInput()+`
`+c+"^"},"showPosition"),test_match:u(function(s,c){var f,l,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),l=s[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],f=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var a in b)this[a]=b[a];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,c,f,l;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),a=0;a<b.length;a++)if(f=this._input.match(this.rules[b[a]]),f&&(!c||f[0].length>c[0].length)){if(c=f,l=a,this.options.backtrack_lexer){if(s=this.test_match(f,b[a]),s!==!1)return s;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(s=this.test_match(c,b[l]),s===!1?!1:s):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(){return this.next()||this.lex()},"lex"),begin:u(function(s){this.conditionStack.push(s)},"begin"),popState:u(function(){return this.conditionStack.length-1>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(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:u(function(s){this.begin(s)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(s,c,f,l){switch(f){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}}}})();function y(){this.yy={}}return u(y,"Parser"),y.prototype=g,g.Parser=y,new y})();Ct.parser=Ct;var ti=Ct;q.default.extend(Xe.default),q.default.extend(Qe.default),q.default.extend(Je.default);var ne={friday:5,saturday:6},J="",Et="",Yt=void 0,At="",yt=[],kt=[],It=new Map,Lt=[],wt=[],ut="",Ft="",se=["active","done","crit","milestone","vert"],Ot=[],pt=!1,Wt=!1,Pt="sunday",$t="saturday",zt=0,ei=u(function(){Lt=[],wt=[],ut="",Ot=[],Nt=0,Bt=void 0,_t=void 0,G=[],J="",Et="",Ft="",Yt=void 0,At="",yt=[],kt=[],pt=!1,Wt=!1,zt=0,It=new Map,Ye(),Pt="sunday",$t="saturday"},"clear"),ii=u(function(t){Et=t},"setAxisFormat"),ni=u(function(){return Et},"getAxisFormat"),si=u(function(t){Yt=t},"setTickInterval"),ri=u(function(){return Yt},"getTickInterval"),ai=u(function(t){At=t},"setTodayMarker"),oi=u(function(){return At},"getTodayMarker"),ci=u(function(t){J=t},"setDateFormat"),li=u(function(){pt=!0},"enableInclusiveEndDates"),ui=u(function(){return pt},"endDatesAreInclusive"),di=u(function(){Wt=!0},"enableTopAxis"),hi=u(function(){return Wt},"topAxisEnabled"),fi=u(function(t){Ft=t},"setDisplayMode"),mi=u(function(){return Ft},"getDisplayMode"),yi=u(function(){return J},"getDateFormat"),ki=u(function(t){yt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),pi=u(function(){return yt},"getIncludes"),gi=u(function(t){kt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),bi=u(function(){return kt},"getExcludes"),vi=u(function(){return It},"getLinks"),Ti=u(function(t){ut=t,Lt.push(t)},"addSection"),xi=u(function(){return Lt},"getSections"),wi=u(function(){let t=ue(),i=0;for(;!t&&i<10;)t=ue(),i++;return wt=G,wt},"getTasks"),re=u(function(t,i,r,n){let o=t.format(i.trim()),d=t.format("YYYY-MM-DD");return n.includes(o)||n.includes(d)?!1:r.includes("weekends")&&(t.isoWeekday()===ne[$t]||t.isoWeekday()===ne[$t]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(o)||r.includes(d)},"isInvalidDate"),$i=u(function(t){Pt=t},"setWeekday"),_i=u(function(){return Pt},"getWeekday"),Di=u(function(t){$t=t},"setWeekend"),ae=u(function(t,i,r,n){if(!r.length||t.manualEndTime)return;let o;o=t.startTime instanceof Date?(0,q.default)(t.startTime):(0,q.default)(t.startTime,i,!0),o=o.add(1,"d");let d;d=t.endTime instanceof Date?(0,q.default)(t.endTime):(0,q.default)(t.endTime,i,!0);let[k,M]=Si(o,d,i,r,n);t.endTime=k.toDate(),t.renderEndTime=M},"checkTaskDates"),Si=u(function(t,i,r,n,o){let d=!1,k=null;for(;t<=i;)d||(k=i.toDate()),d=re(t,r,n,o),d&&(i=i.add(1,"d")),t=t.add(1,"d");return[i,k]},"fixTaskDates"),Ht=u(function(t,i,r){if(r=r.trim(),u(d=>{let k=d.trim();return k==="x"||k==="X"},"isTimestampFormat")(i)&&/^\d+$/.test(r))return new Date(Number(r));let n=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(n!==null){let d=null;for(let M of n.groups.ids.split(" ")){let I=rt(M);I!==void 0&&(!d||I.endTime>d.endTime)&&(d=I)}if(d)return d.endTime;let k=new Date;return k.setHours(0,0,0,0),k}let o=(0,q.default)(r,i.trim(),!0);if(o.isValid())return o.toDate();{st.debug("Invalid date:"+r),st.debug("With date format:"+i.trim());let d=new Date(r);if(d===void 0||isNaN(d.getTime())||d.getFullYear()<-1e4||d.getFullYear()>1e4)throw Error("Invalid date:"+r);return d}},"getStartDate"),oe=u(function(t){let i=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return i===null?[NaN,"ms"]:[Number.parseFloat(i[1]),i[2]]},"parseDuration"),ce=u(function(t,i,r,n=!1){r=r.trim();let o=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(o!==null){let D=null;for(let F of o.groups.ids.split(" ")){let w=rt(F);w!==void 0&&(!D||w.startTime<D.startTime)&&(D=w)}if(D)return D.startTime;let x=new Date;return x.setHours(0,0,0,0),x}let d=(0,q.default)(r,i.trim(),!0);if(d.isValid())return n&&(d=d.add(1,"d")),d.toDate();let k=(0,q.default)(t),[M,I]=oe(r);if(!Number.isNaN(M)){let D=k.add(M,I);D.isValid()&&(k=D)}return k.toDate()},"getEndDate"),Nt=0,dt=u(function(t){return t===void 0?(Nt+=1,"task"+Nt):t},"parseId"),Mi=u(function(t,i){let r;r=i.substr(0,1)===":"?i.substr(1,i.length):i;let n=r.split(","),o={};jt(n,o,se);for(let k=0;k<n.length;k++)n[k]=n[k].trim();let d="";switch(n.length){case 1:o.id=dt(),o.startTime=t.endTime,d=n[0];break;case 2:o.id=dt(),o.startTime=Ht(void 0,J,n[0]),d=n[1];break;case 3:o.id=dt(n[0]),o.startTime=Ht(void 0,J,n[1]),d=n[2];break;default:}return d&&(o.endTime=ce(o.startTime,J,d,pt),o.manualEndTime=(0,q.default)(d,"YYYY-MM-DD",!0).isValid(),ae(o,J,kt,yt)),o},"compileData"),Ci=u(function(t,i){let r;r=i.substr(0,1)===":"?i.substr(1,i.length):i;let n=r.split(","),o={};jt(n,o,se);for(let d=0;d<n.length;d++)n[d]=n[d].trim();switch(n.length){case 1:o.id=dt(),o.startTime={type:"prevTaskEnd",id:t},o.endTime={data:n[0]};break;case 2:o.id=dt(),o.startTime={type:"getStartDate",startData:n[0]},o.endTime={data:n[1]};break;case 3:o.id=dt(n[0]),o.startTime={type:"getStartDate",startData:n[1]},o.endTime={data:n[2]};break;default:}return o},"parseData"),Bt,_t,G=[],le={},Ei=u(function(t,i){let r={section:ut,type:ut,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:i},task:t,classes:[]},n=Ci(_t,i);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=_t,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,r.order=zt,zt++;let o=G.push(r);_t=r.id,le[r.id]=o-1},"addTask"),rt=u(function(t){let i=le[t];return G[i]},"findTaskById"),Yi=u(function(t,i){let r={section:ut,type:ut,description:t,task:t,classes:[]},n=Mi(Bt,i);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,Bt=r,wt.push(r)},"addTaskOrg"),ue=u(function(){let t=u(function(r){let n=G[r],o="";switch(G[r].raw.startTime.type){case"prevTaskEnd":n.startTime=rt(n.prevTaskId).endTime;break;case"getStartDate":o=Ht(void 0,J,G[r].raw.startTime.startData),o&&(G[r].startTime=o);break}return G[r].startTime&&(G[r].endTime=ce(G[r].startTime,J,G[r].raw.endTime.data,pt),G[r].endTime&&(G[r].processed=!0,G[r].manualEndTime=(0,q.default)(G[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),ae(G[r],J,kt,yt))),G[r].processed},"compileTask"),i=!0;for(let[r,n]of G.entries())t(r),i&&(i=n.processed);return i},"compileTasks"),Ai=u(function(t,i){let r=i;lt().securityLevel!=="loose"&&(r=(0,qe.sanitizeUrl)(i)),t.split(",").forEach(function(n){rt(n)!==void 0&&(he(n,()=>{window.open(r,"_self")}),It.set(n,r))}),de(t,"clickable")},"setLink"),de=u(function(t,i){t.split(",").forEach(function(r){let n=rt(r);n!==void 0&&n.classes.push(i)})},"setClass"),Ii=u(function(t,i,r){if(lt().securityLevel!=="loose"||i===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<n.length;o++){let d=n[o].trim();d.startsWith('"')&&d.endsWith('"')&&(d=d.substr(1,d.length-2)),n[o]=d}}n.length===0&&n.push(t),rt(t)!==void 0&&he(t,()=>{De.runFunc(i,...n)})},"setClickFun"),he=u(function(t,i){Ot.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){i()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){i()})})},"pushFun"),Li={getConfig:u(()=>lt().gantt,"getConfig"),clear:ei,setDateFormat:ci,getDateFormat:yi,enableInclusiveEndDates:li,endDatesAreInclusive:ui,enableTopAxis:di,topAxisEnabled:hi,setAxisFormat:ii,getAxisFormat:ni,setTickInterval:si,getTickInterval:ri,setTodayMarker:ai,getTodayMarker:oi,setAccTitle:Se,getAccTitle:Le,setDiagramTitle:Ce,getDiagramTitle:Me,setDisplayMode:fi,getDisplayMode:mi,setAccDescription:Fe,getAccDescription:Ee,addSection:Ti,getSections:xi,getTasks:wi,addTask:Ei,findTaskById:rt,addTaskOrg:Yi,setIncludes:ki,getIncludes:pi,setExcludes:gi,getExcludes:bi,setClickEvent:u(function(t,i,r){t.split(",").forEach(function(n){Ii(n,i,r)}),de(t,"clickable")},"setClickEvent"),setLink:Ai,getLinks:vi,bindFunctions:u(function(t){Ot.forEach(function(i){i(t)})},"bindFunctions"),parseDuration:oe,isInvalidDate:re,setWeekday:$i,getWeekday:_i,setWeekend:Di};function jt(t,i,r){let n=!0;for(;n;)n=!1,r.forEach(function(o){let d="^\\s*"+o+"\\s*$",k=new RegExp(d);t[0].match(k)&&(i[o]=!0,t.shift(1),n=!0)})}u(jt,"getTaskTags"),mt.default.extend(Ke.default);var Fi=u(function(){st.debug("Something is calling, setConf, remove the call")},"setConf"),fe={monday:ge,tuesday:Te,wednesday:ve,thursday:xe,friday:$e,saturday:be,sunday:we},Oi=u((t,i)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((d,k)=>d.startTime-k.startTime||d.order-k.order),o=0;for(let d of n)for(let k=0;k<r.length;k++)if(d.startTime>=r[k]){r[k]=d.endTime,d.order=k+i,k>o&&(o=k);break}return o},"getMaxIntersections"),tt,Gt=1e4,Wi={parser:ti,db:Li,renderer:{setConf:Fi,draw:u(function(t,i,r,n){let o=lt().gantt,d=lt().securityLevel,k;d==="sandbox"&&(k=Dt("#i"+i));let M=Dt(d==="sandbox"?k.nodes()[0].contentDocument.body:"body"),I=d==="sandbox"?k.nodes()[0].contentDocument:document,D=I.getElementById(i);tt=D.parentElement.offsetWidth,tt===void 0&&(tt=1200),o.useWidth!==void 0&&(tt=o.useWidth);let x=n.db.getTasks(),F=[];for(let h of x)F.push(h.type);F=m(F);let w={},$=2*o.topPadding;if(n.db.getDisplayMode()==="compact"||o.displayMode==="compact"){let h={};for(let y of x)h[y.section]===void 0?h[y.section]=[y]:h[y.section].push(y);let g=0;for(let y of Object.keys(h)){let s=Oi(h[y],g)+1;g+=s,$+=s*(o.barHeight+o.barGap),w[y]=s}}else{$+=x.length*(o.barHeight+o.barGap);for(let h of F)w[h]=x.filter(g=>g.type===h).length}D.setAttribute("viewBox","0 0 "+tt+" "+$);let z=M.select(`[id="${i}"]`),Y=ye().domain([ke(x,function(h){return h.startTime}),pe(x,function(h){return h.endTime})]).rangeRound([0,tt-o.leftPadding-o.rightPadding]);function v(h,g){let y=h.startTime,s=g.startTime,c=0;return y>s?c=1:y<s&&(c=-1),c}u(v,"taskCompare"),x.sort(v),C(x,tt,$),Ae(z,$,tt,o.useMaxWidth),z.append("text").text(n.db.getDiagramTitle()).attr("x",tt/2).attr("y",o.titleTopMargin).attr("class","titleText");function C(h,g,y){let s=o.barHeight,c=s+o.barGap,f=o.topPadding,l=o.leftPadding,b=me().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(_e);O(c,f,l,g,y,h,n.db.getExcludes(),n.db.getIncludes()),N(l,f,g,y),L(h,c,f,l,s,b,g,y),A(c,f,l,s,b),p(l,f,g,y)}u(C,"makeGantt");function L(h,g,y,s,c,f,l){h.sort((e,T)=>e.vert===T.vert?0:e.vert?1:-1);let b=[...new Set(h.map(e=>e.order))].map(e=>h.find(T=>T.order===e));z.append("g").selectAll("rect").data(b).enter().append("rect").attr("x",0).attr("y",function(e,T){return T=e.order,T*g+y-2}).attr("width",function(){return l-o.rightPadding/2}).attr("height",g).attr("class",function(e){for(let[T,S]of F.entries())if(e.type===S)return"section section"+T%o.numberSectionStyles;return"section section0"}).enter();let a=z.append("g").selectAll("rect").data(h).enter(),_=n.db.getLinks();if(a.append("rect").attr("id",function(e){return e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?Y(e.startTime)+s+.5*(Y(e.endTime)-Y(e.startTime))-.5*c:Y(e.startTime)+s}).attr("y",function(e,T){return T=e.order,e.vert?o.gridLineStartPadding:T*g+y}).attr("width",function(e){return e.milestone?c:e.vert?.08*c:Y(e.renderEndTime||e.endTime)-Y(e.startTime)}).attr("height",function(e){return e.vert?x.length*(o.barHeight+o.barGap)+o.barHeight*2:c}).attr("transform-origin",function(e,T){return T=e.order,(Y(e.startTime)+s+.5*(Y(e.endTime)-Y(e.startTime))).toString()+"px "+(T*g+y+.5*c).toString()+"px"}).attr("class",function(e){let T="";e.classes.length>0&&(T=e.classes.join(" "));let S=0;for(let[W,P]of F.entries())e.type===P&&(S=W%o.numberSectionStyles);let E="";return e.active?e.crit?E+=" activeCrit":E=" active":e.done?E=e.crit?" doneCrit":" done":e.crit&&(E+=" crit"),E.length===0&&(E=" task"),e.milestone&&(E=" milestone "+E),e.vert&&(E=" vert "+E),E+=S,E+=" "+T,"task"+E}),a.append("text").attr("id",function(e){return e.id+"-text"}).text(function(e){return e.task}).attr("font-size",o.fontSize).attr("x",function(e){let T=Y(e.startTime),S=Y(e.renderEndTime||e.endTime);if(e.milestone&&(T+=.5*(Y(e.endTime)-Y(e.startTime))-.5*c,S=T+c),e.vert)return Y(e.startTime)+s;let E=this.getBBox().width;return E>S-T?S+E+1.5*o.leftPadding>l?T+s-5:S+s+5:(S-T)/2+T+s}).attr("y",function(e,T){return e.vert?o.gridLineStartPadding+x.length*(o.barHeight+o.barGap)+60:(T=e.order,T*g+o.barHeight/2+(o.fontSize/2-2)+y)}).attr("text-height",c).attr("class",function(e){let T=Y(e.startTime),S=Y(e.endTime);e.milestone&&(S=T+c);let E=this.getBBox().width,W="";e.classes.length>0&&(W=e.classes.join(" "));let P=0;for(let[B,X]of F.entries())e.type===X&&(P=B%o.numberSectionStyles);let j="";return e.active&&(j=e.crit?"activeCritText"+P:"activeText"+P),e.done?j=e.crit?j+" doneCritText"+P:j+" doneText"+P:e.crit&&(j=j+" critText"+P),e.milestone&&(j+=" milestoneText"),e.vert&&(j+=" vertText"),E>S-T?S+E+1.5*o.leftPadding>l?W+" taskTextOutsideLeft taskTextOutside"+P+" "+j:W+" taskTextOutsideRight taskTextOutside"+P+" "+j+" width-"+E:W+" taskText taskText"+P+" "+j+" width-"+E}),lt().securityLevel==="sandbox"){let e;e=Dt("#i"+i);let T=e.nodes()[0].contentDocument;a.filter(function(S){return _.has(S.id)}).each(function(S){var E=T.querySelector("#"+S.id),W=T.querySelector("#"+S.id+"-text");let P=E.parentNode;var j=T.createElement("a");j.setAttribute("xlink:href",_.get(S.id)),j.setAttribute("target","_top"),P.appendChild(j),j.appendChild(E),j.appendChild(W)})}}u(L,"drawRects");function O(h,g,y,s,c,f,l,b){if(l.length===0&&b.length===0)return;let a,_;for(let{startTime:W,endTime:P}of f)(a===void 0||W<a)&&(a=W),(_===void 0||P>_)&&(_=P);if(!a||!_)return;if((0,mt.default)(_).diff((0,mt.default)(a),"year")>5){st.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let e=n.db.getDateFormat(),T=[],S=null,E=(0,mt.default)(a);for(;E.valueOf()<=_;)n.db.isInvalidDate(E,e,l,b)?S?S.end=E:S={start:E,end:E}:S&&(S=(T.push(S),null)),E=E.add(1,"d");z.append("g").selectAll("rect").data(T).enter().append("rect").attr("id",W=>"exclude-"+W.start.format("YYYY-MM-DD")).attr("x",W=>Y(W.start.startOf("day"))+y).attr("y",o.gridLineStartPadding).attr("width",W=>Y(W.end.endOf("day"))-Y(W.start.startOf("day"))).attr("height",c-g-o.gridLineStartPadding).attr("transform-origin",function(W,P){return(Y(W.start)+y+.5*(Y(W.end)-Y(W.start))).toString()+"px "+(P*h+.5*c).toString()+"px"}).attr("class","exclude-range")}u(O,"drawExcludeDays");function H(h,g,y,s){if(y<=0||h>g)return 1/0;let c=g-h,f=mt.default.duration({[s??"day"]:y}).asMilliseconds();return f<=0?1/0:Math.ceil(c/f)}u(H,"getEstimatedTickCount");function N(h,g,y,s){let c=n.db.getDateFormat(),f=n.db.getAxisFormat(),l;l=f||(c==="D"?"%d":o.axisFormat??"%Y-%m-%d");let b=Ge(Y).tickSize(-s+g+o.gridLineStartPadding).tickFormat(Qt(l)),a=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||o.tickInterval);if(a!==null){let _=parseInt(a[1],10);if(isNaN(_)||_<=0)st.warn(`Invalid tick interval value: "${a[1]}". Skipping custom tick interval.`);else{let e=a[2],T=n.db.getWeekday()||o.weekday,S=Y.domain(),E=S[0],W=S[1],P=H(E,W,_,e);if(P>Gt)st.warn(`The tick interval "${_}${e}" would generate ${P} ticks, which exceeds the maximum allowed (${Gt}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":b.ticks(Ut.every(_));break;case"second":b.ticks(qt.every(_));break;case"minute":b.ticks(Zt.every(_));break;case"hour":b.ticks(Kt.every(_));break;case"day":b.ticks(Jt.every(_));break;case"week":b.ticks(fe[T].every(_));break;case"month":b.ticks(Xt.every(_));break}}}if(z.append("g").attr("class","grid").attr("transform","translate("+h+", "+(s-50)+")").call(b).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||o.topAxis){let _=je(Y).tickSize(-s+g+o.gridLineStartPadding).tickFormat(Qt(l));if(a!==null){let e=parseInt(a[1],10);if(isNaN(e)||e<=0)st.warn(`Invalid tick interval value: "${a[1]}". Skipping custom tick interval.`);else{let T=a[2],S=n.db.getWeekday()||o.weekday,E=Y.domain(),W=E[0],P=E[1];if(H(W,P,e,T)<=Gt)switch(T){case"millisecond":_.ticks(Ut.every(e));break;case"second":_.ticks(qt.every(e));break;case"minute":_.ticks(Zt.every(e));break;case"hour":_.ticks(Kt.every(e));break;case"day":_.ticks(Jt.every(e));break;case"week":_.ticks(fe[S].every(e));break;case"month":_.ticks(Xt.every(e));break}}}z.append("g").attr("class","grid").attr("transform","translate("+h+", "+g+")").call(_).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}u(N,"makeGrid");function A(h,g){let y=0,s=Object.keys(w).map(c=>[c,w[c]]);z.append("g").selectAll("text").data(s).enter().append(function(c){let f=c[0].split(Ie.lineBreakRegex),l=-(f.length-1)/2,b=I.createElementNS("http://www.w3.org/2000/svg","text");b.setAttribute("dy",l+"em");for(let[a,_]of f.entries()){let e=I.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),a>0&&e.setAttribute("dy","1em"),e.textContent=_,b.appendChild(e)}return b}).attr("x",10).attr("y",function(c,f){if(f>0)for(let l=0;l<f;l++)return y+=s[f-1][1],c[1]*h/2+y*h+g;else return c[1]*h/2+g}).attr("font-size",o.sectionFontSize).attr("class",function(c){for(let[f,l]of F.entries())if(c[0]===l)return"sectionTitle sectionTitle"+f%o.numberSectionStyles;return"sectionTitle"})}u(A,"vertLabels");function p(h,g,y,s){let c=n.db.getTodayMarker();if(c==="off")return;let f=z.append("g").attr("class","today"),l=new Date,b=f.append("line");b.attr("x1",Y(l)+h).attr("x2",Y(l)+h).attr("y1",o.titleTopMargin).attr("y2",s-o.titleTopMargin).attr("class","today"),c!==""&&b.attr("style",c.replace(/,/g,";"))}u(p,"drawToday");function m(h){let g={},y=[];for(let s=0,c=h.length;s<c;++s)Object.prototype.hasOwnProperty.call(g,h[s])||(g[h[s]]=!0,y.push(h[s]));return y}u(m,"checkUnique")},"draw")},styles:u(t=>`
.mermaid-main-font {
font-family: ${t.fontFamily};
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: ${t.fontFamily};
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: ${t.fontFamily};
}
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
font-family: ${t.fontFamily};
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.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: ${t.taskTextDarkColor} !important;
}
.vert {
stroke: ${t.vertLineColor};
}
.vertText {
font-size: 15px;
text-anchor: middle;
fill: ${t.vertLineColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.titleColor||t.textColor};
font-family: ${t.fontFamily};
}
`,"getStyles")};export{Wi as diagram};
import{n as a,t as s}from"./gas-CnHGSLCd.js";export{s as gas,a as gasArm};
function v(r){var u=[],b="",c={".abort":"builtin",".align":"builtin",".altmacro":"builtin",".ascii":"builtin",".asciz":"builtin",".balign":"builtin",".balignw":"builtin",".balignl":"builtin",".bundle_align_mode":"builtin",".bundle_lock":"builtin",".bundle_unlock":"builtin",".byte":"builtin",".cfi_startproc":"builtin",".comm":"builtin",".data":"builtin",".def":"builtin",".desc":"builtin",".dim":"builtin",".double":"builtin",".eject":"builtin",".else":"builtin",".elseif":"builtin",".end":"builtin",".endef":"builtin",".endfunc":"builtin",".endif":"builtin",".equ":"builtin",".equiv":"builtin",".eqv":"builtin",".err":"builtin",".error":"builtin",".exitm":"builtin",".extern":"builtin",".fail":"builtin",".file":"builtin",".fill":"builtin",".float":"builtin",".func":"builtin",".global":"builtin",".gnu_attribute":"builtin",".hidden":"builtin",".hword":"builtin",".ident":"builtin",".if":"builtin",".incbin":"builtin",".include":"builtin",".int":"builtin",".internal":"builtin",".irp":"builtin",".irpc":"builtin",".lcomm":"builtin",".lflags":"builtin",".line":"builtin",".linkonce":"builtin",".list":"builtin",".ln":"builtin",".loc":"builtin",".loc_mark_labels":"builtin",".local":"builtin",".long":"builtin",".macro":"builtin",".mri":"builtin",".noaltmacro":"builtin",".nolist":"builtin",".octa":"builtin",".offset":"builtin",".org":"builtin",".p2align":"builtin",".popsection":"builtin",".previous":"builtin",".print":"builtin",".protected":"builtin",".psize":"builtin",".purgem":"builtin",".pushsection":"builtin",".quad":"builtin",".reloc":"builtin",".rept":"builtin",".sbttl":"builtin",".scl":"builtin",".section":"builtin",".set":"builtin",".short":"builtin",".single":"builtin",".size":"builtin",".skip":"builtin",".sleb128":"builtin",".space":"builtin",".stab":"builtin",".string":"builtin",".struct":"builtin",".subsection":"builtin",".symver":"builtin",".tag":"builtin",".text":"builtin",".title":"builtin",".type":"builtin",".uleb128":"builtin",".val":"builtin",".version":"builtin",".vtable_entry":"builtin",".vtable_inherit":"builtin",".warning":"builtin",".weak":"builtin",".weakref":"builtin",".word":"builtin"},i={};function p(){b="#",i.al="variable",i.ah="variable",i.ax="variable",i.eax="variableName.special",i.rax="variableName.special",i.bl="variable",i.bh="variable",i.bx="variable",i.ebx="variableName.special",i.rbx="variableName.special",i.cl="variable",i.ch="variable",i.cx="variable",i.ecx="variableName.special",i.rcx="variableName.special",i.dl="variable",i.dh="variable",i.dx="variable",i.edx="variableName.special",i.rdx="variableName.special",i.si="variable",i.esi="variableName.special",i.rsi="variableName.special",i.di="variable",i.edi="variableName.special",i.rdi="variableName.special",i.sp="variable",i.esp="variableName.special",i.rsp="variableName.special",i.bp="variable",i.ebp="variableName.special",i.rbp="variableName.special",i.ip="variable",i.eip="variableName.special",i.rip="variableName.special",i.cs="keyword",i.ds="keyword",i.ss="keyword",i.es="keyword",i.fs="keyword",i.gs="keyword"}function m(){b="@",c.syntax="builtin",i.r0="variable",i.r1="variable",i.r2="variable",i.r3="variable",i.r4="variable",i.r5="variable",i.r6="variable",i.r7="variable",i.r8="variable",i.r9="variable",i.r10="variable",i.r11="variable",i.r12="variable",i.sp="variableName.special",i.lr="variableName.special",i.pc="variableName.special",i.r13=i.sp,i.r14=i.lr,i.r15=i.pc,u.push(function(l,t){if(l==="#")return t.eatWhile(/\w/),"number"})}r==="x86"?p():(r==="arm"||r==="armv6")&&m();function f(l,t){for(var e=!1,a;(a=l.next())!=null;){if(a===t&&!e)return!1;e=!e&&a==="\\"}return e}function o(l,t){for(var e=!1,a;(a=l.next())!=null;){if(a==="/"&&e){t.tokenize=null;break}e=a==="*"}return"comment"}return{name:"gas",startState:function(){return{tokenize:null}},token:function(l,t){if(t.tokenize)return t.tokenize(l,t);if(l.eatSpace())return null;var e,a,n=l.next();if(n==="/"&&l.eat("*"))return t.tokenize=o,o(l,t);if(n===b)return l.skipToEnd(),"comment";if(n==='"')return f(l,'"'),"string";if(n===".")return l.eatWhile(/\w/),a=l.current().toLowerCase(),e=c[a],e||null;if(n==="=")return l.eatWhile(/\w/),"tag";if(n==="{"||n==="}")return"bracket";if(/\d/.test(n))return n==="0"&&l.eat("x")?(l.eatWhile(/[0-9a-fA-F]/),"number"):(l.eatWhile(/\d/),"number");if(/\w/.test(n))return l.eatWhile(/\w/),l.eat(":")?"tag":(a=l.current().toLowerCase(),e=i[a],e||null);for(var s=0;s<u.length;s++)if(e=u[s](n,l,t),e)return e},languageData:{commentTokens:{line:b,block:{open:"/*",close:"*/"}}}}}const d=v("x86"),g=v("arm");export{g as n,d as t};
import{t as r}from"./gherkin-DfEZpSxY.js";export{r as gherkin};
const n={name:"gherkin",startState:function(){return{lineNumber:0,tableHeaderLine:!1,allowFeature:!0,allowBackground:!1,allowScenario:!1,allowSteps:!1,allowPlaceholders:!1,allowMultilineArgument:!1,inMultilineString:!1,inMultilineTable:!1,inKeywordLine:!1}},token:function(e,a){if(e.sol()&&(a.lineNumber++,a.inKeywordLine=!1,a.inMultilineTable&&(a.tableHeaderLine=!1,e.match(/\s*\|/,!1)||(a.allowMultilineArgument=!1,a.inMultilineTable=!1))),e.eatSpace(),a.allowMultilineArgument){if(a.inMultilineString)return e.match('"""')?(a.inMultilineString=!1,a.allowMultilineArgument=!1):e.match(/.*/),"string";if(a.inMultilineTable)return e.match(/\|\s*/)?"bracket":(e.match(/[^\|]*/),a.tableHeaderLine?"header":"string");if(e.match('"""'))return a.inMultilineString=!0,"string";if(e.match("|"))return a.inMultilineTable=!0,a.tableHeaderLine=!0,"bracket"}return e.match(/#.*/)?"comment":!a.inKeywordLine&&e.match(/@\S+/)?"tag":!a.inKeywordLine&&a.allowFeature&&e.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)?(a.allowScenario=!0,a.allowBackground=!0,a.allowPlaceholders=!1,a.allowSteps=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowBackground&&e.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)?(a.allowPlaceholders=!0,a.allowSteps=!0,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):a.allowScenario&&e.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowSteps&&e.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)?(a.inStep=!0,a.allowPlaceholders=!0,a.allowMultilineArgument=!0,a.inKeywordLine=!0,"keyword"):e.match(/"[^"]*"?/)?"string":a.allowPlaceholders&&e.match(/<[^>]*>?/)?"variable":(e.next(),e.eatWhile(/[^@"<#]/),null)}};export{n as t};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as r}from"./chunk-S6J4BHB3-C4KwSfr_.js";export{r as createGitGraphServices};
var J;import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DZrAQFIu.js";import{u as Q}from"./src-CvyFXpBy.js";import{g as X,i as Z,m as tt}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as h,r as u}from"./src-CsZby044.js";import{B as rt,C as et,K as at,U as ot,_ as it,a as st,b as ct,d as nt,s as k,v as dt,y as ht,z as mt}from"./chunk-ABZYJK2D-0jga8uiE.js";import"./dist-C1VXabOr.js";import"./chunk-O7ZBX7Z2-CFqB9i7k.js";import"./chunk-S6J4BHB3-C4KwSfr_.js";import"./chunk-LBM3YZW2-BRBe7ZaP.js";import"./chunk-76Q3JFCE-BAZ3z-Fu.js";import"./chunk-T53DSG4Q-Bhd043Cg.js";import"./chunk-LHMN2FUI-C4onQD9F.js";import"./chunk-FWNWRKHM-DzIkWreD.js";import{t as lt}from"./chunk-4BX2VUAB-KawmK-5L.js";import{t as $t}from"./mermaid-parser.core-BLHYb13y.js";import{t as yt}from"./chunk-QZHKN3VN-Cp_TxrNJ.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},gt=nt.gitGraph,A=h(()=>Z({...gt,...ht().gitGraph}),"getConfig"),n=new yt(()=>{let r=A(),t=r.mainBranchName,a=r.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:a}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function z(){return tt({length:7})}h(z,"getID");function j(r,t){let a=Object.create(null);return r.reduce((i,e)=>{let o=t(e);return a[o]||(a[o]=!0,i.push(e)),i},[])}h(j,"uniqBy");var pt=h(function(r){n.records.direction=r},"setDirection"),xt=h(function(r){u.debug("options str",r),r=r==null?void 0:r.trim(),r||(r="{}");try{n.records.options=JSON.parse(r)}catch(t){u.error("error while parsing gitGraph options",t.message)}},"setOptions"),ft=h(function(){return n.records.options},"getOptions"),ut=h(function(r){let t=r.msg,a=r.id,i=r.type,e=r.tags;u.info("commit",t,a,i,e),u.debug("Entering commit:",t,a,i,e);let o=A();a=k.sanitizeText(a,o),t=k.sanitizeText(t,o),e=e==null?void 0:e.map(s=>k.sanitizeText(s,o));let c={id:a||n.records.seq+"-"+z(),message:t,seq:n.records.seq++,type:i??p.NORMAL,tags:e??[],parents:n.records.head==null?[]:[n.records.head.id],branch:n.records.currBranch};n.records.head=c,u.info("main branch",o.mainBranchName),n.records.commits.has(c.id)&&u.warn(`Commit ID ${c.id} already exists`),n.records.commits.set(c.id,c),n.records.branches.set(n.records.currBranch,c.id),u.debug("in pushCommit "+c.id)},"commit"),bt=h(function(r){let t=r.name,a=r.order;if(t=k.sanitizeText(t,A()),n.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);n.records.branches.set(t,n.records.head==null?null:n.records.head.id),n.records.branchConfig.set(t,{name:t,order:a}),_(t),u.debug("in createBranch")},"branch"),wt=h(r=>{let t=r.branch,a=r.id,i=r.type,e=r.tags,o=A();t=k.sanitizeText(t,o),a&&(a=k.sanitizeText(a,o));let c=n.records.branches.get(n.records.currBranch),s=n.records.branches.get(t),m=c?n.records.commits.get(c):void 0,$=s?n.records.commits.get(s):void 0;if(m&&$&&m.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(n.records.currBranch===t){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(m===void 0||!m){let d=Error(`Incorrect usage of "merge". Current branch (${n.records.currBranch})has no commits`);throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},d}if(!n.records.branches.has(t)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},d}if($===void 0||!$){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},d}if(m===$){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(a&&n.records.commits.has(a)){let d=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,token:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${t} ${a}_UNIQUE ${i} ${e==null?void 0:e.join(" ")}`]},d}let l=s||"",y={id:a||`${n.records.seq}-${z()}`,message:`merged branch ${t} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,l],branch:n.records.currBranch,type:p.MERGE,customType:i,customId:!!a,tags:e??[]};n.records.head=y,n.records.commits.set(y.id,y),n.records.branches.set(n.records.currBranch,y.id),u.debug(n.records.branches),u.debug("in mergeBranch")},"merge"),Bt=h(function(r){let t=r.id,a=r.targetId,i=r.tags,e=r.parent;u.debug("Entering cherryPick:",t,a,i);let o=A();if(t=k.sanitizeText(t,o),a=k.sanitizeText(a,o),i=i==null?void 0:i.map(m=>k.sanitizeText(m,o)),e=k.sanitizeText(e,o),!t||!n.records.commits.has(t)){let m=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},m}let c=n.records.commits.get(t);if(c===void 0||!c)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=c.branch;if(c.type===p.MERGE&&!e)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!n.records.commits.has(a)){if(s===n.records.currBranch){let y=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let m=n.records.branches.get(n.records.currBranch);if(m===void 0||!m){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let $=n.records.commits.get(m);if($===void 0||!$){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let l={id:n.records.seq+"-"+z(),message:`cherry-picked ${c==null?void 0:c.message} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,c.id],branch:n.records.currBranch,type:p.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${e}`:""}`]};n.records.head=l,n.records.commits.set(l.id,l),n.records.branches.set(n.records.currBranch,l.id),u.debug(n.records.branches),u.debug("in cherryPick")}},"cherryPick"),_=h(function(r){if(r=k.sanitizeText(r,A()),n.records.branches.has(r)){n.records.currBranch=r;let t=n.records.branches.get(n.records.currBranch);t===void 0||!t?n.records.head=null:n.records.head=n.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw t.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},t}},"checkout");function D(r,t,a){let i=r.indexOf(t);i===-1?r.push(a):r.splice(i,1,a)}h(D,"upsert");function N(r){let t=r.reduce((e,o)=>e.seq>o.seq?e:o,r[0]),a="";r.forEach(function(e){e===t?a+=" *":a+=" |"});let i=[a,t.id,t.seq];for(let e in n.records.branches)n.records.branches.get(e)===t.id&&i.push(e);if(u.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let e=n.records.commits.get(t.parents[0]);D(r,t,e),t.parents[1]&&r.push(n.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let e=n.records.commits.get(t.parents[0]);D(r,t,e)}}r=j(r,e=>e.id),N(r)}h(N,"prettyPrintCommitHistory");var Et=h(function(){u.debug(n.records.commits);let r=K()[0];N([r])},"prettyPrint"),Ct=h(function(){n.reset(),st()},"clear"),kt=h(function(){return[...n.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Lt=h(function(){return n.records.branches},"getBranches"),Tt=h(function(){return n.records.commits},"getCommits"),K=h(function(){let r=[...n.records.commits.values()];return r.forEach(function(t){u.debug(t.id)}),r.sort((t,a)=>t.seq-a.seq),r},"getCommitsArray"),F={commitType:p,getConfig:A,setDirection:pt,setOptions:xt,getOptions:ft,commit:ut,branch:bt,merge:wt,cherryPick:Bt,checkout:_,prettyPrint:Et,clear:Ct,getBranchesAsObjArray:kt,getBranches:Lt,getCommits:Tt,getCommitsArray:K,getCurrentBranch:h(function(){return n.records.currBranch},"getCurrentBranch"),getDirection:h(function(){return n.records.direction},"getDirection"),getHead:h(function(){return n.records.head},"getHead"),setAccTitle:rt,getAccTitle:dt,getAccDescription:it,setAccDescription:mt,setDiagramTitle:ot,getDiagramTitle:et},Mt=h((r,t)=>{lt(r,t),r.dir&&t.setDirection(r.dir);for(let a of r.statements)vt(a,t)},"populate"),vt=h((r,t)=>{let a={Commit:h(i=>t.commit(Pt(i)),"Commit"),Branch:h(i=>t.branch(Rt(i)),"Branch"),Merge:h(i=>t.merge(At(i)),"Merge"),Checkout:h(i=>t.checkout(Gt(i)),"Checkout"),CherryPicking:h(i=>t.cherryPick(Ot(i)),"CherryPicking")}[r.$type];a?a(r):u.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),Pt=h(r=>({id:r.id,msg:r.message??"",type:r.type===void 0?p.NORMAL:p[r.type],tags:r.tags??void 0}),"parseCommit"),Rt=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),At=h(r=>({branch:r.branch,id:r.id??"",type:r.type===void 0?void 0:p[r.type],tags:r.tags??void 0}),"parseMerge"),Gt=h(r=>r.branch,"parseCheckout"),Ot=h(r=>{var t;return{id:r.id,targetId:"",tags:((t=r.tags)==null?void 0:t.length)===0?void 0:r.tags,parent:r.parent}},"parseCherryPicking"),It={parse:h(async r=>{let t=await $t("gitGraph",r);u.debug(t),Mt(t,F)},"parse")},f=(J=ct())==null?void 0:J.gitGraph,v=10,P=40,L=4,T=2,G=8,E=new Map,C=new Map,H=30,I=new Map,S=[],R=0,g="LR",qt=h(()=>{E.clear(),C.clear(),I.clear(),R=0,S=[],g="LR"},"clear"),Y=h(r=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(a=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=a.trim(),t.appendChild(i)}),t},"drawText"),U=h(r=>{let t,a,i;return g==="BT"?(a=h((e,o)=>e<=o,"comparisonFunc"),i=1/0):(a=h((e,o)=>e>=o,"comparisonFunc"),i=0),r.forEach(e=>{var c,s;let o=g==="TB"||g=="BT"?(c=C.get(e))==null?void 0:c.y:(s=C.get(e))==null?void 0:s.x;o!==void 0&&a(o,i)&&(t=e,i=o)}),t},"findClosestParent"),zt=h(r=>{let t="",a=1/0;return r.forEach(i=>{let e=C.get(i).y;e<=a&&(t=i,a=e)}),t||void 0},"findClosestParentBT"),Ht=h((r,t,a)=>{let i=a,e=a,o=[];r.forEach(c=>{let s=t.get(c);if(!s)throw Error(`Commit not found for key ${c}`);s.parents.length?(i=Dt(s),e=Math.max(i,e)):o.push(s),Nt(s,i)}),i=e,o.forEach(c=>{Wt(c,i,a)}),r.forEach(c=>{let s=t.get(c);if(s!=null&&s.parents.length){let m=zt(s.parents);i=C.get(m).y-P,i<=e&&(e=i);let $=E.get(s.branch).pos,l=i-v;C.set(s.id,{x:$,y:l})}})},"setParallelBTPos"),St=h(r=>{var i;let t=U(r.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${r.id}`);let a=(i=C.get(t))==null?void 0:i.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${r.id}`);return a},"findClosestParentPos"),Dt=h(r=>St(r)+P,"calculateCommitPosition"),Nt=h((r,t)=>{let a=E.get(r.branch);if(!a)throw Error(`Branch not found for commit ${r.id}`);let i=a.pos,e=t+v;return C.set(r.id,{x:i,y:e}),{x:i,y:e}},"setCommitPosition"),Wt=h((r,t,a)=>{let i=E.get(r.branch);if(!i)throw Error(`Branch not found for commit ${r.id}`);let e=t+a,o=i.pos;C.set(r.id,{x:o,y:e})},"setRootPosition"),jt=h((r,t,a,i,e,o)=>{if(o===p.HIGHLIGHT)r.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${e%G} ${i}-outer`),r.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${e%G} ${i}-inner`);else if(o===p.CHERRY_PICK)r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.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 ${t.id} ${i}`),r.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 ${t.id} ${i}`);else{let c=r.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${e%G}`),o===p.MERGE){let s=r.append("circle");s.attr("cx",a.x),s.attr("cy",a.y),s.attr("r",6),s.attr("class",`commit ${i} ${t.id} commit${e%G}`)}o===p.REVERSE&&r.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 ${i} ${t.id} commit${e%G}`)}},"drawCommitBullet"),_t=h((r,t,a,i)=>{var e;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){let o=r.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),s=o.append("text").attr("x",i).attr("y",a.y+25).attr("class","commit-label").text(t.id),m=(e=s.node())==null?void 0:e.getBBox();if(m&&(c.attr("x",a.posWithOffset-m.width/2-T).attr("y",a.y+13.5).attr("width",m.width+2*T).attr("height",m.height+2*T),g==="TB"||g==="BT"?(c.attr("x",a.x-(m.width+4*L+5)).attr("y",a.y-12),s.attr("x",a.x-(m.width+4*L)).attr("y",a.y+m.height-12)):s.attr("x",a.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let $=-7.5-(m.width+10)/25*9.5,l=10+m.width/25*8.5;o.attr("transform","translate("+$+", "+l+") rotate(-45, "+i+", "+a.y+")")}}},"drawCommitLabel"),Kt=h((r,t,a,i)=>{var e;if(t.tags.length>0){let o=0,c=0,s=0,m=[];for(let $ of t.tags.reverse()){let l=r.insert("polygon"),y=r.append("circle"),d=r.append("text").attr("y",a.y-16-o).attr("class","tag-label").text($),x=(e=d.node())==null?void 0:e.getBBox();if(!x)throw Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),d.attr("x",a.posWithOffset-x.width/2),m.push({tag:d,hole:y,rect:l,yOffset:o}),o+=20}for(let{tag:$,hole:l,rect:y,yOffset:d}of m){let x=s/2,b=a.y-19.2-d;if(y.attr("class","tag-label-bkg").attr("points",`
${i-c/2-L/2},${b+T}
${i-c/2-L/2},${b-T}
${a.posWithOffset-c/2-L},${b-x-T}
${a.posWithOffset+c/2+L},${b-x-T}
${a.posWithOffset+c/2+L},${b+x+T}
${a.posWithOffset-c/2-L},${b+x+T}`),l.attr("cy",b).attr("cx",i-c/2+L/2).attr("r",1.5).attr("class","tag-hole"),g==="TB"||g==="BT"){let w=i+d;y.attr("class","tag-label-bkg").attr("points",`
${a.x},${w+2}
${a.x},${w-2}
${a.x+v},${w-x-2}
${a.x+v+c+4},${w-x-2}
${a.x+v+c+4},${w+x+2}
${a.x+v},${w+x+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+i+")"),l.attr("cx",a.x+L/2).attr("cy",w).attr("transform","translate(12,12) rotate(45, "+a.x+","+i+")"),$.attr("x",a.x+5).attr("y",w+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+i+")")}}}},"drawCommitTags"),Ft=h(r=>{switch(r.customType??r.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Yt=h((r,t,a,i)=>{let e={x:0,y:0};if(r.parents.length>0){let o=U(r.parents);if(o){let c=i.get(o)??e;return t==="TB"?c.y+P:t==="BT"?(i.get(r.id)??e).y-P:c.x+P}}else return t==="TB"?H:t==="BT"?(i.get(r.id)??e).y-P:0;return 0},"calculatePosition"),Ut=h((r,t,a)=>{var c,s;let i=g==="BT"&&a?t:t+v,e=g==="TB"||g==="BT"?i:(c=E.get(r.branch))==null?void 0:c.pos,o=g==="TB"||g==="BT"?(s=E.get(r.branch))==null?void 0:s.pos:i;if(o===void 0||e===void 0)throw Error(`Position were undefined for commit ${r.id}`);return{x:o,y:e,posWithOffset:i}},"getCommitPosition"),V=h((r,t,a)=>{if(!f)throw Error("GitGraph config not found");let i=r.append("g").attr("class","commit-bullets"),e=r.append("g").attr("class","commit-labels"),o=g==="TB"||g==="BT"?H:0,c=[...t.keys()],s=(f==null?void 0:f.parallelCommits)??!1,m=h((l,y)=>{var b,w;let d=(b=t.get(l))==null?void 0:b.seq,x=(w=t.get(y))==null?void 0:w.seq;return d!==void 0&&x!==void 0?d-x:0},"sortKeys"),$=c.sort(m);g==="BT"&&(s&&Ht($,t,o),$=$.reverse()),$.forEach(l=>{var x;let y=t.get(l);if(!y)throw Error(`Commit not found for key ${l}`);s&&(o=Yt(y,g,o,C));let d=Ut(y,o,s);if(a){let b=Ft(y),w=y.customType??y.type;jt(i,y,d,b,((x=E.get(y.branch))==null?void 0:x.index)??0,w),_t(e,y,d,o),Kt(e,y,d,o)}g==="TB"||g==="BT"?C.set(y.id,{x:d.x,y:d.posWithOffset}):C.set(y.id,{x:d.posWithOffset,y:d.y}),o=g==="BT"&&s?o+P:o+P+v,o>R&&(R=o)})},"drawCommits"),Vt=h((r,t,a,i,e)=>{let o=(g==="TB"||g==="BT"?a.x<i.x:a.y<i.y)?t.branch:r.branch,c=h(m=>m.branch===o,"isOnBranchToGetCurve"),s=h(m=>m.seq>r.seq&&m.seq<t.seq,"isBetweenCommits");return[...e.values()].some(m=>s(m)&&c(m))},"shouldRerouteArrow"),q=h((r,t,a=0)=>{let i=r+Math.abs(r-t)/2;return a>5?i:S.every(e=>Math.abs(e-i)>=10)?(S.push(i),i):q(r,t-Math.abs(r-t)/5,a+1)},"findLane"),Jt=h((r,t,a,i)=>{var x,b,w,O,W;let e=C.get(t.id),o=C.get(a.id);if(e===void 0||o===void 0)throw Error(`Commit positions not found for commits ${t.id} and ${a.id}`);let c=Vt(t,a,e,o,i),s="",m="",$=0,l=0,y=(x=E.get(a.branch))==null?void 0:x.index;a.type===p.MERGE&&t.id!==a.parents[0]&&(y=(b=E.get(t.branch))==null?void 0:b.index);let d;if(c){s="A 10 10, 0, 0, 0,",m="A 10 10, 0, 0, 1,",$=10,l=10;let M=e.y<o.y?q(e.y,o.y):q(o.y,e.y),B=e.x<o.x?q(e.x,o.x):q(o.x,e.x);g==="TB"?e.x<o.x?d=`M ${e.x} ${e.y} L ${B-$} ${e.y} ${m} ${B} ${e.y+l} L ${B} ${o.y-$} ${s} ${B+l} ${o.y} L ${o.x} ${o.y}`:(y=(w=E.get(t.branch))==null?void 0:w.index,d=`M ${e.x} ${e.y} L ${B+$} ${e.y} ${s} ${B} ${e.y+l} L ${B} ${o.y-$} ${m} ${B-l} ${o.y} L ${o.x} ${o.y}`):g==="BT"?e.x<o.x?d=`M ${e.x} ${e.y} L ${B-$} ${e.y} ${s} ${B} ${e.y-l} L ${B} ${o.y+$} ${m} ${B+l} ${o.y} L ${o.x} ${o.y}`:(y=(O=E.get(t.branch))==null?void 0:O.index,d=`M ${e.x} ${e.y} L ${B+$} ${e.y} ${m} ${B} ${e.y-l} L ${B} ${o.y+$} ${s} ${B-l} ${o.y} L ${o.x} ${o.y}`):e.y<o.y?d=`M ${e.x} ${e.y} L ${e.x} ${M-$} ${s} ${e.x+l} ${M} L ${o.x-$} ${M} ${m} ${o.x} ${M+l} L ${o.x} ${o.y}`:(y=(W=E.get(t.branch))==null?void 0:W.index,d=`M ${e.x} ${e.y} L ${e.x} ${M+$} ${m} ${e.x+l} ${M} L ${o.x-$} ${M} ${s} ${o.x} ${M-l} L ${o.x} ${o.y}`)}else s="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",$=20,l=20,g==="TB"?(e.x<o.x&&(d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${e.x} ${o.y-$} ${s} ${e.x+l} ${o.y} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${m} ${o.x} ${e.y+l} L ${o.x} ${o.y}`),e.x>o.x&&(s="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",$=20,l=20,d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${e.x} ${o.y-$} ${m} ${e.x-l} ${o.y} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${o.x+$} ${e.y} ${s} ${o.x} ${e.y+l} L ${o.x} ${o.y}`),e.x===o.x&&(d=`M ${e.x} ${e.y} L ${o.x} ${o.y}`)):g==="BT"?(e.x<o.x&&(d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${e.x} ${o.y+$} ${m} ${e.x+l} ${o.y} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${s} ${o.x} ${e.y-l} L ${o.x} ${o.y}`),e.x>o.x&&(s="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",$=20,l=20,d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${e.x} ${o.y+$} ${s} ${e.x-l} ${o.y} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${s} ${o.x} ${e.y-l} L ${o.x} ${o.y}`),e.x===o.x&&(d=`M ${e.x} ${e.y} L ${o.x} ${o.y}`)):(e.y<o.y&&(d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${m} ${o.x} ${e.y+l} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${e.x} ${o.y-$} ${s} ${e.x+l} ${o.y} L ${o.x} ${o.y}`),e.y>o.y&&(d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${s} ${o.x} ${e.y-l} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${e.x} ${o.y+$} ${m} ${e.x+l} ${o.y} L ${o.x} ${o.y}`),e.y===o.y&&(d=`M ${e.x} ${e.y} L ${o.x} ${o.y}`));if(d===void 0)throw Error("Line definition not found");r.append("path").attr("d",d).attr("class","arrow arrow"+y%G)},"drawArrow"),Qt=h((r,t)=>{let a=r.append("g").attr("class","commit-arrows");[...t.keys()].forEach(i=>{let e=t.get(i);e.parents&&e.parents.length>0&&e.parents.forEach(o=>{Jt(a,t.get(o),e,t)})})},"drawArrows"),Xt=h((r,t)=>{let a=r.append("g");t.forEach((i,e)=>{var x;let o=e%G,c=(x=E.get(i.name))==null?void 0:x.pos;if(c===void 0)throw Error(`Position not found for branch ${i.name}`);let s=a.append("line");s.attr("x1",0),s.attr("y1",c),s.attr("x2",R),s.attr("y2",c),s.attr("class","branch branch"+o),g==="TB"?(s.attr("y1",H),s.attr("x1",c),s.attr("y2",R),s.attr("x2",c)):g==="BT"&&(s.attr("y1",R),s.attr("x1",c),s.attr("y2",H),s.attr("x2",c)),S.push(c);let m=i.name,$=Y(m),l=a.insert("rect"),y=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+o);y.node().appendChild($);let d=$.getBBox();l.attr("class","branchLabelBkg label"+o).attr("rx",4).attr("ry",4).attr("x",-d.width-4-((f==null?void 0:f.rotateCommitLabel)===!0?30:0)).attr("y",-d.height/2+8).attr("width",d.width+18).attr("height",d.height+4),y.attr("transform","translate("+(-d.width-14-((f==null?void 0:f.rotateCommitLabel)===!0?30:0))+", "+(c-d.height/2-1)+")"),g==="TB"?(l.attr("x",c-d.width/2-10).attr("y",0),y.attr("transform","translate("+(c-d.width/2-5)+", 0)")):g==="BT"?(l.attr("x",c-d.width/2-10).attr("y",R),y.attr("transform","translate("+(c-d.width/2-5)+", "+R+")")):l.attr("transform","translate(-19, "+(c-d.height/2)+")")})},"drawBranches"),Zt=h(function(r,t,a,i,e){return E.set(r,{pos:t,index:a}),t+=50+(e?40:0)+(g==="TB"||g==="BT"?i.width/2:0),t},"setBranchPosition"),tr={parser:It,db:F,renderer:{draw:h(function(r,t,a,i){if(qt(),u.debug("in gitgraph renderer",r+`
`,"id:",t,a),!f)throw Error("GitGraph config not found");let e=f.rotateCommitLabel??!1,o=i.db;I=o.getCommits();let c=o.getBranchesAsObjArray();g=o.getDirection();let s=Q(`[id="${t}"]`),m=0;c.forEach(($,l)=>{var O;let y=Y($.name),d=s.append("g"),x=d.insert("g").attr("class","branchLabel"),b=x.insert("g").attr("class","label branch-label");(O=b.node())==null||O.appendChild(y);let w=y.getBBox();m=Zt($.name,m,l,w,e),b.remove(),x.remove(),d.remove()}),V(s,I,!1),f.showBranches&&Xt(s,c),Qt(s,I),V(s,I,!0),X.insertTitle(s,"gitTitleText",f.titleTopMargin??0,o.getDiagramTitle()),at(void 0,s,f.diagramPadding,f.useMaxWidth)},"draw")},styles:h(r=>`
.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(t=>`
.branch-label${t} { fill: ${r["gitBranchLabel"+t]}; }
.commit${t} { stroke: ${r["git"+t]}; fill: ${r["git"+t]}; }
.commit-highlight${t} { stroke: ${r["gitInv"+t]}; fill: ${r["gitInv"+t]}; }
.label${t} { fill: ${r["git"+t]}; }
.arrow${t} { stroke: ${r["git"+t]}; }
`).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${r.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
.commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
.tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
.tag-hole { fill: ${r.textColor}; }
.commit-merge {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
}
.commit-reverse {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
.gitTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${r.textColor};
}
`,"getStyles")};export{tr as diagram};

Sorry, the diff of this file is too big to display

import{i as r}from"./useEvent-BhXAndur.js";import{l as o}from"./switch-dWLWbbtg.js";const m=()=>r.get(o),n=()=>{let e=document.querySelector("marimo-code");if(!e)return;let t=e.innerHTML;return decodeURIComponent(t).trim()};export{m as n,n as t};
function c(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var b=c("abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws trait transient try void volatile while"),g=c("catch class def do else enum finally for if interface switch trait try while"),w=c("return break continue"),z=c("null true false this"),i;function m(e,t){var n=e.next();if(n=='"'||n=="'")return h(n,e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return i=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),e.eat(/eE/)&&(e.eat(/\+\-/),e.eatWhile(/\d/)),"number";if(n=="/"){if(e.eat("*"))return t.tokenize.push(y),y(e,t);if(e.eat("/"))return e.skipToEnd(),"comment";if(k(t.lastToken,!1))return h(n,e,t)}if(n=="-"&&e.eat(">"))return i="->",null;if(/[+\-*&%=<>!?|\/~]/.test(n))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),n=="@")return e.eatWhile(/[\w\$_\.]/),"meta";if(t.lastToken==".")return"property";if(e.eat(":"))return i="proplabel","property";var r=e.current();return z.propertyIsEnumerable(r)?"atom":b.propertyIsEnumerable(r)?(g.propertyIsEnumerable(r)?i="newstatement":w.propertyIsEnumerable(r)&&(i="standalone"),"keyword"):"variable"}m.isBase=!0;function h(e,t,n){var r=!1;if(e!="/"&&t.eat(e))if(t.eat(e))r=!0;else return"string";function a(o,p){for(var l=!1,u,d=!r;(u=o.next())!=null;){if(u==e&&!l){if(!r)break;if(o.match(e+e)){d=!0;break}}if(e=='"'&&u=="$"&&!l){if(o.eat("{"))return p.tokenize.push(x()),"string";if(o.match(/^\w/,!1))return p.tokenize.push(T),"string"}l=!l&&u=="\\"}return d&&p.tokenize.pop(),"string"}return n.tokenize.push(a),a(t,n)}function x(){var e=1;function t(n,r){if(n.peek()=="}"){if(e--,e==0)return r.tokenize.pop(),r.tokenize[r.tokenize.length-1](n,r)}else n.peek()=="{"&&e++;return m(n,r)}return t.isBase=!0,t}function T(e,t){var n=e.match(/^(\.|[\w\$_]+)/);return(!n||!e.match(n[0]=="."?/^[\w$_]/:/^\./))&&t.tokenize.pop(),n?n[0]=="."?null:"variable":t.tokenize[t.tokenize.length-1](e,t)}function y(e,t){for(var n=!1,r;r=e.next();){if(r=="/"&&n){t.tokenize.pop();break}n=r=="*"}return"comment"}function k(e,t){return!e||e=="operator"||e=="->"||/[\.\[\{\(,;:]/.test(e)||e=="newstatement"||e=="keyword"||e=="proplabel"||e=="standalone"&&!t}function v(e,t,n,r,a){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=a}function f(e,t,n){return e.context=new v(e.indented,t,n,null,e.context)}function s(e){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const E={name:"groovy",startState:function(e){return{tokenize:[m],context:new v(-e,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(n.align??(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,n.type=="statement"&&!k(t.lastToken,!0)&&(s(t),n=t.context)),e.eatSpace())return null;i=null;var r=t.tokenize[t.tokenize.length-1](e,t);if(r=="comment")return r;if(n.align??(n.align=!0),(i==";"||i==":")&&n.type=="statement")s(t);else if(i=="->"&&n.type=="statement"&&n.prev.type=="}")s(t),t.context.align=!1;else if(i=="{")f(t,e.column(),"}");else if(i=="[")f(t,e.column(),"]");else if(i=="(")f(t,e.column(),")");else if(i=="}"){for(;n.type=="statement";)n=s(t);for(n.type=="}"&&(n=s(t));n.type=="statement";)n=s(t)}else i==n.type?s(t):(n.type=="}"||n.type=="top"||n.type=="statement"&&i=="newstatement")&&f(t,e.column(),"statement");return t.startOfLine=!1,t.lastToken=i||r,r},indent:function(e,t,n){if(!e.tokenize[e.tokenize.length-1].isBase)return null;var r=t&&t.charAt(0),a=e.context;a.type=="statement"&&!k(e.lastToken,!0)&&(a=a.prev);var o=r==a.type;return a.type=="statement"?a.indented+(r=="{"?0:n.unit):a.align?a.column+(o?0:1):a.indented+(o?0:n.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}};export{E as t};
import{t as o}from"./groovy-9JiNA9gq.js";export{o as groovy};
function o(e,r,t){return r(t),t(e,r)}var p=/[a-z_]/,g=/[A-Z]/,l=/\d/,v=/[0-9A-Fa-f]/,F=/[0-7]/,u=/[a-z_A-Z0-9'\xa1-\uffff]/,s=/[-!#$%&*+.\/<=>?@\\^|~:]/,w=/[(),;[\]`{}]/,c=/[ \t\v\f]/;function i(e,r){if(e.eatWhile(c))return null;var t=e.next();if(w.test(t)){if(t=="{"&&e.eat("-")){var n="comment";return e.eat("#")&&(n="meta"),o(e,r,d(n,1))}return null}if(t=="'")return e.eat("\\"),e.next(),e.eat("'")?"string":"error";if(t=='"')return o(e,r,m);if(g.test(t))return e.eatWhile(u),e.eat(".")?"qualifier":"type";if(p.test(t))return e.eatWhile(u),"variable";if(l.test(t)){if(t=="0"){if(e.eat(/[xX]/))return e.eatWhile(v),"integer";if(e.eat(/[oO]/))return e.eatWhile(F),"number"}e.eatWhile(l);var n="number";return e.match(/^\.\d+/)&&(n="number"),e.eat(/[eE]/)&&(n="number",e.eat(/[-+]/),e.eatWhile(l)),n}return t=="."&&e.eat(".")?"keyword":s.test(t)?t=="-"&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(s))?(e.skipToEnd(),"comment"):(e.eatWhile(s),"variable"):"error"}function d(e,r){return r==0?i:function(t,n){for(var a=r;!t.eol();){var f=t.next();if(f=="{"&&t.eat("-"))++a;else if(f=="-"&&t.eat("}")&&(--a,a==0))return n(i),e}return n(d(e,a)),e}}function m(e,r){for(;!e.eol();){var t=e.next();if(t=='"')return r(i),"string";if(t=="\\"){if(e.eol()||e.eat(c))return r(x),"string";e.eat("&")||e.next()}}return r(i),"error"}function x(e,r){return e.eat("\\")?o(e,r,m):(e.next(),r(i),"error")}var h=(function(){var e={};function r(t){return function(){for(var n=0;n<arguments.length;n++)e[arguments[n]]=t}}return r("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_"),r("keyword")("..",":","::","=","\\","<-","->","@","~","=>"),r("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),r("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),r("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3"),e})();const b={name:"haskell",startState:function(){return{f:i}},copyState:function(e){return{f:e.f}},token:function(e,r){var t=r.f(e,function(a){r.f=a}),n=e.current();return h.hasOwnProperty(n)?h[n]:t},languageData:{commentTokens:{line:"--",block:{open:"{-",close:"-}"}}}};export{b as t};
import{t as a}from"./haskell-CKr_RZFK.js";export{a as haskell};
import{n as a,t as e}from"./haxe-DsAAHfaR.js";export{e as haxe,a as hxml};
function l(t){return{type:t,style:"keyword"}}var _=l("keyword a"),z=l("keyword b"),k=l("keyword c"),M=l("operator"),T={type:"atom",style:"atom"},g={type:"attribute",style:"attribute"},f=l("typedef"),I={if:_,while:_,else:z,do:z,try:z,return:k,break:k,continue:k,new:k,throw:k,var:l("var"),inline:g,static:g,using:l("import"),public:g,private:g,cast:l("cast"),import:l("import"),macro:l("macro"),function:l("function"),catch:l("catch"),untyped:l("untyped"),callback:l("cb"),for:l("for"),switch:l("switch"),case:l("case"),default:l("default"),in:M,never:l("property_access"),trace:l("trace"),class:f,abstract:f,enum:f,interface:f,typedef:f,extends:f,implements:f,dynamic:f,true:T,false:T,null:T},E=/[+\-*&%=<>!?|]/;function N(t,n,r){return n.tokenize=r,r(t,n)}function $(t,n){for(var r=!1,a;(a=t.next())!=null;){if(a==n&&!r)return!0;r=!r&&a=="\\"}}var f,B;function d(t,n,r){return f=t,B=r,n}function w(t,n){var r=t.next();if(r=='"'||r=="'")return N(t,n,Q(r));if(/[\[\]{}\(\),;\:\.]/.test(r))return d(r);if(r=="0"&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),d("number","number");if(/\d/.test(r)||r=="-"&&t.eat(/\d/))return t.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/),d("number","number");if(n.reAllowed&&r=="~"&&t.eat(/\//))return $(t,"/"),t.eatWhile(/[gimsu]/),d("regexp","string.special");if(r=="/")return t.eat("*")?N(t,n,R):t.eat("/")?(t.skipToEnd(),d("comment","comment")):(t.eatWhile(E),d("operator",null,t.current()));if(r=="#")return t.skipToEnd(),d("conditional","meta");if(r=="@")return t.eat(/:/),t.eatWhile(/[\w_]/),d("metadata","meta");if(E.test(r))return t.eatWhile(E),d("operator",null,t.current());var a;if(/[A-Z]/.test(r))return t.eatWhile(/[\w_<>]/),a=t.current(),d("type","type",a);t.eatWhile(/[\w_]/);var a=t.current(),i=I.propertyIsEnumerable(a)&&I[a];return i&&n.kwAllowed?d(i.type,i.style,a):d("variable","variable",a)}function Q(t){return function(n,r){return $(n,t)&&(r.tokenize=w),d("string","string")}}function R(t,n){for(var r=!1,a;a=t.next();){if(a=="/"&&r){n.tokenize=w;break}r=a=="*"}return d("comment","comment")}var F={atom:!0,number:!0,variable:!0,string:!0,regexp:!0};function j(t,n,r,a,i,s){this.indented=t,this.column=n,this.type=r,this.prev=i,this.info=s,a!=null&&(this.align=a)}function U(t,n){for(var r=t.localVars;r;r=r.next)if(r.name==n)return!0}function X(t,n,r,a,i){var s=t.cc;for(o.state=t,o.stream=i,o.marked=null,o.cc=s,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((s.length?s.pop():y)(r,a)){for(;s.length&&s[s.length-1].lex;)s.pop()();return o.marked?o.marked:r=="variable"&&U(t,a)?"variableName.local":r=="variable"&&Y(t,a)?"variableName.special":n}}function Y(t,n){if(/[a-z]/.test(n.charAt(0)))return!1;for(var r=t.importedtypes.length,a=0;a<r;a++)if(t.importedtypes[a]==n)return!0}function q(t){for(var n=o.state,r=n.importedtypes;r;r=r.next)if(r.name==t)return;n.importedtypes={name:t,next:n.importedtypes}}var o={state:null,column:null,marked:null,cc:null};function v(){for(var t=arguments.length-1;t>=0;t--)o.cc.push(arguments[t])}function e(){return v.apply(null,arguments),!0}function C(t,n){for(var r=n;r;r=r.next)if(r.name==t)return!0;return!1}function A(t){var n=o.state;if(n.context){if(o.marked="def",C(t,n.localVars))return;n.localVars={name:t,next:n.localVars}}else if(n.globalVars){if(C(t,n.globalVars))return;n.globalVars={name:t,next:n.globalVars}}}var tt={name:"this",next:null};function D(){o.state.context||(o.state.localVars=tt),o.state.context={prev:o.state.context,vars:o.state.localVars}}function V(){o.state.localVars=o.state.context.vars,o.state.context=o.state.context.prev}V.lex=!0;function c(t,n){var r=function(){var a=o.state;a.lexical=new j(a.indented,o.stream.column(),t,null,a.lexical,n)};return r.lex=!0,r}function u(){var t=o.state;t.lexical.prev&&(t.lexical.type==")"&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}u.lex=!0;function p(t){function n(r){return r==t?e():t==";"?v():e(n)}return n}function y(t){return t=="@"?e(H):t=="var"?e(c("vardef"),P,p(";"),u):t=="keyword a"?e(c("form"),m,y,u):t=="keyword b"?e(c("form"),y,u):t=="{"?e(c("}"),D,Z,u,V):t==";"?e():t=="attribute"?e(G):t=="function"?e(x):t=="for"?e(c("form"),p("("),c(")"),ot,p(")"),u,y,u):t=="variable"?e(c("stat"),et):t=="switch"?e(c("form"),m,c("}","switch"),p("{"),Z,u,u):t=="case"?e(m,p(":")):t=="default"?e(p(":")):t=="catch"?e(c("form"),D,p("("),L,p(")"),y,u,V):t=="import"?e(J,p(";")):t=="typedef"?e(rt):v(c("stat"),m,p(";"),u)}function m(t){return F.hasOwnProperty(t)||t=="type"?e(b):t=="function"?e(x):t=="keyword c"?e(O):t=="("?e(c(")"),O,p(")"),u,b):t=="operator"?e(m):t=="["?e(c("]"),h(O,"]"),u,b):t=="{"?e(c("}"),h(it,"}"),u,b):e()}function O(t){return t.match(/[;\}\)\],]/)?v():v(m)}function b(t,n){if(t=="operator"&&/\+\+|--/.test(n))return e(b);if(t=="operator"||t==":")return e(m);if(t!=";"){if(t=="(")return e(c(")"),h(m,")"),u,b);if(t==".")return e(at,b);if(t=="[")return e(c("]"),m,p("]"),u,b)}}function G(t){if(t=="attribute")return e(G);if(t=="function")return e(x);if(t=="var")return e(P)}function H(t){if(t==":"||t=="variable")return e(H);if(t=="(")return e(c(")"),h(nt,")"),u,y)}function nt(t){if(t=="variable")return e()}function J(t,n){if(t=="variable"&&/[A-Z]/.test(n.charAt(0)))return q(n),e();if(t=="variable"||t=="property"||t=="."||n=="*")return e(J)}function rt(t,n){if(t=="variable"&&/[A-Z]/.test(n.charAt(0)))return q(n),e();if(t=="type"&&/[A-Z]/.test(n.charAt(0)))return e()}function et(t){return t==":"?e(u,y):v(b,p(";"),u)}function at(t){if(t=="variable")return o.marked="property",e()}function it(t){if(t=="variable"&&(o.marked="property"),F.hasOwnProperty(t))return e(p(":"),m)}function h(t,n){function r(a){return a==","?e(t,r):a==n?e():e(p(n))}return function(a){return a==n?e():v(t,r)}}function Z(t){return t=="}"?e():v(y,Z)}function P(t,n){return t=="variable"?(A(n),e(S,K)):e()}function K(t,n){if(n=="=")return e(m,K);if(t==",")return e(P)}function ot(t,n){return t=="variable"?(A(n),e(ut,m)):v()}function ut(t,n){if(n=="in")return e()}function x(t,n){if(t=="variable"||t=="type")return A(n),e(x);if(n=="new")return e(x);if(t=="(")return e(c(")"),D,h(L,")"),u,S,y,V)}function S(t){if(t==":")return e(lt)}function lt(t){if(t=="type"||t=="variable")return e();if(t=="{")return e(c("}"),h(ct,"}"),u)}function ct(t){if(t=="variable")return e(S)}function L(t,n){if(t=="variable")return A(n),e(S)}const ft={name:"haxe",startState:function(t){return{tokenize:w,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new j(-t,0,"block",!1),importedtypes:["Int","Float","String","Void","Std","Bool","Dynamic","Array"],context:null,indented:0}},token:function(t,n){if(t.sol()&&(n.lexical.hasOwnProperty("align")||(n.lexical.align=!1),n.indented=t.indentation()),t.eatSpace())return null;var r=n.tokenize(t,n);return f=="comment"?r:(n.reAllowed=!!(f=="operator"||f=="keyword c"||f.match(/^[\[{}\(,;:]$/)),n.kwAllowed=f!=".",X(n,r,f,B,t))},indent:function(t,n,r){if(t.tokenize!=w)return 0;var a=n&&n.charAt(0),i=t.lexical;i.type=="stat"&&a=="}"&&(i=i.prev);var s=i.type,W=a==s;return s=="vardef"?i.indented+4:s=="form"&&a=="{"?i.indented:s=="stat"||s=="form"?i.indented+r.unit:i.info=="switch"&&!W?i.indented+(/^(?:case|default)\b/.test(n)?r.unit:2*r.unit):i.align?i.column+(W?0:1):i.indented+(W?0:r.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}},st={name:"hxml",startState:function(){return{define:!1,inString:!1}},token:function(t,n){var i=t.peek(),r=t.sol();if(i=="#")return t.skipToEnd(),"comment";if(r&&i=="-"){var a="variable-2";return t.eat(/-/),t.peek()=="-"&&(t.eat(/-/),a="keyword a"),t.peek()=="D"&&(t.eat(/[D]/),a="keyword c",n.define=!0),t.eatWhile(/[A-Z]/i),a}var i=t.peek();return n.inString==0&&i=="'"&&(n.inString=!0,t.next()),n.inString==1?(t.skipTo("'")||t.skipToEnd(),t.peek()=="'"&&(t.next(),n.inString=!1),"string"):(t.next(),null)},languageData:{commentTokens:{line:"#"}}};export{st as n,ft as t};
import{s as Z}from"./chunk-LvLJmgfZ.js";import{d as xe,l as ee}from"./useEvent-BhXAndur.js";import{t as ge}from"./react-Bj1aDYRI.js";import{$n as ye,Hn as te,Kn as je,Qn as be,St as ve,Wn as we,Xr as re,fi as ke,gn as ae}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as oe}from"./compiler-runtime-B3qBwwSJ.js";import{a as Ne,f as _e}from"./hotkeys-BHHWjLlp.js";import{n as A}from"./constants-B6Cb__3x.js";import{t as Se}from"./ErrorBoundary-B9Ifj8Jf.js";import{t as ze}from"./jsx-runtime-ZmTK25f3.js";import{t as E}from"./button-CZ3Cs4qb.js";import{t as Ce}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{r as U}from"./requests-B4FYHTZl.js";import{t as W}from"./createLucideIcon-BCdY6lG5.js";import{t as Me}from"./chart-no-axes-column-qvVRjhv1.js";import{r as Ie}from"./x-ZP5cObgf.js";import{t as De}from"./chevron-right--18M_6o9.js";import{f as B,p as Pe,r as Oe,t as se}from"./maps-D2_Mq1pZ.js";import{t as Te}from"./circle-play-EowqxNIC.js";import{a as Re,p as Ae,r as We,t as Fe}from"./dropdown-menu-ldcmQvIV.js";import{r as Le,t as $e}from"./types-BRfQN3HL.js";import{t as He}from"./file-Ch78NKWp.js";import{i as Ee,n as Ue,r as Ve,t as Ye}from"./youtube--tNPNRy6.js";import{t as qe}from"./link-DxicfMbs.js";import{t as J}from"./spinner-DA8-7wQv.js";import{n as Be,r as Je,t as Qe}from"./app-config-button-DMsJtN9b.js";import{t as Ge}from"./refresh-ccw-DN_xCV6A.js";import{lt as Ke,r as Xe}from"./input-DUrq2DiR.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import{t as Ze}from"./use-toast-BDYuj3zG.js";import{n as ie}from"./paths-BzSgteR-.js";import{c as le,n as et,o as tt,t as rt}from"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import{t as at}from"./tooltip-CMQz28hC.js";import{i as ot}from"./dates-CrvjILe3.js";import{o as st}from"./alert-dialog-BW4srmS0.js";import{t as it}from"./context-BfYAMNLF.js";import"./popover-CH1FzjxU.js";import{n as lt}from"./ImperativeModal-BNN1HA7x.js";import{r as nt}from"./errors-TZBmrJmc.js";import{t as ct}from"./tree-B--q0-tu.js";import{t as ne}from"./error-banner-B9ts0mNl.js";import{n as Q,t as mt}from"./useAsyncData-BMGLSTg8.js";import{t as dt}from"./label-E64zk6_7.js";import{t as G}from"./icons-CCHmxi8d.js";import{t as ht}from"./links-DWIqY1l5.js";import"./Inputs-GV-aQbOR.js";import{t as pt}from"./useInterval-B-PjgTm9.js";var ft=W("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),ut=W("book-text",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]]),xt=W("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]),gt=W("orbit",[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]]),yt=W("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]),T=Z(ge(),1),K=oe(),a=Z(ze(),1),jt={intro:["Introduction",ft,"Get started with marimo basics"],dataflow:["Dataflow",ye,"Learn how cells interact with each other"],ui:["UI Elements",yt,"Create interactive UI components"],markdown:["Markdown",te,"Format text with parameterized markdown"],plots:["Plots",Me,"Create interactive visualizations"],sql:["SQL",we,"Query databases directly in marimo"],layout:["Layout",Ve,"Customize the layout of your cells' output"],fileformat:["File format",He,"Understand marimo's pure-Python file format"],"for-jupyter-users":["For Jupyter users",gt,"Transiting from Jupyter to marimo"],"markdown-format":["Markdown format",G,"Using marimo to edit markdown files"]};const bt=()=>{let e=(0,K.c)(6),{openTutorial:t}=U(),r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(xt,{className:"w-4 h-4 mr-2"}),e[0]=r):r=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(Ae,{asChild:!0,children:(0,a.jsxs)(E,{"data-testid":"open-tutorial-button",size:"xs",variant:"outline",children:[r,"Tutorials",(0,a.jsx)(Oe,{className:"w-3 h-3 ml-1"})]})}),e[1]=s):s=e[1];let o;e[2]===t?o=e[3]:(o=Ne.entries(jt).map(i=>{let[m,d]=i,[c,h,p]=d;return(0,a.jsxs)(Re,{onSelect:async()=>{let n=await t({tutorialId:m});n&&ht(n.path)},children:[(0,a.jsx)(h,{strokeWidth:1.5,className:"w-4 h-4 mr-3 self-start mt-1.5 text-muted-foreground"}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{children:c}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground pr-1",children:p})]})})]},m)}),e[2]=t,e[3]=o);let l;return e[4]===o?l=e[5]:(l=(0,a.jsxs)(Fe,{children:[s,(0,a.jsx)(We,{side:"bottom",align:"end",className:"print:hidden",children:o})]}),e[4]=o,e[5]=l),l};var vt=[{title:"Documentation",description:"Official marimo documentation and API reference",icon:be,url:A.docsPage},{title:"GitHub",description:"View source code, report issues, or contribute",icon:Ee,url:A.githubPage},{title:"Community",description:"Join the marimo Discord community",icon:Ue,url:A.discordLink},{title:"YouTube",description:"Watch tutorials and demos",icon:Ye,url:A.youtube},{title:"Changelog",description:"See what's new in marimo",icon:te,url:A.releasesPage}];const wt=()=>{let e=(0,K.c)(2),t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)(V,{Icon:qe,children:"Resources"}),e[0]=t):t=e[0];let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[t,(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:vt.map(kt)})]}),e[1]=r):r=e[1],r},V=e=>{let t=(0,K.c)(8),{Icon:r,control:s,children:o}=e,l;t[0]===r?l=t[1]:(l=(0,a.jsx)(r,{className:"h-5 w-5"}),t[0]=r,t[1]=l);let i;t[2]!==o||t[3]!==l?(i=(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-xl font-semibold text-muted-foreground select-none",children:[l,o]}),t[2]=o,t[3]=l,t[4]=i):i=t[4];let m;return t[5]!==s||t[6]!==i?(m=(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[i,s]}),t[5]=s,t[6]=i,t[7]=m):m=t[7],m};function kt(e){return(0,a.jsxs)("a",{href:e.url,target:"_blank",className:"flex items-start gap-3 py-3 px-3 rounded-lg border hover:bg-accent/20 transition-colors shadow-xs",children:[(0,a.jsx)(e.icon,{className:"w-5 h-5 mt-1.5 text-primary"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-medium",children:e.title}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:e.description})]})]},e.title)}const ce=T.createContext({runningNotebooks:new Map,setRunningNotebooks:_e.NOOP}),me=T.createContext(""),Nt=re("marimo:home:include-markdown",!1,ae,{getOnInit:!0}),de=re("marimo:home:expanded-folders",{},ae,{getOnInit:!0});var P=oe();function he(e){return`${rt()}-${encodeURIComponent(e)}`}var _t=()=>{let e=(0,P.c)(56),[t,r]=(0,T.useState)(0),{getRecentFiles:s,getRunningNotebooks:o}=U(),l;e[0]===s?l=e[1]:(l=()=>s(),e[0]=s,e[1]=l);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[2]=i):i=e[2];let m=Q(l,i),d,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{r(Tt)},c={delayMs:1e4,whenVisible:!0},e[3]=d,e[4]=c):(d=e[3],c=e[4]),pt(d,c);let h;e[5]===o?h=e[6]:(h=async()=>{let R=await o();return se.keyBy(R.files,Rt)},e[5]=o,e[6]=h);let p;e[7]===t?p=e[8]:(p=[t],e[7]=t,e[8]=p);let n=Q(h,p),f,x,u,g,w,y,b,v,k,N,_,z,S;if(e[9]!==m||e[10]!==n){k=Symbol.for("react.early_return_sentinel");e:{let R=mt(m,n);if(R.error)throw R.error;let X=R.data;if(!X){let H;e[24]===Symbol.for("react.memo_cache_sentinel")?(H=(0,a.jsx)(J,{centered:!0,size:"xlarge"}),e[24]=H):H=e[24],k=H;break e}let[ue,Y]=X;g=ue,u=T.Suspense,x=ce,b={runningNotebooks:Y,setRunningNotebooks:n.setData};let L,$;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=(0,a.jsx)(bt,{}),$=(0,a.jsx)(Qe,{showAppConfig:!1}),e[25]=L,e[26]=$):(L=e[25],$=e[26]);let q=`This will shutdown the notebook server and terminate all running notebooks (${Y.size}). You'll lose all data that's in memory.`;e[27]===q?v=e[28]:(v=(0,a.jsxs)("div",{className:"absolute top-3 right-5 flex gap-3 z-50",children:[L,$,(0,a.jsx)(Be,{description:q})]}),e[27]=q,e[28]=v),z="flex flex-col gap-6 max-w-6xl container pt-5 pb-20 z-10",e[29]===Symbol.for("react.memo_cache_sentinel")?(S=(0,a.jsx)("img",{src:"logo.png",alt:"marimo logo",className:"w-48 mb-2"}),w=(0,a.jsx)(Pt,{}),y=(0,a.jsx)(wt,{}),e[29]=w,e[30]=y,e[31]=S):(w=e[29],y=e[30],S=e[31]),f=pe,e[32]===Symbol.for("react.memo_cache_sentinel")?(N=(0,a.jsx)(V,{Icon:Te,children:"Running notebooks"}),e[32]=N):N=e[32],_=[...Y.values()]}e[9]=m,e[10]=n,e[11]=f,e[12]=x,e[13]=u,e[14]=g,e[15]=w,e[16]=y,e[17]=b,e[18]=v,e[19]=k,e[20]=N,e[21]=_,e[22]=z,e[23]=S}else f=e[11],x=e[12],u=e[13],g=e[14],w=e[15],y=e[16],b=e[17],v=e[18],k=e[19],N=e[20],_=e[21],z=e[22],S=e[23];if(k!==Symbol.for("react.early_return_sentinel"))return k;let C;e[33]!==f||e[34]!==N||e[35]!==_?(C=(0,a.jsx)(f,{header:N,files:_}),e[33]=f,e[34]=N,e[35]=_,e[36]=C):C=e[36];let I;e[37]===Symbol.for("react.memo_cache_sentinel")?(I=(0,a.jsx)(V,{Icon:je,children:"Recent notebooks"}),e[37]=I):I=e[37];let M;e[38]===g.files?M=e[39]:(M=(0,a.jsx)(pe,{header:I,files:g.files}),e[38]=g.files,e[39]=M);let O;e[40]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(Se,{children:(0,a.jsx)(St,{})}),e[40]=O):O=e[40];let j;e[41]!==w||e[42]!==y||e[43]!==C||e[44]!==M||e[45]!==z||e[46]!==S?(j=(0,a.jsxs)("div",{className:z,children:[S,w,y,C,M,O]}),e[41]=w,e[42]=y,e[43]=C,e[44]=M,e[45]=z,e[46]=S,e[47]=j):j=e[47];let D;e[48]!==x||e[49]!==b||e[50]!==v||e[51]!==j?(D=(0,a.jsxs)(x,{value:b,children:[v,j]}),e[48]=x,e[49]=b,e[50]=v,e[51]=j,e[52]=D):D=e[52];let F;return e[53]!==u||e[54]!==D?(F=(0,a.jsx)(u,{children:D}),e[53]=u,e[54]=D,e[55]=F):F=e[55],F},St=()=>{let e=(0,P.c)(48),{getWorkspaceFiles:t}=U(),[r,s]=ee(Nt),[o,l]=(0,T.useState)(""),i;e[0]!==t||e[1]!==r?(i=()=>t({includeMarkdown:r}),e[0]=t,e[1]=r,e[2]=i):i=e[2];let m;e[3]===r?m=e[4]:(m=[r],e[3]=r,e[4]=m);let{isPending:d,data:c,error:h,isFetching:p,refetch:n}=Q(i,m);if(d){let j;return e[5]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(J,{centered:!0,size:"xlarge",className:"mt-6"}),e[5]=j):j=e[5],j}if(h){let j;e[6]===h?j=e[7]:(j=nt(h),e[6]=h,e[7]=j);let D;return e[8]===j?D=e[9]:(D=(0,a.jsx)(ne,{kind:"danger",className:"rounded p-4",children:j}),e[8]=j,e[9]=D),D}let f;e[10]!==c.fileCount||e[11]!==c.hasMore?(f=c.hasMore&&(0,a.jsxs)(ne,{kind:"warn",className:"rounded p-4",children:["Showing first ",c.fileCount," files. Your workspace has more files."]}),e[10]=c.fileCount,e[11]=c.hasMore,e[12]=f):f=e[12];let x,u;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsx)(Ke,{size:13}),u=j=>l(j.target.value),e[13]=x,e[14]=u):(x=e[13],u=e[14]);let g;e[15]===o?g=e[16]:(g=(0,a.jsx)(Xe,{id:"search",value:o,icon:x,onChange:u,placeholder:"Search",className:"mb-0 border-border"}),e[15]=o,e[16]=g);let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(zt,{}),e[17]=w):w=e[17];let y;e[18]===s?y=e[19]:(y=j=>s(!!j),e[18]=s,e[19]=y);let b;e[20]!==r||e[21]!==y?(b=(0,a.jsx)(ve,{"data-testid":"include-markdown-checkbox",id:"include-markdown",checked:r,onCheckedChange:y}),e[20]=r,e[21]=y,e[22]=b):b=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(dt,{htmlFor:"include-markdown",children:"Include markdown"}),e[23]=v):v=e[23];let k;e[24]!==g||e[25]!==b?(k=(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[g,w,b,v]}),e[24]=g,e[25]=b,e[26]=k):k=e[26];let N;e[27]===n?N=e[28]:(N=()=>n(),e[27]=n,e[28]=N);let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=(0,a.jsx)(Ge,{className:"w-4 h-4"}),e[29]=_):_=e[29];let z;e[30]===N?z=e[31]:(z=(0,a.jsx)(E,{variant:"text",size:"icon",className:"w-4 h-4 ml-1 p-0 opacity-70 hover:opacity-100",onClick:N,"aria-label":"Refresh workspace",children:_}),e[30]=N,e[31]=z);let S;e[32]===p?S=e[33]:(S=p&&(0,a.jsx)(J,{size:"small"}),e[32]=p,e[33]=S);let C;e[34]!==k||e[35]!==z||e[36]!==S?(C=(0,a.jsxs)(V,{Icon:ut,control:k,children:["Workspace",z,S]}),e[34]=k,e[35]=z,e[36]=S,e[37]=C):C=e[37];let I;e[38]!==o||e[39]!==c.files?(I=(0,a.jsx)("div",{className:"flex flex-col divide-y divide-(--slate-3) border rounded overflow-hidden max-h-192 overflow-y-auto shadow-sm bg-background",children:(0,a.jsx)(Ct,{searchText:o,files:c.files})}),e[38]=o,e[39]=c.files,e[40]=I):I=e[40];let M;e[41]!==C||e[42]!==I||e[43]!==f?(M=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f,C,I]}),e[41]=C,e[42]=I,e[43]=f,e[44]=M):M=e[44];let O;return e[45]!==M||e[46]!==c.root?(O=(0,a.jsx)(me,{value:c.root,children:M}),e[45]=M,e[46]=c.root,e[47]=O):O=e[47],O},zt=()=>{let e=(0,P.c)(5),t=xe(de),r;e[0]===t?r=e[1]:(r=()=>{t({})},e[0]=t,e[1]=r);let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(Pe,{className:"w-4 h-4 mr-1"}),e[2]=s):s=e[2];let o;return e[3]===r?o=e[4]:(o=(0,a.jsxs)(E,{variant:"text",size:"sm",className:"h-fit hidden sm:flex",onClick:r,children:[s,"Collapse all"]}),e[3]=r,e[4]=o),o},Ct=e=>{let t=(0,P.c)(12),{files:r,searchText:s}=e,[o,l]=ee(de),i=Object.keys(o).length===0,m=(0,T.useRef)(void 0),d,c;if(t[0]===i?(d=t[1],c=t[2]):(d=()=>{var n;i&&((n=m.current)==null||n.closeAll())},c=[i],t[0]=i,t[1]=d,t[2]=c),(0,T.useEffect)(d,c),r.length===0){let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)("div",{className:"flex flex-col px-5 py-10 items-center justify-center",children:(0,a.jsx)("p",{className:"text-center text-muted-foreground",children:"No files in this workspace"})}),t[3]=n):n=t[3],n}let h;t[4]!==o||t[5]!==l?(h=async n=>{let f=o[n]??!1;l({...o,[n]:!f})},t[4]=o,t[5]=l,t[6]=h):h=t[6];let p;return t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==h?(p=(0,a.jsx)(ct,{ref:m,width:"100%",height:500,searchTerm:s,className:"h-full",idAccessor:At,data:r,openByDefault:!1,initialOpenState:o,onToggle:h,padding:5,rowHeight:35,indent:15,overscanCount:1e3,renderCursor:Wt,disableDrop:!0,disableDrag:!0,disableEdit:!0,disableMultiSelection:!0,children:Mt}),t[7]=r,t[8]=o,t[9]=s,t[10]=h,t[11]=p):p=t[11],p},Mt=e=>{let t=(0,P.c)(19),{node:r,style:s}=e,o=$e[r.data.isDirectory?"directory":Le(r.data.name)],l;t[0]===o?l=t[1]:(l=(0,a.jsx)(o,{className:"w-5 h-5 shrink-0",strokeWidth:1.5}),t[0]=o,t[1]=l);let i=l,m=(0,T.use)(me),d;t[2]!==i||t[3]!==r.data.isDirectory||t[4]!==r.data.name||t[5]!==r.data.path||t[6]!==m?(d=()=>{if(r.data.isDirectory)return(0,a.jsxs)("span",{className:"flex items-center pl-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden h-full pr-3 gap-2",children:[i,r.data.name]});let u=r.data.path.startsWith(m)&&ie.isAbsolute(r.data.path)?ie.rest(r.data.path,m):r.data.path,g=u.endsWith(".md")||u.endsWith(".qmd");return(0,a.jsxs)("a",{className:"flex items-center pl-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden h-full pr-3 gap-2",href:le(`?file=${u}`).toString(),target:he(u),children:[i,(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",children:[r.data.name,g&&(0,a.jsx)(G,{className:"ml-2 inline opacity-80"})]}),(0,a.jsx)(fe,{filePath:u}),(0,a.jsx)(B,{size:20,className:"group-hover:opacity-100 opacity-0 text-primary"})]})},t[2]=i,t[3]=r.data.isDirectory,t[4]=r.data.name,t[5]=r.data.path,t[6]=m,t[7]=d):d=t[7];let c=d,h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h=Ce("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group h-full"),t[8]=h):h=t[8];let p,n;t[9]===r?(p=t[10],n=t[11]):(p=u=>{u.stopPropagation(),r.data.isDirectory&&r.toggle()},n=(0,a.jsx)(It,{node:r}),t[9]=r,t[10]=p,t[11]=n);let f;t[12]===c?f=t[13]:(f=c(),t[12]=c,t[13]=f);let x;return t[14]!==s||t[15]!==p||t[16]!==n||t[17]!==f?(x=(0,a.jsxs)("div",{style:s,className:h,onClick:p,children:[n,f]}),t[14]=s,t[15]=p,t[16]=n,t[17]=f,t[18]=x):x=t[18],x},It=e=>{let t=(0,P.c)(3),{node:r}=e;if(!r.data.isDirectory){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsx)("span",{className:"w-5 h-5 shrink-0"}),t[0]=o):o=t[0],o}let s;return t[1]===r.isOpen?s=t[2]:(s=r.isOpen?(0,a.jsx)(Ie,{className:"w-5 h-5 shrink-0"}):(0,a.jsx)(De,{className:"w-5 h-5 shrink-0"}),t[1]=r.isOpen,t[2]=s),s},pe=e=>{let t=(0,P.c)(7),{header:r,files:s}=e;if(s.length===0)return null;let o;t[0]===s?o=t[1]:(o=s.map(Ft),t[0]=s,t[1]=o);let l;t[2]===o?l=t[3]:(l=(0,a.jsx)("div",{className:"flex flex-col divide-y divide-(--slate-3) border rounded overflow-hidden max-h-192 overflow-y-auto shadow-sm bg-background",children:o}),t[2]=o,t[3]=l);let i;return t[4]!==r||t[5]!==l?(i=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[r,l]}),t[4]=r,t[5]=l,t[6]=i):i=t[6],i},Dt=e=>{let t=(0,P.c)(41),{file:r}=e,{locale:s}=it(),o;t[0]===r.path?o=t[1]:(o=et(r.path),t[0]=r.path,t[1]=o);let l=o,i,m,d,c;if(t[2]!==r.initializationId||t[3]!==r.path||t[4]!==l){let N=le(l?`?file=${r.initializationId}&session_id=${r.path}`:`?file=${r.path}`),_;t[9]===r.path?_=t[10]:(_=r.path.endsWith(".md"),t[9]=r.path,t[10]=_),i=_,m="py-1.5 px-4 hover:bg-(--blue-2) hover:text-primary transition-all duration-300 cursor-pointer group relative flex gap-4 items-center",d=r.path,c=N.toString(),t[2]=r.initializationId,t[3]=r.path,t[4]=l,t[5]=i,t[6]=m,t[7]=d,t[8]=c}else i=t[5],m=t[6],d=t[7],c=t[8];let h=r.initializationId||r.path,p;t[11]===h?p=t[12]:(p=he(h),t[11]=h,t[12]=p);let n;t[13]===i?n=t[14]:(n=i&&(0,a.jsx)("span",{className:"opacity-80",children:(0,a.jsx)(G,{})}),t[13]=i,t[14]=n);let f;t[15]!==r.name||t[16]!==n?(f=(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[r.name,n]}),t[15]=r.name,t[16]=n,t[17]=f):f=t[17];let x;t[18]===r.path?x=t[19]:(x=(0,a.jsx)("p",{title:r.path,className:"text-sm text-muted-foreground overflow-hidden whitespace-nowrap text-ellipsis",children:r.path}),t[18]=r.path,t[19]=x);let u;t[20]!==f||t[21]!==x?(u=(0,a.jsxs)("div",{className:"flex flex-col justify-between flex-1",children:[f,x]}),t[20]=f,t[21]=x,t[22]=u):u=t[22];let g;t[23]===r.path?g=t[24]:(g=(0,a.jsx)("div",{children:(0,a.jsx)(fe,{filePath:r.path})}),t[23]=r.path,t[24]=g);let w;t[25]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(B,{size:20,className:"group-hover:opacity-100 opacity-0 transition-all duration-300 text-primary"}),t[25]=w):w=t[25];let y;t[26]===g?y=t[27]:(y=(0,a.jsxs)("div",{className:"flex gap-3 items-center",children:[g,w]}),t[26]=g,t[27]=y);let b;t[28]!==r.lastModified||t[29]!==s?(b=!!r.lastModified&&(0,a.jsx)("div",{className:"text-xs text-muted-foreground opacity-80",children:ot(r.lastModified*1e3,s)}),t[28]=r.lastModified,t[29]=s,t[30]=b):b=t[30];let v;t[31]!==y||t[32]!==b?(v=(0,a.jsxs)("div",{className:"flex flex-col gap-1 items-end",children:[y,b]}),t[31]=y,t[32]=b,t[33]=v):v=t[33];let k;return t[34]!==u||t[35]!==v||t[36]!==m||t[37]!==d||t[38]!==c||t[39]!==p?(k=(0,a.jsxs)("a",{className:m,href:c,target:p,children:[u,v]},d),t[34]=u,t[35]=v,t[36]=m,t[37]=d,t[38]=c,t[39]=p,t[40]=k):k=t[40],k},fe=e=>{let t=(0,P.c)(10),{filePath:r}=e,{openConfirm:s,closeModal:o}=lt(),{shutdownSession:l}=U(),{runningNotebooks:i,setRunningNotebooks:m}=(0,T.use)(ce);if(!i.has(r))return null;let d;t[0]!==o||t[1]!==r||t[2]!==s||t[3]!==i||t[4]!==m||t[5]!==l?(d=p=>{p.stopPropagation(),p.preventDefault(),s({title:"Shutdown",description:"This will terminate the Python kernel. You'll lose all data that's in memory.",variant:"destructive",confirmAction:(0,a.jsx)(st,{onClick:()=>{let n=i.get(r);ke(n==null?void 0:n.sessionId),l({sessionId:n.sessionId}).then(f=>{m(se.keyBy(f.files,Lt))}),o(),Ze({description:"Notebook has been shutdown."})},"aria-label":"Confirm Shutdown",children:"Shutdown"})})},t[0]=o,t[1]=r,t[2]=s,t[3]=i,t[4]=m,t[5]=l,t[6]=d):d=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)(Je,{size:14}),t[7]=c):c=t[7];let h;return t[8]===d?h=t[9]:(h=(0,a.jsx)(at,{content:"Shutdown",children:(0,a.jsx)(E,{size:"icon",variant:"outline",className:"opacity-80 hover:opacity-100 hover:bg-accent text-destructive border-destructive hover:border-destructive hover:text-destructive bg-background hover:bg-(--red-1)",onClick:d,children:c})}),t[8]=d,t[9]=h),h},Pt=()=>{let e=(0,P.c)(3),t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=tt(),e[0]=t):t=e[0];let r=t,s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Create a new notebook"}),e[1]=s):s=e[1];let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsxs)("a",{className:`relative rounded-lg p-6 group
text-primary hover:bg-(--blue-2) shadow-md-solid shadow-accent border bg-(--blue-1)
transition-all duration-300 cursor-pointer
`,href:r,target:"_blank",rel:"noreferrer",children:[s,(0,a.jsx)("div",{className:"group-hover:opacity-100 opacity-0 absolute right-5 top-0 bottom-0 rounded-lg flex items-center justify-center transition-all duration-300",children:(0,a.jsx)(B,{size:24})})]}),e[2]=o):o=e[2],o},Ot=_t;function Tt(e){return e+1}function Rt(e){return e.path}function At(e){return e.path}function Wt(){return null}function Ft(e){return(0,a.jsx)(Dt,{file:e},e.path)}function Lt(e){return e.path}export{Ot as default};
var O=Object.defineProperty;var V=(t,e,i)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var b=(t,e,i)=>V(t,typeof e!="symbol"?e+"":e,i);import{u as I}from"./useEvent-BhXAndur.js";import{o as j}from"./cells-DPp5cDaO.js";import{t as T}from"./compiler-runtime-B3qBwwSJ.js";import{a as k,d as E}from"./hotkeys-BHHWjLlp.js";import{i as N}from"./utils-YqBXNpsM.js";import{h as P,x as _}from"./config-Q0O7_stz.js";import{r as z}from"./requests-B4FYHTZl.js";import{f as D}from"./layout-_O8thjaV.js";import{s as $,u as B}from"./download-os8QlW6l.js";import{t as H}from"./Deferred-DxQeE5uh.js";import{t as L}from"./use-toast-BDYuj3zG.js";import{t as x}from"./useInterval-B-PjgTm9.js";var R=class{constructor(){b(this,"capturedInputs",new Map);b(this,"inFlight",new Map)}cancelEntry(t){t.controller.abort(),t.deferred.status==="pending"&&t.deferred.resolve(void 0)}needsCapture(t,e){if(this.capturedInputs.get(t)===e)return!1;let i=this.inFlight.get(t);return!(i&&i.inputValue===e)}waitForInFlight(t,e){let i=this.inFlight.get(t);return i&&i.inputValue===e?i.deferred.promise:null}startCapture(t,e){let i=this.inFlight.get(t);i&&this.cancelEntry(i);let n=new AbortController,l=new H,u={controller:n,inputValue:e,deferred:l};return this.inFlight.set(t,u),{signal:n.signal,markCaptured:p=>{this.inFlight.get(t)===u&&(l.resolve(p),this.capturedInputs.set(t,e),this.inFlight.delete(t))},markFailed:()=>{this.inFlight.get(t)===u&&(l.resolve(void 0),this.inFlight.delete(t))}}}prune(t){for(let e of this.capturedInputs.keys())t.has(e)||this.capturedInputs.delete(e);for(let[e,i]of this.inFlight)t.has(e)||(this.cancelEntry(i),this.inFlight.delete(e))}get isCapturing(){return this.inFlight.size>0}abort(){for(let t of this.inFlight.values())this.cancelEntry(t);this.inFlight.clear()}reset(){this.abort(),this.capturedInputs.clear()}},Y=T(),M=5e3;function q(){let t=(0,Y.c)(14),e=I(N),{state:i}=I(P),n=e.auto_download.includes("markdown"),l=e.auto_download.includes("html"),u=e.auto_download.includes("ipynb"),p=i===_.OPEN,m=!n||!p,d=!l||!p,h=!u||!p,{autoExportAsHTML:a,autoExportAsIPYNB:s,autoExportAsMarkdown:r,updateCellOutputs:o}=z(),c=S(),f;t[0]===r?f=t[1]:(f=async()=>{await r({download:!1})},t[0]=r,t[1]=f);let g;t[2]===m?g=t[3]:(g={delayMs:M,whenVisible:!0,disabled:m},t[2]=m,t[3]=g),x(f,g);let w;t[4]===a?w=t[5]:(w=async()=>{await a({download:!1,includeCode:!0,files:D.INSTANCE.filenames()})},t[4]=a,t[5]=w);let v;t[6]===d?v=t[7]:(v={delayMs:M,whenVisible:!0,disabled:d},t[6]=d,t[7]=v),x(w,v);let F;t[8]!==s||t[9]!==c||t[10]!==o?(F=async()=>{await A({takeScreenshots:()=>c({progress:B.indeterminate()}),updateCellOutputs:o}),await s({download:!1})},t[8]=s,t[9]=c,t[10]=o,t[11]=F):F=t[11];let y;t[12]===h?y=t[13]:(y={delayMs:M,whenVisible:!0,disabled:h,skipIfRunning:!0},t[12]=h,t[13]=y),x(F,y)}var G=new Set(["text/html","application/vnd.vegalite.v5+json","application/vnd.vega.v5+json","application/vnd.vegalite.v6+json","application/vnd.vega.v6+json"]);const C=new R;function S(){let t=I(j);return async e=>{var d,h;let{progress:i}=e,n=new Set(k.keys(t));C.prune(n);let l=[],u=[];for(let[a,s]of k.entries(t)){let r=(d=s.output)==null?void 0:d.data;if((h=s.output)!=null&&h.mimetype&&G.has(s.output.mimetype)&&r)if(C.needsCapture(a,r))l.push([a,r]);else{let o=C.waitForInFlight(a,r);o&&u.push({cellId:a,promise:o})}}if(l.length===0&&u.length===0)return{};l.length>0&&i.addTotal(l.length);let p={};for(let[a,s]of l){let r=C.startCapture(a,s);try{let o=await $(a);if(r.signal.aborted)continue;if(!o){E.error(`Failed to capture screenshot for cell ${a}`),r.markFailed();continue}let c=["image/png",o];p[a]=c,r.markCaptured(c)}catch(o){E.error(`Error screenshotting cell ${a}:`,o),r.markFailed()}finally{i.increment(1)}}let m=await Promise.allSettled(u.map(({promise:a})=>a));for(let[a,{cellId:s}]of u.entries()){let r=m[a];r.status==="fulfilled"&&r.value&&(p[s]=r.value)}return p}}async function A(t){let{takeScreenshots:e,updateCellOutputs:i}=t;try{let n=await e();k.size(n)>0&&await i({cellIdsToOutput:n})}catch(n){E.error("Error updating cell outputs with screenshots:",n),L({title:"Failed to capture cell outputs",description:"Some outputs may not appear in the PDF. Continuing with export.",variant:"danger"})}}export{q as n,S as r,A as t};
import{i as B}from"./useEvent-BhXAndur.js";import{ni as v,y as G,yn as Q}from"./cells-DPp5cDaO.js";import{d as $}from"./hotkeys-BHHWjLlp.js";import{t as R}from"./requests-B4FYHTZl.js";function I({moduleName:e,variableName:t,onAddImport:r,appStore:n=B}){if(t in n.get(Q))return!1;let{cellData:i,cellIds:o}=n.get(G),a=RegExp(`import[ ]+${e}[ ]+as[ ]+${t}`,"g");for(let l of o.inOrderIds)if(a.test(i[l].code))return!1;return r(`import ${e} as ${t}`),!0}function X({autoInstantiate:e,createNewCell:t,fromCellId:r,before:n}){let i=R(),o=null;return I({moduleName:"marimo",variableName:"mo",onAddImport:a=>{o=v.create(),t({cellId:r??"__end__",before:n??!1,code:a,lastCodeRun:e?a:void 0,newCellId:o,skipIfCodeExists:!0,autoFocus:!1}),e&&i.sendRun({cellIds:[o],codes:[a]})}})?o:null}function J({autoInstantiate:e,createNewCell:t,fromCellId:r}){let n=R(),i=null;return I({moduleName:"altair",variableName:"alt",onAddImport:o=>{i=v.create(),t({cellId:r??"__end__",before:!1,code:o,lastCodeRun:e?o:void 0,newCellId:i,skipIfCodeExists:!0,autoFocus:!1}),e&&n.sendRun({cellIds:[i],codes:[o]})}})?i:null}function K(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let r=document.implementation.createHTMLDocument(),n=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(i),t&&(n.href=t),i.href=e,i.href}const Y=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function d(e){let t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}var g=null;function k(e={}){return g||(e.includeStyleProperties?(g=e.includeStyleProperties,g):(g=d(window.getComputedStyle(document.documentElement)),g))}function p(e,t){let r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function Z(e){let t=p(e,"border-left-width"),r=p(e,"border-right-width");return e.clientWidth+t+r}function ee(e){let t=p(e,"border-top-width"),r=p(e,"border-bottom-width");return e.clientHeight+t+r}function P(e,t={}){return{width:t.width||Z(e),height:t.height||ee(e)}}function te(){let e,t;try{t=process}catch{}let r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var c=16384;function re(e){(e.width>c||e.height>c)&&(e.width>c&&e.height>c?e.width>e.height?(e.height*=c/e.width,e.width=c):(e.width*=c/e.height,e.height=c):e.width>c?(e.height*=c/e.width,e.width=c):(e.width*=c/e.height,e.height=c))}function w(e){return new Promise((t,r)=>{let n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function ne(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function ie(e,t,r){let n="http://www.w3.org/2000/svg",i=document.createElementNS(n,"svg"),o=document.createElementNS(n,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${t} ${r}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),i.appendChild(o),o.appendChild(e),ne(i)}const u=(e,t)=>{if(e instanceof t)return!0;let r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||u(r,t)};function oe(e){let t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function ae(e,t){return k(t).map(r=>`${r}: ${e.getPropertyValue(r)}${e.getPropertyPriority(r)?" !important":""};`).join(" ")}function le(e,t,r,n){let i=`.${e}:${t}`,o=r.cssText?oe(r):ae(r,n);return document.createTextNode(`${i}{${o}}`)}function N(e,t,r,n){let i=window.getComputedStyle(e,r),o=i.getPropertyValue("content");if(o===""||o==="none")return;let a=Y();try{t.className=`${t.className} ${a}`}catch{return}let l=document.createElement("style");l.appendChild(le(a,r,i,n)),t.appendChild(l)}function se(e,t,r){N(e,t,":before",r),N(e,t,":after",r)}var T="application/font-woff",A="image/jpeg",ce={woff:T,woff2:T,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:A,jpeg:A,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ue(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function x(e){return ce[ue(e).toLowerCase()]||""}function de(e){return e.split(/,/)[1]}function E(e){return e.search(/^(data:)/)!==-1}function L(e,t){return`data:${t};base64,${e}`}async function H(e,t,r){let n=await fetch(e,t);if(n.status===404)throw Error(`Resource "${n.url}" not found`);let i=await n.blob();return new Promise((o,a)=>{let l=new FileReader;l.onerror=a,l.onloadend=()=>{try{o(r({res:n,result:l.result}))}catch(s){a(s)}},l.readAsDataURL(i)})}var S={};function fe(e,t,r){let n=e.replace(/\?.*/,"");return r&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function C(e,t,r){let n=fe(e,t,r.includeQueryParams);if(S[n]!=null)return S[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{i=L(await H(e,r.fetchRequestInit,({res:o,result:a})=>(t||(t=o.headers.get("Content-Type")||""),de(a))),t)}catch(o){i=r.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;o&&(a=typeof o=="string"?o:o.message),a&&console.warn(a)}return S[n]=i,i}async function he(e){let t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):w(t)}async function me(e,t){if(e.currentSrc){let n=document.createElement("canvas"),i=n.getContext("2d");return n.width=e.clientWidth,n.height=e.clientHeight,i==null||i.drawImage(e,0,0,n.width,n.height),w(n.toDataURL())}let r=e.poster;return w(await C(r,x(r),t))}async function ge(e,t){var r;try{if((r=e==null?void 0:e.contentDocument)!=null&&r.body)return await y(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function pe(e,t){return u(e,HTMLCanvasElement)?he(e):u(e,HTMLVideoElement)?me(e,t):u(e,HTMLIFrameElement)?ge(e,t):e.cloneNode(F(e))}var we=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",F=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ye(e,t,r){if(F(t))return t;let n=[];return n=we(e)&&e.assignedNodes?d(e.assignedNodes()):d((e.shadowRoot??e).childNodes),n.length===0||u(e,HTMLVideoElement)||await n.reduce((i,o)=>i.then(()=>y(o,r)).then(a=>{a&&t.appendChild(a)}),Promise.resolve()),t}function be(e,t,r){let n=t.style;if(!n)return;let i=window.getComputedStyle(e);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):k(r).forEach(o=>{let a=i.getPropertyValue(o);o==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),u(e,HTMLIFrameElement)&&o==="display"&&a==="inline"&&(a="block"),o==="d"&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(o,a,i.getPropertyPriority(o))})}function xe(e,t){u(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),u(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ee(e,t){if(u(e,HTMLSelectElement)){let r=t,n=Array.from(r.children).find(i=>e.value===i.getAttribute("value"));n&&n.setAttribute("selected","")}}function Se(e,t,r){return u(t,Element)&&(be(e,t,r),se(e,t,r),xe(e,t),Ee(e,t)),t}async function Ce(e,t){let r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;let n={};for(let o=0;o<r.length;o++){let a=r[o].getAttribute("xlink:href");if(a){let l=e.querySelector(a),s=document.querySelector(a);!l&&s&&!n[a]&&(n[a]=await y(s,t,!0))}}let i=Object.values(n);if(i.length){let o="http://www.w3.org/1999/xhtml",a=document.createElementNS(o,"svg");a.setAttribute("xmlns",o),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";let l=document.createElementNS(o,"defs");a.appendChild(l);for(let s=0;s<i.length;s++)l.appendChild(i[s]);e.appendChild(a)}return e}async function y(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>pe(n,t)).then(n=>ye(e,n,t)).then(n=>Se(e,n,t)).then(n=>Ce(n,t))}var M=/url\((['"]?)([^'"]+?)\1\)/g,ve=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,$e=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Re(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Ie(e){let t=[];return e.replace(M,(r,n,i)=>(t.push(i),r)),t.filter(r=>!E(r))}async function ke(e,t,r,n,i){try{let o=r?K(t,r):t,a=x(t),l;return l=i?L(await i(o),a):await C(o,a,n),e.replace(Re(t),`$1${l}$3`)}catch{}return e}function Pe(e,{preferredFontFormat:t}){return t?e.replace($e,r=>{for(;;){let[n,,i]=ve.exec(r)||[];if(!i)return"";if(i===t)return`src: ${n};`}}):e}function V(e){return e.search(M)!==-1}async function j(e,t,r){if(!V(e))return e;let n=Pe(e,r);return Ie(n).reduce((i,o)=>i.then(a=>ke(a,o,t,r)),Promise.resolve(n))}async function h(e,t,r){var i;let n=(i=t.style)==null?void 0:i.getPropertyValue(e);if(n){let o=await j(n,null,r);return t.style.setProperty(e,o,t.style.getPropertyPriority(e)),!0}return!1}async function Ne(e,t){await h("background",e,t)||await h("background-image",e,t),await h("mask",e,t)||await h("-webkit-mask",e,t)||await h("mask-image",e,t)||await h("-webkit-mask-image",e,t)}async function Te(e,t){let r=u(e,HTMLImageElement);if(!(r&&!E(e.src))&&!(u(e,SVGImageElement)&&!E(e.href.baseVal)))return;let n=r?e.src:e.href.baseVal,i=await C(n,x(n),t);await new Promise((o,a)=>{e.onload=o,e.onerror=t.onImageErrorHandler?(...s)=>{try{o(t.onImageErrorHandler(...s))}catch(f){a(f)}}:a;let l=e;l.decode&&(l.decode=o),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=i):e.href.baseVal=i})}async function Ae(e,t){let r=d(e.childNodes).map(n=>D(n,t));await Promise.all(r).then(()=>e)}async function D(e,t){u(e,Element)&&(await Ne(e,t),await Te(e,t),await Ae(e,t))}function Le(e,t){let{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);let n=t.style;return n!=null&&Object.keys(n).forEach(i=>{r[i]=n[i]}),e}var O={};async function _(e){let t=O[e];return t??(t={url:e,cssText:await(await fetch(e)).text()},O[e]=t,t)}async function z(e,t){let r=e.cssText,n=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let a=o.replace(n,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),H(a,t.fetchRequestInit,({result:l})=>(r=r.replace(o,`url(${l})`),[o,l]))});return Promise.all(i).then(()=>r)}function U(e){if(e==null)return[];let t=[],r=e.replace(/(\/\*[\s\S]*?\*\/)/gi,""),n=RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let a=n.exec(r);if(a===null)break;t.push(a[0])}r=r.replace(n,"");let i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let a=i.exec(r);if(a===null){if(a=o.exec(r),a===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(a[0])}return t}async function He(e,t){let r=[],n=[];return e.forEach(i=>{if("cssRules"in i)try{d(i.cssRules||[]).forEach((o,a)=>{if(o.type===CSSRule.IMPORT_RULE){let l=a+1,s=o.href,f=_(s).then(m=>z(m,t)).then(m=>U(m).forEach(b=>{try{i.insertRule(b,b.startsWith("@import")?l+=1:i.cssRules.length)}catch(W){console.error("Error inserting rule from remote css",{rule:b,error:W})}})).catch(m=>{console.error("Error loading remote css",m.toString())});n.push(f)}})}catch(o){let a=e.find(l=>l.href==null)||document.styleSheets[0];i.href!=null&&n.push(_(i.href).then(l=>z(l,t)).then(l=>U(l).forEach(s=>{a.insertRule(s,a.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",o)}}),Promise.all(n).then(()=>(e.forEach(i=>{if("cssRules"in i)try{d(i.cssRules||[]).forEach(o=>{r.push(o)})}catch(o){console.error(`Error while reading CSS rules from ${i.href}`,o)}}),r))}function Fe(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>V(t.style.getPropertyValue("src")))}async function Me(e,t){if(e.ownerDocument==null)throw Error("Provided element is not within a Document");return Fe(await He(d(e.ownerDocument.styleSheets),t))}function q(e){return e.trim().replace(/["']/g,"")}function Ve(e){let t=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(i=>{t.add(q(i))}),Array.from(n.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function je(e,t){let r=await Me(e,t),n=Ve(e);return(await Promise.all(r.filter(i=>n.has(q(i.style.fontFamily))).map(i=>{let o=i.parentStyleSheet?i.parentStyleSheet.href:null;return j(i.cssText,o,t)}))).join(`
`)}async function De(e,t){let r=t.fontEmbedCSS==null?t.skipFonts?null:await je(e,t):t.fontEmbedCSS,n=t.extraStyleContent==null?r:t.extraStyleContent.concat(r||"");if(n){let i=document.createElement("style"),o=document.createTextNode(n);i.appendChild(o),e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i)}}async function Oe(e,t={}){let{width:r,height:n}=P(e,t),i=await y(e,t,!0);return await De(i,t),await D(i,t),Le(i,t),await ie(i,r,n)}async function _e(e,t={}){let{width:r,height:n}=P(e,t),i=await w(await Oe(e,t)),o=document.createElement("canvas"),a=o.getContext("2d"),l=t.pixelRatio||te(),s=t.canvasWidth||r,f=t.canvasHeight||n;return o.width=s*l,o.height=f*l,t.skipAutoScale||re(o),o.style.width=`${s}`,o.style.height=`${f}`,t.backgroundColor&&(a.fillStyle=t.backgroundColor,a.fillRect(0,0,o.width,o.height)),a.drawImage(i,0,0,o.width,o.height),o}async function ze(e,t={}){return(await _e(e,t)).toDataURL()}const Ue={filter:e=>{try{if("classList"in e){let t=e.classList;if(t.contains("mpl-toolbar")||t.contains("print:hidden"))return!1}return!0}catch(t){return $.error("Error filtering node:",t),!0}},onImageErrorHandler:e=>{$.error("Error loading image:",e)},includeStyleProperties:"width.height.min-width.min-height.max-width.max-height.box-sizing.aspect-ratio.display.position.top.left.bottom.right.z-index.float.clear.flex.flex-direction.flex-wrap.flex-grow.flex-shrink.flex-basis.align-items.align-self.justify-content.gap.order.grid-template-columns.grid-template-rows.grid-column.grid-row.row-gap.column-gap.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.font.font-family.font-size.font-weight.font-style.line-height.letter-spacing.word-spacing.text-align.text-decoration.text-transform.text-indent.text-shadow.white-space.text-wrap.word-break.text-overflow.vertical-align.color.background.background-color.background-image.background-size.background-position.background-repeat.background-clip.border.border-width.border-style.border-color.border-top.border-right.border-bottom.border-left.border-radius.outline.box-shadow.text-shadow.opacity.filter.backdrop-filter.mix-blend-mode.transform.clip-path.overflow.overflow-x.overflow-y.visibility.fill.stroke.stroke-width.object-fit.object-position.list-style.list-style-type.border-collapse.border-spacing.content.cursor".split(".")};async function qe(e,t){return ze(e,{...Ue,...t})}export{J as n,X as r,qe as t};
function c(r,n){return r.skipToEnd(),n.cur=u,"error"}function i(r,n){return r.match(/^HTTP\/\d\.\d/)?(n.cur=a,"keyword"):r.match(/^[A-Z]+/)&&/[ \t]/.test(r.peek())?(n.cur=d,"keyword"):c(r,n)}function a(r,n){var t=r.match(/^\d+/);if(!t)return c(r,n);n.cur=s;var o=Number(t[0]);return o>=100&&o<400?"atom":"error"}function s(r,n){return r.skipToEnd(),n.cur=u,null}function d(r,n){return r.eatWhile(/\S/),n.cur=f,"string.special"}function f(r,n){return r.match(/^HTTP\/\d\.\d$/)?(n.cur=u,"keyword"):c(r,n)}function u(r){return r.sol()&&!r.eat(/[ \t]/)?r.match(/^.*?:/)?"atom":(r.skipToEnd(),"error"):(r.skipToEnd(),"string")}function e(r){return r.skipToEnd(),null}const k={name:"http",token:function(r,n){var t=n.cur;return t!=u&&t!=e&&r.eatSpace()?null:t(r,n)},blankLine:function(r){r.cur=e},startState:function(){return{cur:i}}};export{k as http};
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABtlJREFUWEetV21QlNcVfs67y67KV/EjJIRdBIxJrB9BotFqAtERTIKkk8SxNiGt7Ipa46DsxvjR0rVTKuKKJFYTE1SIxmhFbR0Kwc4YNSraqmNswhSFIrBUBD8QVGTZfU/nvrDLroqQ4Pm179nnnvvc5557zr2EXlj05hSfhgvO10AUB/A4AOHEFMCADOJrBFQx0zki+ajkkA9eyslr6kVYBUIPA8ZaLOr/ttQtYJKXgRHSy6B2EBVKwMZqa+6hnsZ0S2DY8jlD2uxSIYDxPQVx/S+CSZIEpyx3rI5wXIZsslm3neouxoMJMEhvNv6JwcvcwYkw8kk9xoZFYOjgYAT2HwBZlnH99i1UNtbj9KVKVDZcho9KhX4+GtgdDrQ52sVwGYQcbduAFRUbNrTdS+R+AhaLpL9Vu4kZ8wTYV6vFrydNxTsTY/Bk0KCHinHxymVsP/E1vjz1jRvXSQIEOqGxO39esWFbo2cQbwIzZ6r0QwPSWUa6APlp++GgyYLgwCB8dqQEs8a/iEF+/j3uSPW1RqTt2orTVRfBHmgCyjQaObZidRcJLwJPL032b3XSEQaixMqTJr6s7GlDcxNOVpZj13wz9IOG9EhAABxOJ5buyUfB6RNeeCKU+vnpYsssFrvXKYhImzvcQfJXDISH/GQg5kyeiqzifYh5eiSss+ZgoK9fryb2BMnMeG/HZhR+e/peEmtqrFuU/OpQwGKRdC21pSLjJZKwMuEtZBbtw6ujx+LDXxohfD/WWu12JH6UgfL6OncIAtpVKh5VlbW1XCGgMxlnA7xT/H4zeiLO26oVCUtMv1cyuq/2na0aMz7KcB/PzjO6rdaam6wQ0JuNx5h5EhFhybQZyD54AJuS5iNhzPN9nds9fsXeHdhRetgz3m2nv+ox6ig4qnqAped04UqWn6utwr/SrVBLKmWAkPHClS4Jw4c8jsbmmzheUYaA/r6YPjJKUcp24yqOlH8PiQgvDv8pQj2Obf3NG5i8erlSH9wmcTyFmQ2vyQxR8ZASE48vTh7BlGdGYWOSUgYU+76uBtPXW9zfyZOnYnvpYbQ7nYovSh+BJXGvY27en13FB1ofH+Qlp2LyUyPc4xZ/uQX7zohUcxmvJJ05OQ1M64TrMf9ANLTcxOK4RKTFJXZLQKxQZLin9ffRoLVdOVluGxsWib8tWun+/uZCGd7+NNsTkk+hJkMOAanCK2S8225HeuIsGF+a1i2B0KDBGB4cgkP/Oe/GaNRqxI14DkcvlqG59Y7iF/Eurv7EjRGKjU5Pxe22uy7fYdKZjflgfteT1gevvIGFU1/tlsCnv1qIV0ZFY8If30dd0zUFN2PMOGxKWoDMogJsPFSk+IRS1Wu3eKky6+O1KK0sV3xEKBdNZzszv+OJSvpZLDLe6HLdmwP5hsWY8uxoxK5ZoTQiYTOfn4TsXxiw/h8HkF3y124JLCv4HDtPHu2YjtBIOpNhI4DfeBKIDovE/kXLu1WgLwQy/74Xm74udsVuIr3JsJSBNZ4EREs9tyoH/v36K+5HqUBG4R5sPlzSqQDZSG8yTmPwQReBwX7+uHqrBetnG5Sq+KgJpO7Mxf6zJztzgI5TsDnJV8PaRoCV5Y4bOkyp2888EYqChR8owLob15TG5LJ5sdMxIkSHjMK/oKH5puIeHzEcb0+IwVffnUXx+TOuCZAz2+iVhFOyfoeKhsudKUAbOkuxoYAZbwqvODqvR43H7n8ew/73liN6aKRXgL58VDbU4+Ws37pDSISEDgL3bIOQvvjfZ/FsSCj2LlymHKdHYaZdW7Gn835AwBU//2a9KzLpTMYTAE8QE4kJxfWr9vpVrEyYiXmx8X2ev+j8GSzY/gm4s4ISsaXGunWVe2mh5pQXiJ3i+uLV/EVD+vjd+YgfGfWjSYjtFN2w3dnZiAg2lZ9z1CVLXpOXtnqzIZMZHZnnYYLEkvhEpMTEQav26TWR/zVdxx8O7IZYvYexxJRQnZ2rlEsvAuIhUtliKwK4qxF4jBStetqIMYgKi0TEkGA8ERiEwf4BGKDRulFCYtHOd586hr1nSt3d0QUgolU11lx3a70vu8TF9I5MxWBM8qT9eEAQ1CoJthsdtd9LIfEWUPsouWN3OnC3XXkP3G+E7FrrFjPQdVl+YHqHWFIGqG/J+cz8lmcUX41WSU5R/12vn17uRxskMtWuzRVl38sedr5It3TuPJI5k5kDe5yIqAqACoyBAHtcoamE4EyrWbet7MGi9BA5PNUY7FDjfYCTAQT1SKQDcAmMQiLKq1mX65WBP0QBL+ywRYu0dk3rSwx+AUAkCEFg8eLCHWJcYeYaSVKXOyT527qsXFsvieL/FjzLIPLjeMUAAAAASUVORK5CYII=";export{A as t};
import{s}from"./chunk-LvLJmgfZ.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as i}from"./jsx-runtime-ZmTK25f3.js";var l=n(),h=s(i(),1);const m=r=>{let t=(0,l.c)(4),c,e;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,h.jsx)("title",{children:"Python Logo"}),e=(0,h.jsx)("path",{d:"M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"}),t[0]=c,t[1]=e):(c=t[0],e=t[1]);let o;return t[2]===r?o=t[3]:(o=(0,h.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 448 512",...r,children:[c,e]}),t[2]=r,t[3]=o),o},v=r=>{let t=(0,l.c)(4),c,e;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,h.jsx)("title",{children:"Markdown Icon"}),e=(0,h.jsx)("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"}),t[0]=c,t[1]=e):(c=t[0],e=t[1]);let o;return t[2]===r?o=t[3]:(o=(0,h.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 640 512",fill:"currentColor",...r,children:[c,e]}),t[2]=r,t[3]=o),o};export{m as n,v as t};
import{t as o}from"./idl-Djz72z1a.js";export{o as idl};
function t(e){return RegExp("^(("+e.join(")|(")+"))\\b","i")}var r="a_correlate.abs.acos.adapt_hist_equal.alog.alog2.alog10.amoeba.annotate.app_user_dir.app_user_dir_query.arg_present.array_equal.array_indices.arrow.ascii_template.asin.assoc.atan.axis.axis.bandpass_filter.bandreject_filter.barplot.bar_plot.beseli.beselj.beselk.besely.beta.biginteger.bilinear.bin_date.binary_template.bindgen.binomial.bit_ffs.bit_population.blas_axpy.blk_con.boolarr.boolean.boxplot.box_cursor.breakpoint.broyden.bubbleplot.butterworth.bytarr.byte.byteorder.bytscl.c_correlate.calendar.caldat.call_external.call_function.call_method.call_procedure.canny.catch.cd.cdf.ceil.chebyshev.check_math.chisqr_cvf.chisqr_pdf.choldc.cholsol.cindgen.cir_3pnt.clipboard.close.clust_wts.cluster.cluster_tree.cmyk_convert.code_coverage.color_convert.color_exchange.color_quan.color_range_map.colorbar.colorize_sample.colormap_applicable.colormap_gradient.colormap_rotation.colortable.comfit.command_line_args.common.compile_opt.complex.complexarr.complexround.compute_mesh_normals.cond.congrid.conj.constrained_min.contour.contour.convert_coord.convol.convol_fft.coord2to3.copy_lun.correlate.cos.cosh.cpu.cramer.createboxplotdata.create_cursor.create_struct.create_view.crossp.crvlength.ct_luminance.cti_test.cursor.curvefit.cv_coord.cvttobm.cw_animate.cw_animate_getp.cw_animate_load.cw_animate_run.cw_arcball.cw_bgroup.cw_clr_index.cw_colorsel.cw_defroi.cw_field.cw_filesel.cw_form.cw_fslider.cw_light_editor.cw_light_editor_get.cw_light_editor_set.cw_orient.cw_palette_editor.cw_palette_editor_get.cw_palette_editor_set.cw_pdmenu.cw_rgbslider.cw_tmpl.cw_zoom.db_exists.dblarr.dcindgen.dcomplex.dcomplexarr.define_key.define_msgblk.define_msgblk_from_file.defroi.defsysv.delvar.dendro_plot.dendrogram.deriv.derivsig.determ.device.dfpmin.diag_matrix.dialog_dbconnect.dialog_message.dialog_pickfile.dialog_printersetup.dialog_printjob.dialog_read_image.dialog_write_image.dictionary.digital_filter.dilate.dindgen.dissolve.dist.distance_measure.dlm_load.dlm_register.doc_library.double.draw_roi.edge_dog.efont.eigenql.eigenvec.ellipse.elmhes.emboss.empty.enable_sysrtn.eof.eos.erase.erf.erfc.erfcx.erode.errorplot.errplot.estimator_filter.execute.exit.exp.expand.expand_path.expint.extract.extract_slice.f_cvf.f_pdf.factorial.fft.file_basename.file_chmod.file_copy.file_delete.file_dirname.file_expand_path.file_gunzip.file_gzip.file_info.file_lines.file_link.file_mkdir.file_move.file_poll_input.file_readlink.file_same.file_search.file_tar.file_test.file_untar.file_unzip.file_which.file_zip.filepath.findgen.finite.fix.flick.float.floor.flow3.fltarr.flush.format_axis_values.forward_function.free_lun.fstat.fulstr.funct.function.fv_test.fx_root.fz_roots.gamma.gamma_ct.gauss_cvf.gauss_pdf.gauss_smooth.gauss2dfit.gaussfit.gaussian_function.gaussint.get_drive_list.get_dxf_objects.get_kbrd.get_login_info.get_lun.get_screen_size.getenv.getwindows.greg2jul.grib.grid_input.grid_tps.grid3.griddata.gs_iter.h_eq_ct.h_eq_int.hanning.hash.hdf.hdf5.heap_free.heap_gc.heap_nosave.heap_refcount.heap_save.help.hilbert.hist_2d.hist_equal.histogram.hls.hough.hqr.hsv.i18n_multibytetoutf8.i18n_multibytetowidechar.i18n_utf8tomultibyte.i18n_widechartomultibyte.ibeta.icontour.iconvertcoord.idelete.identity.idl_base64.idl_container.idl_validname.idlexbr_assistant.idlitsys_createtool.idlunit.iellipse.igamma.igetcurrent.igetdata.igetid.igetproperty.iimage.image.image_cont.image_statistics.image_threshold.imaginary.imap.indgen.int_2d.int_3d.int_tabulated.intarr.interpol.interpolate.interval_volume.invert.ioctl.iopen.ir_filter.iplot.ipolygon.ipolyline.iputdata.iregister.ireset.iresolve.irotate.isa.isave.iscale.isetcurrent.isetproperty.ishft.isocontour.isosurface.isurface.itext.itranslate.ivector.ivolume.izoom.journal.json_parse.json_serialize.jul2greg.julday.keyword_set.krig2d.kurtosis.kw_test.l64indgen.la_choldc.la_cholmprove.la_cholsol.la_determ.la_eigenproblem.la_eigenql.la_eigenvec.la_elmhes.la_gm_linear_model.la_hqr.la_invert.la_least_square_equality.la_least_squares.la_linear_equation.la_ludc.la_lumprove.la_lusol.la_svd.la_tridc.la_trimprove.la_triql.la_trired.la_trisol.label_date.label_region.ladfit.laguerre.lambda.lambdap.lambertw.laplacian.least_squares_filter.leefilt.legend.legendre.linbcg.lindgen.linfit.linkimage.list.ll_arc_distance.lmfit.lmgr.lngamma.lnp_test.loadct.locale_get.logical_and.logical_or.logical_true.lon64arr.lonarr.long.long64.lsode.lu_complex.ludc.lumprove.lusol.m_correlate.machar.make_array.make_dll.make_rt.map.mapcontinents.mapgrid.map_2points.map_continents.map_grid.map_image.map_patch.map_proj_forward.map_proj_image.map_proj_info.map_proj_init.map_proj_inverse.map_set.matrix_multiply.matrix_power.max.md_test.mean.meanabsdev.mean_filter.median.memory.mesh_clip.mesh_decimate.mesh_issolid.mesh_merge.mesh_numtriangles.mesh_obj.mesh_smooth.mesh_surfacearea.mesh_validate.mesh_volume.message.min.min_curve_surf.mk_html_help.modifyct.moment.morph_close.morph_distance.morph_gradient.morph_hitormiss.morph_open.morph_thin.morph_tophat.multi.n_elements.n_params.n_tags.ncdf.newton.noise_hurl.noise_pick.noise_scatter.noise_slur.norm.obj_class.obj_destroy.obj_hasmethod.obj_isa.obj_new.obj_valid.objarr.on_error.on_ioerror.online_help.openr.openu.openw.oplot.oploterr.orderedhash.p_correlate.parse_url.particle_trace.path_cache.path_sep.pcomp.plot.plot3d.plot.plot_3dbox.plot_field.ploterr.plots.polar_contour.polar_surface.polyfill.polyshade.pnt_line.point_lun.polarplot.poly.poly_2d.poly_area.poly_fit.polyfillv.polygon.polyline.polywarp.popd.powell.pref_commit.pref_get.pref_set.prewitt.primes.print.printf.printd.pro.product.profile.profiler.profiles.project_vol.ps_show_fonts.psafm.pseudo.ptr_free.ptr_new.ptr_valid.ptrarr.pushd.qgrid3.qhull.qromb.qromo.qsimp.query_*.query_ascii.query_bmp.query_csv.query_dicom.query_gif.query_image.query_jpeg.query_jpeg2000.query_mrsid.query_pict.query_png.query_ppm.query_srf.query_tiff.query_video.query_wav.r_correlate.r_test.radon.randomn.randomu.ranks.rdpix.read.readf.read_ascii.read_binary.read_bmp.read_csv.read_dicom.read_gif.read_image.read_interfile.read_jpeg.read_jpeg2000.read_mrsid.read_pict.read_png.read_ppm.read_spr.read_srf.read_sylk.read_tiff.read_video.read_wav.read_wave.read_x11_bitmap.read_xwd.reads.readu.real_part.rebin.recall_commands.recon3.reduce_colors.reform.region_grow.register_cursor.regress.replicate.replicate_inplace.resolve_all.resolve_routine.restore.retall.return.reverse.rk4.roberts.rot.rotate.round.routine_filepath.routine_info.rs_test.s_test.save.savgol.scale3.scale3d.scatterplot.scatterplot3d.scope_level.scope_traceback.scope_varfetch.scope_varname.search2d.search3d.sem_create.sem_delete.sem_lock.sem_release.set_plot.set_shading.setenv.sfit.shade_surf.shade_surf_irr.shade_volume.shift.shift_diff.shmdebug.shmmap.shmunmap.shmvar.show3.showfont.signum.simplex.sin.sindgen.sinh.size.skewness.skip_lun.slicer3.slide_image.smooth.sobel.socket.sort.spawn.sph_4pnt.sph_scat.spher_harm.spl_init.spl_interp.spline.spline_p.sprsab.sprsax.sprsin.sprstp.sqrt.standardize.stddev.stop.strarr.strcmp.strcompress.streamline.streamline.stregex.stretch.string.strjoin.strlen.strlowcase.strmatch.strmessage.strmid.strpos.strput.strsplit.strtrim.struct_assign.struct_hide.strupcase.surface.surface.surfr.svdc.svdfit.svsol.swap_endian.swap_endian_inplace.symbol.systime.t_cvf.t_pdf.t3d.tag_names.tan.tanh.tek_color.temporary.terminal_size.tetra_clip.tetra_surface.tetra_volume.text.thin.thread.threed.tic.time_test2.timegen.timer.timestamp.timestamptovalues.tm_test.toc.total.trace.transpose.tri_surf.triangulate.trigrid.triql.trired.trisol.truncate_lun.ts_coef.ts_diff.ts_fcast.ts_smooth.tv.tvcrs.tvlct.tvrd.tvscl.typename.uindgen.uint.uintarr.ul64indgen.ulindgen.ulon64arr.ulonarr.ulong.ulong64.uniq.unsharp_mask.usersym.value_locate.variance.vector.vector_field.vel.velovect.vert_t3d.voigt.volume.voronoi.voxel_proj.wait.warp_tri.watershed.wdelete.wf_draw.where.widget_base.widget_button.widget_combobox.widget_control.widget_displaycontextmenu.widget_draw.widget_droplist.widget_event.widget_info.widget_label.widget_list.widget_propertysheet.widget_slider.widget_tab.widget_table.widget_text.widget_tree.widget_tree_move.widget_window.wiener_filter.window.window.write_bmp.write_csv.write_gif.write_image.write_jpeg.write_jpeg2000.write_nrif.write_pict.write_png.write_ppm.write_spr.write_srf.write_sylk.write_tiff.write_video.write_wav.write_wave.writeu.wset.wshow.wtn.wv_applet.wv_cwt.wv_cw_wavelet.wv_denoise.wv_dwt.wv_fn_coiflet.wv_fn_daubechies.wv_fn_gaussian.wv_fn_haar.wv_fn_morlet.wv_fn_paul.wv_fn_symlet.wv_import_data.wv_import_wavelet.wv_plot3d_wps.wv_plot_multires.wv_pwt.wv_tool_denoise.xbm_edit.xdisplayfile.xdxf.xfont.xinteranimate.xloadct.xmanager.xmng_tmpl.xmtool.xobjview.xobjview_rotate.xobjview_write_image.xpalette.xpcolor.xplot3d.xregistered.xroi.xsq_test.xsurface.xvaredit.xvolume.xvolume_rotate.xvolume_write_image.xyouts.zlib_compress.zlib_uncompress.zoom.zoom_24".split("."),a=t(r),i=["begin","end","endcase","endfor","endwhile","endif","endrep","endforeach","break","case","continue","for","foreach","goto","if","then","else","repeat","until","switch","while","do","pro","function"],_=t(i),o=RegExp("^[_a-z\xA1-\uFFFF][_a-z0-9\xA1-\uFFFF]*","i"),l=/[+\-*&=<>\/@#~$]/,s=RegExp("(and|or|eq|lt|le|gt|ge|ne|not)","i");function n(e){return e.eatSpace()?null:e.match(";")?(e.skipToEnd(),"comment"):e.match(/^[0-9\.+-]/,!1)&&(e.match(/^[+-]?0x[0-9a-fA-F]+/)||e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":e.match(/^"([^"]|(""))*"/)||e.match(/^'([^']|(''))*'/)?"string":e.match(_)?"keyword":e.match(a)?"builtin":e.match(o)?"variable":e.match(l)||e.match(s)?"operator":(e.next(),null)}const c={name:"idl",token:function(e){return n(e)},languageData:{autocomplete:r.concat(i)}};export{c as t};
import{s as x,t as b}from"./chunk-LvLJmgfZ.js";import{t as y}from"./react-Bj1aDYRI.js";import{t as E}from"./compiler-runtime-B3qBwwSJ.js";import{t as S}from"./jsx-runtime-ZmTK25f3.js";var T=b((()=>{(()=>{var v={792:(l,r,e)=>{e.d(r,{Z:()=>h});var n=e(609),d=e.n(n)()((function(m){return m[1]}));d.push([l.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);let h=d},609:l=>{l.exports=function(r){var e=[];return e.toString=function(){return this.map((function(n){var d=r(n);return n[2]?`@media ${n[2]} {${d}}`:d})).join("")},e.i=function(n,d,h){typeof n=="string"&&(n=[[null,n,""]]);var m={};if(h)for(var f=0;f<this.length;f++){var u=this[f][0];u!=null&&(m[u]=!0)}for(var t=0;t<n.length;t++){var o=[].concat(n[t]);h&&m[o[0]]||(d&&(o[2]?o[2]=`${d} and ${o[2]}`:o[2]=d),e.push(o))}},e}}},s={};function c(l){var r=s[l];if(r!==void 0)return r.exports;var e=s[l]={id:l,exports:{}};return v[l](e,e.exports,c),e.exports}c.n=l=>{var r=l&&l.__esModule?()=>l.default:()=>l;return c.d(r,{a:r}),r},c.d=(l,r)=>{for(var e in r)c.o(r,e)&&!c.o(l,e)&&Object.defineProperty(l,e,{enumerable:!0,get:r[e]})},c.o=(l,r)=>Object.prototype.hasOwnProperty.call(l,r),(()=>{var l=c(792);let r="rendered",e=(t,o)=>{let i=t.getBoundingClientRect(),a,p;return o.type==="mousedown"?(a=o.clientX,p=o.clientY):(a=o.touches[0].clientX,p=o.touches[0].clientY),a>=i.x&&a<=i.x+i.width&&p>=i.y&&p<=i.y+i.height},n,d={ArrowLeft:-1,ArrowRight:1},h=["horizontal","vertical"],m=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),f=t=>({x:t.pageX,y:t.pageY}),u=typeof window<"u"&&(window==null?void 0:window.HTMLElement);typeof window<"u"&&(window.document&&(n=document.createElement("template"),n.innerHTML='<div class="second" id="second"> <slot name="second"><slot name="before"></slot></slot> </div> <div class="first" id="first"> <div class="first-overlay"> <div class="first-overlay-container" id="firstImageContainer"> <slot name="first"><slot name="after"></slot></slot> </div> </div> <div class="handle-container"> <div class="divider"></div> <div class="handle" id="handle"> <slot name="handle"> <svg xmlns="http://www.w3.org/2000/svg" class="default-handle" viewBox="-8 -3 16 6"> <path d="M -5 -2 L -7 0 L -5 2 M 5 -2 L 7 0 L 5 2" fill="none" vector-effect="non-scaling-stroke"/> </svg> </slot> </div> </div> </div> '),window.customElements.define("img-comparison-slider",class extends u{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=i=>{if(this.isMouseDown||this.slideOnHover){let a=f(i);this.slideToPage(a)}},this.bodyUserSelectStyle="",this.bodyWebkitUserSelectStyle="",this.onMouseDown=i=>{if(this.slideOnHover||this.handle&&!e(this.handleElement,i))return;i.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();let a=f(i);this.slideToPage(a),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,this.bodyWebkitUserSelectStyle=window.document.body.style.webkitUserSelect,window.document.body.style.userSelect="none",window.document.body.style.webkitUserSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.document.body.style.webkitUserSelect=this.bodyWebkitUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=i=>{this.dragByHandle&&!e(this.handleElement,i)||(this.touchStartPoint=m(i),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=i=>{if(this.touchStartPoint===null)return;let a=m(i);if(this.isTouchComparing)return this.slideToPage(a),i.preventDefault(),!1;if(!this.hasTouchMoved){let p=Math.abs(a.y-this.touchStartPoint.y),w=Math.abs(a.x-this.touchStartPoint.x);if(this.slideDirection==="horizontal"&&p<w||this.slideDirection==="vertical"&&p>w)return this.isTouchComparing=!0,this.focus(),this.slideToPage(a),i.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=i=>{if(this.keyboard==="disabled")return;let a=d[i.key];this.animationDirection!==a&&a!==void 0&&(this.animationDirection=a,this.startSlideAnimation())},this.onKeyUp=i=>{if(this.keyboard==="disabled")return;let a=d[i.key];a!==void 0&&this.animationDirection===a&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};let t=this.attachShadow({mode:"open"}),o=document.createElement("style");o.innerHTML=l.Z,this.getAttribute("nonce")&&o.setAttribute("nonce",this.getAttribute("nonce")),t.appendChild(o),t.appendChild(n.content.cloneNode(!0)),this.firstElement=t.getElementById("first"),this.handleElement=t.getElementById("handle")}set handle(t){this.dragByHandle=t.toString().toLowerCase()!=="false"}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(t){let o=parseFloat(t);o!==this.exposure&&(this.exposure=o,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover=t.toString().toLowerCase()!=="false",this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...h),h.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&this.getAttribute("keyboard")==="disabled"?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle")?this.getAttribute("handle"):this.dragByHandle,this.hover=this.hasAttribute("hover")?this.getAttribute("hover"):this.slideOnHover,this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):this.slideDirection,this.resetDimensions(),this.classList.contains(r)||this.classList.add(r)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,o,i){t==="hover"&&(this.hover=i),t==="direction"&&(this.direction=i),t==="keyboard"&&(this.keyboard=i==="disabled"?"disabled":"enabled")}setExposure(t=0){var o;this.exposure=(o=this.exposure+t)<0?0:o>100?100:o,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(t=0){this.setExposure(t);let o=new Event("slide");this.dispatchEvent(o)}slideToPage(t){this.slideDirection==="horizontal"&&this.slideToPageX(t.x),this.slideDirection==="vertical"&&this.slideToPageY(t.y)}slideToPageX(t){this.exposure=(t-this.getBoundingClientRect().left-window.scrollX)/this.imageWidth*100,this.slide(0)}slideToPageY(t){this.exposure=(t-this.getBoundingClientRect().top-window.scrollY)/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,o=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");let i=a=>{if(this.animationDirection===0||o!==this.animationDirection)return;t===null&&(t=a);let p=(a-t)/16.666666666666668*this.animationDirection;this.slide(p),setTimeout((()=>window.requestAnimationFrame(i)),0),t=a};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}))})()})()})),M=b((v=>{var s=v&&v.__createBinding||(Object.create?(function(e,n,d,h){h===void 0&&(h=d),Object.defineProperty(e,h,{enumerable:!0,get:function(){return n[d]}})}):(function(e,n,d,h){h===void 0&&(h=d),e[h]=n[d]})),c=v&&v.__setModuleDefault||(Object.create?(function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}):function(e,n){e.default=n}),l=v&&v.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var d in e)d!=="default"&&Object.prototype.hasOwnProperty.call(e,d)&&s(n,e,d);return c(n,e),n};Object.defineProperty(v,"__esModule",{value:!0}),v.ImgComparisonSlider=void 0;var r=y();typeof document<"u"&&Promise.resolve().then(()=>l(T())),v.ImgComparisonSlider=(0,r.forwardRef)(({children:e,onSlide:n,value:d,className:h,...m},f)=>{let u=(0,r.useRef)();return(0,r.useEffect)(()=>{d!==void 0&&(u.current.value=parseFloat(d.toString()))},[d,u]),(0,r.useEffect)(()=>{n&&u.current.addEventListener("slide",n)},[]),(0,r.useImperativeHandle)(f,()=>u.current,[u]),(0,r.createElement)("img-comparison-slider",Object.assign({class:h?`${h} rendered`:"rendered",tabIndex:0,ref:u},m),e)})})),D=E(),k=M();y();var g=x(S(),1),L=v=>{let s=(0,D.c)(15),{beforeSrc:c,afterSrc:l,value:r,direction:e,width:n,height:d}=v,h=n||"100%",m=d||(e==="vertical"?"400px":"auto"),f;s[0]!==h||s[1]!==m?(f={width:h,height:m,maxWidth:"100%"},s[0]=h,s[1]=m,s[2]=f):f=s[2];let u=f,t;s[3]===c?t=s[4]:(t=(0,g.jsx)("img",{slot:"first",src:c,alt:"Before",width:"100%"}),s[3]=c,s[4]=t);let o;s[5]===l?o=s[6]:(o=(0,g.jsx)("img",{slot:"second",src:l,alt:"After",width:"100%"}),s[5]=l,s[6]=o);let i;s[7]!==e||s[8]!==t||s[9]!==o||s[10]!==r?(i=(0,g.jsxs)(k.ImgComparisonSlider,{value:r,direction:e,children:[t,o]}),s[7]=e,s[8]=t,s[9]=o,s[10]=r,s[11]=i):i=s[11];let a;return s[12]!==u||s[13]!==i?(a=(0,g.jsx)("div",{style:u,children:i}),s[12]=u,s[13]=i,s[14]=a):a=s[14],a};export{L as default};
import{s as h}from"./chunk-LvLJmgfZ.js";import{t as f}from"./react-Bj1aDYRI.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{t as M}from"./jsx-runtime-ZmTK25f3.js";import{t as v}from"./button-CZ3Cs4qb.js";import{r as k}from"./input-DUrq2DiR.js";import{a as m,c as p,i,l as u,n as g,r as x,s as a,t as c}from"./alert-dialog-BW4srmS0.js";import{t as O}from"./dialog-eb-NieZw.js";var b=C(),d=h(f(),1),e=h(M(),1),j=d.createContext({modal:null,setModal:()=>{}});const y=t=>{let r=(0,b.c)(6),[s,o]=d.useState(null),l;r[0]===s?l=r[1]:(l={modal:s,setModal:o},r[0]=s,r[1]=l);let n;return r[2]!==s||r[3]!==t.children||r[4]!==l?(n=(0,e.jsxs)(j,{value:l,children:[s,t.children]}),r[2]=s,r[3]=t.children,r[4]=l,r[5]=n):n=r[5],n};function w(){let t=d.use(j);if(t===void 0)throw Error("useModal must be used within a ModalProvider");let r=()=>{t.setModal(null)};return{openModal:s=>{t.setModal((0,e.jsx)(O,{open:!0,onOpenChange:o=>{o||r()},children:s}))},openAlert:s=>{t.setModal((0,e.jsx)(c,{open:!0,onOpenChange:o=>{o||r()},children:(0,e.jsxs)(i,{children:[s,(0,e.jsx)(a,{children:(0,e.jsx)(g,{autoFocus:!0,onClick:r,children:"Ok"})})]})}))},openPrompt:s=>{t.setModal((0,e.jsx)(c,{open:!0,onOpenChange:o=>{o||r()},children:(0,e.jsx)(i,{children:(0,e.jsxs)("form",{onSubmit:o=>{o.preventDefault(),s.onConfirm(o.currentTarget.prompt.value),r()},children:[(0,e.jsxs)(p,{children:[(0,e.jsx)(u,{children:s.title}),(0,e.jsx)(m,{children:s.description}),(0,e.jsx)(k,{spellCheck:s.spellCheck,defaultValue:s.defaultValue,className:"my-4 h-8",name:"prompt",required:!0,autoFocus:!0,autoComplete:"off"})]}),(0,e.jsxs)(a,{children:[(0,e.jsx)(x,{onClick:r,children:"Cancel"}),(0,e.jsx)(v,{type:"submit",children:s.confirmText??"Ok"})]})]})})}))},openConfirm:s=>{t.setModal((0,e.jsx)(c,{open:!0,onOpenChange:o=>{o||r()},children:(0,e.jsxs)(i,{children:[(0,e.jsxs)(p,{children:[(0,e.jsx)(u,{className:s.variant==="destructive"?"text-destructive":"",children:s.title}),(0,e.jsx)(m,{children:s.description})]}),(0,e.jsxs)(a,{children:[(0,e.jsx)(x,{onClick:r,children:"Cancel"}),s.confirmAction]})]})}))},closeModal:r}}export{w as n,y as t};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as r}from"./chunk-LBM3YZW2-BRBe7ZaP.js";export{r as createInfoServices};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import{t as m}from"./chunk-XAJISQIX-0gvwv13B.js";import{n as o,r as e}from"./src-CsZby044.js";import{c as p}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as s}from"./chunk-EXTU4WIE-Dmu97ZvI.js";import"./chunk-O7ZBX7Z2-CFqB9i7k.js";import"./chunk-S6J4BHB3-C4KwSfr_.js";import"./chunk-LBM3YZW2-BRBe7ZaP.js";import"./chunk-76Q3JFCE-BAZ3z-Fu.js";import"./chunk-T53DSG4Q-Bhd043Cg.js";import"./chunk-LHMN2FUI-C4onQD9F.js";import"./chunk-FWNWRKHM-DzIkWreD.js";import{t as n}from"./mermaid-parser.core-BLHYb13y.js";var d={parse:o(async r=>{let t=await n("info",r);e.debug(t)},"parse")},f={version:m.version+""},g={parser:d,db:{getVersion:o(()=>f.version,"getVersion")},renderer:{draw:o((r,t,a)=>{e.debug(`rendering info diagram
`+r);let i=s(t);p(i,100,400,!0),i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${a}`)},"draw")}};export{g as diagram};
function a(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function n(t,e){switch(arguments.length){case 0:break;case 1:typeof t=="function"?this.interpolator(t):this.range(t);break;default:this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}return this}export{a as n,n as t};
import{s as mt}from"./chunk-LvLJmgfZ.js";import{t as zr}from"./react-Bj1aDYRI.js";import{t as ft}from"./compiler-runtime-B3qBwwSJ.js";import{t as Kr}from"./jsx-runtime-ZmTK25f3.js";import{r as Gr}from"./button-CZ3Cs4qb.js";import{t as R}from"./cn-BKtXLv3a.js";import{t as qr}from"./createLucideIcon-BCdY6lG5.js";import{n as Zr,r as Yr,t as Xr}from"./x-ZP5cObgf.js";import{S as Jr}from"./Combination-BAEdC-rz.js";import{A as re,C as Qr,D as pt,E as ei,F as ti,I as vt,L as B,N as O,O as V,P as H,R as W,a as ai,d as ri,f as ii,i as bt,j as ht,k as gt,m as ni,o as yt,p as Se,r as oi,t as li,w as si,y as ui,z as Et}from"./usePress-C__vuri5.js";import{t as di}from"./SSRProvider-BIDQNg9Q.js";import{t as Fe}from"./context-BfYAMNLF.js";import{n as Me,t as Pt}from"./useNumberFormatter-Db6Vjve5.js";import{t as ci}from"./numbers-D7O23mOZ.js";import{t as wt}from"./useDebounce-7iEVSqwM.js";var Lt=qr("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);function mi(...e){return e.length===1&&e[0]?e[0]:a=>{let t=!1,r=e.map(i=>{let n=xt(i,a);return t||(t=typeof n=="function"),n});if(t)return()=>{r.forEach((i,n)=>{typeof i=="function"?i():xt(e[n],null)})}}}function xt(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}var fi=new Set(["id"]),pi=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),vi=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),bi=new Set(["dir","lang","hidden","inert","translate"]),Ct=new Set("onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart".split(".")),hi=/^(data-.*)$/;function z(e,a={}){let{labelable:t,isLink:r,global:i,events:n=i,propNames:o}=a,s={};for(let u in e)Object.prototype.hasOwnProperty.call(e,u)&&(fi.has(u)||t&&pi.has(u)||r&&vi.has(u)||i&&bi.has(u)||n&&Ct.has(u)||u.endsWith("Capture")&&Ct.has(u.slice(0,-7))||o!=null&&o.has(u)||hi.test(u))&&(s[u]=e[u]);return s}function Dt(e,a){let{id:t,"aria-label":r,"aria-labelledby":i}=e;return t=B(t),i&&r?i=[...new Set([t,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&a&&(r=a),{id:t,"aria-label":r,"aria-labelledby":i}}var l=mt(zr(),1);function Nt(e){let a=(0,l.useRef)(null),t=(0,l.useRef)(void 0),r=(0,l.useCallback)(i=>{if(typeof e=="function"){let n=e,o=n(i);return()=>{typeof o=="function"?o():n(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return(0,l.useMemo)(()=>({get current(){return a.current},set current(i){a.current=i,t.current&&(t.current=(t.current(),void 0)),i!=null&&(t.current=r(i))}}),[r])}function St(e,a,t,r){let i=W(t),n=t==null;(0,l.useEffect)(()=>{if(n||!e.current)return;let o=e.current;return o.addEventListener(a,i,r),()=>{o.removeEventListener(a,i,r)}},[e,a,r,n,i])}function Te(e,a,t){let r=W(()=>{t&&t(a)});(0,l.useEffect)(()=>{var n;let i=(n=e==null?void 0:e.current)==null?void 0:n.form;return i==null||i.addEventListener("reset",r),()=>{i==null||i.removeEventListener("reset",r)}},[e,r])}function Ve(e,a,t){let[r,i]=(0,l.useState)(e||a),n=(0,l.useRef)(e!==void 0),o=e!==void 0;(0,l.useEffect)(()=>{n.current,n.current=o},[o]);let s=o?e:r,u=(0,l.useCallback)((d,...f)=>{let c=(m,...v)=>{t&&(Object.is(s,m)||t(m,...v)),o||(s=m)};typeof d=="function"?i((m,...v)=>{let b=d(o?s:m,...v);return c(b,...f),o?m:b}):(o||i(d),c(d,...f))},[o,s,t]);return[s,u]}function de(e,a=-1/0,t=1/0){return Math.min(Math.max(e,a),t)}function ce(e,a){let t=e,r=0,i=a.toString(),n=i.toLowerCase().indexOf("e-");if(n>0)r=Math.abs(Math.floor(Math.log10(Math.abs(a))))+n;else{let o=i.indexOf(".");o>=0&&(r=i.length-o)}if(r>0){let o=10**r;t=Math.round(t*o)/o}return t}function j(e,a,t,r){a=Number(a),t=Number(t);let i=(e-(isNaN(a)?0:a))%r,n=ce(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return isNaN(a)?!isNaN(t)&&n>t&&(n=Math.floor(ce(t/r,r))*r):n<a?n=a:!isNaN(t)&&n>t&&(n=a+Math.floor(ce((t-a)/r,r))*r),n=ce(n,r),n}var Ft=Symbol("default");function Mt({values:e,children:a}){for(let[t,r]of e)a=l.createElement(t.Provider,{value:r},a);return a}function Z(e){let{className:a,style:t,children:r,defaultClassName:i,defaultChildren:n,defaultStyle:o,values:s}=e;return(0,l.useMemo)(()=>{let u,d,f;return u=typeof a=="function"?a({...s,defaultClassName:i}):a,d=typeof t=="function"?t({...s,defaultStyle:o||{}}):t,f=typeof r=="function"?r({...s,defaultChildren:n}):r??n,{className:u??i,style:d||o?{...o,...d}:void 0,children:f??n,"data-rac":""}},[a,t,r,i,n,o,s])}function gi(e,a){return t=>a(typeof e=="function"?e(t):e,t)}function $e(e,a){let t=(0,l.useContext)(e);if(a===null)return null;if(t&&typeof t=="object"&&"slots"in t&&t.slots){let r=a||Ft;if(!t.slots[r]){let i=new Intl.ListFormat().format(Object.keys(t.slots).map(o=>`"${o}"`)),n=a?`Invalid slot "${a}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${i}.`)}return t.slots[r]}return t}function K(e,a,t){let{ref:r,...i}=$e(t,e.slot)||{},n=Nt((0,l.useMemo)(()=>mi(a,r),[a,r])),o=V(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?o.style=s=>{let u=typeof i.style=="function"?i.style(s):i.style,d={...s.defaultStyle,...u},f=typeof e.style=="function"?e.style({...s,defaultStyle:d}):e.style;return{...d,...f}}:o.style={...i.style,...e.style}),[o,n]}function Tt(e=!0){let[a,t]=(0,l.useState)(e),r=(0,l.useRef)(!1),i=(0,l.useCallback)(n=>{r.current=!0,t(!!n)},[]);return Et(()=>{r.current||t(!1)},[]),[i,a]}function Vt(e){let a=/^(data-.*)$/,t={};for(let r in e)a.test(r)||(t[r]=e[r]);return t}var $t=7e3,k=null;function ke(e,a="assertive",t=$t){k?k.announce(e,a,t):(k=new Ei,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?k.announce(e,a,t):setTimeout(()=>{k!=null&&k.isAttached()&&(k==null||k.announce(e,a,t))},100))}function yi(e){k&&k.clear(e)}var Ei=class{isAttached(){var e;return(e=this.node)==null?void 0:e.isConnected}createLog(e){let a=document.createElement("div");return a.setAttribute("role","log"),a.setAttribute("aria-live",e),a.setAttribute("aria-relevant","additions"),a}destroy(){this.node&&(this.node=(document.body.removeChild(this.node),null))}announce(e,a="assertive",t=$t){var r,i;if(!this.node)return;let n=document.createElement("div");typeof e=="object"?(n.setAttribute("role","img"),n.setAttribute("aria-labelledby",e["aria-labelledby"])):n.textContent=e,a==="assertive"?(r=this.assertiveLog)==null||r.appendChild(n):(i=this.politeLog)==null||i.appendChild(n),e!==""&&setTimeout(()=>{n.remove()},t)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}},Pi=Symbol.for("react-aria.i18n.locale"),wi=Symbol.for("react-aria.i18n.strings"),Y=void 0,Ie=class Ir{getStringForLocale(a,t){let r=this.getStringsForLocale(t)[a];if(!r)throw Error(`Could not find intl message ${a} in ${t} locale`);return r}getStringsForLocale(a){let t=this.strings[a];return t||(t=Li(a,this.strings,this.defaultLocale),this.strings[a]=t),t}static getGlobalDictionaryForPackage(a){if(typeof window>"u")return null;let t=window[Pi];if(Y===void 0){let i=window[wi];if(!i)return null;for(let n in Y={},i)Y[n]=new Ir({[t]:i[n]},t)}let r=Y==null?void 0:Y[a];if(!r)throw Error(`Strings for package "${a}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(a,t="en-US"){this.strings=Object.fromEntries(Object.entries(a).filter(([,r])=>r)),this.defaultLocale=t}};function Li(e,a,t="en-US"){if(a[e])return a[e];let r=xi(e);if(a[r])return a[r];for(let i in a)if(i.startsWith(r+"-"))return a[i];return a[t]}function xi(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}var kt=new Map,It=new Map,Rt=class{format(e,a){let t=this.strings.getStringForLocale(e,this.locale);return typeof t=="function"?t(a,this):t}plural(e,a,t="cardinal"){let r=a["="+e];if(r)return typeof r=="function"?r():r;let i=this.locale+":"+t,n=kt.get(i);return n||(n=new Intl.PluralRules(this.locale,{type:t}),kt.set(i,n)),r=a[n.select(e)]||a.other,typeof r=="function"?r():r}number(e){let a=It.get(this.locale);return a||(a=new Intl.NumberFormat(this.locale),It.set(this.locale,a)),a.format(e)}select(e,a){let t=e[a]||e.other;return typeof t=="function"?t():t}constructor(e,a){this.locale=e,this.strings=a}},jt=new WeakMap;function Ci(e){let a=jt.get(e);return a||(a=new Ie(e),jt.set(e,a)),a}function At(e,a){return a&&Ie.getGlobalDictionaryForPackage(a)||Ci(e)}function Re(e,a){let{locale:t}=Fe(),r=At(e,a);return(0,l.useMemo)(()=>new Rt(t,r),[t,r])}var Di=RegExp("^.*\\(.*\\).*$"),Ni=["latn","arab","hanidec","deva","beng","fullwide"],je=class{parse(e){return Ae(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,a,t){return Ae(this.locale,this.options,e).isValidPartialNumber(e,a,t)}getNumberingSystem(e){return Ae(this.locale,this.options,e).options.numberingSystem}constructor(e,a={}){this.locale=e,this.options=a}},Bt=new Map;function Ae(e,a,t){let r=Ot(e,a);if(!e.includes("-nu-")&&!r.isValidPartialNumber(t)){for(let i of Ni)if(i!==r.options.numberingSystem){let n=Ot(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,a);if(n.isValidPartialNumber(t))return n}}return r}function Ot(e,a){let t=e+(a?Object.entries(a).sort((i,n)=>i[0]<n[0]?-1:1).join():""),r=Bt.get(t);return r||(r=new Si(e,a),Bt.set(t,r)),r}var Si=class{parse(e){let a=this.sanitize(e);if(this.symbols.group&&(a=X(a,this.symbols.group,"")),this.symbols.decimal&&(a=a.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(a=a.replace(this.symbols.minusSign,"-")),a=a.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let r=a.indexOf("-");a=a.replace("-",""),a=a.replace("+","");let i=a.indexOf(".");i===-1&&(i=a.length),a=a.replace(".",""),a=i-2==0?`0.${a}`:i-2==-1?`0.0${a}`:i-2==-2?"0.00":`${a.slice(0,i-2)}.${a.slice(i-2)}`,r>-1&&(a=`-${a}`)}let t=a?+a:NaN;if(isNaN(t))return NaN;if(this.options.style==="percent"){let r={...this.options,style:"decimal",minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new je(this.locale,r).parse(new Me(this.locale,r).format(t))}return this.options.currencySign==="accounting"&&Di.test(e)&&(t=-1*t),t}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("\u060C",this.symbols.decimal)),this.symbols.group&&(e=X(e,".",this.symbols.group))),this.symbols.group==="\u2019"&&e.includes("'")&&(e=X(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=X(e," ",this.symbols.group),e=X(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,a=-1/0,t=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&a<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&t>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=X(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,a={}){this.locale=e,a.roundingIncrement!==1&&a.roundingIncrement!=null&&(a.maximumFractionDigits==null&&a.minimumFractionDigits==null?(a.maximumFractionDigits=0,a.minimumFractionDigits=0):a.maximumFractionDigits==null?a.maximumFractionDigits=a.minimumFractionDigits:a.minimumFractionDigits??(a.minimumFractionDigits=a.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,a),this.options=this.formatter.resolvedOptions(),this.symbols=Mi(e,this.formatter,this.options,a),this.options.style==="percent"&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}},Ht=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),Fi=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Mi(e,a,t,r){var C,w,N,x;let i=new Intl.NumberFormat(e,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),n=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=Fi.map(y=>i.formatToParts(y)),u=((C=n.find(y=>y.type==="minusSign"))==null?void 0:C.value)??"-",d=(w=o.find(y=>y.type==="plusSign"))==null?void 0:w.value;!d&&((r==null?void 0:r.signDisplay)==="exceptZero"||(r==null?void 0:r.signDisplay)==="always")&&(d="+");let f=(N=new Intl.NumberFormat(e,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(y=>y.type==="decimal"))==null?void 0:N.value,c=(x=n.find(y=>y.type==="group"))==null?void 0:x.value,m=n.filter(y=>!Ht.has(y.type)).map(y=>Wt(y.value)),v=s.flatMap(y=>y.filter(P=>!Ht.has(P.type)).map(P=>Wt(P.value))),b=[...new Set([...m,...v])].sort((y,P)=>P.length-y.length),p=b.length===0?RegExp("[\\p{White_Space}]","gu"):RegExp(`${b.join("|")}|[\\p{White_Space}]`,"gu"),h=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(9876543210)].reverse(),g=new Map(h.map((y,P)=>[y,P])),E=RegExp(`[${h.join("")}]`,"g");return{minusSign:u,plusSign:d,decimal:f,group:c,literals:p,numeral:E,index:y=>String(g.get(y))}}function X(e,a,t){return e.replaceAll?e.replaceAll(a,t):e.split(a).join(t)}function Wt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var A=null,ie=new Set,ne=new Map,G=!1,Be=!1,Ti={Tab:!0,Escape:!0};function me(e,a){for(let t of ie)t(e,a)}function Vi(e){return!(e.metaKey||!Qr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function fe(e){G=!0,Vi(e)&&(A="keyboard",me("keyboard",e))}function J(e){A="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(G=!0,me("pointer",e))}function _t(e){ri(e)&&(G=!0,A="virtual")}function Ut(e){e.target===window||e.target===document||yt||!e.isTrusted||(!G&&!Be&&(A="virtual",me("virtual",e)),G=!1,Be=!1)}function zt(){yt||(G=!1,Be=!0)}function pe(e){if(typeof window>"u"||typeof document>"u"||ne.get(H(e)))return;let a=H(e),t=O(e),r=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){G=!0,r.apply(this,arguments)},t.addEventListener("keydown",fe,!0),t.addEventListener("keyup",fe,!0),t.addEventListener("click",_t,!0),a.addEventListener("focus",Ut,!0),a.addEventListener("blur",zt,!1),typeof PointerEvent<"u"&&(t.addEventListener("pointerdown",J,!0),t.addEventListener("pointermove",J,!0),t.addEventListener("pointerup",J,!0)),a.addEventListener("beforeunload",()=>{Kt(e)},{once:!0}),ne.set(a,{focus:r})}var Kt=(e,a)=>{let t=H(e),r=O(e);a&&r.removeEventListener("DOMContentLoaded",a),ne.has(t)&&(t.HTMLElement.prototype.focus=ne.get(t).focus,r.removeEventListener("keydown",fe,!0),r.removeEventListener("keyup",fe,!0),r.removeEventListener("click",_t,!0),t.removeEventListener("focus",Ut,!0),t.removeEventListener("blur",zt,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",J,!0),r.removeEventListener("pointermove",J,!0),r.removeEventListener("pointerup",J,!0)),ne.delete(t))};function $i(e){let a=O(e),t;return a.readyState==="loading"?(t=()=>{pe(e)},a.addEventListener("DOMContentLoaded",t)):pe(e),()=>Kt(e,t)}typeof document<"u"&&$i();function Oe(){return A!=="pointer"}function Gt(){return A}function qt(e){A=e,me(e,null)}function ki(){pe();let[e,a]=(0,l.useState)(A);return(0,l.useEffect)(()=>{let t=()=>{a(A)};return ie.add(t),()=>{ie.delete(t)}},[]),di()?null:e}var Ii=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ri(e,a,t){let r=O(t==null?void 0:t.target),i=typeof window<"u"?H(t==null?void 0:t.target).HTMLInputElement:HTMLInputElement,n=typeof window<"u"?H(t==null?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?H(t==null?void 0:t.target).HTMLElement:HTMLElement,s=typeof window<"u"?H(t==null?void 0:t.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!Ii.has(r.activeElement.type)||r.activeElement instanceof n||r.activeElement instanceof o&&r.activeElement.isContentEditable,!(e&&a==="keyboard"&&t instanceof s&&!Ti[t.key])}function ji(e,a,t){pe(),(0,l.useEffect)(()=>{let r=(i,n)=>{Ri(!!(t!=null&&t.isTextInput),i,n)&&e(Oe())};return ie.add(r),()=>{ie.delete(r)}},a)}function Zt(e){let a=O(e),t=re(a);if(Gt()==="virtual"){let r=t;ni(()=>{re(a)===r&&e.isConnected&&pt(e)})}else pt(e)}function He(e){let{isDisabled:a,onFocus:t,onBlur:r,onFocusChange:i}=e,n=(0,l.useCallback)(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),o=bt(n),s=(0,l.useCallback)(u=>{let d=O(u.target),f=d?re(d):re();u.target===u.currentTarget&&f===ht(u.nativeEvent)&&(t&&t(u),i&&i(!0),o(u))},[i,t,o]);return{focusProps:{onFocus:!a&&(t||i||r)?s:void 0,onBlur:!a&&(r||i)?n:void 0}}}function Yt(e){if(!e)return;let a=!0;return t=>{e({...t,preventDefault(){t.preventDefault()},isDefaultPrevented(){return t.isDefaultPrevented()},stopPropagation(){a=!0},continuePropagation(){a=!1},isPropagationStopped(){return a}}),a&&t.stopPropagation()}}function Xt(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Yt(e.onKeyDown),onKeyUp:Yt(e.onKeyUp)}}}var Jt=l.createContext(null);function Ai(e){let a=(0,l.useContext)(Jt)||{};ii(a,e);let{ref:t,...r}=a;return r}function Qt(e,a){let{focusProps:t}=He(e),{keyboardProps:r}=Xt(e),i=V(t,r),n=Ai(a),o=e.isDisabled?{}:n,s=(0,l.useRef)(e.autoFocus);(0,l.useEffect)(()=>{s.current&&a.current&&Zt(a.current),s.current=!1},[a]);let u=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(u=void 0),{focusableProps:V({...i,tabIndex:u},o)}}function We(e){let{isDisabled:a,onBlurWithin:t,onFocusWithin:r,onFocusWithinChange:i}=e,n=(0,l.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=Se(),u=(0,l.useCallback)(c=>{c.currentTarget.contains(c.target)&&n.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(n.current.isFocusWithin=!1,s(),t&&t(c),i&&i(!1))},[t,i,n,s]),d=bt(u),f=(0,l.useCallback)(c=>{if(!c.currentTarget.contains(c.target))return;let m=O(c.target),v=re(m);if(!n.current.isFocusWithin&&v===ht(c.nativeEvent)){r&&r(c),i&&i(!0),n.current.isFocusWithin=!0,d(c);let b=c.currentTarget;o(m,"focus",p=>{if(n.current.isFocusWithin&&!gt(b,p.target)){let h=new m.defaultView.FocusEvent("blur",{relatedTarget:p.target});ai(h,b),u(oi(h))}},{capture:!0})}},[r,i,d,o,u]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:f,onBlur:u}}}var _e=!1,ve=0;function Bi(){_e=!0,setTimeout(()=>{_e=!1},50)}function ea(e){e.pointerType==="touch"&&Bi()}function Oi(){if(!(typeof document>"u"))return ve===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",ea),ve++,()=>{ve--,!(ve>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",ea)}}function be(e){let{onHoverStart:a,onHoverChange:t,onHoverEnd:r,isDisabled:i}=e,[n,o]=(0,l.useState)(!1),s=(0,l.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,l.useEffect)(Oi,[]);let{addGlobalListener:u,removeAllGlobalListeners:d}=Se(),{hoverProps:f,triggerHoverEnd:c}=(0,l.useMemo)(()=>{let m=(p,h)=>{if(s.pointerType=h,i||h==="touch"||s.isHovered||!p.currentTarget.contains(p.target))return;s.isHovered=!0;let g=p.currentTarget;s.target=g,u(O(p.target),"pointerover",E=>{s.isHovered&&s.target&&!gt(s.target,E.target)&&v(E,E.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:g,pointerType:h}),t&&t(!0),o(!0)},v=(p,h)=>{let g=s.target;s.pointerType="",s.target=null,!(h==="touch"||!s.isHovered||!g)&&(s.isHovered=!1,d(),r&&r({type:"hoverend",target:g,pointerType:h}),t&&t(!1),o(!1))},b={};return typeof PointerEvent<"u"&&(b.onPointerEnter=p=>{_e&&p.pointerType==="mouse"||m(p,p.pointerType)},b.onPointerLeave=p=>{!i&&p.currentTarget.contains(p.target)&&v(p,p.pointerType)}),{hoverProps:b,triggerHoverEnd:v}},[a,t,r,i,s,u,d]);return(0,l.useEffect)(()=>{i&&c({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:f,isHovered:n}}function Hi(e,a){let{onScroll:t,isDisabled:r}=e,i=(0,l.useCallback)(n=>{n.ctrlKey||(n.preventDefault(),n.stopPropagation(),t&&t({deltaX:n.deltaX,deltaY:n.deltaY}))},[t]);St(a,"wheel",r?void 0:i)}function he(e={}){let{autoFocus:a=!1,isTextInput:t,within:r}=e,i=(0,l.useRef)({isFocused:!1,isFocusVisible:a||Oe()}),[n,o]=(0,l.useState)(!1),[s,u]=(0,l.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),d=(0,l.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),f=(0,l.useCallback)(v=>{i.current.isFocused=v,o(v),d()},[d]);ji(v=>{i.current.isFocusVisible=v,d()},[],{isTextInput:t});let{focusProps:c}=He({isDisabled:r,onFocusChange:f}),{focusWithinProps:m}=We({isDisabled:!r,onFocusWithinChange:f});return{isFocused:n,isFocusVisible:s,focusProps:r?m:c}}function ta(e){let{id:a,label:t,"aria-labelledby":r,"aria-label":i,labelElementType:n="label"}=e;a=B(a);let o=B(),s={};t&&(r=r?`${o} ${r}`:o,s={id:o,htmlFor:n==="label"?a:void 0});let u=Dt({id:a,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:u}}function aa(e){let{description:a,errorMessage:t,isInvalid:r,validationState:i}=e,{labelProps:n,fieldProps:o}=ta(e),s=vt([!!a,!!t,r,i]),u=vt([!!a,!!t,r,i]);return o=V(o,{"aria-describedby":[s,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:n,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:u}}}var ge={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},ra={...ge,customError:!0,valid:!1},Q={isInvalid:!1,validationDetails:ge,validationErrors:[]},Wi=(0,l.createContext)({}),ye="__formValidationState"+Date.now();function Ue(e){if(e[ye]){let{realtimeValidation:a,displayValidation:t,updateValidation:r,resetValidation:i,commitValidation:n}=e[ye];return{realtimeValidation:a,displayValidation:t,updateValidation:r,resetValidation:i,commitValidation:n}}return _i(e)}function _i(e){let{isInvalid:a,validationState:t,name:r,value:i,builtinValidation:n,validate:o,validationBehavior:s="aria"}=e;t&&(a||(a=t==="invalid"));let u=a===void 0?null:{isInvalid:a,validationErrors:[],validationDetails:ra},d=(0,l.useMemo)(()=>!o||i==null?null:ia(Ui(o,i)),[o,i]);n!=null&&n.validationDetails.valid&&(n=void 0);let f=(0,l.useContext)(Wi),c=(0,l.useMemo)(()=>r?Array.isArray(r)?r.flatMap(P=>ze(f[P])):ze(f[r]):[],[f,r]),[m,v]=(0,l.useState)(f),[b,p]=(0,l.useState)(!1);f!==m&&(v(f),p(!1));let h=(0,l.useMemo)(()=>ia(b?[]:c),[b,c]),g=(0,l.useRef)(Q),[E,C]=(0,l.useState)(Q),w=(0,l.useRef)(Q),N=()=>{if(!x)return;y(!1);let P=d||n||g.current;Ke(P,w.current)||(w.current=P,C(P))},[x,y]=(0,l.useState)(!1);return(0,l.useEffect)(N),{realtimeValidation:u||h||d||n||Q,displayValidation:s==="native"?u||h||E:u||h||d||n||E,updateValidation(P){s==="aria"&&!Ke(E,P)?C(P):g.current=P},resetValidation(){let P=Q;Ke(P,w.current)||(w.current=P,C(P)),s==="native"&&y(!1),p(!0)},commitValidation(){s==="native"&&y(!0),p(!0)}}}function ze(e){return e?Array.isArray(e)?e:[e]:[]}function Ui(e,a){if(typeof e=="function"){let t=e(a);if(t&&typeof t!="boolean")return ze(t)}return[]}function ia(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:ra}:null}function Ke(e,a){return e===a?!0:!!e&&!!a&&e.isInvalid===a.isInvalid&&e.validationErrors.length===a.validationErrors.length&&e.validationErrors.every((t,r)=>t===a.validationErrors[r])&&Object.entries(e.validationDetails).every(([t,r])=>a.validationDetails[t]===r)}function zi(...e){let a=new Set,t=!1,r={...ge};for(let o of e){var i,n;for(let s of o.validationErrors)a.add(s);for(let s in t||(t=o.isInvalid),r)(i=r)[n=s]||(i[n]=o.validationDetails[s])}return r.valid=!t,{isInvalid:t,validationErrors:[...a],validationDetails:r}}function na(e,a,t){let{validationBehavior:r,focus:i}=e;Et(()=>{if(r==="native"&&(t!=null&&t.current)&&!t.current.disabled){let d=a.realtimeValidation.isInvalid?a.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(d),t.current.hasAttribute("title")||(t.current.title=""),a.realtimeValidation.isInvalid||a.updateValidation(Gi(t.current))}});let n=(0,l.useRef)(!1),o=W(()=>{n.current||a.resetValidation()}),s=W(d=>{var m;a.displayValidation.isInvalid||a.commitValidation();let f=(m=t==null?void 0:t.current)==null?void 0:m.form;if(!d.defaultPrevented&&t&&f&&qi(f)===t.current){var c;i?i():(c=t.current)==null||c.focus(),qt("keyboard")}d.preventDefault()}),u=W(()=>{a.commitValidation()});(0,l.useEffect)(()=>{let d=t==null?void 0:t.current;if(!d)return;let f=d.form,c=f==null?void 0:f.reset;return f&&(f.reset=()=>{n.current=!window.event||window.event.type==="message"&&window.event.target instanceof MessagePort,c==null||c.call(f),n.current=!1}),d.addEventListener("invalid",s),d.addEventListener("change",u),f==null||f.addEventListener("reset",o),()=>{d.removeEventListener("invalid",s),d.removeEventListener("change",u),f==null||f.removeEventListener("reset",o),f&&(f.reset=c)}},[t,s,u,o,r])}function Ki(e){let a=e.validity;return{badInput:a.badInput,customError:a.customError,patternMismatch:a.patternMismatch,rangeOverflow:a.rangeOverflow,rangeUnderflow:a.rangeUnderflow,stepMismatch:a.stepMismatch,tooLong:a.tooLong,tooShort:a.tooShort,typeMismatch:a.typeMismatch,valueMissing:a.valueMissing,valid:a.valid}}function Gi(e){return{isInvalid:!e.validity.valid,validationDetails:Ki(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function qi(e){for(let a=0;a<e.elements.length;a++){let t=e.elements[a];if(!t.validity.valid)return t}return null}function Zi(e,a){let{inputElementType:t="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:n=!1,type:o="text",validationBehavior:s="aria"}=e,[u,d]=Ve(e.value,e.defaultValue||"",e.onChange),{focusableProps:f}=Qt(e,a),c=Ue({...e,value:u}),{isInvalid:m,validationErrors:v,validationDetails:b}=c.displayValidation,{labelProps:p,fieldProps:h,descriptionProps:g,errorMessageProps:E}=aa({...e,isInvalid:m,errorMessage:e.errorMessage||v}),C=z(e,{labelable:!0}),w={type:o,pattern:e.pattern},[N]=(0,l.useState)(u);return Te(a,e.defaultValue??N,d),na(e,c,a),(0,l.useEffect)(()=>{if(a.current instanceof H(a.current).HTMLTextAreaElement){let x=a.current;Object.defineProperty(x,"defaultValue",{get:()=>x.value,set:()=>{},configurable:!0})}},[a]),{labelProps:p,inputProps:V(C,t==="input"?w:void 0,{disabled:r,readOnly:n,required:i&&s==="native","aria-required":i&&s==="aria"||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:u,onChange:x=>d(x.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,enterKeyHint:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...f,...h}),descriptionProps:g,errorMessageProps:E,isInvalid:m,validationErrors:v,validationDetails:b}}function oa(){return typeof window<"u"&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"}function Yi(e,a,t){let r=W(c=>{let m=t.current;if(!m)return;let v=null;switch(c.inputType){case"historyUndo":case"historyRedo":return;case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":v=m.value.slice(0,m.selectionStart)+m.value.slice(m.selectionEnd);break;case"deleteContentForward":v=m.selectionEnd===m.selectionStart?m.value.slice(0,m.selectionStart)+m.value.slice(m.selectionEnd+1):m.value.slice(0,m.selectionStart)+m.value.slice(m.selectionEnd);break;case"deleteContentBackward":v=m.selectionEnd===m.selectionStart?m.value.slice(0,m.selectionStart-1)+m.value.slice(m.selectionStart):m.value.slice(0,m.selectionStart)+m.value.slice(m.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":v=m.value.slice(m.selectionStart);break;default:c.data!=null&&(v=m.value.slice(0,m.selectionStart)+c.data+m.value.slice(m.selectionEnd));break}(v==null||!a.validate(v))&&c.preventDefault()});(0,l.useEffect)(()=>{if(!oa()||!t.current)return;let c=t.current;return c.addEventListener("beforeinput",r,!1),()=>{c.removeEventListener("beforeinput",r,!1)}},[t,r]);let i=oa()?null:c=>{let m=c.target.value.slice(0,c.target.selectionStart)+c.data+c.target.value.slice(c.target.selectionEnd);a.validate(m)||c.preventDefault()},{labelProps:n,inputProps:o,descriptionProps:s,errorMessageProps:u,...d}=Zi(e,t),f=(0,l.useRef)(null);return{inputProps:V(o,{onBeforeInput:i,onCompositionStart(){let{value:c,selectionStart:m,selectionEnd:v}=t.current;f.current={value:c,selectionStart:m,selectionEnd:v}},onCompositionEnd(){if(t.current&&!a.validate(t.current.value)){let{value:c,selectionStart:m,selectionEnd:v}=f.current;t.current.value=c,t.current.setSelectionRange(m,v),a.setInputValue(c)}}}),labelProps:n,descriptionProps:s,errorMessageProps:u,...d}}if(typeof HTMLTemplateElement<"u"){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}var Ee=(0,l.createContext)(!1);function Xi(e){if((0,l.useContext)(Ee))return l.createElement(l.Fragment,null,e.children);let a=l.createElement(Ee.Provider,{value:!0},e.children);return l.createElement("template",{"data-react-aria-hidden":!0},a)}function Ge(e){let a=(t,r)=>(0,l.useContext)(Ee)?null:e(t,r);return a.displayName=e.displayName||e.name,(0,l.forwardRef)(a)}function Ji(){return(0,l.useContext)(Ee)}function la(e,a){let{elementType:t="button",isDisabled:r,onPress:i,onPressStart:n,onPressEnd:o,onPressUp:s,onPressChange:u,preventFocusOnPress:d,allowFocusWhenDisabled:f,onClick:c,href:m,target:v,rel:b,type:p="button"}=e,h;h=t==="button"?{type:p,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:t==="a"&&!r?m:void 0,target:t==="a"?v:void 0,type:t==="input"?p:void 0,disabled:t==="input"?r:void 0,"aria-disabled":!r||t==="input"?void 0:r,rel:t==="a"?b:void 0};let{pressProps:g,isPressed:E}=li({onPressStart:n,onPressEnd:o,onPressChange:u,onPress:i,onPressUp:s,onClick:c,isDisabled:r,preventFocusOnPress:d,ref:a}),{focusableProps:C}=Qt(e,a);f&&(C.tabIndex=r?-1:C.tabIndex);let w=V(C,g,z(e,{labelable:!0}));return{isPressed:E,buttonProps:V(h,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}function Qi(e){let{minValue:a,maxValue:t,step:r,formatOptions:i,value:n,defaultValue:o=NaN,onChange:s,locale:u,isDisabled:d,isReadOnly:f}=e;n===null&&(n=NaN),n!==void 0&&!isNaN(n)&&(n=r!==void 0&&!isNaN(r)?j(n,a,t,r):de(n,a,t)),isNaN(o)||(o=r!==void 0&&!isNaN(r)?j(o,a,t,r):de(o,a,t));let[c,m]=Ve(n,isNaN(o)?NaN:o,s),[v]=(0,l.useState)(c),[b,p]=(0,l.useState)(()=>isNaN(c)?"":new Me(u,i).format(c)),h=(0,l.useMemo)(()=>new je(u,i),[u,i]),g=(0,l.useMemo)(()=>h.getNumberingSystem(b),[h,b]),E=(0,l.useMemo)(()=>new Me(u,{...i,numberingSystem:g}),[u,i,g]),C=(0,l.useMemo)(()=>E.resolvedOptions(),[E]),w=(0,l.useCallback)(D=>isNaN(D)||D===null?"":E.format(D),[E]),N=Ue({...e,value:c}),x=r!==void 0&&!isNaN(r)?r:1;C.style==="percent"&&(r===void 0||isNaN(r))&&(x=.01);let[y,P]=(0,l.useState)(c),[M,$]=(0,l.useState)(u),[L,I]=(0,l.useState)(i);(!Object.is(c,y)||u!==M||i!==L)&&(p(w(c)),P(c),$(u),I(i));let S=(0,l.useMemo)(()=>h.parse(b),[h,b]),oe=()=>{if(!b.length){m(NaN),p(n===void 0?"":w(c));return}if(isNaN(S)){p(w(c));return}let D;D=r===void 0||isNaN(r)?de(S,a,t):j(S,a,t,r),D=h.parse(w(D)),m(D),p(w(n===void 0?D:c)),N.commitValidation()},q=(D,ue=0)=>{let _=S;if(isNaN(_))return j(isNaN(ue)?0:ue,a,t,x);{let te=j(_,a,t,x);return D==="+"&&te>_||D==="-"&&te<_?te:j(qe(D,_,x),a,t,x)}},ee=()=>{let D=q("+",a);D===c&&p(w(D)),m(D),N.commitValidation()},xe=()=>{let D=q("-",t);D===c&&p(w(D)),m(D),N.commitValidation()},le=()=>{t!=null&&(m(j(t,a,t,x)),N.commitValidation())},Ce=()=>{a!=null&&(m(a),N.commitValidation())},se=(0,l.useMemo)(()=>!d&&!f&&(isNaN(S)||t===void 0||isNaN(t)||j(S,a,t,x)>S||qe("+",S,x)<=t),[d,f,a,t,x,S]),De=(0,l.useMemo)(()=>!d&&!f&&(isNaN(S)||a===void 0||isNaN(a)||j(S,a,t,x)<S||qe("-",S,x)>=a),[d,f,a,t,x,S]);return{...N,validate:D=>h.isValidPartialNumber(D,a,t),increment:ee,incrementToMax:le,decrement:xe,decrementToMin:Ce,canIncrement:se,canDecrement:De,minValue:a,maxValue:t,numberValue:S,defaultNumberValue:isNaN(o)?v:o,setNumberValue:m,setInputValue:p,inputValue:b,commit:oe}}function qe(e,a,t){let r=e==="+"?a+t:a-t;if(a%1!=0||t%1!=0){let i=a.toString().split("."),n=t.toString().split("."),o=i[1]&&i[1].length||0,s=n[1]&&n[1].length||0,u=10**Math.max(o,s);a=Math.round(a*u),t=Math.round(t*u),r=e==="+"?a+t:a-t,r/=u}return r}var sa={};sa={Empty:"\u0641\u0627\u0631\u063A"};var ua={};ua={Empty:"\u0418\u0437\u043F\u0440\u0430\u0437\u043D\u0438"};var da={};da={Empty:"Pr\xE1zdn\xE9"};var ca={};ca={Empty:"Tom"};var ma={};ma={Empty:"Leer"};var fa={};fa={Empty:"\u0386\u03B4\u03B5\u03B9\u03BF"};var pa={};pa={Empty:"Empty"};var va={};va={Empty:"Vac\xEDo"};var ba={};ba={Empty:"T\xFChjenda"};var ha={};ha={Empty:"Tyhj\xE4"};var ga={};ga={Empty:"Vide"};var ya={};ya={Empty:"\u05E8\u05D9\u05E7"};var Ea={};Ea={Empty:"Prazno"};var Pa={};Pa={Empty:"\xDCres"};var wa={};wa={Empty:"Vuoto"};var La={};La={Empty:"\u7A7A"};var xa={};xa={Empty:"\uBE44\uC5B4 \uC788\uC74C"};var Ca={};Ca={Empty:"Tu\u0161\u010Dias"};var Da={};Da={Empty:"Tuk\u0161s"};var Na={};Na={Empty:"Tom"};var Sa={};Sa={Empty:"Leeg"};var Fa={};Fa={Empty:"Pusty"};var Ma={};Ma={Empty:"Vazio"};var Ta={};Ta={Empty:"Vazio"};var Va={};Va={Empty:"Gol"};var $a={};$a={Empty:"\u041D\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043E"};var ka={};ka={Empty:"Pr\xE1zdne"};var Ia={};Ia={Empty:"Prazen"};var Ra={};Ra={Empty:"Prazno"};var ja={};ja={Empty:"Tomt"};var Aa={};Aa={Empty:"Bo\u015F"};var Ba={};Ba={Empty:"\u041F\u0443\u0441\u0442\u043E"};var Oa={};Oa={Empty:"\u7A7A"};var Ha={};Ha={Empty:"\u7A7A\u767D"};var Wa={};Wa={"ar-AE":sa,"bg-BG":ua,"cs-CZ":da,"da-DK":ca,"de-DE":ma,"el-GR":fa,"en-US":pa,"es-ES":va,"et-EE":ba,"fi-FI":ha,"fr-FR":ga,"he-IL":ya,"hr-HR":Ea,"hu-HU":Pa,"it-IT":wa,"ja-JP":La,"ko-KR":xa,"lt-LT":Ca,"lv-LV":Da,"nb-NO":Na,"nl-NL":Sa,"pl-PL":Fa,"pt-BR":Ma,"pt-PT":Ta,"ro-RO":Va,"ru-RU":$a,"sk-SK":ka,"sl-SI":Ia,"sr-SP":Ra,"sv-SE":ja,"tr-TR":Aa,"uk-UA":Ba,"zh-CN":Oa,"zh-TW":Ha};function en(e){return e&&e.__esModule?e.default:e}function _a(e){let a=(0,l.useRef)(void 0),{value:t,textValue:r,minValue:i,maxValue:n,isDisabled:o,isReadOnly:s,isRequired:u,onIncrement:d,onIncrementPage:f,onDecrement:c,onDecrementPage:m,onDecrementToMin:v,onIncrementToMax:b}=e,p=Re(en(Wa),"@react-aria/spinbutton"),h=()=>clearTimeout(a.current);(0,l.useEffect)(()=>()=>h(),[]);let g=L=>{if(!(L.ctrlKey||L.metaKey||L.shiftKey||L.altKey||s||L.nativeEvent.isComposing))switch(L.key){case"PageUp":if(f){L.preventDefault(),f==null||f();break}case"ArrowUp":case"Up":d&&(L.preventDefault(),d==null||d());break;case"PageDown":if(m){L.preventDefault(),m==null||m();break}case"ArrowDown":case"Down":c&&(L.preventDefault(),c==null||c());break;case"Home":v&&(L.preventDefault(),v==null||v());break;case"End":b&&(L.preventDefault(),b==null||b());break}},E=(0,l.useRef)(!1),C=()=>{E.current=!0},w=()=>{E.current=!1},N=r===""?p.format("Empty"):(r||`${t}`).replace("-","\u2212");(0,l.useEffect)(()=>{E.current&&(yi("assertive"),ke(N,"assertive"))},[N]);let x=W(L=>{h(),d==null||d(),a.current=window.setTimeout(()=>{(n===void 0||isNaN(n)||t===void 0||isNaN(t)||t<n)&&x(60)},L)}),y=W(L=>{h(),c==null||c(),a.current=window.setTimeout(()=>{(i===void 0||isNaN(i)||t===void 0||isNaN(t)||t>i)&&y(60)},L)}),P=L=>{L.preventDefault()},{addGlobalListener:M,removeAllGlobalListeners:$}=Se();return{spinButtonProps:{role:"spinbutton","aria-valuenow":t!==void 0&&!isNaN(t)?t:void 0,"aria-valuetext":N,"aria-valuemin":i,"aria-valuemax":n,"aria-disabled":o||void 0,"aria-readonly":s||void 0,"aria-required":u||void 0,onKeyDown:g,onFocus:C,onBlur:w},incrementButtonProps:{onPressStart:()=>{x(400),M(window,"contextmenu",P)},onPressEnd:()=>{h(),$()},onFocus:C,onBlur:w},decrementButtonProps:{onPressStart:()=>{y(400),M(window,"contextmenu",P)},onPressEnd:()=>{h(),$()},onFocus:C,onBlur:w}}}var Ua={};Ua={decrease:e=>`\u062E\u0641\u0636 ${e.fieldLabel}`,increase:e=>`\u0632\u064A\u0627\u062F\u0629 ${e.fieldLabel}`,numberField:"\u062D\u0642\u0644 \u0631\u0642\u0645\u064A"};var za={};za={decrease:e=>`\u041D\u0430\u043C\u0430\u043B\u044F\u0432\u0430\u043D\u0435 ${e.fieldLabel}`,increase:e=>`\u0423\u0441\u0438\u043B\u0432\u0430\u043D\u0435 ${e.fieldLabel}`,numberField:"\u041D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043F\u043E\u043B\u0435\u0442\u043E"};var Ka={};Ka={decrease:e=>`Sn\xED\u017Eit ${e.fieldLabel}`,increase:e=>`Zv\xFD\u0161it ${e.fieldLabel}`,numberField:"\u010C\xEDseln\xE9 pole"};var Ga={};Ga={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xD8g ${e.fieldLabel}`,numberField:"Talfelt"};var qa={};qa={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xF6hen`,numberField:"Nummernfeld"};var Za={};Za={decrease:e=>`\u039C\u03B5\u03AF\u03C9\u03C3\u03B7 ${e.fieldLabel}`,increase:e=>`\u0391\u03CD\u03BE\u03B7\u03C3\u03B7 ${e.fieldLabel}`,numberField:"\u03A0\u03B5\u03B4\u03AF\u03BF \u03B1\u03C1\u03B9\u03B8\u03BC\u03BF\u03CD"};var Ya={};Ya={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var Xa={};Xa={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xFAmero"};var Ja={};Ja={decrease:e=>`V\xE4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xE4li"};var Qa={};Qa={decrease:e=>`V\xE4henn\xE4 ${e.fieldLabel}`,increase:e=>`Lis\xE4\xE4 ${e.fieldLabel}`,numberField:"Numerokentt\xE4"};var er={};er={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var tr={};tr={decrease:e=>`\u05D4\u05E7\u05D8\u05DF ${e.fieldLabel}`,increase:e=>`\u05D4\u05D2\u05D3\u05DC ${e.fieldLabel}`,numberField:"\u05E9\u05D3\u05D4 \u05DE\u05E1\u05E4\u05E8"};var ar={};ar={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u0107aj ${e.fieldLabel}`,numberField:"Polje broja"};var rr={};rr={decrease:e=>`${e.fieldLabel} cs\xF6kkent\xE9se`,increase:e=>`${e.fieldLabel} n\xF6vel\xE9se`,numberField:"Sz\xE1mmez\u0151"};var ir={};ir={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var nr={};nr={decrease:e=>`${e.fieldLabel}\u3092\u7E2E\u5C0F`,increase:e=>`${e.fieldLabel}\u3092\u62E1\u5927`,numberField:"\u6570\u5024\u30D5\u30A3\u30FC\u30EB\u30C9"};var or={};or={decrease:e=>`${e.fieldLabel} \uAC10\uC18C`,increase:e=>`${e.fieldLabel} \uC99D\uAC00`,numberField:"\uBC88\uD638 \uD544\uB4DC"};var lr={};lr={decrease:e=>`Suma\u017Einti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var sr={};sr={decrease:e=>`Samazin\u0101\u0161ana ${e.fieldLabel}`,increase:e=>`Palielin\u0101\u0161ana ${e.fieldLabel}`,numberField:"Skait\u013Cu lauks"};var ur={};ur={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xD8k ${e.fieldLabel}`,numberField:"Tallfelt"};var dr={};dr={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var cr={};cr={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u0119ksz ${e.fieldLabel}`,numberField:"Pole numeru"};var mr={};mr={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xFAmero"};var fr={};fr={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xE9rico"};var pr={};pr={decrease:e=>`Sc\u0103dere ${e.fieldLabel}`,increase:e=>`Cre\u0219tere ${e.fieldLabel}`,numberField:"C\xE2mp numeric"};var vr={};vr={decrease:e=>`\u0423\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0438\u0435 ${e.fieldLabel}`,increase:e=>`\u0423\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u0435 ${e.fieldLabel}`,numberField:"\u0427\u0438\u0441\u043B\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435"};var br={};br={decrease:e=>`Zn\xED\u017Ei\u0165 ${e.fieldLabel}`,increase:e=>`Zv\xFD\u0161i\u0165 ${e.fieldLabel}`,numberField:"\u010C\xEDseln\xE9 pole"};var hr={};hr={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u010Dajte ${e.fieldLabel}`,numberField:"\u0160tevil\u010Dno polje"};var gr={};gr={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u0107aj ${e.fieldLabel}`,numberField:"Polje broja"};var yr={};yr={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xD6ka ${e.fieldLabel}`,numberField:"Nummerf\xE4lt"};var Er={};Er={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u0131r`,numberField:"Say\u0131 alan\u0131"};var Pr={};Pr={decrease:e=>`\u0417\u043C\u0435\u043D\u0448\u0438\u0442\u0438 ${e.fieldLabel}`,increase:e=>`\u0417\u0431\u0456\u043B\u044C\u0448\u0438\u0442\u0438 ${e.fieldLabel}`,numberField:"\u041F\u043E\u043B\u0435 \u043D\u043E\u043C\u0435\u0440\u0430"};var wr={};wr={decrease:e=>`\u964D\u4F4E ${e.fieldLabel}`,increase:e=>`\u63D0\u9AD8 ${e.fieldLabel}`,numberField:"\u6570\u5B57\u5B57\u6BB5"};var Lr={};Lr={decrease:e=>`\u7E2E\u5C0F ${e.fieldLabel}`,increase:e=>`\u653E\u5927 ${e.fieldLabel}`,numberField:"\u6578\u5B57\u6B04\u4F4D"};var xr={};xr={"ar-AE":Ua,"bg-BG":za,"cs-CZ":Ka,"da-DK":Ga,"de-DE":qa,"el-GR":Za,"en-US":Ya,"es-ES":Xa,"et-EE":Ja,"fi-FI":Qa,"fr-FR":er,"he-IL":tr,"hr-HR":ar,"hu-HU":rr,"it-IT":ir,"ja-JP":nr,"ko-KR":or,"lt-LT":lr,"lv-LV":sr,"nb-NO":ur,"nl-NL":dr,"pl-PL":cr,"pt-BR":mr,"pt-PT":fr,"ro-RO":pr,"ru-RU":vr,"sk-SK":br,"sl-SI":hr,"sr-SP":gr,"sv-SE":yr,"tr-TR":Er,"uk-UA":Pr,"zh-CN":wr,"zh-TW":Lr};function tn(e){return e&&e.__esModule?e.default:e}function an(e,a,t){let{id:r,decrementAriaLabel:i,incrementAriaLabel:n,isDisabled:o,isReadOnly:s,isRequired:u,minValue:d,maxValue:f,autoFocus:c,label:m,formatOptions:v,onBlur:b=()=>{},onFocus:p,onFocusChange:h,onKeyDown:g,onKeyUp:E,description:C,errorMessage:w,isWheelDisabled:N,...x}=e,{increment:y,incrementToMax:P,decrement:M,decrementToMin:$,numberValue:L,inputValue:I,commit:S,commitValidation:oe}=a,q=Re(tn(xr),"@react-aria/numberfield"),ee=B(r),{focusProps:xe}=He({onBlur(){S()}}),le=Pt(v),Ce=(0,l.useMemo)(()=>le.resolvedOptions(),[le]),se=Pt({...v,currencySign:void 0}),{spinButtonProps:De,incrementButtonProps:tt,decrementButtonProps:D}=_a({isDisabled:o,isReadOnly:s,isRequired:u,maxValue:f,minValue:d,onIncrement:y,onIncrementToMax:P,onDecrement:M,onDecrementToMin:$,value:L,textValue:(0,l.useMemo)(()=>isNaN(L)?"":se.format(L),[se,L])}),[ue,_]=(0,l.useState)(!1),{focusWithinProps:te}=We({isDisabled:o,onFocusWithinChange:_});Hi({onScroll:(0,l.useCallback)(T=>{Math.abs(T.deltaY)<=Math.abs(T.deltaX)||(T.deltaY>0?y():T.deltaY<0&&M())},[M,y]),isDisabled:N||o||s||!ue},t);let at=(Ce.maximumFractionDigits??0)>0,rt=a.minValue===void 0||isNaN(a.minValue)||a.minValue<0,ae="numeric";ui()?rt?ae="text":at&&(ae="decimal"):si()&&(rt?ae="numeric":at&&(ae="decimal"));let Rr=T=>{a.validate(T)&&a.setInputValue(T)},jr=z(e),it=(0,l.useCallback)(T=>{T.nativeEvent.isComposing||(T.key==="Enter"?(S(),oe()):T.continuePropagation())},[S,oe]),{isInvalid:nt,validationErrors:Ar,validationDetails:Br}=a.displayValidation,{labelProps:ot,inputProps:Or,descriptionProps:Hr,errorMessageProps:Wr}=Yi({...x,...jr,name:void 0,form:void 0,label:m,autoFocus:c,isDisabled:o,isReadOnly:s,isRequired:u,validate:void 0,[ye]:a,value:I,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:ee,type:"text",inputMode:ae,onChange:Rr,onBlur:b,onFocus:p,onFocusChange:h,onKeyDown:(0,l.useMemo)(()=>ti(it,g),[it,g]),onKeyUp:E,description:C,errorMessage:w},a,t);Te(t,a.defaultNumberValue,a.setNumberValue);let lt=V(De,xe,Or,{role:null,"aria-roledescription":ei()?null:q.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});e.validationBehavior==="native"&&(lt["aria-required"]=void 0);let st=T=>{var ct;document.activeElement!==t.current&&(T.pointerType==="mouse"?(ct=t.current)==null||ct.focus():T.target.focus())},Ne=e["aria-label"]||(typeof e.label=="string"?e.label:""),U;Ne||(U=e.label==null?e["aria-labelledby"]:ot.id);let ut=B(),dt=B(),_r=V(tt,{"aria-label":n||q.format("increase",{fieldLabel:Ne}).trim(),id:U&&!n?ut:null,"aria-labelledby":U&&!n?`${ut} ${U}`:null,"aria-controls":ee,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!a.canIncrement,onPressStart:st}),Ur=V(D,{"aria-label":i||q.format("decrease",{fieldLabel:Ne}).trim(),id:U&&!i?dt:null,"aria-labelledby":U&&!i?`${dt} ${U}`:null,"aria-controls":ee,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!a.canDecrement,onPressStart:st});return{groupProps:{...te,role:"group","aria-disabled":o,"aria-invalid":nt?"true":void 0},labelProps:ot,inputProps:lt,incrementButtonProps:_r,decrementButtonProps:Ur,errorMessageProps:Wr,descriptionProps:Hr,isInvalid:nt,validationErrors:Ar,validationDetails:Br}}var Ze=(0,l.createContext)({}),rn=Ge(function(e,a){[e,a]=K(e,a,Ze);let{elementType:t="label",...r}=e;return l.createElement(t,{className:"react-aria-Label",...r,ref:a})}),nn=(0,l.createContext)(null),Ye=(0,l.createContext)({}),Cr=Ge(function(e,a){[e,a]=K(e,a,Ye);let t=e,{isPending:r}=t,{buttonProps:i,isPressed:n}=la(e,a);i=on(i,r);let{focusProps:o,isFocused:s,isFocusVisible:u}=he(e),{hoverProps:d,isHovered:f}=be({...e,isDisabled:e.isDisabled||r}),c={isHovered:f,isPressed:(t.isPressed||n)&&!r,isFocused:s,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:r??!1},m=Z({...e,values:c,defaultClassName:"react-aria-Button"}),v=B(i.id),b=B(),p=i["aria-labelledby"];r&&(p?p=`${p} ${b}`:i["aria-label"]&&(p=`${v} ${b}`));let h=(0,l.useRef)(r);(0,l.useEffect)(()=>{let E={"aria-labelledby":p||v};(!h.current&&s&&r||h.current&&s&&!r)&&ke(E,"assertive"),h.current=r},[r,s,p,v]);let g=z(e,{global:!0});return delete g.onClick,l.createElement("button",{...V(g,m,i,o,d),type:i.type==="submit"&&r?"button":i.type,id:v,ref:a,"aria-labelledby":p,slot:e.slot||void 0,"aria-disabled":r?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":c.isPressed||void 0,"data-hovered":f||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":u||void 0},l.createElement(nn.Provider,{value:{id:b}},m.children))});function on(e,a){if(a){for(let t in e)t.startsWith("on")&&!(t.includes("Focus")||t.includes("Blur"))&&(e[t]=void 0);e.href=void 0,e.target=void 0}return e}var Xe=(0,l.createContext)({}),Dr=(0,l.forwardRef)(function(e,a){[e,a]=K(e,a,Xe);let{elementType:t="span",...r}=e;return l.createElement(t,{className:"react-aria-Text",...r,ref:a})}),Pe=(0,l.createContext)(null),ln=(0,l.forwardRef)(function(e,a){var t;return(t=(0,l.useContext)(Pe))!=null&&t.isInvalid?l.createElement(sn,{...e,ref:a}):null}),sn=(0,l.forwardRef)((e,a)=>{let t=(0,l.useContext)(Pe),r=z(e,{global:!0}),i=Z({...e,defaultClassName:"react-aria-FieldError",defaultChildren:t.validationErrors.length===0?void 0:t.validationErrors.join(" "),values:t});return i.children==null?null:l.createElement(Dr,{slot:"errorMessage",...r,...i,ref:a})}),Nr=(0,l.createContext)(null),Je=(0,l.createContext)({}),un=(0,l.forwardRef)(function(e,a){[e,a]=K(e,a,Je);let{isDisabled:t,isInvalid:r,isReadOnly:i,onHoverStart:n,onHoverChange:o,onHoverEnd:s,...u}=e,{hoverProps:d,isHovered:f}=be({onHoverStart:n,onHoverChange:o,onHoverEnd:s,isDisabled:t}),{isFocused:c,isFocusVisible:m,focusProps:v}=he({within:!0});t??(t=!!e["aria-disabled"]&&e["aria-disabled"]!=="false"),r??(r=!!e["aria-invalid"]&&e["aria-invalid"]!=="false");let b=Z({...e,values:{isHovered:f,isFocusWithin:c,isFocusVisible:m,isDisabled:t,isInvalid:r},defaultClassName:"react-aria-Group"});return l.createElement("div",{...V(u,v,d),...b,ref:a,role:e.role??"group",slot:e.slot??void 0,"data-focus-within":c||void 0,"data-hovered":f||void 0,"data-focus-visible":m||void 0,"data-disabled":t||void 0,"data-invalid":r||void 0,"data-readonly":i||void 0},b.children)}),Qe=(0,l.createContext)({}),dn=e=>{let{onHoverStart:a,onHoverChange:t,onHoverEnd:r,...i}=e;return i},Sr=Ge(function(e,a){[e,a]=K(e,a,Qe);let{hoverProps:t,isHovered:r}=be(e),{isFocused:i,isFocusVisible:n,focusProps:o}=he({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",u=Z({...e,values:{isHovered:r,isFocused:i,isFocusVisible:n,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return l.createElement("input",{...V(dn(e),o,t),...u,ref:a,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":n||void 0,"data-invalid":s||void 0})}),cn=(0,l.createContext)(null),mn=(0,l.createContext)(null),fn=(0,l.forwardRef)(function(e,a){[e,a]=K(e,a,cn);let{validationBehavior:t}=$e(Nr)||{},r=e.validationBehavior??t??"native",{locale:i}=Fe(),n=Qi({...e,locale:i,validationBehavior:r}),o=(0,l.useRef)(null),[s,u]=Tt(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:c,incrementButtonProps:m,decrementButtonProps:v,descriptionProps:b,errorMessageProps:p,...h}=an({...Vt(e),label:u,validationBehavior:r},n,o),g=Z({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:h.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),E=z(e,{global:!0});return delete E.id,l.createElement(Mt,{values:[[mn,n],[Je,f],[Qe,{...c,ref:o}],[Ze,{...d,ref:s}],[Ye,{slots:{increment:m,decrement:v}}],[Xe,{slots:{description:b,errorMessage:p}}],[Pe,h]]},l.createElement("div",{...E,...g,ref:a,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":h.isInvalid||void 0}),e.name&&l.createElement("input",{type:"hidden",name:e.name,form:e.form,value:isNaN(n.numberValue)?"":n.numberValue,disabled:e.isDisabled||void 0}))}),Fr=ft(),F=mt(Kr(),1);const et=l.forwardRef((e,a)=>{let t=(0,Fr.c)(40),{placeholder:r,variant:i,...n}=e,o=i===void 0?"default":i,{locale:s}=Fe(),u=fn,d;t[0]===s?d=t[1]:(d=ci(s),t[0]=s,t[1]=d);let f;t[2]===d?f=t[3]:(f={minimumFractionDigits:0,maximumFractionDigits:d},t[2]=d,t[3]=f);let c=R("shadow-xs-solid hover:shadow-sm-solid hover:focus-within:shadow-md-solid","flex overflow-hidden rounded-sm border border-input bg-background text-sm font-code ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-xs-solid","focus-within:shadow-md-solid focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring focus-within:border-primary",o==="default"?"h-6 w-full mb-1":"h-4 w-full mb-0.5",o==="xs"&&"text-xs",n.className),m=n.isDisabled,v=o==="default"?"px-1.5":"px-1",b;t[4]===v?b=t[5]:(b=R("flex-1","w-full","placeholder:text-muted-foreground","outline-hidden","disabled:cursor-not-allowed disabled:opacity-50",v),t[4]=v,t[5]=b);let p;t[6]!==r||t[7]!==n.isDisabled||t[8]!==a||t[9]!==b?(p=(0,F.jsx)(Sr,{ref:a,disabled:m,placeholder:r,onKeyDown:pn,className:b}),t[6]=r,t[7]=n.isDisabled,t[8]=a,t[9]=b,t[10]=p):p=t[10];let h=n.isDisabled,g=o==="xs"&&"w-2 h-2",E;t[11]===g?E=t[12]:(E=R("w-3 h-3 -mb-px",g),t[11]=g,t[12]=E);let C;t[13]===E?C=t[14]:(C=(0,F.jsx)(Zr,{"aria-hidden":!0,className:E}),t[13]=E,t[14]=C);let w;t[15]!==n.isDisabled||t[16]!==C||t[17]!==o?(w=(0,F.jsx)(Mr,{slot:"increment",isDisabled:h,variant:o,children:C}),t[15]=n.isDisabled,t[16]=C,t[17]=o,t[18]=w):w=t[18];let N;t[19]===Symbol.for("react.memo_cache_sentinel")?(N=(0,F.jsx)("div",{className:"h-px shrink-0 divider bg-border z-10"}),t[19]=N):N=t[19];let x=n.isDisabled,y=o==="xs"&&"w-2 h-2",P;t[20]===y?P=t[21]:(P=R("w-3 h-3 -mt-px",y),t[20]=y,t[21]=P);let M;t[22]===P?M=t[23]:(M=(0,F.jsx)(Yr,{"aria-hidden":!0,className:P}),t[22]=P,t[23]=M);let $;t[24]!==n.isDisabled||t[25]!==M||t[26]!==o?($=(0,F.jsx)(Mr,{slot:"decrement",isDisabled:x,variant:o,children:M}),t[24]=n.isDisabled,t[25]=M,t[26]=o,t[27]=$):$=t[27];let L;t[28]!==w||t[29]!==$?(L=(0,F.jsxs)("div",{className:"flex flex-col border-s-2",children:[w,N,$]}),t[28]=w,t[29]=$,t[30]=L):L=t[30];let I;t[31]!==L||t[32]!==c||t[33]!==p?(I=(0,F.jsxs)("div",{className:c,children:[p,L]}),t[31]=L,t[32]=c,t[33]=p,t[34]=I):I=t[34];let S;return t[35]!==u||t[36]!==n||t[37]!==I||t[38]!==f?(S=(0,F.jsx)(u,{...n,formatOptions:f,children:I}),t[35]=u,t[36]=n,t[37]=I,t[38]=f,t[39]=S):S=t[39],S});et.displayName="NumberField";var Mr=e=>{let a=(0,Fr.c)(6),t=!e.isDisabled&&"hover:text-primary hover:bg-muted",r=e.variant==="default"?"px-0.5":"px-0.25",i;a[0]!==t||a[1]!==r?(i=R("cursor-default text-muted-foreground pressed:bg-muted-foreground group-disabled:text-disabled-foreground outline-hidden focus-visible:text-primary","disabled:cursor-not-allowed disabled:opacity-50",t,r),a[0]=t,a[1]=r,a[2]=i):i=a[2];let n;return a[3]!==e||a[4]!==i?(n=(0,F.jsx)(Cr,{...e,className:i}),a[3]=e,a[4]=i,a[5]=n):n=a[5],n};function pn(e){(e.key==="ArrowUp"||e.key==="ArrowDown")&&e.stopPropagation()}var we=ft(),Le=l.forwardRef((e,a)=>{let t=(0,we.c)(28),r,i,n,o,s,u,d;if(t[0]!==a||t[1]!==e){u=Symbol.for("react.early_return_sentinel");e:{if({className:r,type:d,endAdornment:i,...o}=e,n=o.icon,d==="hidden"){u=(0,F.jsx)("input",{type:"hidden",ref:a,...o});break e}s=R("relative",o.rootClassName)}t[0]=a,t[1]=e,t[2]=r,t[3]=i,t[4]=n,t[5]=o,t[6]=s,t[7]=u,t[8]=d}else r=t[2],i=t[3],n=t[4],o=t[5],s=t[6],u=t[7],d=t[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let f;t[9]===n?f=t[10]:(f=n&&(0,F.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-[6px] pointer-events-none text-muted-foreground",children:n}),t[9]=n,t[10]=f);let c=n&&"pl-7",m=i&&"pr-10",v;t[11]!==r||t[12]!==c||t[13]!==m?(v=R("shadow-xs-solid hover:shadow-sm-solid disabled:shadow-xs-solid focus-visible:shadow-md-solid","flex h-6 w-full mb-1 rounded-sm border border-input bg-background px-1.5 py-1 text-sm font-code ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50",c,m,r),t[11]=r,t[12]=c,t[13]=m,t[14]=v):v=t[14];let b;t[15]===Symbol.for("react.memo_cache_sentinel")?(b=Gr.stopPropagation(),t[15]=b):b=t[15];let p;t[16]!==o||t[17]!==a||t[18]!==v||t[19]!==d?(p=(0,F.jsx)("input",{type:d,className:v,ref:a,onClick:b,...o}),t[16]=o,t[17]=a,t[18]=v,t[19]=d,t[20]=p):p=t[20];let h;t[21]===i?h=t[22]:(h=i&&(0,F.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-[6px] text-muted-foreground h-6",children:i}),t[21]=i,t[22]=h);let g;return t[23]!==s||t[24]!==f||t[25]!==p||t[26]!==h?(g=(0,F.jsxs)("div",{className:s,children:[f,p,h]}),t[23]=s,t[24]=f,t[25]=p,t[26]=h,t[27]=g):g=t[27],g});Le.displayName="Input";const Tr=l.forwardRef((e,a)=>{let t=(0,we.c)(16),r,i,n;t[0]===e?(r=t[1],i=t[2],n=t[3]):({className:r,onValueChange:i,...n}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=n);let o;t[4]!==i||t[5]!==n.delay||t[6]!==n.value?(o={initialValue:n.value,delay:n.delay,onChange:i},t[4]=i,t[5]=n.delay,t[6]=n.value,t[7]=o):o=t[7];let{value:s,onChange:u}=wt(o),d;t[8]===u?d=t[9]:(d=c=>u(c.target.value),t[8]=u,t[9]=d);let f;return t[10]!==r||t[11]!==n||t[12]!==a||t[13]!==d||t[14]!==s?(f=(0,F.jsx)(Le,{ref:a,className:r,...n,onChange:d,value:s}),t[10]=r,t[11]=n,t[12]=a,t[13]=d,t[14]=s,t[15]=f):f=t[15],f});Tr.displayName="DebouncedInput";const Vr=l.forwardRef((e,a)=>{let t=(0,we.c)(13),r,i,n;t[0]===e?(r=t[1],i=t[2],n=t[3]):({className:r,onValueChange:i,...n}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=n);let o;t[4]!==i||t[5]!==n.value?(o={initialValue:n.value,delay:200,onChange:i},t[4]=i,t[5]=n.value,t[6]=o):o=t[6];let{value:s,onChange:u}=wt(o),d;return t[7]!==r||t[8]!==u||t[9]!==n||t[10]!==a||t[11]!==s?(d=(0,F.jsx)(et,{ref:a,className:r,...n,onChange:u,value:s}),t[7]=r,t[8]=u,t[9]=n,t[10]=a,t[11]=s,t[12]=d):d=t[12],d});Vr.displayName="DebouncedNumberInput";const $r=l.forwardRef(({className:e,rootClassName:a,icon:t=(0,F.jsx)(Lt,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),clearable:r=!0,...i},n)=>{let o=l.useId(),s=i.id||o;return(0,F.jsxs)("div",{className:R("flex items-center border-b px-3",a),children:[t,(0,F.jsx)("input",{id:s,ref:n,className:R("placeholder:text-foreground-muted flex h-7 m-1 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...i}),r&&i.value&&(0,F.jsx)("span",{onPointerDown:u=>{var f;u.preventDefault(),u.stopPropagation();let d=document.getElementById(s);d&&d instanceof HTMLInputElement&&(d.focus(),d.value="",(f=i.onChange)==null||f.call(i,{...u,target:d,currentTarget:d,type:"change"}))},children:(0,F.jsx)(Xr,{className:"h-4 w-4 opacity-50 hover:opacity-90 cursor-pointer"})})]})});$r.displayName="SearchInput";const kr=l.forwardRef((e,a)=>{let t=(0,we.c)(23),r,i,n;t[0]===e?(r=t[1],i=t[2],n=t[3]):({className:r,onValueChange:i,...n}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=n);let[o,s]=l.useState(n.value),u;t[4]!==o||t[5]!==i||t[6]!==n.value?(u={prop:n.value,defaultProp:o,onChange:i},t[4]=o,t[5]=i,t[6]=n.value,t[7]=u):u=t[7];let[d,f]=Jr(u),c,m;t[8]===d?(c=t[9],m=t[10]):(c=()=>{s(d||"")},m=[d],t[8]=d,t[9]=c,t[10]=m),l.useEffect(c,m);let v;t[11]===Symbol.for("react.memo_cache_sentinel")?(v=g=>s(g.target.value),t[11]=v):v=t[11];let b,p;t[12]!==o||t[13]!==f?(b=()=>f(o||""),p=g=>{g.key==="Enter"&&f(o||"")},t[12]=o,t[13]=f,t[14]=b,t[15]=p):(b=t[14],p=t[15]);let h;return t[16]!==r||t[17]!==o||t[18]!==n||t[19]!==a||t[20]!==b||t[21]!==p?(h=(0,F.jsx)(Le,{ref:a,className:r,...n,value:o,onChange:v,onBlur:b,onKeyDown:p}),t[16]=r,t[17]=o,t[18]=n,t[19]=a,t[20]=b,t[21]=p,t[22]=h):h=t[22],h});kr.displayName="OnBlurredInput";export{Ft as $,aa as A,ki as B,Ji as C,ge as D,ye as E,Jt as F,Rt as G,je as H,Xt as I,Mt as J,Ie as K,Zt as L,he as M,be as N,Q as O,We as P,gi as Q,Gt as R,Xi as S,zi as T,At as U,Oe as V,Re as W,Z as X,K as Y,Tt as Z,Cr as _,$r as a,St as at,_a as b,Sr as c,z as ct,Nr as d,Vt as et,ln as f,Ye as g,Xe as h,kr as i,Te as it,ta as j,Ue as k,un as l,Lt as lt,Dr as m,Vr as n,de as nt,et as o,Nt as ot,Pe as p,ke as q,Le as r,Ve as rt,Qe as s,Dt as st,Tr as t,$e as tt,Je as u,Ze as v,na as w,la as x,rn as y,qt as z};
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as b}from"./react-Bj1aDYRI.js";import{t as g}from"./compiler-runtime-B3qBwwSJ.js";import{t as w}from"./jsx-runtime-ZmTK25f3.js";import{n as c}from"./clsx-D8GwTfvk.js";import{n as p}from"./cn-BKtXLv3a.js";const y=p("flex items-center justify-center m-0 leading-none font-medium border border-foreground/10 shadow-xs-solid active:shadow-none dark:border-border text-sm",{variants:{color:{gray:"mo-button gray",white:"mo-button white",green:"mo-button green",red:"mo-button red",yellow:"mo-button yellow","hint-green":"mo-button hint-green",disabled:"mo-button disabled active:shadow-xs-solid"},shape:{rectangle:"rounded",circle:"rounded-full"},size:{small:"",medium:""}},compoundVariants:[{size:"small",shape:"circle",class:"h-[24px] w-[24px] px-[5.5px] py-[5.5px]"},{size:"medium",shape:"circle",class:"px-2 py-2"},{size:"small",shape:"rectangle",class:"px-1 py-1 h-[24px] w-[24px]"},{size:"medium",shape:"rectangle",class:"px-3 py-2"}],defaultVariants:{color:"gray",size:"medium",shape:"rectangle"}}),z=p("font-mono w-full flex-1 inline-flex items-center justify-center rounded px-2.5 text-foreground/60 h-[36px] hover:shadow-md hover:cursor-pointer focus:shadow-md focus:outline-hidden text-[hsl(0, 0%, 43.5%)] bg-transparent hover:bg-background focus:bg-background");var u=g(),f=m(b(),1),h=m(w(),1);const x=f.forwardRef((a,n)=>{let e=(0,u.c)(15),r,s,o,t,l;e[0]===a?(r=e[1],s=e[2],o=e[3],t=e[4],l=e[5]):({color:s,shape:t,size:l,className:r,...o}=a,e[0]=a,e[1]=r,e[2]=s,e[3]=o,e[4]=t,e[5]=l);let i;e[6]!==r||e[7]!==s||e[8]!==t||e[9]!==l?(i=c(y({color:s,shape:t,size:l}),r),e[6]=r,e[7]=s,e[8]=t,e[9]=l,e[10]=i):i=e[10];let d;return e[11]!==o||e[12]!==n||e[13]!==i?(d=(0,h.jsx)("button",{ref:n,className:i,...o,children:o.children}),e[11]=o,e[12]=n,e[13]=i,e[14]=d):d=e[14],d});x.displayName="Button";const v=f.forwardRef((a,n)=>{let e=(0,u.c)(9),r,s;e[0]===a?(r=e[1],s=e[2]):({className:r,...s}=a,e[0]=a,e[1]=r,e[2]=s);let o;e[3]===r?o=e[4]:(o=c(z(),r),e[3]=r,e[4]=o);let t;return e[5]!==s||e[6]!==n||e[7]!==o?(t=(0,h.jsx)("input",{ref:n,className:o,...s}),e[5]=s,e[6]=n,e[7]=o,e[8]=t):t=e[8],t});v.displayName="Input";export{x as t};
import{t as o}from"./toDate-DETS9bBd.js";function e(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function r(t){return!(!e(t)&&typeof t!="number"||isNaN(+o(t)))}export{r as t};
function ar(b){var kr=b.statementIndent,ir=b.jsonld,yr=b.json||ir,p=b.typescript,K=b.wordCharacters||/[\w$\xa1-\uffff]/,vr=(function(){function r(x){return{type:x,style:"keyword"}}var e=r("keyword a"),n=r("keyword b"),i=r("keyword c"),u=r("keyword d"),l=r("operator"),m={type:"atom",style:"atom"};return{if:r("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:u,break:u,continue:u,new:r("new"),delete:i,void:i,throw:i,debugger:r("debugger"),var:r("var"),const:r("var"),let:r("var"),function:r("function"),catch:r("catch"),for:r("for"),switch:r("switch"),case:r("case"),default:r("default"),in:l,typeof:l,instanceof:l,true:m,false:m,null:m,undefined:m,NaN:m,Infinity:m,this:r("this"),class:r("class"),super:r("atom"),yield:i,export:r("export"),import:r("import"),extends:i,await:i}})(),wr=/[+\-*&%=<>!?|~^@]/,Ir=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function Sr(r){for(var e=!1,n,i=!1;(n=r.next())!=null;){if(!e){if(n=="/"&&!i)return;n=="["?i=!0:i&&n=="]"&&(i=!1)}e=!e&&n=="\\"}}var D,L;function y(r,e,n){return D=r,L=n,e}function O(r,e){var n=r.next();if(n=='"'||n=="'")return e.tokenize=Nr(n),e.tokenize(r,e);if(n=="."&&r.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return y("number","number");if(n=="."&&r.match(".."))return y("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return y(n);if(n=="="&&r.eat(">"))return y("=>","operator");if(n=="0"&&r.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return y("number","number");if(/\d/.test(n))return r.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),y("number","number");if(n=="/")return r.eat("*")?(e.tokenize=M,M(r,e)):r.eat("/")?(r.skipToEnd(),y("comment","comment")):le(r,e,1)?(Sr(r),r.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),y("regexp","string.special")):(r.eat("="),y("operator","operator",r.current()));if(n=="`")return e.tokenize=F,F(r,e);if(n=="#"&&r.peek()=="!")return r.skipToEnd(),y("meta","meta");if(n=="#"&&r.eatWhile(K))return y("variable","property");if(n=="<"&&r.match("!--")||n=="-"&&r.match("->")&&!/\S/.test(r.string.slice(0,r.start)))return r.skipToEnd(),y("comment","comment");if(wr.test(n))return(n!=">"||!e.lexical||e.lexical.type!=">")&&(r.eat("=")?(n=="!"||n=="=")&&r.eat("="):/[<>*+\-|&?]/.test(n)&&(r.eat(n),n==">"&&r.eat(n))),n=="?"&&r.eat(".")?y("."):y("operator","operator",r.current());if(K.test(n)){r.eatWhile(K);var i=r.current();if(e.lastType!="."){if(vr.propertyIsEnumerable(i)){var u=vr[i];return y(u.type,u.style,i)}if(i=="async"&&r.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return y("async","keyword",i)}return y("variable","variable",i)}}function Nr(r){return function(e,n){var i=!1,u;if(ir&&e.peek()=="@"&&e.match(Ir))return n.tokenize=O,y("jsonld-keyword","meta");for(;(u=e.next())!=null&&!(u==r&&!i);)i=!i&&u=="\\";return i||(n.tokenize=O),y("string","string")}}function M(r,e){for(var n=!1,i;i=r.next();){if(i=="/"&&n){e.tokenize=O;break}n=i=="*"}return y("comment","comment")}function F(r,e){for(var n=!1,i;(i=r.next())!=null;){if(!n&&(i=="`"||i=="$"&&r.eat("{"))){e.tokenize=O;break}n=!n&&i=="\\"}return y("quasi","string.special",r.current())}var Pr="([{}])";function ur(r,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=r.string.indexOf("=>",r.start);if(!(n<0)){if(p){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(r.string.slice(r.start,n));i&&(n=i.index)}for(var u=0,l=!1,m=n-1;m>=0;--m){var x=r.string.charAt(m),g=Pr.indexOf(x);if(g>=0&&g<3){if(!u){++m;break}if(--u==0){x=="("&&(l=!0);break}}else if(g>=3&&g<6)++u;else if(K.test(x))l=!0;else if(/["'\/`]/.test(x))for(;;--m){if(m==0)return;if(r.string.charAt(m-1)==x&&r.string.charAt(m-2)!="\\"){m--;break}}else if(l&&!u){++m;break}}l&&!u&&(e.fatArrowAt=m)}}var Cr={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function br(r,e,n,i,u,l){this.indented=r,this.column=e,this.type=n,this.prev=u,this.info=l,i!=null&&(this.align=i)}function Wr(r,e){for(var n=r.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=r.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==e)return!0}function Br(r,e,n,i,u){var l=r.cc;for(a.state=r,a.stream=u,a.marked=null,a.cc=l,a.style=e,r.lexical.hasOwnProperty("align")||(r.lexical.align=!0);;)if((l.length?l.pop():yr?k:v)(n,i)){for(;l.length&&l[l.length-1].lex;)l.pop()();return a.marked?a.marked:n=="variable"&&Wr(r,i)?"variableName.local":e}}var a={state:null,column:null,marked:null,cc:null};function f(){for(var r=arguments.length-1;r>=0;r--)a.cc.push(arguments[r])}function t(){return f.apply(null,arguments),!0}function or(r,e){for(var n=e;n;n=n.next)if(n.name==r)return!0;return!1}function S(r){var e=a.state;if(a.marked="def",e.context){if(e.lexical.info=="var"&&e.context&&e.context.block){var n=hr(r,e.context);if(n!=null){e.context=n;return}}else if(!or(r,e.localVars)){e.localVars=new G(r,e.localVars);return}}b.globalVars&&!or(r,e.globalVars)&&(e.globalVars=new G(r,e.globalVars))}function hr(r,e){if(e)if(e.block){var n=hr(r,e.prev);return n?n==e.prev?e:new U(n,e.vars,!0):null}else return or(r,e.vars)?e:new U(e.prev,new G(r,e.vars),!1);else return null}function Q(r){return r=="public"||r=="private"||r=="protected"||r=="abstract"||r=="readonly"}function U(r,e,n){this.prev=r,this.vars=e,this.block=n}function G(r,e){this.name=r,this.next=e}var Dr=new G("this",new G("arguments",null));function _(){a.state.context=new U(a.state.context,a.state.localVars,!1),a.state.localVars=Dr}function R(){a.state.context=new U(a.state.context,a.state.localVars,!0),a.state.localVars=null}_.lex=R.lex=!0;function V(){a.state.localVars=a.state.context.vars,a.state.context=a.state.context.prev}V.lex=!0;function s(r,e){var n=function(){var i=a.state,u=i.indented;if(i.lexical.type=="stat")u=i.lexical.indented;else for(var l=i.lexical;l&&l.type==")"&&l.align;l=l.prev)u=l.indented;i.lexical=new br(u,a.stream.column(),r,null,i.lexical,e)};return n.lex=!0,n}function o(){var r=a.state;r.lexical.prev&&(r.lexical.type==")"&&(r.indented=r.lexical.indented),r.lexical=r.lexical.prev)}o.lex=!0;function c(r){function e(n){return n==r?t():r==";"||n=="}"||n==")"||n=="]"?f():t(e)}return e}function v(r,e){return r=="var"?t(s("vardef",e),dr,c(";"),o):r=="keyword a"?t(s("form"),fr,v,o):r=="keyword b"?t(s("form"),v,o):r=="keyword d"?a.stream.match(/^\s*$/,!1)?t():t(s("stat"),N,c(";"),o):r=="debugger"?t(c(";")):r=="{"?t(s("}"),R,Z,o,V):r==";"?t():r=="if"?(a.state.lexical.info=="else"&&a.state.cc[a.state.cc.length-1]==o&&a.state.cc.pop()(),t(s("form"),fr,v,o,Tr)):r=="function"?t($):r=="for"?t(s("form"),R,jr,v,V,o):r=="class"||p&&e=="interface"?(a.marked="keyword",t(s("form",r=="class"?r:e),Or,o)):r=="variable"?p&&e=="declare"?(a.marked="keyword",t(v)):p&&(e=="module"||e=="enum"||e=="type")&&a.stream.match(/^\s*\w/,!1)?(a.marked="keyword",e=="enum"?t(Er):e=="type"?t($r,c("operator"),d,c(";")):t(s("form"),z,c("{"),s("}"),Z,o,o)):p&&e=="namespace"?(a.marked="keyword",t(s("form"),k,v,o)):p&&e=="abstract"?(a.marked="keyword",t(v)):t(s("stat"),Kr):r=="switch"?t(s("form"),fr,c("{"),s("}","switch"),R,Z,o,o,V):r=="case"?t(k,c(":")):r=="default"?t(c(":")):r=="catch"?t(s("form"),_,Fr,v,o,V):r=="export"?t(s("stat"),ie,o):r=="import"?t(s("stat"),ue,o):r=="async"?t(v):e=="@"?t(k,v):f(s("stat"),k,c(";"),o)}function Fr(r){if(r=="(")return t(I,c(")"))}function k(r,e){return xr(r,e,!1)}function h(r,e){return xr(r,e,!0)}function fr(r){return r=="("?t(s(")"),N,c(")"),o):f()}function xr(r,e,n){if(a.state.fatArrowAt==a.stream.start){var i=n?Vr:gr;if(r=="(")return t(_,s(")"),w(I,")"),o,c("=>"),i,V);if(r=="variable")return f(_,z,c("=>"),i,V)}var u=n?P:q;return Cr.hasOwnProperty(r)?t(u):r=="function"?t($,u):r=="class"||p&&e=="interface"?(a.marked="keyword",t(s("form"),ae,o)):r=="keyword c"||r=="async"?t(n?h:k):r=="("?t(s(")"),N,c(")"),o,u):r=="operator"||r=="spread"?t(n?h:k):r=="["?t(s("]"),fe,o,u):r=="{"?H(Y,"}",null,u):r=="quasi"?f(X,u):r=="new"?t(Gr(n)):t()}function N(r){return r.match(/[;\}\)\],]/)?f():f(k)}function q(r,e){return r==","?t(N):P(r,e,!1)}function P(r,e,n){var i=n==0?q:P,u=n==0?k:h;if(r=="=>")return t(_,n?Vr:gr,V);if(r=="operator")return/\+\+|--/.test(e)||p&&e=="!"?t(i):p&&e=="<"&&a.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?t(s(">"),w(d,">"),o,i):e=="?"?t(k,c(":"),u):t(u);if(r=="quasi")return f(X,i);if(r!=";"){if(r=="(")return H(h,")","call",i);if(r==".")return t(Lr,i);if(r=="[")return t(s("]"),N,c("]"),o,i);if(p&&e=="as")return a.marked="keyword",t(d,i);if(r=="regexp")return a.state.lastType=a.marked="operator",a.stream.backUp(a.stream.pos-a.stream.start-1),t(u)}}function X(r,e){return r=="quasi"?e.slice(e.length-2)=="${"?t(N,Ur):t(X):f()}function Ur(r){if(r=="}")return a.marked="string.special",a.state.tokenize=F,t(X)}function gr(r){return ur(a.stream,a.state),f(r=="{"?v:k)}function Vr(r){return ur(a.stream,a.state),f(r=="{"?v:h)}function Gr(r){return function(e){return e=="."?t(r?Jr:Hr):e=="variable"&&p?t(Zr,r?P:q):f(r?h:k)}}function Hr(r,e){if(e=="target")return a.marked="keyword",t(q)}function Jr(r,e){if(e=="target")return a.marked="keyword",t(P)}function Kr(r){return r==":"?t(o,v):f(q,c(";"),o)}function Lr(r){if(r=="variable")return a.marked="property",t()}function Y(r,e){if(r=="async")return a.marked="property",t(Y);if(r=="variable"||a.style=="keyword"){if(a.marked="property",e=="get"||e=="set")return t(Mr);var n;return p&&a.state.fatArrowAt==a.stream.start&&(n=a.stream.match(/^\s*:\s*/,!1))&&(a.state.fatArrowAt=a.stream.pos+n[0].length),t(E)}else{if(r=="number"||r=="string")return a.marked=ir?"property":a.style+" property",t(E);if(r=="jsonld-keyword")return t(E);if(p&&Q(e))return a.marked="keyword",t(Y);if(r=="[")return t(k,C,c("]"),E);if(r=="spread")return t(h,E);if(e=="*")return a.marked="keyword",t(Y);if(r==":")return f(E)}}function Mr(r){return r=="variable"?(a.marked="property",t($)):f(E)}function E(r){if(r==":")return t(h);if(r=="(")return f($)}function w(r,e,n){function i(u,l){if(n?n.indexOf(u)>-1:u==","){var m=a.state.lexical;return m.info=="call"&&(m.pos=(m.pos||0)+1),t(function(x,g){return x==e||g==e?f():f(r)},i)}return u==e||l==e?t():n&&n.indexOf(";")>-1?f(r):t(c(e))}return function(u,l){return u==e||l==e?t():f(r,i)}}function H(r,e,n){for(var i=3;i<arguments.length;i++)a.cc.push(arguments[i]);return t(s(e,n),w(r,e),o)}function Z(r){return r=="}"?t():f(v,Z)}function C(r,e){if(p){if(r==":")return t(d);if(e=="?")return t(C)}}function Qr(r,e){if(p&&(r==":"||e=="in"))return t(d)}function zr(r){if(p&&r==":")return a.stream.match(/^\s*\w+\s+is\b/,!1)?t(k,Rr,d):t(d)}function Rr(r,e){if(e=="is")return a.marked="keyword",t()}function d(r,e){if(e=="keyof"||e=="typeof"||e=="infer"||e=="readonly")return a.marked="keyword",t(e=="typeof"?h:d);if(r=="variable"||e=="void")return a.marked="type",t(A);if(e=="|"||e=="&")return t(d);if(r=="string"||r=="number"||r=="atom")return t(A);if(r=="[")return t(s("]"),w(d,"]",","),o,A);if(r=="{")return t(s("}"),sr,o,A);if(r=="(")return t(w(lr,")"),Xr,A);if(r=="<")return t(w(d,">"),d);if(r=="quasi")return f(cr,A)}function Xr(r){if(r=="=>")return t(d)}function sr(r){return r.match(/[\}\)\]]/)?t():r==","||r==";"?t(sr):f(J,sr)}function J(r,e){if(r=="variable"||a.style=="keyword")return a.marked="property",t(J);if(e=="?"||r=="number"||r=="string")return t(J);if(r==":")return t(d);if(r=="[")return t(c("variable"),Qr,c("]"),J);if(r=="(")return f(B,J);if(!r.match(/[;\}\)\],]/))return t()}function cr(r,e){return r=="quasi"?e.slice(e.length-2)=="${"?t(d,Yr):t(cr):f()}function Yr(r){if(r=="}")return a.marked="string.special",a.state.tokenize=F,t(cr)}function lr(r,e){return r=="variable"&&a.stream.match(/^\s*[?:]/,!1)||e=="?"?t(lr):r==":"?t(d):r=="spread"?t(lr):f(d)}function A(r,e){if(e=="<")return t(s(">"),w(d,">"),o,A);if(e=="|"||r=="."||e=="&")return t(d);if(r=="[")return t(d,c("]"),A);if(e=="extends"||e=="implements")return a.marked="keyword",t(d);if(e=="?")return t(d,c(":"),d)}function Zr(r,e){if(e=="<")return t(s(">"),w(d,">"),o,A)}function rr(){return f(d,re)}function re(r,e){if(e=="=")return t(d)}function dr(r,e){return e=="enum"?(a.marked="keyword",t(Er)):f(z,C,j,te)}function z(r,e){if(p&&Q(e))return a.marked="keyword",t(z);if(r=="variable")return S(e),t();if(r=="spread")return t(z);if(r=="[")return H(ee,"]");if(r=="{")return H(Ar,"}")}function Ar(r,e){return r=="variable"&&!a.stream.match(/^\s*:/,!1)?(S(e),t(j)):(r=="variable"&&(a.marked="property"),r=="spread"?t(z):r=="}"?f():r=="["?t(k,c("]"),c(":"),Ar):t(c(":"),z,j))}function ee(){return f(z,j)}function j(r,e){if(e=="=")return t(h)}function te(r){if(r==",")return t(dr)}function Tr(r,e){if(r=="keyword b"&&e=="else")return t(s("form","else"),v,o)}function jr(r,e){if(e=="await")return t(jr);if(r=="(")return t(s(")"),ne,o)}function ne(r){return r=="var"?t(dr,W):r=="variable"?t(W):f(W)}function W(r,e){return r==")"?t():r==";"?t(W):e=="in"||e=="of"?(a.marked="keyword",t(k,W)):f(k,W)}function $(r,e){if(e=="*")return a.marked="keyword",t($);if(r=="variable")return S(e),t($);if(r=="(")return t(_,s(")"),w(I,")"),o,zr,v,V);if(p&&e=="<")return t(s(">"),w(rr,">"),o,$)}function B(r,e){if(e=="*")return a.marked="keyword",t(B);if(r=="variable")return S(e),t(B);if(r=="(")return t(_,s(")"),w(I,")"),o,zr,V);if(p&&e=="<")return t(s(">"),w(rr,">"),o,B)}function $r(r,e){if(r=="keyword"||r=="variable")return a.marked="type",t($r);if(e=="<")return t(s(">"),w(rr,">"),o)}function I(r,e){return e=="@"&&t(k,I),r=="spread"?t(I):p&&Q(e)?(a.marked="keyword",t(I)):p&&r=="this"?t(C,j):f(z,C,j)}function ae(r,e){return r=="variable"?Or(r,e):er(r,e)}function Or(r,e){if(r=="variable")return S(e),t(er)}function er(r,e){if(e=="<")return t(s(">"),w(rr,">"),o,er);if(e=="extends"||e=="implements"||p&&r==",")return e=="implements"&&(a.marked="keyword"),t(p?d:k,er);if(r=="{")return t(s("}"),T,o)}function T(r,e){if(r=="async"||r=="variable"&&(e=="static"||e=="get"||e=="set"||p&&Q(e))&&a.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return a.marked="keyword",t(T);if(r=="variable"||a.style=="keyword")return a.marked="property",t(tr,T);if(r=="number"||r=="string")return t(tr,T);if(r=="[")return t(k,C,c("]"),tr,T);if(e=="*")return a.marked="keyword",t(T);if(p&&r=="(")return f(B,T);if(r==";"||r==",")return t(T);if(r=="}")return t();if(e=="@")return t(k,T)}function tr(r,e){if(e=="!"||e=="?")return t(tr);if(r==":")return t(d,j);if(e=="=")return t(h);var n=a.state.lexical.prev;return f(n&&n.info=="interface"?B:$)}function ie(r,e){return e=="*"?(a.marked="keyword",t(mr,c(";"))):e=="default"?(a.marked="keyword",t(k,c(";"))):r=="{"?t(w(_r,"}"),mr,c(";")):f(v)}function _r(r,e){if(e=="as")return a.marked="keyword",t(c("variable"));if(r=="variable")return f(h,_r)}function ue(r){return r=="string"?t():r=="("?f(k):r=="."?f(q):f(nr,qr,mr)}function nr(r,e){return r=="{"?H(nr,"}"):(r=="variable"&&S(e),e=="*"&&(a.marked="keyword"),t(oe))}function qr(r){if(r==",")return t(nr,qr)}function oe(r,e){if(e=="as")return a.marked="keyword",t(nr)}function mr(r,e){if(e=="from")return a.marked="keyword",t(k)}function fe(r){return r=="]"?t():f(w(h,"]"))}function Er(){return f(s("form"),z,c("{"),s("}"),w(se,"}"),o,o)}function se(){return f(z,j)}function ce(r,e){return r.lastType=="operator"||r.lastType==","||wr.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function le(r,e,n){return e.tokenize==O&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||e.lastType=="quasi"&&/\{\s*$/.test(r.string.slice(0,r.pos-(n||0)))}return{name:b.name,startState:function(r){var e={tokenize:O,lastType:"sof",cc:[],lexical:new br(-r,0,"block",!1),localVars:b.localVars,context:b.localVars&&new U(null,null,!1),indented:0};return b.globalVars&&typeof b.globalVars=="object"&&(e.globalVars=b.globalVars),e},token:function(r,e){if(r.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=r.indentation(),ur(r,e)),e.tokenize!=M&&r.eatSpace())return null;var n=e.tokenize(r,e);return D=="comment"?n:(e.lastType=D=="operator"&&(L=="++"||L=="--")?"incdec":D,Br(e,n,D,L,r))},indent:function(r,e,n){if(r.tokenize==M||r.tokenize==F)return null;if(r.tokenize!=O)return 0;var i=e&&e.charAt(0),u=r.lexical,l;if(!/^\s*else\b/.test(e))for(var m=r.cc.length-1;m>=0;--m){var x=r.cc[m];if(x==o)u=u.prev;else if(x!=Tr&&x!=V)break}for(;(u.type=="stat"||u.type=="form")&&(i=="}"||(l=r.cc[r.cc.length-1])&&(l==q||l==P)&&!/^[,\.=+\-*:?[\(]/.test(e));)u=u.prev;kr&&u.type==")"&&u.prev.type=="stat"&&(u=u.prev);var g=u.type,pr=i==g;return g=="vardef"?u.indented+(r.lastType=="operator"||r.lastType==","?u.info.length+1:0):g=="form"&&i=="{"?u.indented:g=="form"?u.indented+n.unit:g=="stat"?u.indented+(ce(r,e)?kr||n.unit:0):u.info=="switch"&&!pr&&b.doubleIndentSwitch!=0?u.indented+(/^(?:case|default)\b/.test(e)?n.unit:2*n.unit):u.align?u.column+(pr?0:1):u.indented+(pr?0:n.unit)},languageData:{indentOnInput:/^\s*(?:case .*?:|default:|\{|\})$/,commentTokens:yr?void 0:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]},wordChars:"$"}}}const de=ar({name:"javascript"}),me=ar({name:"json",json:!0}),pe=ar({name:"json",jsonld:!0}),ke=ar({name:"typescript",typescript:!0});export{ke as i,me as n,pe as r,de as t};
import{i as s,n as a,r,t}from"./javascript-CsBr0q2-.js";export{t as javascript,a as json,r as jsonld,s as typescript};
import"./purify.es-DZrAQFIu.js";import{u as tt}from"./src-CvyFXpBy.js";import{t as et}from"./arc-D1owqr0z.js";import{n as r}from"./src-CsZby044.js";import{B as gt,C as mt,U as xt,_ as kt,a as _t,b as j,c as bt,v as vt,z as $t}from"./chunk-ABZYJK2D-0jga8uiE.js";import"./dist-C1VXabOr.js";import{t as wt}from"./chunk-FMBD7UC4-CHJv683r.js";import{a as Mt,i as Tt,o as it,t as Ct}from"./chunk-TZMSLE5B-CPHBPwrM.js";var X=(function(){var t=r(function(i,n,l,u){for(l||(l={}),u=i.length;u--;l[i[u]]=n);return l},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],o=[1,10],s=[1,11],h=[1,12],y=[1,13],p=[1,14],f={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:r(function(i,n,l,u,d,c,x){var m=c.length-1;switch(d){case 1:return c[m-1];case 2:this.$=[];break;case 3:c[m-1].push(c[m]),this.$=c[m-1];break;case 4:case 5:this.$=c[m];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(c[m].substr(6)),this.$=c[m].substr(6);break;case 9:this.$=c[m].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=c[m].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(c[m].substr(8)),this.$=c[m].substr(8);break;case 13:u.addTask(c[m-1],c[m]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:o,14:s,16:h,17:y,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:o,14:s,16:h,17:y,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:r(function(i,n){if(n.recoverable)this.trace(i);else{var l=Error(i);throw l.hash=n,l}},"parseError"),parse:r(function(i){var n=this,l=[0],u=[],d=[null],c=[],x=this.table,m="",b=0,B=0,A=0,pt=2,Z=1,yt=c.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(I.yy[D]=this.yy[D]);k.setInput(i,I.yy),I.yy.lexer=k,I.yy.parser=this,k.yylloc===void 0&&(k.yylloc={});var Y=k.yylloc;c.push(Y);var dt=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft($){l.length-=2*$,d.length-=$,c.length-=$}r(ft,"popStack");function J(){var $=u.pop()||k.lex()||Z;return typeof $!="number"&&($ instanceof Array&&(u=$,$=u.pop()),$=n.symbols_[$]||$),$}r(J,"lex");for(var _,W,S,v,q,P={},N,T,K,O;;){if(S=l[l.length-1],this.defaultActions[S]?v=this.defaultActions[S]:(_??(_=J()),v=x[S]&&x[S][_]),v===void 0||!v.length||!v[0]){var Q="";for(N in O=[],x[S])this.terminals_[N]&&N>pt&&O.push("'"+this.terminals_[N]+"'");Q=k.showPosition?"Parse error on line "+(b+1)+`:
`+k.showPosition()+`
Expecting `+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(b+1)+": Unexpected "+(_==Z?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Q,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:Y,expected:O})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+S+", token: "+_);switch(v[0]){case 1:l.push(_),d.push(k.yytext),c.push(k.yylloc),l.push(v[1]),_=null,W?(_=W,W=null):(B=k.yyleng,m=k.yytext,b=k.yylineno,Y=k.yylloc,A>0&&A--);break;case 2:if(T=this.productions_[v[1]][1],P.$=d[d.length-T],P._$={first_line:c[c.length-(T||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(T||1)].first_column,last_column:c[c.length-1].last_column},dt&&(P._$.range=[c[c.length-(T||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(P,[m,B,b,I.yy,v[1],d,c].concat(yt)),q!==void 0)return q;T&&(l=l.slice(0,-1*T*2),d=d.slice(0,-1*T),c=c.slice(0,-1*T)),l.push(this.productions_[v[1]][0]),d.push(P.$),c.push(P._$),K=x[l[l.length-2]][l[l.length-1]],l.push(K);break;case 3:return!0}}return!0},"parse")};f.lexer=(function(){return{EOF:1,parseError:r(function(i,n){if(this.yy.parser)this.yy.parser.parseError(i,n);else throw Error(i)},"parseError"),setInput:r(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:r(function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:r(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var u=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),l.length-1&&(this.yylineno-=l.length-1);var d=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:l?(l.length===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(i){this.unput(this.match.slice(i))},"less"),pastInput:r(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var i=this.pastInput(),n=Array(i.length+1).join("-");return i+this.upcomingInput()+`
`+n+"^"},"showPosition"),test_match:r(function(i,n){var l,u,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),u=i[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var c in d)this[c]=d[c];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,l,u;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),c=0;c<d.length;c++)if(l=this._input.match(this.rules[d[c]]),l&&(!n||l[0].length>n[0].length)){if(n=l,u=c,this.options.backtrack_lexer){if(i=this.test_match(l,d[c]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,d[u]),i===!1?!1:i):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:r(function(){return this.next()||this.lex()},"lex"),begin:r(function(i){this.conditionStack.push(i)},"begin"),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:r(function(i){this.begin(i)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(i,n,l,u){switch(l){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}})();function g(){this.yy={}}return r(g,"Parser"),g.prototype=f,f.Parser=g,new g})();X.parser=X;var Et=X,F="",G=[],V=[],L=[],It=r(function(){G.length=0,V.length=0,F="",L.length=0,_t()},"clear"),St=r(function(t){F=t,G.push(t)},"addSection"),At=r(function(){return G},"getSections"),Pt=r(function(){let t=nt(),e=0;for(;!t&&e<100;)t=nt(),e++;return V.push(...L),V},"getTasks"),jt=r(function(){let t=[];return V.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),Ft=r(function(t,e){let a=e.substr(1).split(":"),o=0,s=[];a.length===1?(o=Number(a[0]),s=[]):(o=Number(a[0]),s=a[1].split(","));let h=s.map(p=>p.trim()),y={section:F,type:F,people:h,task:t,score:o};L.push(y)},"addTask"),Bt=r(function(t){let e={section:F,type:F,description:t,task:t,classes:[]};V.push(e)},"addTaskOrg"),nt=r(function(){let t=r(function(a){return L[a].processed},"compileTask"),e=!0;for(let[a,o]of L.entries())t(a),e&&(e=o.processed);return e},"compileTasks"),st={getConfig:r(()=>j().journey,"getConfig"),clear:It,setDiagramTitle:xt,getDiagramTitle:mt,setAccTitle:gt,getAccTitle:vt,setAccDescription:$t,getAccDescription:kt,addSection:St,getSections:At,getTasks:Pt,addTask:Ft,addTaskOrg:Bt,getActors:r(function(){return jt()},"getActors")},Vt=r(t=>`.label {
font-family: ${t.fontFamily};
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
font-family: ${t.fontFamily};
}
.label text {
fill: #333;
}
.label {
color: ${t.textColor}
}
.face {
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
stroke: #999;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 1.5px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
}
text-align: center;
}
.cluster rect {
}
.cluster text {
fill: ${t.titleColor};
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.task-type-0, .section-type-0 {
${t.fillType0?`fill: ${t.fillType0}`:""};
}
.task-type-1, .section-type-1 {
${t.fillType0?`fill: ${t.fillType1}`:""};
}
.task-type-2, .section-type-2 {
${t.fillType0?`fill: ${t.fillType2}`:""};
}
.task-type-3, .section-type-3 {
${t.fillType0?`fill: ${t.fillType3}`:""};
}
.task-type-4, .section-type-4 {
${t.fillType0?`fill: ${t.fillType4}`:""};
}
.task-type-5, .section-type-5 {
${t.fillType0?`fill: ${t.fillType5}`:""};
}
.task-type-6, .section-type-6 {
${t.fillType0?`fill: ${t.fillType6}`:""};
}
.task-type-7, .section-type-7 {
${t.fillType0?`fill: ${t.fillType7}`:""};
}
.actor-0 {
${t.actor0?`fill: ${t.actor0}`:""};
}
.actor-1 {
${t.actor1?`fill: ${t.actor1}`:""};
}
.actor-2 {
${t.actor2?`fill: ${t.actor2}`:""};
}
.actor-3 {
${t.actor3?`fill: ${t.actor3}`:""};
}
.actor-4 {
${t.actor4?`fill: ${t.actor4}`:""};
}
.actor-5 {
${t.actor5?`fill: ${t.actor5}`:""};
}
${wt()}
`,"getStyles"),U=r(function(t,e){return Tt(t,e)},"drawRect"),Lt=r(function(t,e){let a=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),o=t.append("g");o.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(p){let f=et().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);p.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}r(s,"smile");function h(p){let f=et().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);p.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}r(h,"sad");function y(p){p.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r(y,"ambivalent"),e.score>3?s(o):e.score<3?h(o):y(o),a},"drawFace"),rt=r(function(t,e){let a=t.append("circle");return a.attr("cx",e.cx),a.attr("cy",e.cy),a.attr("class","actor-"+e.pos),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("r",e.r),a.class!==void 0&&a.attr("class",a.class),e.title!==void 0&&a.append("title").text(e.title),a},"drawCircle"),at=r(function(t,e){return Mt(t,e)},"drawText"),Rt=r(function(t,e){function a(s,h,y,p,f){return s+","+h+" "+(s+y)+","+h+" "+(s+y)+","+(h+p-f)+" "+(s+y-f*1.2)+","+(h+p)+" "+s+","+(h+p)}r(a,"genPoints");let o=t.append("polygon");o.attr("points",a(e.x,e.y,50,20,7)),o.attr("class","labelBox"),e.y+=e.labelMargin,e.x+=.5*e.labelMargin,at(t,e)},"drawLabel"),Nt=r(function(t,e,a){let o=t.append("g"),s=it();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=a.width*e.taskCount+a.diagramMarginX*(e.taskCount-1),s.height=a.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,U(o,s),lt(a)(e.text,o,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},a,e.colour)},"drawSection"),ot=-1,Ot=r(function(t,e,a){let o=e.x+a.width/2,s=t.append("g");ot++,s.append("line").attr("id","task"+ot).attr("x1",o).attr("y1",e.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lt(s,{cx:o,cy:300+(5-e.score)*30,score:e.score});let h=it();h.x=e.x,h.y=e.y,h.fill=e.fill,h.width=a.width,h.height=a.height,h.class="task task-type-"+e.num,h.rx=3,h.ry=3,U(s,h);let y=e.x+14;e.people.forEach(p=>{let f=e.actors[p].color;rt(s,{cx:y,cy:e.y,r:7,fill:f,stroke:"#000",title:p,pos:e.actors[p].position}),y+=10}),lt(a)(e.task,s,h.x,h.y,h.width,h.height,{class:"task"},a,e.colour)},"drawTask"),zt=r(function(t,e){Ct(t,e)},"drawBackgroundRect"),lt=(function(){function t(s,h,y,p,f,g,i,n){o(h.append("text").attr("x",y+f/2).attr("y",p+g/2+5).style("font-color",n).style("text-anchor","middle").text(s),i)}r(t,"byText");function e(s,h,y,p,f,g,i,n,l){let{taskFontSize:u,taskFontFamily:d}=n,c=s.split(/<br\s*\/?>/gi);for(let x=0;x<c.length;x++){let m=x*u-u*(c.length-1)/2,b=h.append("text").attr("x",y+f/2).attr("y",p).attr("fill",l).style("text-anchor","middle").style("font-size",u).style("font-family",d);b.append("tspan").attr("x",y+f/2).attr("dy",m).text(c[x]),b.attr("y",p+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),o(b,i)}}r(e,"byTspan");function a(s,h,y,p,f,g,i,n){let l=h.append("switch"),u=l.append("foreignObject").attr("x",y).attr("y",p).attr("width",f).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,l,y,p,f,g,i,n),o(u,i)}r(a,"byFo");function o(s,h){for(let y in h)y in h&&s.attr(y,h[y])}return r(o,"_setTextAttrs"),function(s){return s.textPlacement==="fo"?a:s.textPlacement==="old"?t:e}})(),R={drawRect:U,drawCircle:rt,drawSection:Nt,drawText:at,drawLabel:Rt,drawTask:Ot,drawBackgroundRect:zt,initGraphics:r(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},Dt=r(function(t){Object.keys(t).forEach(function(e){M[e]=t[e]})},"setConf"),C={},z=0;function ct(t){let e=j().journey,a=e.maxLabelWidth;z=0;let o=60;Object.keys(C).forEach(s=>{let h=C[s].color,y={cx:20,cy:o,r:7,fill:h,stroke:"#000",pos:C[s].position};R.drawCircle(t,y);let p=t.append("text").attr("visibility","hidden").text(s),f=p.node().getBoundingClientRect().width;p.remove();let g=[];if(f<=a)g=[s];else{let i=s.split(" "),n="";p=t.append("text").attr("visibility","hidden"),i.forEach(l=>{let u=n?`${n} ${l}`:l;if(p.text(u),p.node().getBoundingClientRect().width>a){if(n&&g.push(n),n=l,p.text(l),p.node().getBoundingClientRect().width>a){let d="";for(let c of l)d+=c,p.text(d+"-"),p.node().getBoundingClientRect().width>a&&(g.push(d.slice(0,-1)+"-"),d=c);n=d}}else n=u}),n&&g.push(n),p.remove()}g.forEach((i,n)=>{let l={x:40,y:o+7+n*20,fill:"#666",text:i,textMargin:e.boxTextMargin??5},u=R.drawText(t,l).node().getBoundingClientRect().width;u>z&&u>e.leftMargin-u&&(z=u)}),o+=Math.max(20,g.length*20)})}r(ct,"drawActorLegend");var M=j().journey,E=0,Yt=r(function(t,e,a,o){let s=j(),h=s.journey.titleColor,y=s.journey.titleFontSize,p=s.journey.titleFontFamily,f=s.securityLevel,g;f==="sandbox"&&(g=tt("#i"+e));let i=tt(f==="sandbox"?g.nodes()[0].contentDocument.body:"body");w.init();let n=i.select("#"+e);R.initGraphics(n);let l=o.db.getTasks(),u=o.db.getDiagramTitle(),d=o.db.getActors();for(let A in C)delete C[A];let c=0;d.forEach(A=>{C[A]={color:M.actorColours[c%M.actorColours.length],position:c},c++}),ct(n),E=M.leftMargin+z,w.insert(0,0,E,Object.keys(C).length*50),Wt(n,l,0);let x=w.getBounds();u&&n.append("text").text(u).attr("x",E).attr("font-size",y).attr("font-weight","bold").attr("y",25).attr("fill",h).attr("font-family",p);let m=x.stopy-x.starty+2*M.diagramMarginY,b=E+x.stopx+2*M.diagramMarginX;bt(n,m,b,M.useMaxWidth),n.append("line").attr("x1",E).attr("y1",M.height*4).attr("x2",b-E-4).attr("y2",M.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let B=u?70:0;n.attr("viewBox",`${x.startx} -25 ${b} ${m+B}`),n.attr("preserveAspectRatio","xMinYMin meet"),n.attr("height",m+B+25)},"draw"),w={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:r(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:r(function(t,e,a,o){t[e]===void 0?t[e]=a:t[e]=o(a,t[e])},"updateVal"),updateBounds:r(function(t,e,a,o){let s=j().journey,h=this,y=0;function p(f){return r(function(g){y++;let i=h.sequenceItems.length-y+1;h.updateVal(g,"starty",e-i*s.boxMargin,Math.min),h.updateVal(g,"stopy",o+i*s.boxMargin,Math.max),h.updateVal(w.data,"startx",t-i*s.boxMargin,Math.min),h.updateVal(w.data,"stopx",a+i*s.boxMargin,Math.max),f!=="activation"&&(h.updateVal(g,"startx",t-i*s.boxMargin,Math.min),h.updateVal(g,"stopx",a+i*s.boxMargin,Math.max),h.updateVal(w.data,"starty",e-i*s.boxMargin,Math.min),h.updateVal(w.data,"stopy",o+i*s.boxMargin,Math.max))},"updateItemBounds")}r(p,"updateFn"),this.sequenceItems.forEach(p())},"updateBounds"),insert:r(function(t,e,a,o){let s=Math.min(t,a),h=Math.max(t,a),y=Math.min(e,o),p=Math.max(e,o);this.updateVal(w.data,"startx",s,Math.min),this.updateVal(w.data,"starty",y,Math.min),this.updateVal(w.data,"stopx",h,Math.max),this.updateVal(w.data,"stopy",p,Math.max),this.updateBounds(s,y,h,p)},"insert"),bumpVerticalPos:r(function(t){this.verticalPos+=t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:r(function(){return this.verticalPos},"getVerticalPos"),getBounds:r(function(){return this.data},"getBounds")},H=M.sectionFills,ht=M.sectionColours,Wt=r(function(t,e,a){let o=j().journey,s="",h=a+(o.height*2+o.diagramMarginY),y=0,p="#CCC",f="black",g=0;for(let[i,n]of e.entries()){if(s!==n.section){p=H[y%H.length],g=y%H.length,f=ht[y%ht.length];let u=0,d=n.section;for(let x=i;x<e.length&&e[x].section==d;x++)u+=1;let c={x:i*o.taskMargin+i*o.width+E,y:50,text:n.section,fill:p,num:g,colour:f,taskCount:u};R.drawSection(t,c,o),s=n.section,y++}let l=n.people.reduce((u,d)=>(C[d]&&(u[d]=C[d]),u),{});n.x=i*o.taskMargin+i*o.width+E,n.y=h,n.width=o.diagramMarginX,n.height=o.diagramMarginY,n.colour=f,n.fill=p,n.num=g,n.actors=l,R.drawTask(t,n,o),w.insert(n.x,n.y,n.x+n.width+o.taskMargin,450)}},"drawTasks"),ut={setConf:Dt,draw:Yt},qt={parser:Et,db:st,renderer:ut,styles:Vt,init:r(t=>{ut.setConf(t.journey),st.clear()},"init")};export{qt as diagram};

Sorry, the diff of this file is too big to display

function a(n,e,t){return t===void 0&&(t=""),e===void 0&&(e="\\b"),RegExp("^"+t+"(("+n.join(")|(")+"))"+e)}var d="\\\\[0-7]{1,3}",F="\\\\x[A-Fa-f0-9]{1,2}",k=`\\\\[abefnrtv0%?'"\\\\]`,b="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",o=["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","\\.{2,3}","[\\.\\\\%*+\\-<>!\\/^|&]=?","\\?","\\$","~",":"],v=a("[<>]:,[<>=]=,[!=]==,<<=?,>>>?=?,=>?,--?>,<--[->]?,\\/\\/,[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?,\\?,\\$,~,:,\\u00D7,\\u2208,\\u2209,\\u220B,\\u220C,\\u2218,\\u221A,\\u221B,\\u2229,\\u222A,\\u2260,\\u2264,\\u2265,\\u2286,\\u2288,\\u228A,\\u22C5,\\b(in|isa)\\b(?!.?\\()".split(","),""),g=/^[;,()[\]{}]/,x=/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,A=a([d,F,k,b],"'"),z=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],y=["end","else","elseif","catch","finally"],c="if.else.elseif.while.for.begin.let.end.do.try.catch.finally.return.break.continue.global.local.const.export.import.importall.using.function.where.macro.module.baremodule.struct.type.mutable.immutable.quote.typealias.abstract.primitive.bitstype".split("."),m=["true","false","nothing","NaN","Inf"],E=a(z),_=a(y),D=a(c),T=a(m),C=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,w=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,P=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,B=a(o,"","@"),$=a(o,"",":");function l(n){return n.nestedArrays>0}function G(n){return n.nestedGenerators>0}function f(n,e){return e===void 0&&(e=0),n.scopes.length<=e?null:n.scopes[n.scopes.length-(e+1)]}function u(n,e){if(n.match("#=",!1))return e.tokenize=Z,e.tokenize(n,e);var t=e.leavingExpr;if(n.sol()&&(t=!1),e.leavingExpr=!1,t&&n.match(/^'+/))return"operator";if(n.match(/\.{4,}/))return"error";if(n.match(/\.{1,3}/))return"operator";if(n.eatSpace())return null;var r=n.peek();if(r==="#")return n.skipToEnd(),"comment";if(r==="["&&(e.scopes.push("["),e.nestedArrays++),r==="("&&(e.scopes.push("("),e.nestedGenerators++),l(e)&&r==="]"){for(;e.scopes.length&&f(e)!=="[";)e.scopes.pop();e.scopes.pop(),e.nestedArrays--,e.leavingExpr=!0}if(G(e)&&r===")"){for(;e.scopes.length&&f(e)!=="(";)e.scopes.pop();e.scopes.pop(),e.nestedGenerators--,e.leavingExpr=!0}if(l(e)){if(e.lastToken=="end"&&n.match(":"))return"operator";if(n.match("end"))return"number"}var i;if((i=n.match(E,!1))&&e.scopes.push(i[0]),n.match(_,!1)&&e.scopes.pop(),n.match(/^::(?![:\$])/))return e.tokenize=I,e.tokenize(n,e);if(!t&&(n.match(w)||n.match($)))return"builtin";if(n.match(v))return"operator";if(n.match(/^\.?\d/,!1)){var p=RegExp(/^im\b/),s=!1;if(n.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(s=!0),n.match(/^0x[0-9a-f_]+/i)&&(s=!0),n.match(/^0b[01_]+/i)&&(s=!0),n.match(/^0o[0-7_]+/i)&&(s=!0),n.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(s=!0),n.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(s=!0),s)return n.match(p),e.leavingExpr=!0,"number"}if(n.match("'"))return e.tokenize=j,e.tokenize(n,e);if(n.match(P))return e.tokenize=S(n.current()),e.tokenize(n,e);if(n.match(C)||n.match(B))return"meta";if(n.match(g))return null;if(n.match(D))return"keyword";if(n.match(T))return"builtin";var h=e.isDefinition||e.lastToken=="function"||e.lastToken=="macro"||e.lastToken=="type"||e.lastToken=="struct"||e.lastToken=="immutable";return n.match(x)?h?n.peek()==="."?(e.isDefinition=!0,"variable"):(e.isDefinition=!1,"def"):(e.leavingExpr=!0,"variable"):(n.next(),"error")}function I(n,e){return n.match(/.*?(?=[,;{}()=\s]|$)/),n.match("{")?e.nestedParameters++:n.match("}")&&e.nestedParameters>0&&e.nestedParameters--,e.nestedParameters>0?n.match(/.*?(?={|})/)||n.next():e.nestedParameters==0&&(e.tokenize=u),"builtin"}function Z(n,e){return n.match("#=")&&e.nestedComments++,n.match(/.*?(?=(#=|=#))/)||n.skipToEnd(),n.match("=#")&&(e.nestedComments--,e.nestedComments==0&&(e.tokenize=u)),"comment"}function j(n,e){var t=!1,r;if(n.match(A))t=!0;else if(r=n.match(/\\u([a-f0-9]{1,4})(?=')/i)){var i=parseInt(r[1],16);(i<=55295||i>=57344)&&(t=!0,n.next())}else if(r=n.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var i=parseInt(r[1],16);i<=1114111&&(t=!0,n.next())}return t?(e.leavingExpr=!0,e.tokenize=u,"string"):(n.match(/^[^']+(?=')/)||n.skipToEnd(),n.match("'")&&(e.tokenize=u),"error")}function S(n){n.substr(-3)==='"""'?n='"""':n.substr(-1)==='"'&&(n='"');function e(t,r){if(t.eat("\\"))t.next();else{if(t.match(n))return r.tokenize=u,r.leavingExpr=!0,"string";t.eat(/[`"]/)}return t.eatWhile(/[^\\`"]/),"string"}return e}const q={name:"julia",startState:function(){return{tokenize:u,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(n,e){var t=e.tokenize(n,e),r=n.current();return r&&t&&(e.lastToken=r),t},indent:function(n,e,t){var r=0;return(e==="]"||e===")"||/^end\b/.test(e)||/^else/.test(e)||/^catch\b/.test(e)||/^elseif\b/.test(e)||/^finally/.test(e))&&(r=-1),(n.scopes.length+r)*t.unit},languageData:{indentOnInput:/^\s*(end|else|catch|finally)\b$/,commentTokens:{line:"#",block:{open:"#=",close:"=#"}},closeBrackets:{brackets:["(","[","{",'"']},autocomplete:c.concat(m)}};export{q as t};
import{t as a}from"./julia-BCYfl68O.js";export{a as julia};
import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as o,r as q}from"./src-CsZby044.js";import{G as yt,I as B,Q as ft,X as lt,Z as ct,b as j,d as z}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as mt}from"./chunk-EXTU4WIE-Dmu97ZvI.js";import{n as bt,t as _t}from"./chunk-MI3HLSF2-n3vxgSbN.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import{a as Et,c as kt,i as St}from"./chunk-JZLCHNYA-48QVgmR4.js";import{t as Nt}from"./chunk-FMBD7UC4-CHJv683r.js";var J=(function(){var i=o(function(t,c,a,r){for(a||(a={}),r=t.length;r--;a[t[r]]=c);return a},"o"),u=[1,4],p=[1,13],s=[1,12],d=[1,15],y=[1,16],_=[1,20],h=[1,19],D=[6,7,8],C=[1,26],L=[1,24],A=[1,25],n=[6,7,11],G=[1,31],O=[6,7,11,24],F=[1,6,13,16,17,20,23],U=[1,35],M=[1,36],$=[1,6,7,11,13,16,17,20,23],b=[1,38],I={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(t,c,a,r,g,e,R){var l=e.length-1;switch(g){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",e[l-1].id),r.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:r.getLogger().info("Node: ",e[l].id),r.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:r.getLogger().trace("Icon: ",e[l]),r.decorateNode({icon:e[l]});break;case 18:case 23:r.decorateNode({class:e[l]});break;case 19:r.getLogger().trace("SPACELIST");break;case 20:r.getLogger().trace("Node: ",e[l-1].id),r.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:r.getLogger().trace("Node: ",e[l].id),r.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:r.decorateNode({icon:e[l]});break;case 27:r.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:r.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:r.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:r.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:y,18:17,19:18,20:_,23:h},i(D,[2,3]),{1:[2,2]},i(D,[2,4]),i(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:y,18:17,19:18,20:_,23:h},{6:p,9:22,12:11,13:s,14:14,16:d,17:y,18:17,19:18,20:_,23:h},{6:C,7:L,10:23,11:A},i(n,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:_,23:h}),i(n,[2,19]),i(n,[2,21],{15:30,24:G}),i(n,[2,22]),i(n,[2,23]),i(O,[2,25]),i(O,[2,26]),i(O,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:L,10:34,11:A},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:y,18:17,19:18,20:_,23:h},i(F,[2,14],{7:U,11:M}),i($,[2,8]),i($,[2,9]),i($,[2,10]),i(n,[2,16],{15:37,24:G}),i(n,[2,17]),i(n,[2,18]),i(n,[2,20],{24:b}),i(O,[2,31]),{21:[1,39]},{22:[1,40]},i(F,[2,13],{7:U,11:M}),i($,[2,11]),i($,[2,12]),i(n,[2,15],{24:b}),i(O,[2,30]),{22:[1,41]},i(O,[2,27]),i(O,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,c){if(c.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=c,a}},"parseError"),parse:o(function(t){var c=this,a=[0],r=[],g=[null],e=[],R=this.table,l="",H=0,it=0,nt=0,gt=2,st=1,ut=e.slice.call(arguments,1),m=Object.create(this.lexer),w={yy:{}};for(var K in this.yy)Object.prototype.hasOwnProperty.call(this.yy,K)&&(w.yy[K]=this.yy[K]);m.setInput(t,w.yy),w.yy.lexer=m,w.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var Q=m.yylloc;e.push(Q);var dt=m.options&&m.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(N){a.length-=2*N,g.length-=N,e.length-=N}o(pt,"popStack");function rt(){var N=r.pop()||m.lex()||st;return typeof N!="number"&&(N instanceof Array&&(r=N,N=r.pop()),N=c.symbols_[N]||N),N}o(rt,"lex");for(var E,Y,T,S,Z,P={},W,v,ot,X;;){if(T=a[a.length-1],this.defaultActions[T]?S=this.defaultActions[T]:(E??(E=rt()),S=R[T]&&R[T][E]),S===void 0||!S.length||!S[0]){var at="";for(W in X=[],R[T])this.terminals_[W]&&W>gt&&X.push("'"+this.terminals_[W]+"'");at=m.showPosition?"Parse error on line "+(H+1)+`:
`+m.showPosition()+`
Expecting `+X.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(H+1)+": Unexpected "+(E==st?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(at,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:Q,expected:X})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+T+", token: "+E);switch(S[0]){case 1:a.push(E),g.push(m.yytext),e.push(m.yylloc),a.push(S[1]),E=null,Y?(E=Y,Y=null):(it=m.yyleng,l=m.yytext,H=m.yylineno,Q=m.yylloc,nt>0&&nt--);break;case 2:if(v=this.productions_[S[1]][1],P.$=g[g.length-v],P._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},dt&&(P._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),Z=this.performAction.apply(P,[l,it,H,w.yy,S[1],g,e].concat(ut)),Z!==void 0)return Z;v&&(a=a.slice(0,-1*v*2),g=g.slice(0,-1*v),e=e.slice(0,-1*v)),a.push(this.productions_[S[1]][0]),g.push(P.$),e.push(P._$),ot=R[a[a.length-2]][a[a.length-1]],a.push(ot);break;case 3:return!0}}return!0},"parse")};I.lexer=(function(){return{EOF:1,parseError:o(function(t,c){if(this.yy.parser)this.yy.parser.parseError(t,c);else throw Error(t)},"parseError"),setInput:o(function(t,c){return this.yy=c||this.yy||{},this._input=t,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:o(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var c=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;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),a.length-1&&(this.yylineno-=a.length-1);var g=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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),c=Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+c+"^"},"showPosition"),test_match:o(function(t,c){var a,r,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),r=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var e in g)this[e]=g[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,c,a,r;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),e=0;e<g.length;e++)if(a=this._input.match(this.rules[g[e]]),a&&(!c||a[0].length>c[0].length)){if(c=a,r=e,this.options.backtrack_lexer){if(t=this.test_match(a,g[e]),t!==!1)return t;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(t=this.test_match(c,g[r]),t===!1?!1:t):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:o(function(){return this.next()||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(t,c,a,r){switch(a){case 0:return this.pushState("shapeData"),c.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return c.yytext=c.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return t.getLogger().trace("Found comment",c.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",c.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",c.yytext),"NODE_DEND";case 36:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 41:return t.getLogger().trace("Long description:",c.yytext),21;case 42:return t.getLogger().trace("Long description:",c.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function k(){this.yy={}}return o(k,"Parser"),k.prototype=I,I.Parser=k,new k})();J.parser=J;var xt=J,x=[],V=[],tt=0,et={},Dt=o(()=>{x=[],V=[],tt=0,et={}},"clear"),Lt=o(i=>{if(x.length===0)return null;let u=x[0].level,p=null;for(let s=x.length-1;s>=0;s--)if(x[s].level===u&&!p&&(p=x[s]),x[s].level<u)throw Error('Items without section detected, found section ("'+x[s].label+'")');return i===(p==null?void 0:p.level)?null:p},"getSection"),ht=o(function(){return V},"getSections"),Ot=o(function(){let i=[],u=[],p=ht(),s=j();for(let d of p){let y={id:d.id,label:B(d.label??"",s),isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:s.look};u.push(y);let _=x.filter(h=>h.parentId===d.id);for(let h of _){let D={id:h.id,parentId:d.id,label:B(h.label??"",s),isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};u.push(D)}}return{nodes:u,edges:i,other:{},config:j()}},"getData"),It=o((i,u,p,s,d)=>{var C,L;let y=j(),_=((C=y.mindmap)==null?void 0:C.padding)??z.mindmap.padding;switch(s){case f.ROUNDED_RECT:case f.RECT:case f.HEXAGON:_*=2}let h={id:B(u,y)||"kbn"+tt++,level:i,label:B(p,y),width:((L=y.mindmap)==null?void 0:L.maxNodeWidth)??z.mindmap.maxNodeWidth,padding:_,isGroup:!1};if(d!==void 0){let A;A=d.includes(`
`)?d+`
`:`{
`+d+`
}`;let n=bt(A,{schema:_t});if(n.shape&&(n.shape!==n.shape.toLowerCase()||n.shape.includes("_")))throw Error(`No such shape: ${n.shape}. Shape names should be lowercase.`);n!=null&&n.shape&&n.shape==="kanbanItem"&&(h.shape=n==null?void 0:n.shape),n!=null&&n.label&&(h.label=n==null?void 0:n.label),n!=null&&n.icon&&(h.icon=n==null?void 0:n.icon.toString()),n!=null&&n.assigned&&(h.assigned=n==null?void 0:n.assigned.toString()),n!=null&&n.ticket&&(h.ticket=n==null?void 0:n.ticket.toString()),n!=null&&n.priority&&(h.priority=n==null?void 0:n.priority)}let D=Lt(i);D?h.parentId=D.id||"kbn"+tt++:V.push(h),x.push(h)},"addNode"),f={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},vt={clear:Dt,addNode:It,getSections:ht,getData:Ot,nodeType:f,getType:o((i,u)=>{switch(q.debug("In get type",i,u),i){case"[":return f.RECT;case"(":return u===")"?f.ROUNDED_RECT:f.CLOUD;case"((":return f.CIRCLE;case")":return f.CLOUD;case"))":return f.BANG;case"{{":return f.HEXAGON;default:return f.DEFAULT}},"getType"),setElementForId:o((i,u)=>{et[i]=u},"setElementForId"),decorateNode:o(i=>{if(!i)return;let u=j(),p=x[x.length-1];i.icon&&(p.icon=B(i.icon,u)),i.class&&(p.cssClasses=B(i.class,u))},"decorateNode"),type2Str:o(i=>{switch(i){case f.DEFAULT:return"no-border";case f.RECT:return"rect";case f.ROUNDED_RECT:return"rounded-rect";case f.CIRCLE:return"circle";case f.CLOUD:return"cloud";case f.BANG:return"bang";case f.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:o(()=>q,"getLogger"),getElementById:o(i=>et[i],"getElementById")},Ct={draw:o(async(i,u,p,s)=>{var O,F,U,M,$;q.debug(`Rendering kanban diagram
`+i);let d=s.db.getData(),y=j();y.htmlLabels=!1;let _=mt(u),h=_.append("g");h.attr("class","sections");let D=_.append("g");D.attr("class","items");let C=d.nodes.filter(b=>b.isGroup),L=0,A=[],n=25;for(let b of C){let I=((O=y==null?void 0:y.kanban)==null?void 0:O.sectionWidth)||200;L+=1,b.x=I*L+(L-1)*10/2,b.width=I,b.y=0,b.height=I*3,b.rx=5,b.ry=5,b.cssClasses=b.cssClasses+" section-"+L;let k=await St(h,b);n=Math.max(n,(F=k==null?void 0:k.labelBBox)==null?void 0:F.height),A.push(k)}let G=0;for(let b of C){let I=A[G];G+=1;let k=((U=y==null?void 0:y.kanban)==null?void 0:U.sectionWidth)||200,t=-k*3/2+n,c=t,a=d.nodes.filter(e=>e.parentId===b.id);for(let e of a){if(e.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");e.x=b.x,e.width=k-1.5*10;let R=(await Et(D,e,{config:y})).node().getBBox();e.y=c+R.height/2,await kt(e),c=e.y+R.height/2+10/2}let r=I.cluster.select("rect"),g=Math.max(c-t+30,50)+(n-25);r.attr("height",g)}yt(void 0,_,((M=y.mindmap)==null?void 0:M.padding)??z.kanban.padding,(($=y.mindmap)==null?void 0:$.useMaxWidth)??z.kanban.useMaxWidth)},"draw")},At=o(i=>{let u="";for(let s=0;s<i.THEME_COLOR_LIMIT;s++)i["lineColor"+s]=i["lineColor"+s]||i["cScaleInv"+s],ft(i["lineColor"+s])?i["lineColor"+s]=ct(i["lineColor"+s],20):i["lineColor"+s]=lt(i["lineColor"+s],20);let p=o((s,d)=>i.darkMode?lt(s,d):ct(s,d),"adjuster");for(let s=0;s<i.THEME_COLOR_LIMIT;s++){let d=""+(17-3*s);u+=`
.section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
fill: ${p(i["cScale"+s],10)};
stroke: ${p(i["cScale"+s],10)};
}
.section-${s-1} text {
fill: ${i["cScaleLabel"+s]};
}
.node-icon-${s-1} {
font-size: 40px;
color: ${i["cScaleLabel"+s]};
}
.section-edge-${s-1}{
stroke: ${i["cScale"+s]};
}
.edge-depth-${s-1}{
stroke-width: ${d};
}
.section-${s-1} line {
stroke: ${i["cScaleInv"+s]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${i.background};
stroke: ${i.nodeBorder};
stroke-width: 1px;
}
.kanban-ticket-link {
fill: ${i.background};
stroke: ${i.nodeBorder};
text-decoration: underline;
}
`}return u},"genSections"),$t={db:vt,renderer:Ct,parser:xt,styles:o(i=>`
.edge {
stroke-width: 3;
}
${At(i)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${i.git0};
}
.section-root text {
fill: ${i.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.cluster-label, .label {
color: ${i.textColor};
fill: ${i.textColor};
}
.kanban-label {
dy: 1em;
alignment-baseline: middle;
text-anchor: middle;
dominant-baseline: middle;
text-align: center;
}
${Nt()}
`,"getStyles")};export{$t as diagram};

Sorry, the diff of this file is too big to display

import{c as a}from"./katex-CDLTCvjQ.js";export{a as default};
import{s}from"./chunk-LvLJmgfZ.js";import{t as a}from"./compiler-runtime-B3qBwwSJ.js";import{t as m}from"./jsx-runtime-ZmTK25f3.js";import{n}from"./clsx-D8GwTfvk.js";var d=a(),c=s(m(),1);const l=e=>{let r=(0,d.c)(5),o;r[0]===e.className?o=r[1]:(o=n(e.className,"rounded-md bg-muted/40 px-2 text-[0.75rem] font-prose center border border-foreground/20 text-muted-foreground block whitespace-nowrap"),r[0]=e.className,r[1]=o);let t;return r[2]!==e.children||r[3]!==o?(t=(0,c.jsx)("kbd",{className:o,children:e.children}),r[2]=e.children,r[3]=o,r[4]=t):t=r[4],t};export{l as t};
import{u as n}from"./useEvent-BhXAndur.js";import{r as e}from"./mode-Bn7pdJvO.js";const l=r=>{let{children:t}=r;return n(e)?null:t},o=r=>{let{children:t}=r;return n(e)?t:null};export{o as n,l as t};
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as u}from"./react-Bj1aDYRI.js";import{t as c}from"./compiler-runtime-B3qBwwSJ.js";import{t as b}from"./jsx-runtime-ZmTK25f3.js";import{n as w,t as x}from"./cn-BKtXLv3a.js";import{t as N}from"./dist-CDXJRSCj.js";var i=m(u(),1),n=m(b(),1),v="Label",d=i.forwardRef((r,s)=>(0,n.jsx)(N.label,{...r,ref:s,onMouseDown:e=>{var a;e.target.closest("button, input, select, textarea")||((a=r.onMouseDown)==null||a.call(r,e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));d.displayName=v;var f=d,y=c(),D=w("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),p=i.forwardRef((r,s)=>{let e=(0,y.c)(9),a,o;e[0]===r?(a=e[1],o=e[2]):({className:a,...o}=r,e[0]=r,e[1]=a,e[2]=o);let t;e[3]===a?t=e[4]:(t=x(D(),a),e[3]=a,e[4]=t);let l;return e[5]!==o||e[6]!==s||e[7]!==t?(l=(0,n.jsx)(f,{ref:s,className:t,...o}),e[5]=o,e[6]=s,e[7]=t,e[8]=l):l=e[8],l});p.displayName=f.displayName;export{p as t};

Sorry, the diff of this file is too big to display

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./any-language-editor-BODEG_5g.js","./copy-icon-v8ME_JKB.js","./button-CZ3Cs4qb.js","./hotkeys-BHHWjLlp.js","./useEventListener-Cb-RVVEn.js","./compiler-runtime-B3qBwwSJ.js","./react-Bj1aDYRI.js","./chunk-LvLJmgfZ.js","./cn-BKtXLv3a.js","./clsx-D8GwTfvk.js","./jsx-runtime-ZmTK25f3.js","./tooltip-CMQz28hC.js","./Combination-BAEdC-rz.js","./react-dom-CSu739Rf.js","./dist-DwV58Fb1.js","./use-toast-BDYuj3zG.js","./copy-DHrHayPa.js","./check-Dr3SxUsb.js","./createLucideIcon-BCdY6lG5.js","./copy-D-8y6iMN.js","./error-banner-B9ts0mNl.js","./alert-dialog-BW4srmS0.js","./errors-TZBmrJmc.js","./zod-H_cgTO0M.js","./dist-tLOz534J.js","./dist-DBwNzi3C.js","./dist-Dcqqg9UU.js","./dist-C5H5qIvq.js","./dist-ChS0Dc_R.js","./dist-Btv5Rh1v.js","./dist-sMh6mJ2d.js","./dist-B62Xo7-b.js","./dist-BpuNldXk.js","./dist-bBwmhqty.js","./dist-8kKeYgOg.js","./dist-CoCQUAeM.js","./dist-BZWmfQbq.js","./dist-DLgWirXg.js","./dist-CF4gkF4y.js","./dist-CNW1zLeq.js","./esm-Bmu2DhPy.js","./extends-BiFDv3jB.js","./objectWithoutPropertiesLoose-DfWeGRFv.js","./dist-CtsanegT.js","./esm-D82gQH1f.js","./dist-CLc5WXWw.js","./dist-CRjEDsfC.js","./dist-CEaOyZOW.js","./dist-Gqv0jSNr.js","./dist-Dv0MupEh.js","./dist-B83wRp_v.js","./apl-DHQPYmx2.js","./asciiarmor-fnQAw8T8.js","./asn1-5lb7I37s.js","./brainfuck-D30bRgvC.js","./clike-jZeb2kFn.js","./clojure-C0pkR8m2.js","./cmake-DlvFtk_M.js","./cobol-C_yb45mr.js","./coffeescript-DBK0AeMT.js","./commonlisp-Bo8hOdn-.js","./crystal-DYrQEMVi.js","./css-zh47N2UC.js","./cypher-BWPAHm69.js","./d-CMuL95tt.js","./diff-oor_HZ51.js","./dtd-Fe_Eikw6.js","./dylan-DjUZAjRK.js","./ecl-qgyT1LqI.js","./eiffel-Dgulx8rf.js","./elm-BvFY4GJb.js","./erlang-Ba0XOLlj.js","./factor-B3fhZG6W.js","./simple-mode-BmS_AmGQ.js","./forth-gbBFxz8f.js","./fortran-CXijpPbh.js","./gas-CnHGSLCd.js","./gherkin-DfEZpSxY.js","./groovy-9JiNA9gq.js","./haskell-CKr_RZFK.js","./haxe-DsAAHfaR.js","./idl-Djz72z1a.js","./javascript-CsBr0q2-.js","./julia-BCYfl68O.js","./livescript-BEw7FNJP.js","./lua-DqxHXOsz.js","./mathematica-Do-octY0.js","./mbox-VgrgGytk.js","./mirc-DkD5mNIp.js","./mllike-C8Ah4kKN.js","./modelica-2q7w6nLE.js","./mscgen-BRqvO7u4.js","./mumps-CjtiTT1a.js","./nsis-QuE155sg.js","./ntriples-4lauqsM6.js","./octave-A2kFK0nR.js","./oz-CvXDMSbl.js","./pascal-6Jinj26u.js","./perl-CXauYQdN.js","./pig-Dl0QLQI6.js","./powershell-6bdy_rHW.js","./properties-p1rx3aF7.js","./protobuf-BZ6p9Xh_.js","./pug-NA-6TsNe.js","./puppet-CjdIRV7D.js","./python-uzyJYIWU.js","./q-CfD3i9uI.js","./r-JyJdYHQB.js","./rpm-DuGPfDyX.js","./ruby-CA1TzLxZ.js","./sas-BJPWZC7M.js","./scheme-IRagAY3r.js","./shell-BVpF3W_J.js","./sieve-BSfPMeZl.js","./smalltalk-CkHVehky.js","./sparql-CmKKjr-f.js","./stex-jWatZkll.js","./stylus-D28PuRsm.js","./swift-D-jfpPuv.js","./tcl-BrQdCDVA.js","./textile-DXBc8HMq.js","./toml-ClSouHPE.js","./troff-BGDyQn9x.js","./ttcn-cfg-CQMSrhCz.js","./ttcn-De1OdISX.js","./turtle-DNhfxysg.js","./vb-BX7-Md9G.js","./vbscript-DNMzJOTU.js","./velocity-viirwPm7.js","./verilog-CZguTLBV.js","./vhdl-CAEhCBOl.js","./webidl-BNJg_7gX.js","./xquery-CGV_r322.js","./yacas-uRzw7z7m.js","./z80-CBK8t-9T.js"])))=>i.map(i=>d[i]);
import{s as e}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as o}from"./createLucideIcon-BCdY6lG5.js";import{t as m}from"./preload-helper-D2MJg03u.js";let r,a,s=(async()=>{r=o("between-horizontal-start",[["rect",{width:"13",height:"7",x:"8",y:"3",rx:"1",key:"pkso9a"}],["path",{d:"m2 9 3 3-3 3",key:"1agib5"}],["rect",{width:"13",height:"7",x:"8",y:"14",rx:"1",key:"1q5fc1"}]]),a=(0,e(i(),1).lazy)(()=>m(()=>import("./any-language-editor-BODEG_5g.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,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,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,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134]),import.meta.url))})();export{s as __tla,r as n,a as t};
import{r as o,t as y}from"./path-D7fidI_g.js";import{t as s}from"./array-Cf4PUXPA.js";import{v as x}from"./step-CVy5FnKg.js";function d(t){return t[0]}function h(t){return t[1]}function E(t,u){var a=o(!0),i=null,l=x,e=null,v=y(r);t=typeof t=="function"?t:t===void 0?d:o(t),u=typeof u=="function"?u:u===void 0?h:o(u);function r(n){var f,m=(n=s(n)).length,p,c=!1,g;for(i??(e=l(g=v())),f=0;f<=m;++f)!(f<m&&a(p=n[f],f,n))===c&&((c=!c)?e.lineStart():e.lineEnd()),c&&e.point(+t(p,f,n),+u(p,f,n));if(g)return e=null,g+""||null}return r.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),r):t},r.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),r):u},r.defined=function(n){return arguments.length?(a=typeof n=="function"?n:o(!!n),r):a},r.curve=function(n){return arguments.length?(l=n,i!=null&&(e=l(i)),r):l},r.context=function(n){return arguments.length?(n==null?i=e=null:e=l(i=n),r):i},r}export{d as n,h as r,E as t};
import{a as E,c as F,i as O,n as P,o as R,r as S,s as g,t as T}from"./precisionRound-CU2C3Vxx.js";import{i as _,n as q,t as z}from"./defaultLocale-JieDVWC_.js";import{d as B,p as G,u as H}from"./timer-B6DpdVnC.js";import{n as I}from"./init-DRQmrFIb.js";function v(n){return n===null?NaN:+n}function*J(n,t){if(t===void 0)for(let a of n)a!=null&&(a=+a)>=a&&(yield a);else{let a=-1;for(let r of n)(r=t(r,++a,n))!=null&&(r=+r)>=r&&(yield r)}}var M=g(F);const N=M.right,K=M.left;g(v).center;var y=N;function L(n){return function(){return n}}function d(n){return+n}var k=[0,1];function h(n){return n}function p(n,t){return(t-=n=+n)?function(a){return(a-n)/t}:L(isNaN(t)?NaN:.5)}function Q(n,t){var a;return n>t&&(a=n,n=t,t=a),function(r){return Math.max(n,Math.min(t,r))}}function U(n,t,a){var r=n[0],s=n[1],u=t[0],e=t[1];return s<r?(r=p(s,r),u=a(e,u)):(r=p(r,s),u=a(u,e)),function(c){return u(r(c))}}function V(n,t,a){var r=Math.min(n.length,t.length)-1,s=Array(r),u=Array(r),e=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++e<r;)s[e]=p(n[e],n[e+1]),u[e]=a(t[e],t[e+1]);return function(c){var l=y(n,c,1,r)-1;return u[l](s[l](c))}}function b(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function A(){var n=k,t=k,a=B,r,s,u,e=h,c,l,o;function m(){var i=Math.min(n.length,t.length);return e!==h&&(e=Q(n[0],n[i-1])),c=i>2?V:U,l=o=null,f}function f(i){return i==null||isNaN(i=+i)?u:(l||(l=c(n.map(r),t,a)))(r(e(i)))}return f.invert=function(i){return e(s((o||(o=c(t,n.map(r),G)))(i)))},f.domain=function(i){return arguments.length?(n=Array.from(i,d),m()):n.slice()},f.range=function(i){return arguments.length?(t=Array.from(i),m()):t.slice()},f.rangeRound=function(i){return t=Array.from(i),a=H,m()},f.clamp=function(i){return arguments.length?(e=i?!0:h,m()):e!==h},f.interpolate=function(i){return arguments.length?(a=i,m()):a},f.unknown=function(i){return arguments.length?(u=i,f):u},function(i,D){return r=i,s=D,m()}}function w(){return A()(h,h)}function x(n,t,a,r){var s=E(n,t,a),u;switch(r=_(r??",f"),r.type){case"s":var e=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(u=P(s,e))&&(r.precision=u),q(r,e);case"":case"e":case"g":case"p":case"r":r.precision==null&&!isNaN(u=T(s,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=u-(r.type==="e"));break;case"f":case"%":r.precision==null&&!isNaN(u=S(s))&&(r.precision=u-(r.type==="%")*2);break}return z(r)}function j(n){var t=n.domain;return n.ticks=function(a){var r=t();return R(r[0],r[r.length-1],a??10)},n.tickFormat=function(a,r){var s=t();return x(s[0],s[s.length-1],a??10,r)},n.nice=function(a){a??(a=10);var r=t(),s=0,u=r.length-1,e=r[s],c=r[u],l,o,m=10;for(c<e&&(o=e,e=c,c=o,o=s,s=u,u=o);m-- >0;){if(o=O(e,c,a),o===l)return r[s]=e,r[u]=c,t(r);if(o>0)e=Math.floor(e/o)*o,c=Math.ceil(c/o)*o;else if(o<0)e=Math.ceil(e*o)/o,c=Math.floor(c*o)/o;else break;l=o}return n},n}function C(){var n=w();return n.copy=function(){return b(n,C())},I.apply(n,arguments),j(n)}export{b as a,d as c,y as d,v as f,w as i,K as l,j as n,h as o,J as p,x as r,A as s,C as t,N as u};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);export{t};
import{s as o}from"./chunk-LvLJmgfZ.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{t as s}from"./jsx-runtime-ZmTK25f3.js";var l=i(),m=o(s(),1);const c=n=>{let r=(0,l.c)(3),{href:e,children:a}=n,t;return r[0]!==a||r[1]!==e?(t=(0,m.jsx)("a",{href:e,target:"_blank",className:"text-link hover:underline",children:a}),r[0]=a,r[1]=e,r[2]=t):t=r[2],t};export{c as t};
import{c as n}from"./session-BOFn9QrD.js";function t(o){window.open(n(`?file=${o}`).toString(),"_blank")}export{t};
import{t as r}from"./livescript-BEw7FNJP.js";export{r as liveScript};
var m=function(e,t){var r=t.next||"start";if(r){t.next=t.next;var k=a[r];if(k.splice){for(var l=0;l<k.length;++l){var n=k[l];if(n.regex&&e.match(n.regex))return t.next=n.next||t.next,n.token}return e.next(),"error"}if(e.match(n=a[r]))return n.regex&&e.match(n.regex)?(t.next=n.next,n.token):(e.next(),"error")}return e.next(),"error"},g="(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*",p=RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+g+")?))\\s*$"),o="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",x={token:"string",regex:".+"},a={start:[{token:"docComment",regex:"/\\*",next:"comment"},{token:"comment",regex:"#.*"},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)"+o},{token:"atom",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+o},{token:"invalid",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+o},{token:"className.standard",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+o},{token:"variableName.function.standard",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+o},{token:"variableName.standard",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+o},{token:"variableName",regex:g+"\\s*:(?![:=])"},{token:"variableName",regex:g},{token:"operatorKeyword",regex:"(?:\\.{3}|\\s+\\?)"},{token:"keyword",regex:"(?:@+|::|\\.\\.)",next:"key"},{token:"operatorKeyword",regex:"\\.\\s*",next:"key"},{token:"string",regex:"\\\\\\S[^\\s,;)}\\]]*"},{token:"docString",regex:"'''",next:"qdoc"},{token:"docString",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string",regex:"<\\[",next:"words"},{token:"regexp",regex:"//",next:"heregex"},{token:"regexp",regex:"\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",next:"key"},{token:"number",regex:"(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"},{token:"paren",regex:"[({[]"},{token:"paren",regex:"[)}\\]]",next:"key"},{token:"operatorKeyword",regex:"\\S+"},{token:"content",regex:"\\s+"}],heregex:[{token:"regexp",regex:".*?//[gimy$?]{0,4}",next:"start"},{token:"regexp",regex:"\\s*#{"},{token:"comment",regex:"\\s+(?:#.*)?"},{token:"regexp",regex:"\\S+"}],key:[{token:"operatorKeyword",regex:"[.?@!]+"},{token:"variableName",regex:g,next:"start"},{token:"content",regex:"",next:"start"}],comment:[{token:"docComment",regex:".*?\\*/",next:"start"},{token:"docComment",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},x],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},x],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},x],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},x],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},x],words:[{token:"string",regex:".*?\\]>",next:"key"},x]};for(var d in a){var s=a[d];if(s.splice)for(var i=0,y=s.length;i<y;++i){var c=s[i];typeof c.regex=="string"&&(a[d][i].regex=RegExp("^"+c.regex))}else typeof c.regex=="string"&&(a[d].regex=RegExp("^"+s.regex))}const f={name:"livescript",startState:function(){return{next:"start",lastToken:{style:null,indent:0,content:""}}},token:function(e,t){for(;e.pos==e.start;)var r=m(e,t);return t.lastToken={style:r,indent:e.indentation(),content:e.current()},r.replace(/\./g," ")},indent:function(e){var t=e.lastToken.indent;return e.lastToken.content.match(p)&&(t+=2),t}};export{f as t};
import{s as x}from"./chunk-LvLJmgfZ.js";import"./useEvent-BhXAndur.js";import{t as f}from"./react-Bj1aDYRI.js";import{A as h,Hn as g,W as u,w as j}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as y}from"./compiler-runtime-B3qBwwSJ.js";import{t as v}from"./jsx-runtime-ZmTK25f3.js";import{t as m}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import{t as N}from"./cell-link-B9b7J8QK.js";import{t as b}from"./empty-state-B8Cxr9nj.js";import{t as w}from"./clear-button-DMZhBF9S.js";var n=y();f();var s=x(v(),1),_=()=>{let r=(0,n.c)(9),e=h(),{clearLogs:i}=j();if(e.length===0){let o;r[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("code",{className:"border rounded px-1",children:"stdout"}),r[0]=o):o=r[0];let l;return r[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)(b,{title:"No logs",description:(0,s.jsxs)("span",{children:[o," and"," ",(0,s.jsx)("code",{className:"border rounded px-1",children:"stderr"})," logs will appear here."]}),icon:(0,s.jsx)(g,{})}),r[1]=l):l=r[1],l}let a;r[2]===i?a=r[3]:(a=(0,s.jsx)("div",{className:"flex flex-row justify-start px-2 py-1",children:(0,s.jsx)(w,{dataTestId:"clear-logs-button",onClick:i})}),r[2]=i,r[3]=a);let t;r[4]===e?t=r[5]:(t=(0,s.jsx)(d,{logs:e,className:"min-w-[300px]"}),r[4]=e,r[5]=t);let c;return r[6]!==a||r[7]!==t?(c=(0,s.jsxs)("div",{className:"flex flex-col h-full overflow-auto",children:[a,t]}),r[6]=a,r[7]=t,r[8]=c):c=r[8],c};const d=r=>{let e=(0,n.c)(10),{logs:i,className:a}=r,t;e[0]===a?t=e[1]:(t=m("flex flex-col",a),e[0]=a,e[1]=t);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={whiteSpace:"pre-wrap"},e[2]=c):c=e[2];let o;e[3]===i?o=e[4]:(o=i.map(I),e[3]=i,e[4]=o);let l;e[5]===o?l=e[6]:(l=(0,s.jsx)("pre",{className:"grid text-xs font-mono gap-1 whitespace-break-spaces font-semibold align-left",children:(0,s.jsx)("div",{className:"grid grid-cols-[30px_1fr]",style:c,children:o})}),e[5]=o,e[6]=l);let p;return e[7]!==t||e[8]!==l?(p=(0,s.jsx)("div",{className:t,children:l}),e[7]=t,e[8]=l,e[9]=p):p=e[9],p};function k(r){let e=u(r.timestamp),i=S[r.level],a=r.level.toUpperCase();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"shrink-0 text-(--gray-10) dark:text-(--gray-11)",children:["[",e,"]"]}),(0,s.jsx)("span",{className:m("shrink-0",i),children:a}),(0,s.jsxs)("span",{className:"shrink-0 text-(--gray-10)",children:["(",(0,s.jsx)(N,{cellId:r.cellId}),")"]}),r.message]})}var S={stdout:"text-(--grass-9)",stderr:"text-(--red-9)"};function I(r,e){return(0,s.jsxs)("div",{className:"contents group",children:[(0,s.jsx)("span",{className:m("opacity-70 group-hover:bg-(--gray-3) group-hover:opacity-100","text-right col-span-1 py-1 pr-1"),children:e+1}),(0,s.jsx)("span",{className:m("opacity-70 group-hover:bg-(--gray-3) group-hover:opacity-100","px-2 flex gap-x-1.5 py-1 flex-wrap"),children:k(r)})]},e)}export{d as LogViewer,_ as default};
import{$ as a,$a as s,$i as o,$n as e,$r as r,$t as t,A as l,Aa as _,Ai as n,An as i,Ar as d,At as c,B as m,Ba as g,Bi as p,Bn as u,Br as b,Bt as w,C as h,Ca as v,Ci as x,Cn as f,Cr as C,Ct as S,D as A,Da as O,Di as y,Dn as I,Dr as N,Dt as D,E as J,Ea as k,Ei as V,En as E,Er as L,Et as P,F as T,Fa as F,Fi as U,Fn as M,Fr as B,Ft as R,G as W,Ga as H,Gi as z,Gn as j,Gr as q,Gt as G,H as K,Ha as Q,Hi as X,Hn as Y,Hr as Z,Ht as $,I as aa,Ia as sa,Ii as oa,In as ea,Ir as ra,It as ta,J as la,Ja as _a,Ji as na,Jn as ia,Jr as da,Jt as ca,K as ma,Ka as ga,Ki as pa,Kn as ua,Kr as ba,Kt as wa,L as ha,La as va,Li as xa,Ln as fa,Lr as Ca,Lt as Sa,M as Aa,Ma as Oa,Mi as ya,Mn as Ia,Mr as Na,Mt as Da,N as Ja,Na as ka,Ni as Va,Nn as Ea,Nr as La,Nt as Pa,O as Ta,Oa as Fa,Oi as Ua,On as Ma,Or as Ba,Ot as Ra,P as Wa,Pa as Ha,Pi as za,Pn as ja,Pr as qa,Pt as Ga,Q as Ka,Qa,Qi as Xa,Qn as Ya,Qr as Za,Qt as $a,R as as,Ra as ss,Ri as os,Rn as es,Rr as rs,Rt as ts,S as ls,Sa as _s,Si as ns,Sn as is,Sr as ds,St as cs,T as ms,Ta as gs,Ti as ps,Tn as us,Tr as bs,Tt as ws,U as hs,Ua as vs,Ui as xs,Un as fs,Ur as Cs,Ut as Ss,V as As,Va as Os,Vi as ys,Vn as Is,Vr as Ns,Vt as Ds,W as Js,Wa as ks,Wi as Vs,Wn as Es,Wr as Ls,Wt as Ps,X as Ts,Xa as Fs,Xi as Us,Xn as Ms,Xr as Bs,Xt as Rs,Y as Ws,Ya as Hs,Yi as zs,Yn as js,Yr as qs,Yt as Gs,Z as Ks,Za as Qs,Zi as Xs,Zn as Ys,Zr as Zs,Zt as $s,_ as ao,_a as so,_i as oo,_n as eo,_r as ro,_t as to,a as lo,aa as _o,ai as no,an as io,ao as co,ar as mo,at as go,b as po,ba as uo,bi as bo,bn as wo,br as ho,bt as vo,c as xo,ca as fo,ci as Co,cn as So,cr as Ao,ct as Oo,d as yo,da as Io,di as No,dn as Do,dr as Jo,dt as ko,ea as Vo,ei as Eo,en as Lo,eo as Po,er as To,et as Fo,f as Uo,fa as Mo,fi as Bo,fn as Ro,fr as Wo,g as Ho,ga as zo,gi as jo,gn as qo,gr as Go,gt as Ko,h as Qo,ha as Xo,hi as Yo,hn as Zo,hr as $o,ht as ae,i as se,ia as oe,ii as ee,in as re,io as te,ir as le,it as _e,j as ne,ja as ie,ji as de,jn as ce,jr as me,jt as ge,k as pe,ka as ue,ki as be,kn as we,kr as he,kt as ve,l as xe,la as fe,li as Ce,ln as Se,lr as Ae,lt as Oe,m as ye,ma as Ie,mi as Ne,mn as De,mr as Je,mt as ke,n as Ve,na as Ee,ni as Le,nn as Pe,no as Te,nr as Fe,nt as Ue,o as Me,oa as Be,oi as Re,on as We,or as He,ot as ze,p as je,pa as qe,pi as Ge,pn as Ke,pr as Qe,pt as Xe,q as Ye,qa as Ze,qi as $e,qn as ar,qr as sr,qt as or,r as er,ra as rr,ri as tr,rn as lr,ro as _r,rr as nr,rt as ir,s as dr,sa as cr,si as mr,sn as gr,sr as pr,st as ur,t as br,ta as wr,ti as hr,tn as vr,to as xr,tr as fr,tt as Cr,u as Sr,ua as Ar,ui as Or,un as yr,ur as Ir,ut as Nr,v as Dr,va as Jr,vi as kr,vn as Vr,vr as Er,vt as Lr,w as Pr,wa as Tr,wi as Fr,wn as Ur,wr as Mr,wt as Br,x as Rr,xa as Wr,xi as Hr,xn as zr,xr as jr,xt as qr,y as Gr,ya as Kr,yi as Qr,yn as Xr,yr as Yr,yt as Zr,z as $r,za as at,zi as st,zn as ot,zr as et,zt as rt,__tla as tt}from"./loro_wasm_bg-DzFUi5p_.js";let lt=Promise.all([(()=>{try{return tt}catch{}})()]).then(async()=>{});export{br as LORO_VERSION,Ve as __externref_drop_slice,er as __externref_table_alloc,se as __externref_table_dealloc,lt as __tla,lo as __wbg_awarenesswasm_free,Me as __wbg_changemodifier_free,dr as __wbg_cursor_free,xo as __wbg_ephemeralstorewasm_free,xe as __wbg_lorocounter_free,Sr as __wbg_lorodoc_free,yo as __wbg_lorolist_free,Uo as __wbg_loromap_free,je as __wbg_loromovablelist_free,ye as __wbg_lorotext_free,Qo as __wbg_lorotree_free,Ho as __wbg_lorotreenode_free,ao as __wbg_undomanager_free,Dr as __wbg_versionvector_free,Gr as __wbindgen_exn_store,po as __wbindgen_export_4,Rr as __wbindgen_export_6,ls as __wbindgen_free,h as __wbindgen_malloc,Pr as __wbindgen_realloc,ms as __wbindgen_start,J as _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h423c5eefcad13156,A as awarenesswasm_apply,Ta as awarenesswasm_encode,pe as awarenesswasm_encodeAll,l as awarenesswasm_getAllStates,ne as awarenesswasm_getState,Aa as awarenesswasm_getTimestamp,Ja as awarenesswasm_isEmpty,Wa as awarenesswasm_length,T as awarenesswasm_new,aa as awarenesswasm_peer,ha as awarenesswasm_peers,as as awarenesswasm_removeOutdated,$r as awarenesswasm_setLocalState,m as callPendingEvents,As as changemodifier_setMessage,K as changemodifier_setTimestamp,hs as closure9_externref_shim,Js as cursor_containerId,W as cursor_decode,ma as cursor_encode,Ye as cursor_kind,la as cursor_pos,Ws as cursor_side,Ts as decodeFrontiers,Ks as decodeImportBlobMeta,Ka as encodeFrontiers,a as ephemeralstorewasm_apply,Fo as ephemeralstorewasm_delete,Cr as ephemeralstorewasm_encode,Ue as ephemeralstorewasm_encodeAll,ir as ephemeralstorewasm_get,_e as ephemeralstorewasm_getAllStates,go as ephemeralstorewasm_isEmpty,ze as ephemeralstorewasm_keys,ur as ephemeralstorewasm_new,Oo as ephemeralstorewasm_removeOutdated,Oe as ephemeralstorewasm_set,Nr as ephemeralstorewasm_subscribe,ko as ephemeralstorewasm_subscribeLocalUpdates,Xe as lorocounter_decrement,ke as lorocounter_getAttached,ae as lorocounter_getShallowValue,Ko as lorocounter_id,to as lorocounter_increment,Lr as lorocounter_isAttached,Zr as lorocounter_kind,vo as lorocounter_new,qr as lorocounter_parent,cs as lorocounter_subscribe,S as lorocounter_toJSON,Br as lorocounter_value,ws as lorodoc_JSONPath,P as lorodoc_applyDiff,D as lorodoc_attach,Ra as lorodoc_changeCount,ve as lorodoc_checkout,c as lorodoc_checkoutToLatest,ge as lorodoc_clearNextCommitOptions,Da as lorodoc_cmpFrontiers,Pa as lorodoc_cmpWithFrontiers,Ga as lorodoc_commit,R as lorodoc_configDefaultTextStyle,ta as lorodoc_configTextStyle,Sa as lorodoc_debugHistory,ts as lorodoc_deleteRootContainer,rt as lorodoc_detach,w as lorodoc_diff,Ds as lorodoc_export,$ as lorodoc_exportJsonInIdSpan,Ss as lorodoc_exportJsonUpdates,Ps as lorodoc_findIdSpansBetween,G as lorodoc_fork,wa as lorodoc_forkAt,or as lorodoc_fromSnapshot,ca as lorodoc_frontiers,Gs as lorodoc_frontiersToVV,Rs as lorodoc_getAllChanges,$s as lorodoc_getByPath,$a as lorodoc_getChangeAt,t as lorodoc_getChangeAtLamport,Lo as lorodoc_getChangedContainersIn,vr as lorodoc_getContainerById,Pe as lorodoc_getCounter,lr as lorodoc_getCursorPos,re as lorodoc_getDeepValueWithID,io as lorodoc_getList,We as lorodoc_getMap,gr as lorodoc_getMovableList,So as lorodoc_getOpsInChange,Se as lorodoc_getPathToContainer,yr as lorodoc_getPendingTxnLength,Do as lorodoc_getShallowValue,Ro as lorodoc_getText,Ke as lorodoc_getTree,De as lorodoc_getUncommittedOpsAsJson,Zo as lorodoc_hasContainer,qo as lorodoc_import,eo as lorodoc_importBatch,Vr as lorodoc_importJsonUpdates,Xr as lorodoc_importUpdateBatch,wo as lorodoc_isDetached,zr as lorodoc_isDetachedEditingEnabled,is as lorodoc_isShallow,f as lorodoc_new,Ur as lorodoc_opCount,us as lorodoc_oplogFrontiers,E as lorodoc_oplogVersion,I as lorodoc_peerId,Ma as lorodoc_peerIdStr,we as lorodoc_revertTo,i as lorodoc_setChangeMergeInterval,ce as lorodoc_setDetachedEditing,Ia as lorodoc_setHideEmptyRootContainers,Ea as lorodoc_setNextCommitMessage,ja as lorodoc_setNextCommitOptions,M as lorodoc_setNextCommitOrigin,ea as lorodoc_setNextCommitTimestamp,fa as lorodoc_setPeerId,es as lorodoc_setRecordTimestamp,ot as lorodoc_shallowSinceFrontiers,u as lorodoc_shallowSinceVV,Is as lorodoc_subscribe,Y as lorodoc_subscribeFirstCommitFromPeer,fs as lorodoc_subscribeJsonpath,Es as lorodoc_subscribeLocalUpdates,j as lorodoc_subscribePreCommit,ua as lorodoc_toJSON,ar as lorodoc_travelChangeAncestors,ia as lorodoc_version,js as lorodoc_vvToFrontiers,Ms as lorolist_clear,Ys as lorolist_delete,Ya as lorolist_get,e as lorolist_getAttached,To as lorolist_getCursor,fr as lorolist_getIdAt,Fe as lorolist_getShallowValue,nr as lorolist_id,le as lorolist_insert,mo as lorolist_insertContainer,He as lorolist_isAttached,pr as lorolist_isDeleted,Ao as lorolist_kind,Ae as lorolist_length,Ir as lorolist_new,Jo as lorolist_parent,Wo as lorolist_pop,Qe as lorolist_push,Je as lorolist_pushContainer,$o as lorolist_subscribe,Go as lorolist_toArray,ro as lorolist_toJSON,Er as loromap_clear,Yr as loromap_delete,ho as loromap_entries,jr as loromap_get,ds as loromap_getAttached,C as loromap_getLastEditor,Mr as loromap_getOrCreateContainer,bs as loromap_getShallowValue,L as loromap_id,N as loromap_isAttached,Ba as loromap_isDeleted,he as loromap_keys,d as loromap_kind,me as loromap_new,Na as loromap_parent,La as loromap_set,qa as loromap_setContainer,B as loromap_size,ra as loromap_subscribe,Ca as loromap_toJSON,rs as loromap_values,et as loromovablelist_clear,b as loromovablelist_delete,Ns as loromovablelist_get,Z as loromovablelist_getAttached,Cs as loromovablelist_getCreatorAt,Ls as loromovablelist_getCursor,q as loromovablelist_getLastEditorAt,ba as loromovablelist_getLastMoverAt,sr as loromovablelist_getShallowValue,da as loromovablelist_id,qs as loromovablelist_insert,Bs as loromovablelist_insertContainer,Zs as loromovablelist_isAttached,Za as loromovablelist_isDeleted,r as loromovablelist_kind,Eo as loromovablelist_length,hr as loromovablelist_move,Le as loromovablelist_new,tr as loromovablelist_parent,ee as loromovablelist_pop,no as loromovablelist_push,Re as loromovablelist_pushContainer,mr as loromovablelist_set,Co as loromovablelist_setContainer,Ce as loromovablelist_subscribe,Or as loromovablelist_toArray,No as loromovablelist_toJSON,Bo as lorotext_applyDelta,Ge as lorotext_charAt,Ne as lorotext_convertPos,Yo as lorotext_delete,jo as lorotext_deleteUtf8,oo as lorotext_getAttached,kr as lorotext_getCursor,Qr as lorotext_getEditorOf,bo as lorotext_getShallowValue,Hr as lorotext_id,ns as lorotext_insert,x as lorotext_insertUtf8,Fr as lorotext_isAttached,ps as lorotext_isDeleted,V as lorotext_iter,y as lorotext_kind,Ua as lorotext_length,be as lorotext_mark,n as lorotext_new,de as lorotext_parent,ya as lorotext_push,Va as lorotext_slice,za as lorotext_sliceDelta,U as lorotext_sliceDeltaUtf8,oa as lorotext_splice,xa as lorotext_subscribe,os as lorotext_toDelta,st as lorotext_toJSON,p as lorotext_toString,ys as lorotext_unmark,X as lorotext_update,xs as lorotext_updateByLine,Vs as lorotree_createNode,z as lorotree_delete,pa as lorotree_disableFractionalIndex,$e as lorotree_enableFractionalIndex,na as lorotree_getAttached,zs as lorotree_getNodeByID,Us as lorotree_getNodes,Xs as lorotree_getShallowValue,Xa as lorotree_has,o as lorotree_id,Vo as lorotree_isAttached,wr as lorotree_isDeleted,Ee as lorotree_isFractionalIndexEnabled,rr as lorotree_isNodeDeleted,oe as lorotree_kind,_o as lorotree_move,Be as lorotree_new,cr as lorotree_nodes,fo as lorotree_parent,fe as lorotree_roots,Ar as lorotree_subscribe,Io as lorotree_toArray,Mo as lorotree_toJSON,qe as lorotreenode___getClassname,Ie as lorotreenode_children,Xo as lorotreenode_createNode,zo as lorotreenode_creationId,so as lorotreenode_creator,Jr as lorotreenode_data,Kr as lorotreenode_fractionalIndex,uo as lorotreenode_getLastMoveId,Wr as lorotreenode_id,_s as lorotreenode_index,v as lorotreenode_isDeleted,Tr as lorotreenode_move,gs as lorotreenode_moveAfter,k as lorotreenode_moveBefore,O as lorotreenode_parent,Fa as lorotreenode_toJSON,ue as memory,_ as redactJsonUpdates,ie as run,Oa as setDebug,ka as undomanager_addExcludeOriginPrefix,Ha as undomanager_canRedo,F as undomanager_canUndo,sa as undomanager_clear,va as undomanager_groupEnd,ss as undomanager_groupStart,at as undomanager_new,g as undomanager_peer,Os as undomanager_redo,Q as undomanager_setMaxUndoSteps,vs as undomanager_setMergeInterval,ks as undomanager_setOnPop,H as undomanager_setOnPush,ga as undomanager_topRedoValue,Ze as undomanager_topUndoValue,_a as undomanager_undo,Hs as versionvector_compare,Fs as versionvector_decode,Qs as versionvector_encode,Qa as versionvector_get,s as versionvector_length,Po as versionvector_new,xr as versionvector_parseJSON,Te as versionvector_remove,_r as versionvector_setEnd,te as versionvector_setLast,co as versionvector_toJSON};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import{t as a}from"./lua-DqxHXOsz.js";export{a as lua};
function c(e){return RegExp("^(?:"+e.join("|")+")","i")}function i(e){return RegExp("^(?:"+e.join("|")+")$","i")}var g=i("_G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,module,next,pairs,pcall,print,rawequal,rawget,rawset,require,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine.create,coroutine.resume,coroutine.running,coroutine.status,coroutine.wrap,coroutine.yield,debug.debug,debug.getfenv,debug.gethook,debug.getinfo,debug.getlocal,debug.getmetatable,debug.getregistry,debug.getupvalue,debug.setfenv,debug.sethook,debug.setlocal,debug.setmetatable,debug.setupvalue,debug.traceback,close,flush,lines,read,seek,setvbuf,write,io.close,io.flush,io.input,io.lines,io.open,io.output,io.popen,io.read,io.stderr,io.stdin,io.stdout,io.tmpfile,io.type,io.write,math.abs,math.acos,math.asin,math.atan,math.atan2,math.ceil,math.cos,math.cosh,math.deg,math.exp,math.floor,math.fmod,math.frexp,math.huge,math.ldexp,math.log,math.log10,math.max,math.min,math.modf,math.pi,math.pow,math.rad,math.random,math.randomseed,math.sin,math.sinh,math.sqrt,math.tan,math.tanh,os.clock,os.date,os.difftime,os.execute,os.exit,os.getenv,os.remove,os.rename,os.setlocale,os.time,os.tmpname,package.cpath,package.loaded,package.loaders,package.loadlib,package.path,package.preload,package.seeall,string.byte,string.char,string.dump,string.find,string.format,string.gmatch,string.gsub,string.len,string.lower,string.match,string.rep,string.reverse,string.sub,string.upper,table.concat,table.insert,table.maxn,table.remove,table.sort".split(",")),m=i(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),d=i(["function","if","repeat","do","\\(","{"]),p=i(["end","until","\\)","}"]),h=c(["end","until","\\)","}","else","elseif"]);function l(e){for(var t=0;e.eat("=");)++t;return e.eat("["),t}function s(e,t){var n=e.next();return n=="-"&&e.eat("-")?e.eat("[")&&e.eat("[")?(t.cur=u(l(e),"comment"))(e,t):(e.skipToEnd(),"comment"):n=='"'||n=="'"?(t.cur=f(n))(e,t):n=="["&&/[\[=]/.test(e.peek())?(t.cur=u(l(e),"string"))(e,t):/\d/.test(n)?(e.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(n)?(e.eatWhile(/[\w\\\-_.]/),"variable"):null}function u(e,t){return function(n,a){for(var r=null,o;(o=n.next())!=null;)if(r==null)o=="]"&&(r=0);else if(o=="=")++r;else if(o=="]"&&r==e){a.cur=s;break}else r=null;return t}}function f(e){return function(t,n){for(var a=!1,r;(r=t.next())!=null&&!(r==e&&!a);)a=!a&&r=="\\";return a||(n.cur=s),"string"}}const b={name:"lua",startState:function(){return{basecol:0,indentDepth:0,cur:s}},token:function(e,t){if(e.eatSpace())return null;var n=t.cur(e,t),a=e.current();return n=="variable"&&(m.test(a)?n="keyword":g.test(a)&&(n="builtin")),n!="comment"&&n!="string"&&(d.test(a)?++t.indentDepth:p.test(a)&&--t.indentDepth),n},indent:function(e,t,n){var a=h.test(t);return e.basecol+n.unit*(e.indentDepth-(a?1:0))},languageData:{indentOnInput:/^\s*(?:end|until|else|\)|\})$/,commentTokens:{line:"--",block:{open:"--[[",close:"]]--"}}}};export{b as t};
import{s as f}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-Bj1aDYRI.js";import{d as w}from"./hotkeys-BHHWjLlp.js";import{t as d}from"./createLucideIcon-BCdY6lG5.js";var C=d("chevrons-down-up",[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]]),s=d("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),l=f(h());function i(r,o){if(r==null)return{};var e={},t=Object.keys(r),n,a;for(a=0;a<t.length;a++)n=t[a],!(o.indexOf(n)>=0)&&(e[n]=r[n]);return e}var v=["color"],g=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,v);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25H14C14.4142 0.25 14.75 0.585786 14.75 1V14C14.75 14.4142 14.4142 14.75 14 14.75H1C0.585786 14.75 0.25 14.4142 0.25 14V1ZM1.75 1.75V13.25H13.25V1.75H1.75Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}),(0,l.createElement)("rect",{x:"7",y:"5",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"7",y:"3",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"7",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"5",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"3",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"9",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"11",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"7",y:"9",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"7",y:"11",width:"1",height:"1",rx:".5",fill:t}))}),u=["color"],m=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,u);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),p=["color"],L=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,p);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M12.5 3L2.5 3.00002C1.67157 3.00002 1 3.6716 1 4.50002V9.50003C1 10.3285 1.67157 11 2.5 11H7.50003C7.63264 11 7.75982 11.0527 7.85358 11.1465L10 13.2929V11.5C10 11.2239 10.2239 11 10.5 11H12.5C13.3284 11 14 10.3285 14 9.50003V4.5C14 3.67157 13.3284 3 12.5 3ZM2.49999 2.00002L12.5 2C13.8807 2 15 3.11929 15 4.5V9.50003C15 10.8807 13.8807 12 12.5 12H11V14.5C11 14.7022 10.8782 14.8845 10.6913 14.9619C10.5045 15.0393 10.2894 14.9965 10.1464 14.8536L7.29292 12H2.5C1.11929 12 0 10.8807 0 9.50003V4.50002C0 3.11931 1.11928 2.00003 2.49999 2.00002Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),x=["color"],E=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,x);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),R=["color"],y=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,R);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),M=["color"],Z=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,M);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),O=["color"],V=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,O);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),b=["color"],j=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,b);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:t}))}),B=["color"],k=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,B);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M2.05005 13.5C2.05005 13.7485 2.25152 13.95 2.50005 13.95C2.74858 13.95 2.95005 13.7485 2.95005 13.5L2.95005 1.49995C2.95005 1.25142 2.74858 1.04995 2.50005 1.04995C2.25152 1.04995 2.05005 1.25142 2.05005 1.49995L2.05005 13.5ZM8.4317 11.0681C8.60743 11.2439 8.89236 11.2439 9.06809 11.0681C9.24383 10.8924 9.24383 10.6075 9.06809 10.4317L6.58629 7.94993L14.5 7.94993C14.7485 7.94993 14.95 7.74846 14.95 7.49993C14.95 7.2514 14.7485 7.04993 14.5 7.04993L6.58629 7.04993L9.06809 4.56813C9.24383 4.39239 9.24383 4.10746 9.06809 3.93173C8.89236 3.75599 8.60743 3.75599 8.4317 3.93173L5.1817 7.18173C5.00596 7.35746 5.00596 7.64239 5.1817 7.81812L8.4317 11.0681Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),H=["color"],q=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,H);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M12.95 1.50005C12.95 1.25152 12.7485 1.05005 12.5 1.05005C12.2514 1.05005 12.05 1.25152 12.05 1.50005L12.05 13.5C12.05 13.7486 12.2514 13.95 12.5 13.95C12.7485 13.95 12.95 13.7486 12.95 13.5L12.95 1.50005ZM6.5683 3.93188C6.39257 3.75614 6.10764 3.75614 5.93191 3.93188C5.75617 4.10761 5.75617 4.39254 5.93191 4.56827L8.41371 7.05007L0.499984 7.05007C0.251456 7.05007 0.0499847 7.25155 0.0499847 7.50007C0.0499846 7.7486 0.251457 7.95007 0.499984 7.95007L8.41371 7.95007L5.93191 10.4319C5.75617 10.6076 5.75617 10.8925 5.93191 11.0683C6.10764 11.244 6.39257 11.244 6.56831 11.0683L9.8183 7.81827C9.99404 7.64254 9.99404 7.35761 9.8183 7.18188L6.5683 3.93188Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))});const c={keyBy(r,o){let e=new Map,t=new Set;for(let n of r){let a=o(n);e.has(a)&&t.add(a),e.set(a,n)}return t.size>0&&w.trace(`Duplicate keys: ${[...t].join(", ")}`),e},collect(r,o,e){return c.mapValues(c.keyBy(r,o),e)},filterMap(r,o){let e=new Map;for(let[t,n]of r)o(n,t)&&e.set(t,n);return e},mapValues(r,o){let e=new Map;for(let[t,n]of r)e.set(t,o(n,t));return e}};export{E as a,V as c,q as d,s as f,L as i,j as l,g as n,y as o,C as p,m as r,Z as s,c as t,k as u};
import{s as X}from"./chunk-LvLJmgfZ.js";import{d as ye,f as ve,l as Ne,u as be}from"./useEvent-BhXAndur.js";import{t as we}from"./react-Bj1aDYRI.js";import{J as ke,Rn as Ie,Rr as $e,Xr as _e,cn as Fe,gn as Ae,w as Te,y as Ce,zr as G}from"./cells-DPp5cDaO.js";import{t as E}from"./compiler-runtime-B3qBwwSJ.js";import{t as Se}from"./invariant-CAG_dYON.js";import{r as Me}from"./utils-YqBXNpsM.js";import{t as ze}from"./jsx-runtime-ZmTK25f3.js";import{r as K,t as $}from"./button-CZ3Cs4qb.js";import{t as Y}from"./cn-BKtXLv3a.js";import{t as R}from"./createLucideIcon-BCdY6lG5.js";import{r as qe}from"./x-ZP5cObgf.js";import{a as Ee,p as Pe,r as Le,t as We}from"./dropdown-menu-ldcmQvIV.js";import{a as Ve,n as Be}from"./state-D4T75eZb.js";import{c as Z,n as Qe}from"./datasource-CtyqtITR.js";import{a as De}from"./dist-CoCQUAeM.js";import{t as ee}from"./tooltip-CMQz28hC.js";import{a as Oe,i as Re,n as He,r as Ue}from"./multi-map-DxdLNTBd.js";import{t as te}from"./kbd-Cm6Ba9qg.js";import{t as A}from"./links-7AQBmdyV.js";import{r as Je,t as Xe}from"./alert-BOoN6gJ1.js";import{o as Ge,t as Ke}from"./useInstallPackage-D4fX0Ee_.js";import{n as b}from"./cell-link-B9b7J8QK.js";var Ye=R("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),T=R("square-arrow-out-up-right",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]),re=R("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);function Ze(r){let e=null,s=r.cursor();do s.name==="ExpressionStatement"&&(e=s.node);while(s.next());return e}function et(r){let e=r.split(`
`),s=" ",n=Ze(De.parse(r));if(!n)return["def _():",...H(e,s),`${s}return`,"","","_()"].join(`
`);let i=r.slice(0,n.from).trim(),l=r.slice(n.from).trim(),a=i.split(`
`),c=l.split(`
`);return["def _():",...H(a,s),`${s}return ${c[0]}`,...H(c.slice(1),s),"","","_()"].join(`
`)}function H(r,e){if(r.length===1&&r[0]==="")return[];let s=[];for(let n of r)n===""?s.push(""):s.push(e+n);return s}function tt(r,e){var s;if(r.type==="multiple-defs")return[{title:"Fix: Wrap in a function",description:"Make this cell's variables local by wrapping the cell in a function.",fixType:"manual",onFix:async n=>{Se(n.editor,"Editor is null");let i=et(n.editor.state.doc.toString());n.editor.dispatch({changes:{from:0,to:n.editor.state.doc.length,insert:i}})}}];if(r.type==="exception"&&r.exception_type==="NameError"){let n=(s=r.msg.match(/name '(.+)' is not defined/))==null?void 0:s[1];if(!n||!(n in se))return[];let i=rt(n);return[{title:`Fix: Add '${i}'`,description:"Add a new cell for the missing import",fixType:"manual",onFix:async l=>{l.addCodeBelow(i)}}]}return r.type==="sql-error"&&e.aiEnabled?[{title:"Fix with AI",description:"Fix the SQL statement",fixType:"ai",onFix:async n=>{var a;let i=Qe(n.cellId),l=`Fix the SQL statement: ${r.msg}.`;i&&(l+=`
Database schema: ${i}`),(a=n.aiFix)==null||a.setAiCompletionCell({cellId:n.cellId,initialPrompt:l,triggerImmediately:n.aiFix.triggerFix})}}]:[]}function rt(r){let e=se[r];return e===r?`import ${e}`:`import ${e} as ${r}`}var se={mo:"marimo",alt:"altair",bokeh:"bokeh",dask:"dask",np:"numpy",pd:"pandas",pl:"polars",plotly:"plotly",plt:"matplotlib.pyplot",px:"plotly.express",scipy:"scipy",sk:"sklearn",sns:"seaborn",stats:"scipy.stats",tf:"tensorflow",torch:"torch",xr:"xarray",dt:"datetime",json:"json",math:"math",os:"os",re:"re",sys:"sys"},st=E(),nt=_e("marimo:ai-autofix-mode","autofix",Ae);function lt(){let r=(0,st.c)(3),[e,s]=Ne(nt),n;return r[0]!==e||r[1]!==s?(n={fixMode:e,setFixMode:s},r[0]=e,r[1]=s,r[2]=n):n=r[2],n}var U=E(),t=X(ze(),1);const N=r=>{let e=(0,U.c)(21),{errors:s,cellId:n,className:i}=r,l=ve(),{createNewCell:a}=Te(),c=be(Me),o;if(e[0]!==c||e[1]!==s){let x;e[3]===c?x=e[4]:(x=y=>tt(y,{aiEnabled:c}),e[3]=c,e[4]=x),o=s.flatMap(x),e[0]=c,e[1]=s,e[2]=o}else o=e[2];let m=o,p=ye(Be);if(m.length===0)return null;let d=m[0],f;e[5]!==n||e[6]!==a||e[7]!==d||e[8]!==p||e[9]!==l?(f=x=>{var w;let y=(w=l.get(Ce).cellHandles[n].current)==null?void 0:w.editorView;d.onFix({addCodeBelow:_=>{a({cellId:n,autoFocus:!1,before:!1,code:_})},editor:y,cellId:n,aiFix:{setAiCompletionCell:p,triggerFix:x}}),y==null||y.focus()},e[5]=n,e[6]=a,e[7]=d,e[8]=p,e[9]=l,e[10]=f):f=e[10];let u=f,j;e[11]===i?j=e[12]:(j=Y("my-2",i),e[11]=i,e[12]=j);let h;e[13]!==d.description||e[14]!==d.fixType||e[15]!==d.title||e[16]!==u?(h=d.fixType==="ai"?(0,t.jsx)(oe,{tooltip:d.description,openPrompt:()=>u(!1),applyAutofix:()=>u(!0)}):(0,t.jsx)(ee,{content:d.description,align:"start",children:(0,t.jsxs)($,{size:"xs",variant:"outline",className:"font-normal",onClick:()=>u(!1),children:[(0,t.jsx)(Z,{className:"h-3 w-3 mr-2"}),d.title]})}),e[13]=d.description,e[14]=d.fixType,e[15]=d.title,e[16]=u,e[17]=h):h=e[17];let g;return e[18]!==j||e[19]!==h?(g=(0,t.jsx)("div",{className:j,children:h}),e[18]=j,e[19]=h,e[20]=g):g=e[20],g};var ne=Ve,le=Z,ie="Suggest a prompt",ae="Fix with AI";const oe=r=>{let e=(0,U.c)(21),{tooltip:s,openPrompt:n,applyAutofix:i}=r,{fixMode:l,setFixMode:a}=lt(),c=l==="prompt"?n:i,o;e[0]===l?o=e[1]:(o=l==="prompt"?(0,t.jsx)(ne,{className:"h-3 w-3 mr-2 mb-0.5"}):(0,t.jsx)(le,{className:"h-3 w-3 mr-2 mb-0.5"}),e[0]=l,e[1]=o);let m=l==="prompt"?ie:ae,p;e[2]!==c||e[3]!==o||e[4]!==m?(p=(0,t.jsxs)($,{size:"xs",variant:"outline",className:"font-normal rounded-r-none border-r-0",onClick:c,children:[o,m]}),e[2]=c,e[3]=o,e[4]=m,e[5]=p):p=e[5];let d;e[6]!==p||e[7]!==s?(d=(0,t.jsx)(ee,{content:s,align:"start",children:p}),e[6]=p,e[7]=s,e[8]=d):d=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(Pe,{asChild:!0,children:(0,t.jsx)($,{size:"xs",variant:"outline",className:"rounded-l-none px-2","aria-label":"Fix options",children:(0,t.jsx)(qe,{className:"h-3 w-3"})})}),e[9]=f):f=e[9];let u;e[10]!==l||e[11]!==a?(u=()=>{a(l==="prompt"?"autofix":"prompt")},e[10]=l,e[11]=a,e[12]=u):u=e[12];let j=l==="prompt"?"autofix":"prompt",h;e[13]===j?h=e[14]:(h=(0,t.jsx)(it,{mode:j}),e[13]=j,e[14]=h);let g;e[15]!==u||e[16]!==h?(g=(0,t.jsxs)(We,{children:[f,(0,t.jsx)(Le,{align:"end",className:"w-56",children:(0,t.jsx)(Ee,{className:"flex items-center gap-2",onClick:u,children:h})})]}),e[15]=u,e[16]=h,e[17]=g):g=e[17];let x;return e[18]!==g||e[19]!==d?(x=(0,t.jsxs)("div",{className:"flex",children:[d,g]}),e[18]=g,e[19]=d,e[20]=x):x=e[20],x};var it=r=>{let e=(0,U.c)(12),{mode:s}=r,n;e[0]===s?n=e[1]:(n=s==="prompt"?(0,t.jsx)(ne,{className:"h-4 w-4"}):(0,t.jsx)(le,{className:"h-4 w-4"}),e[0]=s,e[1]=n);let i=n,l=s==="prompt"?ie:ae,a=s==="prompt"?"Edit the prompt before applying":"Apply AI fixes automatically",c;e[2]===l?c=e[3]:(c=(0,t.jsx)("span",{className:"font-medium",children:l}),e[2]=l,e[3]=c);let o;e[4]===a?o=e[5]:(o=(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a}),e[4]=a,e[5]=o);let m;e[6]!==c||e[7]!==o?(m=(0,t.jsxs)("div",{className:"flex flex-col",children:[c,o]}),e[6]=c,e[7]=o,e[8]=m):m=e[8];let p;return e[9]!==i||e[10]!==m?(p=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i,m]}),e[9]=i,e[10]=m,e[11]=p):p=e[11],p},ce=/(https?:\/\/\S+)/,at=/\.(png|jpe?g|gif|webp|svg|ico)(\?.*)?$/i,de=/^data:image\//i,ot=["avatars.githubusercontent.com"];function me(r){return de.test(r)?[{type:"image",url:r}]:r.split(ce).filter(e=>e!=="").map(e=>ce.test(e)?at.test(e)||de.test(e)||ot.some(s=>e.includes(s))?{type:"image",url:e}:{type:"url",url:e}:{type:"text",value:e})}var pe=E(),P=X(we(),1),ct=new ke;const J=r=>{let e=RegExp("\x1B\\[[0-9;]*m","g");return r.replaceAll(e,"")};var ue=/(pip\s+install|uv\s+add|uv\s+pip\s+install)\s+/gi;function dt(r){ue.lastIndex=0;let e=ue.exec(r);if(!e)return null;let s=e.index+e[0].length,n=r.slice(s).split(/\s+/),i="",l=0;for(let c of n){let o=c.trim();if(!o)continue;if(o.startsWith("-")){l+=o.length+1;continue}let m=o.match(/^[\w,.[\]-]+/);if(m){i=m[0];break}break}if(!i)return null;let a=s+l+i.length;return{package:i,endIndex:a}}function k(r,e=""){if(!r)return null;if(!/https?:\/\//.test(r))return r;let s=me(r);return s.length===1&&s[0].type==="text"?r:(0,t.jsx)(t.Fragment,{children:s.map((n,i)=>{let l=e?`${e}-${i}`:i;if(n.type==="url"){let a=J(n.url);return(0,t.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",onClick:K.stopPropagation(),className:"text-link hover:underline",children:a},l)}if(n.type==="image"){let a=J(n.url);return(0,t.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",onClick:K.stopPropagation(),className:"text-link hover:underline",children:a},l)}return(0,t.jsx)(P.Fragment,{children:n.value},l)})})}var mt=r=>{let e=(0,pe.c)(6),{packages:s,children:n}=r,{handleInstallPackages:i}=Ke(),l;e[0]!==i||e[1]!==s?(l=c=>{i(s),c.preventDefault()},e[0]=i,e[1]=s,e[2]=l):l=e[2];let a;return e[3]!==n||e[4]!==l?(a=(0,t.jsx)("button",{onClick:l,className:"text-link hover:underline",type:"button",children:n}),e[3]=n,e[4]=l,e[5]=a):a=e[5],a};const pt=r=>{if(!(r instanceof G.Text))return;let e=J(r.data);if(!/(pip\s+install|uv\s+add|uv\s+pip\s+install)/i.test(e))return;let s=[],n=/(pip\s+install|uv\s+add|uv\s+pip\s+install)\s+/gi,i;for(;(i=n.exec(e))!==null;){let c=i.index,o=dt(e.slice(c));o&&s.push({match:i,result:o})}if(s.length===0)return;let l=[],a=0;if(s.forEach((c,o)=>{let{match:m,result:p}=c,d=m.index,f=d+p.endIndex;if(a<d){let j=e.slice(a,d);l.push((0,t.jsx)(P.Fragment,{children:k(j,`before-${o}`)},`before-${o}`))}let u=e.slice(d,f);l.push((0,t.jsx)(mt,{packages:[p.package],children:u},`install-${o}`)),a=f}),a<e.length){let c=e.slice(a);l.push((0,t.jsx)(P.Fragment,{children:k(c,"after")},"after"))}return(0,t.jsx)(t.Fragment,{children:l})},ut=r=>{if(!(r instanceof G.Text))return;let e=r.data;if(!/https?:\/\//.test(e))return;let s=k(e);if(typeof s!="string")return(0,t.jsx)(t.Fragment,{children:s})},ht=(...r)=>e=>{for(let s of r){let n=s(e);if(n!==void 0)return n}},xt=(r,e)=>(0,t.jsx)("span",{children:$e(ct.ansi_to_html(r),{replace:s=>e(s)})}),ft=r=>{let e=(0,pe.c)(4),{text:s}=r,n;e[0]===s?n=e[1]:(n=xt(s,ht(pt,ut)),e[0]=s,e[1]=n);let i=n,l;return e[2]===i?l=e[3]:(l=(0,t.jsx)(t.Fragment,{children:i}),e[2]=i,e[3]=l),l};var he=E(),I=r=>{let e=(0,he.c)(10),s=r.title??"Tip",n;e[0]===s?n=e[1]:(n=(0,t.jsx)(Oe,{className:"pt-2 pb-2 font-normal",children:s}),e[0]=s,e[1]=n);let i;e[2]===r.children?i=e[3]:(i=(0,t.jsx)(Ue,{className:"mr-24 text-[0.84375rem]",children:r.children}),e[2]=r.children,e[3]=i);let l;e[4]!==n||e[5]!==i?(l=(0,t.jsxs)(Re,{value:"item-1",className:"text-muted-foreground",children:[n,i]}),e[4]=n,e[5]=i,e[6]=l):l=e[6];let a;return e[7]!==r.className||e[8]!==l?(a=(0,t.jsx)(He,{type:"single",collapsible:!0,className:r.className,children:l}),e[7]=r.className,e[8]=l,e[9]=a):a=e[9],a};const jt=r=>{let e=(0,he.c)(31),{errors:s,cellId:n,className:i}=r,l=Fe(),a="This cell wasn't run because it has errors",c="destructive",o="text-error";if(s.some(gt))a="Interrupted";else if(s.some(yt))a="An internal error occurred";else if(s.some(vt))a="Ancestor prevented from running",c="default",o="text-secondary-foreground";else if(s.some(Nt))a="Ancestor stopped",c="default",o="text-secondary-foreground";else if(s.some(bt))a="SQL error";else{let x;e[0]===s?x=e[1]:(x=s.find(wt),e[0]=s,e[1]=x);let y=x;y&&"exception_type"in y&&(a=y.exception_type)}let m,p,d,f,u,j;if(e[2]!==c||e[3]!==n||e[4]!==l||e[5]!==i||e[6]!==s||e[7]!==o||e[8]!==a){let x=s.filter(kt),y=s.filter(It),w=s.filter($t),_=s.filter(_t),L=s.filter(Ft),C=s.filter(At),S=s.filter(Tt),W=s.filter(Ct),V=s.filter(St),B=s.filter(Mt),F=s.filter(zt),Q=s.filter(qt),D=s.filter(Et),M;e[15]===l?M=e[16]:(M=()=>{l.openApplication("scratchpad")},e[15]=l,e[16]=M);let xe=M,fe=()=>{let v=[];if(F.length>0||Q.length>0){let q=F.some(Pt),ge=!q&&F.some(Lt);v.push((0,t.jsxs)("div",{children:[F.map(Wt),Q.map(Vt),q&&(0,t.jsxs)($,{size:"xs",variant:"outline",className:"mt-2 font-normal",onClick:()=>Ge(l),children:[(0,t.jsx)(Ye,{className:"h-3.5 w-3.5 mr-1.5 mb-0.5"}),(0,t.jsx)("span",{children:"Open package manager"})]}),ge&&(0,t.jsxs)($,{size:"xs",variant:"outline",className:"mt-2 font-normal",onClick:()=>l.openApplication("terminal"),children:[(0,t.jsx)(re,{className:"h-3.5 w-3.5 mr-1.5"}),(0,t.jsx)("span",{children:"Open terminal"})]}),n&&(0,t.jsx)(N,{errors:[...F,...Q],cellId:n})]},"syntax-unknown"))}if(x.length>0&&v.push((0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground font-medium",children:"The setup cell cannot be run because it has references."}),(0,t.jsx)("ul",{className:"list-disc",children:x.flatMap(Bt)}),n&&(0,t.jsx)(N,{errors:x,cellId:n}),(0,t.jsxs)(I,{title:"Why can't the setup cell have references?",className:"mb-2",children:[(0,t.jsx)("p",{className:"pb-2",children:"The setup cell contains logic that must be run before any other cell runs, including top-level imports used by top-level functions. For this reason, it can't refer to other cells' variables."}),(0,t.jsx)("p",{className:"py-2",children:"Try simplifying the setup cell to only contain only necessary variables."}),(0,t.jsxs)("p",{className:"py-2",children:[(0,t.jsxs)(A,{href:"https://links.marimo.app/errors-setup",children:["Learn more at our docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),"."]})]})]},"setup-refs")),y.length>0&&v.push((0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground font-medium",children:"This cell is in a cycle."}),(0,t.jsx)("ul",{className:"list-disc",children:y.flatMap(Qt)}),n&&(0,t.jsx)(N,{errors:y,cellId:n}),(0,t.jsxs)(I,{title:"What are cycles and how do I resolve them?",className:"mb-2",children:[(0,t.jsx)("p",{className:"pb-2",children:"An example of a cycle is if one cell declares a variable 'a' and reads 'b', and another cell declares 'b' and and reads 'a'. Cycles like this make it impossible for marimo to know how to run your cells, and generally suggest that your code has a bug."}),(0,t.jsx)("p",{className:"py-2",children:"Try merging these cells into a single cell to eliminate the cycle."}),(0,t.jsxs)("p",{className:"py-2",children:[(0,t.jsxs)(A,{href:"https://links.marimo.app/errors-cycles",children:["Learn more at our docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),"."]})]})]},"cycle")),w.length>0){let q=w[0].name;v.push((0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground font-medium",children:"This cell redefines variables from other cells."}),w.map(Ot),n&&(0,t.jsx)(N,{errors:w,cellId:n}),(0,t.jsxs)(I,{title:"Why can't I redefine variables?",children:[(0,t.jsx)("p",{className:"pb-2",children:"marimo requires that each variable is defined in just one cell. This constraint enables reactive and reproducible execution, arbitrary cell reordering, seamless UI elements, execution as a script, and more."}),(0,t.jsxs)("p",{className:"py-2",children:["Try merging this cell with the mentioned cells or wrapping it in a function. Alternatively, prefix variables with an underscore (e.g., ",(0,t.jsxs)(te,{className:"inline",children:["_",q]}),"). to make them private to this cell."]}),(0,t.jsxs)("p",{className:"py-2",children:[(0,t.jsxs)(A,{href:"https://links.marimo.app/errors-multiple-definitions",children:["Learn more at our docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),"."]})]}),(0,t.jsx)(I,{title:"Need a scratchpad?",children:(0,t.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[(0,t.jsxs)($,{size:"xs",variant:"link",className:"my-2 font-normal mx-0 px-0",onClick:xe,children:[(0,t.jsx)(Ie,{className:"h-3"}),(0,t.jsx)("span",{children:"Try the scratchpad"})]}),(0,t.jsx)("span",{children:"to experiment without restrictions on variable names."})]})})]},"multiple-defs"))}return _.length>0&&v.push((0,t.jsxs)("div",{children:[_.map(Rt),n&&(0,t.jsx)(N,{errors:_,cellId:n}),(0,t.jsxs)(I,{title:"Why can't I use `import *`?",children:[(0,t.jsx)("p",{className:"pb-2",children:"Star imports are incompatible with marimo's git-friendly file format and reproducible reactive execution."}),(0,t.jsx)("p",{className:"py-2",children:"marimo's Python file format stores code in functions, so notebooks can be imported as regular Python modules without executing all their code. But Python disallows `import *` everywhere except at the top-level of a module."}),(0,t.jsx)("p",{className:"py-2",children:"Star imports would also silently add names to globals, which would be incompatible with reactive execution."}),(0,t.jsxs)("p",{className:"py-2",children:[(0,t.jsxs)(A,{href:"https://links.marimo.app/errors-import-star",children:["Learn more at our docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),"."]})]})]},"import-star")),L.length>0&&v.push((0,t.jsxs)("div",{children:[L.map(Ht),n&&(0,t.jsx)(N,{errors:L,cellId:n})]},"interruption")),C.length>0&&v.push((0,t.jsxs)("ul",{children:[C.map(Ut),C.some(Jt)&&(0,t.jsx)(I,{children:"Fix the error in the mentioned cells, or handle the exceptions with try/except blocks."}),n&&(0,t.jsx)(N,{errors:C,cellId:n})]},"exception")),S.length>0&&v.push((0,t.jsxs)("ul",{children:[S.map(Xt),n&&(0,t.jsx)(N,{errors:S,cellId:n}),(0,t.jsx)(I,{children:S.some(Gt)?"Ensure that the referenced cells define the required variables, or turn off strict execution.":"Something is wrong with your declarations. Fix any discrepancies, or turn off strict execution."})]},"strict-exception")),W.length>0&&v.push((0,t.jsxs)("div",{children:[W.map(Kt),n&&(0,t.jsx)(N,{errors:W,cellId:n})]},"internal")),V.length>0&&v.push((0,t.jsxs)("div",{children:[V.map(Yt),n&&(0,t.jsx)(N,{errors:V,cellId:n})]},"ancestor-prevented")),B.length>0&&v.push((0,t.jsxs)("div",{children:[B.map(Zt),n&&(0,t.jsx)(N,{errors:B,cellId:n})]},"ancestor-stopped")),D.length>0&&v.push((0,t.jsxs)("div",{children:[D.map(er),n&&(0,t.jsx)(N,{errors:D,cellId:n,className:"mt-2.5"})]},"sql-errors")),v},O=`font-code font-medium tracking-wide ${o}`,z;e[17]!==O||e[18]!==a?(z=(0,t.jsx)(Je,{className:O,children:a}),e[17]=O,e[18]=a,e[19]=z):z=e[19];let je=z;m=Xe,f=c,e[20]===i?u=e[21]:(u=Y("border-none font-code text-sm text-[0.84375rem] px-0 text-muted-foreground normal [&:has(svg)]:pl-0 space-y-4",i),e[20]=i,e[21]=u),j=je,p="flex flex-col gap-8",d=fe(),e[2]=c,e[3]=n,e[4]=l,e[5]=i,e[6]=s,e[7]=o,e[8]=a,e[9]=m,e[10]=p,e[11]=d,e[12]=f,e[13]=u,e[14]=j}else m=e[9],p=e[10],d=e[11],f=e[12],u=e[13],j=e[14];let h;e[22]!==p||e[23]!==d?(h=(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:p,children:d})}),e[22]=p,e[23]=d,e[24]=h):h=e[24];let g;return e[25]!==m||e[26]!==f||e[27]!==u||e[28]!==j||e[29]!==h?(g=(0,t.jsxs)(m,{variant:f,className:u,children:[j,h]}),e[25]=m,e[26]=f,e[27]=u,e[28]=j,e[29]=h,e[30]=g):g=e[30],g};function gt(r){return r.type==="interruption"}function yt(r){return r.type==="internal"}function vt(r){return r.type==="ancestor-prevented"}function Nt(r){return r.type==="ancestor-stopped"}function bt(r){return r.type==="sql-error"}function wt(r){return r.type==="exception"}function kt(r){return r.type==="setup-refs"}function It(r){return r.type==="cycle"}function $t(r){return r.type==="multiple-defs"}function _t(r){return r.type==="import-star"}function Ft(r){return r.type==="interruption"}function At(r){return r.type==="exception"}function Tt(r){return r.type==="strict-exception"}function Ct(r){return r.type==="internal"}function St(r){return r.type==="ancestor-prevented"}function Mt(r){return r.type==="ancestor-stopped"}function zt(r){return r.type==="syntax"}function qt(r){return r.type==="unknown"}function Et(r){return r.type==="sql-error"}function Pt(r){return r.msg.includes("!pip")}function Lt(r){return r.msg.includes("use os.subprocess")}function Wt(r,e){return(0,t.jsx)("pre",{children:k(r.msg,`syntax-${e}`)},`syntax-${e}`)}function Vt(r,e){return(0,t.jsx)("pre",{children:k(r.msg,`unknown-${e}`)},`unknown-${e}`)}function Bt(r,e){return r.edges_with_vars.map((s,n)=>(0,t.jsxs)("li",{className:"my-0.5 ml-8 text-muted-foreground/40",children:[(0,t.jsx)(b,{cellId:s[0]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[": "," ",s[1].length===1?s[1][0]:s[1].join(", ")]})]},`setup-refs-${e}-${n}`))}function Qt(r,e){return r.edges_with_vars.map((s,n)=>(0,t.jsxs)("li",{className:"my-0.5 ml-8 text-muted-foreground/40",children:[(0,t.jsx)(b,{cellId:s[0]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" -> ",s[1].length===1?s[1][0]:s[1].join(", ")," -> "]}),(0,t.jsx)(b,{cellId:s[2]})]},`cycle-${e}-${n}`))}function Dt(r,e){return(0,t.jsx)("li",{className:"my-0.5 ml-8 text-muted-foreground/40",children:(0,t.jsx)(b,{cellId:r})},`cell-${e}`)}function Ot(r,e){return(0,t.jsxs)(P.Fragment,{children:[(0,t.jsx)("p",{className:"text-muted-foreground mt-2",children:`'${r.name}' was also defined by:`}),(0,t.jsx)("ul",{className:"list-disc",children:r.cells.map(Dt)})]},`multiple-defs-${e}`)}function Rt(r,e){return(0,t.jsx)("p",{className:"text-muted-foreground",children:r.msg},`import-star-${e}`)}function Ht(r,e){return(0,t.jsx)("p",{children:"This cell was interrupted and needs to be re-run."},`interruption-${e}`)}function Ut(r,e){return r.exception_type==="NameError"&&r.msg.startsWith("name 'mo'")?(0,t.jsx)("li",{className:"my-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:"name 'mo' is not defined."}),(0,t.jsxs)("p",{className:"text-muted-foreground mt-2",children:["The marimo module (imported as"," ",(0,t.jsx)(te,{className:"inline",children:"mo"}),") is required for Markdown, SQL, and UI elements."]})]})},`exception-${e}`):r.exception_type==="NameError"&&r.msg.startsWith("name '_")?(0,t.jsx)("li",{className:"my-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:r.msg}),(0,t.jsxs)("p",{className:"text-muted-foreground mt-2",children:["Variables prefixed with an underscore are local to a cell"," ","(",(0,t.jsxs)(A,{href:"https://links.marimo.app/local-variables",children:["docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),")."]}),(0,t.jsx)("div",{className:"text-muted-foreground mt-2",children:"See the console area for a traceback."})]})},`exception-${e}`):(0,t.jsx)("li",{className:"my-2",children:r.raising_cell==null?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:k(r.msg,`exception-${e}`)}),(0,t.jsx)("div",{className:"text-muted-foreground mt-2",children:"See the console area for a traceback."})]}):(0,t.jsxs)("div",{children:[k(r.msg,`exception-${e}`),(0,t.jsx)(b,{cellId:r.raising_cell})]})},`exception-${e}`)}function Jt(r){return r.raising_cell!=null}function Xt(r,e){return(0,t.jsx)("li",{className:"my-2",children:r.blamed_cell==null?(0,t.jsx)("p",{children:r.msg}):(0,t.jsxs)("div",{children:[r.msg,(0,t.jsx)(b,{cellId:r.blamed_cell})]})},`strict-exception-${e}`)}function Gt(r){return r.blamed_cell!=null}function Kt(r,e){return(0,t.jsx)("p",{children:r.msg},`internal-${e}`)}function Yt(r,e){return(0,t.jsxs)("div",{children:[r.msg,r.blamed_cell==null?(0,t.jsxs)("span",{children:["(",(0,t.jsx)(b,{cellId:r.raising_cell}),")"]}):(0,t.jsxs)("span",{children:["(",(0,t.jsx)(b,{cellId:r.raising_cell}),"\xA0blames\xA0",(0,t.jsx)(b,{cellId:r.blamed_cell}),")"]})]},`ancestor-prevented-${e}`)}function Zt(r,e){return(0,t.jsxs)("div",{children:[r.msg,(0,t.jsx)(b,{cellId:r.raising_cell})]},`ancestor-stopped-${e}`)}function er(r,e){return(0,t.jsx)("div",{className:"space-y-2 mt-2",children:(0,t.jsx)("p",{className:"text-muted-foreground whitespace-pre-wrap",children:r.msg})},`sql-error-${e}`)}export{re as a,oe as i,ft as n,me as r,jt as t};
import{s as A}from"./chunk-LvLJmgfZ.js";import{u as re}from"./useEvent-BhXAndur.js";import{t as ae}from"./react-Bj1aDYRI.js";import{Mt as oe,w as ie,wt as le}from"./cells-DPp5cDaO.js";import{t as q}from"./compiler-runtime-B3qBwwSJ.js";import{o as se}from"./utils-YqBXNpsM.js";import{t as ce}from"./jsx-runtime-ZmTK25f3.js";import{t as D}from"./button-CZ3Cs4qb.js";import{at as ue}from"./dist-DBwNzi3C.js";import{t as P}from"./createLucideIcon-BCdY6lG5.js";import{n as he,t as me}from"./LazyAnyLanguageCodeMirror-DgZ8iknE.js";import{r as pe}from"./useTheme-DQozhcp1.js";import{t as fe}from"./copy-DHrHayPa.js";import{c as v,d as de,f as ge,g as xe,h as ye,l as we,m as C,o as ve,p as ke,s as N}from"./chunk-5FQGJX7Z-DPlx2kjA.js";import{c as I}from"./katex-CDLTCvjQ.js";import{r as be}from"./html-to-image-CIQqSu-S.js";import{o as Fe}from"./focus-C1YokgL7.js";var Ne=P("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Te=P("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]),Ce=q(),b=A(ae(),1),_={};function Ee(e){let t=(0,Ce.c)(5),[r,n]=(0,b.useState)(_[e]??!1),a;t[0]===e?a=t[1]:(a=i=>{n(i),_[e]=i},t[0]=e,t[1]=a);let o;return t[2]!==r||t[3]!==a?(o=[r,a],t[2]=r,t[3]=a,t[4]=o):o=t[4],o}function Se(e){return e==null||e.data==null||e.data===""}function Me(e,t){return`data:${t};base64,${e}`}function $e(e){return e.startsWith("data:")&&e.includes(";base64,")}function je(e){return e.split(",")[1]}function Ae(e){let t=globalThis.atob(e),r=t.length,n=new Uint8Array(r);for(let a=0;a<r;a++)n[a]=t.charCodeAt(a);return n}const B=Uint8Array.fromBase64??Ae;function z(e){let t=B(e);return new DataView(t.buffer)}function qe(e){let t="",r=e.length;for(let n=0;n<r;n++)t+=String.fromCharCode(e[n]);return globalThis.btoa(t)}const De=Uint8Array.prototype.toBase64?e=>e.toBase64():qe;function Pe(e){return De(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Ie(e){return(e.buffers??[]).map(z)}function _e(e,t){return O(e,t||{})||{type:"root",children:[]}}function O(e,t){let r=Be(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function Be(e,t){switch(e.nodeType){case 1:return Ue(e,t);case 3:return Oe(e);case 8:return Ve(e);case 9:return V(e,t);case 10:return ze();case 11:return V(e,t);default:return}}function V(e,t){return{type:"root",children:U(e,t)}}function ze(){return{type:"doctype"}}function Oe(e){return{type:"text",value:e.nodeValue||""}}function Ve(e){return{type:"comment",value:e.nodeValue||""}}function Ue(e,t){let r=e.namespaceURI,n=r===C.svg?xe:ye,a=r===C.html?e.tagName.toLowerCase():e.tagName,o=r===C.html&&a==="template"?e.content:e,i=e.getAttributeNames(),s={},l=-1;for(;++l<i.length;)s[i[l]]=e.getAttribute(i[l])||"";return n(a,s,U(o,t))}function U(e,t){let r=e.childNodes,n=[],a=-1;for(;++a<r.length;){let o=O(r[a],t);o!==void 0&&n.push(o)}return n}var Le=new DOMParser;function Re(e,t){return _e(t!=null&&t.fragment?We(e):Le.parseFromString(e,"text/html"))}function We(e){let t=document.createElement("template");return t.innerHTML=e,t.content}const L=(function(e,t,r){let n=ke(r);if(!e||!e.type||!e.children)throw Error("Expected parent node");if(typeof t=="number"){if(t<0||t===1/0)throw Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]}),k=(function(e){if(e==null)return Qe;if(typeof e=="string")return Ke(e);if(typeof e=="object")return He(e);if(typeof e=="function")return E(e);throw Error("Expected function, string, or array as `test`")});function He(e){let t=[],r=-1;for(;++r<e.length;)t[r]=k(e[r]);return E(n);function n(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function Ke(e){return E(t);function t(r){return r.tagName===e}}function E(e){return t;function t(r,n,a){return!!(Xe(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function Qe(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Xe(e){return typeof e=="object"&&!!e&&"type"in e&&"tagName"in e}var R=/\n/g,W=/[\t ]+/g,S=k("br"),H=k(rt),Ge=k("p"),K=k("tr"),Je=k(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",nt,at]),Q=k("address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp".split("."));function Ye(e,t){let r=t||{},n="children"in e?e.children:[],a=Q(e),o=J(e,{whitespace:r.whitespace||"normal",breakBefore:!1,breakAfter:!1}),i=[];(e.type==="text"||e.type==="comment")&&i.push(...G(e,{whitespace:o,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<n.length;)i.push(...X(n[s],e,{whitespace:o,breakBefore:s?void 0:a,breakAfter:s<n.length-1?S(n[s+1]):a}));let l=[],h;for(s=-1;++s<i.length;){let m=i[s];typeof m=="number"?h!==void 0&&m>h&&(h=m):m&&(h!==void 0&&h>-1&&l.push(`
`.repeat(h)||" "),h=-1,l.push(m))}return l.join("")}function X(e,t,r){return e.type==="element"?Ze(e,t,r):e.type==="text"?r.whitespace==="normal"?G(e,r):et(e):[]}function Ze(e,t,r){let n=J(e,r),a=e.children||[],o=-1,i=[];if(Je(e))return i;let s,l;for(S(e)||K(e)&&L(t,e,K)?l=`
`:Ge(e)?(s=2,l=2):Q(e)&&(s=1,l=1);++o<a.length;)i=i.concat(X(a[o],e,{whitespace:n,breakBefore:o?void 0:s,breakAfter:o<a.length-1?S(a[o+1]):l}));return H(e)&&L(t,e,H)&&i.push(" "),s&&i.unshift(s),l&&i.push(l),i}function G(e,t){let r=String(e.value),n=[],a=[],o=0;for(;o<=r.length;){R.lastIndex=o;let l=R.exec(r),h=l&&"index"in l?l.index:r.length;n.push(tt(r.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===r.length?t.breakAfter:!0)),o=h+1}let i=-1,s;for(;++i<n.length;)n[i].charCodeAt(n[i].length-1)===8203||i<n.length-1&&n[i+1].charCodeAt(0)===8203?(a.push(n[i]),s=void 0):n[i]?(typeof s=="number"&&a.push(s),a.push(n[i]),s=0):(i===0||i===n.length-1)&&a.push(0);return a}function et(e){return[String(e.value)]}function tt(e,t,r){let n=[],a=0,o;for(;a<e.length;){W.lastIndex=a;let i=W.exec(e);o=i?i.index:e.length,!a&&!o&&i&&!t&&n.push(""),a!==o&&n.push(e.slice(a,o)),a=i?o+i[0].length:o}return a!==o&&!r&&n.push(""),n.join(" ")}function J(e,t){if(e.type==="element"){let r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap";default:}}return t.whitespace}function nt(e){return!!(e.properties||{}).hidden}function rt(e){return e.tagName==="td"||e.tagName==="th"}function at(e){return e.tagName==="dialog"&&!(e.properties||{}).open}var ot={},it=[];function lt(e){let t=e||ot;return function(r,n){ge(r,"element",function(a,o){let i=Array.isArray(a.properties.className)?a.properties.className:it,s=i.includes("language-math"),l=i.includes("math-display"),h=i.includes("math-inline"),m=l;if(!s&&!l&&!h)return;let p=o[o.length-1],d=a;if(a.tagName==="code"&&s&&p&&p.type==="element"&&p.tagName==="pre"&&(d=p,p=o[o.length-2],m=!0),!p)return;let f=Ye(d,{whitespace:"pre"}),c;try{c=I.renderToString(f,{...t,displayMode:m,throwOnError:!0})}catch(w){let F=w,u=F.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...o,a],cause:F,place:a.position,ruleId:u,source:"rehype-katex"});try{c=I.renderToString(f,{...t,displayMode:m,strict:"ignore",throwOnError:!1})}catch{c=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(w)},children:[{type:"text",value:f}]}]}}typeof c=="string"&&(c=Re(c,{fragment:!0}).children);let g=p.children.indexOf(d);return p.children.splice(g,1,...c),de})}}function st(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:a,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:s,mathText:i,mathTextData:s}};function e(l){this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]}]}},l)}function t(){this.buffer()}function r(){let l=this.resume(),h=this.stack[this.stack.length-1];h.type,h.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(l){let h=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),m=this.stack[this.stack.length-1];m.type,this.exit(l),m.value=h;let p=m.data.hChildren[0];p.type,p.tagName,p.children.push({type:"text",value:h}),this.data.mathFlowInside=void 0}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function i(l){let h=this.resume(),m=this.stack[this.stack.length-1];m.type,this.exit(l),m.value=h,m.data.hChildren.push({type:"text",value:h})}function s(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function ct(e){let t=(e||{}).singleDollarTextMath;return t??(t=!0),n.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(o,i,s,l){let h=o.value||"",m=s.createTracker(l),p="$".repeat(Math.max(we(h,"$")+1,2)),d=s.enter("mathFlow"),f=m.move(p);if(o.meta){let c=s.enter("mathFlowMeta");f+=m.move(s.safe(o.meta,{after:`
`,before:f,encode:["$"],...m.current()})),c()}return f+=m.move(`
`),h&&(f+=m.move(h+`
`)),f+=m.move(p),d(),f}function n(o,i,s){let l=o.value||"",h=1;for(t||h++;RegExp("(^|[^$])"+"\\$".repeat(h)+"([^$]|$)").test(l);)h++;let m="$".repeat(h);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let p=-1;for(;++p<s.unsafe.length;){let d=s.unsafe[p];if(!d.atBreak)continue;let f=s.compilePattern(d),c;for(;c=f.exec(l);){let g=c.index;l.codePointAt(g)===10&&l.codePointAt(g-1)===13&&g--,l=l.slice(0,g)+" "+l.slice(c.index+1)}}return m+l+m}function a(){return"$"}}const ut={tokenize:ht,concrete:!0,name:"mathFlow"};var Y={tokenize:mt,partial:!0};function ht(e,t,r){let n=this,a=n.events[n.events.length-1],o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,i=0;return s;function s(u){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(u)}function l(u){return u===36?(e.consume(u),i++,l):i<2?r(u):(e.exit("mathFlowFenceSequence"),N(e,h,"whitespace")(u))}function h(u){return u===null||v(u)?p(u):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(u))}function m(u){return u===null||v(u)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),p(u)):u===36?r(u):(e.consume(u),m)}function p(u){return e.exit("mathFlowFence"),n.interrupt?t(u):e.attempt(Y,d,w)(u)}function d(u){return e.attempt({tokenize:F,partial:!0},w,f)(u)}function f(u){return(o?N(e,c,"linePrefix",o+1):c)(u)}function c(u){return u===null?w(u):v(u)?e.attempt(Y,d,w)(u):(e.enter("mathFlowValue"),g(u))}function g(u){return u===null||v(u)?(e.exit("mathFlowValue"),c(u)):(e.consume(u),g)}function w(u){return e.exit("mathFlow"),t(u)}function F(u,ee,M){let $=0;return N(u,te,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function te(y){return u.enter("mathFlowFence"),u.enter("mathFlowFenceSequence"),j(y)}function j(y){return y===36?($++,u.consume(y),j):$<i?M(y):(u.exit("mathFlowFenceSequence"),N(u,ne,"whitespace")(y))}function ne(y){return y===null||v(y)?(u.exit("mathFlowFence"),ee(y)):M(y)}}}function mt(e,t,r){let n=this;return a;function a(i){return i===null?t(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o)}function o(i){return n.parser.lazy[n.now().line]?r(i):t(i)}}function pt(e){let t=(e||{}).singleDollarTextMath;return t??(t=!0),{tokenize:r,resolve:ft,previous:dt,name:"mathText"};function r(n,a,o){let i=0,s,l;return h;function h(c){return n.enter("mathText"),n.enter("mathTextSequence"),m(c)}function m(c){return c===36?(n.consume(c),i++,m):i<2&&!t?o(c):(n.exit("mathTextSequence"),p(c))}function p(c){return c===null?o(c):c===36?(l=n.enter("mathTextSequence"),s=0,f(c)):c===32?(n.enter("space"),n.consume(c),n.exit("space"),p):v(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),p):(n.enter("mathTextData"),d(c))}function d(c){return c===null||c===32||c===36||v(c)?(n.exit("mathTextData"),p(c)):(n.consume(c),d)}function f(c){return c===36?(n.consume(c),s++,f):s===i?(n.exit("mathTextSequence"),n.exit("mathText"),a(c)):(l.type="mathTextData",d(c))}}}function ft(e){let t=e.length-4,r=3,n,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)a===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(a=n):(n===t||e[n][1].type==="lineEnding")&&(e[a][1].type="mathTextData",n!==a+2&&(e[a][1].end=e[n-1][1].end,e.splice(a+2,n-a-2),t-=n-a-2,n=a+2),a=void 0);return e}function dt(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function gt(e){return{flow:{36:ut},text:{36:pt(e)}}}var xt={};function yt(e){let t=this,r=e||xt,n=t.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push(gt(r)),o.push(st()),i.push(ct(r))}function wt(e={}){return{name:"katex",type:"math",remarkPlugin:[yt,{singleDollarTextMath:e.singleDollarTextMath??!1}],rehypePlugin:[lt,{errorColor:e.errorColor??"var(--color-muted-foreground)"}],getStyles(){return"katex/dist/katex.min.css"}}}var vt=wt(),T=q(),x=A(ce(),1),kt=[ue.lineWrapping],bt=new Set(["python","markdown","sql","json","yaml","toml","shell","javascript","typescript","jsx","tsx","css","html"]);function Ft(e,t){return e?e==="python"?{language:e,code:t}:e==="sql"?{language:"python",code:le.fromQuery(t)}:e==="markdown"?{language:"python",code:oe.fromMarkdown(t)}:e==="shell"||e==="bash"?{language:"python",code:`import subprocess
subprocess.run("${t}")`}:{language:"python",code:`_${e} = """
${t}
"""`}:{language:"python",code:t}}var Nt=e=>{let t=(0,T.c)(9),{code:r,language:n}=e,{createNewCell:a}=ie(),o=Fe(),i=re(se),s;t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==o?(s=()=>{let p=Ft(n,r);n==="sql"&&be({autoInstantiate:i,createNewCell:a,fromCellId:o}),a({code:p.code,before:!1,cellId:o??"__end__"})},t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=o,t[5]=s):s=t[5];let l=s,h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,x.jsx)(he,{className:"ml-2 h-4 w-4"}),t[6]=h):h=t[6];let m;return t[7]===l?m=t[8]:(m=(0,x.jsxs)(D,{size:"xs",variant:"outline",onClick:l,children:["Add to Notebook",h]}),t[7]=l,t[8]=m),m},Tt=e=>{let t=(0,T.c)(17),{code:r,language:n}=e,{theme:a}=pe(),[o,i]=(0,b.useState)(r);o!==r&&i(r);let s;t[0]===o?s=t[1]:(s=async()=>{await fe(o)},t[0]=o,t[1]=s);let l=s,h=a==="dark"?"dark":"light",m=n&&bt.has(n)?n:void 0,p;t[2]!==h||t[3]!==m||t[4]!==o?(p=(0,x.jsx)(b.Suspense,{children:(0,x.jsx)(me,{theme:h,language:m,className:"cm border rounded overflow-hidden",extensions:kt,value:o,onChange:i})}),t[2]=h,t[3]=m,t[4]=o,t[5]=p):p=t[5];let d;t[6]===l?d=t[7]:(d=(0,x.jsx)(Ct,{size:"xs",variant:"outline",onClick:l,children:"Copy"}),t[6]=l,t[7]=d);let f;t[8]!==n||t[9]!==o?(f=(0,x.jsx)(Nt,{code:o,language:n}),t[8]=n,t[9]=o,t[10]=f):f=t[10];let c;t[11]!==d||t[12]!==f?(c=(0,x.jsxs)("div",{className:"flex justify-end mt-2 space-x-2",children:[d,f]}),t[11]=d,t[12]=f,t[13]=c):c=t[13];let g;return t[14]!==p||t[15]!==c?(g=(0,x.jsxs)("div",{className:"relative",children:[p,c]}),t[14]=p,t[15]=c,t[16]=g):g=t[16],g},Ct=e=>{let t=(0,T.c)(9),r,n;t[0]===e?(r=t[1],n=t[2]):({onClick:r,...n}=e,t[0]=e,t[1]=r,t[2]=n);let[a,o]=(0,b.useState)(!1),i;t[3]===r?i=t[4]:(i=h=>{r==null||r(h),o(!0),setTimeout(()=>o(!1),1e3)},t[3]=r,t[4]=i);let s=a?"Copied":"Copy",l;return t[5]!==n||t[6]!==i||t[7]!==s?(l=(0,x.jsx)(D,{...n,onClick:i,children:s}),t[5]=n,t[6]=i,t[7]=s,t[8]=l):l=t[8],l},Et={code:({children:e,className:t})=>{let r=t==null?void 0:t.replace("language-","");if(r&&typeof e=="string"){let n=e.trim();return(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"text-xs text-muted-foreground pl-1",children:r}),(0,x.jsx)(Tt,{code:n,language:r})]})}return(0,x.jsx)("code",{className:t,children:e})}};const Z=(0,b.memo)(e=>{let t=(0,T.c)(3),{content:r}=e,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={math:vt},t[0]=n):n=t[0];let a;return t[1]===r?a=t[2]:(a=(0,x.jsx)(ve,{components:Et,plugins:n,className:"mo-markdown-renderer",children:r}),t[1]=r,t[2]=a),a});Z.displayName="MarkdownRenderer";export{Pe as a,Ie as c,Te as d,Ne as f,B as i,Se as l,Me as n,je as o,z as r,$e as s,Z as t,Ee as u};
const n=Math.abs,h=Math.atan2,M=Math.cos,o=Math.max,r=Math.min,c=Math.sin,i=Math.sqrt,u=1e-12,s=Math.PI,t=s/2,f=2*s;function d(a){return a>1?0:a<-1?s:Math.acos(a)}function l(a){return a>=1?t:a<=-1?-t:Math.asin(a)}export{M as a,o as c,c as d,i as f,h as i,r as l,d as n,u as o,f as p,l as r,t as s,n as t,s as u};
var o="[a-zA-Z\\$][a-zA-Z0-9\\$]*",A="(?:\\d+)",z="(?:\\.\\d+|\\d+\\.\\d*|\\d+)",Z="(?:\\.\\w+|\\w+\\.\\w*|\\w+)",r="(?:`(?:`?"+z+")?)",$=RegExp("(?:"+A+"(?:\\^\\^"+Z+r+"?(?:\\*\\^[+-]?\\d+)?))"),l=RegExp("(?:"+z+r+"?(?:\\*\\^[+-]?\\d+)?)"),i=RegExp("(?:`?)(?:"+o+")(?:`(?:"+o+"))*(?:`?)");function m(a,t){var e=a.next();return e==='"'?(t.tokenize=u,t.tokenize(a,t)):e==="("&&a.eat("*")?(t.commentLevel++,t.tokenize=h,t.tokenize(a,t)):(a.backUp(1),a.match($,!0,!1)||a.match(l,!0,!1)?"number":a.match(/(?:In|Out)\[[0-9]*\]/,!0,!1)?"atom":a.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/,!0,!1)?"meta":a.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,!0,!1)?"string.special":a.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)||a.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)||a.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)||a.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variableName.special":a.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)?"character":a.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":a.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)?"variableName.constant":a.match(i,!0,!1)?"keyword":a.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(a.next(),"error"))}function u(a,t){for(var e,n=!1,c=!1;(e=a.next())!=null;){if(e==='"'&&!c){n=!0;break}c=!c&&e==="\\"}return n&&!c&&(t.tokenize=m),"string"}function h(a,t){for(var e,n;t.commentLevel>0&&(n=a.next())!=null;)e==="("&&n==="*"&&t.commentLevel++,e==="*"&&n===")"&&t.commentLevel--,e=n;return t.commentLevel<=0&&(t.tokenize=m),"comment"}const k={name:"mathematica",startState:function(){return{tokenize:m,commentLevel:0}},token:function(a,t){return a.eatSpace()?null:t.tokenize(a,t)},languageData:{commentTokens:{block:{open:"(*",close:"*)"}}}};export{k as t};
import{t as a}from"./mathematica-Do-octY0.js";export{a as mathematica};
import{t as o}from"./mbox-VgrgGytk.js";export{o as mbox};
var i=["From","Sender","Reply-To","To","Cc","Bcc","Message-ID","In-Reply-To","References","Resent-From","Resent-Sender","Resent-To","Resent-Cc","Resent-Bcc","Resent-Message-ID","Return-Path","Received"],o=["Date","Subject","Comments","Keywords","Resent-Date"],d=/^[ \t]/,s=/^From /,c=RegExp("^("+i.join("|")+"): "),m=RegExp("^("+o.join("|")+"): "),u=/^[^:]+:/,l=/^[^ ]+@[^ ]+/,h=/^.*?(?=[^ ]+?@[^ ]+)/,p=/^<.*?>/,R=/^.*?(?=<.*>)/;function H(e){return e==="Subject"?"header":"string"}function f(e,n){if(e.sol()){if(n.inSeparator=!1,n.inHeader&&e.match(d))return null;if(n.inHeader=!1,n.header=null,e.match(s))return n.inHeaders=!0,n.inSeparator=!0,"atom";var r,t=!1;return(r=e.match(m))||(t=!0)&&(r=e.match(c))?(n.inHeaders=!0,n.inHeader=!0,n.emailPermitted=t,n.header=r[1],"atom"):n.inHeaders&&(r=e.match(u))?(n.inHeader=!0,n.emailPermitted=!0,n.header=r[1],"atom"):(n.inHeaders=!1,e.skipToEnd(),null)}if(n.inSeparator)return e.match(l)?"link":(e.match(h)||e.skipToEnd(),"atom");if(n.inHeader){var a=H(n.header);if(n.emailPermitted){if(e.match(p))return a+" link";if(e.match(R))return a}return e.skipToEnd(),a}return e.skipToEnd(),null}const S={name:"mbox",startState:function(){return{inSeparator:!1,inHeader:!1,emailPermitted:!1,header:null,inHeaders:!1}},token:f,blankLine:function(e){e.inHeaders=e.inSeparator=e.inHeader=!1},languageData:{autocomplete:i.concat(o)}};export{S as t};
import{s as M}from"./chunk-LvLJmgfZ.js";import{t as O}from"./react-Bj1aDYRI.js";import{t as P}from"./compiler-runtime-B3qBwwSJ.js";import{r as S}from"./useEventListener-Cb-RVVEn.js";import{t as _}from"./jsx-runtime-ZmTK25f3.js";import{n as u,t as v}from"./cn-BKtXLv3a.js";import{E as q,y as N}from"./Combination-BAEdC-rz.js";var a=M(O(),1),p=M(_(),1);function z(t){let e=t+"CollectionProvider",[o,n]=q(e),[s,l]=o(e,{collectionRef:{current:null},itemMap:new Map}),h=d=>{let{scope:r,children:c}=d,i=a.useRef(null),m=a.useRef(new Map).current;return(0,p.jsx)(s,{scope:r,itemMap:m,collectionRef:i,children:c})};h.displayName=e;let x=t+"CollectionSlot",A=N(x),y=a.forwardRef((d,r)=>{let{scope:c,children:i}=d;return(0,p.jsx)(A,{ref:S(r,l(x,c).collectionRef),children:i})});y.displayName=x;let g=t+"CollectionItemSlot",w="data-radix-collection-item",k=N(g),R=a.forwardRef((d,r)=>{let{scope:c,children:i,...m}=d,f=a.useRef(null),I=S(r,f),C=l(g,c);return a.useEffect(()=>(C.itemMap.set(f,{ref:f,...m}),()=>{C.itemMap.delete(f)})),(0,p.jsx)(k,{[w]:"",ref:I,children:i})});R.displayName=g;function E(d){let r=l(t+"CollectionConsumer",d);return a.useCallback(()=>{let c=r.collectionRef.current;if(!c)return[];let i=Array.from(c.querySelectorAll(`[${w}]`));return Array.from(r.itemMap.values()).sort((m,f)=>i.indexOf(m.ref.current)-i.indexOf(f.ref.current))},[r.collectionRef,r.itemMap])}return[{Provider:h,Slot:y,ItemSlot:R},E,n]}var V=a.createContext(void 0);function $(t){let e=a.useContext(V);return t||e||"ltr"}var B=P();const D=u("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",{variants:{subcontent:{true:"shadow-lg"}}}),F=u("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",{variants:{inset:{true:"pl-8"}}}),b="data-disabled:pointer-events-none data-disabled:opacity-50",G=u(v("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground",b),{variants:{}}),H=u("absolute left-2 flex h-3.5 w-3.5 items-center justify-center",{variants:{}}),J=u("px-2 py-1.5 text-sm font-semibold",{variants:{inset:{true:"pl-8"}}}),K=u(v("menu-item relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden",b),{variants:{inset:{true:"pl-8"},variant:{default:"focus:bg-accent focus:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",danger:"focus:bg-(--red-5) focus:text-(--red-12) aria-selected:bg-(--red-5) aria-selected:text-(--red-12)",muted:"focus:bg-muted/70 focus:text-muted-foreground aria-selected:bg-muted/70 aria-selected:text-muted-foreground",success:"focus:bg-(--grass-3) focus:text-(--grass-11) aria-selected:bg-(--grass-3) aria-selected:text-(--grass-11)",disabled:"text-muted-foreground"}},defaultVariants:{variant:"default"}}),L=u("-mx-1 my-1 h-px bg-border last:hidden",{variants:{}}),j=t=>{let e=(0,B.c)(8),o,n;e[0]===t?(o=e[1],n=e[2]):({className:o,...n}=t,e[0]=t,e[1]=o,e[2]=n);let s;e[3]===o?s=e[4]:(s=v("ml-auto text-xs tracking-widest opacity-60",o),e[3]=o,e[4]=s);let l;return e[5]!==n||e[6]!==s?(l=(0,p.jsx)("span",{className:s,...n}),e[5]=n,e[6]=s,e[7]=l):l=e[7],l};j.displayName="MenuShortcut";export{G as a,L as c,z as d,H as i,F as l,j as n,K as o,D as r,J as s,b as t,$ as u};
import"./react-Bj1aDYRI.js";import"./jsx-runtime-ZmTK25f3.js";import"./cjs-CH5Rj0g8.js";import{a as r}from"./chunk-5FQGJX7Z-DPlx2kjA.js";export{r as Mermaid};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./info-NVLQJR56-Ccg18Lpe.js","./chunk-FPAJGGOC-DOBSZjU2.js","./reduce-CaioMeUx.js","./_baseIsEqual-B9N9Mw_N.js","./_Uint8Array-BGESiCQL.js","./_arrayReduce-TT0iOGKY.js","./_baseEach-BhAgFun2.js","./_baseFor-Duhs3RiJ.js","./get-6uJrSKbw.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./memoize-BCOZVFBt.js","./hasIn-CycJImp8.js","./_baseProperty-NKyJO2oh.js","./_baseUniq-BP3iN0f3.js","./min-Ci3LzCQg.js","./_baseMap-D3aN2j3O.js","./_baseFlatten-CUZNxU8H.js","./flatten-D-7VEN0q.js","./isEmpty-CgX_-6Mt.js","./main-U5Goe76G.js","./chunk-LvLJmgfZ.js","./chunk-LBM3YZW2-BRBe7ZaP.js","./packet-BFZMPI3H-C_EwQwCX.js","./chunk-76Q3JFCE-BAZ3z-Fu.js","./pie-7BOR55EZ-B2NFlNeo.js","./chunk-T53DSG4Q-Bhd043Cg.js","./architecture-U656AL7Q-DENTsr7c.js","./chunk-O7ZBX7Z2-CFqB9i7k.js","./gitGraph-F6HP7TQM-BwJPuiCH.js","./chunk-S6J4BHB3-C4KwSfr_.js","./radar-NHE76QYJ-C3XGuwbG.js","./chunk-LHMN2FUI-C4onQD9F.js","./treemap-KMMF4GRG-CQXdJ2ER.js","./chunk-FWNWRKHM-DzIkWreD.js"])))=>i.map(i=>d[i]);
import{f as i}from"./chunk-FPAJGGOC-DOBSZjU2.js";import{t as c}from"./preload-helper-D2MJg03u.js";let _,u=(async()=>{var s;var t={},l={info:i(async()=>{let{createInfoServices:a}=await c(async()=>{let{createInfoServices:r}=await import("./info-NVLQJR56-Ccg18Lpe.js").then(async e=>(await e.__tla,e));return{createInfoServices:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url);t.info=a().Info.parser.LangiumParser},"info"),packet:i(async()=>{let{createPacketServices:a}=await c(async()=>{let{createPacketServices:r}=await import("./packet-BFZMPI3H-C_EwQwCX.js").then(async e=>(await e.__tla,e));return{createPacketServices:r}},__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,24]),import.meta.url);t.packet=a().Packet.parser.LangiumParser},"packet"),pie:i(async()=>{let{createPieServices:a}=await c(async()=>{let{createPieServices:r}=await import("./pie-7BOR55EZ-B2NFlNeo.js").then(async e=>(await e.__tla,e));return{createPieServices:r}},__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26]),import.meta.url);t.pie=a().Pie.parser.LangiumParser},"pie"),architecture:i(async()=>{let{createArchitectureServices:a}=await c(async()=>{let{createArchitectureServices:r}=await import("./architecture-U656AL7Q-DENTsr7c.js").then(async e=>(await e.__tla,e));return{createArchitectureServices:r}},__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,28]),import.meta.url);t.architecture=a().Architecture.parser.LangiumParser},"architecture"),gitGraph:i(async()=>{let{createGitGraphServices:a}=await c(async()=>{let{createGitGraphServices:r}=await import("./gitGraph-F6HP7TQM-BwJPuiCH.js").then(async e=>(await e.__tla,e));return{createGitGraphServices:r}},__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,30]),import.meta.url);t.gitGraph=a().GitGraph.parser.LangiumParser},"gitGraph"),radar:i(async()=>{let{createRadarServices:a}=await c(async()=>{let{createRadarServices:r}=await import("./radar-NHE76QYJ-C3XGuwbG.js").then(async e=>(await e.__tla,e));return{createRadarServices:r}},__vite__mapDeps([31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,32]),import.meta.url);t.radar=a().Radar.parser.LangiumParser},"radar"),treemap:i(async()=>{let{createTreemapServices:a}=await c(async()=>{let{createTreemapServices:r}=await import("./treemap-KMMF4GRG-CQXdJ2ER.js").then(async e=>(await e.__tla,e));return{createTreemapServices:r}},__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,34]),import.meta.url);t.treemap=a().Treemap.parser.LangiumParser},"treemap")};_=async function(a,r){let e=l[a];if(!e)throw Error(`Unknown diagram type: ${a}`);t[a]||await e();let n=t[a].parse(r);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);return n.value},i(_,"parse");var o=(s=class extends Error{constructor(r){let e=r.lexerErrors.map(p=>p.message).join(`
`),n=r.parserErrors.map(p=>p.message).join(`
`);super(`Parsing failed: ${e} ${n}`),this.result=r}},i(s,"MermaidParseError"),s)})();export{u as __tla,_ as t};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./c4Diagram-YG6GDRKO-C-eNQ40H.js","./dist-C1VXabOr.js","./chunk-LvLJmgfZ.js","./src-CsZby044.js","./src-CvyFXpBy.js","./timer-B6DpdVnC.js","./chunk-S3R3BYOJ-8loRaCFh.js","./step-CVy5FnKg.js","./math-BJjKGmt3.js","./chunk-ABZYJK2D-0jga8uiE.js","./preload-helper-D2MJg03u.js","./purify.es-DZrAQFIu.js","./merge-BBX6ug-N.js","./_Uint8Array-BGESiCQL.js","./_baseFor-Duhs3RiJ.js","./memoize-BCOZVFBt.js","./chunk-TZMSLE5B-CPHBPwrM.js","./flowDiagram-NV44I4VS-BhCyaqwV.js","./chunk-JA3XYJ7Z-DOm8KfKa.js","./channel-CdzZX-OR.js","./chunk-55IACEB6-njZIr50E.js","./chunk-ATLVNIR6-B17dg7Ry.js","./chunk-CVBHYZKI-DU48rJVu.js","./chunk-FMBD7UC4-CHJv683r.js","./chunk-HN2XXSSU-Bdbi3Mns.js","./chunk-JZLCHNYA-48QVgmR4.js","./chunk-MI3HLSF2-n3vxgSbN.js","./chunk-N4CR4FBY-BNoQB557.js","./chunk-QXUST7PY-DkCIa8tJ.js","./line-BA7eTS55.js","./path-D7fidI_g.js","./array-Cf4PUXPA.js","./chunk-QN33PNHL-BOQncxfy.js","./erDiagram-Q2GNP2WA-CekwCx1v.js","./gitGraphDiagram-NY62KEGX-DOBPUqeq.js","./chunk-FPAJGGOC-DOBSZjU2.js","./reduce-CaioMeUx.js","./_baseIsEqual-B9N9Mw_N.js","./_arrayReduce-TT0iOGKY.js","./_baseEach-BhAgFun2.js","./get-6uJrSKbw.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./hasIn-CycJImp8.js","./_baseProperty-NKyJO2oh.js","./_baseUniq-BP3iN0f3.js","./min-Ci3LzCQg.js","./_baseMap-D3aN2j3O.js","./_baseFlatten-CUZNxU8H.js","./flatten-D-7VEN0q.js","./isEmpty-CgX_-6Mt.js","./main-U5Goe76G.js","./chunk-76Q3JFCE-BAZ3z-Fu.js","./chunk-FWNWRKHM-DzIkWreD.js","./chunk-LBM3YZW2-BRBe7ZaP.js","./chunk-LHMN2FUI-C4onQD9F.js","./chunk-O7ZBX7Z2-CFqB9i7k.js","./chunk-S6J4BHB3-C4KwSfr_.js","./chunk-T53DSG4Q-Bhd043Cg.js","./mermaid-parser.core-BLHYb13y.js","./chunk-4BX2VUAB-KawmK-5L.js","./chunk-QZHKN3VN-Cp_TxrNJ.js","./ganttDiagram-JELNMOA3-Ct2B_ci4.js","./linear-BWciPXnd.js","./precisionRound-CU2C3Vxx.js","./defaultLocale-JieDVWC_.js","./init-DRQmrFIb.js","./time-DkuObi5n.js","./defaultLocale-BLne0bXb.js","./infoDiagram-WHAUD3N6-Cytag0-K.js","./chunk-EXTU4WIE-Dmu97ZvI.js","./chunk-XAJISQIX-0gvwv13B.js","./pieDiagram-ADFJNKIX-DXRnX2TS.js","./ordinal-DG_POl79.js","./arc-D1owqr0z.js","./quadrantDiagram-AYHSOK5B-e3OVACTV.js","./xychartDiagram-PRI3JC2R-DtYN6-1-.js","./range-1DwpgXvM.js","./requirementDiagram-UZGBJVZJ-DMbzgjKI.js","./sequenceDiagram-WL72ISMW-DKFGl_80.js","./classDiagram-2ON5EDUG-CUlU7OLD.js","./chunk-B4BG7PRW-DoVbcCDm.js","./classDiagram-v2-WZHVMYZB-DAwrDtTO.js","./stateDiagram-FKZM4ZOC-Czf6mxbq.js","./dagre-DFula7I5.js","./graphlib-B4SLw_H3.js","./sortBy-CGfmqUg5.js","./pick-B_6Qi5aM.js","./_baseSet-5Rdwpmr3.js","./range-D2UKkEg-.js","./toInteger-CDcO32Gx.js","./now-6sUe0ZdD.js","./_hasUnicode-CWqKLxBC.js","./isString-DtNk7ov1.js","./chunk-DI55MBZ5-rLpl7joX.js","./stateDiagram-v2-4FDKWEC3-DT577w6p.js","./journeyDiagram-XKPGCS4Q-CPDnALH5.js","./timeline-definition-IT6M3QCI-Cr57imdX.js","./mindmap-definition-VGOIOE7T-BflEJS3A.js","./kanban-definition-3W4ZIXB7-D0-Tthpw.js","./sankeyDiagram-TZEHDZUN-B90PTMUW.js","./colors-DUsH-HF1.js","./diagram-S2PKOQOG-DJt_T1Gq.js","./diagram-QEK2KX5R-IlkvvuKX.js","./blockDiagram-VD42YOAC-Bol-uwBO.js","./clone-bEECh4rs.js","./architectureDiagram-VXUJARFQ-CDeVogFv.js","./cytoscape.esm-BauVghWH.js","./diagram-PSM6KHXK-DpuCiAS7.js","./treemap-CZF0Enj1.js"])))=>i.map(i=>d[i]);
import{s as Et}from"./chunk-LvLJmgfZ.js";import"./useEvent-BhXAndur.js";import{t as ma}from"./react-Bj1aDYRI.js";import{t as ua}from"./compiler-runtime-B3qBwwSJ.js";import{t as xt}from"./isEmpty-CgX_-6Mt.js";import{d as ga}from"./hotkeys-BHHWjLlp.js";import{t as pa}from"./jsx-runtime-ZmTK25f3.js";import{t as u}from"./preload-helper-D2MJg03u.js";import{r as fa}from"./useTheme-DQozhcp1.js";import{t as ya}from"./purify.es-DZrAQFIu.js";import{n as ha}from"./useAsyncData-BMGLSTg8.js";import{u as V}from"./src-CvyFXpBy.js";import{a as wa,f as vt,g as B,h as _a,i as ba,o as Ea}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{t as Dt}from"./chunk-XAJISQIX-0gvwv13B.js";import{i as Tt,n as i,r as w}from"./src-CsZby044.js";import{J as me,M as ue,P as K,R as xa,S as va,V as Da,W as Ta,Y as La,c as Aa,f as Lt,g as ka,h as Ra,j as ee,l as At,n as Ia,p as ge,q as Pa,r as Oa,t as Ma,w as kt,x as pe,y as G,__tla as Va}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as Sa}from"./chunk-EXTU4WIE-Dmu97ZvI.js";import{n as Fa,t as $a}from"./chunk-MI3HLSF2-n3vxgSbN.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import{i as za,s as ja}from"./chunk-JA3XYJ7Z-DOm8KfKa.js";import"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import{n as qa,__tla as Ca}from"./chunk-N4CR4FBY-BNoQB557.js";let Rt,Ha=Promise.all([(()=>{try{return Va}catch{}})(),(()=>{try{return Ca}catch{}})()]).then(async()=>{var F;var fe="comm",ye="rule",he="decl",It="@import",Pt="@namespace",Ot="@keyframes",Mt="@layer",we=Math.abs,te=String.fromCharCode;function _e(e){return e.trim()}function N(e,t,r){return e.replace(t,r)}function Vt(e,t,r){return e.indexOf(t,r)}function z(e,t){return e.charCodeAt(t)|0}function j(e,t,r){return e.slice(t,r)}function k(e){return e.length}function St(e){return e.length}function Y(e,t){return t.push(e),e}var U=1,q=1,be=0,E=0,y=0,C="";function re(e,t,r,a,n,o,s,l){return{value:e,root:t,parent:r,type:a,props:n,children:o,line:U,column:q,length:s,return:"",siblings:l}}function Ft(){return y}function $t(){return y=E>0?z(C,--E):0,q--,y===10&&(q=1,U--),y}function D(){return y=E<be?z(C,E++):0,q++,y===10&&(q=1,U++),y}function M(){return z(C,E)}function W(){return E}function J(e,t){return j(C,e,t)}function H(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zt(e){return U=q=1,be=k(C=e),E=0,[]}function jt(e){return C="",e}function ae(e){return _e(J(E-1,ie(e===91?e+2:e===40?e+1:e)))}function qt(e){for(;(y=M())&&y<33;)D();return H(e)>2||H(y)>3?"":" "}function Ct(e,t){for(;--t&&D()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return J(e,W()+(t<6&&M()==32&&D()==32))}function ie(e){for(;D();)switch(y){case e:return E;case 34:case 39:e!==34&&e!==39&&ie(y);break;case 40:e===41&&ie(e);break;case 92:D();break}return E}function Ht(e,t){for(;D()&&e+y!==57&&!(e+y===84&&M()===47););return"/*"+J(t,E-1)+"*"+te(e===47?e:D())}function Bt(e){for(;!H(M());)D();return J(e,E)}function Gt(e){return jt(Q("",null,null,null,[""],e=zt(e),0,[0],e))}function Q(e,t,r,a,n,o,s,l,d){for(var g=0,f=0,c=s,_=0,x=0,T=0,p=1,P=1,L=1,h=0,A="",O=n,R=o,v=a,m=A;P;)switch(T=h,h=D()){case 40:if(T!=108&&z(m,c-1)==58){Vt(m+=N(ae(h),"&","&\f"),"&\f",we(g?l[g-1]:0))!=-1&&(L=-1);break}case 34:case 39:case 91:m+=ae(h);break;case 9:case 10:case 13:case 32:m+=qt(T);break;case 92:m+=Ct(W()-1,7);continue;case 47:switch(M()){case 42:case 47:Y(Nt(Ht(D(),W()),t,r,d),d),(H(T||1)==5||H(M()||1)==5)&&k(m)&&j(m,-1,void 0)!==" "&&(m+=" ");break;default:m+="/"}break;case 123*p:l[g++]=k(m)*L;case 125*p:case 59:case 0:switch(h){case 0:case 125:P=0;case 59+f:L==-1&&(m=N(m,/\f/g,"")),x>0&&(k(m)-c||p===0&&T===47)&&Y(x>32?xe(m+";",a,r,c-1,d):xe(N(m," ","")+";",a,r,c-2,d),d);break;case 59:m+=";";default:if(Y(v=Ee(m,t,r,g,f,n,l,A,O=[],R=[],c,o),o),h===123)if(f===0)Q(m,t,v,v,O,o,c,l,R);else{switch(_){case 99:if(z(m,3)===110)break;case 108:if(z(m,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Q(e,v,v,a&&Y(Ee(e,v,v,0,0,n,l,A,n,O=[],c,R),R),n,R,c,l,a?O:R):Q(m,v,v,v,[""],R,0,l,R)}}g=f=x=0,p=L=1,A=m="",c=s;break;case 58:c=1+k(m),x=T;default:if(p<1){if(h==123)--p;else if(h==125&&p++==0&&$t()==125)continue}switch(m+=te(h),h*p){case 38:L=f>0?1:(m+="\f",-1);break;case 44:l[g++]=(k(m)-1)*L,L=1;break;case 64:M()===45&&(m+=ae(D())),_=M(),f=c=k(A=m+=Bt(W())),h++;break;case 45:T===45&&k(m)==2&&(p=0)}}return o}function Ee(e,t,r,a,n,o,s,l,d,g,f,c){for(var _=n-1,x=n===0?o:[""],T=St(x),p=0,P=0,L=0;p<a;++p)for(var h=0,A=j(e,_+1,_=we(P=s[p])),O=e;h<T;++h)(O=_e(P>0?x[h]+" "+A:N(A,/&\f/g,x[h])))&&(d[L++]=O);return re(e,t,r,n===0?ye:l,d,g,f,c)}function Nt(e,t,r,a){return re(e,t,r,fe,te(Ft()),j(e,2,-2),0,a)}function xe(e,t,r,a,n){return re(e,t,r,he,j(e,0,a),j(e,a+1,-1),a,n)}function ne(e,t){for(var r="",a=0;a<e.length;a++)r+=t(e[a],a,e,t)||"";return r}function Yt(e,t,r,a){switch(e.type){case Mt:if(e.children.length)break;case It:case Pt:case he:return e.return=e.return||e.value;case fe:return"";case Ot:return e.return=e.value+"{"+ne(e.children,a)+"}";case ye:if(!k(e.value=e.props.join(",")))return""}return k(r=ne(e.children,a))?e.return=e.value+"{"+r+"}":""}var Ut=ua(),ve="c4",Wt={id:ve,detector:i(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./c4Diagram-YG6GDRKO-C-eNQ40H.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url);return{id:ve,diagram:e}},"loader")},De="flowchart",Jt={id:De,detector:i((e,t)=>{var r,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./flowDiagram-NV44I4VS-BhCyaqwV.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([17,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url);return{id:De,diagram:e}},"loader")},Te="flowchart-v2",Qt={id:Te,detector:i((e,t)=>{var r,a,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./flowDiagram-NV44I4VS-BhCyaqwV.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([17,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url);return{id:Te,diagram:e}},"loader")},Le="er",Xt={id:Le,detector:i(e=>/^\s*erDiagram/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./erDiagram-Q2GNP2WA-CekwCx1v.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([33,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,24,25,27,28,29,30,31,32]),import.meta.url);return{id:Le,diagram:e}},"loader")},Ae="gitGraph",Zt={id:Ae,detector:i(e=>/^\s*gitGraph/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./gitGraphDiagram-NY62KEGX-DOBPUqeq.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([34,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,6,7,8,9,11,12,60,61]),import.meta.url);return{id:Ae,diagram:e}},"loader")},ke="gantt",Kt={id:ke,detector:i(e=>/^\s*gantt/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./ganttDiagram-JELNMOA3-Ct2B_ci4.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([62,1,2,63,64,65,5,66,67,68,3,4,6,7,8,9,10,11,12,13,14,15]),import.meta.url);return{id:ke,diagram:e}},"loader")},Re="info",er={id:Re,detector:i(e=>/^\s*info/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./infoDiagram-WHAUD3N6-Cytag0-K.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([69,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,2,52,53,54,55,56,57,58,59,10,3,4,5,11,9,70,71]),import.meta.url);return{id:Re,diagram:e}},"loader")},Ie="pie",tr={id:Ie,detector:i(e=>/^\s*pie/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./pieDiagram-ADFJNKIX-DXRnX2TS.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([72,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,30,73,66,74,8,31,6,7,9,11,12,60,70]),import.meta.url);return{id:Ie,diagram:e}},"loader")},Pe="quadrantChart",rr={id:Pe,detector:i(e=>/^\s*quadrantChart/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-e3OVACTV.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([75,63,64,65,5,2,66,3,4,11,9,10]),import.meta.url);return{id:Pe,diagram:e}},"loader")},Oe="xychart",ar={id:Oe,detector:i(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./xychartDiagram-PRI3JC2R-DtYN6-1-.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([76,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,63,64,65,66,77,73,29,30,31,70]),import.meta.url);return{id:Oe,diagram:e}},"loader")},Me="requirement",ir={id:Me,detector:i(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-DMbzgjKI.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([78,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,22,24,25,27,28,29,30,31,32]),import.meta.url);return{id:Me,diagram:e}},"loader")},Ve="sequence",nr={id:Ve,detector:i(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./sequenceDiagram-WL72ISMW-DKFGl_80.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([79,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26,61,16]),import.meta.url);return{id:Ve,diagram:e}},"loader")},Se="class",or={id:Se,detector:i((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./classDiagram-2ON5EDUG-CUlU7OLD.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([80,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,81,23,27,25,22,28,29,30,31,24,32]),import.meta.url);return{id:Se,diagram:e}},"loader")},Fe="classDiagram",sr={id:Fe,detector:i((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-DAwrDtTO.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([82,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,81,23,27,25,22,28,29,30,31,24,32]),import.meta.url);return{id:Fe,diagram:e}},"loader")},$e="state",dr={id:$e,detector:i((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./stateDiagram-FKZM4ZOC-Czf6mxbq.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([83,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,29,30,31,84,85,37,36,38,39,40,41,42,43,44,45,48,50,46,47,86,87,88,49,89,90,91,92,93,20,21,22,94,27,25,28,24,32]),import.meta.url);return{id:$e,diagram:e}},"loader")},ze="stateDiagram",lr={id:ze,detector:i((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-DT577w6p.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([95,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,22,94,27,25,28,29,30,31,24,32]),import.meta.url);return{id:ze,diagram:e}},"loader")},je="journey",cr={id:je,detector:i(e=>/^\s*journey/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-CPDnALH5.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([96,1,2,3,4,5,74,30,8,11,9,10,23,16]),import.meta.url);return{id:je,diagram:e}},"loader")},qe={draw:i((e,t,r)=>{w.debug(`rendering svg for syntax error
`);let a=Sa(t),n=a.append("g");a.attr("viewBox","0 0 2412 512"),Aa(a,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},mr=qe,ur={db:{},renderer:qe,parser:{parse:i(()=>{},"parse")}},Ce="flowchart-elk",gr={id:Ce,detector:i((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./flowDiagram-NV44I4VS-BhCyaqwV.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([17,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url);return{id:Ce,diagram:e}},"loader")},He="timeline",pr={id:He,detector:i(e=>/^\s*timeline/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./timeline-definition-IT6M3QCI-Cr57imdX.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([97,3,2,4,5,74,30,8,11,9,10]),import.meta.url);return{id:He,diagram:e}},"loader")},Be="mindmap",fr={id:Be,detector:i(e=>/^\s*mindmap/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./mindmap-definition-VGOIOE7T-BflEJS3A.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([98,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,22,24,25,27,28,29,30,31,32]),import.meta.url);return{id:Be,diagram:e}},"loader")},Ge="kanban",yr={id:Ge,detector:i(e=>/^\s*kanban/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./kanban-definition-3W4ZIXB7-D0-Tthpw.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([99,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,21,22,70,23,25,26]),import.meta.url);return{id:Ge,diagram:e}},"loader")},Ne="sankey",hr={id:Ne,detector:i(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-B90PTMUW.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([100,3,2,4,5,101,73,66,11,9,10]),import.meta.url);return{id:Ne,diagram:e}},"loader")},Ye="packet",wr={id:Ye,detector:i(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./diagram-S2PKOQOG-DJt_T1Gq.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([102,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,6,7,8,9,11,12,60,70]),import.meta.url);return{id:Ye,diagram:e}},"loader")},Ue="radar",_r={id:Ue,detector:i(e=>/^\s*radar-beta/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./diagram-QEK2KX5R-IlkvvuKX.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([103,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,6,7,8,9,11,12,60,70]),import.meta.url);return{id:Ue,diagram:e}},"loader")},We="block",br={id:We,detector:i(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./blockDiagram-VD42YOAC-Bol-uwBO.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([104,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,29,30,31,85,37,36,38,39,40,41,42,43,44,45,48,50,19,105,22,23,24]),import.meta.url);return{id:We,diagram:e}},"loader")},Je="architecture",Er={id:Je,detector:i(e=>/^\s*architecture/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./architectureDiagram-VXUJARFQ-CDeVogFv.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([106,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,18,3,4,5,6,7,8,9,10,11,12,52,53,54,55,56,57,58,59,107,60,70]),import.meta.url);return{id:Je,diagram:e}},"loader")},Qe="treemap",xr={id:Qe,detector:i(e=>/^\s*treemap/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./diagram-PSM6KHXK-DpuCiAS7.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([108,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,65,109,73,66,6,7,8,9,11,12,60,21,70,32]),import.meta.url);return{id:Qe,diagram:e}},"loader")},Xe=!1,X=i(()=>{Xe||(Xe=!0,ee("error",ur,e=>e.toLowerCase().trim()==="error"),ee("---",{db:{clear:i(()=>{},"clear")},styles:{},renderer:{draw:i(()=>{},"draw")},parser:{parse:i(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:i(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ue(gr,fr,Er),ue(Wt,yr,sr,or,Xt,Kt,er,tr,ir,nr,Qt,Jt,pr,Zt,lr,dr,cr,rr,hr,wr,ar,br,_r,xr))},"addDiagrams"),vr=i(async()=>{w.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(ge).map(async([t,{detector:r,loader:a}])=>{if(a)try{pe(t)}catch{try{let{diagram:n,id:o}=await a();ee(o,n,r)}catch(n){throw w.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete ge[t],n}}}))).filter(t=>t.status==="rejected");if(e.length>0){w.error(`Failed to load ${e.length} external diagrams`);for(let t of e)w.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),Dr="graphics-document document";function Ze(e,t){e.attr("role",Dr),t!==""&&e.attr("aria-roledescription",t)}i(Ze,"setA11yDiagramInfo");function Ke(e,t,r,a){if(e.insert!==void 0){if(r){let n=`chart-desc-${a}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){let n=`chart-title-${a}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}i(Ke,"addSVGa11yTitleDescription");var oe=(F=class{constructor(t,r,a,n,o){this.type=t,this.text=r,this.db=a,this.parser=n,this.renderer=o}static async fromText(t,r={}){var g,f;let a=G(),n=Lt(t,a);t=Ea(t)+`
`;try{pe(n)}catch{let c=va(n);if(!c)throw new Ma(`Diagram ${n} not found.`);let{id:_,diagram:x}=await c();ee(_,x)}let{db:o,parser:s,renderer:l,init:d}=pe(n);return s.parser&&(s.parser.yy=o),(g=o.clear)==null||g.call(o),d==null||d(a),r.title&&((f=o.setDiagramTitle)==null||f.call(o,r.title)),await s.parse(t),new F(n,t,o,s,l)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},i(F,"Diagram"),F),et=[],Tr=i(()=>{et.forEach(e=>{e()}),et=[]},"attachFunctions"),Lr=i(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function tt(e){let t=e.match(ka);if(!t)return{text:e,metadata:{}};let r=Fa(t[1],{schema:$a})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let a={};return r.displayMode&&(a.displayMode=r.displayMode.toString()),r.title&&(a.title=r.title.toString()),r.config&&(a.config=r.config),{text:e.slice(t[0].length),metadata:a}}i(tt,"extractFrontMatter");var Ar=i(e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,r,a)=>"<"+r+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),kr=i(e=>{let{text:t,metadata:r}=tt(e),{displayMode:a,title:n,config:o={}}=r;return a&&(o.gantt||(o.gantt={}),o.gantt.displayMode=a),{title:n,config:o,text:t}},"processFrontmatter"),Rr=i(e=>{let t=B.detectInit(e)??{},r=B.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:a})=>a==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:_a(e),directive:t}},"processDirectives");function se(e){let t=kr(Ar(e)),r=Rr(t.text),a=ba(t.config,r.directive);return e=Lr(r.text),{code:e,title:t.title,config:a}}i(se,"preprocessDiagram");function rt(e){let t=new TextEncoder().encode(e),r=Array.from(t,a=>String.fromCodePoint(a)).join("");return btoa(r)}i(rt,"toBase64");var Ir=5e4,Pr="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Or="sandbox",Mr="loose",Vr="http://www.w3.org/2000/svg",Sr="http://www.w3.org/1999/xlink",Fr="http://www.w3.org/1999/xhtml",$r="100%",zr="100%",jr="border:0;margin:0;",qr="margin:0",Cr="allow-top-navigation-by-user-activation allow-popups",Hr='The "iframe" tag is not supported by your browser.',Br=["foreignobject"],Gr=["dominant-baseline"];function de(e){let t=se(e);return K(),Ia(t.config??{}),t}i(de,"processAndSetConfigs");async function at(e,t){X();try{let{code:r,config:a}=de(e);return{diagramType:(await st(r)).type,config:a}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}i(at,"parse");var it=i((e,t,r=[])=>`
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Nr=i((e,t=new Map)=>{var a;let r="";if(e.themeCSS!==void 0&&(r+=`
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let n=e.htmlLabels??((a=e.flowchart)==null?void 0:a.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{xt(o.styles)||n.forEach(s=>{r+=it(o.id,s,o.styles)}),xt(o.textStyles)||(r+=it(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(s=>s.replace("color","fill"))))})}return r},"createCssStyles"),Yr=i((e,t,r,a)=>ne(Gt(`${a}{${Pa(t,Nr(e,r),e.themeVariables)}}`),Yt),"createUserStyles"),Ur=i((e="",t,r)=>{let a=e;return!r&&!t&&(a=a.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),a=wa(a),a=a.replace(/<br>/g,"<br/>"),a},"cleanUpSvgCode"),Wr=i((e="",t)=>{var r,a;return`<iframe style="width:${$r};height:${(a=(r=t==null?void 0:t.viewBox)==null?void 0:r.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":zr};${jr}" src="data:text/html;charset=UTF-8;base64,${rt(`<body style="${qr}">${e}</body>`)}" sandbox="${Cr}">
${Hr}
</iframe>`},"putIntoIFrame"),nt=i((e,t,r,a,n)=>{let o=e.append("div");o.attr("id",r),a&&o.attr("style",a);let s=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Vr);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function le(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}i(le,"sandboxedIframe");var Jr=i((e,t,r,a)=>{var n,o,s;(n=e.getElementById(t))==null||n.remove(),(o=e.getElementById(r))==null||o.remove(),(s=e.getElementById(a))==null||s.remove()},"removeExistingElements"),Qr=i(async function(e,t,r){var ft,yt,ht,wt,_t,bt;X();let a=de(t);t=a.code;let n=G();w.debug(n),t.length>((n==null?void 0:n.maxTextSize)??Ir)&&(t=Pr);let o="#"+e,s="i"+e,l="#"+s,d="d"+e,g="#"+d,f=i(()=>{let I=V(_?l:g).node();I&&"remove"in I&&I.remove()},"removeTempElements"),c=V("body"),_=n.securityLevel===Or,x=n.securityLevel===Mr,T=n.fontFamily;r===void 0?(Jr(document,e,d,s),_?(c=V(le(V("body"),s).nodes()[0].contentDocument.body),c.node().style.margin=0):c=V("body"),nt(c,e,d)):(r&&(r.innerHTML=""),_?(c=V(le(V(r),s).nodes()[0].contentDocument.body),c.node().style.margin=0):c=V(r),nt(c,e,d,`font-family: ${T}`,Sr));let p,P;try{p=await oe.fromText(t,{title:a.title})}catch(I){if(n.suppressErrorRendering)throw f(),I;p=await oe.fromText("error"),P=I}let L=c.select(g).node(),h=p.type,A=L.firstChild,O=A.firstChild,R=(yt=(ft=p.renderer).getClasses)==null?void 0:yt.call(ft,t,p),v=Yr(n,h,R,o),m=document.createElement("style");m.innerHTML=v,A.insertBefore(m,O);try{await p.renderer.draw(t,e,Dt.version,p)}catch(I){throw n.suppressErrorRendering?f():mr.draw(t,e,Dt.version),I}let da=c.select(`${g} svg`),la=(wt=(ht=p.db).getAccTitle)==null?void 0:wt.call(ht),ca=(bt=(_t=p.db).getAccDescription)==null?void 0:bt.call(_t);dt(h,da,la,ca),c.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Fr);let $=c.select(g).node().innerHTML;if(w.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),$=Ur($,_,Ra(n.arrowMarkerAbsolute)),_){let I=c.select(g+" svg").node();$=Wr($,I)}else x||($=ya.sanitize($,{ADD_TAGS:Br,ADD_ATTR:Gr,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Tr(),P)throw P;return f(),{diagramType:h,svg:$,bindFunctions:p.db.bindFunctions}},"render");function ot(e={}){var r;let t=Oa({},e);t!=null&&t.fontFamily&&!((r=t.themeVariables)!=null&&r.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),xa(t),t!=null&&t.theme&&t.theme in me?t.themeVariables=me[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=me.default.getThemeVariables(t.themeVariables)),Tt((typeof t=="object"?Ta(t):kt()).logLevel),X()}i(ot,"initialize");var st=i((e,t={})=>{let{code:r}=se(e);return oe.fromText(r,t)},"getDiagramFromText");function dt(e,t,r,a){Ze(t,e),Ke(t,r,a,t.attr("id"))}i(dt,"addA11yInfo");var S=Object.freeze({render:Qr,parse:at,getDiagramFromText:st,initialize:ot,getConfig:G,setConfig:Da,getSiteConfig:kt,updateSiteConfig:La,reset:i(()=>{K()},"reset"),globalReset:i(()=>{K(At)},"globalReset"),defaultConfig:At});Tt(G().logLevel),K(G());var Xr=i((e,t,r)=>{w.warn(e),vt(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),lt=i(async function(e={querySelector:".mermaid"}){try{await Zr(e)}catch(t){if(vt(t)&&w.error(t.str),b.parseError&&b.parseError(t),!e.suppressErrors)throw w.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Zr=i(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let a=S.getConfig();w.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw Error("Nodes and querySelector are both undefined");w.debug(`Found ${n.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(w.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),S.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));let o=new B.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed),s,l=[];for(let d of Array.from(n)){if(w.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");let g=`mermaid-${o.next()}`;s=d.innerHTML,s=ja(B.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");let f=B.detectInit(s);f&&w.debug("Detected early reinit: ",f);try{let{svg:c,bindFunctions:_}=await gt(g,s,d);d.innerHTML=c,e&&await e(g),_&&_(d)}catch(c){Xr(c,l,b.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),ct=i(function(e){S.initialize(e)},"initialize"),Kr=i(async function(e,t,r){w.warn("mermaid.init is deprecated. Please use run instead."),e&&ct(e);let a={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?a.querySelector=t:t&&(t instanceof HTMLElement?a.nodes=[t]:a.nodes=t),await lt(a)},"init"),ea=i(async(e,{lazyLoad:t=!0}={})=>{X(),ue(...e),t===!1&&await vr()},"registerExternalDiagrams"),mt=i(function(){if(b.startOnLoad){let{startOnLoad:e}=S.getConfig();e&&b.run().catch(t=>w.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",mt,!1);var ta=i(function(e){b.parseError=e},"setParseErrorHandler"),Z=[],ce=!1,ut=i(async()=>{if(!ce){for(ce=!0;Z.length>0;){let e=Z.shift();if(e)try{await e()}catch(t){w.error("Error executing queue",t)}}ce=!1}},"executeQueue"),ra=i(async(e,t)=>new Promise((r,a)=>{let n=i(()=>new Promise((o,s)=>{S.parse(e,t).then(l=>{o(l),r(l)},l=>{var d;w.error("Error parsing",l),(d=b.parseError)==null||d.call(b,l),s(l),a(l)})}),"performCall");Z.push(n),ut().catch(a)}),"parse"),gt=i((e,t,r)=>new Promise((a,n)=>{let o=i(()=>new Promise((s,l)=>{S.render(e,t,r).then(d=>{s(d),a(d)},d=>{var g;w.error("Error parsing",d),(g=b.parseError)==null||g.call(b,d),l(d),n(d)})}),"performCall");Z.push(o),ut().catch(n)}),"render"),b={startOnLoad:!0,mermaidAPI:S,parse:ra,render:gt,init:Kr,run:lt,registerExternalDiagrams:ea,registerLayoutLoaders:qa,initialize:ct,parseError:void 0,contentLoaded:mt,setParseErrorHandler:ta,detectType:Lt,registerIconPacks:za,getRegisteredDiagramsMetadata:i(()=>Object.keys(ge).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},pt=b,aa=Et(ma(),1),ia=Et(pa(),1),na={startOnLoad:!0,theme:"forest",logLevel:"fatal",securityLevel:"strict",fontFamily:"var(--text-font)",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,curve:"linear"},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};function oa(){return Array.from({length:6},()=>"abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)]).join("")}Rt=e=>{let t=(0,Ut.c)(9),{diagram:r}=e,[a]=(0,aa.useState)(sa),n=fa().theme==="dark";pt.initialize({...na,theme:n?"dark":"forest",darkMode:n});let o;t[0]!==r||t[1]!==a?(o=async()=>(await pt.render(a,r,void 0).catch(g=>{var f;throw(f=document.getElementById(a))==null||f.remove(),ga.warn("Failed to render mermaid diagram",g),g})).svg,t[0]=r,t[1]=a,t[2]=o):o=t[2];let s;t[3]!==n||t[4]!==r||t[5]!==a?(s=[r,a,n],t[3]=n,t[4]=r,t[5]=a,t[6]=s):s=t[6];let{data:l}=ha(o,s);if(!l)return null;let d;return t[7]===l?d=t[8]:(d=(0,ia.jsx)("div",{dangerouslySetInnerHTML:{__html:l}}),t[7]=l,t[8]=d),d};function sa(){return oa()}});export{Ha as __tla,Rt as default};
import{c as y}from"./katex-CDLTCvjQ.js";y.__defineMacro("\\ce",function(t){return z(t.consumeArgs(1)[0],"ce")}),y.__defineMacro("\\pu",function(t){return z(t.consumeArgs(1)[0],"pu")}),y.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var z=function(t,e){for(var a="",o=t.length&&t[t.length-1].loc.start,r=t.length-1;r>=0;r--)t[r].loc.start>o&&(a+=" ",o=t[r].loc.start),a+=t[r].text,o+=t[r].text.length;return u.go(n.go(a,e))},n={go:function(t,e){if(!t)return[];e===void 0&&(e="ce");var a="0",o={};o.parenthesisLevel=0,t=t.replace(/\n/g," "),t=t.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),t=t.replace(/[\u2026]/g,"...");for(var r,i=10,c=[];;){r===t?i--:(i=10,r=t);var s=n.stateMachines[e],p=s.transitions[a]||s.transitions["*"];t:for(var m=0;m<p.length;m++){var h=n.patterns.match_(p[m].pattern,t);if(h){for(var d=p[m].task,_=0;_<d.action_.length;_++){var f;if(s.actions[d.action_[_].type_])f=s.actions[d.action_[_].type_](o,h.match_,d.action_[_].option);else if(n.actions[d.action_[_].type_])f=n.actions[d.action_[_].type_](o,h.match_,d.action_[_].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[_].type_+")"];n.concatArray(c,f)}if(a=d.nextState||a,t.length>0){if(d.revisit||(t=h.remainder),!d.toContinue)break t}else return c}}if(i<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var a=0;a<e.length;a++)t.push(e[a]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=n.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var a=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return a?{match_:a[0],remainder:t.substr(a[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return n.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return n.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return n.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return n.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return n.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return n.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return n.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return n.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return n.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return n.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return n.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return n.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return n.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\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 n.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return n.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return n.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return n.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 n.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return n.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return n.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return n.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return n.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return n.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return n.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return n.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 e=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))/);if(e)return{match_:e[0],remainder:t.substr(e[0].length)};var a=n.patterns.findObserveGroups(t,"","$","$","");return a&&(e=a.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),e)?{match_:e[0],remainder:t.substr(e[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 e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,a,o,r,i,c,s,p,m){var h=function(x,l){if(typeof l=="string")return x.indexOf(l)===0?l:null;var g=x.match(l);return g?g[0]:null},d=function(x,l,g){for(var b=0;l<x.length;){var S=x.charAt(l),k=h(x.substr(l),g);if(k!==null&&b===0)return{endMatchBegin:l,endMatchEnd:l+k.length};if(S==="{")b++;else if(S==="}"){if(b===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];b--}l++}return null},_=h(t,e);if(_===null||(t=t.substr(_.length),_=h(t,a),_===null))return null;var f=d(t,_.length,o||r);if(f===null)return null;var $=t.substring(0,o?f.endMatchEnd:f.endMatchBegin);if(i||c){var v=this.findObserveGroups(t.substr(f.endMatchEnd),i,c,s,p);if(v===null)return null;var q=[$,v.match_];return{match_:m?q.join(""):q,remainder:v.remainder}}else return{match_:$,remainder:t.substr(f.endMatchEnd)}},match_:function(t,e){var a=n.patterns.patterns[t];if(a===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if(typeof a=="function")return n.patterns.patterns[t](e);var o=e.match(a);return o?{match_:o[2]?[o[1],o[2]]:o[1]?o[1]:o[0],remainder:e.substr(o[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,a){return{type_:a}},"insert+p1":function(t,e,a){return{type_:a,p1:e}},"insert+p1+p2":function(t,e,a){return{type_:a,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return n.go(e,"text")},"{text}":function(t,e){var a=["{"];return n.concatArray(a,n.go(e,"text")),a.push("}"),a},"tex-math":function(t,e){return n.go(e,"tex-math")},"tex-math tight":function(t,e){return n.go(e,"tex-math tight")},bond:function(t,e,a){return{type_:"bond",kind_:a||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return n.go(e)},"1/2":function(t,e){var a=[];e.match(/^[+\-]/)&&(a.push(e.substr(0,1)),e=e.substr(1));var o=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return o[1]=o[1].replace(/\$/g,""),a.push({type_:"frac",p1:o[1],p2:o[2]}),o[3]&&(o[3]=o[3].replace(/\$/g,""),a.push({type_:"tex-math",p1:o[3]})),a},"9,9":function(t,e){return n.go(e,"9,9")}},createTransitions:function(t){var e,a,o,r,i={};for(e in t)for(a in t[e])for(o=a.split("|"),t[e][a].stateArray=o,r=0;r<o.length;r++)i[o[r]]=[];for(e in t)for(a in t[e])for(o=t[e][a].stateArray||[],r=0;r<o.length;r++){var c=t[e][a];if(c.action_){c.action_=[].concat(c.action_);for(var s=0;s<c.action_.length;s++)typeof c.action_[s]=="string"&&(c.action_[s]={type_:c.action_[s]})}else c.action_=[];for(var p=e.split("|"),m=0;m<p.length;m++)if(o[r]==="*")for(var h in i)i[h].push({pattern:p[m],task:c});else i[o[r]].push({pattern:p[m],task:c})}return i},stateMachines:{}};n.stateMachines={ce:{transitions:n.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"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,e){var a;if((t.d||"").match(/^[0-9]+$/)){var o=t.d;t.d=void 0,a=this.output(t),t.b=o}else a=this.output(t);return n.actions["o="](t,e),a},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var a=[];return n.concatArray(a,this.output(t)),n.concatArray(a,n.actions.bond(t,e,"-")),a}else t.d=e},"- after o/d":function(t,e,a){var o=n.patterns.match_("orbital",t.o||""),r=n.patterns.match_("one lowercase greek letter $",t.o||""),i=n.patterns.match_("one lowercase latin letter $",t.o||""),c=n.patterns.match_("$one lowercase latin letter$ $",t.o||""),s=e==="-"&&(o&&o.remainder===""||r||i||c);s&&!t.a&&!t.b&&!t.p&&!t.d&&!t.q&&!o&&i&&(t.o="$"+t.o+"$");var p=[];return s?(n.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(o=n.patterns.match_("digits",t.d||""),a&&o&&o.remainder===""?(n.concatArray(p,n.actions["d="](t,e)),n.concatArray(p,this.output(t))):(n.concatArray(p,this.output(t)),n.concatArray(p,n.actions.bond(t,e,"-")))),p},"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,e){return{type_:"state of aggregation",p1:n.go(e,"o")}},comma:function(t,e){var a=e.replace(/\s*$/,"");return a!==e&&t.parenthesisLevel===0?{type_:"comma enumeration L",p1:a}:{type_:"comma enumeration M",p1:a}},output:function(t,e,a){var o;if(!t.r)o=[],!t.a&&!t.b&&!t.p&&!t.o&&!t.q&&!t.d&&!a||(t.sb&&o.push({type_:"entitySkip"}),!t.o&&!t.q&&!t.d&&!t.b&&!t.p&&a!==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"&&n.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&t.dType==="kv"&&!t.q&&(t.dType=void 0),o.push({type_:"chemfive",a:n.go(t.a,"a"),b:n.go(t.b,"bd"),p:n.go(t.p,"pq"),o:n.go(t.o,"o"),q:n.go(t.q,"pq"),d:n.go(t.d,t.dType==="oxidation"?"oxidation":"bd"),dType:t.dType}));else{var r=t.rdt==="M"?n.go(t.rd,"tex-math"):t.rdt==="T"?[{type_:"text",p1:t.rd||""}]:n.go(t.rd),i=t.rqt==="M"?n.go(t.rq,"tex-math"):t.rqt==="T"?[{type_:"text",p1:t.rq||""}]:n.go(t.rq);o={type_:"arrow",r:t.r,rd:r,rq:i}}for(var c in t)c!=="parenthesisLevel"&&c!=="beginsWithBond"&&delete t[c];return o},"oxidation-output":function(t,e){var a=["{"];return n.concatArray(a,n.go(e,"oxidation")),a.push("}"),a},"frac-output":function(t,e){return{type_:"frac-ce",p1:n.go(e[0]),p2:n.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:n.go(e[0]),p2:n.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:n.go(e[0]),p2:n.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:n.go(e[0]),p2:n.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:n.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,a){return{type_:"operator",kind_:a||e}}}},a:{transitions:n.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:n.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:n.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 e={type_:"text",p1:t.text_};for(var a in t)delete t[a];return e}}}},pq:{transitions:n.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,e){return{type_:"state of aggregation subscript",p1:n.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:n.go(e[1],"pq")}}}},bd:{transitions:n.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,e){return{type_:"color",color1:e[0],color2:n.go(e[1],"bd")}}}},oxidation:{transitions:n.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:n.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var a in t)delete t[a];return e}}}},"tex-math tight":{transitions:n.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var a in t)delete t[a];return e}}}},"9,9":{transitions:n.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:n.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,e){var a=[];return e[0]==="+-"||e[0]==="+/-"?a.push("\\pm "):e[0]&&a.push(e[0]),e[1]&&(n.concatArray(a,n.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?n.concatArray(a,n.go(e[2],"pu-9,9")):a.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),e[3]==="e"||e[3].substr(0,1)==="*"?a.push({type_:"cdot"}):a.push({type_:"times"}))),e[3]&&a.push("10^{"+e[5]+"}"),a},"number^":function(t,e){var a=[];return e[0]==="+-"||e[0]==="+/-"?a.push("\\pm "):e[0]&&a.push(e[0]),n.concatArray(a,n.go(e[1],"pu-9,9")),a.push("^{"+e[2]+"}"),a},operator:function(t,e,a){return{type_:"operator",kind_:a||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,a=n.patterns.match_("{(...)}",t.d||"");a&&a.remainder===""&&(t.d=a.match_);var o=n.patterns.match_("{(...)}",t.q||"");if(o&&o.remainder===""&&(t.q=o.match_),t.d&&(t.d=(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),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 r={d:n.go(t.d,"pu"),q:n.go(t.q,"pu")};t.o==="//"?e={type_:"pu-frac",p1:r.d,p2:r.q}:(e=r.d,r.d.length>1||r.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),n.concatArray(e,r.q))}else e=n.go(t.d,"pu-2");for(var i in t)delete t[i];return e}}},"pu-2":{transitions:n.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,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var a=n.patterns.match_("{(...)}",t.rm||"");e=a&&a.remainder===""?n.go(a.match_,"pu"):{type_:"rm",p1:t.rm}}for(var o in t)delete t[o];return e}}},"pu-9,9":{transitions:n.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 e=[];if(t.text_=t.text_||"",t.text_.length>4){var a=t.text_.length%3;a===0&&(a=3);for(var o=t.text_.length-3;o>0;o-=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,a)),e.reverse()}else e.push(t.text_);for(var r in t)delete t[r];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var a=t.text_.length-3,o=0;o<a;o+=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(o))}else e.push(t.text_);for(var r in t)delete t[r];return e}}}};var u={go:function(t,e){if(!t)return"";for(var a="",o=!1,r=0;r<t.length;r++){var i=t[r];typeof i=="string"?a+=i:(a+=u._go2(i),i.type_==="1st-level escape"&&(o=!0))}return!e&&!o&&a&&(a="{"+a+"}"),a},_goInner:function(t){return t&&u.go(t,!0)},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var a={a:u._goInner(t.a),b:u._goInner(t.b),p:u._goInner(t.p),o:u._goInner(t.o),q:u._goInner(t.q),d:u._goInner(t.d)};a.a&&(a.a.match(/^[+\-]/)&&(a.a="{"+a.a+"}"),e+=a.a+"\\,"),(a.b||a.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(a.b||"")+"}}_{\\hphantom{"+(a.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(a.b||"")+"}}",e+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(a.p||"")+"}}}"),a.o&&(a.o.match(/^[+\-]/)&&(a.o="{"+a.o+"}"),e+=a.o),t.dType==="kv"?((a.d||a.q)&&(e+="{\\vphantom{X}}"),a.d&&(e+="^{"+a.d+"}"),a.q&&(e+="_{\\smash[t]{"+a.q+"}}")):t.dType==="oxidation"?(a.d&&(e+="{\\vphantom{X}}",e+="^{"+a.d+"}"),a.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+a.q+"}}")):(a.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+a.q+"}}"),a.d&&(e+="{\\vphantom{X}}",e+="^{"+a.d+"}"));break;case"rm":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+u._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+u._goInner(t.p1);break;case"bond":if(e=u._getBond(t.kind_),!e)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var o="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"pu-frac":var r="\\frac{"+u._goInner(t.p1)+"}{"+u._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+r+"}{"+r+"}{"+r+"}{"+r+"}";break;case"tex-math":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+u._goInner(t.p1)+"}{"+u._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+u._goInner(t.p1)+"}{"+u._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+u._goInner(t.p1)+"}{"+u._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+u._goInner(t.p1)+"}_{"+u._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+u._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var i={rd:u._goInner(t.rd),rq:u._goInner(t.rq)},c="\\x"+u._getArrow(t.r);i.rq&&(c+="[{"+i.rq+"}]"),i.rd?c+="{"+i.rd+"}":c+="{}",e=c;break;case"operator":e=u._getOperator(t.kind_);break;case"1st-level escape":e=t.p1+" ";break;case"space":e=" ";break;case"entitySkip":e="~";break;case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"rightleftarrows";case"<=>":return"rightleftharpoons";case"\u21CC":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."]}}};
var C;import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as l,r as O}from"./src-CsZby044.js";import{D as ht,I as B,Q as lt,X as dt,Z as gt,b as z,d as F}from"./chunk-ABZYJK2D-0jga8uiE.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import{r as ut,t as pt}from"./chunk-N4CR4FBY-BNoQB557.js";import{t as yt}from"./chunk-55IACEB6-njZIr50E.js";import{t as mt}from"./chunk-QN33PNHL-BOQncxfy.js";var b=[];for(let i=0;i<256;++i)b.push((i+256).toString(16).slice(1));function ft(i,t=0){return(b[i[t+0]]+b[i[t+1]]+b[i[t+2]]+b[i[t+3]]+"-"+b[i[t+4]]+b[i[t+5]]+"-"+b[i[t+6]]+b[i[t+7]]+"-"+b[i[t+8]]+b[i[t+9]]+"-"+b[i[t+10]]+b[i[t+11]]+b[i[t+12]]+b[i[t+13]]+b[i[t+14]]+b[i[t+15]]).toLowerCase()}var V,Et=new Uint8Array(16);function bt(){if(!V){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");V=crypto.getRandomValues.bind(crypto)}return V(Et)}var st={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _t(i,t,n){var g;if(st.randomUUID&&!t&&!i)return st.randomUUID();i||(i={});let a=i.random??((g=i.rng)==null?void 0:g.call(i))??bt();if(a.length<16)throw Error("Random bytes length must be >= 16");if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,t){if(n||(n=0),n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let c=0;c<16;++c)t[n+c]=a[c];return t}return ft(a)}var Nt=_t,Q=(function(){var i=l(function(e,h,o,r){for(o||(o={}),r=e.length;r--;o[e[r]]=h);return o},"o"),t=[1,4],n=[1,13],a=[1,12],g=[1,15],c=[1,16],p=[1,20],y=[1,19],f=[6,7,8],E=[1,26],T=[1,24],R=[1,25],_=[6,7,11],Y=[1,6,13,15,16,19,22],Z=[1,33],q=[1,34],A=[1,6,7,11,13,15,16,19,22],G={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(e,h,o,r,u,s,$){var d=s.length-1;switch(u){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",s[d].id),r.addNode(s[d-1].length,s[d].id,s[d].descr,s[d].type);break;case 16:r.getLogger().trace("Icon: ",s[d]),r.decorateNode({icon:s[d]});break;case 17:case 21:r.decorateNode({class:s[d]});break;case 18:r.getLogger().trace("SPACELIST");break;case 19:r.getLogger().trace("Node: ",s[d].id),r.addNode(0,s[d].id,s[d].descr,s[d].type);break;case 20:r.decorateNode({icon:s[d]});break;case 25:r.getLogger().trace("node found ..",s[d-2]),this.$={id:s[d-1],descr:s[d-1],type:r.getType(s[d-2],s[d])};break;case 26:this.$={id:s[d],descr:s[d],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace("node found ..",s[d-3]),this.$={id:s[d-3],descr:s[d-1],type:r.getType(s[d-2],s[d])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:a,14:14,15:g,16:c,17:17,18:18,19:p,22:y},i(f,[2,3]),{1:[2,2]},i(f,[2,4]),i(f,[2,5]),{1:[2,6],6:n,12:21,13:a,14:14,15:g,16:c,17:17,18:18,19:p,22:y},{6:n,9:22,12:11,13:a,14:14,15:g,16:c,17:17,18:18,19:p,22:y},{6:E,7:T,10:23,11:R},i(_,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:y}),i(_,[2,18]),i(_,[2,19]),i(_,[2,20]),i(_,[2,21]),i(_,[2,23]),i(_,[2,24]),i(_,[2,26],{19:[1,30]}),{20:[1,31]},{6:E,7:T,10:32,11:R},{1:[2,7],6:n,12:21,13:a,14:14,15:g,16:c,17:17,18:18,19:p,22:y},i(Y,[2,14],{7:Z,11:q}),i(A,[2,8]),i(A,[2,9]),i(A,[2,10]),i(_,[2,15]),i(_,[2,16]),i(_,[2,17]),{20:[1,35]},{21:[1,36]},i(Y,[2,13],{7:Z,11:q}),i(A,[2,11]),i(A,[2,12]),{21:[1,37]},i(_,[2,25]),i(_,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,h){if(h.recoverable)this.trace(e);else{var o=Error(e);throw o.hash=h,o}},"parseError"),parse:l(function(e){var h=this,o=[0],r=[],u=[null],s=[],$=this.table,d="",U=0,J=0,K=0,rt=2,tt=1,ot=s.slice.call(arguments,1),m=Object.create(this.lexer),x={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(x.yy[j]=this.yy[j]);m.setInput(e,x.yy),x.yy.lexer=m,x.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var H=m.yylloc;s.push(H);var at=m.options&&m.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ct(L){o.length-=2*L,u.length-=L,s.length-=L}l(ct,"popStack");function et(){var L=r.pop()||m.lex()||tt;return typeof L!="number"&&(L instanceof Array&&(r=L,L=r.pop()),L=h.symbols_[L]||L),L}l(et,"lex");for(var N,W,I,D,X,v={},P,S,it,M;;){if(I=o[o.length-1],this.defaultActions[I]?D=this.defaultActions[I]:(N??(N=et()),D=$[I]&&$[I][N]),D===void 0||!D.length||!D[0]){var nt="";for(P in M=[],$[I])this.terminals_[P]&&P>rt&&M.push("'"+this.terminals_[P]+"'");nt=m.showPosition?"Parse error on line "+(U+1)+`:
`+m.showPosition()+`
Expecting `+M.join(", ")+", got '"+(this.terminals_[N]||N)+"'":"Parse error on line "+(U+1)+": Unexpected "+(N==tt?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(nt,{text:m.match,token:this.terminals_[N]||N,line:m.yylineno,loc:H,expected:M})}if(D[0]instanceof Array&&D.length>1)throw Error("Parse Error: multiple actions possible at state: "+I+", token: "+N);switch(D[0]){case 1:o.push(N),u.push(m.yytext),s.push(m.yylloc),o.push(D[1]),N=null,W?(N=W,W=null):(J=m.yyleng,d=m.yytext,U=m.yylineno,H=m.yylloc,K>0&&K--);break;case 2:if(S=this.productions_[D[1]][1],v.$=u[u.length-S],v._$={first_line:s[s.length-(S||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(S||1)].first_column,last_column:s[s.length-1].last_column},at&&(v._$.range=[s[s.length-(S||1)].range[0],s[s.length-1].range[1]]),X=this.performAction.apply(v,[d,J,U,x.yy,D[1],u,s].concat(ot)),X!==void 0)return X;S&&(o=o.slice(0,-1*S*2),u=u.slice(0,-1*S),s=s.slice(0,-1*S)),o.push(this.productions_[D[1]][0]),u.push(v.$),s.push(v._$),it=$[o[o.length-2]][o[o.length-1]],o.push(it);break;case 3:return!0}}return!0},"parse")};G.lexer=(function(){return{EOF:1,parseError:l(function(e,h){if(this.yy.parser)this.yy.parser.parseError(e,h);else throw Error(e)},"parseError"),setInput:l(function(e,h){return this.yy=h||this.yy||{},this._input=e,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:l(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:l(function(e){var h=e.length,o=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;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),o.length-1&&(this.yylineno-=o.length-1);var u=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:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),h=Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:l(function(e,h){var o,r,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),r=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],o=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var s in u)this[s]=u[s];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,h,o,r;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),s=0;s<u.length;s++)if(o=this._input.match(this.rules[u[s]]),o&&(!h||o[0].length>h[0].length)){if(h=o,r=s,this.options.backtrack_lexer){if(e=this.test_match(o,u[s]),e!==!1)return e;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(e=this.test_match(h,u[r]),e===!1?!1:e):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:l(function(){return this.next()||this.lex()},"lex"),begin:l(function(e){this.conditionStack.push(e)},"begin"),popState:l(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:l(function(e){this.begin(e)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(e,h,o,r){switch(o){case 0:return e.getLogger().trace("Found comment",h.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",h.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",h.yytext),"NODE_DEND";case 30:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 35:return e.getLogger().trace("Long description:",h.yytext),20;case 36:return e.getLogger().trace("Long description:",h.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}})();function w(){this.yy={}}return l(w,"Parser"),w.prototype=G,G.Parser=w,new w})();Q.parser=Q;var Dt=Q,k={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Lt=(C=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=k,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let n=this.nodes.length-1;n>=0;n--)if(this.nodes[n].level<t)return this.nodes[n];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,n,a,g){var T,R;O.info("addNode",t,n,a,g);let c=!1;this.nodes.length===0?(this.baseLevel=t,t=0,c=!0):this.baseLevel!==void 0&&(t-=this.baseLevel,c=!1);let p=z(),y=((T=p.mindmap)==null?void 0:T.padding)??F.mindmap.padding;switch(g){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}let f={id:this.count++,nodeId:B(n,p),level:t,descr:B(a,p),type:g,children:[],width:((R=p.mindmap)==null?void 0:R.maxNodeWidth)??F.mindmap.maxNodeWidth,padding:y,isRoot:c},E=this.getParent(t);if(E)E.children.push(f),this.nodes.push(f);else if(c)this.nodes.push(f);else throw Error(`There can be only one root. No parent could be found for ("${f.descr}")`)}getType(t,n){switch(O.debug("In get type",t,n),t){case"[":return this.nodeType.RECT;case"(":return n===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,n){this.elements[t]=n}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;let n=z(),a=this.nodes[this.nodes.length-1];t.icon&&(a.icon=B(t.icon,n)),t.class&&(a.class=B(t.class,n))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,n){if(t.level===0?t.section=void 0:t.section=n,t.children)for(let[a,g]of t.children.entries()){let c=t.level===0?a:n;this.assignSections(g,c)}}flattenNodes(t,n){let a=["mindmap-node"];t.isRoot===!0?a.push("section-root","section--1"):t.section!==void 0&&a.push(`section-${t.section}`),t.class&&a.push(t.class);let g=a.join(" "),c=l(y=>{switch(y){case k.CIRCLE:return"mindmapCircle";case k.RECT:return"rect";case k.ROUNDED_RECT:return"rounded";case k.CLOUD:return"cloud";case k.BANG:return"bang";case k.HEXAGON:return"hexagon";case k.DEFAULT:return"defaultMindmapNode";case k.NO_BORDER:default:return"rect"}},"getShapeFromType"),p={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:c(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:g,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(n.push(p),t.children)for(let y of t.children)this.flattenNodes(y,n)}generateEdges(t,n){if(t.children)for(let a of t.children){let g="edge";a.section!==void 0&&(g+=` section-edge-${a.section}`);let c=t.level+1;g+=` edge-depth-${c}`;let p={id:`edge_${t.id}_${a.id}`,start:t.id.toString(),end:a.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:g,depth:t.level,section:a.section};n.push(p),this.generateEdges(a,n)}}getData(){let t=this.getMindmap(),n=z(),a=ht().layout!==void 0,g=n;if(a||(g.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:g};O.debug("getData: mindmapRoot",t,n),this.assignSections(t);let c=[],p=[];this.flattenNodes(t,c),this.generateEdges(t,p),O.debug(`getData: processed ${c.length} nodes and ${p.length} edges`);let y=new Map;for(let f of c)y.set(f.id,{shape:f.shape,width:f.width,height:f.height,padding:f.padding});return{nodes:c,edges:p,config:g,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(y),type:"mindmap",diagramId:"mindmap-"+Nt()}}getLogger(){return O}},l(C,"MindmapDB"),C),St={draw:l(async(i,t,n,a)=>{var y,f;O.debug(`Rendering mindmap diagram
`+i);let g=a.db,c=g.getData(),p=yt(t,c.config.securityLevel);c.type=a.type,c.layoutAlgorithm=pt(c.config.layout,{fallback:"cose-bilkent"}),c.diagramId=t,g.getMindmap()&&(c.nodes.forEach(E=>{E.shape==="rounded"?(E.radius=15,E.taper=15,E.stroke="none",E.width=0,E.padding=15):E.shape==="circle"?E.padding=10:E.shape==="rect"&&(E.width=0,E.padding=10)}),await ut(c,p),mt(p,((y=c.config.mindmap)==null?void 0:y.padding)??F.mindmap.padding,"mindmapDiagram",((f=c.config.mindmap)==null?void 0:f.useMaxWidth)??F.mindmap.useMaxWidth))},"draw")},kt=l(i=>{let t="";for(let n=0;n<i.THEME_COLOR_LIMIT;n++)i["lineColor"+n]=i["lineColor"+n]||i["cScaleInv"+n],lt(i["lineColor"+n])?i["lineColor"+n]=gt(i["lineColor"+n],20):i["lineColor"+n]=dt(i["lineColor"+n],20);for(let n=0;n<i.THEME_COLOR_LIMIT;n++){let a=""+(17-3*n);t+=`
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
fill: ${i["cScale"+n]};
}
.section-${n-1} text {
fill: ${i["cScaleLabel"+n]};
}
.node-icon-${n-1} {
font-size: 40px;
color: ${i["cScaleLabel"+n]};
}
.section-edge-${n-1}{
stroke: ${i["cScale"+n]};
}
.edge-depth-${n-1}{
stroke-width: ${a};
}
.section-${n-1} line {
stroke: ${i["cScaleInv"+n]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return t},"genSections"),xt={get db(){return new Lt},renderer:St,parser:Dt,styles:l(i=>`
.edge {
stroke-width: 3;
}
${kt(i)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${i.git0};
}
.section-root text {
fill: ${i.gitBranchLabel0};
}
.section-root span {
color: ${i.gitBranchLabel0};
}
.section-2 span {
color: ${i.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.mindmap-node-label {
dy: 1em;
alignment-baseline: middle;
text-anchor: middle;
dominant-baseline: middle;
text-align: center;
}
`,"getStyles")};export{xt as diagram};
import{t as r}from"./mirc-DkD5mNIp.js";export{r as mirc};
function t(e){for(var $={},r=e.split(" "),i=0;i<r.length;++i)$[r[i]]=!0;return $}var o=t("$! $$ $& $? $+ $abook $abs $active $activecid $activewid $address $addtok $agent $agentname $agentstat $agentver $alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime $asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind $binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes $chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color $com $comcall $comchan $comerr $compact $compress $comval $cos $count $cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight $dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress $deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll $dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error $eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir $finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve $fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt $group $halted $hash $height $hfind $hget $highlight $hnick $hotline $hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil $inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect $insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile $isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive $lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock $lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer $maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext $menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode $modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile $nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly $opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree $pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo $readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex $reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline $sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin $site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname $sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped $syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp $timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel $ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver $version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"),s=t("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice away background ban bcopy beep bread break breplace bset btrunc bunset bwrite channel clear clearall cline clipboard close cnick color comclose comopen comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver debug dec describe dialog did didtok disable disconnect dlevel dline dll dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable events exit fclose filter findtext finger firewall flash flist flood flush flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear ialmark identd if ignore iline inc invite iuser join kick linesep links list load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice qme qmsg query queryn quit raw reload remini remote remove rename renwin reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini say scid scon server set showmirc signam sline sockaccept sockclose socklist socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs elseif else goto menu nicklist status title icon size option text edit button check radio box scroll list combo link tab item"),l=t("if elseif else and not or eq ne in ni for foreach while switch"),c=/[+\-*&%=<>!?^\/\|]/;function d(e,$,r){return $.tokenize=r,r(e,$)}function a(e,$){var r=$.beforeParams;$.beforeParams=!1;var i=e.next();if(/[\[\]{}\(\),\.]/.test(i))return i=="("&&r?$.inParams=!0:i==")"&&($.inParams=!1),null;if(/\d/.test(i))return e.eatWhile(/[\w\.]/),"number";if(i=="\\")return e.eat("\\"),e.eat(/./),"number";if(i=="/"&&e.eat("*"))return d(e,$,m);if(i==";"&&e.match(/ *\( *\(/))return d(e,$,p);if(i==";"&&!$.inParams)return e.skipToEnd(),"comment";if(i=='"')return e.eat(/"/),"keyword";if(i=="$")return e.eatWhile(/[$_a-z0-9A-Z\.:]/),o&&o.propertyIsEnumerable(e.current().toLowerCase())?"keyword":($.beforeParams=!0,"builtin");if(i=="%")return e.eatWhile(/[^,\s()]/),$.beforeParams=!0,"string";if(c.test(i))return e.eatWhile(c),"operator";e.eatWhile(/[\w\$_{}]/);var n=e.current().toLowerCase();return s&&s.propertyIsEnumerable(n)?"keyword":l&&l.propertyIsEnumerable(n)?($.beforeParams=!0,"keyword"):null}function m(e,$){for(var r=!1,i;i=e.next();){if(i=="/"&&r){$.tokenize=a;break}r=i=="*"}return"comment"}function p(e,$){for(var r=0,i;i=e.next();){if(i==";"&&r==2){$.tokenize=a;break}i==")"?r++:i!=" "&&(r=0)}return"meta"}const u={name:"mirc",startState:function(){return{tokenize:a,beforeParams:!1,inParams:!1}},token:function(e,$){return e.eatSpace()?null:$.tokenize(e,$)}};export{u as t};
function k(i){var n={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},l=i.extraWords||{};for(var w in l)l.hasOwnProperty(w)&&(n[w]=i.extraWords[w]);var a=[];for(var u in n)a.push(u);function d(e,r){var o=e.next();if(o==='"')return r.tokenize=s,r.tokenize(e,r);if(o==="{"&&e.eat("|"))return r.longString=!0,r.tokenize=b,r.tokenize(e,r);if(o==="("&&e.match(/^\*(?!\))/))return r.commentLevel++,r.tokenize=c,r.tokenize(e,r);if(o==="~"||o==="?")return e.eatWhile(/\w/),"variableName.special";if(o==="`")return e.eatWhile(/\w/),"quote";if(o==="/"&&i.slashComments&&e.eat("/"))return e.skipToEnd(),"comment";if(/\d/.test(o))return o==="0"&&e.eat(/[bB]/)&&e.eatWhile(/[01]/),o==="0"&&e.eat(/[xX]/)&&e.eatWhile(/[0-9a-fA-F]/),o==="0"&&e.eat(/[oO]/)?e.eatWhile(/[0-7]/):(e.eatWhile(/[\d_]/),e.eat(".")&&e.eatWhile(/[\d]/),e.eat(/[eE]/)&&e.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(o))return"operator";if(/[\w\xa1-\uffff]/.test(o)){e.eatWhile(/[\w\xa1-\uffff]/);var t=e.current();return n.hasOwnProperty(t)?n[t]:"variable"}return null}function s(e,r){for(var o,t=!1,y=!1;(o=e.next())!=null;){if(o==='"'&&!y){t=!0;break}y=!y&&o==="\\"}return t&&!y&&(r.tokenize=d),"string"}function c(e,r){for(var o,t;r.commentLevel>0&&(t=e.next())!=null;)o==="("&&t==="*"&&r.commentLevel++,o==="*"&&t===")"&&r.commentLevel--,o=t;return r.commentLevel<=0&&(r.tokenize=d),"comment"}function b(e,r){for(var o,t;r.longString&&(t=e.next())!=null;)o==="|"&&t==="}"&&(r.longString=!1),o=t;return r.longString||(r.tokenize=d),"string"}return{startState:function(){return{tokenize:d,commentLevel:0,longString:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)},languageData:{autocomplete:a,commentTokens:{line:i.slashComments?"//":void 0,block:{open:"(*",close:"*)"}}}}}const f=k({name:"ocaml",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),m=k({name:"fsharp",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),p=k({name:"sml",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0});export{f as n,p as r,m as t};
import{n as a,r as s,t as r}from"./mllike-C8Ah4kKN.js";export{r as fSharp,a as oCaml,s as sml};
import{i as o,p as t}from"./useEvent-BhXAndur.js";import{fi as e}from"./cells-DPp5cDaO.js";import{t as i}from"./invariant-CAG_dYON.js";import{t as a}from"./utils-YqBXNpsM.js";function s(){let r=o.get(n);return e(r,"internal-error: initial mode not found"),i(r!=="present","internal-error: initial mode cannot be 'present'"),r}function l(r){return r==="read"||r==="home"||r==="gallery"?r:r==="edit"?"present":"edit"}const m=t({mode:a()?"read":"not-set",cellAnchor:null}),n=t(void 0),d=t(!1);export{m as a,l as i,n,d as r,s as t};
function l(n){for(var e={},t=n.split(" "),o=0;o<t.length;++o)e[t[o]]=!0;return e}var a=l("algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within"),i=l("abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh"),u=l("Real Boolean Integer String"),c=[].concat(Object.keys(a),Object.keys(i),Object.keys(u)),p=/[;=\(:\),{}.*<>+\-\/^\[\]]/,k=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,r=/[0-9]/,s=/[_a-zA-Z]/;function f(n,e){return n.skipToEnd(),e.tokenize=null,"comment"}function m(n,e){for(var t=!1,o;o=n.next();){if(t&&o=="/"){e.tokenize=null;break}t=o=="*"}return"comment"}function d(n,e){for(var t=!1,o;(o=n.next())!=null;){if(o=='"'&&!t){e.tokenize=null,e.sol=!1;break}t=!t&&o=="\\"}return"string"}function z(n,e){for(n.eatWhile(r);n.eat(r)||n.eat(s););var t=n.current();return e.sol&&(t=="package"||t=="model"||t=="when"||t=="connector")?e.level++:e.sol&&t=="end"&&e.level>0&&e.level--,e.tokenize=null,e.sol=!1,a.propertyIsEnumerable(t)?"keyword":i.propertyIsEnumerable(t)?"builtin":u.propertyIsEnumerable(t)?"atom":"variable"}function b(n,e){for(;n.eat(/[^']/););return e.tokenize=null,e.sol=!1,n.eat("'")?"variable":"error"}function h(n,e){return n.eatWhile(r),n.eat(".")&&n.eatWhile(r),(n.eat("e")||n.eat("E"))&&(n.eat("-")||n.eat("+"),n.eatWhile(r)),e.tokenize=null,e.sol=!1,"number"}const g={name:"modelica",startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(n,e){if(e.tokenize!=null)return e.tokenize(n,e);if(n.sol()&&(e.sol=!0),n.eatSpace())return e.tokenize=null,null;var t=n.next();if(t=="/"&&n.eat("/"))e.tokenize=f;else if(t=="/"&&n.eat("*"))e.tokenize=m;else{if(k.test(t+n.peek()))return n.next(),e.tokenize=null,"operator";if(p.test(t))return e.tokenize=null,"operator";if(s.test(t))e.tokenize=z;else if(t=="'"&&n.peek()&&n.peek()!="'")e.tokenize=b;else if(t=='"')e.tokenize=d;else if(r.test(t))e.tokenize=h;else return e.tokenize=null,"error"}return e.tokenize(n,e)},indent:function(n,e,t){if(n.tokenize!=null)return null;var o=n.level;return/(algorithm)/.test(e)&&o--,/(equation)/.test(e)&&o--,/(initial algorithm)/.test(e)&&o--,/(initial equation)/.test(e)&&o--,/(end)/.test(e)&&o--,o>0?t.unit*o:0},languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:c}};export{g as t};
import{t as o}from"./modelica-2q7w6nLE.js";export{o as modelica};
import{n as s,r as a,t as n}from"./mscgen-BRqvO7u4.js";export{n as mscgen,s as msgenny,a as xu};
function i(t){return{name:"mscgen",startState:l,copyState:u,token:m(t),languageData:{commentTokens:{line:"#",block:{open:"/*",close:"*/"}}}}}const c=i({keywords:["msc"],options:["hscale","width","arcgradient","wordwraparcs"],constants:["true","false","on","off"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}),a=i({keywords:null,options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:null,brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}),s=i({keywords:["msc","xu"],options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip","title","deactivate","activate","activation"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]});function n(t){return RegExp("^\\b("+t.join("|")+")\\b","i")}function e(t){return RegExp("^(?:"+t.join("|")+")","i")}function l(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}}function u(t){return{inComment:t.inComment,inString:t.inString,inAttributeList:t.inAttributeList,inScript:t.inScript}}function m(t){return function(r,o){if(r.match(e(t.brackets),!0,!0))return"bracket";if(!o.inComment){if(r.match(/\/\*[^\*\/]*/,!0,!0))return o.inComment=!0,"comment";if(r.match(e(t.singlecomment),!0,!0))return r.skipToEnd(),"comment"}if(o.inComment)return r.match(/[^\*\/]*\*\//,!0,!0)?o.inComment=!1:r.skipToEnd(),"comment";if(!o.inString&&r.match(/\"(\\\"|[^\"])*/,!0,!0))return o.inString=!0,"string";if(o.inString)return r.match(/[^\"]*\"/,!0,!0)?o.inString=!1:r.skipToEnd(),"string";if(t.keywords&&r.match(n(t.keywords),!0,!0)||r.match(n(t.options),!0,!0)||r.match(n(t.arcsWords),!0,!0)||r.match(e(t.arcsOthers),!0,!0))return"keyword";if(t.operators&&r.match(e(t.operators),!0,!0))return"operator";if(t.constants&&r.match(e(t.constants),!0,!0))return"variable";if(!t.inAttributeList&&t.attributes&&r.match("[",!0,!0))return t.inAttributeList=!0,"bracket";if(t.inAttributeList){if(t.attributes!==null&&r.match(n(t.attributes),!0,!0))return"attribute";if(r.match("]",!0,!0))return t.inAttributeList=!1,"bracket"}return r.next(),null}}export{a as n,s as r,c as t};
import{s as n}from"./chunk-LvLJmgfZ.js";import{t as f}from"./react-Bj1aDYRI.js";import{t as x}from"./compiler-runtime-B3qBwwSJ.js";import{t as u}from"./jsx-runtime-ZmTK25f3.js";var h=x(),v=n(f(),1),p=n(u(),1);const b=c=>{let t=(0,h.c)(8),{children:i,layerTop:m}=c,d=m===void 0?!1:m,o;t[0]===i?o=t[1]:(o=v.Children.toArray(i),t[0]=i,t[1]=o);let[l,s]=o,a=`second-icon absolute ${d?"top-[-2px] left-[-2px]":"bottom-[-2px] right-[-2px]"} rounded-full`,r;t[2]!==s||t[3]!==a?(r=(0,p.jsx)("div",{className:a,children:s}),t[2]=s,t[3]=a,t[4]=r):r=t[4];let e;return t[5]!==l||t[6]!==r?(e=(0,p.jsxs)("div",{className:"multi-icon relative w-fit",children:[l,r]}),t[5]=l,t[6]=r,t[7]=e):e=t[7],e};export{b as t};
var me=Object.defineProperty;var he=(a,t,e)=>t in a?me(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var q=(a,t,e)=>he(a,typeof t!="symbol"?t+"":t,e);import{s as B}from"./chunk-LvLJmgfZ.js";import{t as be}from"./react-Bj1aDYRI.js";import{t as xe}from"./compiler-runtime-B3qBwwSJ.js";import{r as G}from"./useEventListener-Cb-RVVEn.js";import{t as ve}from"./jsx-runtime-ZmTK25f3.js";import{t as C}from"./cn-BKtXLv3a.js";import{r as we}from"./x-ZP5cObgf.js";import{C as ge,E as J,S as D,_ as j,f as Q,w as W,x as ye}from"./Combination-BAEdC-rz.js";import{d as _e,u as je}from"./menu-items-BMjcEb2j.js";var d=B(be(),1),l=B(ve(),1),N="Collapsible",[Ce,X]=J(N),[Ne,O]=Ce(N),Y=d.forwardRef((a,t)=>{let{__scopeCollapsible:e,open:o,defaultOpen:n,disabled:r,onOpenChange:i,...s}=a,[c,p]=D({prop:o,defaultProp:n??!1,onChange:i,caller:N});return(0,l.jsx)(Ne,{scope:e,disabled:r,contentId:Q(),open:c,onOpenToggle:d.useCallback(()=>p(u=>!u),[p]),children:(0,l.jsx)(j.div,{"data-state":S(c),"data-disabled":r?"":void 0,...s,ref:t})})});Y.displayName=N;var Z="CollapsibleTrigger",ee=d.forwardRef((a,t)=>{let{__scopeCollapsible:e,...o}=a,n=O(Z,e);return(0,l.jsx)(j.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":S(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:W(a.onClick,n.onOpenToggle)})});ee.displayName=Z;var E="CollapsibleContent",ae=d.forwardRef((a,t)=>{let{forceMount:e,...o}=a,n=O(E,a.__scopeCollapsible);return(0,l.jsx)(ye,{present:e||n.open,children:({present:r})=>(0,l.jsx)(Ae,{...o,ref:t,present:r})})});ae.displayName=E;var Ae=d.forwardRef((a,t)=>{let{__scopeCollapsible:e,present:o,children:n,...r}=a,i=O(E,e),[s,c]=d.useState(o),p=d.useRef(null),u=G(t,p),m=d.useRef(0),w=m.current,g=d.useRef(0),v=g.current,y=i.open||s,h=d.useRef(y),x=d.useRef(void 0);return d.useEffect(()=>{let f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),ge(()=>{let f=p.current;if(f){x.current=x.current||{transitionDuration:f.style.transitionDuration,animationName:f.style.animationName},f.style.transitionDuration="0s",f.style.animationName="none";let _=f.getBoundingClientRect();m.current=_.height,g.current=_.width,h.current||(f.style.transitionDuration=x.current.transitionDuration,f.style.animationName=x.current.animationName),c(o)}},[i.open,o]),(0,l.jsx)(j.div,{"data-state":S(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!y,...r,ref:u,style:{"--radix-collapsible-content-height":w?`${w}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...a.style},children:y&&n})});function S(a){return a?"open":"closed"}var Re=Y,ke=ee,Ie=ae,b="Accordion",De=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[V,Oe,Ee]=_e(b),[A,ea]=J(b,[Ee,X]),z=X(),P=d.forwardRef((a,t)=>{let{type:e,...o}=a,n=o,r=o;return(0,l.jsx)(V.Provider,{scope:a.__scopeAccordion,children:e==="multiple"?(0,l.jsx)(Pe,{...r,ref:t}):(0,l.jsx)(ze,{...n,ref:t})})});P.displayName=b;var[re,Se]=A(b),[te,Ve]=A(b,{collapsible:!1}),ze=d.forwardRef((a,t)=>{let{value:e,defaultValue:o,onValueChange:n=()=>{},collapsible:r=!1,...i}=a,[s,c]=D({prop:e,defaultProp:o??"",onChange:n,caller:b});return(0,l.jsx)(re,{scope:a.__scopeAccordion,value:d.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:d.useCallback(()=>r&&c(""),[r,c]),children:(0,l.jsx)(te,{scope:a.__scopeAccordion,collapsible:r,children:(0,l.jsx)(oe,{...i,ref:t})})})}),Pe=d.forwardRef((a,t)=>{let{value:e,defaultValue:o,onValueChange:n=()=>{},...r}=a,[i,s]=D({prop:e,defaultProp:o??[],onChange:n,caller:b}),c=d.useCallback(u=>s((m=[])=>[...m,u]),[s]),p=d.useCallback(u=>s((m=[])=>m.filter(w=>w!==u)),[s]);return(0,l.jsx)(re,{scope:a.__scopeAccordion,value:i,onItemOpen:c,onItemClose:p,children:(0,l.jsx)(te,{scope:a.__scopeAccordion,collapsible:!0,children:(0,l.jsx)(oe,{...r,ref:t})})})}),[Te,R]=A(b),oe=d.forwardRef((a,t)=>{let{__scopeAccordion:e,disabled:o,dir:n,orientation:r="vertical",...i}=a,s=G(d.useRef(null),t),c=Oe(e),p=je(n)==="ltr",u=W(a.onKeyDown,m=>{var U;if(!De.includes(m.key))return;let w=m.target,g=c().filter(I=>{var $;return!(($=I.ref.current)!=null&&$.disabled)}),v=g.findIndex(I=>I.ref.current===w),y=g.length;if(v===-1)return;m.preventDefault();let h=v,x=y-1,f=()=>{h=v+1,h>x&&(h=0)},_=()=>{h=v-1,h<0&&(h=x)};switch(m.key){case"Home":h=0;break;case"End":h=x;break;case"ArrowRight":r==="horizontal"&&(p?f():_());break;case"ArrowDown":r==="vertical"&&f();break;case"ArrowLeft":r==="horizontal"&&(p?_():f());break;case"ArrowUp":r==="vertical"&&_();break}(U=g[h%y].ref.current)==null||U.focus()});return(0,l.jsx)(Te,{scope:e,disabled:o,direction:n,orientation:r,children:(0,l.jsx)(V.Slot,{scope:e,children:(0,l.jsx)(j.div,{...i,"data-orientation":r,ref:s,onKeyDown:o?void 0:u})})})}),k="AccordionItem",[He,T]=A(k),H=d.forwardRef((a,t)=>{let{__scopeAccordion:e,value:o,...n}=a,r=R(k,e),i=Se(k,e),s=z(e),c=Q(),p=o&&i.value.includes(o)||!1,u=r.disabled||a.disabled;return(0,l.jsx)(He,{scope:e,open:p,disabled:u,triggerId:c,children:(0,l.jsx)(Re,{"data-orientation":r.orientation,"data-state":le(p),...s,...n,ref:t,disabled:u,open:p,onOpenChange:m=>{m?i.onItemOpen(o):i.onItemClose(o)}})})});H.displayName=k;var ne="AccordionHeader",ie=d.forwardRef((a,t)=>{let{__scopeAccordion:e,...o}=a,n=R(b,e),r=T(ne,e);return(0,l.jsx)(j.h3,{"data-orientation":n.orientation,"data-state":le(r.open),"data-disabled":r.disabled?"":void 0,...o,ref:t})});ie.displayName=ne;var M="AccordionTrigger",F=d.forwardRef((a,t)=>{let{__scopeAccordion:e,...o}=a,n=R(b,e),r=T(M,e),i=Ve(M,e),s=z(e);return(0,l.jsx)(V.ItemSlot,{scope:e,children:(0,l.jsx)(ke,{"aria-disabled":r.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:r.triggerId,...s,...o,ref:t})})});F.displayName=M;var se="AccordionContent",K=d.forwardRef((a,t)=>{let{__scopeAccordion:e,...o}=a,n=R(b,e),r=T(se,e),i=z(e);return(0,l.jsx)(Ie,{role:"region","aria-labelledby":r.triggerId,"data-orientation":n.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});K.displayName=se;function le(a){return a?"open":"closed"}var Me=P,Fe=H,Ke=ie,de=F,ce=K,L=xe(),Le=Me,pe=d.forwardRef((a,t)=>{let e=(0,L.c)(9),o,n;e[0]===a?(o=e[1],n=e[2]):({className:o,...n}=a,e[0]=a,e[1]=o,e[2]=n);let r;e[3]===o?r=e[4]:(r=C("border-b",o),e[3]=o,e[4]=r);let i;return e[5]!==n||e[6]!==t||e[7]!==r?(i=(0,l.jsx)(Fe,{ref:t,className:r,...n}),e[5]=n,e[6]=t,e[7]=r,e[8]=i):i=e[8],i});pe.displayName="AccordionItem";var ue=d.forwardRef((a,t)=>{let e=(0,L.c)(12),o,n,r;e[0]===a?(o=e[1],n=e[2],r=e[3]):({className:n,children:o,...r}=a,e[0]=a,e[1]=o,e[2]=n,e[3]=r);let i;e[4]===n?i=e[5]:(i=C("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 text-start",n),e[4]=n,e[5]=i);let s;e[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.jsx)(we,{className:"h-4 w-4 transition-transform duration-200"}),e[6]=s):s=e[6];let c;return e[7]!==o||e[8]!==r||e[9]!==t||e[10]!==i?(c=(0,l.jsx)(Ke,{className:"flex",children:(0,l.jsxs)(de,{ref:t,className:i,...r,children:[o,s]})}),e[7]=o,e[8]=r,e[9]=t,e[10]=i,e[11]=c):c=e[11],c});ue.displayName=de.displayName;var fe=d.forwardRef((a,t)=>{let e=(0,L.c)(17),o,n,r,i;e[0]===a?(o=e[1],n=e[2],r=e[3],i=e[4]):({className:n,children:o,wrapperClassName:i,...r}=a,e[0]=a,e[1]=o,e[2]=n,e[3]=r,e[4]=i);let s;e[5]===n?s=e[6]:(s=C("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",n),e[5]=n,e[6]=s);let c;e[7]===i?c=e[8]:(c=C("pb-4 pt-0",i),e[7]=i,e[8]=c);let p;e[9]!==o||e[10]!==c?(p=(0,l.jsx)("div",{className:c,children:o}),e[9]=o,e[10]=c,e[11]=p):p=e[11];let u;return e[12]!==r||e[13]!==t||e[14]!==s||e[15]!==p?(u=(0,l.jsx)(ce,{ref:t,className:s,...r,children:p}),e[12]=r,e[13]=t,e[14]=s,e[15]=p,e[16]=u):u=e[16],u});fe.displayName=ce.displayName;var Ue=class{constructor(){q(this,"map",new Map)}get(a){return this.map.get(a)??[]}set(a,t){this.map.set(a,t)}add(a,t){this.map.has(a)?this.map.get(a).push(t):this.map.set(a,[t])}has(a){return this.map.has(a)}delete(a){return this.map.delete(a)}clear(){this.map.clear()}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}forEach(a){this.map.forEach(a)}flatValues(){let a=[];for(let t of this.map.values())a.push(...t);return a}get size(){return this.map.size}};export{ue as a,H as c,pe as i,F as l,Le as n,P as o,fe as r,K as s,Ue as t};
import{t as m}from"./mumps-CjtiTT1a.js";export{m as mumps};
function a(t){return RegExp("^(("+t.join(")|(")+"))\\b","i")}var n=RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),r=RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),o=RegExp("^[\\.,:]"),c=RegExp("[()]"),m=RegExp("^[%A-Za-z][A-Za-z0-9]*"),i="break.close.do.else.for.goto.halt.hang.if.job.kill.lock.merge.new.open.quit.read.set.tcommit.trollback.tstart.use.view.write.xecute.b.c.d.e.f.g.h.i.j.k.l.m.n.o.q.r.s.tc.tro.ts.u.v.w.x".split("."),l=a("\\$ascii.\\$char.\\$data.\\$ecode.\\$estack.\\$etrap.\\$extract.\\$find.\\$fnumber.\\$get.\\$horolog.\\$io.\\$increment.\\$job.\\$justify.\\$length.\\$name.\\$next.\\$order.\\$piece.\\$qlength.\\$qsubscript.\\$query.\\$quit.\\$random.\\$reverse.\\$select.\\$stack.\\$test.\\$text.\\$translate.\\$view.\\$x.\\$y.\\$a.\\$c.\\$d.\\$e.\\$ec.\\$es.\\$et.\\$f.\\$fn.\\$g.\\$h.\\$i.\\$j.\\$l.\\$n.\\$na.\\$o.\\$p.\\$q.\\$ql.\\$qs.\\$r.\\$re.\\$s.\\$st.\\$t.\\$tr.\\$v.\\$z".split(".")),d=a(i);function s(t,e){t.sol()&&(e.label=!0,e.commandMode=0);var $=t.peek();return $==" "||$==" "?(e.label=!1,e.commandMode==0?e.commandMode=1:(e.commandMode<0||e.commandMode==2)&&(e.commandMode=0)):$!="."&&e.commandMode>0&&($==":"?e.commandMode=-1:e.commandMode=2),($==="("||$===" ")&&(e.label=!1),$===";"?(t.skipToEnd(),"comment"):t.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":$=='"'?t.skipTo('"')?(t.next(),"string"):(t.skipToEnd(),"error"):t.match(r)||t.match(n)?"operator":t.match(o)?null:c.test($)?(t.next(),"bracket"):e.commandMode>0&&t.match(d)?"controlKeyword":t.match(l)?"builtin":t.match(m)?"variable":$==="$"||$==="^"?(t.next(),"builtin"):$==="@"?(t.next(),"string.special"):/[\w%]/.test($)?(t.eatWhile(/[\w%]/),"variable"):(t.next(),"error")}const u={name:"mumps",startState:function(){return{label:!1,commandMode:0}},token:function(t,e){var $=s(t,e);return e.label?"tag":$}};export{u as t};
import{s as C}from"./chunk-LvLJmgfZ.js";import{t as L}from"./react-Bj1aDYRI.js";import{bt as x,p as T,w as j,xt as y,yt as F}from"./cells-DPp5cDaO.js";import{t as b}from"./compiler-runtime-B3qBwwSJ.js";import{t as H}from"./useLifecycle-ClI_npeg.js";import{t as K}from"./jsx-runtime-ZmTK25f3.js";import{r as E}from"./button-CZ3Cs4qb.js";import{t as w}from"./cn-BKtXLv3a.js";import{r as k}from"./input-DUrq2DiR.js";import{r as D}from"./dist-CoCQUAeM.js";import{r as I}from"./useTheme-DQozhcp1.js";import{t as M}from"./tooltip-CMQz28hC.js";import{r as P,t as R}from"./esm-Bmu2DhPy.js";var W=b(),p=C(L(),1),d=C(K(),1),_=[D(),P({syntaxHighlighting:!0,highlightSpecialChars:!1,history:!1,drawSelection:!1,defaultKeymap:!1,historyKeymap:!1})];const B=(0,p.memo)(s=>{let e=(0,W.c)(8),{code:r,className:a}=s,{theme:i}=I(),o;e[0]===a?o=e[1]:(o=w(a,"text-muted-foreground flex flex-col overflow-hidden"),e[0]=a,e[1]=o);let l=i==="dark"?"dark":"light",t;e[2]!==r||e[3]!==l?(t=(0,d.jsx)(R,{minHeight:"10px",theme:l,height:"100%",className:"tiny-code",editable:!1,basicSetup:!1,extensions:_,value:r}),e[2]=r,e[3]=l,e[4]=t):t=e[4];let n;return e[5]!==o||e[6]!==t?(n=(0,d.jsx)("div",{className:o,children:t}),e[5]=o,e[6]=t,e[7]=n):n=e[7],n});B.displayName="TinyCode";var N=b();const q=s=>{let e=(0,N.c)(16),r,a,i,o,l;e[0]===s?(r=e[1],a=e[2],i=e[3],o=e[4],l=e[5]):({value:l,onChange:r,placeholder:i,onEnterKey:a,...o}=s,e[0]=s,e[1]=r,e[2]=a,e[3]=i,e[4]=o,e[5]=l);let t=(0,p.useRef)(null),n=S(l,r),u;e[6]===n.onBlur?u=e[7]:(u=()=>{let f=n.onBlur,v=t.current;if(v)return v.addEventListener("blur",f),()=>{v.removeEventListener("blur",f)}},e[6]=n.onBlur,e[7]=u),H(u);let m=n.value,g=n.onChange,c;e[8]===a?c=e[9]:(c=E.onEnter(f=>{E.stopPropagation()(f),a==null||a()}),e[8]=a,e[9]=c);let h;return e[10]!==n.onChange||e[11]!==n.value||e[12]!==i||e[13]!==o||e[14]!==c?(h=(0,d.jsx)(k,{"data-testid":"cell-name-input",value:m,onChange:g,ref:t,placeholder:i,className:"shadow-none! hover:shadow-none focus:shadow-none focus-visible:shadow-none",onKeyDown:c,...o}),e[10]=n.onChange,e[11]=n.value,e[12]=i,e[13]=o,e[14]=c,e[15]=h):h=e[15],h},z=s=>{let e=(0,N.c)(12),{value:r,cellId:a,className:i}=s,{updateCellName:o}=j(),l;e[0]!==a||e[1]!==o?(l=g=>o({cellId:a,name:g}),e[0]=a,e[1]=o,e[2]=l):l=e[2];let t=S(r,l);if(x(r))return null;let n=t.focusing?"":"text-ellipsis",u;e[3]!==i||e[4]!==n?(u=w("outline-hidden border hover:border-cyan-500/40 focus:border-cyan-500/40",n,i),e[3]=i,e[4]=n,e[5]=u):u=e[5];let m;return e[6]!==t.onBlur||e[7]!==t.onChange||e[8]!==t.onFocus||e[9]!==u||e[10]!==r?(m=(0,d.jsx)(M,{content:"Click to rename",children:(0,d.jsx)("span",{className:u,contentEditable:!0,suppressContentEditableWarning:!0,onChange:t.onChange,onBlur:t.onBlur,onFocus:t.onFocus,onKeyDown:A,children:r})}),e[6]=t.onBlur,e[7]=t.onChange,e[8]=t.onFocus,e[9]=u,e[10]=r,e[11]=m):m=e[11],m};function S(s,e){let[r,a]=(0,p.useState)(s),[i,o]=(0,p.useState)(!1),l=t=>{if(t!==s){if(!t||x(t)){e(t);return}e(F(t,T()))}};return{value:x(r)?"":r,focusing:i,onChange:t=>{let n=t.target.value;a(y(n))},onBlur:t=>{if(t.target instanceof HTMLInputElement){let n=t.target.value;l(y(n))}else t.target instanceof HTMLSpanElement&&(l(y(t.target.innerText.trim())),t.target.scrollLeft=0,o(!1))},onFocus:()=>{o(!0)}}}function A(s){s.stopPropagation(),s.key==="Enter"&&s.target instanceof HTMLElement&&s.target.blur()}export{q as n,B as r,z as t};
function n(_){for(var t={},r=_.split(" "),e=0;e<r.length;++e)t[r[e]]=!0;return t}var p=n("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),u=n("http mail events server types location upstream charset_map limit_except if geo map"),m=n("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),i;function s(_,t){return i=t,_}function a(_,t){_.eatWhile(/[\w\$_]/);var r=_.current();if(p.propertyIsEnumerable(r))return"keyword";if(u.propertyIsEnumerable(r)||m.propertyIsEnumerable(r))return"controlKeyword";var e=_.next();if(e=="@")return _.eatWhile(/[\w\\\-]/),s("meta",_.current());if(e=="/"&&_.eat("*"))return t.tokenize=c,c(_,t);if(e=="<"&&_.eat("!"))return t.tokenize=l,l(_,t);if(e=="=")s(null,"compare");else return(e=="~"||e=="|")&&_.eat("=")?s(null,"compare"):e=='"'||e=="'"?(t.tokenize=f(e),t.tokenize(_,t)):e=="#"?(_.skipToEnd(),s("comment","comment")):e=="!"?(_.match(/^\s*\w*/),s("keyword","important")):/\d/.test(e)?(_.eatWhile(/[\w.%]/),s("number","unit")):/[,.+>*\/]/.test(e)?s(null,"select-op"):/[;{}:\[\]]/.test(e)?s(null,e):(_.eatWhile(/[\w\\\-]/),s("variable","variable"))}function c(_,t){for(var r=!1,e;(e=_.next())!=null;){if(r&&e=="/"){t.tokenize=a;break}r=e=="*"}return s("comment","comment")}function l(_,t){for(var r=0,e;(e=_.next())!=null;){if(r>=2&&e==">"){t.tokenize=a;break}r=e=="-"?r+1:0}return s("comment","comment")}function f(_){return function(t,r){for(var e=!1,o;(o=t.next())!=null&&!(o==_&&!e);)e=!e&&o=="\\";return e||(r.tokenize=a),s("string","string")}}const d={name:"nginx",startState:function(){return{tokenize:a,baseIndent:0,stack:[]}},token:function(_,t){if(_.eatSpace())return null;i=null;var r=t.tokenize(_,t),e=t.stack[t.stack.length-1];return i=="hash"&&e=="rule"?r="atom":r=="variable"&&(e=="rule"?r="number":(!e||e=="@media{")&&(r="tag")),e=="rule"&&/^[\{\};]$/.test(i)&&t.stack.pop(),i=="{"?e=="@media"?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):i=="}"?t.stack.pop():i=="@media"?t.stack.push("@media"):e=="{"&&i!="comment"&&t.stack.push("rule"),r},indent:function(_,t,r){var e=_.stack.length;return/^\}/.test(t)&&(e-=_.stack[_.stack.length-1]=="rule"?2:1),_.baseIndent+e*r.unit},languageData:{indentOnInput:/^\s*\}$/}};export{d as nginx};

Sorry, the diff of this file is too big to display

import{t as s}from"./nsis-QuE155sg.js";export{s as nsis};
import{t as e}from"./simple-mode-BmS_AmGQ.js";const t=e({start:[{regex:/(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/,token:"number"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/`(?:[^\\`]|\\.)*`?/,token:"string"},{regex:/^\s*(?:\!(addincludedir|addplugindir|appendfile|assert|cd|define|delfile|echo|error|execute|finalize|getdllversion|gettlbversion|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|uninstfinalize|verbose|warning))\b/i,token:"keyword"},{regex:/^\s*(?:\!(if(?:n?def)?|ifmacron?def|macro))\b/i,token:"keyword",indent:!0},{regex:/^\s*(?:\!(else|endif|macroend))\b/i,token:"keyword",dedent:!0},{regex:/^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetKnownFolderPath|GetLabelAddress|GetTempFileName|GetWinVer|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfRtlLanguage|IfShellVarContextAll|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Target|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/i,token:"keyword"},{regex:/^\s*(?:Function|PageEx|Section(?:Group)?)\b/i,token:"keyword",indent:!0},{regex:/^\s*(?:(Function|PageEx|Section(?:Group)?)End)\b/i,token:"keyword",dedent:!0},{regex:/\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/i,token:"atom"},{regex:/\b(?:admin|all|amd64-unicode|auto|both|bottom|bzip2|components|current|custom|directory|false|force|hide|highest|ifdiff|ifnewer|instfiles|lastused|leave|left|license|listonly|lzma|nevershow|none|normal|notset|off|on|right|show|silent|silentlog|textonly|top|true|try|un\.components|un\.custom|un\.directory|un\.instfiles|un\.license|uninstConfirm|user|Win10|Win7|Win8|WinVista|x-86-(ansi|unicode)|zlib)\b/i,token:"builtin"},{regex:/\$\{(?:And(?:If(?:Not)?|Unless)|Break|Case(?:2|3|4|5|Else)?|Continue|Default|Do(?:Until|While)?|Else(?:If(?:Not)?|Unless)?|End(?:If|Select|Switch)|Exit(?:Do|For|While)|For(?:Each)?|If(?:Cmd|Not(?:Then)?|Then)?|Loop(?:Until|While)?|Or(?:If(?:Not)?|Unless)|Select|Switch|Unless|While)\}/i,token:"variable-2",indent:!0},{regex:/\$\{(?:BannerTrimPath|DirState|DriveSpace|Get(BaseName|Drives|ExeName|ExePath|FileAttributes|FileExt|FileName|FileVersion|Options|OptionsS|Parameters|Parent|Root|Size|Time)|Locate|RefreshShellIcons)\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:Memento(?:Section(?:Done|End|Restore|Save)?|UnselectedSection))\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:Config(?:Read|ReadS|Write|WriteS)|File(?:Join|ReadFromEnd|Recode)|Line(?:Find|Read|Sum)|Text(?:Compare|CompareS)|TrimNewLines)\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:(?:At(?:Least|Most)|Is)(?:ServicePack|Win(?:7|8|10|95|98|200(?:0|3|8(?:R2)?)|ME|NT4|Vista|XP))|Is(?:NT|Server))\}/i,token:"variable",dedent:!0},{regex:/\$\{(?:StrFilterS?|Version(?:Compare|Convert)|Word(?:AddS?|Find(?:(?:2|3)X)?S?|InsertS?|ReplaceS?))\}/i,token:"keyword",dedent:!0},{regex:/\$\{(?:RunningX64)\}/i,token:"variable",dedent:!0},{regex:/\$\{(?:Disable|Enable)X64FSRedirection\}/i,token:"keyword",dedent:!0},{regex:/(#|;).*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/\$\w[\w\.]*/,token:"variable"},{regex:/\${[\!\w\.:-]+}/,token:"variableName.constant"},{regex:/\$\([\!\w\.:-]+\)/,token:"atom"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],languageData:{name:"nsis",indentOnInput:/^\s*((Function|PageEx|Section|Section(Group)?)End|(\!(endif|macroend))|\$\{(End(If|Unless|While)|Loop(Until)|Next)\})$/i,commentTokens:{line:"#",block:{open:"/*",close:"*/"}}}});export{t};
var R={PRE_SUBJECT:0,WRITING_SUB_URI:1,WRITING_BNODE_URI:2,PRE_PRED:3,WRITING_PRED_URI:4,PRE_OBJ:5,WRITING_OBJ_URI:6,WRITING_OBJ_BNODE:7,WRITING_OBJ_LITERAL:8,WRITING_LIT_LANG:9,WRITING_LIT_TYPE:10,POST_OBJ:11,ERROR:12};function T(t,I){var _=t.location;t.location=_==R.PRE_SUBJECT&&I=="<"?R.WRITING_SUB_URI:_==R.PRE_SUBJECT&&I=="_"?R.WRITING_BNODE_URI:_==R.PRE_PRED&&I=="<"?R.WRITING_PRED_URI:_==R.PRE_OBJ&&I=="<"?R.WRITING_OBJ_URI:_==R.PRE_OBJ&&I=="_"?R.WRITING_OBJ_BNODE:_==R.PRE_OBJ&&I=='"'?R.WRITING_OBJ_LITERAL:_==R.WRITING_SUB_URI&&I==">"||_==R.WRITING_BNODE_URI&&I==" "?R.PRE_PRED:_==R.WRITING_PRED_URI&&I==">"?R.PRE_OBJ:_==R.WRITING_OBJ_URI&&I==">"||_==R.WRITING_OBJ_BNODE&&I==" "||_==R.WRITING_OBJ_LITERAL&&I=='"'||_==R.WRITING_LIT_LANG&&I==" "||_==R.WRITING_LIT_TYPE&&I==">"?R.POST_OBJ:_==R.WRITING_OBJ_LITERAL&&I=="@"?R.WRITING_LIT_LANG:_==R.WRITING_OBJ_LITERAL&&I=="^"?R.WRITING_LIT_TYPE:I==" "&&(_==R.PRE_SUBJECT||_==R.PRE_PRED||_==R.PRE_OBJ||_==R.POST_OBJ)?_:_==R.POST_OBJ&&I=="."?R.PRE_SUBJECT:R.ERROR}const O={name:"ntriples",startState:function(){return{location:R.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(t,I){var _=t.next();if(_=="<"){T(I,_);var E="";return t.eatWhile(function(r){return r!="#"&&r!=">"?(E+=r,!0):!1}),I.uris.push(E),t.match("#",!1)||(t.next(),T(I,">")),"variable"}if(_=="#"){var i="";return t.eatWhile(function(r){return r!=">"&&r!=" "?(i+=r,!0):!1}),I.anchors.push(i),"url"}if(_==">")return T(I,">"),"variable";if(_=="_"){T(I,_);var B="";return t.eatWhile(function(r){return r==" "?!1:(B+=r,!0)}),I.bnodes.push(B),t.next(),T(I," "),"builtin"}if(_=='"')return T(I,_),t.eatWhile(function(r){return r!='"'}),t.next(),t.peek()!="@"&&t.peek()!="^"&&T(I,'"'),"string";if(_=="@"){T(I,"@");var N="";return t.eatWhile(function(r){return r==" "?!1:(N+=r,!0)}),I.langs.push(N),t.next(),T(I," "),"string.special"}if(_=="^"){t.next(),T(I,"^");var a="";return t.eatWhile(function(r){return r==">"?!1:(a+=r,!0)}),I.types.push(a),t.next(),T(I,">"),"variable"}_==" "&&T(I,_),_=="."&&T(I,_)}};export{O as t};
import{t as r}from"./ntriples-4lauqsM6.js";export{r as ntriples};
import{s as It}from"./chunk-LvLJmgfZ.js";import{t as Tt}from"./react-Bj1aDYRI.js";import{t as Ct}from"./dist-BZP3Xxma.js";var D=It(Tt());const jt=Ct("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function it(t,r){var e={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(e[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(t);n<a.length;n++)r.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(t,a[n])&&(e[a[n]]=t[a[n]]);return e}var tt;(function(t){t.event="event",t.props="prop"})(tt||(tt={}));function q(){}function Rt(t){var r,e=void 0;return function(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];return r&&a.length===r.length&&a.every(function(u,l){return u===r[l]})||(r=a,e=t.apply(void 0,a)),e}}function Y(t){return!!(t||"").match(/\d/)}function X(t){return t==null}function Ft(t){return typeof t=="number"&&isNaN(t)}function lt(t){return X(t)||Ft(t)||typeof t=="number"&&!isFinite(t)}function ct(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Bt(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Mt(t,r,e){var a=Bt(e),n=t.search(/[1-9]/);return n=n===-1?t.length:n,t.substring(0,n)+t.substring(n,t.length).replace(a,"$1"+r)}function kt(t){var r=(0,D.useRef)(t);return r.current=t,(0,D.useRef)(function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];return r.current.apply(r,e)}).current}function nt(t,r){r===void 0&&(r=!0);var e=t[0]==="-",a=e&&r;t=t.replace("-","");var n=t.split(".");return{beforeDecimal:n[0],afterDecimal:n[1]||"",hasNegation:e,addNegation:a}}function Lt(t){if(!t)return t;var r=t[0]==="-";r&&(t=t.substring(1,t.length));var e=t.split("."),a=e[0].replace(/^0+/,"")||"0",n=e[1]||"";return(r?"-":"")+a+(n?"."+n:"")}function st(t,r,e){for(var a="",n=e?"0":"",u=0;u<=r-1;u++)a+=t[u]||n;return a}function ft(t,r){return Array(r+1).join(t)}function vt(t){var r=t+"",e=r[0]==="-"?"-":"";e&&(r=r.substring(1));var a=r.split(/[eE]/g),n=a[0],u=a[1];if(u=Number(u),!u)return e+n;n=n.replace(".","");var l=1+u,m=n.length;return l<0?n="0."+ft("0",Math.abs(l))+n:l>=m?n+=ft("0",l-m):n=(n.substring(0,l)||"0")+"."+n.substring(l),e+n}function dt(t,r,e){if(["","-"].indexOf(t)!==-1)return t;var a=(t.indexOf(".")!==-1||e)&&r,n=nt(t),u=n.beforeDecimal,l=n.afterDecimal,m=n.hasNegation,b=parseFloat("0."+(l||"0")),p=(l.length<=r?"0."+l:b.toFixed(r)).split("."),h=u;u&&Number(p[0])&&(h=u.split("").reverse().reduce(function(c,A,v){return c.length>v?(Number(c[0])+Number(A)).toString()+c.substring(1,c.length):A+c},p[0]));var f=st(p[1]||"",r,e),S=m?"-":"",y=a?".":"";return""+S+h+y+f}function Q(t,r){if(t.value=t.value,t!==null){if(t.createTextRange){var e=t.createTextRange();return e.move("character",r),e.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(r,r),!0):(t.focus(),!1)}}var gt=Rt(function(t,r){for(var e=0,a=0,n=t.length,u=r.length;t[e]===r[e]&&e<n;)e++;for(;t[n-1-a]===r[u-1-a]&&u-a>e&&n-a>e;)a++;return{from:{start:e,end:n-a},to:{start:e,end:u-a}}}),Wt=function(t,r){var e=Math.min(t.selectionStart,r);return{from:{start:e,end:t.selectionEnd},to:{start:e,end:r}}};function Pt(t,r,e){return Math.min(Math.max(t,r),e)}function ut(t){return Math.max(t.selectionStart,t.selectionEnd)}function Kt(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Gt(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function Ut(t){var r=t.currentValue,e=t.formattedValue,a=t.currentValueIndex,n=t.formattedValueIndex;return r[a]===e[n]}function _t(t,r,e,a,n,u,l){l===void 0&&(l=Ut);var m=n.findIndex(function(B){return B}),b=t.slice(0,m);!r&&!e.startsWith(b)&&(r=b,e=b+e,a+=b.length);for(var p=e.length,h=t.length,f={},S=Array(p),y=0;y<p;y++){S[y]=-1;for(var c=0,A=h;c<A;c++)if(l({currentValue:e,lastValue:r,formattedValue:t,currentValueIndex:y,formattedValueIndex:c})&&f[c]!==!0){S[y]=c,f[c]=!0;break}}for(var v=a;v<p&&(S[v]===-1||!u(e[v]));)v++;var E=v===p||S[v]===-1?h:S[v];for(v=a-1;v>0&&S[v]===-1;)v--;var j=v===-1||S[v]===-1?0:S[v]+1;return j>E?E:a-j<E-a?j:E}function mt(t,r,e,a){var n=t.length;if(r=Pt(r,0,n),a==="left"){for(;r>=0&&!e[r];)r--;r===-1&&(r=e.indexOf(!0))}else{for(;r<=n&&!e[r];)r++;r>n&&(r=e.lastIndexOf(!0))}return r===-1&&(r=n),r}function $t(t){for(var r=Array.from({length:t.length+1}).map(function(){return!0}),e=0,a=r.length;e<a;e++)r[e]=!!(Y(t[e])||Y(t[e-1]));return r}function pt(t,r,e,a,n,u){u===void 0&&(u=q);var l=kt(function(c,A){var v,E;return lt(c)?(E="",v=""):typeof c=="number"||A?(E=typeof c=="number"?vt(c):c,v=a(E)):(E=n(c,void 0),v=a(E)),{formattedValue:v,numAsString:E}}),m=(0,D.useState)(function(){return l(X(t)?r:t,e)}),b=m[0],p=m[1],h=function(c,A){c.formattedValue!==b.formattedValue&&p({formattedValue:c.formattedValue,numAsString:c.value}),u(c,A)},f=t,S=e;X(t)&&(f=b.numAsString,S=!0);var y=l(f,S);return(0,D.useMemo)(function(){p(y)},[y.formattedValue]),[b,h]}function qt(t){return t.replace(/[^0-9]/g,"")}function Zt(t){return t}function zt(t){var r=t.type;r===void 0&&(r="text");var e=t.displayType;e===void 0&&(e="input");var a=t.customInput,n=t.renderText,u=t.getInputRef,l=t.format;l===void 0&&(l=Zt);var m=t.removeFormatting;m===void 0&&(m=qt);var b=t.defaultValue,p=t.valueIsNumericString,h=t.onValueChange,f=t.isAllowed,S=t.onChange;S===void 0&&(S=q);var y=t.onKeyDown;y===void 0&&(y=q);var c=t.onMouseUp;c===void 0&&(c=q);var A=t.onFocus;A===void 0&&(A=q);var v=t.onBlur;v===void 0&&(v=q);var E=t.value,j=t.getCaretBoundary;j===void 0&&(j=$t);var B=t.isValidInputCharacter;B===void 0&&(B=Y);var Z=t.isCharacterSame,P=it(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=pt(E,b,!!p,l,m,h),G=z[0],x=G.formattedValue,k=G.numAsString,H=z[1],K=(0,D.useRef)(),s=(0,D.useRef)({formattedValue:x,numAsString:k}),g=function(o,i){s.current={formattedValue:o.formattedValue,numAsString:o.value},H(o,i)},C=(0,D.useState)(!1),I=C[0],W=C[1],w=(0,D.useRef)(null),T=(0,D.useRef)({setCaretTimeout:null,focusTimeout:null});(0,D.useEffect)(function(){return W(!0),function(){clearTimeout(T.current.setCaretTimeout),clearTimeout(T.current.focusTimeout)}},[]);var J=l,R=function(o,i){var d=parseFloat(i);return{formattedValue:o,value:i,floatValue:isNaN(d)?void 0:d}},L=function(o,i,d){o.selectionStart===0&&o.selectionEnd===o.value.length||(Q(o,i),T.current.setCaretTimeout=setTimeout(function(){o.value===d&&o.selectionStart!==i&&Q(o,i)},0))},M=function(o,i,d){return mt(o,i,j(o),d)},et=function(o,i,d){var O=j(i),F=_t(i,x,o,d,O,B,Z);return F=mt(i,F,O),F},bt=function(o){var i=o.formattedValue;i===void 0&&(i="");var d=o.input,O=o.source,F=o.event,N=o.numAsString,V;if(d){var U=o.inputValue||d.value,_=ut(d);d.value=i,V=et(U,i,_),V!==void 0&&L(d,V,i)}i!==x&&g(R(i,N),{event:F,source:O})};(0,D.useEffect)(function(){var o=s.current,i=o.formattedValue,d=o.numAsString;(x!==i||k!==d)&&g(R(x,k),{event:void 0,source:tt.props})},[x,k]);var yt=w.current?ut(w.current):void 0;(typeof window<"u"?D.useLayoutEffect:D.useEffect)(function(){var o=w.current;if(x!==s.current.formattedValue&&o){var i=et(s.current.formattedValue,x,yt);o.value=x,L(o,i,x)}},[x]);var Vt=function(o,i,d){var O=i.target,F=K.current?Wt(K.current,O.selectionEnd):gt(x,o),N=Object.assign(Object.assign({},F),{lastValue:x}),V=m(o,N),U=J(V);if(V=m(U,void 0),f&&!f(R(U,V))){var _=i.target,$=et(o,x,ut(_));return _.value=x,L(_,$,x),!1}return bt({formattedValue:U,numAsString:V,inputValue:o,event:i,source:d,input:i.target}),!0},at=function(o,i){i===void 0&&(i=0),K.current={selectionStart:o.selectionStart,selectionEnd:o.selectionEnd+i}},xt=function(o){var i=o.target.value;Vt(i,o,tt.event)&&S(o),K.current=void 0},wt=function(o){var i=o.target,d=o.key,O=i.selectionStart,F=i.selectionEnd,N=i.value;N===void 0&&(N="");var V;d==="ArrowLeft"||d==="Backspace"?V=Math.max(O-1,0):d==="ArrowRight"?V=Math.min(O+1,N.length):d==="Delete"&&(V=O);var U=0;d==="Delete"&&O===F&&(U=1);var _=d==="ArrowLeft"||d==="ArrowRight";if(V===void 0||O!==F&&!_){y(o),at(i,U);return}var $=V;_?($=M(N,V,d==="ArrowLeft"?"left":"right"),$!==V&&o.preventDefault()):d==="Delete"&&!B(N[V])?$=M(N,V,"right"):d==="Backspace"&&!B(N[V])&&($=M(N,V,"left")),$!==V&&L(i,$,N),y(o),at(i,U)},Nt=function(o){var i=o.target,d=function(){var O=i.selectionStart,F=i.selectionEnd,N=i.value;if(N===void 0&&(N=""),O===F){var V=M(N,O);V!==O&&L(i,V,N)}};d(),requestAnimationFrame(function(){d()}),c(o),at(i)},Dt=function(o){o.persist&&o.persist();var i=o.target,d=o.currentTarget;w.current=i,T.current.focusTimeout=setTimeout(function(){var O=i.selectionStart,F=i.selectionEnd,N=i.value;N===void 0&&(N="");var V=M(N,O);V!==O&&!(O===0&&F===N.length)&&L(i,V,N),A(Object.assign(Object.assign({},o),{currentTarget:d}))},0)},Et=function(o){w.current=null,clearTimeout(T.current.focusTimeout),clearTimeout(T.current.setCaretTimeout),v(o)},Ot=I&&Kt()?"numeric":void 0,ot=Object.assign({inputMode:Ot},P,{type:r,value:x,onChange:xt,onKeyDown:wt,onMouseUp:Nt,onFocus:Dt,onBlur:Et});if(e==="text")return n?D.createElement(D.Fragment,null,n(x,P)||null):D.createElement("span",Object.assign({},P,{ref:u}),x);if(a){var At=a;return D.createElement(At,Object.assign({},ot,{ref:u}))}return D.createElement("input",Object.assign({},ot,{ref:u}))}function ht(t,r){var e=r.decimalScale,a=r.fixedDecimalScale,n=r.prefix;n===void 0&&(n="");var u=r.suffix;u===void 0&&(u="");var l=r.allowNegative,m=r.thousandsGroupStyle;if(m===void 0&&(m="thousand"),t===""||t==="-")return t;var b=rt(r),p=b.thousandSeparator,h=b.decimalSeparator,f=e!==0&&t.indexOf(".")!==-1||e&&a,S=nt(t,l),y=S.beforeDecimal,c=S.afterDecimal,A=S.addNegation;return e!==void 0&&(c=st(c,e,!!a)),p&&(y=Mt(y,p,m)),n&&(y=n+y),u&&(c+=u),A&&(y="-"+y),t=y+(f&&h||"")+c,t}function rt(t){var r=t.decimalSeparator;r===void 0&&(r=".");var e=t.thousandSeparator,a=t.allowedDecimalSeparators;return e===!0&&(e=","),a||(a=[r,"."]),{decimalSeparator:r,thousandSeparator:e,allowedDecimalSeparators:a}}function Ht(t,r){t===void 0&&(t="");var e=RegExp("(-)"),a=RegExp("(-)(.)*(-)"),n=e.test(t),u=a.test(t);return t=t.replace(/-/g,""),n&&!u&&r&&(t="-"+t),t}function Jt(t,r){return RegExp("(^-)|[0-9]|"+ct(t),r?"g":void 0)}function Qt(t,r,e){return t===""?!0:!(r!=null&&r.match(/\d/))&&!(e!=null&&e.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function Xt(t,r,e){var a;r===void 0&&(r=Gt(t));var n=e.allowNegative,u=e.prefix;u===void 0&&(u="");var l=e.suffix;l===void 0&&(l="");var m=e.decimalScale,b=r.from,p=r.to,h=p.start,f=p.end,S=rt(e),y=S.allowedDecimalSeparators,c=S.decimalSeparator,A=t[f]===c;if(Y(t)&&(t===u||t===l)&&r.lastValue==="")return t;if(f-h===1&&y.indexOf(t[h])!==-1){var v=m===0?"":c;t=t.substring(0,h)+v+t.substring(h+1,t.length)}var E=function(w,T,J){var R=!1,L=!1;u.startsWith("-")?R=!1:w.startsWith("--")?(R=!1,L=!0):l.startsWith("-")&&w.length===l.length?R=!1:w[0]==="-"&&(R=!0);var M=R?1:0;return L&&(M=2),M&&(w=w.substring(M),T-=M,J-=M),{value:w,start:T,end:J,hasNegation:R}},j=E(t,h,f),B=j.hasNegation;a=j,t=a.value,h=a.start,f=a.end;var Z=E(r.lastValue,b.start,b.end),P=Z.start,z=Z.end,G=Z.value,x=t.substring(h,f);t.length&&G.length&&(P>G.length-l.length||z<u.length)&&!(x&&l.startsWith(x))&&(t=G);var k=0;t.startsWith(u)?k+=u.length:h<u.length&&(k=h),t=t.substring(k),f-=k;var H=t.length,K=t.length-l.length;t.endsWith(l)?H=K:(f>K||f>t.length-l.length)&&(H=f),t=t.substring(0,H),t=Ht(B?"-"+t:t,n),t=(t.match(Jt(c,!0))||[]).join("");var s=t.indexOf(c);t=t.replace(new RegExp(ct(c),"g"),function(w,T){return T===s?".":""});var g=nt(t,n),C=g.beforeDecimal,I=g.afterDecimal,W=g.addNegation;return p.end-p.start<b.end-b.start&&C===""&&A&&!parseFloat(I)&&(t=W?"-":""),t}function Yt(t,r){var e=r.prefix;e===void 0&&(e="");var a=r.suffix;a===void 0&&(a="");var n=Array.from({length:t.length+1}).map(function(){return!0}),u=t[0]==="-";n.fill(!1,0,e.length+(u?1:0));var l=t.length;return n.fill(!1,l-a.length+1,l+1),n}function tr(t){var r=rt(t),e=r.thousandSeparator,a=r.decimalSeparator,n=t.prefix;n===void 0&&(n="");var u=t.allowNegative;if(u===void 0&&(u=!0),e===a)throw Error(`
Decimal separator can't be same as thousand separator.
thousandSeparator: `+e+` (thousandSeparator = {true} is same as thousandSeparator = ",")
decimalSeparator: `+a+` (default value for decimalSeparator is .)
`);return n.startsWith("-")&&u&&(console.error(`
Prefix can't start with '-' when allowNegative is true.
prefix: `+n+`
allowNegative: `+u+`
`),u=!1),Object.assign(Object.assign({},t),{allowNegative:u})}function rr(t){t=tr(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var r=t.suffix,e=t.allowNegative,a=t.allowLeadingZeros,n=t.onKeyDown;n===void 0&&(n=q);var u=t.onBlur;u===void 0&&(u=q);var l=t.thousandSeparator,m=t.decimalScale,b=t.fixedDecimalScale,p=t.prefix;p===void 0&&(p="");var h=t.defaultValue,f=t.value,S=t.valueIsNumericString,y=t.onValueChange,c=it(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),A=rt(t),v=A.decimalSeparator,E=A.allowedDecimalSeparators,j=function(s){return ht(s,t)},B=function(s,g){return Xt(s,g,t)},Z=X(f)?h:f,P=S??Qt(Z,p,r);X(f)?X(h)||P||(P=typeof h=="number"):P||(P=typeof f=="number");var z=function(s){return lt(s)?s:(typeof s=="number"&&(s=vt(s)),P&&typeof m=="number"?dt(s,m,!!b):s)},G=pt(z(f),z(h),!!P,j,B,y),x=G[0],k=x.numAsString,H=x.formattedValue,K=G[1];return Object.assign(Object.assign({},c),{value:H,valueIsNumericString:!1,isValidInputCharacter:function(s){return s===v?!0:Y(s)},isCharacterSame:function(s){var g=s.currentValue,C=s.lastValue,I=s.formattedValue,W=s.currentValueIndex,w=s.formattedValueIndex,T=g[W],J=I[w],R=gt(C,g).to,L=function(M){return B(M).indexOf(".")+p.length};return f===0&&b&&m&&g[R.start]===v&&L(g)<W&&L(I)>w?!1:W>=R.start&&W<R.end&&E&&E.includes(T)&&J===v?!0:T===J},onValueChange:K,format:j,removeFormatting:B,getCaretBoundary:function(s){return Yt(s,t)},onKeyDown:function(s){var g=s.target,C=s.key,I=g.selectionStart,W=g.selectionEnd,w=g.value;if(w===void 0&&(w=""),(C==="Backspace"||C==="Delete")&&W<p.length){s.preventDefault();return}if(I!==W){n(s);return}C==="Backspace"&&w[0]==="-"&&I===p.length+1&&e&&Q(g,1),m&&b&&(C==="Backspace"&&w[I-1]===v?(Q(g,I-1),s.preventDefault()):C==="Delete"&&w[I]===v&&s.preventDefault()),E!=null&&E.includes(C)&&w[I]===v&&Q(g,I+1);var T=l===!0?",":l;C==="Backspace"&&w[I-1]===T&&Q(g,I-1),C==="Delete"&&w[I]===T&&Q(g,I+1),n(s)},onBlur:function(s){var g=k;g.match(/\d/g)||(g=""),a||(g=Lt(g)),b&&m&&(g=dt(g,m,b)),g!==k&&K({formattedValue:ht(g,t),value:g,floatValue:parseFloat(g)},{event:s,source:tt.event}),u(s)}})}function er(t){var r=rr(t);return D.createElement(zt,Object.assign({},r))}function St(){var t,r,e;return((e=(r=(t=Intl.NumberFormat())==null?void 0:t.formatToParts(1.1))==null?void 0:r.find(a=>a.type==="decimal"))==null?void 0:e.value)??"."}function ar(){return St()==="."?",":"."}var nr=t=>{let{value:r,onChange:e,disabled:a,highlight:n,validatedSelection:u,fixedDecimals:l,allowNegative:m,thousandSeparator:b,decimalSeparator:p}=t,h=D.useRef();return D.useLayoutEffect(()=>{var f;if(u!==void 0){let S=typeof u=="number"?[u,null]:u;(f=h.current)==null||f.setSelectionRange(S[0],S[1])}},[u]),D.createElement(jt,null,D.createElement(er,{autoFocus:!0,getInputRef:h,className:"gdg-input",onFocus:f=>f.target.setSelectionRange(n?0:f.target.value.length,f.target.value.length),disabled:a===!0,decimalScale:l,allowNegative:m,thousandSeparator:b??ar(),decimalSeparator:p??St(),value:Object.is(r,-0)?"-":r??"",onValueChange:e}))};export{nr as default};
import{d as l}from"./hotkeys-BHHWjLlp.js";import{t as s}from"./once-Bul8mtFs.js";const a=s(i=>{for(let t of[100,20,2,0])try{return new Intl.NumberFormat(i,{minimumFractionDigits:0,maximumFractionDigits:t}).format(1),t}catch(n){l.error(n)}return 0});function c(i,t){return i==null?"":Array.isArray(i)?String(i):typeof i=="string"?i:typeof i=="boolean"?String(i):typeof i=="number"||typeof i=="bigint"?i.toLocaleString(t,{minimumFractionDigits:0,maximumFractionDigits:2}):String(i)}function u(i){return i===0?"0":Number.isNaN(i)?"NaN":Number.isFinite(i)?null:i>0?"Infinity":"-Infinity"}function f(i,t){let n=u(i);if(n!==null)return n;let r=Math.abs(i);if(r<.01||r>=1e6)return new Intl.NumberFormat(t.locale,{minimumFractionDigits:1,maximumFractionDigits:1,notation:"scientific"}).format(i).toLowerCase();let{shouldRound:m,locale:o}=t;return m?new Intl.NumberFormat(o,{minimumFractionDigits:0,maximumFractionDigits:2}).format(i):i.toLocaleString(o,{minimumFractionDigits:0,maximumFractionDigits:a(o)})}var e={24:"Y",21:"Z",18:"E",15:"P",12:"T",9:"G",6:"M",3:"k",0:"","-3":"m","-6":"\xB5","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"};function g(i,t){let n=u(i);if(n!==null)return n;let[r,m]=new Intl.NumberFormat(t,{notation:"engineering",maximumSignificantDigits:3}).format(i).split("E");return m in e?r+e[m]:`${r}E${m}`}export{f as i,g as n,c as r,a as t};
function f(n,t){if(n==null)return{};var r={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(t.indexOf(i)!==-1)continue;r[i]=n[i]}return r}export{f as t};
function i(e){return RegExp("^(("+e.join(")|(")+"))\\b")}var o=RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),c=RegExp("^[\\(\\[\\{\\},:=;\\.]"),s=RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),m=RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),l=RegExp("^((>>=)|(<<=))"),u=RegExp("^[\\]\\)]"),f=RegExp("^[_A-Za-z\xA1-\uFFFF][_A-Za-z0-9\xA1-\uFFFF]*"),d=i("error.eval.function.abs.acos.atan.asin.cos.cosh.exp.log.prod.sum.log10.max.min.sign.sin.sinh.sqrt.tan.reshape.break.zeros.default.margin.round.ones.rand.syn.ceil.floor.size.clear.zeros.eye.mean.std.cov.det.eig.inv.norm.rank.trace.expm.logm.sqrtm.linspace.plot.title.xlabel.ylabel.legend.text.grid.meshgrid.mesh.num2str.fft.ifft.arrayfun.cellfun.input.fliplr.flipud.ismember".split(".")),h=i("return.case.switch.else.elseif.end.endif.endfunction.if.otherwise.do.for.while.try.catch.classdef.properties.events.methods.global.persistent.endfor.endwhile.printf.sprintf.disp.until.continue.pkg".split("."));function a(e,n){return!e.sol()&&e.peek()==="'"?(e.next(),n.tokenize=r,"operator"):(n.tokenize=r,r(e,n))}function g(e,n){return e.match(/^.*%}/)?(n.tokenize=r,"comment"):(e.skipToEnd(),"comment")}function r(e,n){if(e.eatSpace())return null;if(e.match("%{"))return n.tokenize=g,e.skipToEnd(),"comment";if(e.match(/^[%#]/))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return e.tokenize=r,"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)||e.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(e.match(i(["nan","NaN","inf","Inf"])))return"number";var t=e.match(/^"(?:[^"]|"")*("|$)/)||e.match(/^'(?:[^']|'')*('|$)/);return t?t[1]?"string":"error":e.match(h)?"keyword":e.match(d)?"builtin":e.match(f)?"variable":e.match(o)||e.match(s)?"operator":e.match(c)||e.match(m)||e.match(l)?null:e.match(u)?(n.tokenize=a,null):(e.next(),"error")}const k={name:"octave",startState:function(){return{tokenize:r}},token:function(e,n){var t=n.tokenize(e,n);return(t==="number"||t==="variable")&&(n.tokenize=a),t},languageData:{commentTokens:{line:"%"}}};export{k as t};
import{t as o}from"./octave-A2kFK0nR.js";export{o as octave};
import{n as d}from"./init-DRQmrFIb.js";var l=class extends Map{constructor(t,n=h){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let[e,r]of t)this.set(e,r)}get(t){return super.get(a(this,t))}has(t){return super.has(a(this,t))}set(t,n){return super.set(f(this,t),n)}delete(t){return super.delete(c(this,t))}},g=class extends Set{constructor(t,n=h){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let e of t)this.add(e)}has(t){return super.has(a(this,t))}add(t){return super.add(f(this,t))}delete(t){return super.delete(c(this,t))}};function a({_intern:t,_key:n},e){let r=n(e);return t.has(r)?t.get(r):e}function f({_intern:t,_key:n},e){let r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function c({_intern:t,_key:n},e){let r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function h(t){return typeof t=="object"&&t?t.valueOf():t}const o=Symbol("implicit");function p(){var t=new l,n=[],e=[],r=o;function s(u){let i=t.get(u);if(i===void 0){if(r!==o)return r;t.set(u,i=n.push(u)-1)}return e[i%e.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],t=new l;for(let i of u)t.has(i)||t.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(e=Array.from(u),s):e.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return p(n,e).unknown(r)},d.apply(s,arguments),s}export{p as n,g as r,o as t};
import{s}from"./chunk-LvLJmgfZ.js";import{u as n}from"./useEvent-BhXAndur.js";import{t as c}from"./react-Bj1aDYRI.js";import{In as f,x as d}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as l}from"./compiler-runtime-B3qBwwSJ.js";import{t as u}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import{i as v,n as x,r as h}from"./floating-outline-BtdqbkUq.js";import{t as j}from"./empty-state-B8Cxr9nj.js";var I=l();c();var p=s(u(),1),b=()=>{let t=(0,I.c)(7),{items:r}=n(d),o;t[0]===r?o=t[1]:(o=h(r),t[0]=r,t[1]=o);let{activeHeaderId:m,activeOccurrences:a}=v(o);if(r.length===0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,p.jsx)(j,{title:"No outline found",description:"Add markdown headings to your notebook to create an outline.",icon:(0,p.jsx)(f,{})}),t[2]=i):i=t[2],i}let e;return t[3]!==m||t[4]!==a||t[5]!==r?(e=(0,p.jsx)(x,{items:r,activeHeaderId:m,activeOccurrences:a}),t[3]=m,t[4]=a,t[5]=r,t[6]=e):e=t[6],e};export{b as default};
import{t as o}from"./oz-CvXDMSbl.js";export{o as oz};
function o(e){return RegExp("^(("+e.join(")|(")+"))\\b")}var h=/[\^@!\|<>#~\.\*\-\+\\/,=]/,m=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,k=/(:::)|(\.\.\.)|(=<:)|(>=:)/,i=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],s=["end"],p=o(["true","false","nil","unit"]),z=o(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),g=o(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),f=o(i),l=o(s);function a(e,t){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match("[]"))return"keyword";if(e.match(k)||e.match(m))return"operator";if(e.match(p))return"atom";var r=e.match(g);if(r)return t.doInCurrentLine?t.doInCurrentLine=!1:t.currentIndent++,r[0]=="proc"||r[0]=="fun"?t.tokenize=v:r[0]=="class"?t.tokenize=x:r[0]=="meth"&&(t.tokenize=I),"keyword";if(e.match(f)||e.match(z))return"keyword";if(e.match(l))return t.currentIndent--,"keyword";var n=e.next();if(n=='"'||n=="'")return t.tokenize=S(n),t.tokenize(e,t);if(/[~\d]/.test(n)){if(n=="~")if(/^[0-9]/.test(e.peek())){if(e.next()=="0"&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}else return null;return n=="0"&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return n=="%"?(e.skipToEnd(),"comment"):n=="/"&&e.eat("*")?(t.tokenize=d,d(e,t)):h.test(n)?"operator":(e.eatWhile(/\w/),"variable")}function x(e,t){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=a,"type")}function I(e,t){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=a,"def")}function v(e,t){return e.eatSpace()?null:!t.hasPassedFirstStage&&e.eat("{")?(t.hasPassedFirstStage=!0,"bracket"):t.hasPassedFirstStage?(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),t.hasPassedFirstStage=!1,t.tokenize=a,"def"):(t.tokenize=a,null)}function d(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=a;break}r=n=="*"}return"comment"}function S(e){return function(t,r){for(var n=!1,c,u=!1;(c=t.next())!=null;){if(c==e&&!n){u=!0;break}n=!n&&c=="\\"}return(u||!n)&&(r.tokenize=a),"string"}}function b(){var e=i.concat(s);return RegExp("[\\[\\]]|("+e.join("|")+")$")}const y={name:"oz",startState:function(){return{tokenize:a,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,t){return e.sol()&&(t.doInCurrentLine=0),t.tokenize(e,t)},indent:function(e,t,r){var n=t.replace(/^\s+|\s+$/g,"");return n.match(l)||n.match(f)||n.match(/(\[])/)?r.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.unit},languageData:{indentOnInut:b(),commentTokens:{line:"%",block:{open:"/*",close:"*/"}}}};export{y as t};
import{s as H}from"./chunk-LvLJmgfZ.js";import{d as ae,u as oe}from"./useEvent-BhXAndur.js";import{t as le}from"./react-Bj1aDYRI.js";import{Xn as V}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import{r as ce}from"./ai-model-dropdown-Dk2SdB3C.js";import{y as de}from"./utils-YqBXNpsM.js";import{S as me}from"./config-Q0O7_stz.js";import{t as pe}from"./jsx-runtime-ZmTK25f3.js";import{r as xe}from"./button-CZ3Cs4qb.js";import{t as K}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{r as W}from"./requests-B4FYHTZl.js";import{r as ue}from"./x-ZP5cObgf.js";import{t as fe}from"./chevron-right--18M_6o9.js";import{u as ge}from"./toDate-DETS9bBd.js";import{t as R}from"./spinner-DA8-7wQv.js";import{a as he}from"./input-DUrq2DiR.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import{t as ve}from"./use-toast-BDYuj3zG.js";import"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import{t as J}from"./tooltip-CMQz28hC.js";import"./popover-CH1FzjxU.js";import{t as je}from"./copy-DHrHayPa.js";import{i as be,n as X,r as F,s as Q,t as ke}from"./useInstallPackage-D4fX0Ee_.js";import{n as Y}from"./error-banner-B9ts0mNl.js";import{n as ye}from"./useAsyncData-BMGLSTg8.js";import{a as Ne,i as q,n as we,o as Z,r as B,t as Se}from"./table-DScsXgJW.js";import{t as ee}from"./empty-state-B8Cxr9nj.js";var G=ie(),I=H(le(),1);function _e(t){let e=t.trim();for(let s of["pip install","pip3 install","uv add","uv pip install","poetry add","conda install","pipenv install"])if(e.toLowerCase().startsWith(s.toLowerCase()))return e.slice(s.length).trim();return e}var r=H(pe(),1),te=t=>{let e=(0,G.c)(9),{onClick:s,loading:n,children:i,className:p}=t;if(n){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,r.jsx)(R,{size:"small",className:"h-4 w-4 shrink-0 opacity-50"}),e[0]=l):l=e[0],l}let c;e[1]===p?c=e[2]:(c=K("px-2 h-full text-xs text-muted-foreground hover:text-foreground","invisible group-hover:visible",p),e[1]=p,e[2]=c);let a;e[3]===s?a=e[4]:(a=xe.stopPropagation(s),e[3]=s,e[4]=a);let o;return e[5]!==i||e[6]!==c||e[7]!==a?(o=(0,r.jsx)("button",{type:"button",className:c,onClick:a,children:i}),e[5]=i,e[6]=c,e[7]=a,e[8]=o):o=e[8],o},Ce=()=>{var w,S;let t=(0,G.c)(30),[e]=de(),s=e.package_management.manager,{getDependencyTree:n,getPackageList:i}=W(),[p,c]=I.useState(null),a;t[0]!==n||t[1]!==i?(a=async()=>{let[u,C]=await Promise.all([i(),n()]);return{list:u.packages,tree:C.tree}},t[0]=n,t[1]=i,t[2]=a):a=t[2];let o;t[3]===s?o=t[4]:(o=[s],t[3]=s,t[4]=o);let{data:l,error:m,refetch:j,isPending:g}=ye(a,o);if(g){let u;return t[5]===Symbol.for("react.memo_cache_sentinel")?(u=(0,r.jsx)(R,{size:"medium",centered:!0}),t[5]=u):u=t[5],u}if(m){let u;return t[6]===m?u=t[7]:(u=(0,r.jsx)(Y,{error:m}),t[6]=m,t[7]=u),u}let h=l.tree!=null,d;t[8]!==h||t[9]!==p?(d=De(p,h),t[8]=h,t[9]=p,t[10]=d):d=t[10];let f=d,x=(w=l.tree)==null?void 0:w.name,P=(S=l==null?void 0:l.tree)==null?void 0:S.version,y=x==="<root>",k;t[11]!==s||t[12]!==j?(k=(0,r.jsx)(Pe,{packageManager:s,onSuccess:j}),t[11]=s,t[12]=j,t[13]=k):k=t[13];let b;t[14]!==y||t[15]!==h||t[16]!==x||t[17]!==P||t[18]!==f?(b=h&&(0,r.jsxs)("div",{className:"flex items-center justify-between px-2 py-1 border-b",children:[(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)("button",{type:"button",className:K("px-2 py-1 text-xs rounded",f==="list"?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),onClick:()=>c("list"),children:"List"}),(0,r.jsx)("button",{type:"button",className:K("px-2 py-1 text-xs rounded",f==="tree"?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),onClick:()=>c("tree"),children:"Tree"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"items-center border px-2 py-0.5 text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground rounded-sm text-ellipsis block overflow-hidden max-w-fit font-medium",title:y?"sandbox":"project",children:y?"sandbox":"project"}),x&&!y&&(0,r.jsxs)("span",{className:"text-xs text-muted-foreground",children:[x,P&&` v${P}`]})]})]}),t[14]=y,t[15]=h,t[16]=x,t[17]=P,t[18]=f,t[19]=b):b=t[19];let v;t[20]!==l.list||t[21]!==l.tree||t[22]!==m||t[23]!==j||t[24]!==f?(v=f==="list"?(0,r.jsx)(Ee,{packages:l.list,onSuccess:j}):(0,r.jsx)($e,{tree:l.tree,error:m,onSuccess:j}),t[20]=l.list,t[21]=l.tree,t[22]=m,t[23]=j,t[24]=f,t[25]=v):v=t[25];let _;return t[26]!==k||t[27]!==b||t[28]!==v?(_=(0,r.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[k,b,v]}),t[26]=k,t[27]=b,t[28]=v,t[29]=_):_=t[29],_},Pe=t=>{let e=(0,G.c)(40),{onSuccess:s,packageManager:n}=t,[i,p]=I.useState(""),{handleClick:c}=ce(),a=oe(Q),o=ae(Q),l,m;e[0]!==a||e[1]!==o?(l=()=>{a&&(p(a),o(null))},m=[a,o],e[0]=a,e[1]=o,e[2]=l,e[3]=m):(l=e[2],m=e[3]),I.useEffect(l,m);let{loading:j,handleInstallPackages:g}=ke(),h;e[4]===s?h=e[5]:(h=()=>{s(),p("")},e[4]=s,e[5]=h);let d=h,f;e[6]!==g||e[7]!==i||e[8]!==d?(f=()=>{g([_e(i)],d)},e[6]=g,e[7]=i,e[8]=d,e[9]=f):f=e[9];let x=f,P=`Install packages with ${n}...`,y;e[10]!==j||e[11]!==c?(y=j?(0,r.jsx)(R,{size:"small",className:"mr-2 h-4 w-4 shrink-0 opacity-50"}):(0,r.jsx)(J,{content:"Change package manager",children:(0,r.jsx)(V,{onClick:()=>c("packageManagementAndData"),className:"mr-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-80 cursor-pointer"})}),e[10]=j,e[11]=c,e[12]=y):y=e[12];let k;e[13]===x?k=e[14]:(k=U=>{U.key==="Enter"&&(U.preventDefault(),x())},e[13]=x,e[14]=k);let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=U=>p(U.target.value),e[15]=b):b=e[15];let v;e[16]!==i||e[17]!==P||e[18]!==y||e[19]!==k?(v=(0,r.jsx)(he,{placeholder:P,id:be,icon:y,rootClassName:"flex-1 border-none",value:i,onKeyDown:k,onChange:b}),e[16]=i,e[17]=P,e[18]=y,e[19]=k,e[20]=v):v=e[20];let _;e[21]===Symbol.for("react.memo_cache_sentinel")?(_=(0,r.jsx)("span",{className:"font-bold tracking-wide",children:"Package name:"}),e[21]=_):_=e[21];let w,S;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=(0,r.jsxs)("div",{children:[_," A package name; this will install the latest version.",(0,r.jsx)("div",{className:"text-muted-foreground",children:"Example: httpx"})]}),S=(0,r.jsx)("span",{className:"font-bold tracking-wide",children:"Package and version:"}),e[22]=w,e[23]=S):(w=e[22],S=e[23]);let u,C;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=(0,r.jsxs)("div",{children:[S," ","A package with a specific version or version range.",(0,r.jsx)("div",{className:"text-muted-foreground",children:"Examples: httpx==0.27.0, httpx>=0.27.0"})]}),C=(0,r.jsx)("span",{className:"font-bold tracking-wide",children:"Git:"}),e[24]=u,e[25]=C):(u=e[24],C=e[25]);let E,$;e[26]===Symbol.for("react.memo_cache_sentinel")?(E=(0,r.jsxs)("div",{children:[C," A Git repository",(0,r.jsx)("div",{className:"text-muted-foreground",children:"Example: git+https://github.com/encode/httpx"})]}),$=(0,r.jsx)("span",{className:"font-bold tracking-wide",children:"URL:"}),e[26]=E,e[27]=$):(E=e[26],$=e[27]);let D,T;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=(0,r.jsxs)("div",{children:[$," A remote wheel or source distribution.",(0,r.jsx)("div",{className:"text-muted-foreground",children:"Example: https://example.com/httpx-0.27.0.tar.gz"})]}),T=(0,r.jsx)("span",{className:"font-bold tracking-wide",children:"Path:"}),e[28]=D,e[29]=T):(D=e[28],T=e[29]);let A;e[30]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(J,{delayDuration:300,side:"left",align:"start",content:(0,r.jsxs)("div",{className:"text-sm flex flex-col w-full max-w-[360px]",children:["Packages are installed using the package manager specified in your user configuration. Depending on your package manager, you can install packages with various formats:",(0,r.jsxs)("div",{className:"flex flex-col gap-2 mt-2",children:[w,u,E,D,(0,r.jsxs)("div",{children:[T," A local wheel, source distribution, or project directory.",(0,r.jsx)("div",{className:"text-muted-foreground",children:"Example: /example/foo-0.1.0-py3-none-any.whl"})]})]})]}),children:(0,r.jsx)(ge,{className:"h-4 w-4 cursor-help text-muted-foreground hover:text-foreground bg-transparent"})}),e[30]=A):A=e[30];let L=i&&"bg-accent text-accent-foreground",N;e[31]===L?N=e[32]:(N=K("float-right px-2 m-0 h-full text-sm text-secondary-foreground ml-2",L,"disabled:cursor-not-allowed disabled:opacity-50"),e[31]=L,e[32]=N);let z=!i,M;e[33]!==x||e[34]!==N||e[35]!==z?(M=(0,r.jsx)("button",{type:"button",className:N,onClick:x,disabled:z,children:"Add"}),e[33]=x,e[34]=N,e[35]=z,e[36]=M):M=e[36];let O;return e[37]!==M||e[38]!==v?(O=(0,r.jsxs)("div",{className:"flex items-center w-full border-b",children:[v,A,M]}),e[37]=M,e[38]=v,e[39]=O):O=e[39],O},Ee=t=>{let e=(0,G.c)(9),{onSuccess:s,packages:n}=t;if(n.length===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,r.jsx)(ee,{title:"No packages",description:"No packages are installed in this environment.",icon:(0,r.jsx)(V,{})}),e[0]=a):a=e[0],a}let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=(0,r.jsx)(Ne,{children:(0,r.jsxs)(Z,{children:[(0,r.jsx)(q,{children:"Name"}),(0,r.jsx)(q,{children:"Version"}),(0,r.jsx)(q,{})]})}),e[1]=i):i=e[1];let p;if(e[2]!==s||e[3]!==n){let a;e[5]===s?a=e[6]:(a=o=>(0,r.jsxs)(Z,{className:"group",onClick:async()=>{await je(`${o.name}==${o.version}`),ve({title:"Copied to clipboard"})},children:[(0,r.jsx)(B,{children:o.name}),(0,r.jsx)(B,{children:o.version}),(0,r.jsxs)(B,{className:"flex justify-end",children:[(0,r.jsx)(re,{packageName:o.name,onSuccess:s}),(0,r.jsx)(se,{packageName:o.name,onSuccess:s})]})]},o.name),e[5]=s,e[6]=a),p=n.map(a),e[2]=s,e[3]=n,e[4]=p}else p=e[4];let c;return e[7]===p?c=e[8]:(c=(0,r.jsxs)(Se,{className:"overflow-auto flex-1",children:[i,(0,r.jsx)(we,{children:p})]}),e[7]=p,e[8]=c),c},re=({packageName:t,tags:e,onSuccess:s})=>{let[n,i]=I.useState(!1),{addPackage:p}=W();return me()?null:(0,r.jsx)(te,{onClick:async()=>{var c;try{i(!0);let a=(c=e==null?void 0:e.find(l=>l.kind==="group"))==null?void 0:c.value,o=await p({package:t,upgrade:!0,group:a});o.success?(s(),F(t)):F(t,o.error)}finally{i(!1)}},loading:n,children:"Upgrade"})},se=({packageName:t,tags:e,onSuccess:s})=>{let[n,i]=I.useState(!1),{removePackage:p}=W();return(0,r.jsx)(te,{onClick:async()=>{var c;try{i(!0);let a=(c=e==null?void 0:e.find(l=>l.kind==="group"))==null?void 0:c.value,o=await p({package:t,group:a});o.success?(s(),X(t)):X(t,o.error)}finally{i(!1)}},loading:n,children:"Remove"})},$e=t=>{let e=(0,G.c)(18),{tree:s,error:n,onSuccess:i}=t,p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=new Set,e[0]=p):p=e[0];let[c,a]=I.useState(p),o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{a(new Set)},e[1]=o):o=e[1];let l;if(e[2]===s?l=e[3]:(l=[s],e[2]=s,e[3]=l),I.useEffect(o,l),n){let d;return e[4]===n?d=e[5]:(d=(0,r.jsx)(Y,{error:n}),e[4]=n,e[5]=d),d}if(!s){let d;return e[6]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsx)(R,{size:"medium",centered:!0}),e[6]=d):d=e[6],d}if(s.dependencies.length===0){let d;return e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsx)(ee,{title:"No dependencies",description:"No package dependencies found in this environment.",icon:(0,r.jsx)(V,{})}),e[7]=d):d=e[7],d}let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=d=>{a(f=>{let x=new Set(f);return x.has(d)?x.delete(d):x.add(d),x})},e[8]=m):m=e[8];let j=m,g;if(e[9]!==c||e[10]!==i||e[11]!==s.dependencies){let d;e[13]!==c||e[14]!==i?(d=(f,x)=>(0,r.jsx)("div",{className:"border-b",children:(0,r.jsx)(ne,{nodeId:`root-${x}`,node:f,level:0,isTopLevel:!0,expandedNodes:c,onToggle:j,onSuccess:i})},`${f.name}-${x}`),e[13]=c,e[14]=i,e[15]=d):d=e[15],g=s.dependencies.map(d),e[9]=c,e[10]=i,e[11]=s.dependencies,e[12]=g}else g=e[12];let h;return e[16]===g?h=e[17]:(h=(0,r.jsx)("div",{className:"flex-1 overflow-auto",children:(0,r.jsx)("div",{children:g})}),e[16]=g,e[17]=h),h},ne=t=>{let e=(0,G.c)(58),{nodeId:s,node:n,level:i,isTopLevel:p,expandedNodes:c,onToggle:a,onSuccess:o}=t,l=p===void 0?!1:p,m=n.dependencies.length>0,j;e[0]!==c||e[1]!==s?(j=c.has(s),e[0]=c,e[1]=s,e[2]=j):j=e[2];let g=j,h=l?0:16+i*16,d;e[3]!==m||e[4]!==s||e[5]!==a?(d=N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),m&&a(s))},e[3]=m,e[4]=s,e[5]=a,e[6]=d):d=e[6];let f=d,x;e[7]!==m||e[8]!==s||e[9]!==a?(x=N=>{N.stopPropagation(),m&&a(s)},e[7]=m,e[8]=s,e[9]=a,e[10]=x):x=e[10];let P=x,y=m&&"select-none",k=l?"px-2 py-0.5":"",b;e[11]!==y||e[12]!==k?(b=K("flex items-center group cursor-pointer text-sm whitespace-nowrap","hover:bg-(--slate-2) focus:bg-(--slate-2) focus:outline-hidden",y,k),e[11]=y,e[12]=k,e[13]=b):b=e[13];let v;e[14]!==h||e[15]!==l?(v=l?{}:{paddingLeft:`${h}px`},e[14]=h,e[15]=l,e[16]=v):v=e[16];let _=m?g:void 0,w;e[17]!==m||e[18]!==g?(w=m?g?(0,r.jsx)(ue,{className:"w-4 h-4 mr-2 shrink-0"}):(0,r.jsx)(fe,{className:"w-4 h-4 mr-2 shrink-0"}):(0,r.jsx)("div",{className:"w-4 mr-2 shrink-0"}),e[17]=m,e[18]=g,e[19]=w):w=e[19];let S;e[20]===n.name?S=e[21]:(S=(0,r.jsx)("span",{className:"font-medium truncate",children:n.name}),e[20]=n.name,e[21]=S);let u;e[22]===n.version?u=e[23]:(u=n.version&&(0,r.jsxs)("span",{className:"text-muted-foreground text-xs",children:["v",n.version]}),e[22]=n.version,e[23]=u);let C;e[24]!==S||e[25]!==u?(C=(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0 py-1.5",children:[S,u]}),e[24]=S,e[25]=u,e[26]=C):C=e[26];let E;e[27]===n.tags?E=e[28]:(E=n.tags.map(Te),e[27]=n.tags,e[28]=E);let $;e[29]===E?$=e[30]:($=(0,r.jsx)("div",{className:"flex items-center gap-1 ml-2",children:E}),e[29]=E,e[30]=$);let D;e[31]!==l||e[32]!==n.name||e[33]!==n.tags||e[34]!==o?(D=l&&(0,r.jsxs)("div",{className:"flex gap-1 invisible group-hover:visible",children:[(0,r.jsx)(re,{packageName:n.name,tags:n.tags,onSuccess:o}),(0,r.jsx)(se,{packageName:n.name,tags:n.tags,onSuccess:o})]}),e[31]=l,e[32]=n.name,e[33]=n.tags,e[34]=o,e[35]=D):D=e[35];let T;e[36]!==P||e[37]!==f||e[38]!==w||e[39]!==C||e[40]!==$||e[41]!==D||e[42]!==b||e[43]!==v||e[44]!==_?(T=(0,r.jsxs)("div",{className:b,style:v,onClick:P,onKeyDown:f,tabIndex:0,role:"treeitem","aria-selected":!1,"aria-expanded":_,children:[w,C,$,D]}),e[36]=P,e[37]=f,e[38]=w,e[39]=C,e[40]=$,e[41]=D,e[42]=b,e[43]=v,e[44]=_,e[45]=T):T=e[45];let A;e[46]!==c||e[47]!==m||e[48]!==g||e[49]!==i||e[50]!==n.dependencies||e[51]!==s||e[52]!==o||e[53]!==a?(A=m&&g&&(0,r.jsx)("div",{role:"group",children:n.dependencies.map((N,z)=>(0,r.jsx)(ne,{nodeId:`${s}-${z}`,node:N,level:i+1,isTopLevel:!1,expandedNodes:c,onToggle:a,onSuccess:o},`${N.name}-${z}`))}),e[46]=c,e[47]=m,e[48]=g,e[49]=i,e[50]=n.dependencies,e[51]=s,e[52]=o,e[53]=a,e[54]=A):A=e[54];let L;return e[55]!==T||e[56]!==A?(L=(0,r.jsxs)("div",{children:[T,A]}),e[55]=T,e[56]=A,e[57]=L):L=e[57],L};function De(t,e){return t==="list"?"list":e?t||"tree":"list"}function Te(t,e){return t.kind==="cycle"?(0,r.jsx)("div",{className:"items-center border px-2 py-0.5 text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground rounded-sm text-ellipsis block overflow-hidden max-w-fit font-medium border-orange-300 dark:border-orange-700 text-orange-700 dark:text-orange-300",title:"cycle",children:"cycle"},e):t.kind==="extra"?(0,r.jsx)("div",{className:"items-center border px-2 py-0.5 text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground rounded-sm text-ellipsis block overflow-hidden max-w-fit font-medium border-blue-300 dark:border-blue-700 text-blue-700 dark:text-blue-300",title:t.value,children:t.value},e):t.kind==="group"?(0,r.jsx)("div",{className:"items-center border px-2 py-0.5 text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground rounded-sm text-ellipsis block overflow-hidden max-w-fit font-medium border-green-300 dark:border-green-700 text-green-700 dark:text-green-300",title:t.value,children:t.value},e):null}export{Ce as default};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as e}from"./chunk-76Q3JFCE-BAZ3z-Fu.js";export{e as createPacketServices};
import{s as o}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as a}from"./invariant-CAG_dYON.js";var e=o(i(),1),r=(0,e.createContext)(null);const s=r.Provider;function n(){let t=(0,e.useContext)(r);return a(t!==null,"usePanelSection must be used within a PanelSectionProvider"),t}function u(){return n()==="sidebar"?"vertical":"horizontal"}export{u as n,n as r,s as t};
var TA=Object.defineProperty;var IA=(a,A,e)=>A in a?TA(a,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[A]=e;var GA=(a,A,e)=>IA(a,typeof A!="symbol"?A+"":A,e);import{s as cA}from"./chunk-LvLJmgfZ.js";import{d as _,i as gA,l as hA,u as j}from"./useEvent-BhXAndur.js";import{t as KA}from"./react-Bj1aDYRI.js";import{D as HA,Dt as UA,Et as VA,F as XA,L as JA,N as WA,Ot as qA,ai as zA,an as $A,en as Ae,ir as ee,l as ae,li as te,lr as dA,m as BA,vn as Ge,w as oe,y as se}from"./cells-DPp5cDaO.js";import{t as B}from"./compiler-runtime-B3qBwwSJ.js";import{n as re}from"./assertNever-CBU83Y6o.js";import{B as S,F as ne,I as ke,K as Re,L as ie,M as le,P as Ze,Q as uA,R as ce,S as ge,U as YA,X as he,Y as de,Z as Be,at as ue,et as Ye,it as me,nt as fe,q as pe}from"./utilities.esm-MA1QpjVT.js";import{a as mA,d as D}from"./hotkeys-BHHWjLlp.js";import{C as xe,b as we}from"./utils-YqBXNpsM.js";import{r as oA}from"./constants-B6Cb__3x.js";import{S as sA,b as F,c as De,h as ve,o as Ee,x}from"./config-Q0O7_stz.js";import{a as ye,d as Ce}from"./switch-dWLWbbtg.js";import{n as be}from"./ErrorBoundary-B9Ifj8Jf.js";import{t as Me}from"./useEventListener-Cb-RVVEn.js";import{t as Ne}from"./jsx-runtime-ZmTK25f3.js";import{t as rA}from"./button-CZ3Cs4qb.js";import{n as _e,t as f}from"./cn-BKtXLv3a.js";import{Y as fA}from"./JsonOutput-PE5ko4gi.js";import{t as je}from"./createReducer-B3rBsy4P.js";import{t as Se}from"./requests-B4FYHTZl.js";import{t as J}from"./createLucideIcon-BCdY6lG5.js";import{a as Fe,f as pA,i as xA,n as Qe,o as Le,s as Pe}from"./layout-_O8thjaV.js";import{m as Oe}from"./download-os8QlW6l.js";import{c as Te}from"./maps-D2_Mq1pZ.js";import{c as Ie}from"./markdown-renderer-DJy8ww5d.js";import{n as Ke}from"./spinner-DA8-7wQv.js";import{i as He,n as Ue}from"./readonly-python-code-WjTf6Pdd.js";import{t as Ve}from"./uuid-DXdzqzcr.js";import{t as nA}from"./use-toast-BDYuj3zG.js";import{i as Xe}from"./session-BOFn9QrD.js";import{s as Je,u as We}from"./Combination-BAEdC-rz.js";import{t as kA}from"./tooltip-CMQz28hC.js";import{a as qe,r as wA,t as ze}from"./mode-Bn7pdJvO.js";import{_ as $e,f as Aa,g as ea,h as DA,m as vA,p as EA,v as yA,y as aa}from"./alert-dialog-BW4srmS0.js";import{r as CA}from"./share-ipf2hrOh.js";import{r as bA}from"./errors-TZBmrJmc.js";import{t as ta}from"./RenderHTML-D-of_-s7.js";import{i as Ga}from"./cell-link-B9b7J8QK.js";import{t as oa}from"./error-banner-B9ts0mNl.js";import{n as sa}from"./useAsyncData-BMGLSTg8.js";import{t as ra}from"./requests-De5yEBc8.js";import{t as na}from"./ws-DcVtI9Wj.js";import{t as ka}from"./request-registry-C5_pVc8Y.js";import{n as Ra}from"./types-iYXk7c05.js";import{n as ia}from"./runs-YUGrkyfE.js";var la=J("hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]),MA=J("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]),Za=J("square-arrow-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}]]),ca=J("unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]),ga=B(),r=cA(Ne(),1);const ha=a=>{let A=(0,ga.c)(10),{reason:e,canTakeover:t}=a,o=t===void 0?!1:t,G=da;if(o){let n;A[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)("div",{className:"flex justify-between",children:(0,r.jsx)("span",{className:"font-bold text-xl flex items-center mb-2",children:"Notebook already connected"})}),A[0]=n):n=A[0];let k;A[1]===e?k=A[2]:(k=(0,r.jsx)("span",{children:e}),A[1]=e,A[2]=k);let R;A[3]===o?R=A[4]:(R=o&&(0,r.jsxs)(rA,{onClick:G,variant:"outline","data-testid":"takeover-button",className:"shrink-0",children:[(0,r.jsx)(Za,{className:"w-4 h-4 mr-2"}),"Take over session"]}),A[3]=o,A[4]=R);let i;return A[5]!==k||A[6]!==R?(i=(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsxs)(oa,{kind:"info",className:"mt-10 flex flex-col rounded p-3 max-w-[800px] mx-4",children:[n,(0,r.jsxs)("div",{className:"flex justify-between items-end text-base gap-20",children:[k,R]})]})}),A[5]=k,A[6]=R,A[7]=i):i=A[7],i}let s;return A[8]===e?s=A[9]:(s=(0,r.jsx)("div",{className:"font-mono text-center text-base text-(--red-11)",children:(0,r.jsx)("p",{children:e})}),A[8]=e,A[9]=s),s};async function da(){try{let a=new URL(window.location.href).searchParams;await ye.post(`/kernel/takeover?${a.toString()}`,{}),CA()}catch(a){nA({title:"Failed to take over session",description:bA(a),variant:"danger"})}}var Ba=B(),u=cA(KA(),1);const ua=a=>{let A=(0,Ba.c)(8),{connection:e,className:t,children:o}=a,G;A[0]!==e.canTakeover||A[1]!==e.reason||A[2]!==e.state?(G=e.state===x.CLOSED&&(0,r.jsx)(ha,{reason:e.reason,canTakeover:e.canTakeover}),A[0]=e.canTakeover,A[1]=e.reason,A[2]=e.state,A[3]=G):G=A[3];let s;return A[4]!==o||A[5]!==t||A[6]!==G?(s=(0,r.jsxs)("div",{className:t,children:[o,G]}),A[4]=o,A[5]=t,A[6]=G,A[7]=s):s=A[7],s};var Ya=B();const ma=a=>{let A=(0,Ya.c)(10),{title:e}=a,[t,o]=(0,u.useState)(e),[G,s]=(0,u.useState)(!0),n,k;A[0]!==t||A[1]!==e?(n=()=>{if(e!==t){s(!1);let g=setTimeout(()=>{o(e),s(!0)},300);return()=>clearTimeout(g)}},k=[e,t],A[0]=t,A[1]=e,A[2]=n,A[3]=k):(n=A[2],k=A[3]),(0,u.useEffect)(n,k);let R;A[4]===Symbol.for("react.memo_cache_sentinel")?(R=(0,r.jsx)(Ke,{className:"size-20 animate-spin text-primary","data-testid":"large-spinner",strokeWidth:1}),A[4]=R):R=A[4];let i=G?"opacity-100":"opacity-0",l;A[5]===i?l=A[6]:(l=f("mt-2 text-muted-foreground font-semibold text-lg transition-opacity duration-300",i),A[5]=i,A[6]=l);let c;return A[7]!==t||A[8]!==l?(c=(0,r.jsxs)("div",{className:"flex flex-col h-full flex-1 items-center justify-center p-4",children:[R,(0,r.jsx)("div",{className:l,children:t})]}),A[7]=t,A[8]=l,A[9]=c):c=A[9],c};var RA=B();const fa=a=>{let A=(0,RA.c)(2),{children:e}=a;if(!sA())return e;let t;return A[0]===e?t=A[1]:(t=(0,r.jsx)(pa,{children:e}),A[0]=e,A[1]=t),t};var pa=a=>{let A=(0,RA.c)(3),{children:e}=a,t;A[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],A[0]=t):t=A[0];let{isPending:o,error:G}=sa(wa,t),s=j(de);if(o){let n;return A[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)(NA,{}),A[1]=n):n=A[1],n}if(!s&&ze()==="read"&&xa()){let n;return A[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)(NA,{}),A[2]=n):n=A[2],n}if(G)throw G;return e};function xa(){return Xe(oA.showCode,"false")||!gA.get(Ce)}const NA=a=>{let A=(0,RA.c)(2),e=j(he),t;return A[0]===e?t=A[1]:(t=(0,r.jsx)(ma,{title:e}),A[0]=e,A[1]=t),t};async function wa(){return await Re.INSTANCE.initialized.promise,!0}var Da={idle:"./favicon.ico",success:"data:image/x-icon;base64,AAABAAEAMDAAAAEACACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAAAkAAAAAAAAAAAAAAAEAAAABAAAAAAAAXXQAAFd3AwBWeAQAVngEAFd4AwBXeAQAVnkEAFh3AwBXdwQAVXcGAFd4BQBXeAQAWHgEAFd6AwBXeAMAVnkEAFZ5AwBXdwQAV3cFAFd4BABYeAQAV3gEAFh4BABXeAQA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYYGAYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcYGBgYGBgYGBgYGBgYGAcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGBgYGBgYGBgYGBgYGBgYGBgYCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAsYGBgYGBgYDA0OChkZGRkKDg0MGBgYGBgYGAsAAAAAAAAAAAAAAAAAAAAAAAAAAxgYGBgYGA8QGRkZGRkZGRkZGRkZEA8YGBgYGBgDAAAAAAAAAAAAAAAAAAAAAAARGBgYGBgSChkZGRkZGRkZGRkZGRkZGRkKEhgYGBgYEQAAAAAAAAAAAAAAAAAAAAMYGBgYGBMZGRkZGRkZGRkZGRkZGRkZGRkZGRMYGBgYGAMAAAAAAAAAAAAAAAAACxgYGBgUEBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkQFBgYGBgLAAAAAAAAAAAAAAAKGBgYGBQKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChQYGBgYCgAAAAAAAAAAAAAEGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYBAAAAAAAAAAAAAgYGBgYExkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkTGBgYGAgAAAAAAAAAAAkYGBgSGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZEhgYGAkAAAAAAAAAAhgYGBgKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChgYGBgCAAAAAAAABxgYGA8ZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGQ8YGBgHAAAAAAABGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYAQAAAAACGBgYDBkZGRkZGRkZGRkZGRkXFhYVGRkZGRkZGRkZGRkZGRkZGRkMGBgYAgAAAAADGBgYDRkZGRkZGRkZGRkZGRcYGBgYFxkZGRkZGRkZGRkZGRkZGRkNGBgYAwAAAAAEGBgYDhkZGRkZGRkZGRkZFxgYGBgYGBcZGRkZGRkZGRkZGRkZGRkOGBgYBAAAAAAFGBgYChkZGRkZGRkZGRkXGBgYGBgYGBgXGRkZGRkZGRkZGRkZGRkKGBgYBQAAAAAGGBgYGRkZGRkZGRkZGRUYGBgYGBgYGBgYFxkZGRkZGRkZGRkZGRkZGBgYBgAAAAAYGBgYGRkZGRkZGRkZGRYYGBgYFxcYGBgYGBcZGRkZGRkZGRkZGRkZGBgYGAAAAAAYGBgYGRkZGRkZGRkZGRYYGBgXGRkXGBgYGBgXGRkZGRkZGRkZGRkZGBgYGAAAAAAGGBgYGRkZGRkZGRkZGRUWFhcZGRkZFxgYGBgYFxkZGRkZGRkZGRkZGBgYBgAAAAAFGBgYChkZGRkZGRkZGRkZGRkZGRkZGRcYGBgYGBcZGRkZGRkZGRkKGBgYBQAAAAAEGBgYDhkZGRkZGRkZGRkZGRkZGRkZGRkXGBgYGBYZGRkZGRkZGRkOGBgYBAAAAAADGBgYDRkZGRkZGRkZGRkZGRkZGRkZGRkZFxgYGBYZGRkZGRkZGRkNGBgYAwAAAAACGBgYDBkZGRkZGRkZGRkZGRkZGRkZGRkZGRUWFhUZGRkZGRkZGRkMGBgYAgAAAAABGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYAQAAAAAABxgYGA8ZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGQ8YGBgHAAAAAAAAAhgYGBgKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChgYGBgCAAAAAAAAAAkYGBgSGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZEhgYGAkAAAAAAAAAAAgYGBgYExkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkTGBgYGAgAAAAAAAAAAAAEGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYBAAAAAAAAAAAAAAKGBgYGBQKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChQYGBgYCgAAAAAAAAAAAAAACxgYGBgUEBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkQFBgYGBgLAAAAAAAAAAAAAAAAAAMYGBgYGBMZGRkZGRkZGRkZGRkZGRkZGRkZGRMYGBgYGAMAAAAAAAAAAAAAAAAAAAARGBgYGBgSChkZGRkZGRkZGRkZGRkZGRkKEhgYGBgYEQAAAAAAAAAAAAAAAAAAAAAAAxgYGBgYGA8QGRkZGRkZGRkZGRkZEA8YGBgYGBgDAAAAAAAAAAAAAAAAAAAAAAAAAAsYGBgYGBgYDA0OChkZGRkKDg0MGBgYGBgYGAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGBgYGBgYGBgYGBgYGBgYGBgYCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcYGBgYGBgYGBgYGBgYGAcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYYGAYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP//gAH//wAA//4AAH//AAD/+AAAH/8AAP/gAAAH/wAA/8AAAAP/AAD/gAAAAf8AAP8AAAAA/wAA/gAAAAB/AAD8AAAAAD8AAPgAAAAAHwAA+AAAAAAfAADwAAAAAA8AAPAAAAAADwAA4AAAAAAHAADgAAAAAAcAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADgAAAAAAcAAOAAAAAABwAA8AAAAAAPAADwAAAAAA8AAPgAAAAAHwAA+AAAAAAfAAD8AAAAAD8AAP4AAAAAfwAA/wAAAAD/AAD/gAAAAf8AAP/AAAAD/wAA/+AAAAf/AAD/+AAAH/8AAP/+AAB//wAA//+AAf//AAD///////8AAP///////wAA",running:"data:image/x-icon;base64,AAABAAEAMDAAAAEACACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAAAkAAAAAAAAAAAAAAAEAAAABAAAAAAAA0YsAAMWEAwDHgwIAx4QBAMeEAgDGhAIAyIUBAMaFAwDGhAIAxoIAAMaFAgDHhAIAx4QCAMiFAwDHhAIAx4YAAMaFAgDHhQEAxoMCAMeEAgDHgwQAx4QDAMeDAgDHhAIA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYYGAYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcYGBgYGBgYGBgYGBgYGAcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGBgYGBgYGBgYGBgYGBgYGBgYCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAsYGBgYGBgYDA0OChkZGRkKDg0MGBgYGBgYGAsAAAAAAAAAAAAAAAAAAAAAAAAAAxgYGBgYGA8QGRkZGRkZGRkZGRkZEA8YGBgYGBgDAAAAAAAAAAAAAAAAAAAAAAARGBgYGBgSChkZGRkZGRkZGRkZGRkZGRkKEhgYGBgYEQAAAAAAAAAAAAAAAAAAAAMYGBgYGBMZGRkZGRkZGRkZGRkZGRkZGRkZGRMYGBgYGAMAAAAAAAAAAAAAAAAACxgYGBgUEBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkQFBgYGBgLAAAAAAAAAAAAAAAKGBgYGBQKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChQYGBgYCgAAAAAAAAAAAAAEGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYBAAAAAAAAAAAAAgYGBgYExkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkTGBgYGAgAAAAAAAAAAAkYGBgSGRkZGRkZGRkZFRgWFxkZGRkZGRkZGRkZGRkZGRkZEhgYGAkAAAAAAAAAAhgYGBgKGRkZGRkZGRkZFhgYGBYVGRkZGRkZGRkZGRkZGRkZChgYGBgCAAAAAAAABxgYGA8ZGRkZGRkZGRkZGBgYGBgYFxkZGRkZGRkZGRkZGRkZGQ8YGBgHAAAAAAABGBgYGBAZGRkZGRkZGRkZGBgYGBgYGBYVGRkZGRkZGRkZGRkZGRAYGBgYAQAAAAACGBgYDBkZGRkZGRkZGRkZGBgYGBgYGBgYFxkZGRkZGRkZGRkZGRkMGBgYAgAAAAADGBgYDRkZGRkZGRkZGRkZGBgYGBgYGBgYGBYVGRkZGRkZGRkZGRkNGBgYAwAAAAAEGBgYDhkZGRkZGRkZGRkZGBgYGBUWGBgYGBgYFxkZGRkZGRkZGRkOGBgYBAAAAAAFGBgYChkZGRkZGRkZGRkZGBgYGBkZFxgYGBgYGBYVGRkZGRkZGRkKGBgYBQAAAAAGGBgYGRkZGRkZGRkZGRkZGBgYGBkZGRUWGBgYGBgYFxkZGRkZGRkZGBgYBgAAAAAYGBgYGRkZGRkZGRkZGRkZGBgYGBkZGRkZFxgYGBgYFxkZGRkZGRkZGBgYGAAAAAAYGBgYGRkZGRkZGRkZGRkZGBgYGBkZGRkZFxgYGBgYFhkZGRkZGRkZGBgYGAAAAAAGGBgYGRkZGRkZGRkZGRkZGBgYGBkZGRkXGBgYGBgYFRkZGRkZGRkZGBgYBgAAAAAFGBgYChkZGRkZGRkZGRkZGBgYGBkZFxgYGBgYGBcZGRkZGRkZGRkKGBgYBQAAAAAEGBgYDhkZGRkZGRkZGRkZGBgYGBkXGBgYGBgYFxkZGRkZGRkZGRkOGBgYBAAAAAADGBgYDRkZGRkZGRkZGRkZGBgYGBgYGBgYGBcZGRkZGRkZGRkZGRkNGBgYAwAAAAACGBgYDBkZGRkZGRkZGRkZGBgYGBgYGBgYFxkZGRkZGRkZGRkZGRkMGBgYAgAAAAABGBgYGBAZGRkZGRkZGRkZGBgYGBgYGBcZGRkZGRkZGRkZGRkZGRAYGBgYAQAAAAAABxgYGA8ZGRkZGRkZGRkZGBgYGBgYFxkZGRkZGRkZGRkZGRkZGQ8YGBgHAAAAAAAAAhgYGBgKGRkZGRkZGRkZFhgYGBcZGRkZGRkZGRkZGRkZGRkZChgYGBgCAAAAAAAAAAkYGBgSGRkZGRkZGRkZFRYWFxkZGRkZGRkZGRkZGRkZGRkZEhgYGAkAAAAAAAAAAAgYGBgYExkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkTGBgYGAgAAAAAAAAAAAAEGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYBAAAAAAAAAAAAAAKGBgYGBQKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChQYGBgYCgAAAAAAAAAAAAAACxgYGBgUEBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkQFBgYGBgLAAAAAAAAAAAAAAAAAAMYGBgYGBMZGRkZGRkZGRkZGRkZGRkZGRkZGRMYGBgYGAMAAAAAAAAAAAAAAAAAAAARGBgYGBgSChkZGRkZGRkZGRkZGRkZGRkKEhgYGBgYEQAAAAAAAAAAAAAAAAAAAAAAAxgYGBgYGA8QGRkZGRkZGRkZGRkZEA8YGBgYGBgDAAAAAAAAAAAAAAAAAAAAAAAAAAsYGBgYGBgYDA0OChkZGRkKDg0MGBgYGBgYGAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGBgYGBgYGBgYGBgYGBgYGBgYCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcYGBgYGBgYGBgYGBgYGAcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYYGAYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP//gAH//wAA//4AAH//AAD/+AAAH/8AAP/gAAAH/wAA/8AAAAP/AAD/gAAAAf8AAP8AAAAA/wAA/gAAAAB/AAD8AAAAAD8AAPgAAAAAHwAA+AAAAAAfAADwAAAAAA8AAPAAAAAADwAA4AAAAAAHAADgAAAAAAcAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADgAAAAAAcAAOAAAAAABwAA8AAAAAAPAADwAAAAAA8AAPgAAAAAHwAA+AAAAAAfAAD8AAAAAD8AAP4AAAAAfwAA/wAAAAD/AAD/gAAAAf8AAP/AAAAD/wAA/+AAAAf/AAD/+AAAH/8AAP/+AAB//wAA//+AAf//AAD///////8AAP///////wAA",error:"data:image/x-icon;base64,AAABAAEAMDAAAAEACACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAAAkAAAAAAAAAAAAAAAEAAAABAAAAAAAALi7oACcn2wAlJdsAJibcACYm3AAmJtsAJyfdACUl3QAmJtsAKCjdACUl3AAmJtwAJyfcACYm3AAoKNcAJibcACcn3AAmJt0AJibcACUl3AAmJtwAKCjbACcn3AAmJtsAJibcAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYZGQYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcZGRkZGRkZGRkZGRkZGQcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGRkZGRkZGRkZGRkZGRkZGRkZCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAsZGRkZGRkZDA0ODxoaGhoPDg0MGRkZGRkZGQsAAAAAAAAAAAAAAAAAAAAAAAAAAxkZGRkZGRARGhoaGhoaGhoaGhoaERAZGRkZGRkDAAAAAAAAAAAAAAAAAAAAAAASGRkZGRkTDxoaGhoaGhoaGhoaGhoaGhoPExkZGRkZEgAAAAAAAAAAAAAAAAAAAAMZGRkZGRQaGhoaGhoaGhoaGhoaGhoaGhoaGhQZGRkZGQMAAAAAAAAAAAAAAAAACxkZGRkVERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoRFRkZGRkLAAAAAAAAAAAAAAAKGRkZGRUPGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaDxUZGRkZCgAAAAAAAAAAAAAEGRkZGREaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhEZGRkZBAAAAAAAAAAAAAgZGRkZFBoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoUGRkZGQgAAAAAAAAAAAkZGRkTGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaExkZGQkAAAAAAAAAAhkZGRkPGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaDxkZGRkCAAAAAAAABxkZGRAaGhoaGhoaGhYXFxYaGhoaGhoaGhgXFxYaGhoaGhoaGhAZGRkHAAAAAAABGRkZGREaGhoaGhoaGhcZGRkYGhoaGhoaGBkZGRcaGhoaGhoaGhEZGRkZAQAAAAACGRkZDBoaGhoaGhoaGhcZGRkZGBoaGhoYGRkZGRcaGhoaGhoaGhoMGRkZAgAAAAADGRkZDRoaGhoaGhoaGhgZGRkZGRgaGhgZGRkZGRYaGhoaGhoaGhoNGRkZAwAAAAAEGRkZDhoaGhoaGhoaGhoYGRkZGRkYGBkZGRkZGBoaGhoaGhoaGhoOGRkZBAAAAAAFGRkZDxoaGhoaGhoaGhoaGBkZGRkZGRkZGRkYGhoaGhoaGhoaGhoPGRkZBQAAAAAGGRkZGhoaGhoaGhoaGhoaGhgZGRkZGRkZGRgaGhoaGhoaGhoaGhoaGRkZBgAAAAAZGRkZGhoaGhoaGhoaGhoaGhoYGRkZGRkZGBoaGhoaGhoaGhoaGhoaGRkZGQAAAAAZGRkZGhoaGhoaGhoaGhoaGhoYGRkZGRkZGBoaGhoaGhoaGhoaGhoaGRkZGQAAAAAGGRkZGhoaGhoaGhoaGhoaGhgZGRkZGRkZGRgaGhoaGhoaGhoaGhoaGRkZBgAAAAAFGRkZDxoaGhoaGhoaGhoaGBkZGRkZGRkZGRkYGhoaGhoaGhoaGhoPGRkZBQAAAAAEGRkZDhoaGhoaGhoaGhoYGRkZGRkYGBkZGRkZGBoaGhoaGhoaGhoOGRkZBAAAAAADGRkZDRoaGhoaGhoaGhYZGRkZGRgaGhgZGRkZGRgaGhoaGhoaGhoNGRkZAwAAAAACGRkZDBoaGhoaGhoaGhcZGRkZGBoaGhoYGRkZGRcaGhoaGhoaGhoMGRkZAgAAAAABGRkZGREaGhoaGhoaGhcZGRkYGhoaGhoaGBkZGRcaGhoaGhoaGhEZGRkZAQAAAAAABxkZGRAaGhoaGhoaGhYXFxgaGhoaGhoaGhYXFxYaGhoaGhoaGhAZGRkHAAAAAAAAAhkZGRkPGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaDxkZGRkCAAAAAAAAAAkZGRkTGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaExkZGQkAAAAAAAAAAAgZGRkZFBoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoUGRkZGQgAAAAAAAAAAAAEGRkZGREaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhEZGRkZBAAAAAAAAAAAAAAKGRkZGRUPGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaDxUZGRkZCgAAAAAAAAAAAAAACxkZGRkVERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoRFRkZGRkLAAAAAAAAAAAAAAAAAAMZGRkZGRQaGhoaGhoaGhoaGhoaGhoaGhoaGhQZGRkZGQMAAAAAAAAAAAAAAAAAAAASGRkZGRkTDxoaGhoaGhoaGhoaGhoaGhoPExkZGRkZEgAAAAAAAAAAAAAAAAAAAAAAAxkZGRkZGRARGhoaGhoaGhoaGhoaERAZGRkZGRkDAAAAAAAAAAAAAAAAAAAAAAAAAAsZGRkZGRkZDA0ODxoaGhoPDg0MGRkZGRkZGQsAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGRkZGRkZGRkZGRkZGRkZGRkZCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcZGRkZGRkZGRkZGRkZGQcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYZGQYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP//gAH//wAA//4AAH//AAD/+AAAH/8AAP/gAAAH/wAA/8AAAAP/AAD/gAAAAf8AAP8AAAAA/wAA/gAAAAB/AAD8AAAAAD8AAPgAAAAAHwAA+AAAAAAfAADwAAAAAA8AAPAAAAAADwAA4AAAAAAHAADgAAAAAAcAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADgAAAAAAcAAOAAAAAABwAA8AAAAAAPAADwAAAAAA8AAPgAAAAAHwAA+AAAAAAfAAD8AAAAAD8AAP4AAAAAfwAA/wAAAAD/AAD/gAAAAf8AAP/AAAAD/wAA/+AAAAf/AAD/+AAAH/8AAP/+AAB//wAA//+AAf//AAD///////8AAP///////wAA"};async function Q(a){return Da[a]}function va(a){if(document.visibilityState==="visible")return;let A=async()=>{a===0?new Notification("Execution completed",{body:"Your notebook run completed successfully.",icon:await Q("success")}):new Notification("Execution failed",{body:`Your notebook run encountered ${a} error(s).`,icon:await Q("error")})};!("Notification"in window)||Notification.permission==="denied"||(Notification.permission==="granted"?A():Notification.permission==="default"&&Notification.requestPermission().then(e=>{e==="granted"&&A()}))}const Ea=a=>{let{isRunning:A}=a,e=HA(),t=document.querySelector("link[rel~='icon']");t||(t=document.createElement("link"),t.rel="icon",document.getElementsByTagName("head")[0].append(t)),(0,u.useEffect)(()=>{!A&&t.href.includes("favicon")||(async()=>{let G;if(G=A?"running":e.length===0?"success":"error",t.href=await Q(G),!document.hasFocus())return;let s=setTimeout(async()=>{t.href=await Q("idle")},3e3);return()=>clearTimeout(s)})()},[A,e,t]);let o=ge(A)??A;return(0,u.useEffect)(()=>{o&&!A&&va(e.length)},[e,o,A]),Me(window,"focus",async G=>{A||(t.href=await Q("idle"))}),null};function ya(){let{cellRuntime:a}=gA.get(se),A=mA.entries(a).find(([e,t])=>t.status==="running");A&&Ga(A[0],"focus")}var L=B();const Ca=a=>{let A=(0,L.c)(22),{connection:e,isRunning:t}=a,{mode:o}=j(qe),G=e.state===x.CLOSED,s=e.state===x.OPEN,n;A[0]!==e.canTakeover||A[1]!==G?(n=G&&!e.canTakeover&&(0,r.jsx)(_a,{}),A[0]=e.canTakeover,A[1]=G,A[2]=n):n=A[2];let k=o==="read"?"fixed":"absolute",R;A[3]===k?R=A[4]:(R=f("z-50 top-4 left-4",k),A[3]=k,A[4]=R);let i;A[5]!==s||A[6]!==t?(i=s&&t&&(0,r.jsx)(Na,{}),A[5]=s,A[6]=t,A[7]=i):i=A[7];let l;A[8]!==e.canTakeover||A[9]!==G?(l=G&&!e.canTakeover&&(0,r.jsx)(ba,{}),A[8]=e.canTakeover,A[9]=G,A[10]=l):l=A[10];let c;A[11]!==e.canTakeover||A[12]!==G?(c=G&&e.canTakeover&&(0,r.jsx)(Ma,{}),A[11]=e.canTakeover,A[12]=G,A[13]=c):c=A[13];let g;A[14]!==R||A[15]!==i||A[16]!==l||A[17]!==c?(g=(0,r.jsxs)("div",{className:R,children:[i,l,c]}),A[14]=R,A[15]=i,A[16]=l,A[17]=c,A[18]=g):g=A[18];let h;return A[19]!==n||A[20]!==g?(h=(0,r.jsxs)(r.Fragment,{children:[n,g]}),A[19]=n,A[20]=g,A[21]=h):h=A[21],h};var iA="print:hidden pointer-events-auto hover:cursor-pointer",ba=()=>{let a=(0,L.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(kA,{content:"App disconnected",children:(0,r.jsx)("div",{className:iA,children:(0,r.jsx)(ca,{className:"w-[25px] h-[25px] text-(--red-11)"})})}),a[0]=A):A=a[0],A},Ma=()=>{let a=(0,L.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(kA,{content:"Notebook locked",children:(0,r.jsx)("div",{className:iA,children:(0,r.jsx)(He,{className:"w-[25px] h-[25px] text-(--blue-11)"})})}),a[0]=A):A=a[0],A},Na=()=>{let a=(0,L.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(kA,{content:"Jump to running cell",side:"right",children:(0,r.jsx)("div",{className:iA,"data-testid":"loading-indicator",onClick:ya,children:(0,r.jsx)(la,{className:"running-app-icon",size:30,strokeWidth:1})})}),a[0]=A):A=a[0],A},_a=()=>{let a=(0,L.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"noise"}),(0,r.jsx)("div",{className:"disconnected-gradient"})]}),a[0]=A):A=a[0],A},C=B(),ja=$e,Sa=aa,Fa=Je(ea),_A=u.forwardRef((a,A)=>{let e=(0,C.c)(9),t,o;e[0]===a?(t=e[1],o=e[2]):({className:t,...o}=a,e[0]=a,e[1]=t,e[2]=o);let G;e[3]===t?G=e[4]:(G=f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),e[3]=t,e[4]=G);let s;return e[5]!==o||e[6]!==A||e[7]!==G?(s=(0,r.jsx)(DA,{className:G,...o,ref:A}),e[5]=o,e[6]=A,e[7]=G,e[8]=s):s=e[8],s});_A.displayName=DA.displayName;var Qa=_e("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),jA=u.forwardRef((a,A)=>{let e=(0,C.c)(15),t,o,G,s;e[0]===a?(t=e[1],o=e[2],G=e[3],s=e[4]):({side:s,className:o,children:t,...G}=a,e[0]=a,e[1]=t,e[2]=o,e[3]=G,e[4]=s);let n=s===void 0?"right":s,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=(0,r.jsx)(_A,{}),e[5]=k):k=e[5];let R;e[6]!==o||e[7]!==n?(R=f(Qa({side:n}),o),e[6]=o,e[7]=n,e[8]=R):R=e[8];let i;e[9]===Symbol.for("react.memo_cache_sentinel")?(i=(0,r.jsxs)(Aa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,r.jsx)(Te,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]}),e[9]=i):i=e[9];let l;return e[10]!==t||e[11]!==G||e[12]!==A||e[13]!==R?(l=(0,r.jsx)(Fa,{children:(0,r.jsxs)(We,{children:[k,(0,r.jsxs)(EA,{ref:A,className:R,...G,children:[t,i]})]})}),e[10]=t,e[11]=G,e[12]=A,e[13]=R,e[14]=l):l=e[14],l});jA.displayName=EA.displayName;var La=a=>{let A=(0,C.c)(8),e,t;A[0]===a?(e=A[1],t=A[2]):({className:e,...t}=a,A[0]=a,A[1]=e,A[2]=t);let o;A[3]===e?o=A[4]:(o=f("flex flex-col space-y-2 text-center sm:text-left",e),A[3]=e,A[4]=o);let G;return A[5]!==t||A[6]!==o?(G=(0,r.jsx)("div",{className:o,...t}),A[5]=t,A[6]=o,A[7]=G):G=A[7],G};La.displayName="SheetHeader";var Pa=a=>{let A=(0,C.c)(8),e,t;A[0]===a?(e=A[1],t=A[2]):({className:e,...t}=a,A[0]=a,A[1]=e,A[2]=t);let o;A[3]===e?o=A[4]:(o=f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),A[3]=e,A[4]=o);let G;return A[5]!==t||A[6]!==o?(G=(0,r.jsx)("div",{className:o,...t}),A[5]=t,A[6]=o,A[7]=G):G=A[7],G};Pa.displayName="SheetFooter";var Oa=u.forwardRef((a,A)=>{let e=(0,C.c)(9),t,o;e[0]===a?(t=e[1],o=e[2]):({className:t,...o}=a,e[0]=a,e[1]=t,e[2]=o);let G;e[3]===t?G=e[4]:(G=f("text-lg font-semibold text-foreground",t),e[3]=t,e[4]=G);let s;return e[5]!==o||e[6]!==A||e[7]!==G?(s=(0,r.jsx)(yA,{ref:A,className:G,...o}),e[5]=o,e[6]=A,e[7]=G,e[8]=s):s=e[8],s});Oa.displayName=yA.displayName;var Ta=u.forwardRef((a,A)=>{let e=(0,C.c)(9),t,o;e[0]===a?(t=e[1],o=e[2]):({className:t,...o}=a,e[0]=a,e[1]=t,e[2]=o);let G;e[3]===t?G=e[4]:(G=f("text-sm text-muted-foreground",t),e[3]=t,e[4]=G);let s;return e[5]!==o||e[6]!==A||e[7]!==G?(s=(0,r.jsx)(vA,{ref:A,className:G,...o}),e[5]=o,e[6]=A,e[7]=G,e[8]=s):s=e[8],s});Ta.displayName=vA.displayName;var Ia=B();const lA=(0,u.memo)(()=>{let a=(0,Ia.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(me,{name:uA.SIDEBAR}),a[0]=A):A=a[0],A});lA.displayName="SidebarSlot";var Ka=B();const Ha=a=>{let A=(0,Ka.c)(6),{openWidth:e}=a,t;A[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)(Sa,{className:"lg:hidden",asChild:!0,children:(0,r.jsx)(rA,{variant:"ghost",className:"bg-background",children:(0,r.jsx)(MA,{className:"w-5 h-5"})})}),A[0]=t):t=A[0];let o;A[1]===e?o=A[2]:(o={maxWidth:e},A[1]=e,A[2]=o);let G;A[3]===Symbol.for("react.memo_cache_sentinel")?(G=(0,r.jsx)(lA,{}),A[3]=G):G=A[3];let s;return A[4]===o?s=A[5]:(s=(0,r.jsxs)(ja,{children:[t,(0,r.jsx)(jA,{className:"w-full px-3 h-full flex flex-col overflow-y-auto",style:o,side:"left",children:G})]}),A[4]=o,A[5]=s),s};var Ua=B();const Va=a=>{let A=(0,Ua.c)(7),{isOpen:e,toggle:t}=a,o=e?"rotate-0":"rotate-180",G;A[0]===o?G=A[1]:(G=f("h-5 w-5 transition-transform ease-in-out duration-700",o),A[0]=o,A[1]=G);let s;A[2]===G?s=A[3]:(s=(0,r.jsx)(Oe,{className:G}),A[2]=G,A[3]=s);let n;return A[4]!==s||A[5]!==t?(n=(0,r.jsx)("div",{className:"invisible lg:visible absolute top-[12px] right-[16px] z-20",children:(0,r.jsx)(rA,{onClick:t,className:"w-10 h-8",variant:"ghost",size:"icon",children:s})}),A[4]=s,A[5]=t,A[6]=n):n=A[6],n};var Xa=B();const Ja=a=>{let A=(0,Xa.c)(11),{isOpen:e,toggle:t,width:o}=a,G=e?o:ne,s;A[0]===G?s=A[1]:(s={width:G},A[0]=G,A[1]=s);let n;A[2]===Symbol.for("react.memo_cache_sentinel")?(n=f("app-sidebar auto-collapse-nav","top-0 left-0 z-20 h-full hidden lg:block relative transition-[width] ease-in-out duration-300"),A[2]=n):n=A[2];let k;A[3]!==e||A[4]!==t?(k=(0,r.jsx)(Va,{isOpen:e,toggle:t}),A[3]=e,A[4]=t,A[5]=k):k=A[5];let R;A[6]===Symbol.for("react.memo_cache_sentinel")?(R=(0,r.jsx)("div",{className:"relative h-full flex flex-col px-3 pb-16 pt-14 overflow-y-auto shadow-sm border-l",children:(0,r.jsx)(lA,{})}),A[6]=R):R=A[6];let i;return A[7]!==e||A[8]!==s||A[9]!==k?(i=(0,r.jsxs)("aside",{"data-expanded":e,style:s,className:n,children:[k,R]}),A[7]=e,A[8]=s,A[9]=k,A[10]=i):i=A[10],i};var Wa=B();const qa=a=>{let A=(0,Wa.c)(15),{children:e}=a,[t,o]=hA(ie),{isOpen:G,width:s}=t;if(ue(uA.SIDEBAR).length===0)return e;let n;A[0]===s?n=A[1]:(n=ke(s),A[0]=s,A[1]=n);let k=n,R;A[2]!==o||A[3]!==G?(R=()=>o({type:"toggle",isOpen:!G}),A[2]=o,A[3]=G,A[4]=R):R=A[4];let i;A[5]!==G||A[6]!==k||A[7]!==R?(i=(0,r.jsx)(Ja,{isOpen:G,width:k,toggle:R}),A[5]=G,A[6]=k,A[7]=R,A[8]=i):i=A[8];let l;A[9]===k?l=A[10]:(l=(0,r.jsx)("div",{className:"absolute top-3 left-4 flex items-center z-50",children:(0,r.jsx)(Ha,{openWidth:k})}),A[9]=k,A[10]=l);let c;return A[11]!==e||A[12]!==i||A[13]!==l?(c=(0,r.jsxs)("div",{className:"inset-0 absolute flex",children:[i,l,e]}),A[11]=e,A[12]=i,A[13]=l,A[14]=c):c=A[14],c};var za=B();const $a=a=>{let A=(0,za.c)(17),{width:e,connection:t,isRunning:o,children:G}=a,s=t.state,n;A[0]===o?n=A[1]:(n=(0,r.jsx)(Ea,{isRunning:o}),A[0]=o,A[1]=n);let k;A[2]!==t||A[3]!==o?(k=(0,r.jsx)(Ca,{connection:t,isRunning:o}),A[2]=t,A[3]=o,A[4]=k):k=A[4];let R;A[5]!==s||A[6]!==e?(R=f("mathjax_ignore",De(s)&&"disconnected","bg-background w-full h-full text-textColor","flex flex-col overflow-y-auto",e==="full"&&"config-width-full",e==="columns"?"overflow-x-auto":"overflow-x-hidden","print:height-fit"),A[5]=s,A[6]=e,A[7]=R):R=A[7];let i;A[8]!==G||A[9]!==s||A[10]!==R||A[11]!==e?(i=(0,r.jsx)(fa,{children:(0,r.jsx)(qa,{children:(0,r.jsx)("div",{id:"App","data-config-width":e,"data-connection-state":s,className:R,children:G})})}),A[8]=G,A[9]=s,A[10]=R,A[11]=e,A[12]=i):i=A[12];let l;return A[13]!==n||A[14]!==k||A[15]!==i?(l=(0,r.jsxs)(r.Fragment,{children:[n,k,i]}),A[13]=n,A[14]=k,A[15]=i,A[16]=l):l=A[16],l};function At(a){return a.kind==="missing"}function SA(a){return a.kind==="installing"}var{valueAtom:et,useActions:at}=je(()=>({packageAlert:null,startupLogsAlert:null,packageLogs:{}}),{addPackageAlert:(a,A)=>{var o;let e={...a.packageLogs};if(SA(A)&&A.logs&&A.log_status)for(let[G,s]of Object.entries(A.logs))switch(A.log_status){case"start":e[G]=s;break;case"append":e[G]=(e[G]||"")+s;break;case"done":e[G]=(e[G]||"")+s;break}let t=((o=a.packageAlert)==null?void 0:o.id)||Ve();return{...a,packageAlert:{id:t,...A},packageLogs:e}},clearPackageAlert:(a,A)=>a.packageAlert!==null&&a.packageAlert.id===A?{...a,packageAlert:null,packageLogs:{}}:a,addStartupLog:(a,A)=>{var t;let e=((t=a.startupLogsAlert)==null?void 0:t.content)||"";return{...a,startupLogsAlert:{...a.startupLogsAlert,content:e+A.content,status:A.status}}},clearStartupLogsAlert:a=>({...a,startupLogsAlert:null})});const tt=()=>j(et);function FA(){return at()}var QA=B();const LA=(0,u.memo)(a=>{let A=(0,QA.c)(11),{appConfig:e,mode:t,children:o}=a,{selectedLayout:G,layoutData:s}=Fe(),n=j(wA);if(t==="edit"&&!n)return o;let k;if(A[0]!==t||A[1]!==G){k=G;let c=new URLSearchParams(window.location.search);if(t==="read"&&c.has(oA.viewAs)){let g=c.get(oA.viewAs);Ra.includes(g)&&(k=g)}A[0]=t,A[1]=G,A[2]=k}else k=A[2];let R;A[3]===k?R=A[4]:(R=Le.find(c=>c.type===k),A[3]=k,A[4]=R);let i=R;if(!i)return o;let l;return A[5]!==e||A[6]!==k||A[7]!==s||A[8]!==t||A[9]!==i?(l=(0,r.jsx)(Gt,{appConfig:e,mode:t,plugin:i,layoutData:s,finalLayout:k}),A[5]=e,A[6]=k,A[7]=s,A[8]=t,A[9]=i,A[10]=l):l=A[10],l});LA.displayName="CellsRenderer";const Gt=a=>{let A=(0,QA.c)(18),{appConfig:e,mode:t,plugin:o,layoutData:G,finalLayout:s}=a,n=WA(),{setCurrentLayoutData:k}=xA(),R,i,l,c,g;if(A[0]!==e||A[1]!==s||A[2]!==G||A[3]!==t||A[4]!==n||A[5]!==o){let w=ae(n);R=o.Component,i=e,l=t,c=w,g=G[s]||o.getInitialLayout(w),A[0]=e,A[1]=s,A[2]=G,A[3]=t,A[4]=n,A[5]=o,A[6]=R,A[7]=i,A[8]=l,A[9]=c,A[10]=g}else R=A[6],i=A[7],l=A[8],c=A[9],g=A[10];let h;return A[11]!==R||A[12]!==k||A[13]!==i||A[14]!==l||A[15]!==c||A[16]!==g?(h=(0,r.jsx)(R,{appConfig:i,mode:l,cells:c,layout:g,setLayout:k}),A[11]=R,A[12]=k,A[13]=i,A[14]=l,A[15]=c,A[16]=g,A[17]=h):h=A[17],h};var ot=class PA{constructor(A){GA(this,"hasStarted",!1);GA(this,"handleReadyEvent",A=>{let e=A.detail.objectId;if(!this.uiElementRegistry.has(e))return;let t=this.uiElementRegistry.lookupValue(e);t!==void 0&&this.sendComponentValues({objectIds:[e],values:[t]}).catch(o=>{D.warn(o)})});this.uiElementRegistry=A}static get INSTANCE(){let A="_marimo_private_RuntimeState";return window[A]||(window[A]=new PA(S)),window[A]}get sendComponentValues(){if(!this._sendComponentValues)throw Error("sendComponentValues is not set");return this._sendComponentValues}start(A){if(this.hasStarted){D.warn("RuntimeState already started");return}this._sendComponentValues=A,document.addEventListener(YA.TYPE,this.handleReadyEvent),this.hasStarted=!0}stop(){if(!this.hasStarted){D.warn("RuntimeState already stopped");return}document.removeEventListener(YA.TYPE,this.handleReadyEvent),this.hasStarted=!1}};function st(a){if(a.static)return Be.empty();if(sA())return pe();let A=a.url;return new na(A,void 0,{maxRetries:10,debug:!1,startClosed:!0,connectionTimeout:1e4})}function rt(a){let{onOpen:A,onMessage:e,onClose:t,onError:o,waitToConnect:G}=a,[s]=(0,u.useState)(()=>{let n=st(a);return n.addEventListener("open",A),n.addEventListener("close",t),n.addEventListener("error",o),n.addEventListener("message",e),n});return(0,u.useEffect)(()=>(s.readyState===WebSocket.CLOSED&&G().then(()=>s.reconnect()).catch(n=>{D.error("Healthy connection never made",n),s.close()}),()=>{D.warn("useConnectionTransport is unmounting. This likely means there is a bug."),s.close(),s.removeEventListener("open",A),s.removeEventListener("close",t),s.removeEventListener("error",o),s.removeEventListener("message",e)}),[s]),s}function nt(a){let{codes:A,names:e,configs:t,cell_ids:o,last_executed_code:G,last_execution_time:s}=a,n=G||{},k=s||{};return A.map((R,i)=>{let l=o[i],c=n[l];return XA({id:l,code:R,edited:c?c!==R:!1,name:e[i],lastCodeRun:n[l]??null,lastExecutionTime:k[l]??null,config:t[i]})})}function kt(a,A,e){let t=Qe(),{layout:o}=a;if(o){let G=o.type,s=Pe({type:G,data:o.data,cells:A});t.selectedLayout=G,t.layoutData[G]=s,e({layoutView:G,data:s})}return t}function Rt(){let a=[],A=[];return S.entries.forEach((e,t)=>{a.push(t),A.push(e.value)}),{objectIds:a,values:A}}function it(a,A){let{existingCells:e,autoInstantiate:t,setCells:o,setLayoutData:G,setAppConfig:s,setCapabilities:n,setKernelState:k,onError:R}=A,{resumed:i,ui_values:l,app_config:c,capabilities:g,auto_instantiated:h}=a,w=e&&e.length>0,y=w&&!i?e:nt(a);o(y,kt(a,y,G));let v=xe.safeParse(c);if(v.success?s(v.data):D.error("Failed to parse app config",v.error),n(g),h)return;if(i){for(let[Y,m]of mA.entries(l||{}))S.set(Y,m);return}let{objectIds:b,values:M}=Rt(),N=w?Object.fromEntries(e.map(Y=>[Y.id,Y.code])):void 0;Se().sendInstantiate({objectIds:b,values:M,autoRun:t,codes:N}).then(()=>{k({isInstantiated:!0,error:null})}).catch(Y=>{k({isInstantiated:!1,error:Y}),R(Error("Failed to instantiate",{cause:Y}))})}function lt(a){let A=a.cell_id;S.removeElementsByCell(A),pA.INSTANCE.removeForCellId(A)}function Zt(a,A){A(a),pA.INSTANCE.track(a)}const W={append:a=>{let A=new URL(window.location.href);A.searchParams.append(a.key,a.value),window.history.pushState({},"",`${A.pathname}${A.search}`)},set:a=>{let A=new URL(window.location.href);Array.isArray(a.value)?(A.searchParams.delete(a.key),a.value.forEach(e=>A.searchParams.append(a.key,e))):A.searchParams.set(a.key,a.value),window.history.pushState({},"",`${A.pathname}${A.search}`)},delete:a=>{let A=new URL(window.location.href);a.value==null?A.searchParams.delete(a.key):A.searchParams.delete(a.key,a.value),window.history.pushState({},"",`${A.pathname}${A.search}`)},clear:()=>{let a=new URL(window.location.href);a.search="",window.history.pushState({},"",`${a.pathname}${a.search}`)}};var ct=B();function gt(){return Object.values(BA().cellData).filter(a=>a.id!==zA)}function ht(a){let A=(0,ct.c)(37),e=(0,u.useRef)(!0),{autoInstantiate:t,sessionId:o,setCells:G}=a,{showBoundary:s}=be(),{handleCellMessage:n,setCellCodes:k,setCellIds:R}=oe(),{addCellNotification:i}=ia(),l=_(Ue),c=we(),{setVariables:g,setMetadata:h}=Ge(),{addColumnPreview:w}=dA(),{addDatasets:y,filterDatasetsFromVariables:v}=dA(),{addDataSourceConnection:b,filterDataSourcesFromVariables:M}=ee(),{setLayoutData:N}=xA(),[Y,m]=hA(ve),{addBanner:q}=fe(),{addPackageAlert:P,addStartupLog:z}=FA(),$=_(wA),AA=_($A),E=Ee(),eA=_(ra),aA=_(Ye),O;A[0]!==q||A[1]!==i||A[2]!==w||A[3]!==b||A[4]!==y||A[5]!==P||A[6]!==z||A[7]!==t||A[8]!==M||A[9]!==v||A[10]!==n||A[11]!==c||A[12]!==eA||A[13]!==AA||A[14]!==k||A[15]!==R||A[16]!==G||A[17]!==aA||A[18]!==l||A[19]!==$||A[20]!==N||A[21]!==h||A[22]!==g||A[23]!==s?(O=d=>{let Z=te(d.data);switch(Z.data.op){case"reload":CA();return;case"kernel-ready":{let p=gt();it(Z.data,{autoInstantiate:t,setCells:G,setLayoutData:N,setAppConfig:c,setCapabilities:AA,setKernelState:l,onError:s,existingCells:p}),$(Z.data.kiosk);return}case"completed-run":return;case"interrupted":return;case"kernel-startup-error":aA(Z.data.error);return;case"send-ui-element-message":{let p=Z.data.ui_element;if(p){let OA=Ie(Z.data);S.broadcastMessage(p,Z.data.message,OA)}return}case"model-lifecycle":Ze(le,Z.data);return;case"remove-ui-elements":lt(Z.data);return;case"completion-result":Ae.resolve(Z.data.completion_id,Z.data);return;case"function-call-result":ce.resolve(Z.data.function_call_id,Z.data);return;case"cell-op":{Zt(Z.data,n);let p=BA().cellData[Z.data.cell_id];if(!p)return;i({cellNotification:Z.data,code:p.code});return}case"variables":g(Z.data.variables.map(mt)),v(Z.data.variables.map(Yt)),M(Z.data.variables.map(ut));return;case"variable-values":h(Z.data.variables.map(Bt));return;case"alert":nA({title:Z.data.title,description:ta({html:Z.data.description}),variant:Z.data.variant});return;case"banner":q(Z.data);return;case"missing-package-alert":P({...Z.data,kind:"missing"});return;case"installing-package-alert":P({...Z.data,kind:"installing"});return;case"startup-logs":z({content:Z.data.content,status:Z.data.status});return;case"query-params-append":W.append(Z.data);return;case"query-params-set":W.set(Z.data);return;case"query-params-delete":W.delete(Z.data);return;case"query-params-clear":W.clear();return;case"datasets":y(Z.data);return;case"data-column-preview":w(Z.data);return;case"sql-table-preview":VA.resolve(Z.data.request_id,Z.data);return;case"sql-table-list-preview":UA.resolve(Z.data.request_id,Z.data);return;case"validate-sql-result":qA.resolve(Z.data.request_id,Z.data);return;case"secret-keys-result":ka.resolve(Z.data.request_id,Z.data);return;case"cache-info":eA(Z.data);return;case"cache-cleared":return;case"data-source-connections":b({connections:Z.data.connections.map(dt)});return;case"reconnected":return;case"focus-cell":JA(Z.data.cell_id);return;case"update-cell-codes":k({codes:Z.data.codes,ids:Z.data.cell_ids,codeIsStale:Z.data.code_is_stale});return;case"update-cell-ids":R({cellIds:Z.data.cell_ids});return;default:re(Z.data)}},A[0]=q,A[1]=i,A[2]=w,A[3]=b,A[4]=y,A[5]=P,A[6]=z,A[7]=t,A[8]=M,A[9]=v,A[10]=n,A[11]=c,A[12]=eA,A[13]=AA,A[14]=k,A[15]=R,A[16]=G,A[17]=aA,A[18]=l,A[19]=$,A[20]=N,A[21]=h,A[22]=g,A[23]=s,A[24]=O):O=A[24];let tA=O,ZA=(d,Z)=>{e.current&&(e.current=!1,V.reconnect(d,Z))},T;A[25]===Symbol.for("react.memo_cache_sentinel")?(T=fA(),A[25]=T):T=A[25];let I;A[26]!==E||A[27]!==o?(I=()=>E.getWsURL(o).toString(),A[26]=E,A[27]=o,A[28]=I):I=A[28];let K;A[29]===m?K=A[30]:(K=async()=>{e.current=!0,m({state:x.OPEN})},A[29]=m,A[30]=K);let H;A[31]===E?H=A[32]:(H=async()=>{fA()||sA()||E.isSameOrigin||await E.waitForHealthy()},A[31]=E,A[32]=H);let U;A[33]===tA?U=A[34]:(U=d=>{try{tA(d)}catch(Z){let p=Z;D.error("Failed to handle message",d.data,p),nA({title:"Failed to handle message",description:bA(p),variant:"danger"})}},A[33]=tA,A[34]=U);let V=rt({static:T,url:I,onOpen:K,waitToConnect:H,onMessage:U,onClose:d=>{switch(D.warn("WebSocket closed",d.code,d.reason),d.reason){case"MARIMO_ALREADY_CONNECTED":m({state:x.CLOSED,code:F.ALREADY_RUNNING,reason:"another browser tab is already connected to the kernel",canTakeover:!0}),V.close();return;case"MARIMO_WRONG_KERNEL_ID":case"MARIMO_NO_FILE_KEY":case"MARIMO_NO_SESSION_ID":case"MARIMO_NO_SESSION":case"MARIMO_SHUTDOWN":m({state:x.CLOSED,code:F.KERNEL_DISCONNECTED,reason:"kernel not found"}),V.close();return;case"MARIMO_MALFORMED_QUERY":m({state:x.CLOSED,code:F.MALFORMED_QUERY,reason:"the kernel did not recognize a request; please file a bug with marimo"});return;default:if(d.reason==="MARIMO_KERNEL_STARTUP_ERROR"){m({state:x.CLOSED,code:F.KERNEL_STARTUP_ERROR,reason:"Failed to start kernel sandbox"}),V.close();return}m({state:x.CONNECTING}),ZA(d.code,d.reason)}},onError:d=>{D.warn("WebSocket error",d),m({state:x.CLOSED,code:F.KERNEL_DISCONNECTED,reason:"kernel not found"}),ZA()}}),X;return A[35]===Y?X=A[36]:(X={connection:Y},A[35]=Y,A[36]=X),X}function dt(a){return{...a,name:a.name}}function Bt(a){return{name:a.name,dataType:a.datatype,value:a.value}}function ut(a){return a.name}function Yt(a){return a.name}function mt(a){return{name:a.name,declaredBy:a.declared_by,usedBy:a.used_by}}var ft=B();const pt=a=>{let A=(0,ft.c)(2),{children:e}=a,t;return A[0]===e?t=A[1]:(t=(0,r.jsx)("div",{className:"flex flex-col flex-1 overflow-hidden absolute inset-0 print:relative",children:e}),A[0]=e,A[1]=t),t};export{SA as a,tt as c,MA as d,LA as i,$a as l,ht as n,At as o,ot as r,FA as s,pt as t,ua as u};
function c(e){for(var r={},t=e.split(" "),n=0;n<t.length;++n)r[t[n]]=!0;return r}var u=c("absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write"),f={null:!0},i=/[+\-*&%=<>!?|\/]/;function p(e,r){var t=e.next();if(t=="#"&&r.startOfLine)return e.skipToEnd(),"meta";if(t=='"'||t=="'")return r.tokenize=d(t),r.tokenize(e,r);if(t=="("&&e.eat("*"))return r.tokenize=l,l(e,r);if(t=="{")return r.tokenize=s,s(e,r);if(/[\[\]\(\),;\:\.]/.test(t))return null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(t=="/"&&e.eat("/"))return e.skipToEnd(),"comment";if(i.test(t))return e.eatWhile(i),"operator";e.eatWhile(/[\w\$_]/);var n=e.current().toLowerCase();return u.propertyIsEnumerable(n)?"keyword":f.propertyIsEnumerable(n)?"atom":"variable"}function d(e){return function(r,t){for(var n=!1,a,o=!1;(a=r.next())!=null;){if(a==e&&!n){o=!0;break}n=!n&&a=="\\"}return(o||!n)&&(t.tokenize=null),"string"}}function l(e,r){for(var t=!1,n;n=e.next();){if(n==")"&&t){r.tokenize=null;break}t=n=="*"}return"comment"}function s(e,r){for(var t;t=e.next();)if(t=="}"){r.tokenize=null;break}return"comment"}const m={name:"pascal",startState:function(){return{tokenize:null}},token:function(e,r){return e.eatSpace()?null:(r.tokenize||p)(e,r)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{block:{open:"(*",close:"*)"}}}};export{m as t};
import{t as a}from"./pascal-6Jinj26u.js";export{a as pascal};
function E(t){return function(){return t}}var o=Math.PI,y=2*o,u=1e-6,L=y-u;function w(t){this._+=t[0];for(let i=1,h=t.length;i<h;++i)this._+=arguments[i]+t[i]}function q(t){let i=Math.floor(t);if(!(i>=0))throw Error(`invalid digits: ${t}`);if(i>15)return w;let h=10**i;return function(s){this._+=s[0];for(let r=1,_=s.length;r<_;++r)this._+=Math.round(arguments[r]*h)/h+s[r]}}var M=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?w:q(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,h,s){this._append`Q${+t},${+i},${this._x1=+h},${this._y1=+s}`}bezierCurveTo(t,i,h,s,r,_){this._append`C${+t},${+i},${+h},${+s},${this._x1=+r},${this._y1=+_}`}arcTo(t,i,h,s,r){if(t=+t,i=+i,h=+h,s=+s,r=+r,r<0)throw Error(`negative radius: ${r}`);let _=this._x1,l=this._y1,p=h-t,a=s-i,n=_-t,e=l-i,$=n*n+e*e;if(this._x1===null)this._append`M${this._x1=t},${this._y1=i}`;else if($>u)if(!(Math.abs(e*p-a*n)>u)||!r)this._append`L${this._x1=t},${this._y1=i}`;else{let d=h-_,f=s-l,c=p*p+a*a,A=d*d+f*f,g=Math.sqrt(c),v=Math.sqrt($),b=r*Math.tan((o-Math.acos((c+$-A)/(2*g*v)))/2),x=b/v,m=b/g;Math.abs(x-1)>u&&this._append`L${t+x*n},${i+x*e}`,this._append`A${r},${r},0,0,${+(e*d>n*f)},${this._x1=t+m*p},${this._y1=i+m*a}`}}arc(t,i,h,s,r,_){if(t=+t,i=+i,h=+h,_=!!_,h<0)throw Error(`negative radius: ${h}`);let l=h*Math.cos(s),p=h*Math.sin(s),a=t+l,n=i+p,e=1^_,$=_?s-r:r-s;this._x1===null?this._append`M${a},${n}`:(Math.abs(this._x1-a)>u||Math.abs(this._y1-n)>u)&&this._append`L${a},${n}`,h&&($<0&&($=$%y+y),$>L?this._append`A${h},${h},0,1,${e},${t-l},${i-p}A${h},${h},0,1,${e},${this._x1=a},${this._y1=n}`:$>u&&this._append`A${h},${h},0,${+($>=o)},${e},${this._x1=t+h*Math.cos(r)},${this._y1=i+h*Math.sin(r)}`)}rect(t,i,h,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${h=+h}v${+s}h${-h}Z`}toString(){return this._}};function T(){return new M}T.prototype=M.prototype;function C(t){let i=3;return t.digits=function(h){if(!arguments.length)return i;if(h==null)i=null;else{let s=Math.floor(h);if(!(s>=0))throw RangeError(`invalid digits: ${h}`);i=s}return t},()=>new M(i)}export{T as n,E as r,C as t};
const o={isAbsolute:i=>i.startsWith("/")||i.startsWith("\\")||i.startsWith("C:\\"),dirname:i=>n.guessDeliminator(i).dirname(i),basename:i=>n.guessDeliminator(i).basename(i),rest:(i,t)=>n.guessDeliminator(i).rest(i,t),extension:i=>{let t=i.split(".");return t.length===1?"":t.at(-1)??""}};var n=class a{constructor(t){this.deliminator=t}static guessDeliminator(t){return t.includes("/")?new a("/"):new a("\\")}join(...t){return t.filter(Boolean).join(this.deliminator)}basename(t){return t.split(this.deliminator).pop()??""}rest(t,s){let r=t.split(this.deliminator),l=s.split(this.deliminator),e=0;for(;e<r.length&&e<l.length&&r[e]===l[e];++e);return r.slice(e).join(this.deliminator)}dirname(t){let s=t.split(this.deliminator);return s.pop(),s.join(this.deliminator)}};export{o as n,n as t};
import{t as r}from"./perl-CXauYQdN.js";export{r as perl};
function f(e,r){return e.string.charAt(e.pos+(r||0))}function g(e,r){if(r){var i=e.pos-r;return e.string.substr(i>=0?i:0,r)}else return e.string.substr(0,e.pos-1)}function u(e,r){var i=e.string.length,$=i-e.pos+1;return e.string.substr(e.pos,r&&r<i?r:$)}function o(e,r){var i=e.pos+r,$;i<=0?e.pos=0:i>=($=e.string.length-1)?e.pos=$:e.pos=i}var _={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},s="string.special",a=/[goseximacplud]/;function n(e,r,i,$,E){return r.chain=null,r.style=null,r.tail=null,r.tokenize=function(t,R){for(var A=!1,c,p=0;c=t.next();){if(c===i[p]&&!A)return i[++p]===void 0?E&&t.eatWhile(E):(R.chain=i[p],R.style=$,R.tail=E),R.tokenize=T,$;A=!A&&c=="\\"}return $},r.tokenize(e,r)}function d(e,r,i){return r.tokenize=function($,E){return $.string==i&&(E.tokenize=T),$.skipToEnd(),"string"},r.tokenize(e,r)}function T(e,r){if(e.eatSpace())return null;if(r.chain)return n(e,r,r.chain,r.style,r.tail);if(e.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if(e.match(/^<<(?=[_a-zA-Z])/))return e.eatWhile(/\w/),d(e,r,e.current().substr(2));if(e.sol()&&e.match(/^\=item(?!\w)/))return d(e,r,"=cut");var i=e.next();if(i=='"'||i=="'"){if(g(e,3)=="<<"+i){var $=e.pos;e.eatWhile(/\w/);var E=e.current().substr(1);if(E&&e.eat(i))return d(e,r,E);e.pos=$}return n(e,r,[i],"string")}if(i=="q"){var t=f(e,-2);if(!(t&&/\w/.test(t))){if(t=f(e,0),t=="x"){if(t=f(e,1),t=="(")return o(e,2),n(e,r,[")"],s,a);if(t=="[")return o(e,2),n(e,r,["]"],s,a);if(t=="{")return o(e,2),n(e,r,["}"],s,a);if(t=="<")return o(e,2),n(e,r,[">"],s,a);if(/[\^'"!~\/]/.test(t))return o(e,1),n(e,r,[e.eat(t)],s,a)}else if(t=="q"){if(t=f(e,1),t=="(")return o(e,2),n(e,r,[")"],"string");if(t=="[")return o(e,2),n(e,r,["]"],"string");if(t=="{")return o(e,2),n(e,r,["}"],"string");if(t=="<")return o(e,2),n(e,r,[">"],"string");if(/[\^'"!~\/]/.test(t))return o(e,1),n(e,r,[e.eat(t)],"string")}else if(t=="w"){if(t=f(e,1),t=="(")return o(e,2),n(e,r,[")"],"bracket");if(t=="[")return o(e,2),n(e,r,["]"],"bracket");if(t=="{")return o(e,2),n(e,r,["}"],"bracket");if(t=="<")return o(e,2),n(e,r,[">"],"bracket");if(/[\^'"!~\/]/.test(t))return o(e,1),n(e,r,[e.eat(t)],"bracket")}else if(t=="r"){if(t=f(e,1),t=="(")return o(e,2),n(e,r,[")"],s,a);if(t=="[")return o(e,2),n(e,r,["]"],s,a);if(t=="{")return o(e,2),n(e,r,["}"],s,a);if(t=="<")return o(e,2),n(e,r,[">"],s,a);if(/[\^'"!~\/]/.test(t))return o(e,1),n(e,r,[e.eat(t)],s,a)}else if(/[\^'"!~\/(\[{<]/.test(t)){if(t=="(")return o(e,1),n(e,r,[")"],"string");if(t=="[")return o(e,1),n(e,r,["]"],"string");if(t=="{")return o(e,1),n(e,r,["}"],"string");if(t=="<")return o(e,1),n(e,r,[">"],"string");if(/[\^'"!~\/]/.test(t))return n(e,r,[e.eat(t)],"string")}}}if(i=="m"){var t=f(e,-2);if(!(t&&/\w/.test(t))&&(t=e.eat(/[(\[{<\^'"!~\/]/),t)){if(/[\^'"!~\/]/.test(t))return n(e,r,[t],s,a);if(t=="(")return n(e,r,[")"],s,a);if(t=="[")return n(e,r,["]"],s,a);if(t=="{")return n(e,r,["}"],s,a);if(t=="<")return n(e,r,[">"],s,a)}}if(i=="s"){var t=/[\/>\]})\w]/.test(f(e,-2));if(!t&&(t=e.eat(/[(\[{<\^'"!~\/]/),t))return t=="["?n(e,r,["]","]"],s,a):t=="{"?n(e,r,["}","}"],s,a):t=="<"?n(e,r,[">",">"],s,a):t=="("?n(e,r,[")",")"],s,a):n(e,r,[t,t],s,a)}if(i=="y"){var t=/[\/>\]})\w]/.test(f(e,-2));if(!t&&(t=e.eat(/[(\[{<\^'"!~\/]/),t))return t=="["?n(e,r,["]","]"],s,a):t=="{"?n(e,r,["}","}"],s,a):t=="<"?n(e,r,[">",">"],s,a):t=="("?n(e,r,[")",")"],s,a):n(e,r,[t,t],s,a)}if(i=="t"){var t=/[\/>\]})\w]/.test(f(e,-2));if(!t&&(t=e.eat("r"),t&&(t=e.eat(/[(\[{<\^'"!~\/]/),t)))return t=="["?n(e,r,["]","]"],s,a):t=="{"?n(e,r,["}","}"],s,a):t=="<"?n(e,r,[">",">"],s,a):t=="("?n(e,r,[")",")"],s,a):n(e,r,[t,t],s,a)}if(i=="`")return n(e,r,[i],"builtin");if(i=="/")return/~\s*$/.test(g(e))?n(e,r,[i],s,a):"operator";if(i=="$"){var $=e.pos;if(e.eatWhile(/\d/)||e.eat("{")&&e.eatWhile(/\d/)&&e.eat("}"))return"builtin";e.pos=$}if(/[$@%]/.test(i)){var $=e.pos;if(e.eat("^")&&e.eat(/[A-Z]/)||!/[@$%&]/.test(f(e,-2))&&e.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var t=e.current();if(_[t])return"builtin"}e.pos=$}if(/[$@%&]/.test(i)&&(e.eatWhile(/[\w$]/)||e.eat("{")&&e.eatWhile(/[\w$]/)&&e.eat("}"))){var t=e.current();return _[t]?"builtin":"variable"}if(i=="#"&&f(e,-2)!="$")return e.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(i)){var $=e.pos;if(e.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),_[e.current()])return"operator";e.pos=$}if(i=="_"&&e.pos==1){if(u(e,6)=="_END__")return n(e,r,["\0"],"comment");if(u(e,7)=="_DATA__")return n(e,r,["\0"],"builtin");if(u(e,7)=="_C__")return n(e,r,["\0"],"string")}if(/\w/.test(i)){var $=e.pos;if(f(e,-2)=="{"&&(f(e,0)=="}"||e.eatWhile(/\w/)&&f(e,0)=="}"))return"string";e.pos=$}if(/[A-Z]/.test(i)){var R=f(e,-2),$=e.pos;if(e.eatWhile(/[A-Z_]/),/[\da-z]/.test(f(e,0)))e.pos=$;else{var t=_[e.current()];return t?(t[1]&&(t=t[0]),R==":"?"meta":t==1?"keyword":t==2?"def":t==3?"atom":t==4?"operator":t==5?"builtin":"meta"):"meta"}}if(/[a-zA-Z_]/.test(i)){var R=f(e,-2);e.eatWhile(/\w/);var t=_[e.current()];return t?(t[1]&&(t=t[0]),R==":"?"meta":t==1?"keyword":t==2?"def":t==3?"atom":t==4?"operator":t==5?"builtin":"meta"):"meta"}return null}const S={name:"perl",startState:function(){return{tokenize:T,chain:null,style:null,tail:null}},token:function(e,r){return(r.tokenize||T)(e,r)},languageData:{commentTokens:{line:"#"},wordChars:"$"}};export{S as t};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as e}from"./chunk-T53DSG4Q-Bhd043Cg.js";export{e as createPieServices};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as W}from"./ordinal-DG_POl79.js";import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import{r as h}from"./path-D7fidI_g.js";import{p as k}from"./math-BJjKGmt3.js";import{t as F}from"./arc-D1owqr0z.js";import{t as _}from"./array-Cf4PUXPA.js";import{i as B,p as P}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as p,r as M}from"./src-CsZby044.js";import{B as L,C as V,U as j,_ as U,a as q,b as G,c as H,d as I,v as J,z as K}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as Q}from"./chunk-EXTU4WIE-Dmu97ZvI.js";import"./dist-C1VXabOr.js";import"./chunk-O7ZBX7Z2-CFqB9i7k.js";import"./chunk-S6J4BHB3-C4KwSfr_.js";import"./chunk-LBM3YZW2-BRBe7ZaP.js";import"./chunk-76Q3JFCE-BAZ3z-Fu.js";import"./chunk-T53DSG4Q-Bhd043Cg.js";import"./chunk-LHMN2FUI-C4onQD9F.js";import"./chunk-FWNWRKHM-DzIkWreD.js";import{t as X}from"./chunk-4BX2VUAB-KawmK-5L.js";import{t as Y}from"./mermaid-parser.core-BLHYb13y.js";function Z(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function tt(t){return t}function et(){var t=tt,a=Z,d=null,o=h(0),s=h(k),x=h(0);function n(e){var l,i=(e=_(e)).length,m,b,$=0,y=Array(i),u=Array(i),v=+o.apply(this,arguments),A=Math.min(k,Math.max(-k,s.apply(this,arguments)-v)),f,T=Math.min(Math.abs(A)/i,x.apply(this,arguments)),w=T*(A<0?-1:1),c;for(l=0;l<i;++l)(c=u[y[l]=l]=+t(e[l],l,e))>0&&($+=c);for(a==null?d!=null&&y.sort(function(g,S){return d(e[g],e[S])}):y.sort(function(g,S){return a(u[g],u[S])}),l=0,b=$?(A-i*w)/$:0;l<i;++l,v=f)m=y[l],c=u[m],f=v+(c>0?c*b:0)+w,u[m]={data:e[m],index:l,value:c,startAngle:v,endAngle:f,padAngle:T};return u}return n.value=function(e){return arguments.length?(t=typeof e=="function"?e:h(+e),n):t},n.sortValues=function(e){return arguments.length?(a=e,d=null,n):a},n.sort=function(e){return arguments.length?(d=e,a=null,n):d},n.startAngle=function(e){return arguments.length?(o=typeof e=="function"?e:h(+e),n):o},n.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:h(+e),n):s},n.padAngle=function(e){return arguments.length?(x=typeof e=="function"?e:h(+e),n):x},n}var R=I.pie,O={sections:new Map,showData:!1,config:R},C=O.sections,z=O.showData,at=structuredClone(R),E={getConfig:p(()=>structuredClone(at),"getConfig"),clear:p(()=>{C=new Map,z=O.showData,q()},"clear"),setDiagramTitle:j,getDiagramTitle:V,setAccTitle:L,getAccTitle:J,setAccDescription:K,getAccDescription:U,addSection:p(({label:t,value:a})=>{if(a<0)throw Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);C.has(t)||(C.set(t,a),M.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),getSections:p(()=>C,"getSections"),setShowData:p(t=>{z=t},"setShowData"),getShowData:p(()=>z,"getShowData")},rt=p((t,a)=>{X(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),it={parse:p(async t=>{let a=await Y("pie",t);M.debug(a),rt(a,E)},"parse")},lt=p(t=>`
.pieCircle{
stroke: ${t.pieStrokeColor};
stroke-width : ${t.pieStrokeWidth};
opacity : ${t.pieOpacity};
}
.pieOuterCircle{
stroke: ${t.pieOuterStrokeColor};
stroke-width: ${t.pieOuterStrokeWidth};
fill: none;
}
.pieTitleText {
text-anchor: middle;
font-size: ${t.pieTitleTextSize};
fill: ${t.pieTitleTextColor};
font-family: ${t.fontFamily};
}
.slice {
font-family: ${t.fontFamily};
fill: ${t.pieSectionTextColor};
font-size:${t.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${t.pieLegendTextColor};
font-family: ${t.fontFamily};
font-size: ${t.pieLegendTextSize};
}
`,"getStyles"),nt=p(t=>{let a=[...t.values()].reduce((o,s)=>o+s,0),d=[...t.entries()].map(([o,s])=>({label:o,value:s})).filter(o=>o.value/a*100>=1).sort((o,s)=>s.value-o.value);return et().value(o=>o.value)(d)},"createPieArcs"),ot={parser:it,db:E,renderer:{draw:p((t,a,d,o)=>{M.debug(`rendering pie chart
`+t);let s=o.db,x=G(),n=B(s.getConfig(),x.pie),e=Q(a),l=e.append("g");l.attr("transform","translate(225,225)");let{themeVariables:i}=x,[m]=P(i.pieOuterStrokeWidth);m??(m=2);let b=n.textPosition,$=F().innerRadius(0).outerRadius(185),y=F().innerRadius(185*b).outerRadius(185*b);l.append("circle").attr("cx",0).attr("cy",0).attr("r",185+m/2).attr("class","pieOuterCircle");let u=s.getSections(),v=nt(u),A=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12],f=0;u.forEach(r=>{f+=r});let T=v.filter(r=>(r.data.value/f*100).toFixed(0)!=="0"),w=W(A);l.selectAll("mySlices").data(T).enter().append("path").attr("d",$).attr("fill",r=>w(r.data.label)).attr("class","pieCircle"),l.selectAll("mySlices").data(T).enter().append("text").text(r=>(r.data.value/f*100).toFixed(0)+"%").attr("transform",r=>"translate("+y.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");let c=[...u.entries()].map(([r,D])=>({label:r,value:D})),g=l.selectAll(".legend").data(c).enter().append("g").attr("class","legend").attr("transform",(r,D)=>{let N=22*c.length/2;return"translate(216,"+(D*22-N)+")"});g.append("rect").attr("width",18).attr("height",18).style("fill",r=>w(r.label)).style("stroke",r=>w(r.label)),g.append("text").attr("x",22).attr("y",14).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);let S=512+Math.max(...g.selectAll("text").nodes().map(r=>(r==null?void 0:r.getBoundingClientRect().width)??0));e.attr("viewBox",`0 0 ${S} 450`),H(e,450,S,n.useMaxWidth)},"draw")},styles:lt};export{ot as diagram};
import{t as o}from"./pig-Dl0QLQI6.js";export{o as pig};
function R(O){for(var E={},T=O.split(" "),I=0;I<T.length;++I)E[T[I]]=!0;return E}var e="ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER ",L="VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE NEQ MATCHES TRUE FALSE DUMP",r="BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP ",n=R(e),U=R(L),C=R(r),N=/[*+\-%<>=&?:\/!|]/;function G(O,E,T){return E.tokenize=T,T(O,E)}function a(O,E){for(var T=!1,I;I=O.next();){if(I=="/"&&T){E.tokenize=S;break}T=I=="*"}return"comment"}function o(O){return function(E,T){for(var I=!1,A,t=!1;(A=E.next())!=null;){if(A==O&&!I){t=!0;break}I=!I&&A=="\\"}return(t||!I)&&(T.tokenize=S),"error"}}function S(O,E){var T=O.next();return T=='"'||T=="'"?G(O,E,o(T)):/[\[\]{}\(\),;\.]/.test(T)?null:/\d/.test(T)?(O.eatWhile(/[\w\.]/),"number"):T=="/"?O.eat("*")?G(O,E,a):(O.eatWhile(N),"operator"):T=="-"?O.eat("-")?(O.skipToEnd(),"comment"):(O.eatWhile(N),"operator"):N.test(T)?(O.eatWhile(N),"operator"):(O.eatWhile(/[\w\$_]/),U&&U.propertyIsEnumerable(O.current().toUpperCase())&&!O.eat(")")&&!O.eat(".")?"keyword":n&&n.propertyIsEnumerable(O.current().toUpperCase())?"builtin":C&&C.propertyIsEnumerable(O.current().toUpperCase())?"type":"variable")}const M={name:"pig",startState:function(){return{tokenize:S,startOfLine:!0}},token:function(O,E){return O.eatSpace()?null:E.tokenize(O,E)},languageData:{autocomplete:(e+r+L).split(" ")}};export{M as t};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),e=a("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);export{t as n,e as t};
import{t}from"./createLucideIcon-BCdY6lG5.js";var a=t("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);export{a as t};
import{s as M,t as S}from"./chunk-LvLJmgfZ.js";import{t as T}from"./react-Bj1aDYRI.js";import{t as V}from"./compiler-runtime-B3qBwwSJ.js";import{r as K}from"./useEventListener-Cb-RVVEn.js";import{t as we}from"./jsx-runtime-ZmTK25f3.js";import{t as N}from"./cn-BKtXLv3a.js";import{M as Ce,N as $,j as je}from"./dropdown-menu-ldcmQvIV.js";import{E as z,S as L,_ as C,a as Pe,c as _e,d as Re,f as H,i as Ne,m as Oe,o as De,r as Fe,s as Ae,t as Ee,u as ke,w as x,x as F,y as Ie}from"./Combination-BAEdC-rz.js";import{a as Me,c as U,i as q,o as Se,s as Te}from"./dist-DwV58Fb1.js";import{u as Ve}from"./menu-items-BMjcEb2j.js";var Ke=S((r=>{var s=T();function e(l,v){return l===v&&(l!==0||1/l==1/v)||l!==l&&v!==v}var t=typeof Object.is=="function"?Object.is:e,o=s.useState,a=s.useEffect,n=s.useLayoutEffect,i=s.useDebugValue;function c(l,v){var g=v(),w=o({inst:{value:g,getSnapshot:v}}),h=w[0].inst,b=w[1];return n(function(){h.value=g,h.getSnapshot=v,m(h)&&b({inst:h})},[l,g,v]),a(function(){return m(h)&&b({inst:h}),l(function(){m(h)&&b({inst:h})})},[l]),i(g),g}function m(l){var v=l.getSnapshot;l=l.value;try{var g=v();return!t(l,g)}catch{return!0}}function p(l,v){return v()}var f=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?p:c;r.useSyncExternalStore=s.useSyncExternalStore===void 0?f:s.useSyncExternalStore})),$e=S(((r,s)=>{s.exports=Ke()})),u=M(T(),1),d=M(we(),1),O="Tabs",[ze,yo]=z(O,[$]),B=$(),[Le,A]=ze(O),W=u.forwardRef((r,s)=>{let{__scopeTabs:e,value:t,onValueChange:o,defaultValue:a,orientation:n="horizontal",dir:i,activationMode:c="automatic",...m}=r,p=Ve(i),[f,l]=L({prop:t,onChange:o,defaultProp:a??"",caller:O});return(0,d.jsx)(Le,{scope:e,baseId:H(),value:f,onValueChange:l,orientation:n,dir:p,activationMode:c,children:(0,d.jsx)(C.div,{dir:p,"data-orientation":n,...m,ref:s})})});W.displayName=O;var Z="TabsList",G=u.forwardRef((r,s)=>{let{__scopeTabs:e,loop:t=!0,...o}=r,a=A(Z,e),n=B(e);return(0,d.jsx)(Ce,{asChild:!0,...n,orientation:a.orientation,dir:a.dir,loop:t,children:(0,d.jsx)(C.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:s})})});G.displayName=Z;var J="TabsTrigger",Q=u.forwardRef((r,s)=>{let{__scopeTabs:e,value:t,disabled:o=!1,...a}=r,n=A(J,e),i=B(e),c=ee(n.baseId,t),m=oe(n.baseId,t),p=t===n.value;return(0,d.jsx)(je,{asChild:!0,...i,focusable:!o,active:p,children:(0,d.jsx)(C.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":m,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:s,onMouseDown:x(r.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?n.onValueChange(t):f.preventDefault()}),onKeyDown:x(r.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&n.onValueChange(t)}),onFocus:x(r.onFocus,()=>{let f=n.activationMode!=="manual";!p&&!o&&f&&n.onValueChange(t)})})})});Q.displayName=J;var X="TabsContent",Y=u.forwardRef((r,s)=>{let{__scopeTabs:e,value:t,forceMount:o,children:a,...n}=r,i=A(X,e),c=ee(i.baseId,t),m=oe(i.baseId,t),p=t===i.value,f=u.useRef(p);return u.useEffect(()=>{let l=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(l)},[]),(0,d.jsx)(F,{present:o||p,children:({present:l})=>(0,d.jsx)(C.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!l,id:m,tabIndex:0,...n,ref:s,style:{...r.style,animationDuration:f.current?"0s":void 0},children:l&&a})})});Y.displayName=X;function ee(r,s){return`${r}-trigger-${s}`}function oe(r,s){return`${r}-content-${s}`}var He=W,re=G,te=Q,ae=Y,E=V(),Ue=He,ne=u.forwardRef((r,s)=>{let e=(0,E.c)(9),t,o;e[0]===r?(t=e[1],o=e[2]):({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o);let a;e[3]===t?a=e[4]:(a=N("inline-flex max-h-14 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),e[3]=t,e[4]=a);let n;return e[5]!==o||e[6]!==s||e[7]!==a?(n=(0,d.jsx)(re,{ref:s,className:a,...o}),e[5]=o,e[6]=s,e[7]=a,e[8]=n):n=e[8],n});ne.displayName=re.displayName;var se=u.forwardRef((r,s)=>{let e=(0,E.c)(9),t,o;e[0]===r?(t=e[1],o=e[2]):({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o);let a;e[3]===t?a=e[4]:(a=N("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),e[3]=t,e[4]=a);let n;return e[5]!==o||e[6]!==s||e[7]!==a?(n=(0,d.jsx)(te,{ref:s,className:a,...o}),e[5]=o,e[6]=s,e[7]=a,e[8]=n):n=e[8],n});se.displayName=te.displayName;var ie=u.forwardRef((r,s)=>{let e=(0,E.c)(9),t,o;e[0]===r?(t=e[1],o=e[2]):({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o);let a;e[3]===t?a=e[4]:(a=N("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2",t),e[3]=t,e[4]=a);let n;return e[5]!==o||e[6]!==s||e[7]!==a?(n=(0,d.jsx)(ae,{ref:s,className:a,...o}),e[5]=o,e[6]=s,e[7]=a,e[8]=n):n=e[8],n});ie.displayName=ae.displayName;var D="Popover",[le,wo]=z(D,[U]),P=U(),[qe,y]=le(D),de=r=>{let{__scopePopover:s,children:e,open:t,defaultOpen:o,onOpenChange:a,modal:n=!1}=r,i=P(s),c=u.useRef(null),[m,p]=u.useState(!1),[f,l]=L({prop:t,defaultProp:o??!1,onChange:a,caller:D});return(0,d.jsx)(Te,{...i,children:(0,d.jsx)(qe,{scope:s,contentId:H(),triggerRef:c,open:f,onOpenChange:l,onOpenToggle:u.useCallback(()=>l(v=>!v),[l]),hasCustomAnchor:m,onCustomAnchorAdd:u.useCallback(()=>p(!0),[]),onCustomAnchorRemove:u.useCallback(()=>p(!1),[]),modal:n,children:e})})};de.displayName=D;var ue="PopoverAnchor",ce=u.forwardRef((r,s)=>{let{__scopePopover:e,...t}=r,o=y(ue,e),a=P(e),{onCustomAnchorAdd:n,onCustomAnchorRemove:i}=o;return u.useEffect(()=>(n(),()=>i()),[n,i]),(0,d.jsx)(q,{...a,...t,ref:s})});ce.displayName=ue;var pe="PopoverTrigger",fe=u.forwardRef((r,s)=>{let{__scopePopover:e,...t}=r,o=y(pe,e),a=P(e),n=K(s,o.triggerRef),i=(0,d.jsx)(C.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":be(o.open),...t,ref:n,onClick:x(r.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:(0,d.jsx)(q,{asChild:!0,...a,children:i})});fe.displayName=pe;var k="PopoverPortal",[Be,We]=le(k,{forceMount:void 0}),ve=r=>{let{__scopePopover:s,forceMount:e,children:t,container:o}=r,a=y(k,s);return(0,d.jsx)(Be,{scope:s,forceMount:e,children:(0,d.jsx)(F,{present:e||a.open,children:(0,d.jsx)(Re,{asChild:!0,container:o,children:t})})})};ve.displayName=k;var j="PopoverContent",me=u.forwardRef((r,s)=>{let e=We(j,r.__scopePopover),{forceMount:t=e.forceMount,...o}=r,a=y(j,r.__scopePopover);return(0,d.jsx)(F,{present:t||a.open,children:a.modal?(0,d.jsx)(Ge,{...o,ref:s}):(0,d.jsx)(Je,{...o,ref:s})})});me.displayName=j;var Ze=Ie("PopoverContent.RemoveScroll"),Ge=u.forwardRef((r,s)=>{let e=y(j,r.__scopePopover),t=u.useRef(null),o=K(s,t),a=u.useRef(!1);return u.useEffect(()=>{let n=t.current;if(n)return Fe(n)},[]),(0,d.jsx)(Ee,{as:Ze,allowPinchZoom:!0,children:(0,d.jsx)(he,{...r,ref:o,trapFocus:e.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(r.onCloseAutoFocus,n=>{var i;n.preventDefault(),a.current||((i=e.triggerRef.current)==null||i.focus())}),onPointerDownOutside:x(r.onPointerDownOutside,n=>{let i=n.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;a.current=i.button===2||c},{checkForDefaultPrevented:!1}),onFocusOutside:x(r.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1})})})}),Je=u.forwardRef((r,s)=>{let e=y(j,r.__scopePopover),t=u.useRef(!1),o=u.useRef(!1);return(0,d.jsx)(he,{...r,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var n,i;(n=r.onCloseAutoFocus)==null||n.call(r,a),a.defaultPrevented||(t.current||((i=e.triggerRef.current)==null||i.focus()),a.preventDefault()),t.current=!1,o.current=!1},onInteractOutside:a=>{var i,c;(i=r.onInteractOutside)==null||i.call(r,a),a.defaultPrevented||(t.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let n=a.target;(c=e.triggerRef.current)!=null&&c.contains(n)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),he=u.forwardRef((r,s)=>{let{__scopePopover:e,trapFocus:t,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:n,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:m,onInteractOutside:p,...f}=r,l=y(j,e),v=P(e);return Pe(),(0,d.jsx)(Ne,{asChild:!0,loop:!0,trapped:t,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,d.jsx)(Oe,{asChild:!0,disableOutsidePointerEvents:n,onInteractOutside:p,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:m,onDismiss:()=>l.onOpenChange(!1),children:(0,d.jsx)(Se,{"data-state":be(l.open),role:"dialog",id:l.contentId,...v,...f,ref:s,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ge="PopoverClose",I=u.forwardRef((r,s)=>{let{__scopePopover:e,...t}=r,o=y(ge,e);return(0,d.jsx)(C.button,{type:"button",...t,ref:s,onClick:x(r.onClick,()=>o.onOpenChange(!1))})});I.displayName=ge;var Qe="PopoverArrow",Xe=u.forwardRef((r,s)=>{let{__scopePopover:e,...t}=r,o=P(e);return(0,d.jsx)(Me,{...o,...t,ref:s})});Xe.displayName=Qe;function be(r){return r?"open":"closed"}var Ye=de,eo=fe,oo=ve,xe=me,ro=I,to=V(),ao=Ye,no=eo,so=Ae(oo),io=ro,lo=_e(xe),ye=u.forwardRef((r,s)=>{let e=(0,to.c)(22),t,o,a,n,i,c;e[0]===r?(t=e[1],o=e[2],a=e[3],n=e[4],i=e[5],c=e[6]):({className:t,align:a,sideOffset:n,portal:i,scrollable:c,...o}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=a,e[4]=n,e[5]=i,e[6]=c);let m=a===void 0?"center":a,p=n===void 0?4:n,f=i===void 0?!0:i,l=c===void 0?!1:c,v=l&&"overflow-auto",g;e[7]!==t||e[8]!==v?(g=N("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t,v),e[7]=t,e[8]=v,e[9]=g):g=e[9];let w=l?`calc(var(--radix-popover-content-available-height) - ${De}px)`:void 0,h;e[10]!==o.style||e[11]!==w?(h={...o.style,maxHeight:w},e[10]=o.style,e[11]=w,e[12]=h):h=e[12];let b;e[13]!==m||e[14]!==o||e[15]!==s||e[16]!==p||e[17]!==g||e[18]!==h?(b=(0,d.jsx)(ke,{children:(0,d.jsx)(lo,{ref:s,align:m,sideOffset:p,className:g,style:h,...o})}),e[13]=m,e[14]=o,e[15]=s,e[16]=p,e[17]=g,e[18]=h,e[19]=b):b=e[19];let _=b;if(f){let R;return e[20]===_?R=e[21]:(R=(0,d.jsx)(so,{children:_}),e[20]=_,e[21]=R),R}return _});ye.displayName=xe.displayName;export{ce as a,ie as c,$e as d,no as i,ne as l,io as n,I as o,ye as r,Ue as s,ao as t,se as u};
function a(e,r){r||(r={});for(var t=r.prefix===void 0?"^":r.prefix,o=r.suffix===void 0?"\\b":r.suffix,n=0;n<e.length;n++)e[n]instanceof RegExp?e[n]=e[n].source:e[n]=e[n].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return RegExp(t+"("+e.join("|")+")"+o,"i")}var p="(?=[^A-Za-z\\d\\-_]|$)",u=/[\w\-:]/,m={keyword:a([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:p}),number:/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,operator:a([a(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/],{suffix:""}),builtin:a([/[A-Z]:|%|\?/i,a([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),a([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""})],{suffix:p}),punctuation:/[\[\]{},;`\\\.]|@[({]/,variable:/^[A-Za-z\_][A-Za-z\-\_\d]*\b/};function i(e,r){var t=r.returnStack[r.returnStack.length-1];if(t&&t.shouldReturnFrom(r))return r.tokenize=t.tokenize,r.returnStack.pop(),r.tokenize(e,r);if(e.eatSpace())return null;if(e.eat("("))return r.bracketNesting+=1,"punctuation";if(e.eat(")"))return--r.bracketNesting,"punctuation";for(var o in m)if(e.match(m[o]))return o;var n=e.next();if(n==="'")return d(e,r);if(n==="$")return c(e,r);if(n==='"')return S(e,r);if(n==="<"&&e.eat("#"))return r.tokenize=P,P(e,r);if(n==="#")return e.skipToEnd(),"comment";if(n==="@"){var l=e.eat(/["']/);if(l&&e.eol())return r.tokenize=s,r.startQuote=l[0],s(e,r);if(e.eol())return"error";if(e.peek().match(/[({]/))return"punctuation";if(e.peek().match(u))return c(e,r)}return"error"}function d(e,r){for(var t;(t=e.peek())!=null;)if(e.next(),t==="'"&&!e.eat("'"))return r.tokenize=i,"string";return"error"}function S(e,r){for(var t;(t=e.peek())!=null;){if(t==="$")return r.tokenize=v,"string";if(e.next(),t==="`"){e.next();continue}if(t==='"'&&!e.eat('"'))return r.tokenize=i,"string"}return"error"}function v(e,r){return f(e,r,S)}function b(e,r){return r.tokenize=s,r.startQuote='"',s(e,r)}function C(e,r){return f(e,r,b)}function f(e,r,t){if(e.match("$(")){var o=r.bracketNesting;return r.returnStack.push({shouldReturnFrom:function(n){return n.bracketNesting===o},tokenize:t}),r.tokenize=i,r.bracketNesting+=1,"punctuation"}else return e.next(),r.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:t}),r.tokenize=c,r.tokenize(e,r)}function P(e,r){for(var t=!1,o;(o=e.next())!=null;){if(t&&o==">"){r.tokenize=i;break}t=o==="#"}return"comment"}function c(e,r){var t=e.peek();return e.eat("{")?(r.tokenize=g,g(e,r)):t!=null&&t.match(u)?(e.eatWhile(u),r.tokenize=i,"variable"):(r.tokenize=i,"error")}function g(e,r){for(var t;(t=e.next())!=null;)if(t==="}"){r.tokenize=i;break}return"variable"}function s(e,r){var t=r.startQuote;if(e.sol()&&e.match(RegExp(t+"@")))r.tokenize=i;else if(t==='"')for(;!e.eol();){var o=e.peek();if(o==="$")return r.tokenize=C,"string";e.next(),o==="`"&&e.next()}else e.skipToEnd();return"string"}const k={name:"powershell",startState:function(){return{returnStack:[],bracketNesting:0,tokenize:i}},token:function(e,r){return r.tokenize(e,r)},languageData:{commentTokens:{line:"#",block:{open:"<#",close:"#>"}}}};export{k as t};
import{t as e}from"./powershell-6bdy_rHW.js";export{e as powerShell};
import{a as c}from"./defaultLocale-JieDVWC_.js";function e(r,t){return r==null||t==null?NaN:r<t?-1:r>t?1:r>=t?0:NaN}function N(r,t){return r==null||t==null?NaN:t<r?-1:t>r?1:t>=r?0:NaN}function g(r){let t,l,f;r.length===2?(t=r===e||r===N?r:x,l=r,f=r):(t=e,l=(n,u)=>e(r(n),u),f=(n,u)=>r(n)-u);function o(n,u,a=0,h=n.length){if(a<h){if(t(u,u)!==0)return h;do{let i=a+h>>>1;l(n[i],u)<0?a=i+1:h=i}while(a<h)}return a}function M(n,u,a=0,h=n.length){if(a<h){if(t(u,u)!==0)return h;do{let i=a+h>>>1;l(n[i],u)<=0?a=i+1:h=i}while(a<h)}return a}function s(n,u,a=0,h=n.length){let i=o(n,u,a,h-1);return i>a&&f(n[i-1],u)>-f(n[i],u)?i-1:i}return{left:o,center:s,right:M}}function x(){return 0}var b=Math.sqrt(50),p=Math.sqrt(10),q=Math.sqrt(2);function m(r,t,l){let f=(t-r)/Math.max(0,l),o=Math.floor(Math.log10(f)),M=f/10**o,s=M>=b?10:M>=p?5:M>=q?2:1,n,u,a;return o<0?(a=10**-o/s,n=Math.round(r*a),u=Math.round(t*a),n/a<r&&++n,u/a>t&&--u,a=-a):(a=10**o*s,n=Math.round(r/a),u=Math.round(t/a),n*a<r&&++n,u*a>t&&--u),u<n&&.5<=l&&l<2?m(r,t,l*2):[n,u,a]}function w(r,t,l){if(t=+t,r=+r,l=+l,!(l>0))return[];if(r===t)return[r];let f=t<r,[o,M,s]=f?m(t,r,l):m(r,t,l);if(!(M>=o))return[];let n=M-o+1,u=Array(n);if(f)if(s<0)for(let a=0;a<n;++a)u[a]=(M-a)/-s;else for(let a=0;a<n;++a)u[a]=(M-a)*s;else if(s<0)for(let a=0;a<n;++a)u[a]=(o+a)/-s;else for(let a=0;a<n;++a)u[a]=(o+a)*s;return u}function d(r,t,l){return t=+t,r=+r,l=+l,m(r,t,l)[2]}function v(r,t,l){t=+t,r=+r,l=+l;let f=t<r,o=f?d(t,r,l):d(r,t,l);return(f?-1:1)*(o<0?1/-o:o)}function y(r){return Math.max(0,-c(Math.abs(r)))}function A(r,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(c(t)/3)))*3-c(Math.abs(r)))}function j(r,t){return r=Math.abs(r),t=Math.abs(t)-r,Math.max(0,c(t)-c(r))+1}export{v as a,e as c,d as i,A as n,w as o,y as r,g as s,j as t};
var v="modulepreload",y=function(u,o){return new URL(u,o).href},m={};const E=function(u,o,d){let f=Promise.resolve();if(o&&o.length>0){let p=function(t){return Promise.all(t.map(l=>Promise.resolve(l).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))},n=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),h=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));f=p(o.map(t=>{if(t=y(t,d),t in m)return;m[t]=!0;let l=t.endsWith(".css"),s=l?'[rel="stylesheet"]':"";if(d)for(let a=n.length-1;a>=0;a--){let c=n[a];if(c.href===t&&(!l||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;let r=document.createElement("link");if(r.rel=l?"stylesheet":v,l||(r.as="script"),r.crossOrigin="",r.href=t,h&&r.setAttribute("nonce",h),document.head.appendChild(r),l)return new Promise((a,c)=>{r.addEventListener("load",a),r.addEventListener("error",()=>c(Error(`Unable to preload CSS for ${t}`)))})}))}function i(n){let e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=n,window.dispatchEvent(e),!e.defaultPrevented)throw n}return f.then(n=>{for(let e of n||[])e.status==="rejected"&&i(e.reason);return u().catch(i)})};export{E as t};
import{G as a,K as i,q as m}from"./cells-DPp5cDaO.js";function e(t){return t.mimetype.startsWith("application/vnd.marimo")||t.mimetype==="text/html"?m(a.asString(t.data)):i(a.asString(t.data))}export{e as t};
import{t as o}from"./chunk-LvLJmgfZ.js";var f=o(((a,t)=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"})),u=o(((a,t)=>{var c=f();function p(){}function i(){}i.resetWarningCache=p,t.exports=function(){function e(h,m,T,O,_,y){if(y!==c){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}e.isRequired=e;function r(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:p};return n.PropTypes=n,n}})),l=o(((a,t)=>{t.exports=u()()}));export{l as t};
import{t as r}from"./properties-p1rx3aF7.js";export{r as properties};
const l={name:"properties",token:function(n,i){var o=n.sol()||i.afterSection,t=n.eol();if(i.afterSection=!1,o&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),t&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),o)for(;n.eatSpace(););var e=n.next();return o&&(e==="#"||e==="!"||e===";")?(i.position="comment",n.skipToEnd(),"comment"):o&&e==="["?(i.afterSection=!0,n.skipTo("]"),n.eat("]"),"header"):e==="="||e===":"?(i.position="quote",null):(e==="\\"&&i.position==="quote"&&n.eol()&&(i.nextMultiline=!0),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}};export{l as t};
import{t as o}from"./protobuf-BZ6p9Xh_.js";export{o as protobuf};
function e(t){return RegExp("^(("+t.join(")|(")+"))\\b","i")}var a="package.message.import.syntax.required.optional.repeated.reserved.default.extensions.packed.bool.bytes.double.enum.float.string.int32.int64.uint32.uint64.sint32.sint64.fixed32.fixed64.sfixed32.sfixed64.option.service.rpc.returns".split("."),n=e(a),i=RegExp("^[_A-Za-z\xA1-\uFFFF][_A-Za-z0-9\xA1-\uFFFF]*");function o(t){return t.eatSpace()?null:t.match("//")?(t.skipToEnd(),"comment"):t.match(/^[0-9\.+-]/,!1)&&(t.match(/^[+-]?0x[0-9a-fA-F]+/)||t.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||t.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":t.match(/^"([^"]|(""))*"/)||t.match(/^'([^']|(''))*'/)?"string":t.match(n)?"keyword":t.match(i)?"variable":(t.next(),null)}const r={name:"protobuf",token:o,languageData:{autocomplete:a}};export{r as t};
import{t as o}from"./pug-NA-6TsNe.js";export{o as pug};
import{t as e}from"./javascript-CsBr0q2-.js";var s={"{":"}","(":")","[":"]"};function p(i){if(typeof i!="object")return i;let t={};for(let n in i){let r=i[n];t[n]=r instanceof Array?r.slice():r}return t}var l=class f{constructor(t){this.indentUnit=t,this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=e.startState(t),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken=""}copy(){var t=new f(this.indentUnit);return t.javaScriptLine=this.javaScriptLine,t.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,t.javaScriptArguments=this.javaScriptArguments,t.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,t.isInterpolating=this.isInterpolating,t.interpolationNesting=this.interpolationNesting,t.jsState=(e.copyState||p)(this.jsState),t.restOfLine=this.restOfLine,t.isIncludeFiltered=this.isIncludeFiltered,t.isEach=this.isEach,t.lastTag=this.lastTag,t.isAttrs=this.isAttrs,t.attrsNest=this.attrsNest.slice(),t.inAttributeName=this.inAttributeName,t.attributeIsType=this.attributeIsType,t.attrValue=this.attrValue,t.indentOf=this.indentOf,t.indentToken=this.indentToken,t}};function h(i,t){if(i.sol()&&(t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1),t.javaScriptLine){if(t.javaScriptLineExcludesColon&&i.peek()===":"){t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1;return}var n=e.token(i,t.jsState);return i.eol()&&(t.javaScriptLine=!1),n||!0}}function m(i,t){if(t.javaScriptArguments){if(t.javaScriptArgumentsDepth===0&&i.peek()!=="("){t.javaScriptArguments=!1;return}if(i.peek()==="("?t.javaScriptArgumentsDepth++:i.peek()===")"&&t.javaScriptArgumentsDepth--,t.javaScriptArgumentsDepth===0){t.javaScriptArguments=!1;return}return e.token(i,t.jsState)||!0}}function d(i){if(i.match(/^yield\b/))return"keyword"}function v(i){if(i.match(/^(?:doctype) *([^\n]+)?/))return"meta"}function c(i,t){if(i.match("#{"))return t.isInterpolating=!0,t.interpolationNesting=0,"punctuation"}function S(i,t){if(t.isInterpolating){if(i.peek()==="}"){if(t.interpolationNesting--,t.interpolationNesting<0)return i.next(),t.isInterpolating=!1,"punctuation"}else i.peek()==="{"&&t.interpolationNesting++;return e.token(i,t.jsState)||!0}}function j(i,t){if(i.match(/^case\b/))return t.javaScriptLine=!0,"keyword"}function g(i,t){if(i.match(/^when\b/))return t.javaScriptLine=!0,t.javaScriptLineExcludesColon=!0,"keyword"}function k(i){if(i.match(/^default\b/))return"keyword"}function b(i,t){if(i.match(/^extends?\b/))return t.restOfLine="string","keyword"}function A(i,t){if(i.match(/^append\b/))return t.restOfLine="variable","keyword"}function L(i,t){if(i.match(/^prepend\b/))return t.restOfLine="variable","keyword"}function y(i,t){if(i.match(/^block\b *(?:(prepend|append)\b)?/))return t.restOfLine="variable","keyword"}function w(i,t){if(i.match(/^include\b/))return t.restOfLine="string","keyword"}function N(i,t){if(i.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&i.match("include"))return t.isIncludeFiltered=!0,"keyword"}function x(i,t){if(t.isIncludeFiltered){var n=u(i,t);return t.isIncludeFiltered=!1,t.restOfLine="string",n}}function T(i,t){if(i.match(/^mixin\b/))return t.javaScriptLine=!0,"keyword"}function I(i,t){if(i.match(/^\+([-\w]+)/))return i.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),"variable";if(i.match("+#{",!1))return i.next(),t.mixinCallAfter=!0,c(i,t)}function O(i,t){if(t.mixinCallAfter)return t.mixinCallAfter=!1,i.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),!0}function E(i,t){if(i.match(/^(if|unless|else if|else)\b/))return t.javaScriptLine=!0,"keyword"}function C(i,t){if(i.match(/^(- *)?(each|for)\b/))return t.isEach=!0,"keyword"}function D(i,t){if(t.isEach){if(i.match(/^ in\b/))return t.javaScriptLine=!0,t.isEach=!1,"keyword";if(i.sol()||i.eol())t.isEach=!1;else if(i.next()){for(;!i.match(/^ in\b/,!1)&&i.next(););return"variable"}}}function F(i,t){if(i.match(/^while\b/))return t.javaScriptLine=!0,"keyword"}function V(i,t){var n;if(n=i.match(/^(\w(?:[-:\w]*\w)?)\/?/))return t.lastTag=n[1].toLowerCase(),"tag"}function u(i,t){if(i.match(/^:([\w\-]+)/))return a(i,t),"atom"}function U(i,t){if(i.match(/^(!?=|-)/))return t.javaScriptLine=!0,"punctuation"}function z(i){if(i.match(/^#([\w-]+)/))return"builtin"}function B(i){if(i.match(/^\.([\w-]+)/))return"className"}function G(i,t){if(i.peek()=="(")return i.next(),t.isAttrs=!0,t.attrsNest=[],t.inAttributeName=!0,t.attrValue="",t.attributeIsType=!1,"punctuation"}function o(i,t){if(t.isAttrs){if(s[i.peek()]&&t.attrsNest.push(s[i.peek()]),t.attrsNest[t.attrsNest.length-1]===i.peek())t.attrsNest.pop();else if(i.eat(")"))return t.isAttrs=!1,"punctuation";if(t.inAttributeName&&i.match(/^[^=,\)!]+/))return(i.peek()==="="||i.peek()==="!")&&(t.inAttributeName=!1,t.jsState=e.startState(2),t.lastTag==="script"&&i.current().trim().toLowerCase()==="type"?t.attributeIsType=!0:t.attributeIsType=!1),"attribute";var n=e.token(i,t.jsState);if(t.attrsNest.length===0&&(n==="string"||n==="variable"||n==="keyword"))try{return Function("","var x "+t.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),t.inAttributeName=!0,t.attrValue="",i.backUp(i.current().length),o(i,t)}catch{}return t.attrValue+=i.current(),n||!0}}function H(i,t){if(i.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,"keyword"}function K(i){if(i.sol()&&i.eatSpace())return"indent"}function M(i,t){if(i.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=i.indentation(),t.indentToken="comment","comment"}function P(i){if(i.match(/^: */))return"colon"}function R(i,t){if(i.match(/^(?:\| ?| )([^\n]+)/))return"string";if(i.match(/^(<[^\n]*)/,!1))return a(i,t),i.skipToEnd(),t.indentToken}function W(i,t){if(i.eat("."))return a(i,t),"dot"}function Z(i){return i.next(),null}function a(i,t){t.indentOf=i.indentation(),t.indentToken="string"}function $(i,t){if(i.sol()&&(t.restOfLine=""),t.restOfLine){i.skipToEnd();var n=t.restOfLine;return t.restOfLine="",n}}function q(i){return new l(i)}function J(i){return i.copy()}function Q(i,t){var n=$(i,t)||S(i,t)||x(i,t)||D(i,t)||o(i,t)||h(i,t)||m(i,t)||O(i,t)||d(i)||v(i)||c(i,t)||j(i,t)||g(i,t)||k(i)||b(i,t)||A(i,t)||L(i,t)||y(i,t)||w(i,t)||N(i,t)||T(i,t)||I(i,t)||E(i,t)||C(i,t)||F(i,t)||V(i,t)||u(i,t)||U(i,t)||z(i)||B(i)||G(i,t)||H(i,t)||K(i)||R(i,t)||M(i,t)||P(i)||W(i,t)||Z(i);return n===!0?null:n}const X={startState:q,copyState:J,token:Q};export{X as t};
import{t as p}from"./puppet-CjdIRV7D.js";export{p as puppet};
var c={},l=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;function s(e,t){for(var a=t.split(" "),n=0;n<a.length;n++)c[a[n]]=e}s("keyword","class define site node include import inherits"),s("keyword","case if else in and elsif default or"),s("atom","false true running present absent file directory undef"),s("builtin","action augeas burst chain computer cron destination dport exec file filebucket group host icmp iniface interface jump k5login limit log_level log_prefix macauthorization mailalias maillist mcx mount nagios_command nagios_contact nagios_contactgroup nagios_host nagios_hostdependency nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo nagios_servicegroup nagios_timeperiod name notify outiface package proto reject resources router schedule scheduled_task selboolean selmodule service source sport ssh_authorized_key sshkey stage state table tidy todest toports tosource user vlan yumrepo zfs zone zpool");function r(e,t){for(var a,n,o=!1;!e.eol()&&(a=e.next())!=t.pending;){if(a==="$"&&n!="\\"&&t.pending=='"'){o=!0;break}n=a}return o&&e.backUp(1),a==t.pending?t.continueString=!1:t.continueString=!0,"string"}function p(e,t){var a=e.match(/[\w]+/,!1),n=e.match(/(\s+)?\w+\s+=>.*/,!1),o=e.match(/(\s+)?[\w:_]+(\s+)?{/,!1),u=e.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),i=e.next();if(i==="$")return e.match(l)?t.continueString?"variableName.special":"variable":"error";if(t.continueString)return e.backUp(1),r(e,t);if(t.inDefinition){if(e.match(/(\s+)?[\w:_]+(\s+)?/))return"def";e.match(/\s+{/),t.inDefinition=!1}return t.inInclude?(e.match(/(\s+)?\S+(\s+)?/),t.inInclude=!1,"def"):e.match(/(\s+)?\w+\(/)?(e.backUp(1),"def"):n?(e.match(/(\s+)?\w+/),"tag"):a&&c.hasOwnProperty(a)?(e.backUp(1),e.match(/[\w]+/),e.match(/\s+\S+\s+{/,!1)&&(t.inDefinition=!0),a=="include"&&(t.inInclude=!0),c[a]):/(^|\s+)[A-Z][\w:_]+/.test(a)?(e.backUp(1),e.match(/(^|\s+)[A-Z][\w:_]+/),"def"):o?(e.match(/(\s+)?[\w:_]+/),"def"):u?(e.match(/(\s+)?[@]{1,2}/),"atom"):i=="#"?(e.skipToEnd(),"comment"):i=="'"||i=='"'?(t.pending=i,r(e,t)):i=="{"||i=="}"?"bracket":i=="/"?(e.match(/^[^\/]*\//),"string.special"):i.match(/[0-9]/)?(e.eatWhile(/[0-9]+/),"number"):i=="="?(e.peek()==">"&&e.next(),"operator"):(e.eatWhile(/[\w-]/),null)}const d={name:"puppet",startState:function(){var e={};return e.inDefinition=!1,e.inInclude=!1,e.continueString=!1,e.pending=!1,e},token:function(e,t){return e.eatSpace()?null:p(e,t)}};export{d as t};
var{entries:rt,setPrototypeOf:ot,isFrozen:Ht,getPrototypeOf:Bt,getOwnPropertyDescriptor:Gt}=Object,{freeze:_,seal:b,create:De}=Object,{apply:at,construct:it}=typeof Reflect<"u"&&Reflect;_||(_=function(o){return o}),b||(b=function(o){return o}),at||(at=function(o,r){var c=[...arguments].slice(2);return o.apply(r,c)}),it||(it=function(o){return new o(...[...arguments].slice(1))});var le=A(Array.prototype.forEach),Wt=A(Array.prototype.lastIndexOf),lt=A(Array.prototype.pop),q=A(Array.prototype.push),Yt=A(Array.prototype.splice),ce=A(String.prototype.toLowerCase),Ce=A(String.prototype.toString),we=A(String.prototype.match),$=A(String.prototype.replace),jt=A(String.prototype.indexOf),Xt=A(String.prototype.trim),N=A(Object.prototype.hasOwnProperty),E=A(RegExp.prototype.test),K=qt(TypeError);function A(o){return function(r){r instanceof RegExp&&(r.lastIndex=0);var c=[...arguments].slice(1);return at(o,r,c)}}function qt(o){return function(){return it(o,[...arguments])}}function a(o,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ot&&ot(o,null);let s=r.length;for(;s--;){let S=r[s];if(typeof S=="string"){let R=c(S);R!==S&&(Ht(r)||(r[s]=R),S=R)}o[S]=!0}return o}function $t(o){for(let r=0;r<o.length;r++)N(o,r)||(o[r]=null);return o}function C(o){let r=De(null);for(let[c,s]of rt(o))N(o,c)&&(Array.isArray(s)?r[c]=$t(s):s&&typeof s=="object"&&s.constructor===Object?r[c]=C(s):r[c]=s);return r}function V(o,r){for(;o!==null;){let s=Gt(o,r);if(s){if(s.get)return A(s.get);if(typeof s.value=="function")return A(s.value)}o=Bt(o)}function c(){return null}return c}var ct=_("a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")),ve=_("svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")),Oe=_(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Kt=_(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ke=_("math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")),Vt=_(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),st=_(["#text"]),ut=_("accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot".split(".")),Le=_("accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")),mt=_("accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")),se=_(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Zt=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Jt=b(/<%[\w\W]*|[\w\W]*%>/gm),Qt=b(/\$\{[\w\W]*/gm),en=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),tn=b(/^aria-[\-\w]+$/),pt=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nn=b(/^(?:\w+script|data):/i),rn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ft=b(/^html$/i),on=b(/^[a-z][.\w]*(-[.\w]+)+$/i),dt=Object.freeze({__proto__:null,ARIA_ATTR:tn,ATTR_WHITESPACE:rn,CUSTOM_ELEMENT:on,DATA_ATTR:en,DOCTYPE_NAME:ft,ERB_EXPR:Jt,IS_ALLOWED_URI:pt,IS_SCRIPT_OR_DATA:nn,MUSTACHE_EXPR:Zt,TMPLIT_EXPR:Qt}),Z={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},an=function(){return typeof window>"u"?null:window},ln=function(o,r){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let c=null,s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(c=r.getAttribute(s));let S="dompurify"+(c?"#"+c:"");try{return o.createPolicy(S,{createHTML(R){return R},createScriptURL(R){return R}})}catch{return console.warn("TrustedTypes policy "+S+" could not be created."),null}},gt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ht(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:an(),r=e=>ht(e);if(r.version="3.3.1",r.removed=[],!o||!o.document||o.document.nodeType!==Z.document||!o.Element)return r.isSupported=!1,r;let{document:c}=o,s=c,S=s.currentScript,{DocumentFragment:R,HTMLTemplateElement:Tt,Node:ue,Element:xe,NodeFilter:B,NamedNodeMap:yt=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Et,DOMParser:At,trustedTypes:J}=o,G=xe.prototype,_t=V(G,"cloneNode"),bt=V(G,"remove"),Nt=V(G,"nextSibling"),St=V(G,"childNodes"),Q=V(G,"parentNode");if(typeof Tt=="function"){let e=c.createElement("template");e.content&&e.content.ownerDocument&&(c=e.content.ownerDocument)}let h,W="",{implementation:me,createNodeIterator:Rt,createDocumentFragment:Dt,getElementsByTagName:Ct}=c,{importNode:wt}=s,T=gt();r.isSupported=typeof rt=="function"&&typeof Q=="function"&&me&&me.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:pe,ERB_EXPR:fe,TMPLIT_EXPR:de,DATA_ATTR:vt,ARIA_ATTR:Ot,IS_SCRIPT_OR_DATA:kt,ATTR_WHITESPACE:Ie,CUSTOM_ELEMENT:Lt}=dt,{IS_ALLOWED_URI:Me}=dt,p=null,Ue=a({},[...ct,...ve,...Oe,...ke,...st]),f=null,Pe=a({},[...ut,...Le,...mt,...se]),u=Object.seal(De(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,ge=null,M=Object.seal(De(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Fe=!0,he=!0,ze=!1,He=!0,U=!1,ee=!0,k=!1,Te=!1,ye=!1,P=!1,te=!1,ne=!1,Be=!0,Ge=!1,Ee=!0,j=!1,F={},D=null,Ae=a({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),We=null,Ye=a({},["audio","video","img","source","image","track"]),_e=null,je=a({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",w="http://www.w3.org/1999/xhtml",z=w,be=!1,Ne=null,xt=a({},[re,oe,w],Ce),ae=a({},["mi","mo","mn","ms","mtext"]),ie=a({},["annotation-xml"]),It=a({},["title","style","font","a","script"]),X=null,Mt=["application/xhtml+xml","text/html"],m=null,H=null,Ut=c.createElement("form"),Xe=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),X=Mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?"text/html":e.PARSER_MEDIA_TYPE,m=X==="application/xhtml+xml"?Ce:ce,p=N(e,"ALLOWED_TAGS")?a({},e.ALLOWED_TAGS,m):Ue,f=N(e,"ALLOWED_ATTR")?a({},e.ALLOWED_ATTR,m):Pe,Ne=N(e,"ALLOWED_NAMESPACES")?a({},e.ALLOWED_NAMESPACES,Ce):xt,_e=N(e,"ADD_URI_SAFE_ATTR")?a(C(je),e.ADD_URI_SAFE_ATTR,m):je,We=N(e,"ADD_DATA_URI_TAGS")?a(C(Ye),e.ADD_DATA_URI_TAGS,m):Ye,D=N(e,"FORBID_CONTENTS")?a({},e.FORBID_CONTENTS,m):Ae,Y=N(e,"FORBID_TAGS")?a({},e.FORBID_TAGS,m):C({}),ge=N(e,"FORBID_ATTR")?a({},e.FORBID_ATTR,m):C({}),F=N(e,"USE_PROFILES")?e.USE_PROFILES:!1,Fe=e.ALLOW_ARIA_ATTR!==!1,he=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,He=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,U=e.SAFE_FOR_TEMPLATES||!1,ee=e.SAFE_FOR_XML!==!1,k=e.WHOLE_DOCUMENT||!1,P=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,Be=e.SANITIZE_DOM!==!1,Ge=e.SANITIZE_NAMED_PROPS||!1,Ee=e.KEEP_CONTENT!==!1,j=e.IN_PLACE||!1,Me=e.ALLOWED_URI_REGEXP||pt,z=e.NAMESPACE||w,ae=e.MATHML_TEXT_INTEGRATION_POINTS||ae,ie=e.HTML_INTEGRATION_POINTS||ie,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Xe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Xe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),U&&(he=!1),te&&(P=!0),F&&(p=a({},st),f=[],F.html===!0&&(a(p,ct),a(f,ut)),F.svg===!0&&(a(p,ve),a(f,Le),a(f,se)),F.svgFilters===!0&&(a(p,Oe),a(f,Le),a(f,se)),F.mathMl===!0&&(a(p,ke),a(f,mt),a(f,se))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?M.tagCheck=e.ADD_TAGS:(p===Ue&&(p=C(p)),a(p,e.ADD_TAGS,m))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?M.attributeCheck=e.ADD_ATTR:(f===Pe&&(f=C(f)),a(f,e.ADD_ATTR,m))),e.ADD_URI_SAFE_ATTR&&a(_e,e.ADD_URI_SAFE_ATTR,m),e.FORBID_CONTENTS&&(D===Ae&&(D=C(D)),a(D,e.FORBID_CONTENTS,m)),e.ADD_FORBID_CONTENTS&&(D===Ae&&(D=C(D)),a(D,e.ADD_FORBID_CONTENTS,m)),Ee&&(p["#text"]=!0),k&&a(p,["html","head","body"]),p.table&&(a(p,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');h=e.TRUSTED_TYPES_POLICY,W=h.createHTML("")}else h===void 0&&(h=ln(J,S)),h!==null&&typeof W=="string"&&(W=h.createHTML(""));_&&_(e),H=e}},qe=a({},[...ve,...Oe,...Kt]),$e=a({},[...ke,...Vt]),Pt=function(e){let n=Q(e);(!n||!n.tagName)&&(n={namespaceURI:z,tagName:"template"});let t=ce(e.tagName),i=ce(n.tagName);return Ne[e.namespaceURI]?e.namespaceURI===oe?n.namespaceURI===w?t==="svg":n.namespaceURI===re?t==="svg"&&(i==="annotation-xml"||ae[i]):!!qe[t]:e.namespaceURI===re?n.namespaceURI===w?t==="math":n.namespaceURI===oe?t==="math"&&ie[i]:!!$e[t]:e.namespaceURI===w?n.namespaceURI===oe&&!ie[i]||n.namespaceURI===re&&!ae[i]?!1:!$e[t]&&(It[t]||!qe[t]):!!(X==="application/xhtml+xml"&&Ne[e.namespaceURI]):!1},L=function(e){q(r.removed,{element:e});try{Q(e).removeChild(e)}catch{bt(e)}},x=function(e,n){try{q(r.removed,{attribute:n.getAttributeNode(e),from:n})}catch{q(r.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is")if(P||te)try{L(n)}catch{}else try{n.setAttribute(e,"")}catch{}},Ke=function(e){let n=null,t=null;if(ye)e="<remove></remove>"+e;else{let y=we(e,/^[\r\n\t ]+/);t=y&&y[0]}X==="application/xhtml+xml"&&z===w&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let i=h?h.createHTML(e):e;if(z===w)try{n=new At().parseFromString(i,X)}catch{}if(!n||!n.documentElement){n=me.createDocument(z,"template",null);try{n.documentElement.innerHTML=be?W:i}catch{}}let l=n.body||n.documentElement;return e&&t&&l.insertBefore(c.createTextNode(t),l.childNodes[0]||null),z===w?Ct.call(n,k?"html":"body")[0]:k?n.documentElement:l},Ve=function(e){return Rt.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof Et&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof yt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},Ze=function(e){return typeof ue=="function"&&e instanceof ue};function v(e,n,t){le(e,i=>{i.call(r,n,t,H)})}let Je=function(e){let n=null;if(v(T.beforeSanitizeElements,e,null),Re(e))return L(e),!0;let t=m(e.nodeName);if(v(T.uponSanitizeElement,e,{tagName:t,allowedTags:p}),ee&&e.hasChildNodes()&&!Ze(e.firstElementChild)&&E(/<[/\w!]/g,e.innerHTML)&&E(/<[/\w!]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ee&&e.nodeType===Z.comment&&E(/<[/\w]/g,e.data))return L(e),!0;if(!(M.tagCheck instanceof Function&&M.tagCheck(t))&&(!p[t]||Y[t])){if(!Y[t]&&et(t)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t)))return!1;if(Ee&&!D[t]){let i=Q(e)||e.parentNode,l=St(e)||e.childNodes;if(l&&i){let y=l.length;for(let I=y-1;I>=0;--I){let g=_t(l[I],!0);g.__removalCount=(e.__removalCount||0)+1,i.insertBefore(g,Nt(e))}}}return L(e),!0}return e instanceof xe&&!Pt(e)||(t==="noscript"||t==="noembed"||t==="noframes")&&E(/<\/no(script|embed|frames)/i,e.innerHTML)?(L(e),!0):(U&&e.nodeType===Z.text&&(n=e.textContent,le([pe,fe,de],i=>{n=$(n,i," ")}),e.textContent!==n&&(q(r.removed,{element:e.cloneNode()}),e.textContent=n)),v(T.afterSanitizeElements,e,null),!1)},Qe=function(e,n,t){if(Be&&(n==="id"||n==="name")&&(t in c||t in Ut))return!1;if(!(he&&!ge[n]&&E(vt,n))&&!(Fe&&E(Ot,n))&&!(M.attributeCheck instanceof Function&&M.attributeCheck(n,e))){if(!f[n]||ge[n]){if(!(et(e)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&E(u.attributeNameCheck,n)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(n,e))||n==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t))))return!1}else if(!_e[n]&&!E(Me,$(t,Ie,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&jt(t,"data:")===0&&We[e])&&!(ze&&!E(kt,$(t,Ie,"")))&&t)return!1}return!0},et=function(e){return e!=="annotation-xml"&&we(e,Lt)},tt=function(e){v(T.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Re(e))return;let t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:l,namespaceURI:y,value:I}=n[i],g=m(l),O=I,d=l==="value"?O:Xt(O);if(t.attrName=g,t.attrValue=d,t.keepAttr=!0,t.forceKeepAttr=void 0,v(T.uponSanitizeAttribute,e,t),d=t.attrValue,Ge&&(g==="id"||g==="name")&&(x(l,e),d="user-content-"+d),ee&&E(/((--!?|])>)|<\/(style|title|textarea)/i,d)){x(l,e);continue}if(g==="attributename"&&we(d,"href")){x(l,e);continue}if(t.forceKeepAttr)continue;if(!t.keepAttr){x(l,e);continue}if(!He&&E(/\/>/i,d)){x(l,e);continue}U&&le([pe,fe,de],zt=>{d=$(d,zt," ")});let nt=m(e.nodeName);if(!Qe(nt,g,d)){x(l,e);continue}if(h&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!y)switch(J.getAttributeType(nt,g)){case"TrustedHTML":d=h.createHTML(d);break;case"TrustedScriptURL":d=h.createScriptURL(d);break}if(d!==O)try{y?e.setAttributeNS(y,l,d):e.setAttribute(l,d),Re(e)?L(e):lt(r.removed)}catch{x(l,e)}}v(T.afterSanitizeAttributes,e,null)},Ft=function e(n){let t=null,i=Ve(n);for(v(T.beforeSanitizeShadowDOM,n,null);t=i.nextNode();)v(T.uponSanitizeShadowNode,t,null),Je(t),tt(t),t.content instanceof R&&e(t.content);v(T.afterSanitizeShadowDOM,n,null)};return r.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,i=null,l=null,y=null;if(be=!e,be&&(e="<!-->"),typeof e!="string"&&!Ze(e))if(typeof e.toString=="function"){if(e=e.toString(),typeof e!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!r.isSupported)return e;if(Te||Se(n),r.removed=[],typeof e=="string"&&(j=!1),j){if(e.nodeName){let O=m(e.nodeName);if(!p[O]||Y[O])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof ue)t=Ke("<!---->"),i=t.ownerDocument.importNode(e,!0),i.nodeType===Z.element&&i.nodeName==="BODY"||i.nodeName==="HTML"?t=i:t.appendChild(i);else{if(!P&&!U&&!k&&e.indexOf("<")===-1)return h&&ne?h.createHTML(e):e;if(t=Ke(e),!t)return P?null:ne?W:""}t&&ye&&L(t.firstChild);let I=Ve(j?e:t);for(;l=I.nextNode();)Je(l),tt(l),l.content instanceof R&&Ft(l.content);if(j)return e;if(P){if(te)for(y=Dt.call(t.ownerDocument);t.firstChild;)y.appendChild(t.firstChild);else y=t;return(f.shadowroot||f.shadowrootmode)&&(y=wt.call(s,y,!0)),y}let g=k?t.outerHTML:t.innerHTML;return k&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(ft,t.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
`+g),U&&le([pe,fe,de],O=>{g=$(g,O," ")}),h&&ne?h.createHTML(g):g},r.setConfig=function(){Se(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Te=!0},r.clearConfig=function(){H=null,Te=!1},r.isValidAttribute=function(e,n,t){return H||Se({}),Qe(m(e),m(n),t)},r.addHook=function(e,n){typeof n=="function"&&q(T[e],n)},r.removeHook=function(e,n){if(n!==void 0){let t=Wt(T[e],n);return t===-1?void 0:Yt(T[e],t,1)[0]}return lt(T[e])},r.removeHooks=function(e){T[e]=[]},r.removeAllHooks=function(){T=gt()},r}var cn=ht();export{cn as t};
import{n as t,r as a,t as o}from"./python-uzyJYIWU.js";export{o as cython,t as mkPython,a as python};
function k(i){return RegExp("^(("+i.join(")|(")+"))\\b")}var Z=k(["and","or","not","is"]),L="as.assert.break.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.lambda.pass.raise.return.try.while.with.yield.in.False.True".split("."),O="abs.all.any.bin.bool.bytearray.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip.__import__.NotImplemented.Ellipsis.__debug__".split(".");function s(i){return i.scopes[i.scopes.length-1]}function v(i){for(var u="error",S=i.delimiters||i.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,d=[i.singleOperators,i.doubleOperators,i.doubleDelimiters,i.tripleDelimiters,i.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],m=0;m<d.length;m++)d[m]||d.splice(m--,1);var g=i.hangingIndent,f=L,p=O;i.extra_keywords!=null&&(f=f.concat(i.extra_keywords)),i.extra_builtins!=null&&(p=p.concat(i.extra_builtins));var x=!(i.version&&Number(i.version)<3);if(x){var h=i.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;f=f.concat(["nonlocal","None","aiter","anext","async","await","breakpoint","match","case"]),p=p.concat(["ascii","bytes","exec","print"]);var _=RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`,"i")}else{var h=i.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;f=f.concat(["exec","print"]),p=p.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","None"]);var _=RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`,"i")}var E=k(f),A=k(p);function z(e,n){var r=e.sol()&&n.lastToken!="\\";if(r&&(n.indent=e.indentation()),r&&s(n).type=="py"){var t=s(n).offset;if(e.eatSpace()){var o=e.indentation();return o>t?w(e,n):o<t&&T(e,n)&&e.peek()!="#"&&(n.errorToken=!0),null}else{var l=y(e,n);return t>0&&T(e,n)&&(l+=" "+u),l}}return y(e,n)}function y(e,n,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var t=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(t=!0),e.match(/^[\d_]+\.\d*/)&&(t=!0),e.match(/^\.\d+/)&&(t=!0),t)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(_))return e.current().toLowerCase().indexOf("f")===-1?(n.tokenize=I(e.current(),n.tokenize),n.tokenize(e,n)):(n.tokenize=D(e.current(),n.tokenize),n.tokenize(e,n));for(var l=0;l<d.length;l++)if(e.match(d[l]))return"operator";return e.match(S)?"punctuation":n.lastToken=="."&&e.match(h)?"property":e.match(E)||e.match(Z)?"keyword":e.match(A)?"builtin":e.match(/^(self|cls)\b/)?"self":e.match(h)?n.lastToken=="def"||n.lastToken=="class"?"def":"variable":(e.next(),r?null:u)}function D(e,n){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var r=e.length==1,t="string";function o(a){return function(c,b){var F=y(c,b,!0);return F=="punctuation"&&(c.current()=="{"?b.tokenize=o(a+1):c.current()=="}"&&(a>1?b.tokenize=o(a-1):b.tokenize=l)),F}}function l(a,c){for(;!a.eol();)if(a.eatWhile(/[^'"\{\}\\]/),a.eat("\\")){if(a.next(),r&&a.eol())return t}else{if(a.match(e))return c.tokenize=n,t;if(a.match("{{"))return t;if(a.match("{",!1))return c.tokenize=o(0),a.current()?t:c.tokenize(a,c);if(a.match("}}"))return t;if(a.match("}"))return u;a.eat(/['"]/)}if(r){if(i.singleLineStringErrors)return u;c.tokenize=n}return t}return l.isString=!0,l}function I(e,n){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var r=e.length==1,t="string";function o(l,a){for(;!l.eol();)if(l.eatWhile(/[^'"\\]/),l.eat("\\")){if(l.next(),r&&l.eol())return t}else{if(l.match(e))return a.tokenize=n,t;l.eat(/['"]/)}if(r){if(i.singleLineStringErrors)return u;a.tokenize=n}return t}return o.isString=!0,o}function w(e,n){for(;s(n).type!="py";)n.scopes.pop();n.scopes.push({offset:s(n).offset+e.indentUnit,type:"py",align:null})}function C(e,n,r){var t=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;n.scopes.push({offset:n.indent+(g||e.indentUnit),type:r,align:t})}function T(e,n){for(var r=e.indentation();n.scopes.length>1&&s(n).offset>r;){if(s(n).type!="py")return!0;n.scopes.pop()}return s(n).offset!=r}function N(e,n){e.sol()&&(n.beginningOfLine=!0,n.dedent=!1);var r=n.tokenize(e,n),t=e.current();if(n.beginningOfLine&&t=="@")return e.match(h,!1)?"meta":x?"operator":u;if(/\S/.test(t)&&(n.beginningOfLine=!1),(r=="variable"||r=="builtin")&&n.lastToken=="meta"&&(r="meta"),(t=="pass"||t=="return")&&(n.dedent=!0),t=="lambda"&&(n.lambda=!0),t==":"&&!n.lambda&&s(n).type=="py"&&e.match(/^\s*(?:#|$)/,!1)&&w(e,n),t.length==1&&!/string|comment/.test(r)){var o="[({".indexOf(t);if(o!=-1&&C(e,n,"])}".slice(o,o+1)),o="])}".indexOf(t),o!=-1)if(s(n).type==t)n.indent=n.scopes.pop().offset-(g||e.indentUnit);else return u}return n.dedent&&e.eol()&&s(n).type=="py"&&n.scopes.length>1&&n.scopes.pop(),r}return{name:"python",startState:function(){return{tokenize:z,scopes:[{offset:0,type:"py",align:null}],indent:0,lastToken:null,lambda:!1,dedent:0}},token:function(e,n){var r=n.errorToken;r&&(n.errorToken=!1);var t=N(e,n);return t&&t!="comment"&&(n.lastToken=t=="keyword"||t=="punctuation"?e.current():t),t=="punctuation"&&(t=null),e.eol()&&n.lambda&&(n.lambda=!1),r?u:t},indent:function(e,n,r){if(e.tokenize!=z)return e.tokenize.isString?null:0;var t=s(e),o=t.type==n.charAt(0)||t.type=="py"&&!e.dedent&&/^(else:|elif |except |finally:)/.test(n);return t.align==null?t.offset-(o?g||r.unit:0):t.align-(o?1:0)},languageData:{autocomplete:L.concat(O).concat(["exec","print"]),indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,commentTokens:{line:"#"},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}}}var R=function(i){return i.split(" ")};const U=v({}),$=v({extra_keywords:R("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")});export{v as n,U as r,$ as t};
import{t as o}from"./q-CfD3i9uI.js";export{o as q};
var s,u=d("abs.acos.aj.aj0.all.and.any.asc.asin.asof.atan.attr.avg.avgs.bin.by.ceiling.cols.cor.cos.count.cov.cross.csv.cut.delete.deltas.desc.dev.differ.distinct.div.do.each.ej.enlist.eval.except.exec.exit.exp.fby.fills.first.fkeys.flip.floor.from.get.getenv.group.gtime.hclose.hcount.hdel.hopen.hsym.iasc.idesc.if.ij.in.insert.inter.inv.key.keys.last.like.list.lj.load.log.lower.lsq.ltime.ltrim.mavg.max.maxs.mcount.md5.mdev.med.meta.min.mins.mmax.mmin.mmu.mod.msum.neg.next.not.null.or.over.parse.peach.pj.plist.prd.prds.prev.prior.rand.rank.ratios.raze.read0.read1.reciprocal.reverse.rload.rotate.rsave.rtrim.save.scan.select.set.setenv.show.signum.sin.sqrt.ss.ssr.string.sublist.sum.sums.sv.system.tables.tan.til.trim.txf.type.uj.ungroup.union.update.upper.upsert.value.var.view.views.vs.wavg.where.where.while.within.wj.wj1.wsum.xasc.xbar.xcol.xcols.xdesc.xexp.xgroup.xkey.xlog.xprev.xrank".split(".")),m=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;function d(t){return RegExp("^("+t.join("|")+")$")}function a(t,e){var i=t.sol(),o=t.next();if(s=null,i){if(o=="/")return(e.tokenize=p)(t,e);if(o=="\\")return t.eol()||/\s/.test(t.peek())?(t.skipToEnd(),/^\\\s*$/.test(t.current())?(e.tokenize=f)(t):e.tokenize=a,"comment"):(e.tokenize=a,"builtin")}if(/\s/.test(o))return t.peek()=="/"?(t.skipToEnd(),"comment"):"null";if(o=='"')return(e.tokenize=v)(t,e);if(o=="`")return t.eatWhile(/[A-Za-z\d_:\/.]/),"macroName";if(o=="."&&/\d/.test(t.peek())||/\d/.test(o)){var n=null;return t.backUp(1),t.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||t.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||t.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||t.match(/^\d+[ptuv]{1}/)?n="temporal":(t.match(/^0[NwW]{1}/)||t.match(/^0x[\da-fA-F]*/)||t.match(/^[01]+[b]{1}/)||t.match(/^\d+[chijn]{1}/)||t.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(n="number"),n&&(!(o=t.peek())||m.test(o))?n:(t.next(),"error")}return/[A-Za-z]|\./.test(o)?(t.eatWhile(/[A-Za-z._\d]/),u.test(t.current())?"keyword":"variable"):/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(o)||/[{}\(\[\]\)]/.test(o)?null:"error"}function p(t,e){return t.skipToEnd(),/^\/\s*$/.test(t.current())?(e.tokenize=x)(t,e):e.tokenize=a,"comment"}function x(t,e){var i=t.sol()&&t.peek()=="\\";return t.skipToEnd(),i&&/^\\\s*$/.test(t.current())&&(e.tokenize=a),"comment"}function f(t){return t.skipToEnd(),"comment"}function v(t,e){for(var i=!1,o,n=!1;o=t.next();){if(o=='"'&&!i){n=!0;break}i=!i&&o=="\\"}return n&&(e.tokenize=a),"string"}function c(t,e,i){t.context={prev:t.context,indent:t.indent,col:i,type:e}}function r(t){t.indent=t.context.indent,t.context=t.context.prev}const k={name:"q",startState:function(){return{tokenize:a,context:null,indent:0,col:0}},token:function(t,e){t.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=t.indentation());var i=e.tokenize(t,e);if(i!="comment"&&e.context&&e.context.align==null&&e.context.type!="pattern"&&(e.context.align=!0),s=="(")c(e,")",t.column());else if(s=="[")c(e,"]",t.column());else if(s=="{")c(e,"}",t.column());else if(/[\]\}\)]/.test(s)){for(;e.context&&e.context.type=="pattern";)r(e);e.context&&s==e.context.type&&r(e)}else s=="."&&e.context&&e.context.type=="pattern"?r(e):/atom|string|variable/.test(i)&&e.context&&(/[\}\]]/.test(e.context.type)?c(e,"pattern",t.column()):e.context.type=="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=t.column()));return i},indent:function(t,e,i){var o=e&&e.charAt(0),n=t.context;if(/[\]\}]/.test(o))for(;n&&n.type=="pattern";)n=n.prev;var l=n&&o==n.type;return n?n.type=="pattern"?n.col:n.align?n.col+(l?0:1):n.indent+(l?0:i.unit):0},languageData:{commentTokens:{line:"/"}}};export{k as t};
var lt,ht;import{t as ee}from"./linear-BWciPXnd.js";import"./defaultLocale-JieDVWC_.js";import"./purify.es-DZrAQFIu.js";import{u as ie}from"./src-CvyFXpBy.js";import{n as r,r as At}from"./src-CsZby044.js";import{B as _e,C as ae,I as Se,T as ke,U as Fe,_ as Pe,a as Ce,b as vt,c as Le,d as z,v as ve,z as Ee}from"./chunk-ABZYJK2D-0jga8uiE.js";var Et=(function(){var t=r(function(n,b,g,h){for(g||(g={}),h=n.length;h--;g[n[h]]=b);return g},"o"),o=[1,3],u=[1,4],c=[1,5],l=[1,6],x=[1,7],f=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],_=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],m=[2,36],p=[1,37],y=[1,36],q=[1,38],T=[1,35],d=[1,43],A=[1,41],M=[1,14],Y=[1,23],j=[1,18],pt=[1,19],ct=[1,20],dt=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],i=[1,26],Dt=[1,27],It=[1,28],Nt=[1,29],$=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],C=[1,42],L=[1,44],X=[1,62],H=[1,61],v=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],wt=[1,65],Bt=[1,66],Wt=[1,67],Rt=[1,68],$t=[1,69],Ut=[1,70],Qt=[1,71],Xt=[1,72],Ht=[1,73],Ot=[1,74],Mt=[1,75],Yt=[1,76],N=[4,5,6,7,8,9,10,11,12,13,14,15,18],V=[1,90],Z=[1,91],J=[1,92],tt=[1,99],et=[1,93],it=[1,96],at=[1,94],nt=[1,95],st=[1,97],rt=[1,98],St=[1,102],jt=[10,55,56,57],B=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(n,b,g,h,S,e,gt){var s=e.length-1;switch(S){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],h.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),h.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),h.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),h.setAccDescription(this.$);break;case 46:h.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:h.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:h.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:h.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:h.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:h.setXAxisLeftText(e[s-2]),h.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" \u27F6 ",h.setXAxisLeftText(e[s-1]);break;case 53:h.setXAxisLeftText(e[s]);break;case 54:h.setYAxisBottomText(e[s-2]),h.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" \u27F6 ",h.setYAxisBottomText(e[s-1]);break;case 56:h.setYAxisBottomText(e[s]);break;case 57:h.setQuadrant1Text(e[s]);break;case 58:h.setQuadrant2Text(e[s]);break;case 59:h.setQuadrant3Text(e[s]);break;case 60:h.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:o,26:1,27:2,28:u,55:c,56:l,57:x},{1:[3]},{18:o,26:8,27:2,28:u,55:c,56:l,57:x},{18:o,26:9,27:2,28:u,55:c,56:l,57:x},t(f,[2,33],{29:10}),t(_,[2,61]),t(_,[2,62]),t(_,[2,63]),{1:[2,30]},{1:[2,31]},t(a,m,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:p,5:y,10:q,12:T,13:d,14:A,18:M,25:Y,35:j,37:pt,39:ct,41:dt,42:ut,48:xt,50:ft,51:i,52:Dt,53:It,54:Nt,60:$,61:U,63:k,64:F,65:P,66:C,67:L}),t(f,[2,34]),{27:45,55:c,56:l,57:x},t(a,[2,37]),t(a,m,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:p,5:y,10:q,12:T,13:d,14:A,18:M,25:Y,35:j,37:pt,39:ct,41:dt,42:ut,48:xt,50:ft,51:i,52:Dt,53:It,54:Nt,60:$,61:U,63:k,64:F,65:P,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:p,5:y,10:q,12:T,13:d,14:A,43:51,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:52,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:53,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:54,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:55,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:56,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:C,67:L},t(v,[2,64]),t(v,[2,66]),t(v,[2,67]),t(v,[2,70]),t(v,[2,71]),t(v,[2,72]),t(v,[2,73]),t(v,[2,74]),t(v,[2,75]),t(v,[2,76]),t(v,[2,77]),t(v,[2,78]),t(v,[2,79]),t(v,[2,80]),t(f,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:wt,5:Bt,6:Wt,7:Rt,8:$t,9:Ut,10:Qt,11:Xt,12:Ht,13:Ot,14:Mt,15:Yt,21:63},t(a,[2,53],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,49:[1,77],63:k,64:F,65:P,66:C,67:L}),t(a,[2,56],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,49:[1,78],63:k,64:F,65:P,66:C,67:L}),t(a,[2,57],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,58],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,59],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,60],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),{45:[1,79]},{44:[1,80]},t(v,[2,65]),t(v,[2,81]),t(v,[2,82]),t(v,[2,83]),{3:82,4:wt,5:Bt,6:Wt,7:Rt,8:$t,9:Ut,10:Qt,11:Xt,12:Ht,13:Ot,14:Mt,15:Yt,18:[1,81]},t(N,[2,23]),t(N,[2,1]),t(N,[2,2]),t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),t(N,[2,9]),t(N,[2,10]),t(N,[2,11]),t(N,[2,12]),t(a,[2,52],{58:31,43:83,4:p,5:y,10:q,12:T,13:d,14:A,60:$,61:U,63:k,64:F,65:P,66:C,67:L}),t(a,[2,55],{58:31,43:84,4:p,5:y,10:q,12:T,13:d,14:A,60:$,61:U,63:k,64:F,65:P,66:C,67:L}),{46:[1,85]},{45:[1,86]},{4:V,5:Z,6:J,8:tt,11:et,13:it,16:89,17:at,18:nt,19:st,20:rt,22:88,23:87},t(N,[2,24]),t(a,[2,51],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,54],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,47],{22:88,16:89,23:100,4:V,5:Z,6:J,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),{46:[1,101]},t(a,[2,29],{10:St}),t(jt,[2,27],{16:103,4:V,5:Z,6:J,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),t(B,[2,25]),t(B,[2,13]),t(B,[2,14]),t(B,[2,15]),t(B,[2,16]),t(B,[2,17]),t(B,[2,18]),t(B,[2,19]),t(B,[2,20]),t(B,[2,21]),t(B,[2,22]),t(a,[2,49],{10:St}),t(a,[2,48],{22:88,16:89,23:104,4:V,5:Z,6:J,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),{4:V,5:Z,6:J,8:tt,11:et,13:it,16:89,17:at,18:nt,19:st,20:rt,22:105},t(B,[2,26]),t(a,[2,50],{10:St}),t(jt,[2,28],{16:103,4:V,5:Z,6:J,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(n,b){if(b.recoverable)this.trace(n);else{var g=Error(n);throw g.hash=b,g}},"parseError"),parse:r(function(n){var b=this,g=[0],h=[],S=[null],e=[],gt=this.table,s="",mt=0,Gt=0,Kt=0,Te=2,Vt=1,qe=e.slice.call(arguments,1),E=Object.create(this.lexer),G={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(G.yy[Ft]=this.yy[Ft]);E.setInput(n,G.yy),G.yy.lexer=E,G.yy.parser=this,E.yylloc===void 0&&(E.yylloc={});var Pt=E.yylloc;e.push(Pt);var Ae=E.options&&E.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){g.length-=2*R,S.length-=R,e.length-=R}r(be,"popStack");function Zt(){var R=h.pop()||E.lex()||Vt;return typeof R!="number"&&(R instanceof Array&&(h=R,R=h.pop()),R=b.symbols_[R]||R),R}r(Zt,"lex");for(var w,Ct,K,W,Lt,ot={},Tt,O,Jt,qt;;){if(K=g[g.length-1],this.defaultActions[K]?W=this.defaultActions[K]:(w??(w=Zt()),W=gt[K]&&gt[K][w]),W===void 0||!W.length||!W[0]){var te="";for(Tt in qt=[],gt[K])this.terminals_[Tt]&&Tt>Te&&qt.push("'"+this.terminals_[Tt]+"'");te=E.showPosition?"Parse error on line "+(mt+1)+`:
`+E.showPosition()+`
Expecting `+qt.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(mt+1)+": Unexpected "+(w==Vt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(te,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:Pt,expected:qt})}if(W[0]instanceof Array&&W.length>1)throw Error("Parse Error: multiple actions possible at state: "+K+", token: "+w);switch(W[0]){case 1:g.push(w),S.push(E.yytext),e.push(E.yylloc),g.push(W[1]),w=null,Ct?(w=Ct,Ct=null):(Gt=E.yyleng,s=E.yytext,mt=E.yylineno,Pt=E.yylloc,Kt>0&&Kt--);break;case 2:if(O=this.productions_[W[1]][1],ot.$=S[S.length-O],ot._$={first_line:e[e.length-(O||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(O||1)].first_column,last_column:e[e.length-1].last_column},Ae&&(ot._$.range=[e[e.length-(O||1)].range[0],e[e.length-1].range[1]]),Lt=this.performAction.apply(ot,[s,Gt,mt,G.yy,W[1],S,e].concat(qe)),Lt!==void 0)return Lt;O&&(g=g.slice(0,-1*O*2),S=S.slice(0,-1*O),e=e.slice(0,-1*O)),g.push(this.productions_[W[1]][0]),S.push(ot.$),e.push(ot._$),Jt=gt[g[g.length-2]][g[g.length-1]],g.push(Jt);break;case 3:return!0}}return!0},"parse")};kt.lexer=(function(){return{EOF:1,parseError:r(function(n,b){if(this.yy.parser)this.yy.parser.parseError(n,b);else throw Error(n)},"parseError"),setInput:r(function(n,b){return this.yy=b||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:r(function(){var n=this._input[0];return this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n,n.match(/(?:\r\n?|\n).*/g)?(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:r(function(n){var b=n.length,g=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var h=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 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:g?(g.length===h.length?this.yylloc.first_column:0)+h[h.length-g.length].length-g[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(n){this.unput(this.match.slice(n))},"less"),pastInput:r(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:r(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:r(function(){var n=this.pastInput(),b=Array(n.length+1).join("-");return n+this.upcomingInput()+`
`+b+"^"},"showPosition"),test_match:r(function(n,b){var g,h,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))),h=n[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.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],g=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in S)this[e]=S[e];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,b,g,h;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),e=0;e<S.length;e++)if(g=this._input.match(this.rules[S[e]]),g&&(!b||g[0].length>b[0].length)){if(b=g,h=e,this.options.backtrack_lexer){if(n=this.test_match(g,S[e]),n!==!1)return n;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(n=this.test_match(b,S[h]),n===!1?!1:n):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:r(function(){return this.next()||this.lex()},"lex"),begin:r(function(n){this.conditionStack.push(n)},"begin"),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:r(function(n){this.begin(n)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(n,b,g,h){switch(g){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;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 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}})();function yt(){this.yy={}}return r(yt,"Parser"),yt.prototype=kt,kt.Parser=yt,new yt})();Et.parser=Et;var ze=Et,I=ke(),De=(lt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var o,u,c,l,x,f,_,a,m,p,y,q,T,d,A,M,Y,j;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((o=z.quadrantChart)==null?void 0:o.chartWidth)||500,chartWidth:((u=z.quadrantChart)==null?void 0:u.chartHeight)||500,titlePadding:((c=z.quadrantChart)==null?void 0:c.titlePadding)||10,titleFontSize:((l=z.quadrantChart)==null?void 0:l.titleFontSize)||20,quadrantPadding:((x=z.quadrantChart)==null?void 0:x.quadrantPadding)||5,xAxisLabelPadding:((f=z.quadrantChart)==null?void 0:f.xAxisLabelPadding)||5,yAxisLabelPadding:((_=z.quadrantChart)==null?void 0:_.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=z.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((m=z.quadrantChart)==null?void 0:m.yAxisLabelFontSize)||16,quadrantLabelFontSize:((p=z.quadrantChart)==null?void 0:p.quadrantLabelFontSize)||16,quadrantTextTopPadding:((y=z.quadrantChart)==null?void 0:y.quadrantTextTopPadding)||5,pointTextPadding:((q=z.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((T=z.quadrantChart)==null?void 0:T.pointLabelFontSize)||12,pointRadius:((d=z.quadrantChart)==null?void 0:d.pointRadius)||5,xAxisPosition:((A=z.quadrantChart)==null?void 0:A.xAxisPosition)||"top",yAxisPosition:((M=z.quadrantChart)==null?void 0:M.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Y=z.quadrantChart)==null?void 0:Y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((j=z.quadrantChart)==null?void 0:j.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:I.quadrant1Fill,quadrant2Fill:I.quadrant2Fill,quadrant3Fill:I.quadrant3Fill,quadrant4Fill:I.quadrant4Fill,quadrant1TextFill:I.quadrant1TextFill,quadrant2TextFill:I.quadrant2TextFill,quadrant3TextFill:I.quadrant3TextFill,quadrant4TextFill:I.quadrant4TextFill,quadrantPointFill:I.quadrantPointFill,quadrantPointTextFill:I.quadrantPointTextFill,quadrantXAxisTextFill:I.quadrantXAxisTextFill,quadrantYAxisTextFill:I.quadrantYAxisTextFill,quadrantTitleFill:I.quadrantTitleFill,quadrantInternalBorderStrokeFill:I.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:I.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,At.info("clear called")}setData(o){this.data={...this.data,...o}}addPoints(o){this.data.points=[...o,...this.data.points]}addClass(o,u){this.classes.set(o,u)}setConfig(o){At.trace("setConfig called with: ",o),this.config={...this.config,...o}}setThemeConfig(o){At.trace("setThemeConfig called with: ",o),this.themeConfig={...this.themeConfig,...o}}calculateSpace(o,u,c,l){let x=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,f={top:o==="top"&&u?x:0,bottom:o==="bottom"&&u?x:0},_=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&c?_:0,right:this.config.yAxisPosition==="right"&&c?_:0},m=this.config.titleFontSize+this.config.titlePadding*2,p={top:l?m:0},y=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+f.top+p.top,T=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,d=this.config.chartHeight-this.config.quadrantPadding*2-f.top-f.bottom-p.top;return{xAxisSpace:f,yAxisSpace:a,titleSpace:p,quadrantSpace:{quadrantLeft:y,quadrantTop:q,quadrantWidth:T,quadrantHalfWidth:T/2,quadrantHeight:d,quadrantHalfHeight:d/2}}}getAxisLabels(o,u,c,l){let{quadrantSpace:x,titleSpace:f}=l,{quadrantHalfHeight:_,quadrantHeight:a,quadrantLeft:m,quadrantHalfWidth:p,quadrantTop:y,quadrantWidth:q}=x,T=!!this.data.xAxisRightText,d=!!this.data.yAxisTopText,A=[];return this.data.xAxisLeftText&&u&&A.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:m+(T?p/2:0),y:o==="top"?this.config.xAxisLabelPadding+f.top:this.config.xAxisLabelPadding+y+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&u&&A.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:m+p+(T?p/2:0),y:o==="top"?this.config.xAxisLabelPadding+f.top:this.config.xAxisLabelPadding+y+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&c&&A.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+m+q+this.config.quadrantPadding,y:y+a-(d?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&c&&A.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+m+q+this.config.quadrantPadding,y:y+_-(d?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:-90}),A}getQuadrants(o){let{quadrantSpace:u}=o,{quadrantHalfHeight:c,quadrantLeft:l,quadrantHalfWidth:x,quadrantTop:f}=u,_=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:l+x,y:f,width:x,height:c,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:l,y:f,width:x,height:c,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:l,y:f+c,width:x,height:c,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:l+x,y:f+c,width:x,height:c,fill:this.themeConfig.quadrant4Fill}];for(let a of _)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return _}getQuadrantPoints(o){let{quadrantSpace:u}=o,{quadrantHeight:c,quadrantLeft:l,quadrantTop:x,quadrantWidth:f}=u,_=ee().domain([0,1]).range([l,f+l]),a=ee().domain([0,1]).range([c+x,x]);return this.data.points.map(m=>{let p=this.classes.get(m.className);return p&&(m={...p,...m}),{x:_(m.x),y:a(m.y),fill:m.color??this.themeConfig.quadrantPointFill,radius:m.radius??this.config.pointRadius,text:{text:m.text,fill:this.themeConfig.quadrantPointTextFill,x:_(m.x),y:a(m.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:m.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:m.strokeWidth??"0px"}})}getBorders(o){let u=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:c}=o,{quadrantHalfHeight:l,quadrantHeight:x,quadrantLeft:f,quadrantHalfWidth:_,quadrantTop:a,quadrantWidth:m}=c;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:f-u,y1:a,x2:f+m+u,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:f+m,y1:a+u,x2:f+m,y2:a+x-u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:f-u,y1:a+x,x2:f+m+u,y2:a+x},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:f,y1:a+u,x2:f,y2:a+x-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:f+_,y1:a+u,x2:f+_,y2:a+x-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:f+u,y1:a+l,x2:f+m-u,y2:a+l}]}getTitle(o){if(o)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let o=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),u=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),c=this.config.showTitle&&!!this.data.titleText,l=this.data.points.length>0?"bottom":this.config.xAxisPosition,x=this.calculateSpace(l,o,u,c);return{points:this.getQuadrantPoints(x),quadrants:this.getQuadrants(x),axisLabels:this.getAxisLabels(l,o,u,x),borderLines:this.getBorders(x),title:this.getTitle(c)}}},r(lt,"QuadrantBuilder"),lt),bt=(ht=class extends Error{constructor(o,u,c){super(`value for ${o} ${u} is invalid, please use a valid ${c}`),this.name="InvalidStyleError"}},r(ht,"InvalidStyleError"),ht);function zt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}r(zt,"validateHexCode");function ne(t){return!/^\d+$/.test(t)}r(ne,"validateNumber");function se(t){return!/^\d+px$/.test(t)}r(se,"validateSizeInPixels");var Ie=vt();function Q(t){return Se(t.trim(),Ie)}r(Q,"textSanitizer");var D=new De;function re(t){D.setData({quadrant1Text:Q(t.text)})}r(re,"setQuadrant1Text");function oe(t){D.setData({quadrant2Text:Q(t.text)})}r(oe,"setQuadrant2Text");function le(t){D.setData({quadrant3Text:Q(t.text)})}r(le,"setQuadrant3Text");function he(t){D.setData({quadrant4Text:Q(t.text)})}r(he,"setQuadrant4Text");function ce(t){D.setData({xAxisLeftText:Q(t.text)})}r(ce,"setXAxisLeftText");function de(t){D.setData({xAxisRightText:Q(t.text)})}r(de,"setXAxisRightText");function ue(t){D.setData({yAxisTopText:Q(t.text)})}r(ue,"setYAxisTopText");function xe(t){D.setData({yAxisBottomText:Q(t.text)})}r(xe,"setYAxisBottomText");function _t(t){let o={};for(let u of t){let[c,l]=u.trim().split(/\s*:\s*/);if(c==="radius"){if(ne(l))throw new bt(c,l,"number");o.radius=parseInt(l)}else if(c==="color"){if(zt(l))throw new bt(c,l,"hex code");o.color=l}else if(c==="stroke-color"){if(zt(l))throw new bt(c,l,"hex code");o.strokeColor=l}else if(c==="stroke-width"){if(se(l))throw new bt(c,l,"number of pixels (eg. 10px)");o.strokeWidth=l}else throw Error(`style named ${c} is not supported.`)}return o}r(_t,"parseStyles");function fe(t,o,u,c,l){let x=_t(l);D.addPoints([{x:u,y:c,text:Q(t.text),className:o,...x}])}r(fe,"addPoint");function ge(t,o){D.addClass(t,_t(o))}r(ge,"addClass");function pe(t){D.setConfig({chartWidth:t})}r(pe,"setWidth");function ye(t){D.setConfig({chartHeight:t})}r(ye,"setHeight");function me(){let{themeVariables:t,quadrantChart:o}=vt();return o&&D.setConfig(o),D.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),D.setData({titleText:ae()}),D.build()}r(me,"getQuadrantData");var Ne={parser:ze,db:{setWidth:pe,setHeight:ye,setQuadrant1Text:re,setQuadrant2Text:oe,setQuadrant3Text:le,setQuadrant4Text:he,setXAxisLeftText:ce,setXAxisRightText:de,setYAxisTopText:ue,setYAxisBottomText:xe,parseStyles:_t,addPoint:fe,addClass:ge,getQuadrantData:me,clear:r(function(){D.clear(),Ce()},"clear"),setAccTitle:_e,getAccTitle:ve,setDiagramTitle:Fe,getDiagramTitle:ae,getAccDescription:Pe,setAccDescription:Ee},renderer:{draw:r((t,o,u,c)=>{var ut,xt,ft;function l(i){return i==="top"?"hanging":"middle"}r(l,"getDominantBaseLine");function x(i){return i==="left"?"start":"middle"}r(x,"getTextAnchor");function f(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}r(f,"getTransformation");let _=vt();At.debug(`Rendering quadrant chart
`+t);let a=_.securityLevel,m;a==="sandbox"&&(m=ie("#i"+o));let p=ie(a==="sandbox"?m.nodes()[0].contentDocument.body:"body").select(`[id="${o}"]`),y=p.append("g").attr("class","main"),q=((ut=_.quadrantChart)==null?void 0:ut.chartWidth)??500,T=((xt=_.quadrantChart)==null?void 0:xt.chartHeight)??500;Le(p,T,q,((ft=_.quadrantChart)==null?void 0:ft.useMaxWidth)??!0),p.attr("viewBox","0 0 "+q+" "+T),c.db.setHeight(T),c.db.setWidth(q);let d=c.db.getQuadrantData(),A=y.append("g").attr("class","quadrants"),M=y.append("g").attr("class","border"),Y=y.append("g").attr("class","data-points"),j=y.append("g").attr("class","labels"),pt=y.append("g").attr("class","title");d.title&&pt.append("text").attr("x",0).attr("y",0).attr("fill",d.title.fill).attr("font-size",d.title.fontSize).attr("dominant-baseline",l(d.title.horizontalPos)).attr("text-anchor",x(d.title.verticalPos)).attr("transform",f(d.title)).text(d.title.text),d.borderLines&&M.selectAll("line").data(d.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);let ct=A.selectAll("g.quadrant").data(d.quadrants).enter().append("g").attr("class","quadrant");ct.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ct.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>l(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>f(i.text)).text(i=>i.text.text),j.selectAll("g.label").data(d.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>l(i.horizontalPos)).attr("text-anchor",i=>x(i.verticalPos)).attr("transform",i=>f(i));let dt=Y.selectAll("g.data-point").data(d.points).enter().append("g").attr("class","data-point");dt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),dt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>l(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>f(i.text))},"draw")},styles:r(()=>"","styles")};export{Ne as diagram};
import{t as r}from"./r-JyJdYHQB.js";export{r};
function c(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}var m=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],d=["list","quote","bquote","eval","return","call","parse","deparse"],x=["if","else","repeat","while","function","for","in","next","break"],h=["if","else","repeat","while","function","for"],v=c(m),y=c(d),N=c(x),_=c(h),k=/[+\-*\/^<>=!&|~$:]/,i;function l(e,t){i=null;var n=e.next();if(n=="#")return e.skipToEnd(),"comment";if(n=="0"&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if(n=="."&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(n))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if(n=="'"||n=='"')return t.tokenize=A(n),"string";if(n=="`")return e.match(/[^`]+`/),"string.special";if(n=="."&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(n)){e.eatWhile(/[\w\.]/);var r=e.current();return v.propertyIsEnumerable(r)?"atom":N.propertyIsEnumerable(r)?(_.propertyIsEnumerable(r)&&!e.match(/\s*if(\s+|$)/,!1)&&(i="block"),"keyword"):y.propertyIsEnumerable(r)?"builtin":"variable"}else return n=="%"?(e.skipTo("%")&&e.next(),"variableName.special"):n=="<"&&e.eat("-")||n=="<"&&e.match("<-")||n=="-"&&e.match(/>>?/)||n=="="&&t.ctx.argList?"operator":k.test(n)?(n=="$"||e.eatWhile(k),"operator"):/[\(\){}\[\];]/.test(n)?(i=n,n==";"?"punctuation":null):null}function A(e){return function(t,n){if(t.eat("\\")){var r=t.next();return r=="x"?t.match(/^[a-f0-9]{2}/i):(r=="u"||r=="U")&&t.eat("{")&&t.skipTo("}")?t.next():r=="u"?t.match(/^[a-f0-9]{4}/i):r=="U"?t.match(/^[a-f0-9]{8}/i):/[0-7]/.test(r)&&t.match(/^[0-7]{1,2}/),"string.special"}else{for(var a;(a=t.next())!=null;){if(a==e){n.tokenize=l;break}if(a=="\\"){t.backUp(1);break}}return"string"}}}var b=1,u=2,f=4;function o(e,t,n){e.ctx={type:t,indent:e.indent,flags:0,column:n.column(),prev:e.ctx}}function g(e,t){var n=e.ctx;e.ctx={type:n.type,indent:n.indent,flags:n.flags|t,column:n.column,prev:n.prev}}function s(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}const I={name:"r",startState:function(e){return{tokenize:l,ctx:{type:"top",indent:-e,flags:u},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(t.ctx.flags&3||(t.ctx.flags|=u),t.ctx.flags&f&&s(t),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return n!="comment"&&(t.ctx.flags&u)==0&&g(t,b),(i==";"||i=="{"||i=="}")&&t.ctx.type=="block"&&s(t),i=="{"?o(t,"}",e):i=="("?(o(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):i=="["?o(t,"]",e):i=="block"?o(t,"block",e):i==t.ctx.type?s(t):t.ctx.type=="block"&&n!="comment"&&g(t,f),t.afterIdent=n=="variable"||n=="keyword",n},indent:function(e,t,n){if(e.tokenize!=l)return 0;var r=t&&t.charAt(0),a=e.ctx,p=r==a.type;return a.flags&f&&(a=a.prev),a.type=="block"?a.indent+(r=="{"?0:n.unit):a.flags&b?a.column+(p?0:1):a.indent+(p?0:n.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:m.concat(d,x)}};export{I as t};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as r}from"./chunk-LHMN2FUI-C4onQD9F.js";export{r as createRadarServices};
function c(a,r,t){a=+a,r=+r,t=(h=arguments.length)<2?(r=a,a=0,1):h<3?1:+t;for(var o=-1,h=Math.max(0,Math.ceil((r-a)/t))|0,u=Array(h);++o<h;)u[o]=a+o*t;return u}export{c as t};
import{t as T}from"./chunk-LvLJmgfZ.js";var J=T((e=>{var y=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),M=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),L=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),g=Symbol.iterator;function q(t){return typeof t!="object"||!t?null:(t=g&&t[g]||t["@@iterator"],typeof t=="function"?t:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,H={};function l(t,n,u){this.props=t,this.context=n,this.refs=H,this.updater=u||w}l.prototype.isReactComponent={},l.prototype.setState=function(t,n){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,n,"setState")},l.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function k(){}k.prototype=l.prototype;function h(t,n,u){this.props=t,this.context=n,this.refs=H,this.updater=u||w}var m=h.prototype=new k;m.constructor=h,j(m,l.prototype),m.isPureReactComponent=!0;var R=Array.isArray;function _(){}var s={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function v(t,n,u){var r=u.ref;return{$$typeof:y,type:t,key:n,ref:r===void 0?null:r,props:u}}function F(t,n){return v(t.type,n,t.props)}function b(t){return typeof t=="object"&&!!t&&t.$$typeof===y}function z(t){var n={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(u){return n[u]})}var $=/\/+/g;function S(t,n){return typeof t=="object"&&t&&t.key!=null?z(""+t.key):n.toString(36)}function G(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(_,_):(t.status="pending",t.then(function(n){t.status==="pending"&&(t.status="fulfilled",t.value=n)},function(n){t.status==="pending"&&(t.status="rejected",t.reason=n)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function p(t,n,u,r,o){var c=typeof t;(c==="undefined"||c==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(c){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case y:case A:i=!0;break;case E:return i=t._init,p(i(t._payload),n,u,r,o)}}if(i)return o=o(t),i=r===""?"."+S(t,0):r,R(o)?(u="",i!=null&&(u=i.replace($,"$&/")+"/"),p(o,n,u,"",function(B){return B})):o!=null&&(b(o)&&(o=F(o,u+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace($,"$&/")+"/")+i)),n.push(o)),1;i=0;var f=r===""?".":r+":";if(R(t))for(var a=0;a<t.length;a++)r=t[a],c=f+S(r,a),i+=p(r,n,u,c,o);else if(a=q(t),typeof a=="function")for(t=a.call(t),a=0;!(r=t.next()).done;)r=r.value,c=f+S(r,a++),i+=p(r,n,u,c,o);else if(c==="object"){if(typeof t.then=="function")return p(G(t),n,u,r,o);throw n=String(t),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return i}function d(t,n,u){if(t==null)return t;var r=[],o=0;return p(t,r,"","",function(c){return n.call(u,c,o++)}),r}function W(t){if(t._status===-1){var n=t._result;n=n(),n.then(function(u){(t._status===0||t._status===-1)&&(t._status=1,t._result=u)},function(u){(t._status===0||t._status===-1)&&(t._status=2,t._result=u)}),t._status===-1&&(t._status=0,t._result=n)}if(t._status===1)return t._result.default;throw t._result}var x=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Y={map:d,forEach:function(t,n,u){d(t,function(){n.apply(this,arguments)},u)},count:function(t){var n=0;return d(t,function(){n++}),n},toArray:function(t){return d(t,function(n){return n})||[]},only:function(t){if(!b(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};e.Activity=V,e.Children=Y,e.Component=l,e.Fragment=O,e.Profiler=P,e.PureComponent=h,e.StrictMode=I,e.Suspense=D,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,e.__COMPILER_RUNTIME={__proto__:null,c:function(t){return s.H.useMemoCache(t)}},e.cache=function(t){return function(){return t.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(t,n,u){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var r=j({},t.props),o=t.key;if(n!=null)for(c in n.key!==void 0&&(o=""+n.key),n)!C.call(n,c)||c==="key"||c==="__self"||c==="__source"||c==="ref"&&n.ref===void 0||(r[c]=n[c]);var c=arguments.length-2;if(c===1)r.children=u;else if(1<c){for(var i=Array(c),f=0;f<c;f++)i[f]=arguments[f+2];r.children=i}return v(t.type,o,r)},e.createContext=function(t){return t={$$typeof:M,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:N,_context:t},t},e.createElement=function(t,n,u){var r,o={},c=null;if(n!=null)for(r in n.key!==void 0&&(c=""+n.key),n)C.call(n,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=n[r]);var i=arguments.length-2;if(i===1)o.children=u;else if(1<i){for(var f=Array(i),a=0;a<i;a++)f[a]=arguments[a+2];o.children=f}if(t&&t.defaultProps)for(r in i=t.defaultProps,i)o[r]===void 0&&(o[r]=i[r]);return v(t,c,o)},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:U,render:t}},e.isValidElement=b,e.lazy=function(t){return{$$typeof:E,_payload:{_status:-1,_result:t},_init:W}},e.memo=function(t,n){return{$$typeof:L,type:t,compare:n===void 0?null:n}},e.startTransition=function(t){var n=s.T,u={};s.T=u;try{var r=t(),o=s.S;o!==null&&o(u,r),typeof r=="object"&&r&&typeof r.then=="function"&&r.then(_,x)}catch(c){x(c)}finally{n!==null&&u.types!==null&&(n.types=u.types),s.T=n}},e.unstable_useCacheRefresh=function(){return s.H.useCacheRefresh()},e.use=function(t){return s.H.use(t)},e.useActionState=function(t,n,u){return s.H.useActionState(t,n,u)},e.useCallback=function(t,n){return s.H.useCallback(t,n)},e.useContext=function(t){return s.H.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t,n){return s.H.useDeferredValue(t,n)},e.useEffect=function(t,n){return s.H.useEffect(t,n)},e.useEffectEvent=function(t){return s.H.useEffectEvent(t)},e.useId=function(){return s.H.useId()},e.useImperativeHandle=function(t,n,u){return s.H.useImperativeHandle(t,n,u)},e.useInsertionEffect=function(t,n){return s.H.useInsertionEffect(t,n)},e.useLayoutEffect=function(t,n){return s.H.useLayoutEffect(t,n)},e.useMemo=function(t,n){return s.H.useMemo(t,n)},e.useOptimistic=function(t,n){return s.H.useOptimistic(t,n)},e.useReducer=function(t,n,u){return s.H.useReducer(t,n,u)},e.useRef=function(t){return s.H.useRef(t)},e.useState=function(t){return s.H.useState(t)},e.useSyncExternalStore=function(t,n,u){return s.H.useSyncExternalStore(t,n,u)},e.useTransition=function(){return s.H.useTransition()},e.version="19.2.4"})),K=T(((e,y)=>{y.exports=J()}));export{K as t};
import{t as p}from"./chunk-LvLJmgfZ.js";import{t as _}from"./react-Bj1aDYRI.js";var m=p((e=>{var g=_();function f(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)r+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var o={d:{f:t,r:function(){throw Error(f(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},d=Symbol.for("react.portal");function l(i,r,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:s==null?null:""+s,children:i,containerInfo:r,implementation:n}}var c=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(i,r){if(i==="font")return"";if(typeof r=="string")return r==="use-credentials"?r:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,e.createPortal=function(i,r){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)throw Error(f(299));return l(i,r,null,n)},e.flushSync=function(i){var r=c.T,n=o.p;try{if(c.T=null,o.p=2,i)return i()}finally{c.T=r,o.p=n,o.d.f()}},e.preconnect=function(i,r){typeof i=="string"&&(r?(r=r.crossOrigin,r=typeof r=="string"?r==="use-credentials"?r:"":void 0):r=null,o.d.C(i,r))},e.prefetchDNS=function(i){typeof i=="string"&&o.d.D(i)},e.preinit=function(i,r){if(typeof i=="string"&&r&&typeof r.as=="string"){var n=r.as,s=a(n,r.crossOrigin),y=typeof r.integrity=="string"?r.integrity:void 0,u=typeof r.fetchPriority=="string"?r.fetchPriority:void 0;n==="style"?o.d.S(i,typeof r.precedence=="string"?r.precedence:void 0,{crossOrigin:s,integrity:y,fetchPriority:u}):n==="script"&&o.d.X(i,{crossOrigin:s,integrity:y,fetchPriority:u,nonce:typeof r.nonce=="string"?r.nonce:void 0})}},e.preinitModule=function(i,r){if(typeof i=="string")if(typeof r=="object"&&r){if(r.as==null||r.as==="script"){var n=a(r.as,r.crossOrigin);o.d.M(i,{crossOrigin:n,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0})}}else r??o.d.M(i)},e.preload=function(i,r){if(typeof i=="string"&&typeof r=="object"&&r&&typeof r.as=="string"){var n=r.as,s=a(n,r.crossOrigin);o.d.L(i,n,{crossOrigin:s,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,type:typeof r.type=="string"?r.type:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0,referrerPolicy:typeof r.referrerPolicy=="string"?r.referrerPolicy:void 0,imageSrcSet:typeof r.imageSrcSet=="string"?r.imageSrcSet:void 0,imageSizes:typeof r.imageSizes=="string"?r.imageSizes:void 0,media:typeof r.media=="string"?r.media:void 0})}},e.preloadModule=function(i,r){if(typeof i=="string")if(r){var n=a(r.as,r.crossOrigin);o.d.m(i,{as:typeof r.as=="string"&&r.as!=="script"?r.as:void 0,crossOrigin:n,integrity:typeof r.integrity=="string"?r.integrity:void 0})}else o.d.m(i)},e.requestFormReset=function(i){o.d.r(i)},e.unstable_batchedUpdates=function(i,r){return i(r)},e.useFormState=function(i,r,n){return c.H.useFormState(i,r,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.2.4"})),v=p(((e,g)=>{function f(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(t){console.error(t)}}f(),g.exports=m()}));export{v as t};

Sorry, the diff of this file is too big to display

import{s as ht}from"./chunk-LvLJmgfZ.js";import{t as zt}from"./react-Bj1aDYRI.js";var d=ht(zt()),ze=(0,d.createContext)(null);ze.displayName="PanelGroupContext";var A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ae=10,te=d.useLayoutEffect,Oe=d.useId,bt=typeof Oe=="function"?Oe:()=>null,vt=0;function ke(e=null){let t=bt(),n=(0,d.useRef)(e||t||null);return n.current===null&&(n.current=""+vt++),e??n.current}function Te({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:l,forwardedRef:a,id:i,maxSize:u,minSize:o,onCollapse:z,onExpand:g,onResize:f,order:c,style:b,tagName:w="div",...C}){let S=(0,d.useContext)(ze);if(S===null)throw Error("Panel components must be rendered within a PanelGroup container");let{collapsePanel:k,expandPanel:D,getPanelSize:N,getPanelStyle:G,groupId:q,isPanelCollapsed:P,reevaluatePanelConstraints:x,registerPanel:F,resizePanel:U,unregisterPanel:W}=S,T=ke(i),L=(0,d.useRef)({callbacks:{onCollapse:z,onExpand:g,onResize:f},constraints:{collapsedSize:n,collapsible:r,defaultSize:l,maxSize:u,minSize:o},id:T,idIsFromProps:i!==void 0,order:c});(0,d.useRef)({didLogMissingDefaultSizeWarning:!1}),te(()=>{let{callbacks:$,constraints:H}=L.current,B={...H};L.current.id=T,L.current.idIsFromProps=i!==void 0,L.current.order=c,$.onCollapse=z,$.onExpand=g,$.onResize=f,H.collapsedSize=n,H.collapsible=r,H.defaultSize=l,H.maxSize=u,H.minSize=o,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&x(L.current,B)}),te(()=>{let $=L.current;return F($),()=>{W($)}},[c,T,F,W]),(0,d.useImperativeHandle)(a,()=>({collapse:()=>{k(L.current)},expand:$=>{D(L.current,$)},getId(){return T},getSize(){return N(L.current)},isCollapsed(){return P(L.current)},isExpanded(){return!P(L.current)},resize:$=>{U(L.current,$)}}),[k,D,N,P,T,U]);let J=G(L.current,l);return(0,d.createElement)(w,{...C,children:e,className:t,id:T,style:{...J,...b},[A.groupId]:q,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:T,[A.panelSize]:parseFloat(""+J.flexGrow).toFixed(1)})}var je=(0,d.forwardRef)((e,t)=>(0,d.createElement)(Te,{...e,forwardedRef:t}));Te.displayName="Panel",je.displayName="forwardRef(Panel)";var xt;function St(){return xt}var De=null,wt=!0,be=-1,X=null;function It(e,t){if(t){let n=(t&Ye)!==0,r=(t&_e)!==0,l=(t&Qe)!==0,a=(t&Ze)!==0;if(n)return l?"se-resize":a?"ne-resize":"e-resize";if(r)return l?"sw-resize":a?"nw-resize":"w-resize";if(l)return"s-resize";if(a)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Ct(){X!==null&&(document.head.removeChild(X),De=null,X=null,be=-1)}function Re(e,t){var l;if(!wt)return;let n=It(e,t);if(De!==n){if(De=n,X===null){X=document.createElement("style");let a=St();a&&X.setAttribute("nonce",a),document.head.appendChild(X)}if(be>=0){var r;(r=X.sheet)==null||r.removeRule(be)}be=((l=X.sheet)==null?void 0:l.insertRule(`*{cursor: ${n} !important;}`))??-1}}function Ve(e){return e.type==="keydown"}function Ue(e){return e.type.startsWith("pointer")}function We(e){return e.type.startsWith("mouse")}function ve(e){if(Ue(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(We(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function Pt(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Et(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function At(e,t){if(e===t)throw Error("Cannot compare node with itself");let n={a:Ke(e),b:Ke(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;v(r,"Stacking order can only be calculated for elements with a common ancestor");let l={a:qe(Je(n.a)),b:qe(Je(n.b))};if(l.a===l.b){let a=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)},u=a.length;for(;u--;){let o=a[u];if(o===i.a)return 1;if(o===i.b)return-1}}return Math.sign(l.a-l.b)}var kt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Dt(e){let t=getComputedStyle(Xe(e)??e).display;return t==="flex"||t==="inline-flex"}function Rt(e){let t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Dt(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||kt.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Je(e){let t=e.length;for(;t--;){let n=e[t];if(v(n,"Missing node"),Rt(n))return n}return null}function qe(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ke(e){let t=[];for(;e;)t.push(e),e=Xe(e);return t}function Xe(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var Ye=1,_e=2,Qe=4,Ze=8,Lt=Pt()==="coarse",V=[],ie=!1,ne=new Map,xe=new Map,fe=new Set;function Mt(e,t,n,r,l){let{ownerDocument:a}=t,i={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:l},u=ne.get(a)??0;return ne.set(a,u+1),fe.add(i),Se(),function(){xe.delete(e),fe.delete(i);let o=ne.get(a)??1;if(ne.set(a,o-1),Se(),o===1&&ne.delete(a),V.includes(i)){let z=V.indexOf(i);z>=0&&V.splice(z,1),He(),l("up",!0,null)}}}function Nt(e){let{target:t}=e,{x:n,y:r}=ve(e);ie=!0,Ne({target:t,x:n,y:r}),Se(),V.length>0&&(we("down",e),e.preventDefault(),et(t)||e.stopImmediatePropagation())}function Le(e){let{x:t,y:n}=ve(e);if(ie&&e.buttons===0&&(ie=!1,we("up",e)),!ie){let{target:r}=e;Ne({target:r,x:t,y:n})}we("move",e),He(),V.length>0&&e.preventDefault()}function Me(e){let{target:t}=e,{x:n,y:r}=ve(e);xe.clear(),ie=!1,V.length>0&&(e.preventDefault(),et(t)||e.stopImmediatePropagation()),we("up",e),Ne({target:t,x:n,y:r}),He(),Se()}function et(e){let t=e;for(;t;){if(t.hasAttribute(A.resizeHandle))return!0;t=t.parentElement}return!1}function Ne({target:e,x:t,y:n}){V.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),fe.forEach(l=>{let{element:a,hitAreaMargins:i}=l,u=a.getBoundingClientRect(),{bottom:o,left:z,right:g,top:f}=u,c=Lt?i.coarse:i.fine;if(t>=z-c&&t<=g+c&&n>=f-c&&n<=o+c){if(r!==null&&document.contains(r)&&a!==r&&!a.contains(r)&&!r.contains(a)&&At(r,a)>0){let b=r,w=!1;for(;b&&!b.contains(a);){if(Et(b.getBoundingClientRect(),u,!0)){w=!0;break}b=b.parentElement}if(w)return}V.push(l)}})}function $e(e,t){xe.set(e,t)}function He(){let e=!1,t=!1;V.forEach(r=>{let{direction:l}=r;l==="horizontal"?e=!0:t=!0});let n=0;xe.forEach(r=>{n|=r}),e&&t?Re("intersection",n):e?Re("horizontal",n):t?Re("vertical",n):Ct()}var Fe=new AbortController;function Se(){Fe.abort(),Fe=new AbortController;let e={capture:!0,signal:Fe.signal};fe.size&&(ie?(V.length>0&&ne.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener("contextmenu",Me,e),r.addEventListener("pointerleave",Le,e),r.addEventListener("pointermove",Le,e))}),window.addEventListener("pointerup",Me,e),window.addEventListener("pointercancel",Me,e)):ne.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener("pointerdown",Nt,e),r.addEventListener("pointermove",Le,e))}))}function we(e,t){fe.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,V.includes(n),t)})}function $t(){let[e,t]=(0,d.useState)(0);return(0,d.useCallback)(()=>t(n=>n+1),[])}function v(e,t){if(!e)throw console.error(t),Error(t)}function re(e,t,n=Ae){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Y(e,t,n=Ae){return re(e,t,n)===0}function O(e,t,n){return re(e,t,n)===0}function Ht(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let l=e[r],a=t[r];if(!O(l,a,n))return!1}return!0}function oe({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];v(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:l=0,collapsible:a,maxSize:i=100,minSize:u=0}=r;if(re(n,u)<0)if(a){let o=(l+u)/2;n=re(n,o)<0?l:u}else n=u;return n=Math.min(i,n),n=parseFloat(n.toFixed(Ae)),n}function pe({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:l,trigger:a}){if(O(e,0))return t;let i=[...t],[u,o]=r;v(u!=null,"Invalid first pivot index"),v(o!=null,"Invalid second pivot index");let z=0;if(a==="keyboard"){{let g=e<0?o:u,f=n[g];v(f,`Panel constraints not found for index ${g}`);let{collapsedSize:c=0,collapsible:b,minSize:w=0}=f;if(b){let C=t[g];if(v(C!=null,`Previous layout not found for panel index ${g}`),O(C,c)){let S=w-C;re(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}{let g=e<0?u:o,f=n[g];v(f,`No panel constraints found for index ${g}`);let{collapsedSize:c=0,collapsible:b,minSize:w=0}=f;if(b){let C=t[g];if(v(C!=null,`Previous layout not found for panel index ${g}`),O(C,w)){let S=C-c;re(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{let g=e<0?1:-1,f=e<0?o:u,c=0;for(;;){let w=t[f];v(w!=null,`Previous layout not found for panel index ${f}`);let C=oe({panelConstraints:n,panelIndex:f,size:100})-w;if(c+=C,f+=g,f<0||f>=n.length)break}let b=Math.min(Math.abs(e),Math.abs(c));e=e<0?0-b:b}{let g=e<0?u:o;for(;g>=0&&g<n.length;){let f=Math.abs(e)-Math.abs(z),c=t[g];v(c!=null,`Previous layout not found for panel index ${g}`);let b=c-f,w=oe({panelConstraints:n,panelIndex:g,size:b});if(!O(c,w)&&(z+=c-w,i[g]=w,z.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?g--:g++}}if(Ht(l,i))return l;{let g=e<0?o:u,f=t[g];v(f!=null,`Previous layout not found for panel index ${g}`);let c=f+z,b=oe({panelConstraints:n,panelIndex:g,size:c});if(i[g]=b,!O(b,c)){let w=c-b,C=e<0?o:u;for(;C>=0&&C<n.length;){let S=i[C];v(S!=null,`Previous layout not found for panel index ${C}`);let k=S+w,D=oe({panelConstraints:n,panelIndex:C,size:k});if(O(S,D)||(w-=D-S,i[C]=D),O(w,0))break;e>0?C--:C++}}}return O(i.reduce((g,f)=>f+g,0),100)?i:l}function Ft({layout:e,panelsArray:t,pivotIndices:n}){let r=0,l=100,a=0,i=0,u=n[0];return v(u!=null,"No pivot index found"),t.forEach((o,z)=>{let{constraints:g}=o,{maxSize:f=100,minSize:c=0}=g;z===u?(r=c,l=f):(a+=c,i+=f)}),{valueMax:Math.min(l,100-a),valueMin:Math.max(r,100-i),valueNow:e[u]}}function ge(e,t=document){return Array.from(t.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${e}"]`))}function tt(e,t,n=document){return ge(e,n).findIndex(r=>r.getAttribute(A.resizeHandleId)===t)??null}function nt(e,t,n){let r=tt(e,t,n);return r==null?[-1,-1]:[r,r+1]}function rt(e,t=document){var n;return t instanceof HTMLElement&&((n=t==null?void 0:t.dataset)==null?void 0:n.panelGroupId)==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function Ie(e,t=document){return t.querySelector(`[${A.resizeHandleId}="${e}"]`)||null}function Bt(e,t,n,r=document){var u,o;let l=Ie(t,r),a=ge(e,r),i=l?a.indexOf(l):-1;return[((u=n[i])==null?void 0:u.id)??null,((o=n[i+1])==null?void 0:o.id)??null]}function Gt({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:l,panelGroupElement:a,setLayout:i}){(0,d.useRef)({didWarnAboutMissingResizeHandle:!1}),te(()=>{if(!a)return;let u=ge(n,a);for(let o=0;o<l.length-1;o++){let{valueMax:z,valueMin:g,valueNow:f}=Ft({layout:r,panelsArray:l,pivotIndices:[o,o+1]}),c=u[o];if(c!=null){let b=l[o];v(b,`No panel data found for index "${o}"`),c.setAttribute("aria-controls",b.id),c.setAttribute("aria-valuemax",""+Math.round(z)),c.setAttribute("aria-valuemin",""+Math.round(g)),c.setAttribute("aria-valuenow",f==null?"":""+Math.round(f))}}return()=>{u.forEach((o,z)=>{o.removeAttribute("aria-controls"),o.removeAttribute("aria-valuemax"),o.removeAttribute("aria-valuemin"),o.removeAttribute("aria-valuenow")})}},[n,r,l,a]),(0,d.useEffect)(()=>{if(!a)return;let u=t.current;v(u,"Eager values not found");let{panelDataArray:o}=u;v(rt(n,a)!=null,`No group found for id "${n}"`);let z=ge(n,a);v(z,`No resize handles found for group id "${n}"`);let g=z.map(f=>{let c=f.getAttribute(A.resizeHandleId);v(c,"Resize handle element has no handle id attribute");let[b,w]=Bt(n,c,o,a);if(b==null||w==null)return()=>{};let C=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();let k=o.findIndex(D=>D.id===b);if(k>=0){let D=o[k];v(D,`No panel data found for index ${k}`);let N=r[k],{collapsedSize:G=0,collapsible:q,minSize:P=0}=D.constraints;if(N!=null&&q){let x=pe({delta:O(N,G)?P-G:G-N,initialLayout:r,panelConstraints:o.map(F=>F.constraints),pivotIndices:nt(n,c,a),prevLayout:r,trigger:"keyboard"});r!==x&&i(x)}}break}}};return f.addEventListener("keydown",C),()=>{f.removeEventListener("keydown",C)}});return()=>{g.forEach(f=>f())}},[a,e,t,n,r,l,i])}function at(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function lt(e,t){let n=e==="horizontal",{x:r,y:l}=ve(t);return n?r:l}function Ot(e,t,n,r,l){let a=n==="horizontal",i=Ie(t,l);v(i,`No resize handle element found for id "${t}"`);let u=i.getAttribute(A.groupId);v(u,"Resize handle element has no group id attribute");let{initialCursorPosition:o}=r,z=lt(n,e),g=rt(u,l);v(g,`No group element found for id "${u}"`);let f=g.getBoundingClientRect(),c=a?f.width:f.height;return(z-o)/c*100}function Tt(e,t,n,r,l,a){if(Ve(e)){let i=n==="horizontal",u=0;u=e.shiftKey?100:l??10;let o=0;switch(e.key){case"ArrowDown":o=i?0:u;break;case"ArrowLeft":o=i?-u:0;break;case"ArrowRight":o=i?u:0;break;case"ArrowUp":o=i?0:-u;break;case"End":o=100;break;case"Home":o=-100;break}return o}else return r==null?0:Ot(e,t,n,r,a)}function jt({panelDataArray:e}){let t=Array(e.length),n=e.map(a=>a.constraints),r=0,l=100;for(let a=0;a<e.length;a++){let i=n[a];v(i,`Panel constraints not found for index ${a}`);let{defaultSize:u}=i;u!=null&&(r++,t[a]=u,l-=u)}for(let a=0;a<e.length;a++){let i=n[a];v(i,`Panel constraints not found for index ${a}`);let{defaultSize:u}=i;if(u!=null)continue;let o=e.length-r,z=l/o;r++,t[a]=z,l-=z}return t}function ue(e,t,n){t.forEach((r,l)=>{let a=e[l];v(a,`Panel data not found for index ${l}`);let{callbacks:i,constraints:u,id:o}=a,{collapsedSize:z=0,collapsible:g}=u,f=n[o];if(f==null||r!==f){n[o]=r;let{onCollapse:c,onExpand:b,onResize:w}=i;w&&w(r,f),g&&(c||b)&&(b&&(f==null||Y(f,z))&&!Y(r,z)&&b(),c&&(f==null||!Y(f,z))&&Y(r,z)&&c())}})}function Ce(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Vt({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:l,precision:a=3}){let i=n[l],u;return u=i==null?e==null?"1":e.toPrecision(a):r.length===1?"1":i.toPrecision(a),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:t===null?void 0:"none"}}function Ut(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function it(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function ot(e){return`react-resizable-panels:${e}`}function ut(e){return e.map(t=>{let{constraints:n,id:r,idIsFromProps:l,order:a}=t;return l?r:a?`${a}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function st(e,t){try{let n=ot(e),r=t.getItem(n);if(r){let l=JSON.parse(r);if(typeof l=="object"&&l)return l}}catch{}return null}function Wt(e,t,n){return(st(e,n)??{})[ut(t)]??null}function Jt(e,t,n,r,l){let a=ot(e),i=ut(t),u=st(e,l)??{};u[i]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{l.setItem(a,JSON.stringify(u))}catch(o){console.error(o)}}function dt({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((a,i)=>a+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!O(r,100)&&n.length>0)for(let a=0;a<t.length;a++){let i=n[a];v(i!=null,`No layout data found for index ${a}`),n[a]=100/r*i}let l=0;for(let a=0;a<t.length;a++){let i=n[a];v(i!=null,`No layout data found for index ${a}`);let u=oe({panelConstraints:t,panelIndex:a,size:i});i!=u&&(l+=i-u,n[a]=u)}if(!O(l,0))for(let a=0;a<t.length;a++){let i=n[a];v(i!=null,`No layout data found for index ${a}`);let u=i+l,o=oe({panelConstraints:t,panelIndex:a,size:u});if(i!==o&&(l-=o-i,n[a]=o,O(l,0)))break}return n}var qt=100,ye={getItem:e=>(it(ye),ye.getItem(e)),setItem:(e,t)=>{it(ye),ye.setItem(e,t)}},ct={};function ft({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:l,id:a=null,onLayout:i=null,keyboardResizeBy:u=null,storage:o=ye,style:z,tagName:g="div",...f}){let c=ke(a),b=(0,d.useRef)(null),[w,C]=(0,d.useState)(null),[S,k]=(0,d.useState)([]),D=$t(),N=(0,d.useRef)({}),G=(0,d.useRef)(new Map),q=(0,d.useRef)(0),P=(0,d.useRef)({autoSaveId:e,direction:r,dragState:w,id:c,keyboardResizeBy:u,onLayout:i,storage:o}),x=(0,d.useRef)({layout:S,panelDataArray:[],panelDataArrayChanged:!1});(0,d.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,d.useImperativeHandle)(l,()=>({getId:()=>P.current.id,getLayout:()=>{let{layout:s}=x.current;return s},setLayout:s=>{let{onLayout:p}=P.current,{layout:y,panelDataArray:m}=x.current,h=dt({layout:s,panelConstraints:m.map(I=>I.constraints)});at(y,h)||(k(h),x.current.layout=h,p&&p(h),ue(m,h,N.current))}}),[]),te(()=>{P.current.autoSaveId=e,P.current.direction=r,P.current.dragState=w,P.current.id=c,P.current.onLayout=i,P.current.storage=o}),Gt({committedValuesRef:P,eagerValuesRef:x,groupId:c,layout:S,panelDataArray:x.current.panelDataArray,setLayout:k,panelGroupElement:b.current}),(0,d.useEffect)(()=>{let{panelDataArray:s}=x.current;if(e){if(S.length===0||S.length!==s.length)return;let p=ct[e];p??(p=Ut(Jt,qt),ct[e]=p);let y=[...s],m=new Map(G.current);p(e,y,m,S,o)}},[e,S,o]),(0,d.useEffect)(()=>{});let F=(0,d.useCallback)(s=>{let{onLayout:p}=P.current,{layout:y,panelDataArray:m}=x.current;if(s.constraints.collapsible){let h=m.map(R=>R.constraints),{collapsedSize:I=0,panelSize:E,pivotIndices:M}=ae(m,s,y);if(v(E!=null,`Panel size not found for panel "${s.id}"`),!Y(E,I)){G.current.set(s.id,E);let R=pe({delta:se(m,s)===m.length-1?E-I:I-E,initialLayout:y,panelConstraints:h,pivotIndices:M,prevLayout:y,trigger:"imperative-api"});Ce(y,R)||(k(R),x.current.layout=R,p&&p(R),ue(m,R,N.current))}}},[]),U=(0,d.useCallback)((s,p)=>{let{onLayout:y}=P.current,{layout:m,panelDataArray:h}=x.current;if(s.constraints.collapsible){let I=h.map(_=>_.constraints),{collapsedSize:E=0,panelSize:M=0,minSize:R=0,pivotIndices:K}=ae(h,s,m),j=p??R;if(Y(M,E)){let _=G.current.get(s.id),he=_!=null&&_>=j?_:j,ee=pe({delta:se(h,s)===h.length-1?M-he:he-M,initialLayout:m,panelConstraints:I,pivotIndices:K,prevLayout:m,trigger:"imperative-api"});Ce(m,ee)||(k(ee),x.current.layout=ee,y&&y(ee),ue(h,ee,N.current))}}},[]),W=(0,d.useCallback)(s=>{let{layout:p,panelDataArray:y}=x.current,{panelSize:m}=ae(y,s,p);return v(m!=null,`Panel size not found for panel "${s.id}"`),m},[]),T=(0,d.useCallback)((s,p)=>{let{panelDataArray:y}=x.current;return Vt({defaultSize:p,dragState:w,layout:S,panelData:y,panelIndex:se(y,s)})},[w,S]),L=(0,d.useCallback)(s=>{let{layout:p,panelDataArray:y}=x.current,{collapsedSize:m=0,collapsible:h,panelSize:I}=ae(y,s,p);return v(I!=null,`Panel size not found for panel "${s.id}"`),h===!0&&Y(I,m)},[]),J=(0,d.useCallback)(s=>{let{layout:p,panelDataArray:y}=x.current,{collapsedSize:m=0,collapsible:h,panelSize:I}=ae(y,s,p);return v(I!=null,`Panel size not found for panel "${s.id}"`),!h||re(I,m)>0},[]),$=(0,d.useCallback)(s=>{let{panelDataArray:p}=x.current;p.push(s),p.sort((y,m)=>{let h=y.order,I=m.order;return h==null&&I==null?0:h==null?-1:I==null?1:h-I}),x.current.panelDataArrayChanged=!0,D()},[D]);te(()=>{if(x.current.panelDataArrayChanged){x.current.panelDataArrayChanged=!1;let{autoSaveId:s,onLayout:p,storage:y}=P.current,{layout:m,panelDataArray:h}=x.current,I=null;if(s){let M=Wt(s,h,y);M&&(G.current=new Map(Object.entries(M.expandToSizes)),I=M.layout)}I??(I=jt({panelDataArray:h}));let E=dt({layout:I,panelConstraints:h.map(M=>M.constraints)});at(m,E)||(k(E),x.current.layout=E,p&&p(E),ue(h,E,N.current))}}),te(()=>{let s=x.current;return()=>{s.layout=[]}},[]);let H=(0,d.useCallback)(s=>{let p=!1,y=b.current;return y&&window.getComputedStyle(y,null).getPropertyValue("direction")==="rtl"&&(p=!0),function(m){m.preventDefault();let h=b.current;if(!h)return()=>null;let{direction:I,dragState:E,id:M,keyboardResizeBy:R,onLayout:K}=P.current,{layout:j,panelDataArray:_}=x.current,{initialLayout:he}=E??{},ee=nt(M,s,h),Q=Tt(m,s,I,E,R,h),Be=I==="horizontal";Be&&p&&(Q=-Q);let yt=_.map(mt=>mt.constraints),ce=pe({delta:Q,initialLayout:he??j,panelConstraints:yt,pivotIndices:ee,prevLayout:j,trigger:Ve(m)?"keyboard":"mouse-or-touch"}),Ge=!Ce(j,ce);(Ue(m)||We(m))&&q.current!=Q&&(q.current=Q,!Ge&&Q!==0?Be?$e(s,Q<0?Ye:_e):$e(s,Q<0?Qe:Ze):$e(s,0)),Ge&&(k(ce),x.current.layout=ce,K&&K(ce),ue(_,ce,N.current))}},[]),B=(0,d.useCallback)((s,p)=>{let{onLayout:y}=P.current,{layout:m,panelDataArray:h}=x.current,I=h.map(K=>K.constraints),{panelSize:E,pivotIndices:M}=ae(h,s,m);v(E!=null,`Panel size not found for panel "${s.id}"`);let R=pe({delta:se(h,s)===h.length-1?E-p:p-E,initialLayout:m,panelConstraints:I,pivotIndices:M,prevLayout:m,trigger:"imperative-api"});Ce(m,R)||(k(R),x.current.layout=R,y&&y(R),ue(h,R,N.current))},[]),de=(0,d.useCallback)((s,p)=>{let{layout:y,panelDataArray:m}=x.current,{collapsedSize:h=0,collapsible:I}=p,{collapsedSize:E=0,collapsible:M,maxSize:R=100,minSize:K=0}=s.constraints,{panelSize:j}=ae(m,s,y);j!=null&&(I&&M&&Y(j,h)?Y(h,E)||B(s,E):j<K?B(s,K):j>R&&B(s,R))},[B]),me=(0,d.useCallback)((s,p)=>{let{direction:y}=P.current,{layout:m}=x.current;if(!b.current)return;let h=Ie(s,b.current);v(h,`Drag handle element not found for id "${s}"`);let I=lt(y,p);C({dragHandleId:s,dragHandleRect:h.getBoundingClientRect(),initialCursorPosition:I,initialLayout:m})},[]),Z=(0,d.useCallback)(()=>{C(null)},[]),le=(0,d.useCallback)(s=>{let{panelDataArray:p}=x.current,y=se(p,s);y>=0&&(p.splice(y,1),delete N.current[s.id],x.current.panelDataArrayChanged=!0,D())},[D]),Pe=(0,d.useMemo)(()=>({collapsePanel:F,direction:r,dragState:w,expandPanel:U,getPanelSize:W,getPanelStyle:T,groupId:c,isPanelCollapsed:L,isPanelExpanded:J,reevaluatePanelConstraints:de,registerPanel:$,registerResizeHandle:H,resizePanel:B,startDragging:me,stopDragging:Z,unregisterPanel:le,panelGroupElement:b.current}),[F,w,r,U,W,T,c,L,J,de,$,H,B,me,Z,le]),Ee={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return(0,d.createElement)(ze.Provider,{value:Pe},(0,d.createElement)(g,{...f,children:t,className:n,id:a,ref:b,style:{...Ee,...z},[A.group]:"",[A.groupDirection]:r,[A.groupId]:c}))}var pt=(0,d.forwardRef)((e,t)=>(0,d.createElement)(ft,{...e,forwardedRef:t}));ft.displayName="PanelGroup",pt.displayName="forwardRef(PanelGroup)";function se(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ae(e,t,n){let r=se(e,t),l=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:l}}function Kt({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,d.useEffect)(()=>{if(e||n==null||r==null)return;let l=Ie(t,r);if(l==null)return;let a=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":i.preventDefault(),n(i);break;case"F6":{i.preventDefault();let u=l.getAttribute(A.groupId);v(u,`No group element found for id "${u}"`);let o=ge(u,r),z=tt(u,t,r);v(z!==null,`No resize element found for id "${t}"`),o[i.shiftKey?z>0?z-1:o.length-1:z+1<o.length?z+1:0].focus();break}}};return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}},[r,e,t,n])}function gt({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:l,onBlur:a,onClick:i,onDragging:u,onFocus:o,onPointerDown:z,onPointerUp:g,style:f={},tabIndex:c=0,tagName:b="div",...w}){let C=(0,d.useRef)(null),S=(0,d.useRef)({onClick:i,onDragging:u,onPointerDown:z,onPointerUp:g});(0,d.useEffect)(()=>{S.current.onClick=i,S.current.onDragging=u,S.current.onPointerDown=z,S.current.onPointerUp=g});let k=(0,d.useContext)(ze);if(k===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");let{direction:D,groupId:N,registerResizeHandle:G,startDragging:q,stopDragging:P,panelGroupElement:x}=k,F=ke(l),[U,W]=(0,d.useState)("inactive"),[T,L]=(0,d.useState)(!1),[J,$]=(0,d.useState)(null),H=(0,d.useRef)({state:U});te(()=>{H.current.state=U}),(0,d.useEffect)(()=>{if(n)$(null);else{let Z=G(F);$(()=>Z)}},[n,F,G]);let B=(r==null?void 0:r.coarse)??15,de=(r==null?void 0:r.fine)??5;(0,d.useEffect)(()=>{if(n||J==null)return;let Z=C.current;v(Z,"Element ref not attached");let le=!1;return Mt(F,Z,D,{coarse:B,fine:de},(Pe,Ee,s)=>{if(!Ee){W("inactive");return}switch(Pe){case"down":{W("drag"),le=!1,v(s,'Expected event to be defined for "down" action'),q(F,s);let{onDragging:p,onPointerDown:y}=S.current;p==null||p(!0),y==null||y();break}case"move":{let{state:p}=H.current;le=!0,p!=="drag"&&W("hover"),v(s,'Expected event to be defined for "move" action'),J(s);break}case"up":{W("hover"),P();let{onClick:p,onDragging:y,onPointerUp:m}=S.current;y==null||y(!1),m==null||m(),le||(p==null||p());break}}})},[B,D,n,de,G,F,J,q,P]),Kt({disabled:n,handleId:F,resizeHandler:J,panelGroupElement:x});let me={touchAction:"none",userSelect:"none"};return(0,d.createElement)(b,{...w,children:e,className:t,id:l,onBlur:()=>{L(!1),a==null||a()},onFocus:()=>{L(!0),o==null||o()},ref:C,role:"separator",style:{...me,...f},tabIndex:c,[A.groupDirection]:D,[A.groupId]:N,[A.resizeHandle]:"",[A.resizeHandleActive]:U==="drag"?"pointer":T?"keyboard":void 0,[A.resizeHandleEnabled]:!n,[A.resizeHandleId]:F,[A.resizeHandleState]:U})}gt.displayName="PanelResizeHandle";export{pt as n,gt as r,je as t};

Sorry, the diff of this file is too big to display

import"./react-Bj1aDYRI.js";import"./jsx-runtime-ZmTK25f3.js";import"./vega-loader.browser-DXARUlxo.js";import{n as m,t as o}from"./react-vega-BL1HBBjq.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";export{m as VegaEmbed,o as useVegaEmbed};
import{s as I}from"./chunk-LvLJmgfZ.js";import{o as D,p as E}from"./useEvent-BhXAndur.js";import{t as F}from"./react-Bj1aDYRI.js";import{Un as L,kt as U}from"./cells-DPp5cDaO.js";import{t as V}from"./compiler-runtime-B3qBwwSJ.js";import{t as q}from"./jsx-runtime-ZmTK25f3.js";import{r as G,t as W}from"./button-CZ3Cs4qb.js";import{t as A}from"./cn-BKtXLv3a.js";import{at as M}from"./dist-DBwNzi3C.js";import{f as J}from"./dist-Gqv0jSNr.js";import{t as K}from"./createLucideIcon-BCdY6lG5.js";import{t as Q}from"./copy-D-8y6iMN.js";import{t as X}from"./eye-off-AK_9uodG.js";import{t as Y}from"./plus-B7DF33lD.js";import{t as Z}from"./use-toast-BDYuj3zG.js";import{r as $}from"./useTheme-DQozhcp1.js";import{t as g}from"./tooltip-CMQz28hC.js";import{t as tt}from"./copy-DHrHayPa.js";import{t as ot}from"./esm-Bmu2DhPy.js";import{t as et}from"./useAddCell-CmuX2hOk.js";var rt=K("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const O=E({isInstantiated:!1,error:null});function at(){return D(O,o=>o.isInstantiated)}var w=V(),R=I(F(),1),s=I(q(),1),st=[U(),M.lineWrapping],it=[J(),M.lineWrapping];const T=(0,R.memo)(o=>{let t=(0,w.c)(41),{theme:a}=$(),e,r,i,l,c,u,C,j;t[0]===o?(e=t[1],r=t[2],i=t[3],l=t[4],c=t[5],u=t[6],C=t[7],j=t[8]):({code:r,className:e,initiallyHideCode:i,showHideCode:u,showCopyCode:C,insertNewCell:l,language:j,...c}=o,t[0]=o,t[1]=e,t[2]=r,t[3]=i,t[4]=l,t[5]=c,t[6]=u,t[7]=C,t[8]=j);let m=u===void 0?!0:u,b=C===void 0?!0:C,B=j===void 0?"python":j,[n,H]=(0,R.useState)(i),d;t[9]===e?d=t[10]:(d=A("relative hover-actions-parent w-full overflow-hidden",e),t[9]=e,t[10]=d);let p;t[11]!==n||t[12]!==m?(p=m&&n&&(0,s.jsx)(ct,{tooltip:"Show code",onClick:()=>H(!1)}),t[11]=n,t[12]=m,t[13]=p):p=t[13];let h;t[14]!==r||t[15]!==b?(h=b&&(0,s.jsx)(lt,{text:r}),t[14]=r,t[15]=b,t[16]=h):h=t[16];let f;t[17]!==r||t[18]!==l?(f=l&&(0,s.jsx)(mt,{code:r}),t[17]=r,t[18]=l,t[19]=f):f=t[19];let x;t[20]!==n||t[21]!==m?(x=m&&!n&&(0,s.jsx)(nt,{onClick:()=>H(!0)}),t[20]=n,t[21]=m,t[22]=x):x=t[22];let y;t[23]!==h||t[24]!==f||t[25]!==x?(y=(0,s.jsxs)("div",{className:"absolute top-0 right-0 my-1 mx-2 z-10 hover-action flex gap-2",children:[h,f,x]}),t[23]=h,t[24]=f,t[25]=x,t[26]=y):y=t[26];let z=n&&"opacity-20 h-8 overflow-hidden",v;t[27]===z?v=t[28]:(v=A("cm",z),t[27]=z,t[28]=v);let _=a==="dark"?"dark":"light",S=!n,P=B==="python"?st:it,k;t[29]!==r||t[30]!==c||t[31]!==v||t[32]!==_||t[33]!==S||t[34]!==P?(k=(0,s.jsx)(ot,{...c,className:v,theme:_,height:"100%",editable:S,extensions:P,value:r,readOnly:!0}),t[29]=r,t[30]=c,t[31]=v,t[32]=_,t[33]=S,t[34]=P,t[35]=k):k=t[35];let N;return t[36]!==k||t[37]!==d||t[38]!==p||t[39]!==y?(N=(0,s.jsxs)("div",{className:d,children:[p,y,k]}),t[36]=k,t[37]=d,t[38]=p,t[39]=y,t[40]=N):N=t[40],N});T.displayName="ReadonlyCode";var lt=o=>{let t=(0,w.c)(5),a;t[0]===o.text?a=t[1]:(a=G.stopPropagation(async()=>{await tt(o.text),Z({title:"Copied to clipboard"})}),t[0]=o.text,t[1]=a);let e=a,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,s.jsx)(Q,{size:14,strokeWidth:1.5}),t[2]=r):r=t[2];let i;return t[3]===e?i=t[4]:(i=(0,s.jsx)(g,{content:"Copy code",usePortal:!1,children:(0,s.jsx)(W,{onClick:e,size:"xs",className:"py-0",variant:"secondary",children:r})}),t[3]=e,t[4]=i),i},nt=o=>{let t=(0,w.c)(3),a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)(X,{size:14,strokeWidth:1.5}),t[0]=a):a=t[0];let e;return t[1]===o.onClick?e=t[2]:(e=(0,s.jsx)(g,{content:"Hide code",usePortal:!1,children:(0,s.jsx)(W,{onClick:o.onClick,size:"xs",className:"py-0",variant:"secondary",children:a})}),t[1]=o.onClick,t[2]=e),e};const ct=o=>{let t=(0,w.c)(7),a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)(L,{className:"hover-action w-5 h-5 text-muted-foreground cursor-pointer absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 opacity-80 hover:opacity-100 z-20"}),t[0]=a):a=t[0];let e;t[1]===o.tooltip?e=t[2]:(e=(0,s.jsx)(g,{usePortal:!1,content:o.tooltip,children:a}),t[1]=o.tooltip,t[2]=e);let r;return t[3]!==o.className||t[4]!==o.onClick||t[5]!==e?(r=(0,s.jsx)("div",{className:o.className,onClick:o.onClick,children:e}),t[3]=o.className,t[4]=o.onClick,t[5]=e,t[6]=r):r=t[6],r};var mt=o=>{let t=(0,w.c)(6),a=et(),e;t[0]!==a||t[1]!==o.code?(e=()=>{a(o.code)},t[0]=a,t[1]=o.code,t[2]=e):e=t[2];let r=e,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(Y,{size:14,strokeWidth:1.5}),t[3]=i):i=t[3];let l;return t[4]===r?l=t[5]:(l=(0,s.jsx)(g,{content:"Add code to notebook",usePortal:!1,children:(0,s.jsx)(W,{onClick:r,size:"xs",className:"py-0",variant:"secondary",children:i})}),t[4]=r,t[5]=l),l};export{rt as i,O as n,at as r,T as t};
import{t as h}from"./createLucideIcon-BCdY6lG5.js";var a=h("refresh-ccw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);export{a as t};
import{t}from"./createLucideIcon-BCdY6lG5.js";var a=t("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);export{a as t};
import{s as v}from"./chunk-LvLJmgfZ.js";import{p as x,u as j}from"./useEvent-BhXAndur.js";import{t as _}from"./react-Bj1aDYRI.js";import{Rr as R,zr as u}from"./cells-DPp5cDaO.js";import{t as y}from"./compiler-runtime-B3qBwwSJ.js";import{o as w}from"./utils-YqBXNpsM.js";import{t as N}from"./jsx-runtime-ZmTK25f3.js";import{t as z}from"./mode-Bn7pdJvO.js";import{t as C}from"./usePress-C__vuri5.js";import{t as H}from"./copy-icon-v8ME_JKB.js";import{t as E}from"./purify.es-DZrAQFIu.js";import{t as k}from"./useRunCells-D2HBb4DB.js";var F=y(),m=v(_(),1),s=v(N(),1);const M=e=>{let t=(0,F.c)(16),r,a,i;t[0]===e?(r=t[1],a=t[2],i=t[3]):({href:a,children:r,...i}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=i);let o=(0,m.useRef)(null),l;t[4]===a?l=t[5]:(l=()=>{let d=new URL(globalThis.location.href);d.hash=a,globalThis.history.pushState({},"",d.toString()),globalThis.dispatchEvent(new HashChangeEvent("hashchange"));let S=a.slice(1),A=document.getElementById(S);A&&A.scrollIntoView({behavior:"smooth",block:"start"})},t[4]=a,t[5]=l);let n=l,c;t[6]===n?c=t[7]:(c={onPress:()=>{n()}},t[6]=n,t[7]=c);let{pressProps:b}=C(c),f;t[8]===n?f=t[9]:(f=d=>{d.preventDefault(),n()},t[8]=n,t[9]=f);let g=f,h;return t[10]!==r||t[11]!==g||t[12]!==a||t[13]!==b||t[14]!==i?(h=(0,s.jsx)("a",{ref:o,href:a,...b,onClick:g,...i,children:r}),t[10]=r,t[11]=g,t[12]=a,t[13]=b,t[14]=i,t[15]=h):h=t[15],h};var T=x(e=>{let t=e(k),r=e(w);if(t||r)return!1;let a=!0;try{a=z()==="read"}catch{return!0}return!a});function L(){return j(T)}var p="data-temp-href-target";E.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&(e.hasAttribute("target")||e.setAttribute("target","_self"),e.hasAttribute("target")&&e.setAttribute(p,e.getAttribute("target")||""))}),E.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(p)&&(e.setAttribute("target",e.getAttribute(p)||""),e.removeAttribute(p),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer"))});function O(e){let t={USE_PROFILES:{html:!0,svg:!0,mathMl:!0},FORCE_BODY:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:/^(marimo-[A-Za-z][\w-]*|iconify-icon)$/,attributeNameCheck:/^[A-Za-z][\w-]*$/},SAFE_FOR_XML:!e.includes("marimo-mermaid")};return E.sanitize(e,t)}var I=y(),D=e=>{if(e instanceof u.Element&&!/^[A-Za-z][\w-]*$/.test(e.name))return m.createElement(m.Fragment)},V=(e,t)=>{if(t instanceof u.Element&&t.name==="body"){if((0,m.isValidElement)(e)&&"props"in e){let r=e.props.children;return(0,s.jsx)(s.Fragment,{children:r})}return}},W=(e,t)=>{if(t instanceof u.Element&&t.name==="html"){if((0,m.isValidElement)(e)&&"props"in e){let r=e.props.children;return(0,s.jsx)(s.Fragment,{children:r})}return}},$=e=>{if(e instanceof u.Element&&e.attribs&&e.name==="iframe"){let t=document.createElement("iframe");return Object.entries(e.attribs).forEach(([r,a])=>{r.startsWith('"')&&r.endsWith('"')&&(r=r.slice(1,-1)),t.setAttribute(r,a)}),(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:t.outerHTML}})}},P=e=>{if(e instanceof u.Element&&e.name==="script"){let t=e.attribs.src;if(!t)return;if(!document.querySelector(`script[src="${t}"]`)){let r=document.createElement("script");r.src=t,document.head.append(r)}return(0,s.jsx)(s.Fragment,{})}},U=(e,t)=>{if(t instanceof u.Element&&t.name==="a"){let r=t.attribs.href;if(r!=null&&r.startsWith("#")&&!r.startsWith("#code/")){let a=null;return(0,m.isValidElement)(e)&&"props"in e&&(a=e.props.children),(0,s.jsx)(M,{href:r,...t.attribs,children:a})}}},Z=(e,t,r)=>{var a,i;if(t instanceof u.Element&&t.name==="div"&&((i=(a=t.attribs)==null?void 0:a.class)!=null&&i.includes("codehilite")))return(0,s.jsx)(B,{children:e},r)},B=e=>{let t=(0,I.c)(3),{children:r}=e,a=(0,m.useRef)(null),i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,s.jsx)(H,{tooltip:!1,className:"p-1",value:()=>{var n;let l=(n=a.current)==null?void 0:n.firstChild;return l&&l.textContent||""}})}),t[0]=i):i=t[0];let o;return t[1]===r?o=t[2]:(o=(0,s.jsxs)("div",{className:"relative group codehilite-wrapper",ref:a,children:[r,i]}),t[1]=r,t[2]=o),o};const q=({html:e,additionalReplacements:t=[],alwaysSanitizeHtml:r=!0})=>(0,s.jsx)(G,{html:e,alwaysSanitizeHtml:r,additionalReplacements:t});var G=({html:e,additionalReplacements:t=[],alwaysSanitizeHtml:r})=>{let a=L();return X({html:(0,m.useMemo)(()=>r||a?O(e):e,[e,r,a]),additionalReplacements:t})};function X({html:e,additionalReplacements:t=[]}){let r=[D,$,P,...t],a=[Z,U,V,W];return R(e,{replace:(i,o)=>{for(let l of r){let n=l(i,o);if(n)return n}return i},transform:(i,o,l)=>{for(let n of a){let c=n(i,o,l);if(c)return c}return i}})}export{q as t};
import{s as g}from"./chunk-LvLJmgfZ.js";import{u as d}from"./useEvent-BhXAndur.js";import{t as A}from"./compiler-runtime-B3qBwwSJ.js";import{s as v,t as b}from"./hotkeys-BHHWjLlp.js";import{p}from"./utils-YqBXNpsM.js";import{t as D}from"./jsx-runtime-ZmTK25f3.js";import{t as y}from"./cn-BKtXLv3a.js";import{l as S}from"./dropdown-menu-ldcmQvIV.js";import{t as h}from"./tooltip-CMQz28hC.js";import{t as x}from"./kbd-Cm6Ba9qg.js";var f=A(),m=g(D(),1);function _(o,e=!0){return(0,m.jsx)(E,{shortcut:o,includeName:e})}var E=o=>{let e=(0,f.c)(11),{shortcut:l,includeName:s}=o,t=s===void 0?!0:s,a=d(p),n;e[0]!==a||e[1]!==l?(n=a.getHotkey(l),e[0]=a,e[1]=l,e[2]=n):n=e[2];let r=n,c;e[3]!==r.name||e[4]!==t?(c=t&&(0,m.jsx)("span",{className:"mr-2",children:r.name}),e[3]=r.name,e[4]=t,e[5]=c):c=e[5];let i;e[6]===r.key?i=e[7]:(i=(0,m.jsx)(j,{shortcut:r.key}),e[6]=r.key,e[7]=i);let u;return e[8]!==c||e[9]!==i?(u=(0,m.jsxs)("span",{className:"inline-flex",children:[c,i]}),e[8]=c,e[9]=i,e[10]=u):u=e[10],u};const j=o=>{let e=(0,f.c)(10),{shortcut:l,className:s}=o;if(l===b||l===""){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,m.jsx)("span",{}),e[0]=r):r=e[0],r}let t,a;if(e[1]!==s||e[2]!==l){let r=l.split("-");e[5]===s?t=e[6]:(t=y("flex gap-1",s),e[5]=s,e[6]=t),a=r.map(k).map(L),e[1]=s,e[2]=l,e[3]=t,e[4]=a}else t=e[3],a=e[4];let n;return e[7]!==t||e[8]!==a?(n=(0,m.jsx)("div",{className:t,children:a}),e[7]=t,e[8]=a,e[9]=n):n=e[9],n};function H(o){return(0,m.jsx)(w,{shortcut:o})}const w=o=>{let e=(0,f.c)(6),{className:l,shortcut:s}=o,t=d(p),a;e[0]!==t||e[1]!==s?(a=t.getHotkey(s),e[0]=t,e[1]=s,e[2]=a):a=e[2];let n=a,r;return e[3]!==l||e[4]!==n.key?(r=(0,m.jsx)(C,{shortcut:n.key,className:l}),e[3]=l,e[4]=n.key,e[5]=r):r=e[5],r},C=o=>{let e=(0,f.c)(12),{shortcut:l,className:s}=o;if(l===b||l===""){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,m.jsx)("span",{}),e[0]=c):c=e[0],c}let t,a,n;if(e[1]!==s||e[2]!==l){let c=l.split("-");t=S,e[6]===s?a=e[7]:(a=y("flex gap-1 items-center",s),e[6]=s,e[7]=a),n=c.map(k).map(F),e[1]=s,e[2]=l,e[3]=t,e[4]=a,e[5]=n}else t=e[3],a=e[4],n=e[5];let r;return e[8]!==t||e[9]!==a||e[10]!==n?(r=(0,m.jsx)(t,{className:a,children:n}),e[8]=t,e[9]=a,e[10]=n,e[11]=r):r=e[11],r};function k(o){let e=v()?"mac":"default",l=o.toLowerCase(),s=I[o.toLowerCase()];if(s){let t=s.symbols[e]||s.symbols.default;return[s.label,t]}return[l]}var I={ctrl:{symbols:{mac:"\u2303",default:"Ctrl"},label:"Control"},control:{symbols:{mac:"\u2303",default:"Ctrl"},label:"Control"},shift:{symbols:{mac:"\u21E7",default:"Shift"},label:"Shift"},alt:{symbols:{mac:"\u2325",default:"Alt"},label:"Alt/Option"},escape:{symbols:{mac:"\u238B",default:"Esc"},label:"Escape"},arrowup:{symbols:{default:"\u2191"},label:"Arrow Up"},arrowdown:{symbols:{default:"\u2193"},label:"Arrow Down"},arrowleft:{symbols:{default:"\u2190"},label:"Arrow Left"},arrowright:{symbols:{default:"\u2192"},label:"Arrow Right"},backspace:{symbols:{mac:"\u232B",default:"\u27F5"},label:"Backspace"},tab:{symbols:{mac:"\u21E5",default:"\u2B7E"},label:"Tab"},capslock:{symbols:{default:"\u21EA"},label:"Caps Lock"},fn:{symbols:{default:"Fn"},label:"Fn"},cmd:{symbols:{mac:"\u2318",windows:"\u229E Win",default:"Command"},label:"Command"},insert:{symbols:{default:"Ins"},label:"Insert"},delete:{symbols:{mac:"\u2326",default:"Del"},label:"Delete"},home:{symbols:{mac:"\u2196",default:"Home"},label:"Home"},end:{symbols:{mac:"\u2198",default:"End"},label:"End"},mod:{symbols:{mac:"\u2318",windows:"\u229E Win",default:"Ctrl"},label:"Control"}};function N(o){return o.charAt(0).toUpperCase()+o.slice(1)}function L(o){let[e,l]=o;return l?(0,m.jsx)(h,{asChild:!1,tabIndex:-1,content:e,delayDuration:300,children:(0,m.jsx)(x,{children:l},e)},e):(0,m.jsx)(x,{children:N(e)},e)}function F(o){let[e,l]=o;return l?(0,m.jsx)(h,{content:e,delayDuration:300,tabIndex:-1,children:(0,m.jsx)("span",{children:l},e)},e):(0,m.jsx)("span",{children:N(e)},e)}export{_ as a,H as i,C as n,w as r,j as t};
import{t as s}from"./requests-B4FYHTZl.js";import{t as r}from"./DeferredRequestRegistry-CMf25YiV.js";const o=new r("secrets-result",async(t,e)=>{await s().listSecretKeys({requestId:t,...e})});export{o as t};
import{i as s,p as n,u as i}from"./useEvent-BhXAndur.js";import{t as r}from"./invariant-CAG_dYON.js";const e=n(null);function u(){let t=i(e);return r(t,"useRequestClient() requires setting requestClientAtom."),t}function o(){let t=s.get(e);return r(t,"getRequestClient() requires requestClientAtom to be set."),t}export{e as n,u as r,o as t};
import{p as o}from"./useEvent-BhXAndur.js";const t=o(null);export{t};
var J;import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import{g as ze}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as u,r as ke,t as Ge}from"./src-CsZby044.js";import{B as Xe,C as Je,U as Ze,_ as et,a as tt,b as Ne,v as st,z as it}from"./chunk-ABZYJK2D-0jga8uiE.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import{r as nt,t as rt}from"./chunk-N4CR4FBY-BNoQB557.js";import{t as at}from"./chunk-55IACEB6-njZIr50E.js";import{t as lt}from"./chunk-QN33PNHL-BOQncxfy.js";var qe=(function(){var e=u(function(i,m,a,s){for(a||(a={}),s=i.length;s--;a[i[s]]=m);return a},"o"),r=[1,3],h=[1,4],c=[1,5],y=[1,6],l=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],d=[2,7],o=[1,26],p=[1,27],S=[1,28],T=[1,29],C=[1,33],A=[1,34],v=[1,35],L=[1,36],x=[1,37],O=[1,38],M=[1,24],$=[1,31],D=[1,32],w=[1,30],_=[1,39],g=[1,40],R=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],G=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],pe=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],Me=[1,75],$e=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],ne=[1,88],re=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],V=[63,64],De=[1,101],we=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[1,110],B=[1,106],Q=[1,107],H=[1,108],K=[1,109],W=[1,111],oe=[1,116],he=[1,117],ue=[1,114],ye=[1,115],ge={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(i,m,a,s,f,t,me){var n=t.length-1;switch(f){case 4:this.$=t[n].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[n].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[n-3],t[n-4]);break;case 22:s.addRequirement(t[n-5],t[n-6]),s.setClass([t[n-5]],t[n-3]);break;case 23:s.setNewReqId(t[n-2]);break;case 24:s.setNewReqText(t[n-2]);break;case 25:s.setNewReqRisk(t[n-2]);break;case 26:s.setNewReqVerifyMethod(t[n-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[n-3]);break;case 43:s.addElement(t[n-5]),s.setClass([t[n-5]],t[n-3]);break;case 44:s.setNewElementType(t[n-2]);break;case 45:s.setNewElementDocRef(t[n-2]);break;case 48:s.addRelationship(t[n-2],t[n],t[n-4]);break;case 49:s.addRelationship(t[n-2],t[n-4],t[n]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[n-2],s.defineClass(t[n-1],t[n]);break;case 58:s.setClass(t[n-1],t[n]);break;case 59:s.setClass([t[n-2]],t[n]);break;case 60:case 62:this.$=[t[n]];break;case 61:case 63:this.$=t[n-2].concat([t[n]]);break;case 64:this.$=t[n-2],s.setCssStyle(t[n-1],t[n]);break;case 65:this.$=[t[n]];break;case 66:t[n-2].push(t[n]),this.$=t[n-2];break;case 68:this.$=t[n-1]+t[n];break}},"anonymous"),table:[{3:1,4:2,6:r,9:h,11:c,13:y},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:h,11:c,13:y},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(l,[2,6]),{3:12,4:2,6:r,9:h,11:c,13:y},{1:[2,2]},{4:17,5:E,7:13,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},e(l,[2,4]),e(l,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:43,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:44,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:45,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:46,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:47,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:48,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:49,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:50,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(R,[2,17]),e(R,[2,18]),e(R,[2,19]),e(R,[2,20]),{30:60,33:62,75:P,89:_,90:g},{30:63,33:62,75:P,89:_,90:g},{30:64,33:62,75:P,89:_,90:g},e(G,[2,29]),e(G,[2,30]),e(G,[2,31]),e(G,[2,32]),e(G,[2,33]),e(G,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(pe,[2,79]),e(pe,[2,80]),{27:[1,67],29:[1,68]},e(pe,[2,85]),e(pe,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:Me,71:$e},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:Me,71:$e},{30:78,33:62,75:P,89:_,90:g},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:_,90:g},{5:[1,95]},{30:96,33:62,75:P,89:_,90:g},{5:[1,97]},{30:98,33:62,75:P,89:_,90:g},{63:[1,99]},e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(V,[2,54]),e(V,[2,55]),e(V,[2,56]),{64:[1,100]},e(R,[2,59],{76:U}),e(R,[2,64],{76:De}),{33:103,75:[1,102],89:_,90:g},e(we,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),e(k,[2,67]),e(k,[2,69]),e(k,[2,70]),e(k,[2,71]),e(k,[2,72]),e(k,[2,73]),e(k,[2,74]),e(k,[2,75]),e(k,[2,76]),e(k,[2,77]),e(k,[2,78]),e(R,[2,57],{76:De}),e(R,[2,58],{76:U}),{5:Y,28:105,31:B,34:Q,36:H,38:K,40:W},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:ye},{27:[1,118],76:U},{33:119,89:_,90:g},{33:120,89:_,90:g},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(k,[2,68]),e(R,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Y,28:126,31:B,34:Q,36:H,38:K,40:W},e(R,[2,28]),{5:[1,127]},e(R,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:ye},e(R,[2,47]),{5:[1,131]},e(R,[2,48]),e(R,[2,49]),e(we,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),{33:132,89:_,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(R,[2,27]),{5:Y,28:145,31:B,34:Q,36:H,38:K,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(R,[2,46]),{5:oe,40:he,56:152,57:ue,59:ye},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(R,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(R,[2,43]),{5:Y,28:159,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:160,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:161,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:162,31:B,34:Q,36:H,38:K,40:W},{5:oe,40:he,56:163,57:ue,59:ye},{5:oe,40:he,56:164,57:ue,59:ye},e(R,[2,23]),e(R,[2,24]),e(R,[2,25]),e(R,[2,26]),e(R,[2,44]),e(R,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(i,m){if(m.recoverable)this.trace(i);else{var a=Error(i);throw a.hash=m,a}},"parseError"),parse:u(function(i){var m=this,a=[0],s=[],f=[null],t=[],me=this.table,n="",Re=0,Fe=0,Pe=0,He=2,Ue=1,Ke=t.slice.call(arguments,1),I=Object.create(this.lexer),j={yy:{}};for(var Ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ie)&&(j.yy[Ie]=this.yy[Ie]);I.setInput(i,j.yy),j.yy.lexer=I,j.yy.parser=this,I.yylloc===void 0&&(I.yylloc={});var Se=I.yylloc;t.push(Se);var We=I.options&&I.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(q){a.length-=2*q,f.length-=q,t.length-=q}u(je,"popStack");function Ve(){var q=s.pop()||I.lex()||Ue;return typeof q!="number"&&(q instanceof Array&&(s=q,q=s.pop()),q=m.symbols_[q]||q),q}u(Ve,"lex");for(var b,be,z,N,Te,X={},fe,F,Ye,_e;;){if(z=a[a.length-1],this.defaultActions[z]?N=this.defaultActions[z]:(b??(b=Ve()),N=me[z]&&me[z][b]),N===void 0||!N.length||!N[0]){var Be="";for(fe in _e=[],me[z])this.terminals_[fe]&&fe>He&&_e.push("'"+this.terminals_[fe]+"'");Be=I.showPosition?"Parse error on line "+(Re+1)+`:
`+I.showPosition()+`
Expecting `+_e.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(Re+1)+": Unexpected "+(b==Ue?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(Be,{text:I.match,token:this.terminals_[b]||b,line:I.yylineno,loc:Se,expected:_e})}if(N[0]instanceof Array&&N.length>1)throw Error("Parse Error: multiple actions possible at state: "+z+", token: "+b);switch(N[0]){case 1:a.push(b),f.push(I.yytext),t.push(I.yylloc),a.push(N[1]),b=null,be?(b=be,be=null):(Fe=I.yyleng,n=I.yytext,Re=I.yylineno,Se=I.yylloc,Pe>0&&Pe--);break;case 2:if(F=this.productions_[N[1]][1],X.$=f[f.length-F],X._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},We&&(X._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(X,[n,Fe,Re,j.yy,N[1],f,t].concat(Ke)),Te!==void 0)return Te;F&&(a=a.slice(0,-1*F*2),f=f.slice(0,-1*F),t=t.slice(0,-1*F)),a.push(this.productions_[N[1]][0]),f.push(X.$),t.push(X._$),Ye=me[a[a.length-2]][a[a.length-1]],a.push(Ye);break;case 3:return!0}}return!0},"parse")};ge.lexer=(function(){return{EOF:1,parseError:u(function(i,m){if(this.yy.parser)this.yy.parser.parseError(i,m);else throw Error(i)},"parseError"),setInput:u(function(i,m){return this.yy=m||this.yy||{},this._input=i,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 i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:u(function(i){var m=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var s=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),a.length-1&&(this.yylineno-=a.length-1);var f=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:a?(a.length===s.length?this.yylloc.first_column:0)+s[s.length-a.length].length-a[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-m]),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(i){this.unput(this.match.slice(i))},"less"),pastInput:u(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var i=this.pastInput(),m=Array(i.length+1).join("-");return i+this.upcomingInput()+`
`+m+"^"},"showPosition"),test_match:u(function(i,m){var a,s,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),s=i[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],a=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var t in f)this[t]=f[t];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,m,a,s;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),t=0;t<f.length;t++)if(a=this._input.match(this.rules[f[t]]),a&&(!m||a[0].length>m[0].length)){if(m=a,s=t,this.options.backtrack_lexer){if(i=this.test_match(a,f[t]),i!==!1)return i;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(i=this.test_match(m,f[s]),i===!1?!1:i):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(){return this.next()||this.lex()},"lex"),begin:u(function(i){this.conditionStack.push(i)},"begin"),popState:u(function(){return this.conditionStack.length-1>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(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:u(function(i){this.begin(i)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(i,m,a,s){switch(a){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;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:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return m.yytext=m.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?: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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,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,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}})();function de(){this.yy={}}return u(de,"Parser"),de.prototype=ge,ge.Parser=de,new de})();qe.parser=qe;var ct=qe,ot=(J=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Xe,this.getAccTitle=st,this.setAccDescription=it,this.getAccDescription=et,this.setDiagramTitle=Ze,this.getDiagramTitle=Je,this.getConfig=u(()=>Ne().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(r){this.direction=r}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(r,h){return this.requirements.has(r)||this.requirements.set(r,{name:r,type:h,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(r)}getRequirements(){return this.requirements}setNewReqId(r){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=r)}setNewReqText(r){this.latestRequirement!==void 0&&(this.latestRequirement.text=r)}setNewReqRisk(r){this.latestRequirement!==void 0&&(this.latestRequirement.risk=r)}setNewReqVerifyMethod(r){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=r)}addElement(r){return this.elements.has(r)||(this.elements.set(r,{name:r,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),ke.info("Added new element: ",r)),this.resetLatestElement(),this.elements.get(r)}getElements(){return this.elements}setNewElementType(r){this.latestElement!==void 0&&(this.latestElement.type=r)}setNewElementDocRef(r){this.latestElement!==void 0&&(this.latestElement.docRef=r)}addRelationship(r,h,c){this.relations.push({type:r,src:h,dst:c})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,tt()}setCssStyle(r,h){for(let c of r){let y=this.requirements.get(c)??this.elements.get(c);if(!h||!y)return;for(let l of h)l.includes(",")?y.cssStyles.push(...l.split(",")):y.cssStyles.push(l)}}setClass(r,h){var c;for(let y of r){let l=this.requirements.get(y)??this.elements.get(y);if(l)for(let E of h){l.classes.push(E);let d=(c=this.classes.get(E))==null?void 0:c.styles;d&&l.cssStyles.push(...d)}}}defineClass(r,h){for(let c of r){let y=this.classes.get(c);y===void 0&&(y={id:c,styles:[],textStyles:[]},this.classes.set(c,y)),h&&h.forEach(function(l){if(/color/.exec(l)){let E=l.replace("fill","bgFill");y.textStyles.push(E)}y.styles.push(l)}),this.requirements.forEach(l=>{l.classes.includes(c)&&l.cssStyles.push(...h.flatMap(E=>E.split(",")))}),this.elements.forEach(l=>{l.classes.includes(c)&&l.cssStyles.push(...h.flatMap(E=>E.split(",")))})}}getClasses(){return this.classes}getData(){var y,l,E,d;let r=Ne(),h=[],c=[];for(let o of this.requirements.values()){let p=o;p.id=o.name,p.cssStyles=o.cssStyles,p.cssClasses=o.classes.join(" "),p.shape="requirementBox",p.look=r.look,h.push(p)}for(let o of this.elements.values()){let p=o;p.shape="requirementBox",p.look=r.look,p.id=o.name,p.cssStyles=o.cssStyles,p.cssClasses=o.classes.join(" "),h.push(p)}for(let o of this.relations){let p=0,S=o.type===this.Relationships.CONTAINS,T={id:`${o.src}-${o.dst}-${p}`,start:((y=this.requirements.get(o.src))==null?void 0:y.name)??((l=this.elements.get(o.src))==null?void 0:l.name),end:((E=this.requirements.get(o.dst))==null?void 0:E.name)??((d=this.elements.get(o.dst))==null?void 0:d.name),label:`&lt;&lt;${o.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",S?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:S?"normal":"dashed",arrowTypeStart:S?"requirement_contains":"",arrowTypeEnd:S?"":"requirement_arrow",look:r.look};c.push(T),p++}return{nodes:h,edges:c,other:{},config:r,direction:this.getDirection()}}},u(J,"RequirementDB"),J),ht=u(e=>`
marker {
fill: ${e.relationColor};
stroke: ${e.relationColor};
}
marker.cross {
stroke: ${e.lineColor};
}
svg {
font-family: ${e.fontFamily};
font-size: ${e.fontSize};
}
.reqBox {
fill: ${e.requirementBackground};
fill-opacity: 1.0;
stroke: ${e.requirementBorderColor};
stroke-width: ${e.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${e.requirementTextColor};
}
.reqLabelBox {
fill: ${e.relationLabelBackground};
fill-opacity: 1.0;
}
.req-title-line {
stroke: ${e.requirementBorderColor};
stroke-width: ${e.requirementBorderSize};
}
.relationshipLine {
stroke: ${e.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${e.relationLabelColor};
}
.divider {
stroke: ${e.nodeBorder};
stroke-width: 1;
}
.label {
font-family: ${e.fontFamily};
color: ${e.nodeTextColor||e.textColor};
}
.label text,span {
fill: ${e.nodeTextColor||e.textColor};
color: ${e.nodeTextColor||e.textColor};
}
.labelBkg {
background-color: ${e.edgeLabelBackground};
}
`,"getStyles"),Qe={};Ge(Qe,{draw:()=>ut});var ut=u(async function(e,r,h,c){ke.info("REF0:"),ke.info("Drawing requirement diagram (unified)",r);let{securityLevel:y,state:l,layout:E}=Ne(),d=c.db.getData(),o=at(r,y);d.type=c.type,d.layoutAlgorithm=rt(E),d.nodeSpacing=(l==null?void 0:l.nodeSpacing)??50,d.rankSpacing=(l==null?void 0:l.rankSpacing)??50,d.markers=["requirement_contains","requirement_arrow"],d.diagramId=r,await nt(d,o),ze.insertTitle(o,"requirementDiagramTitleText",(l==null?void 0:l.titleTopMargin)??25,c.db.getDiagramTitle()),lt(o,8,"requirementDiagram",(l==null?void 0:l.useMaxWidth)??!0)},"draw"),yt={parser:ct,get db(){return new ot},renderer:Qe,styles:ht};export{yt as diagram};
import{t}from"./createLucideIcon-BCdY6lG5.js";var a=t("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);export{a as t};
import{n as p,t as r}from"./rpm-DuGPfDyX.js";export{r as rpmChanges,p as rpmSpec};
var a=/^-+$/,n=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,e=/^[\w+.-]+@[\w.-]+/;const c={name:"rpmchanges",token:function(r){return r.sol()&&(r.match(a)||r.match(n))?"tag":r.match(e)?"string":(r.next(),null)}};var o=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,i=/^[a-zA-Z0-9()]+:/,p=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,l=/^%(ifnarch|ifarch|if)/,s=/^%(else|endif)/,m=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;const u={name:"rpmspec",startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(r,t){if(r.peek()=="#")return r.skipToEnd(),"comment";if(r.sol()){if(r.match(i))return"header";if(r.match(p))return"atom"}if(r.match(/^\$\w+/)||r.match(/^\$\{\w+\}/))return"def";if(r.match(s))return"keyword";if(r.match(l))return t.controlFlow=!0,"keyword";if(t.controlFlow){if(r.match(m))return"operator";if(r.match(/^(\d+)/))return"number";r.eol()&&(t.controlFlow=!1)}if(r.match(o))return r.eol()&&(t.controlFlow=!1),"number";if(r.match(/^%[\w]+/))return r.match("(")&&(t.macroParameters=!0),"keyword";if(t.macroParameters){if(r.match(/^\d+/))return"number";if(r.match(")"))return t.macroParameters=!1,"keyword"}return r.match(/^%\{\??[\w \-\:\!]+\}/)?(r.eol()&&(t.controlFlow=!1),"def"):(r.next(),null)}};export{u as n,c as t};
import{t as r}from"./ruby-CA1TzLxZ.js";export{r as ruby};
function d(e){for(var n={},t=0,i=e.length;t<i;++t)n[e[t]]=!0;return n}var k="alias.and.BEGIN.begin.break.case.class.def.defined?.do.else.elsif.END.end.ensure.false.for.if.in.module.next.not.or.redo.rescue.retry.return.self.super.then.true.undef.unless.until.when.while.yield.nil.raise.throw.catch.fail.loop.callcc.caller.lambda.proc.public.protected.private.require.load.require_relative.extend.autoload.__END__.__FILE__.__LINE__.__dir__".split("."),h=d(k),x=d(["def","class","case","for","while","until","module","catch","loop","proc","begin"]),v=d(["end","until"]),m={"[":"]","{":"}","(":")"},z={"]":"[","}":"{",")":"("},o;function s(e,n,t){return t.tokenize.push(e),e(n,t)}function c(e,n){if(e.sol()&&e.match("=begin")&&e.eol())return n.tokenize.push(y),"comment";if(e.eatSpace())return null;var t=e.next(),i;if(t=="`"||t=="'"||t=='"')return s(f(t,"string",t=='"'||t=="`"),e,n);if(t=="/")return b(e)?s(f(t,"string.special",!0),e,n):"operator";if(t=="%"){var a="string",r=!0;e.eat("s")?a="atom":e.eat(/[WQ]/)?a="string":e.eat(/[r]/)?a="string.special":e.eat(/[wxq]/)&&(a="string",r=!1);var u=e.eat(/[^\w\s=]/);return u?(m.propertyIsEnumerable(u)&&(u=m[u]),s(f(u,a,r,!0),e,n)):"operator"}else{if(t=="#")return e.skipToEnd(),"comment";if(t=="<"&&(i=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return s(g(i[2],i[1]),e,n);if(t=="0")return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(t))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if(t=="?"){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}else{if(t==":")return e.eat("'")?s(f("'","atom",!1),e,n):e.eat('"')?s(f('"',"atom",!0),e,n):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if(t=="@"&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"propertyName";if(t=="$")return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variableName.special";if(/[a-zA-Z_\xa1-\uffff]/.test(t))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"variable";if(t=="|"&&(n.varList||n.lastTok=="{"||n.lastTok=="do"))return o="|",null;if(/[\(\)\[\]{}\\;]/.test(t))return o=t,null;if(t=="-"&&e.eat(">"))return"operator";if(/[=+\-\/*:\.^%<>~|]/.test(t)){var l=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return t=="."&&!l&&(o="."),"operator"}else return null}}}function b(e){for(var n=e.pos,t=0,i,a=!1,r=!1;(i=e.next())!=null;)if(r)r=!1;else{if("[{(".indexOf(i)>-1)t++;else if("]})".indexOf(i)>-1){if(t--,t<0)break}else if(i=="/"&&t==0){a=!0;break}r=i=="\\"}return e.backUp(e.pos-n),a}function p(e){return e||(e=1),function(n,t){if(n.peek()=="}"){if(e==1)return t.tokenize.pop(),t.tokenize[t.tokenize.length-1](n,t);t.tokenize[t.tokenize.length-1]=p(e-1)}else n.peek()=="{"&&(t.tokenize[t.tokenize.length-1]=p(e+1));return c(n,t)}}function _(){var e=!1;return function(n,t){return e?(t.tokenize.pop(),t.tokenize[t.tokenize.length-1](n,t)):(e=!0,c(n,t))}}function f(e,n,t,i){return function(a,r){var u=!1,l;for(r.context.type==="read-quoted-paused"&&(r.context=r.context.prev,a.eat("}"));(l=a.next())!=null;){if(l==e&&(i||!u)){r.tokenize.pop();break}if(t&&l=="#"&&!u){if(a.eat("{")){e=="}"&&(r.context={prev:r.context,type:"read-quoted-paused"}),r.tokenize.push(p());break}else if(/[@\$]/.test(a.peek())){r.tokenize.push(_());break}}u=!u&&l=="\\"}return n}}function g(e,n){return function(t,i){return n&&t.eatSpace(),t.match(e)?i.tokenize.pop():t.skipToEnd(),"string"}}function y(e,n){return e.sol()&&e.match("=end")&&e.eol()&&n.tokenize.pop(),e.skipToEnd(),"comment"}const w={name:"ruby",startState:function(e){return{tokenize:[c],indented:0,context:{type:"top",indented:-e},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,n){o=null,e.sol()&&(n.indented=e.indentation());var t=n.tokenize[n.tokenize.length-1](e,n),i,a=o;if(t=="variable"){var r=e.current();t=n.lastTok=="."?"property":h.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(r)?"tag":n.lastTok=="def"||n.lastTok=="class"||n.varList?"def":"variable",t=="keyword"&&(a=r,x.propertyIsEnumerable(r)?i="indent":v.propertyIsEnumerable(r)?i="dedent":((r=="if"||r=="unless")&&e.column()==e.indentation()||r=="do"&&n.context.indented<n.indented)&&(i="indent"))}return(o||t&&t!="comment")&&(n.lastTok=a),o=="|"&&(n.varList=!n.varList),i=="indent"||/[\(\[\{]/.test(o)?n.context={prev:n.context,type:o||t,indented:n.indented}:(i=="dedent"||/[\)\]\}]/.test(o))&&n.context.prev&&(n.context=n.context.prev),e.eol()&&(n.continuedLine=o=="\\"||t=="operator"),t},indent:function(e,n,t){if(e.tokenize[e.tokenize.length-1]!=c)return null;var i=n&&n.charAt(0),a=e.context,r=a.type==z[i]||a.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(n);return a.indented+(r?0:t.unit)+(e.continuedLine?t.unit:0)},languageData:{indentOnInput:/^\s*(?:end|rescue|elsif|else|\})$/,commentTokens:{line:"#"},autocomplete:k}};export{w as t};
import{s as F}from"./chunk-LvLJmgfZ.js";import{u as J}from"./useEvent-BhXAndur.js";import{t as G}from"./react-Bj1aDYRI.js";import{Kr as H,b as ee,w as te}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as V}from"./compiler-runtime-B3qBwwSJ.js";import"./tooltip-DxKBXCGp.js";import{w as re}from"./utilities.esm-MA1QpjVT.js";import{n as Y}from"./constants-B6Cb__3x.js";import{S as se,d as oe}from"./config-Q0O7_stz.js";import{t as ae}from"./jsx-runtime-ZmTK25f3.js";import{n as ie,t as $}from"./button-CZ3Cs4qb.js";import{t as le}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import{E as me,Y as M}from"./JsonOutput-PE5ko4gi.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{r as ne}from"./requests-B4FYHTZl.js";import"./layout-_O8thjaV.js";import{t as ce}from"./arrow-left-VDC1u5rq.js";import{r as de}from"./download-os8QlW6l.js";import"./markdown-renderer-DJy8ww5d.js";import{t as pe}from"./copy-D-8y6iMN.js";import{t as he}from"./download-Dg7clfkc.js";import{i as fe,l as xe,n as be,r as Q,t as ye,u as je}from"./panels-IsIZwIow.js";import{t as ue}from"./spinner-DA8-7wQv.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import{t as ge}from"./use-toast-BDYuj3zG.js";import{t as ke}from"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import"./dates-CrvjILe3.js";import{a as _e,c as Ne,l as we,n as ve,r as Se,t as Ce}from"./dialog-eb-NieZw.js";import"./popover-CH1FzjxU.js";import{t as ze}from"./share-ipf2hrOh.js";import"./vega-loader.browser-DXARUlxo.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{t as Ee}from"./copy-DHrHayPa.js";import"./purify.es-DZrAQFIu.js";import{a as Ie}from"./cell-link-B9b7J8QK.js";import"./chunk-5FQGJX7Z-DPlx2kjA.js";import"./katex-CDLTCvjQ.js";import"./html-to-image-CIQqSu-S.js";import"./esm-Bmu2DhPy.js";import{n as Pe,t as Ae}from"./react-resizable-panels.browser.esm-Da3ksQXL.js";import"./name-cell-input-Bc7geMVf.js";import{t as Re}from"./icon-32x32-DH9kM4Sh.js";import"./ws-DcVtI9Wj.js";import"./dist-tLOz534J.js";import"./dist-C5H5qIvq.js";import"./dist-B62Xo7-b.js";import"./dist-BpuNldXk.js";import"./dist-8kKeYgOg.js";import"./dist-BZWmfQbq.js";import"./dist-DLgWirXg.js";import"./dist-CF4gkF4y.js";import"./dist-CNW1zLeq.js";import"./esm-D82gQH1f.js";var Te=V(),Be=F(G(),1),t=F(ae(),1);const We=o=>{let e=(0,Te.c)(25),{appConfig:s}=o,{setCells:r}=te(),{sendComponentValues:y}=ne(),c;e[0]===y?c=e[1]:(c=()=>(Q.INSTANCE.start(y),Le),e[0]=y,e[1]=c);let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[2]=a):a=e[2],(0,Be.useEffect)(c,a);let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=ke(),e[3]=i):i=e[3];let j;e[4]===r?j=e[5]:(j={autoInstantiate:!0,setCells:r,sessionId:i},e[4]=r,e[5]=j);let{connection:l}=be(j),N=J(ee),u;e[6]===l.state?u=e[7]:(u=oe(l.state),e[6]=l.state,e[7]=u);let x=u,d;e[8]!==s||e[9]!==x?(d=()=>x?(0,t.jsxs)(me,{milliseconds:2e3,fallback:null,children:[(0,t.jsx)(ue,{className:"mx-auto"}),(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground mt-2",children:"Connecting..."})]}):(0,t.jsx)(fe,{appConfig:s,mode:"read"}),e[8]=s,e[9]=x,e[10]=d):d=e[10];let b=d,m;e:{if(typeof window>"u"){m=null;break e}let f,n;if(e[11]===Symbol.for("react.memo_cache_sentinel")){if(n=new URL(window.location.href),!n.searchParams.has("file")){m=null;break e}n.searchParams.delete("file"),f=n.searchParams.toString(),e[11]=f,e[12]=n,e[13]=m}else f=e[11],n=e[12],m=e[13];let w=f;m=w?`${n.pathname}?${w}`:n.pathname}let g=m,v=s.width,k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=g&&(0,t.jsx)("div",{className:"flex items-center px-6 pt-4 sm:-mt-8",children:(0,t.jsxs)("a",{href:g,"aria-label":"Back to gallery",className:le(ie({variant:"text",size:"sm"}),"gap-2 px-0 text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(ce,{className:"size-4","aria-hidden":!0}),(0,t.jsx)("span",{children:"Back"})]})}),e[14]=k):k=e[14];let p;e[15]===l?p=e[16]:(p=(0,t.jsx)(je,{connection:l,className:"sm:pt-8",children:k}),e[15]=l,e[16]=p);let h;e[17]===b?h=e[18]:(h=b(),e[17]=b,e[18]=h);let _;return e[19]!==s.width||e[20]!==l||e[21]!==N||e[22]!==p||e[23]!==h?(_=(0,t.jsxs)(xe,{connection:l,isRunning:N,width:v,children:[p,h]}),e[19]=s.width,e[20]=l,e[21]=N,e[22]=p,e[23]=h,e[24]=_):_=e[24],_};function Le(){Q.INSTANCE.stop()}var X=V();const Oe=()=>{let o=(0,X.c)(3),e=J(H);if(!M()||!e)return null;let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsxs)("span",{children:["Static"," ",(0,t.jsx)("a",{href:Y.githubPage,target:"_blank",className:"text-(--sky-11) font-medium underline",children:"marimo"})," ","notebook - Run or edit for full interactivity"]}),o[0]=s):s=o[0];let r;return o[1]===e?r=o[2]:(r=(0,t.jsxs)("div",{className:"px-4 py-2 bg-(--sky-2) border-b border-(--sky-7) text-(--sky-11) flex justify-between items-center gap-4 print:hidden text-sm","data-testid":"static-notebook-banner",children:[s,(0,t.jsx)("span",{className:"shrink-0",children:(0,t.jsx)(Ue,{code:e})})]}),o[1]=e,o[2]=r),r};var Ue=o=>{let e=(0,X.c)(78),{code:s}=o,r=Ie()||"notebook.py",y=r.lastIndexOf("/");y!==-1&&(r=r.slice(y+1));let c=window.location.href,a,i,j,l,N,u,x,d,b,m,g,v,k,p,h,_,f,n,w;if(e[0]!==s||e[1]!==r){let q=ze({code:s});l=Ce,e[21]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(we,{asChild:!0,children:(0,t.jsx)($,{"data-testid":"static-notebook-dialog-trigger",variant:"outline",size:"xs",children:"Run or Edit"})}),e[21]=g):g=e[21],j=ve,i=_e,e[22]===r?m=e[23]:(m=(0,t.jsx)(Ne,{children:r}),e[22]=r,e[23]=m),a=Se,u="pt-3 text-left space-y-3",e[24]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsxs)("p",{children:["This is a static"," ",(0,t.jsx)("a",{href:Y.githubPage,target:"_blank",className:"text-(--sky-11) hover:underline font-medium",children:"marimo"})," ","notebook. To run interactively:"]}),e[24]=x):x=e[24];let K;e[25]===Symbol.for("react.memo_cache_sentinel")?(K=(0,t.jsx)("br",{}),e[25]=K):K=e[25],e[26]===r?d=e[27]:(d=(0,t.jsx)("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:(0,t.jsxs)("div",{className:"font-mono text-(--sky-11) leading-relaxed",children:["pip install marimo",K,"marimo edit ",r]})}),e[26]=r,e[27]=d),e[28]===Symbol.for("react.memo_cache_sentinel")?(b=!c.endsWith(".html")&&(0,t.jsxs)("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:[(0,t.jsx)("div",{className:"text-sm text-(--sky-12) mb-1",children:"Or run directly from URL:"}),(0,t.jsxs)("div",{className:"font-mono text-(--sky-11) break-all",children:["marimo edit ",window.location.href]})]}),e[28]=b):b=e[28],w="pt-3 border-t border-(--sky-7)",_="text-sm text-(--sky-12) mb-2",e[29]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)("strong",{children:"Try in browser with WebAssembly:"}),e[29]=f):f=e[29],n=" ",N=q,v="_blank",k="text-(--sky-11) hover:underline break-all",p="noreferrer",h=q.slice(0,50),e[0]=s,e[1]=r,e[2]=a,e[3]=i,e[4]=j,e[5]=l,e[6]=N,e[7]=u,e[8]=x,e[9]=d,e[10]=b,e[11]=m,e[12]=g,e[13]=v,e[14]=k,e[15]=p,e[16]=h,e[17]=_,e[18]=f,e[19]=n,e[20]=w}else a=e[2],i=e[3],j=e[4],l=e[5],N=e[6],u=e[7],x=e[8],d=e[9],b=e[10],m=e[11],g=e[12],v=e[13],k=e[14],p=e[15],h=e[16],_=e[17],f=e[18],n=e[19],w=e[20];let S;e[30]!==N||e[31]!==v||e[32]!==k||e[33]!==p||e[34]!==h?(S=(0,t.jsxs)("a",{href:N,target:v,className:k,rel:p,children:[h,"..."]}),e[30]=N,e[31]=v,e[32]=k,e[33]=p,e[34]=h,e[35]=S):S=e[35];let C;e[36]!==S||e[37]!==_||e[38]!==f||e[39]!==n?(C=(0,t.jsxs)("p",{className:_,children:[f,n,S]}),e[36]=S,e[37]=_,e[38]=f,e[39]=n,e[40]=C):C=e[40];let L;e[41]===Symbol.for("react.memo_cache_sentinel")?(L=(0,t.jsx)("p",{className:"text-sm text-(--sky-12)",children:"Note: WebAssembly may not work for all notebooks. Additionally, some dependencies may not be available in the browser."}),e[41]=L):L=e[41];let z;e[42]!==C||e[43]!==w?(z=(0,t.jsxs)("div",{className:w,children:[C,L]}),e[42]=C,e[43]=w,e[44]=z):z=e[44];let E;e[45]!==a||e[46]!==u||e[47]!==x||e[48]!==d||e[49]!==b||e[50]!==z?(E=(0,t.jsxs)(a,{className:u,children:[x,d,b,z]}),e[45]=a,e[46]=u,e[47]=x,e[48]=d,e[49]=b,e[50]=z,e[51]=E):E=e[51];let I;e[52]!==i||e[53]!==m||e[54]!==E?(I=(0,t.jsxs)(i,{children:[m,E]}),e[52]=i,e[53]=m,e[54]=E,e[55]=I):I=e[55];let P;e[56]===s?P=e[57]:(P=async()=>{await Ee(s),ge({title:"Copied to clipboard"})},e[56]=s,e[57]=P);let O;e[58]===Symbol.for("react.memo_cache_sentinel")?(O=(0,t.jsx)(pe,{className:"w-3 h-3 mr-2"}),e[58]=O):O=e[58];let A;e[59]===P?A=e[60]:(A=(0,t.jsxs)($,{"data-testid":"copy-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:P,children:[O,"Copy code"]}),e[59]=P,e[60]=A);let R;e[61]!==s||e[62]!==r?(R=()=>{de(new Blob([s],{type:"text/plain"}),r)},e[61]=s,e[62]=r,e[63]=R):R=e[63];let U;e[64]===Symbol.for("react.memo_cache_sentinel")?(U=(0,t.jsx)(he,{className:"w-3 h-3 mr-2"}),e[64]=U):U=e[64];let T;e[65]===R?T=e[66]:(T=(0,t.jsxs)($,{"data-testid":"download-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:R,children:[U,"Download"]}),e[65]=R,e[66]=T);let B;e[67]!==A||e[68]!==T?(B=(0,t.jsxs)("div",{className:"flex gap-3 pt-2",children:[A,T]}),e[67]=A,e[68]=T,e[69]=B):B=e[69];let W;e[70]!==j||e[71]!==I||e[72]!==B?(W=(0,t.jsxs)(j,{children:[I,B]}),e[70]=j,e[71]=I,e[72]=B,e[73]=W):W=e[73];let D;return e[74]!==l||e[75]!==g||e[76]!==W?(D=(0,t.jsxs)(l,{children:[g,W]}),e[74]=l,e[75]=g,e[76]=W,e[77]=D):D=e[77],D},Z=V(),De=se()||M(),Ke=o=>{let e=(0,Z.c)(9),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(Oe,{}),e[0]=s):s=e[0];let r;e[1]===o.appConfig?r=e[2]:(r=(0,t.jsx)(We,{appConfig:o.appConfig}),e[1]=o.appConfig,e[2]=r);let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=De&&(0,t.jsx)(Ve,{}),e[3]=y):y=e[3];let c;e[4]===r?c=e[5]:(c=(0,t.jsxs)(Ae,{children:[s,r,y]}),e[4]=r,e[5]=c);let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(re,{}),e[6]=a):a=e[6];let i;return e[7]===c?i=e[8]:(i=(0,t.jsx)(ye,{children:(0,t.jsxs)(Pe,{direction:"horizontal",autoSaveId:"marimo:chrome:v1:run1",children:[c,a]})}),e[7]=c,e[8]=i),i},Ve=()=>{let o=(0,Z.c)(1),e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"fixed bottom-0 right-0 z-50","data-testid":"watermark",children:(0,t.jsxs)("a",{href:Y.githubPage,target:"_blank",className:"text-sm text-(--grass-11) font-bold tracking-wide transition-colors bg-(--grass-4) hover:bg-(--grass-5) border-t border-l border-(--grass-8) px-3 py-1 rounded-tl-md flex items-center gap-2",children:[(0,t.jsx)("span",{children:"made with marimo"}),(0,t.jsx)("img",{src:Re,alt:"marimo",className:"h-4 w-auto"})]})}),o[0]=e):e=o[0],e},Ye=Ke;export{Ye as default};
import{t as I}from"./createReducer-B3rBsy4P.js";function T(){return{runIds:[],runMap:new Map}}var{reducer:v,createActions:q,valueAtom:w,useActions:_}=I(T,{addCellNotification:(e,i)=>{let{cellNotification:t,code:u}=i,r=t.timestamp??0,s=t.run_id;if(!s)return e;let d=e.runMap.get(s);if(!d&&R(u))return e;let o=t.output&&(t.output.channel==="marimo-error"||t.output.channel==="stderr"),n=o?"error":t.status==="queued"?"queued":t.status==="running"?"running":"success";if(!d){let p={runId:s,cellRuns:new Map([[t.cell_id,{cellId:t.cell_id,code:u.slice(0,200),elapsedTime:0,status:n,startTime:r}]]),runStartTime:r},l=[s,...e.runIds],m=new Map(e.runMap);if(l.length>50){let f=l.pop();f&&m.delete(f)}return m.set(s,p),{runIds:l,runMap:m}}let c=new Map(d.cellRuns),a=c.get(t.cell_id);if(a&&!o&&t.status==="queued")return e;if(a){n=a.status==="error"||o?"error":n;let p=t.status==="running"?r:a.startTime,l=n==="success"||n==="error"?r-a.startTime:void 0;c.set(t.cell_id,{...a,startTime:p,elapsedTime:l,status:n})}else c.set(t.cell_id,{cellId:t.cell_id,code:u.slice(0,200),elapsedTime:0,status:n,startTime:r});let M=new Map(e.runMap);return M.set(s,{...d,cellRuns:c}),{...e,runMap:M}},clearRuns:e=>({...e,runIds:[],runMap:new Map}),removeRun:(e,i)=>{let t=e.runIds.filter(r=>r!==i),u=new Map(e.runMap);return u.delete(i),{...e,runIds:t,runMap:u}}}),g=/mo\.md\(\s*r?('''|""")/;function R(e){return e.startsWith("mo.md(")&&g.test(e)}export{_ as n,w as t};
var W,G,j;import{n as xt}from"./ordinal-DG_POl79.js";import"./purify.es-DZrAQFIu.js";import{u as tt}from"./src-CvyFXpBy.js";import{t as kt}from"./colors-DUsH-HF1.js";import{n as x}from"./src-CsZby044.js";import{B as vt,C as bt,G as Lt,U as Et,_ as wt,a as At,b as et,s as St,u as Mt,v as It,z as Pt}from"./chunk-ABZYJK2D-0jga8uiE.js";var Nt=kt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ht(t,i){let r;if(i===void 0)for(let a of t)a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let u of t)(u=i(u,++a,t))!=null&&(r<u||r===void 0&&u>=u)&&(r=u)}return r}function ut(t,i){let r;if(i===void 0)for(let a of t)a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let u of t)(u=i(u,++a,t))!=null&&(r>u||r===void 0&&u>=u)&&(r=u)}return r}function nt(t,i){let r=0;if(i===void 0)for(let a of t)(a=+a)&&(r+=a);else{let a=-1;for(let u of t)(u=+i(u,++a,t))&&(r+=u)}return r}function Ct(t){return t.target.depth}function $t(t){return t.depth}function Ot(t,i){return i-1-t.height}function ct(t,i){return t.sourceLinks.length?t.depth:i-1}function Tt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ut(t.sourceLinks,Ct)-1:0}function Q(t){return function(){return t}}function ft(t,i){return Y(t.source,i.source)||t.index-i.index}function yt(t,i){return Y(t.target,i.target)||t.index-i.index}function Y(t,i){return t.y0-i.y0}function it(t){return t.value}function Dt(t){return t.index}function zt(t){return t.nodes}function jt(t){return t.links}function gt(t,i){let r=t.get(i);if(!r)throw Error("missing: "+i);return r}function dt({nodes:t}){for(let i of t){let r=i.y0,a=r;for(let u of i.sourceLinks)u.y0=r+u.width/2,r+=u.width;for(let u of i.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Ft(){let t=0,i=0,r=1,a=1,u=24,d=8,e,c=Dt,l=ct,y,p,g=zt,S=jt,L=6;function k(){let n={nodes:g.apply(null,arguments),links:S.apply(null,arguments)};return O(n),I(n),C(n),T(n),N(n),dt(n),n}k.update=function(n){return dt(n),n},k.nodeId=function(n){return arguments.length?(c=typeof n=="function"?n:Q(n),k):c},k.nodeAlign=function(n){return arguments.length?(l=typeof n=="function"?n:Q(n),k):l},k.nodeSort=function(n){return arguments.length?(y=n,k):y},k.nodeWidth=function(n){return arguments.length?(u=+n,k):u},k.nodePadding=function(n){return arguments.length?(d=e=+n,k):d},k.nodes=function(n){return arguments.length?(g=typeof n=="function"?n:Q(n),k):g},k.links=function(n){return arguments.length?(S=typeof n=="function"?n:Q(n),k):S},k.linkSort=function(n){return arguments.length?(p=n,k):p},k.size=function(n){return arguments.length?(t=i=0,r=+n[0],a=+n[1],k):[r-t,a-i]},k.extent=function(n){return arguments.length?(t=+n[0][0],r=+n[1][0],i=+n[0][1],a=+n[1][1],k):[[t,i],[r,a]]},k.iterations=function(n){return arguments.length?(L=+n,k):L};function O({nodes:n,links:f}){for(let[o,s]of n.entries())s.index=o,s.sourceLinks=[],s.targetLinks=[];let h=new Map(n.map((o,s)=>[c(o,s,n),o]));for(let[o,s]of f.entries()){s.index=o;let{source:_,target:b}=s;typeof _!="object"&&(_=s.source=gt(h,_)),typeof b!="object"&&(b=s.target=gt(h,b)),_.sourceLinks.push(s),b.targetLinks.push(s)}if(p!=null)for(let{sourceLinks:o,targetLinks:s}of n)o.sort(p),s.sort(p)}function I({nodes:n}){for(let f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function C({nodes:n}){let f=n.length,h=new Set(n),o=new Set,s=0;for(;h.size;){for(let _ of h){_.depth=s;for(let{target:b}of _.sourceLinks)o.add(b)}if(++s>f)throw Error("circular link");h=o,o=new Set}}function T({nodes:n}){let f=n.length,h=new Set(n),o=new Set,s=0;for(;h.size;){for(let _ of h){_.height=s;for(let{source:b}of _.targetLinks)o.add(b)}if(++s>f)throw Error("circular link");h=o,o=new Set}}function P({nodes:n}){let f=ht(n,s=>s.depth)+1,h=(r-t-u)/(f-1),o=Array(f);for(let s of n){let _=Math.max(0,Math.min(f-1,Math.floor(l.call(null,s,f))));s.layer=_,s.x0=t+_*h,s.x1=s.x0+u,o[_]?o[_].push(s):o[_]=[s]}if(y)for(let s of o)s.sort(y);return o}function v(n){let f=ut(n,h=>(a-i-(h.length-1)*e)/nt(h,it));for(let h of n){let o=i;for(let s of h){s.y0=o,s.y1=o+s.value*f,o=s.y1+e;for(let _ of s.sourceLinks)_.width=_.value*f}o=(a-o+e)/(h.length+1);for(let s=0;s<h.length;++s){let _=h[s];_.y0+=o*(s+1),_.y1+=o*(s+1)}B(h)}}function N(n){let f=P(n);e=Math.min(d,(a-i)/(ht(f,h=>h.length)-1)),v(f);for(let h=0;h<L;++h){let o=.99**h,s=Math.max(1-o,(h+1)/L);$(f,o,s),D(f,o,s)}}function D(n,f,h){for(let o=1,s=n.length;o<s;++o){let _=n[o];for(let b of _){let E=0,U=0;for(let{source:X,value:q}of b.targetLinks){let lt=q*(b.layer-X.layer);E+=z(X,b)*lt,U+=lt}if(!(U>0))continue;let R=(E/U-b.y0)*f;b.y0+=R,b.y1+=R,A(b)}y===void 0&&_.sort(Y),m(_,h)}}function $(n,f,h){for(let o=n.length-2;o>=0;--o){let s=n[o];for(let _ of s){let b=0,E=0;for(let{target:R,value:X}of _.sourceLinks){let q=X*(R.layer-_.layer);b+=M(_,R)*q,E+=q}if(!(E>0))continue;let U=(b/E-_.y0)*f;_.y0+=U,_.y1+=U,A(_)}y===void 0&&s.sort(Y),m(s,h)}}function m(n,f){let h=n.length>>1,o=n[h];V(n,o.y0-e,h-1,f),w(n,o.y1+e,h+1,f),V(n,a,n.length-1,f),w(n,i,0,f)}function w(n,f,h,o){for(;h<n.length;++h){let s=n[h],_=(f-s.y0)*o;_>1e-6&&(s.y0+=_,s.y1+=_),f=s.y1+e}}function V(n,f,h,o){for(;h>=0;--h){let s=n[h],_=(s.y1-f)*o;_>1e-6&&(s.y0-=_,s.y1-=_),f=s.y0-e}}function A({sourceLinks:n,targetLinks:f}){if(p===void 0){for(let{source:{sourceLinks:h}}of f)h.sort(yt);for(let{target:{targetLinks:h}}of n)h.sort(ft)}}function B(n){if(p===void 0)for(let{sourceLinks:f,targetLinks:h}of n)f.sort(yt),h.sort(ft)}function z(n,f){let h=n.y0-(n.sourceLinks.length-1)*e/2;for(let{target:o,width:s}of n.sourceLinks){if(o===f)break;h+=s+e}for(let{source:o,width:s}of f.targetLinks){if(o===n)break;h-=s}return h}function M(n,f){let h=f.y0-(f.targetLinks.length-1)*e/2;for(let{source:o,width:s}of f.targetLinks){if(o===n)break;h+=s+e}for(let{target:o,width:s}of n.sourceLinks){if(o===f)break;h-=s}return h}return k}var rt=Math.PI,st=2*rt,F=1e-6,Ut=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new ot}ot.prototype=pt.prototype={constructor:ot,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,r,a){this._+="Q"+ +t+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},bezierCurveTo:function(t,i,r,a,u,d){this._+="C"+ +t+","+ +i+","+ +r+","+ +a+","+(this._x1=+u)+","+(this._y1=+d)},arcTo:function(t,i,r,a,u){t=+t,i=+i,r=+r,a=+a,u=+u;var d=this._x1,e=this._y1,c=r-t,l=a-i,y=d-t,p=e-i,g=y*y+p*p;if(u<0)throw Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(g>F)if(!(Math.abs(p*c-l*y)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var S=r-d,L=a-e,k=c*c+l*l,O=S*S+L*L,I=Math.sqrt(k),C=Math.sqrt(g),T=u*Math.tan((rt-Math.acos((k+g-O)/(2*I*C)))/2),P=T/C,v=T/I;Math.abs(P-1)>F&&(this._+="L"+(t+P*y)+","+(i+P*p)),this._+="A"+u+","+u+",0,0,"+ +(p*S>y*L)+","+(this._x1=t+v*c)+","+(this._y1=i+v*l)}},arc:function(t,i,r,a,u,d){t=+t,i=+i,r=+r,d=!!d;var e=r*Math.cos(a),c=r*Math.sin(a),l=t+e,y=i+c,p=1^d,g=d?a-u:u-a;if(r<0)throw Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+y:(Math.abs(this._x1-l)>F||Math.abs(this._y1-y)>F)&&(this._+="L"+l+","+y),r&&(g<0&&(g=g%st+st),g>Ut?this._+="A"+r+","+r+",0,1,"+p+","+(t-e)+","+(i-c)+"A"+r+","+r+",0,1,"+p+","+(this._x1=l)+","+(this._y1=y):g>F&&(this._+="A"+r+","+r+",0,"+ +(g>=rt)+","+p+","+(this._x1=t+r*Math.cos(u))+","+(this._y1=i+r*Math.sin(u))))},rect:function(t,i,r,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +r+"v"+ +a+"h"+-r+"Z"},toString:function(){return this._}};var Wt=pt;function _t(t){return function(){return t}}function Gt(t){return t[0]}function Vt(t){return t[1]}var Bt=Array.prototype.slice;function Rt(t){return t.source}function Xt(t){return t.target}function qt(t){var i=Rt,r=Xt,a=Gt,u=Vt,d=null;function e(){var c,l=Bt.call(arguments),y=i.apply(this,l),p=r.apply(this,l);if(d||(d=c=Wt()),t(d,+a.apply(this,(l[0]=y,l)),+u.apply(this,l),+a.apply(this,(l[0]=p,l)),+u.apply(this,l)),c)return d=null,c+""||null}return e.source=function(c){return arguments.length?(i=c,e):i},e.target=function(c){return arguments.length?(r=c,e):r},e.x=function(c){return arguments.length?(a=typeof c=="function"?c:_t(+c),e):a},e.y=function(c){return arguments.length?(u=typeof c=="function"?c:_t(+c),e):u},e.context=function(c){return arguments.length?(d=c??null,e):d},e}function Qt(t,i,r,a,u){t.moveTo(i,r),t.bezierCurveTo(i=(i+a)/2,r,i,u,a,u)}function Yt(){return qt(Qt)}function Kt(t){return[t.source.x1,t.y0]}function Zt(t){return[t.target.x0,t.y1]}function Ht(){return Yt().source(Kt).target(Zt)}var at=(function(){var t=x(function(e,c,l,y){for(l||(l={}),y=e.length;y--;l[e[y]]=c);return l},"o"),i=[1,9],r=[1,10],a=[1,5,10,12],u={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:x(function(e,c,l,y,p,g,S){var L=g.length-1;switch(p){case 7:let k=y.findOrCreateNode(g[L-4].trim().replaceAll('""','"')),O=y.findOrCreateNode(g[L-2].trim().replaceAll('""','"')),I=parseFloat(g[L].trim());y.addLink(k,O,I);break;case 8:case 9:case 11:this.$=g[L];break;case 10:this.$=g[L-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:r},{15:18,16:7,17:8,18:i,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:i,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:x(function(e,c){if(c.recoverable)this.trace(e);else{var l=Error(e);throw l.hash=c,l}},"parseError"),parse:x(function(e){var c=this,l=[0],y=[],p=[null],g=[],S=this.table,L="",k=0,O=0,I=0,C=2,T=1,P=g.slice.call(arguments,1),v=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);v.setInput(e,N.yy),N.yy.lexer=v,N.yy.parser=this,v.yylloc===void 0&&(v.yylloc={});var $=v.yylloc;g.push($);var m=v.options&&v.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function w(E){l.length-=2*E,p.length-=E,g.length-=E}x(w,"popStack");function V(){var E=y.pop()||v.lex()||T;return typeof E!="number"&&(E instanceof Array&&(y=E,E=y.pop()),E=c.symbols_[E]||E),E}x(V,"lex");for(var A,B,z,M,n,f={},h,o,s,_;;){if(z=l[l.length-1],this.defaultActions[z]?M=this.defaultActions[z]:(A??(A=V()),M=S[z]&&S[z][A]),M===void 0||!M.length||!M[0]){var b="";for(h in _=[],S[z])this.terminals_[h]&&h>C&&_.push("'"+this.terminals_[h]+"'");b=v.showPosition?"Parse error on line "+(k+1)+`:
`+v.showPosition()+`
Expecting `+_.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(k+1)+": Unexpected "+(A==T?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(b,{text:v.match,token:this.terminals_[A]||A,line:v.yylineno,loc:$,expected:_})}if(M[0]instanceof Array&&M.length>1)throw Error("Parse Error: multiple actions possible at state: "+z+", token: "+A);switch(M[0]){case 1:l.push(A),p.push(v.yytext),g.push(v.yylloc),l.push(M[1]),A=null,B?(A=B,B=null):(O=v.yyleng,L=v.yytext,k=v.yylineno,$=v.yylloc,I>0&&I--);break;case 2:if(o=this.productions_[M[1]][1],f.$=p[p.length-o],f._$={first_line:g[g.length-(o||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(o||1)].first_column,last_column:g[g.length-1].last_column},m&&(f._$.range=[g[g.length-(o||1)].range[0],g[g.length-1].range[1]]),n=this.performAction.apply(f,[L,O,k,N.yy,M[1],p,g].concat(P)),n!==void 0)return n;o&&(l=l.slice(0,-1*o*2),p=p.slice(0,-1*o),g=g.slice(0,-1*o)),l.push(this.productions_[M[1]][0]),p.push(f.$),g.push(f._$),s=S[l[l.length-2]][l[l.length-1]],l.push(s);break;case 3:return!0}}return!0},"parse")};u.lexer=(function(){return{EOF:1,parseError:x(function(e,c){if(this.yy.parser)this.yy.parser.parseError(e,c);else throw Error(e)},"parseError"),setInput:x(function(e,c){return this.yy=c||this.yy||{},this._input=e,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:x(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:x(function(e){var c=e.length,l=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var y=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),l.length-1&&(this.yylineno-=l.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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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:x(function(e){this.unput(this.match.slice(e))},"less"),pastInput:x(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var e=this.pastInput(),c=Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+c+"^"},"showPosition"),test_match:x(function(e,c){var l,y,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))),y=e[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],l=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var g in p)this[g]=p[g];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,c,l,y;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),g=0;g<p.length;g++)if(l=this._input.match(this.rules[p[g]]),l&&(!c||l[0].length>c[0].length)){if(c=l,y=g,this.options.backtrack_lexer){if(e=this.test_match(l,p[g]),e!==!1)return e;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(e=this.test_match(c,p[y]),e===!1?!1:e):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:x(function(){return this.next()||this.lex()},"lex"),begin:x(function(e){this.conditionStack.push(e)},"begin"),popState:x(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:x(function(e){this.begin(e)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(e,c,l,y){switch(l){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}})();function d(){this.yy={}}return x(d,"Parser"),d.prototype=u,u.Parser=d,new d})();at.parser=at;var K=at,Z=[],H=[],J=new Map,Jt=x(()=>{Z=[],H=[],J=new Map,At()},"clear"),te=(W=class{constructor(i,r,a=0){this.source=i,this.target=r,this.value=a}},x(W,"SankeyLink"),W),ee=x((t,i,r)=>{Z.push(new te(t,i,r))},"addLink"),ne=(G=class{constructor(i){this.ID=i}},x(G,"SankeyNode"),G),ie={nodesMap:J,getConfig:x(()=>et().sankey,"getConfig"),getNodes:x(()=>H,"getNodes"),getLinks:x(()=>Z,"getLinks"),getGraph:x(()=>({nodes:H.map(t=>({id:t.ID})),links:Z.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),addLink:ee,findOrCreateNode:x(t=>{t=St.sanitizeText(t,et());let i=J.get(t);return i===void 0&&(i=new ne(t),J.set(t,i),H.push(i)),i},"findOrCreateNode"),getAccTitle:It,setAccTitle:vt,getAccDescription:wt,setAccDescription:Pt,getDiagramTitle:bt,setDiagramTitle:Et,clear:Jt},mt=(j=class{static next(i){return new j(i+ ++j.count)}constructor(i){this.id=i,this.href=`#${i}`}toString(){return"url("+this.href+")"}},x(j,"Uid"),j.count=0,j),re={left:$t,right:Ot,center:Tt,justify:ct},se={draw:x(function(t,i,r,a){let{securityLevel:u,sankey:d}=et(),e=Mt.sankey,c;u==="sandbox"&&(c=tt("#i"+i));let l=tt(u==="sandbox"?c.nodes()[0].contentDocument.body:"body"),y=u==="sandbox"?l.select(`[id="${i}"]`):tt(`[id="${i}"]`),p=(d==null?void 0:d.width)??e.width,g=(d==null?void 0:d.height)??e.width,S=(d==null?void 0:d.useMaxWidth)??e.useMaxWidth,L=(d==null?void 0:d.nodeAlignment)??e.nodeAlignment,k=(d==null?void 0:d.prefix)??e.prefix,O=(d==null?void 0:d.suffix)??e.suffix,I=(d==null?void 0:d.showValues)??e.showValues,C=a.db.getGraph(),T=re[L];Ft().nodeId(m=>m.id).nodeWidth(10).nodePadding(10+(I?15:0)).nodeAlign(T).extent([[0,0],[p,g]])(C);let P=xt(Nt);y.append("g").attr("class","nodes").selectAll(".node").data(C.nodes).join("g").attr("class","node").attr("id",m=>(m.uid=mt.next("node-")).id).attr("transform",function(m){return"translate("+m.x0+","+m.y0+")"}).attr("x",m=>m.x0).attr("y",m=>m.y0).append("rect").attr("height",m=>m.y1-m.y0).attr("width",m=>m.x1-m.x0).attr("fill",m=>P(m.id));let v=x(({id:m,value:w})=>I?`${m}
${k}${Math.round(w*100)/100}${O}`:m,"getText");y.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(C.nodes).join("text").attr("x",m=>m.x0<p/2?m.x1+6:m.x0-6).attr("y",m=>(m.y1+m.y0)/2).attr("dy",`${I?"0":"0.35"}em`).attr("text-anchor",m=>m.x0<p/2?"start":"end").text(v);let N=y.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(C.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),D=(d==null?void 0:d.linkColor)??"gradient";if(D==="gradient"){let m=N.append("linearGradient").attr("id",w=>(w.uid=mt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);m.append("stop").attr("offset","0%").attr("stop-color",w=>P(w.source.id)),m.append("stop").attr("offset","100%").attr("stop-color",w=>P(w.target.id))}let $;switch(D){case"gradient":$=x(m=>m.uid,"coloring");break;case"source":$=x(m=>P(m.source.id),"coloring");break;case"target":$=x(m=>P(m.target.id),"coloring");break;default:$=D}N.append("path").attr("d",Ht()).attr("stroke",$).attr("stroke-width",m=>Math.max(1,m.width)),Lt(void 0,y,0,S)},"draw")},oe=x(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
`).trim(),"prepareTextForParsing"),ae=x(t=>`.label {
font-family: ${t.fontFamily};
}`,"getStyles"),le=K.parse.bind(K);K.parse=t=>le(oe(t));var he={styles:ae,parser:K,db:ie,renderer:se};export{he as diagram};
var r={},l={eq:"operator",lt:"operator",le:"operator",gt:"operator",ge:"operator",in:"operator",ne:"operator",or:"operator"},c=/(<=|>=|!=|<>)/,m=/[=\(:\),{}.*<>+\-\/^\[\]]/;function o(e,n,s){if(s)for(var a=n.split(" "),t=0;t<a.length;t++)r[a[t]]={style:e,state:s}}o("def","stack pgm view source debug nesting nolist",["inDataStep"]),o("def","if while until for do do; end end; then else cancel",["inDataStep"]),o("def","label format _n_ _error_",["inDataStep"]),o("def","ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME",["inDataStep"]),o("def","filevar finfo finv fipname fipnamel fipstate first firstobs floor",["inDataStep"]),o("def","varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday",["inDataStep"]),o("def","zipfips zipname zipnamel zipstate",["inDataStep"]),o("def","put putc putn",["inDataStep"]),o("builtin","data run",["inDataStep"]),o("def","data",["inProc"]),o("def","%if %end %end; %else %else; %do %do; %then",["inMacro"]),o("builtin","proc run; quit; libname filename %macro %mend option options",["ALL"]),o("def","footnote title libname ods",["ALL"]),o("def","%let %put %global %sysfunc %eval ",["ALL"]),o("variable","&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext",["ALL"]),o("def","source2 nosource2 page pageno pagesize",["ALL"]),o("def","_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddfm ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref fmterr fmtsearch fnonct fnote font fontalias fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs on open order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2 paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps pw pwreq qtr quote r ranbin rancau random ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni rcorr read recfm register regr remote remove rename repeat repeated replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover sub subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq min max",["inDataStep","inProc"]),o("operator","and not ",["inDataStep","inProc"]);function p(e,n){var s=e.next();if(s==="/"&&e.eat("*"))return n.continueComment=!0,"comment";if(n.continueComment===!0)return s==="*"&&e.peek()==="/"?(e.next(),n.continueComment=!1):e.skipTo("*")?(e.skipTo("*"),e.next(),e.eat("/")&&(n.continueComment=!1)):e.skipToEnd(),"comment";if(s=="*"&&e.column()==e.indentation())return e.skipToEnd(),"comment";var a=s+e.peek();if((s==='"'||s==="'")&&!n.continueString)return n.continueString=s,"string";if(n.continueString)return n.continueString==s?n.continueString=null:e.skipTo(n.continueString)?(e.next(),n.continueString=null):e.skipToEnd(),"string";if(n.continueString!==null&&e.eol())return e.skipTo(n.continueString)||e.skipToEnd(),"string";if(/[\d\.]/.test(s))return s==="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):s==="0"?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(c.test(s+e.peek()))return e.next(),"operator";if(l.hasOwnProperty(a)){if(e.next(),e.peek()===" ")return l[a.toLowerCase()]}else if(m.test(s))return"operator";var t;if(e.match(/[%&;\w]+/,!1)!=null){if(t=s+e.match(/[%&;\w]+/,!0),/&/.test(t))return"variable"}else t=s;if(n.nextword)return e.match(/[\w]+/),e.peek()==="."&&e.skipTo(" "),n.nextword=!1,"variableName.special";if(t=t.toLowerCase(),n.inDataStep){if(t==="run;"||e.match(/run\s;/))return n.inDataStep=!1,"builtin";if(t&&e.next()===".")return/\w/.test(e.peek())?"variableName.special":"variable";if(t&&r.hasOwnProperty(t)&&(r[t].state.indexOf("inDataStep")!==-1||r[t].state.indexOf("ALL")!==-1)){e.start<e.pos&&e.backUp(e.pos-e.start);for(var i=0;i<t.length;++i)e.next();return r[t].style}}if(n.inProc){if(t==="run;"||t==="quit;")return n.inProc=!1,"builtin";if(t&&r.hasOwnProperty(t)&&(r[t].state.indexOf("inProc")!==-1||r[t].state.indexOf("ALL")!==-1))return e.match(/[\w]+/),r[t].style}return n.inMacro?t==="%mend"?(e.peek()===";"&&e.next(),n.inMacro=!1,"builtin"):t&&r.hasOwnProperty(t)&&(r[t].state.indexOf("inMacro")!==-1||r[t].state.indexOf("ALL")!==-1)?(e.match(/[\w]+/),r[t].style):"atom":t&&r.hasOwnProperty(t)?(e.backUp(1),e.match(/[\w]+/),t==="data"&&/=/.test(e.peek())===!1?(n.inDataStep=!0,n.nextword=!0,"builtin"):t==="proc"?(n.inProc=!0,n.nextword=!0,"builtin"):t==="%macro"?(n.inMacro=!0,n.nextword=!0,"builtin"):/title[1-9]/.test(t)?"def":t==="footnote"?(e.eat(/[1-9]/),"def"):n.inDataStep===!0&&r[t].state.indexOf("inDataStep")!==-1||n.inProc===!0&&r[t].state.indexOf("inProc")!==-1||n.inMacro===!0&&r[t].state.indexOf("inMacro")!==-1||r[t].state.indexOf("ALL")!==-1?r[t].style:null):null}const d={name:"sas",startState:function(){return{inDataStep:!1,inProc:!1,inMacro:!1,nextword:!1,continueString:null,continueComment:!1}},token:function(e,n){return e.eatSpace()?null:p(e,n)},languageData:{commentTokens:{block:{open:"/*",close:"*/"}}}};export{d as t};
import{t as s}from"./sas-BJPWZC7M.js";export{s as sas};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);export{t};

Sorry, the diff of this file is too big to display

import{t as e}from"./scheme-IRagAY3r.js";export{e as scheme};
var E="builtin",s="comment",g="string",x="symbol",l="atom",b="number",v="bracket",S=2;function k(e){for(var t={},n=e.split(" "),a=0;a<n.length;++a)t[n[a]]=!0;return t}var y=k("\u03BB case-lambda call/cc class cond-expand define-class define-values exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax define-macro defmacro delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),q=k("define let letrec let* lambda define-macro defmacro let-syntax letrec-syntax let-values let*-values define-syntax syntax-rules define-values when unless");function Q(e,t,n){this.indent=e,this.type=t,this.prev=n}function d(e,t,n){e.indentStack=new Q(t,n,e.indentStack)}function $(e){e.indentStack=e.indentStack.prev}var R=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),C=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),U=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),W=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);function z(e){return e.match(R)}function I(e){return e.match(C)}function m(e,t){return t===!0&&e.backUp(1),e.match(W)}function j(e){return e.match(U)}function w(e,t){for(var n,a=!1;(n=e.next())!=null;){if(n==t.token&&!a){t.state.mode=!1;break}a=!a&&n=="\\"}}const B={name:"scheme",startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1,sExprQuote:!1}},token:function(e,t){if(t.indentStack==null&&e.sol()&&(t.indentation=e.indentation()),e.eatSpace())return null;var n=null;switch(t.mode){case"string":w(e,{token:'"',state:t}),n=g;break;case"symbol":w(e,{token:"|",state:t}),n=x;break;case"comment":for(var a,p=!1;(a=e.next())!=null;){if(a=="#"&&p){t.mode=!1;break}p=a=="|"}n=s;break;case"s-expr-comment":if(t.mode=!1,e.peek()=="("||e.peek()=="[")t.sExprComment=0;else{e.eatWhile(/[^\s\(\)\[\]]/),n=s;break}default:var r=e.next();if(r=='"')t.mode="string",n=g;else if(r=="'")e.peek()=="("||e.peek()=="["?(typeof t.sExprQuote!="number"&&(t.sExprQuote=0),n=l):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),n=l);else if(r=="|")t.mode="symbol",n=x;else if(r=="#")if(e.eat("|"))t.mode="comment",n=s;else if(e.eat(/[tf]/i))n=l;else if(e.eat(";"))t.mode="s-expr-comment",n=s;else{var i=null,o=!1,f=!0;e.eat(/[ei]/i)?o=!0:e.backUp(1),e.match(/^#b/i)?i=z:e.match(/^#o/i)?i=I:e.match(/^#x/i)?i=j:e.match(/^#d/i)?i=m:e.match(/^[-+0-9.]/,!1)?(f=!1,i=m):o||e.eat("#"),i!=null&&(f&&!o&&e.match(/^#[ei]/i),i(e)&&(n=b))}else if(/^[-+0-9.]/.test(r)&&m(e,!0))n=b;else if(r==";")e.skipToEnd(),n=s;else if(r=="("||r=="["){for(var c="",u=e.column(),h;(h=e.eat(/[^\s\(\[\;\)\]]/))!=null;)c+=h;c.length>0&&q.propertyIsEnumerable(c)?d(t,u+S,r):(e.eatSpace(),e.eol()||e.peek()==";"?d(t,u+1,r):d(t,u+e.current().length,r)),e.backUp(e.current().length-1),typeof t.sExprComment=="number"&&t.sExprComment++,typeof t.sExprQuote=="number"&&t.sExprQuote++,n=v}else r==")"||r=="]"?(n=v,t.indentStack!=null&&t.indentStack.type==(r==")"?"(":"[")&&($(t),typeof t.sExprComment=="number"&&--t.sExprComment==0&&(n=s,t.sExprComment=!1),typeof t.sExprQuote=="number"&&--t.sExprQuote==0&&(n=l,t.sExprQuote=!1))):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),n=y&&y.propertyIsEnumerable(e.current())?E:"variable")}return typeof t.sExprComment=="number"?s:typeof t.sExprQuote=="number"?l:n},indent:function(e){return e.indentStack==null?e.indentation:e.indentStack.indent},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:";;"}}};export{B as t};
import{s as oe}from"./chunk-LvLJmgfZ.js";import{d as be,l as ye,n as V,p as ae,u as we}from"./useEvent-BhXAndur.js";import{t as Ne}from"./react-Bj1aDYRI.js";import{N as ke,Xr as ze,ai as n,gn as Ce,ii as Se,w as Oe,__tla as Ae}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as se}from"./compiler-runtime-B3qBwwSJ.js";import"./tooltip-DxKBXCGp.js";import{f as ie}from"./hotkeys-BHHWjLlp.js";import{y as Ie}from"./utils-YqBXNpsM.js";import{t as Le}from"./constants-B6Cb__3x.js";import{t as Me}from"./jsx-runtime-ZmTK25f3.js";import{t as z}from"./button-CZ3Cs4qb.js";import{t as le}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import{n as Pe,__tla as Ee}from"./JsonOutput-PE5ko4gi.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{r as Re}from"./requests-B4FYHTZl.js";import{t as me}from"./createLucideIcon-BCdY6lG5.js";import{d as De,__tla as He}from"./layout-_O8thjaV.js";import{n as Ve,t as qe,__tla as Te}from"./LazyAnyLanguageCodeMirror-DgZ8iknE.js";import"./download-os8QlW6l.js";import"./markdown-renderer-DJy8ww5d.js";import{u as Ge}from"./toDate-DETS9bBd.js";import{t as Ue,__tla as Xe}from"./cell-editor-BW4w46wt.js";import{t as Be}from"./play-GLWQQs7F.js";import{t as Fe}from"./spinner-DA8-7wQv.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import{r as Je}from"./useTheme-DQozhcp1.js";import"./Combination-BAEdC-rz.js";import{t as C}from"./tooltip-CMQz28hC.js";import"./dates-CrvjILe3.js";import"./popover-CH1FzjxU.js";import"./vega-loader.browser-DXARUlxo.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import"./purify.es-DZrAQFIu.js";import{__tla as Ke}from"./chunk-5FQGJX7Z-DPlx2kjA.js";import"./katex-CDLTCvjQ.js";import"./html-to-image-CIQqSu-S.js";import{o as Qe}from"./focus-C1YokgL7.js";import{a as We}from"./renderShortcut-BckyRbYt.js";import"./esm-Bmu2DhPy.js";import{n as Ye,r as Ze,t as ne}from"./react-resizable-panels.browser.esm-Da3ksQXL.js";import"./name-cell-input-Bc7geMVf.js";import{n as $e,r as et}from"./panel-context-HhzMRtZm.js";import"./Inputs-GV-aQbOR.js";import{__tla as tt}from"./loro_wasm_bg-DzFUi5p_.js";import"./ws-DcVtI9Wj.js";import"./dist-tLOz534J.js";import"./dist-C5H5qIvq.js";import"./dist-B62Xo7-b.js";import"./dist-BpuNldXk.js";import"./dist-8kKeYgOg.js";import"./dist-BZWmfQbq.js";import"./dist-DLgWirXg.js";import"./dist-CF4gkF4y.js";import"./dist-CNW1zLeq.js";import"./esm-D82gQH1f.js";import{t as rt}from"./kiosk-mode-WmM7aFkh.js";let ce,ot=Promise.all([(()=>{try{return Ae}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return Xe}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return tt}catch{}})()]).then(async()=>{var de=me("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]),pe=me("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),he=se(),q=oe(Ne(),1),ue=15;const T=ze("marimo:scratchpadHistory:v1",[],Ce),fe=ae(!1),xe=ae(null,(e,s,i)=>{if(i=i.trim(),!i)return;let m=e(T);s(T,[i,...m.filter(c=>c!==i)].slice(0,ue))});var t=oe(Me(),1),_e={hide_code:!1,disabled:!1};const ve=()=>{var re;let e=(0,he.c)(60),s=ke(),[i]=Ie(),{theme:m}=Je(),c=(0,q.useRef)(null),G=Qe(),{createNewCell:U,updateCellCode:d}=Oe(),{sendRunScratchpad:p}=Re(),S=$e(),X=et(),l=s.cellRuntime[n],B=l==null?void 0:l.output,O=l==null?void 0:l.status,F=l==null?void 0:l.consoleOutputs,r=((re=s.cellData.__scratch__)==null?void 0:re.code)??"",J=be(xe),[a,h]=ye(fe),u=we(T),A;e[0]!==J||e[1]!==r||e[2]!==p?(A=()=>{p({code:r}),J(r)},e[0]=J,e[1]=r,e[2]=p,e[3]=A):A=e[3];let f=V(A),I;e[4]!==r||e[5]!==U||e[6]!==G?(I=()=>{r.trim()&&U({code:r,before:!1,cellId:G??"__end__"})},e[4]=r,e[5]=U,e[6]=G,e[7]=I):I=e[7];let K=V(I),L;e[8]!==p||e[9]!==d?(L=()=>{d({cellId:n,code:"",formattingChange:!1}),p({code:""});let o=c.current;o&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:""}})},e[8]=p,e[9]=d,e[10]=L):L=e[10];let Q=V(L),M;e[11]!==h||e[12]!==d?(M=o=>{h(!1),d({cellId:n,code:o,formattingChange:!1});let k=c.current;k&&k.dispatch({changes:{from:0,to:k.state.doc.length,insert:o}})},e[11]=h,e[12]=d,e[13]=M):M=e[13];let W=V(M),[Y,ge]=(0,q.useState)(),P;e[14]!==W||e[15]!==u||e[16]!==a||e[17]!==m?(P=()=>a?(0,t.jsx)("div",{className:"absolute inset-0 z-100 bg-background p-3 border-none overflow-auto",children:(0,t.jsx)("div",{className:"overflow-auto flex flex-col gap-3",children:u.map((o,k)=>(0,t.jsx)("div",{className:"border rounded-md hover:shadow-sm cursor-pointer hover:border-input overflow-hidden",onClick:()=>W(o),children:(0,t.jsx)(q.Suspense,{children:(0,t.jsx)(qe,{language:"python",theme:m,basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1},value:o.trim(),editable:!1,readOnly:!0})})},k))})}):null,e[14]=W,e[15]=u,e[16]=a,e[17]=m,e[18]=P):P=e[18];let Z=P,E;e[19]!==Q||e[20]!==K||e[21]!==f||e[22]!==u.length||e[23]!==a||e[24]!==h||e[25]!==O?(E=()=>(0,t.jsxs)("div",{className:"flex items-center shrink-0 border-b",children:[(0,t.jsx)(C,{content:We("cell.run"),children:(0,t.jsx)(z,{"data-testid":"scratchpad-run-button",onClick:f,disabled:a,variant:"text",size:"xs",children:(0,t.jsx)(Be,{color:"var(--grass-11)",size:16})})}),(0,t.jsx)(C,{content:"Clear code and outputs",children:(0,t.jsx)(z,{disabled:a,size:"xs",variant:"text",onClick:Q,children:(0,t.jsx)(de,{size:16})})}),(0,t.jsx)(rt,{children:(0,t.jsx)(C,{content:"Insert code",children:(0,t.jsx)(z,{disabled:a,size:"xs",variant:"text",onClick:K,children:(0,t.jsx)(Ve,{size:16})})})}),(O==="running"||O==="queued")&&(0,t.jsx)(Fe,{className:"inline",size:"small"}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)(C,{content:"Toggle history",children:(0,t.jsx)(z,{size:"xs",variant:"text",className:le(a&&"bg-(--sky-3) rounded-none"),onClick:()=>h(!a),disabled:u.length===0,children:(0,t.jsx)(pe,{size:16})})}),(0,t.jsx)(C,{content:(0,t.jsx)("span",{className:"block max-w-prose",children:"Use this scratchpad to experiment with code without restrictions on variable names. Variables defined here aren't saved to notebook memory, and the code is not saved in the notebook file."}),children:(0,t.jsx)(z,{size:"xs",variant:"text",children:(0,t.jsx)(Ge,{size:16})})})]}),e[19]=Q,e[20]=K,e[21]=f,e[22]=u.length,e[23]=a,e[24]=h,e[25]=O,e[26]=E):E=e[26];let $=E,je=S==="vertical",R;e[27]===Symbol.for("react.memo_cache_sentinel")?(R=Se.create(n),e[27]=R):R=e[27];let x;e[28]===$?x=e[29]:(x=$(),e[28]=$,e[29]=x);let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=o=>{c.current=o},e[30]=D):D=e[30];let _;e[31]!==r||e[32]!==f||e[33]!==Y||e[34]!==m||e[35]!==i?(_=(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)(Ue,{theme:m,showPlaceholder:!1,id:n,code:r,config:_e,status:"idle",serializedEditorState:null,runCell:f,userConfig:i,editorViewRef:c,setEditorView:D,hidden:!1,showHiddenCode:ie.NOOP,languageAdapter:Y,setLanguageAdapter:ge})}),e[31]=r,e[32]=f,e[33]=Y,e[34]=m,e[35]=i,e[36]=_):_=e[36];let v;e[37]===Z?v=e[38]:(v=Z(),e[37]=Z,e[38]=v);let g;e[39]!==v||e[40]!==x||e[41]!==_?(g=(0,t.jsx)(ne,{defaultSize:40,minSize:20,maxSize:70,children:(0,t.jsxs)("div",{className:"h-full flex flex-col overflow-hidden relative",children:[x,_,v]})}),e[39]=v,e[40]=x,e[41]=_,e[42]=g):g=e[42];let ee=je?"h-1":"w-1",j;e[43]===ee?j=e[44]:(j=le("bg-border hover:bg-primary/50 transition-colors",ee),e[43]=ee,e[44]=j);let b;e[45]===j?b=e[46]:(b=(0,t.jsx)(Ze,{className:j}),e[45]=j,e[46]=b);let y;e[47]===B?y=e[48]:(y=(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)(Pe,{allowExpand:!1,output:B,className:Le.outputArea,cellId:n,stale:!1,loading:!1})}),e[47]=B,e[48]=y);let w;e[49]===F?w=e[50]:(w=(0,t.jsx)("div",{className:"overflow-auto shrink-0 max-h-[50%]",children:(0,t.jsx)(De,{consoleOutputs:F,className:"overflow-auto",stale:!1,cellName:"_",onSubmitDebugger:ie.NOOP,cellId:n,debuggerActive:!1})}),e[49]=F,e[50]=w);let N;e[51]!==y||e[52]!==w?(N=(0,t.jsx)(ne,{defaultSize:60,minSize:20,children:(0,t.jsxs)("div",{className:"h-full flex flex-col divide-y overflow-hidden",children:[y,w]})}),e[51]=y,e[52]=w,e[53]=N):N=e[53];let H;return e[54]!==S||e[55]!==X||e[56]!==g||e[57]!==b||e[58]!==N?(H=(0,t.jsx)("div",{className:"flex flex-col h-full overflow-hidden",id:R,children:(0,t.jsxs)(Ye,{direction:S,className:"h-full",children:[g,b,N]},X)}),e[54]=S,e[55]=X,e[56]=g,e[57]=b,e[58]=N,e[59]=H):H=e[59],H};let te;te=se(),ce=()=>{let e=(0,te.c)(1),s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(ve,{}),e[0]=s):s=e[0],s}});export{ot as __tla,ce as default};
import{s as g}from"./chunk-LvLJmgfZ.js";import"./useEvent-BhXAndur.js";import{t as k}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import{t as $}from"./compiler-runtime-B3qBwwSJ.js";import{t as M}from"./jsx-runtime-ZmTK25f3.js";import{t as E}from"./cn-BKtXLv3a.js";import{t as L}from"./check-Dr3SxUsb.js";import{t as A}from"./copy-D-8y6iMN.js";import{n as D}from"./DeferredRequestRegistry-CMf25YiV.js";import{t as P}from"./spinner-DA8-7wQv.js";import{t as T}from"./plus-B7DF33lD.js";import{t as V}from"./badge-DX6CQ6PA.js";import{t as q}from"./use-toast-BDYuj3zG.js";import"./Combination-BAEdC-rz.js";import{n as B}from"./ImperativeModal-BNN1HA7x.js";import{t as F}from"./copy-DHrHayPa.js";import{n as I}from"./error-banner-B9ts0mNl.js";import{n as O}from"./useAsyncData-BMGLSTg8.js";import{a as R,i as S,n as G,o as w,r as _,t as H}from"./table-DScsXgJW.js";import{n as J,r as K,t as C}from"./react-resizable-panels.browser.esm-Da3ksQXL.js";import{t as Q}from"./empty-state-B8Cxr9nj.js";import{t as U}from"./request-registry-C5_pVc8Y.js";import{n as W,t as X}from"./write-secret-modal-1fGKmd5H.js";var z=$(),Y=g(k(),1),r=g(M(),1),Z=()=>{let e=(0,z.c)(27),{openModal:t,closeModal:n}=B(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];let{data:s,isPending:x,error:f,refetch:m}=O(re,l);if(x){let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(P,{size:"medium",centered:!0}),e[1]=o):o=e[1],o}if(f){let o;return e[2]===f?o=e[3]:(o=(0,r.jsx)(I,{error:f}),e[2]=f,e[3]=o),o}let c;e[4]===s?c=e[5]:(c=s.filter(te).map(oe),e[4]=s,e[5]=c);let i=c;if(s.length===0){let o;return e[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(Q,{title:"No environment variables",description:"No environment variables are available in this notebook.",icon:(0,r.jsx)(D,{})}),e[6]=o):o=e[6],o}let a;e[7]!==n||e[8]!==t||e[9]!==i||e[10]!==m?(a=()=>t((0,r.jsx)(X,{providerNames:i,onSuccess:()=>{m(),n()},onClose:n})),e[7]=n,e[8]=t,e[9]=i,e[10]=m,e[11]=a):a=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=(0,r.jsx)(T,{className:"h-4 w-4"}),e[12]=b):b=e[12];let d;e[13]===a?d=e[14]:(d=(0,r.jsx)("div",{className:"flex justify-start h-8 border-b",children:(0,r.jsx)("button",{type:"button",className:"border-r px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",onClick:a,children:b})}),e[13]=a,e[14]=d);let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=(0,r.jsx)(R,{children:(0,r.jsxs)(w,{children:[(0,r.jsx)(S,{children:"Environment Variable"}),(0,r.jsx)(S,{children:"Source"}),(0,r.jsx)(S,{})]})}),e[15]=j):j=e[15];let p;e[16]===s?p=e[17]:(p=s.map(se),e[16]=s,e[17]=p);let h;e[18]===p?h=e[19]:(h=(0,r.jsxs)(H,{className:"overflow-auto flex-1 mb-16",children:[j,(0,r.jsx)(G,{children:p})]}),e[18]=p,e[19]=h);let u;e[20]!==d||e[21]!==h?(u=(0,r.jsx)(C,{defaultSize:50,minSize:30,maxSize:80,children:(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[d,h]})}),e[20]=d,e[21]=h,e[22]=u):u=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=(0,r.jsx)(K,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),e[23]=v):v=e[23];let y;e[24]===Symbol.for("react.memo_cache_sentinel")?(y=(0,r.jsx)(C,{defaultSize:50,children:(0,r.jsx)("div",{})}),e[24]=y):y=e[24];let N;return e[25]===u?N=e[26]:(N=(0,r.jsxs)(J,{direction:"horizontal",className:"h-full",children:[u,v,y]}),e[25]=u,e[26]=N),N},ee=e=>{let t=(0,z.c)(9),{className:n,ariaLabel:l,onCopy:s}=e,[x,f]=Y.useState(!1),m;t[0]===s?m=t[1]:(m=()=>{s(),f(!0),setTimeout(()=>f(!1),1e3)},t[0]=s,t[1]=m);let c=m,i;t[2]===x?i=t[3]:(i=x?(0,r.jsx)(L,{className:"w-3 h-3 text-green-700 rounded"}):(0,r.jsx)(A,{className:"w-3 h-3 hover:bg-muted rounded"}),t[2]=x,t[3]=i);let a;return t[4]!==l||t[5]!==n||t[6]!==c||t[7]!==i?(a=(0,r.jsx)("button",{type:"button",className:n,onClick:c,"aria-label":l,children:i}),t[4]=l,t[5]=n,t[6]=c,t[7]=i,t[8]=a):a=t[8],a};async function re(){return W((await U.request({})).secrets)}function te(e){return e.provider!=="env"}function oe(e){return e.name}function se(e){return e.keys.map(t=>(0,r.jsxs)(w,{className:"group",children:[(0,r.jsx)(_,{children:t}),(0,r.jsx)(_,{children:e.provider!=="env"&&(0,r.jsx)(V,{variant:"outline",className:"select-none",children:e.name})}),(0,r.jsx)(_,{children:(0,r.jsx)(ee,{ariaLabel:`Copy ${t}`,onCopy:async()=>{await F(`os.environ["${t}"]`),q({title:"Copied to clipboard",description:`os.environ["${t}"] has been copied to your clipboard.`})},className:E("float-right px-2 h-full text-xs text-muted-foreground hover:text-foreground","invisible group-hover:visible")})})]},`${e.name}-${t}`))}export{Z as default};
import{s as ge}from"./chunk-LvLJmgfZ.js";import{t as yt}from"./react-Bj1aDYRI.js";import{t as bt}from"./react-dom-CSu739Rf.js";import{t as Pe}from"./compiler-runtime-B3qBwwSJ.js";import{r as A}from"./useEventListener-Cb-RVVEn.js";import{t as St}from"./jsx-runtime-ZmTK25f3.js";import{r as Ct}from"./button-CZ3Cs4qb.js";import{n as jt,t as Z}from"./cn-BKtXLv3a.js";import{t as Nt}from"./check-Dr3SxUsb.js";import{n as _t,r as ke,t as Rt}from"./x-ZP5cObgf.js";import{C as q,E as Pt,S as Te,_ as I,a as kt,c as Tt,d as It,f as xe,g as Dt,i as Et,m as Mt,r as Ot,s as Lt,t as At,u as Ht,w as R,y as Vt}from"./Combination-BAEdC-rz.js";import{a as Bt,c as Ie,i as Kt,n as Ft,o as Wt,s as zt}from"./dist-DwV58Fb1.js";import{d as Ut,t as qt,u as Gt}from"./menu-items-BMjcEb2j.js";var d=ge(yt(),1);function De(n){let i=d.useRef({value:n,previous:n});return d.useMemo(()=>(i.current.value!==n&&(i.current.previous=i.current.value,i.current.value=n),i.current.previous),[n])}function we(n,[i,e]){return Math.min(e,Math.max(i,n))}var Ee=ge(bt(),1),c=ge(St(),1),Xt=[" ","Enter","ArrowUp","ArrowDown"],Yt=[" ","Enter"],$="Select",[le,ie,Zt]=Ut($),[re,Fr]=Pt($,[Zt,Ie]),se=Ie(),[$t,G]=re($),[Jt,Qt]=re($),Me=n=>{let{__scopeSelect:i,children:e,open:t,defaultOpen:r,onOpenChange:a,value:o,defaultValue:l,onValueChange:s,dir:u,name:m,autoComplete:v,disabled:x,required:b,form:S}=n,p=se(i),[w,j]=d.useState(null),[f,g]=d.useState(null),[V,D]=d.useState(!1),P=Gt(u),[B,K]=Te({prop:t,defaultProp:r??!1,onChange:a,caller:$}),[F,O]=Te({prop:o,defaultProp:l,onChange:s,caller:$}),Q=d.useRef(null),W=w?S||!!w.closest("form"):!0,[E,z]=d.useState(new Set),U=Array.from(E).map(k=>k.props.value).join(";");return(0,c.jsx)(zt,{...p,children:(0,c.jsxs)($t,{required:b,scope:i,trigger:w,onTriggerChange:j,valueNode:f,onValueNodeChange:g,valueNodeHasChildren:V,onValueNodeHasChildrenChange:D,contentId:xe(),value:F,onValueChange:O,open:B,onOpenChange:K,dir:P,triggerPointerDownPosRef:Q,disabled:x,children:[(0,c.jsx)(le.Provider,{scope:i,children:(0,c.jsx)(Jt,{scope:n.__scopeSelect,onNativeOptionAdd:d.useCallback(k=>{z(H=>new Set(H).add(k))},[]),onNativeOptionRemove:d.useCallback(k=>{z(H=>{let L=new Set(H);return L.delete(k),L})},[]),children:e})}),W?(0,c.jsxs)(at,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:v,value:F,onChange:k=>O(k.target.value),disabled:x,form:S,children:[F===void 0?(0,c.jsx)("option",{value:""}):null,Array.from(E)]},U):null]})})};Me.displayName=$;var Oe="SelectTrigger",Le=d.forwardRef((n,i)=>{let{__scopeSelect:e,disabled:t=!1,...r}=n,a=se(e),o=G(Oe,e),l=o.disabled||t,s=A(i,o.onTriggerChange),u=ie(e),m=d.useRef("touch"),[v,x,b]=it(p=>{let w=u().filter(f=>!f.disabled),j=st(w,p,w.find(f=>f.value===o.value));j!==void 0&&o.onValueChange(j.value)}),S=p=>{l||(o.onOpenChange(!0),b()),p&&(o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return(0,c.jsx)(Kt,{asChild:!0,...a,children:(0,c.jsx)(I.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":lt(o.value)?"":void 0,...r,ref:s,onClick:R(r.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&S(p)}),onPointerDown:R(r.onPointerDown,p=>{m.current=p.pointerType;let w=p.target;w.hasPointerCapture(p.pointerId)&&w.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:R(r.onKeyDown,p=>{let w=v.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&x(p.key),!(w&&p.key===" ")&&Xt.includes(p.key)&&(S(),p.preventDefault())})})})});Le.displayName=Oe;var Ae="SelectValue",He=d.forwardRef((n,i)=>{let{__scopeSelect:e,className:t,style:r,children:a,placeholder:o="",...l}=n,s=G(Ae,e),{onValueNodeHasChildrenChange:u}=s,m=a!==void 0,v=A(i,s.onValueNodeChange);return q(()=>{u(m)},[u,m]),(0,c.jsx)(I.span,{...l,ref:v,style:{pointerEvents:"none"},children:lt(s.value)?(0,c.jsx)(c.Fragment,{children:o}):a})});He.displayName=Ae;var er="SelectIcon",Ve=d.forwardRef((n,i)=>{let{__scopeSelect:e,children:t,...r}=n;return(0,c.jsx)(I.span,{"aria-hidden":!0,...r,ref:i,children:t||"\u25BC"})});Ve.displayName=er;var tr="SelectPortal",Be=n=>(0,c.jsx)(It,{asChild:!0,...n});Be.displayName=tr;var J="SelectContent",Ke=d.forwardRef((n,i)=>{let e=G(J,n.__scopeSelect),[t,r]=d.useState();if(q(()=>{r(new DocumentFragment)},[]),!e.open){let a=t;return a?Ee.createPortal((0,c.jsx)(Fe,{scope:n.__scopeSelect,children:(0,c.jsx)(le.Slot,{scope:n.__scopeSelect,children:(0,c.jsx)("div",{children:n.children})})}),a):null}return(0,c.jsx)(We,{...n,ref:i})});Ke.displayName=J;var M=10,[Fe,X]=re(J),rr="SelectContentImpl",or=Vt("SelectContent.RemoveScroll"),We=d.forwardRef((n,i)=>{let{__scopeSelect:e,position:t="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:s,align:u,alignOffset:m,arrowPadding:v,collisionBoundary:x,collisionPadding:b,sticky:S,hideWhenDetached:p,avoidCollisions:w,...j}=n,f=G(J,e),[g,V]=d.useState(null),[D,P]=d.useState(null),B=A(i,h=>V(h)),[K,F]=d.useState(null),[O,Q]=d.useState(null),W=ie(e),[E,z]=d.useState(!1),U=d.useRef(!1);d.useEffect(()=>{if(g)return Ot(g)},[g]),kt();let k=d.useCallback(h=>{let[_,...C]=W().map(N=>N.ref.current),[y]=C.slice(-1),T=document.activeElement;for(let N of h)if(N===T||(N==null||N.scrollIntoView({block:"nearest"}),N===_&&D&&(D.scrollTop=0),N===y&&D&&(D.scrollTop=D.scrollHeight),N==null||N.focus(),document.activeElement!==T))return},[W,D]),H=d.useCallback(()=>k([K,g]),[k,K,g]);d.useEffect(()=>{E&&H()},[E,H]);let{onOpenChange:L,triggerPointerDownPosRef:Y}=f;d.useEffect(()=>{if(g){let h={x:0,y:0},_=y=>{var T,N;h={x:Math.abs(Math.round(y.pageX)-(((T=Y.current)==null?void 0:T.x)??0)),y:Math.abs(Math.round(y.pageY)-(((N=Y.current)==null?void 0:N.y)??0))}},C=y=>{h.x<=10&&h.y<=10?y.preventDefault():g.contains(y.target)||L(!1),document.removeEventListener("pointermove",_),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",C,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",C,{capture:!0})}}},[g,L,Y]),d.useEffect(()=>{let h=()=>L(!1);return window.addEventListener("blur",h),window.addEventListener("resize",h),()=>{window.removeEventListener("blur",h),window.removeEventListener("resize",h)}},[L]);let[ae,ce]=it(h=>{let _=W().filter(y=>!y.disabled),C=st(_,h,_.find(y=>y.ref.current===document.activeElement));C&&setTimeout(()=>C.ref.current.focus())}),ue=d.useCallback((h,_,C)=>{let y=!U.current&&!C;(f.value!==void 0&&f.value===_||y)&&(F(h),y&&(U.current=!0))},[f.value]),ee=d.useCallback(()=>g==null?void 0:g.focus(),[g]),pe=d.useCallback((h,_,C)=>{let y=!U.current&&!C;(f.value!==void 0&&f.value===_||y)&&Q(h)},[f.value]),te=t==="popper"?ye:ze,fe=te===ye?{side:l,sideOffset:s,align:u,alignOffset:m,arrowPadding:v,collisionBoundary:x,collisionPadding:b,sticky:S,hideWhenDetached:p,avoidCollisions:w}:{};return(0,c.jsx)(Fe,{scope:e,content:g,viewport:D,onViewportChange:P,itemRefCallback:ue,selectedItem:K,onItemLeave:ee,itemTextRefCallback:pe,focusSelectedItem:H,selectedItemText:O,position:t,isPositioned:E,searchRef:ae,children:(0,c.jsx)(At,{as:or,allowPinchZoom:!0,children:(0,c.jsx)(Et,{asChild:!0,trapped:f.open,onMountAutoFocus:h=>{h.preventDefault()},onUnmountAutoFocus:R(r,h=>{var _;(_=f.trigger)==null||_.focus({preventScroll:!0}),h.preventDefault()}),children:(0,c.jsx)(Mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:(0,c.jsx)(te,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:h=>h.preventDefault(),...j,...fe,onPlaced:()=>z(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:R(j.onKeyDown,h=>{let _=h.ctrlKey||h.altKey||h.metaKey;if(h.key==="Tab"&&h.preventDefault(),!_&&h.key.length===1&&ce(h.key),["ArrowUp","ArrowDown","Home","End"].includes(h.key)){let C=W().filter(y=>!y.disabled).map(y=>y.ref.current);if(["ArrowUp","End"].includes(h.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){let y=h.target,T=C.indexOf(y);C=C.slice(T+1)}setTimeout(()=>k(C)),h.preventDefault()}})})})})})})});We.displayName=rr;var nr="SelectItemAlignedPosition",ze=d.forwardRef((n,i)=>{let{__scopeSelect:e,onPlaced:t,...r}=n,a=G(J,e),o=X(J,e),[l,s]=d.useState(null),[u,m]=d.useState(null),v=A(i,P=>m(P)),x=ie(e),b=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:w,selectedItemText:j,focusSelectedItem:f}=o,g=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&w&&j){let P=a.trigger.getBoundingClientRect(),B=u.getBoundingClientRect(),K=a.valueNode.getBoundingClientRect(),F=j.getBoundingClientRect();if(a.dir!=="rtl"){let C=F.left-B.left,y=K.left-C,T=P.left-y,N=P.width+T,me=Math.max(N,B.width),he=window.innerWidth-M,ve=we(y,[M,Math.max(M,he-me)]);l.style.minWidth=N+"px",l.style.left=ve+"px"}else{let C=B.right-F.right,y=window.innerWidth-K.right-C,T=window.innerWidth-P.right-y,N=P.width+T,me=Math.max(N,B.width),he=window.innerWidth-M,ve=we(y,[M,Math.max(M,he-me)]);l.style.minWidth=N+"px",l.style.right=ve+"px"}let O=x(),Q=window.innerHeight-M*2,W=p.scrollHeight,E=window.getComputedStyle(u),z=parseInt(E.borderTopWidth,10),U=parseInt(E.paddingTop,10),k=parseInt(E.borderBottomWidth,10),H=parseInt(E.paddingBottom,10),L=z+U+W+H+k,Y=Math.min(w.offsetHeight*5,L),ae=window.getComputedStyle(p),ce=parseInt(ae.paddingTop,10),ue=parseInt(ae.paddingBottom,10),ee=P.top+P.height/2-M,pe=Q-ee,te=w.offsetHeight/2,fe=w.offsetTop+te,h=z+U+fe,_=L-h;if(h<=ee){let C=O.length>0&&w===O[O.length-1].ref.current;l.style.bottom="0px";let y=u.clientHeight-p.offsetTop-p.offsetHeight,T=h+Math.max(pe,te+(C?ue:0)+y+k);l.style.height=T+"px"}else{let C=O.length>0&&w===O[0].ref.current;l.style.top="0px";let y=Math.max(ee,z+p.offsetTop+(C?ce:0)+te)+_;l.style.height=y+"px",p.scrollTop=h-ee+p.offsetTop}l.style.margin=`${M}px 0`,l.style.minHeight=Y+"px",l.style.maxHeight=Q+"px",t==null||t(),requestAnimationFrame(()=>b.current=!0)}},[x,a.trigger,a.valueNode,l,u,p,w,j,a.dir,t]);q(()=>g(),[g]);let[V,D]=d.useState();return q(()=>{u&&D(window.getComputedStyle(u).zIndex)},[u]),(0,c.jsx)(lr,{scope:e,contentWrapper:l,shouldExpandOnScrollRef:b,onScrollButtonChange:d.useCallback(P=>{P&&S.current===!0&&(g(),f==null||f(),S.current=!1)},[g,f]),children:(0,c.jsx)("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:V},children:(0,c.jsx)(I.div,{...r,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=nr;var ar="SelectPopperPosition",ye=d.forwardRef((n,i)=>{let{__scopeSelect:e,align:t="start",collisionPadding:r=M,...a}=n,o=se(e);return(0,c.jsx)(Wt,{...o,...a,ref:i,align:t,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ye.displayName=ar;var[lr,be]=re(J,{}),Se="SelectViewport",Ue=d.forwardRef((n,i)=>{let{__scopeSelect:e,nonce:t,...r}=n,a=X(Se,e),o=be(Se,e),l=A(i,a.onViewportChange),s=d.useRef(0);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),(0,c.jsx)(le.Slot,{scope:e,children:(0,c.jsx)(I.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,u=>{let m=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:x}=o;if(x!=null&&x.current&&v){let b=Math.abs(s.current-m.scrollTop);if(b>0){let S=window.innerHeight-M*2,p=parseFloat(v.style.minHeight),w=parseFloat(v.style.height),j=Math.max(p,w);if(j<S){let f=j+b,g=Math.min(S,f),V=f-g;v.style.height=g+"px",v.style.bottom==="0px"&&(m.scrollTop=V>0?V:0,v.style.justifyContent="flex-end")}}}s.current=m.scrollTop})})})]})});Ue.displayName=Se;var qe="SelectGroup",[ir,sr]=re(qe),Ge=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n,r=xe();return(0,c.jsx)(ir,{scope:e,id:r,children:(0,c.jsx)(I.div,{role:"group","aria-labelledby":r,...t,ref:i})})});Ge.displayName=qe;var Xe="SelectLabel",Ye=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n,r=sr(Xe,e);return(0,c.jsx)(I.div,{id:r.id,...t,ref:i})});Ye.displayName=Xe;var de="SelectItem",[dr,Ze]=re(de),$e=d.forwardRef((n,i)=>{let{__scopeSelect:e,value:t,disabled:r=!1,textValue:a,...o}=n,l=G(de,e),s=X(de,e),u=l.value===t,[m,v]=d.useState(a??""),[x,b]=d.useState(!1),S=A(i,f=>{var g;return(g=s.itemRefCallback)==null?void 0:g.call(s,f,t,r)}),p=xe(),w=d.useRef("touch"),j=()=>{r||(l.onValueChange(t),l.onOpenChange(!1))};if(t==="")throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,c.jsx)(dr,{scope:e,value:t,disabled:r,textId:p,isSelected:u,onItemTextChange:d.useCallback(f=>{v(g=>g||((f==null?void 0:f.textContent)??"").trim())},[]),children:(0,c.jsx)(le.ItemSlot,{scope:e,value:t,disabled:r,textValue:m,children:(0,c.jsx)(I.div,{role:"option","aria-labelledby":p,"data-highlighted":x?"":void 0,"aria-selected":u&&x,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...o,ref:S,onFocus:R(o.onFocus,()=>b(!0)),onBlur:R(o.onBlur,()=>b(!1)),onClick:R(o.onClick,()=>{w.current!=="mouse"&&j()}),onPointerUp:R(o.onPointerUp,()=>{w.current==="mouse"&&j()}),onPointerDown:R(o.onPointerDown,f=>{w.current=f.pointerType}),onPointerMove:R(o.onPointerMove,f=>{var g;w.current=f.pointerType,r?(g=s.onItemLeave)==null||g.call(s):w.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(o.onPointerLeave,f=>{var g;f.currentTarget===document.activeElement&&((g=s.onItemLeave)==null||g.call(s))}),onKeyDown:R(o.onKeyDown,f=>{var g;((g=s.searchRef)==null?void 0:g.current)!==""&&f.key===" "||(Yt.includes(f.key)&&j(),f.key===" "&&f.preventDefault())})})})})});$e.displayName=de;var oe="SelectItemText",Je=d.forwardRef((n,i)=>{let{__scopeSelect:e,className:t,style:r,...a}=n,o=G(oe,e),l=X(oe,e),s=Ze(oe,e),u=Qt(oe,e),[m,v]=d.useState(null),x=A(i,j=>v(j),s.onItemTextChange,j=>{var f;return(f=l.itemTextRefCallback)==null?void 0:f.call(l,j,s.value,s.disabled)}),b=m==null?void 0:m.textContent,S=d.useMemo(()=>(0,c.jsx)("option",{value:s.value,disabled:s.disabled,children:b},s.value),[s.disabled,s.value,b]),{onNativeOptionAdd:p,onNativeOptionRemove:w}=u;return q(()=>(p(S),()=>w(S)),[p,w,S]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(I.span,{id:s.textId,...a,ref:x}),s.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ee.createPortal(a.children,o.valueNode):null]})});Je.displayName=oe;var Qe="SelectItemIndicator",et=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n;return Ze(Qe,e).isSelected?(0,c.jsx)(I.span,{"aria-hidden":!0,...t,ref:i}):null});et.displayName=Qe;var Ce="SelectScrollUpButton",tt=d.forwardRef((n,i)=>{let e=X(Ce,n.__scopeSelect),t=be(Ce,n.__scopeSelect),[r,a]=d.useState(!1),o=A(i,t.onScrollButtonChange);return q(()=>{if(e.viewport&&e.isPositioned){let l=function(){a(s.scrollTop>0)},s=e.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[e.viewport,e.isPositioned]),r?(0,c.jsx)(ot,{...n,ref:o,onAutoScroll:()=>{let{viewport:l,selectedItem:s}=e;l&&s&&(l.scrollTop-=s.offsetHeight)}}):null});tt.displayName=Ce;var je="SelectScrollDownButton",rt=d.forwardRef((n,i)=>{let e=X(je,n.__scopeSelect),t=be(je,n.__scopeSelect),[r,a]=d.useState(!1),o=A(i,t.onScrollButtonChange);return q(()=>{if(e.viewport&&e.isPositioned){let l=function(){let u=s.scrollHeight-s.clientHeight;a(Math.ceil(s.scrollTop)<u)},s=e.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[e.viewport,e.isPositioned]),r?(0,c.jsx)(ot,{...n,ref:o,onAutoScroll:()=>{let{viewport:l,selectedItem:s}=e;l&&s&&(l.scrollTop+=s.offsetHeight)}}):null});rt.displayName=je;var ot=d.forwardRef((n,i)=>{let{__scopeSelect:e,onAutoScroll:t,...r}=n,a=X("SelectScrollButton",e),o=d.useRef(null),l=ie(e),s=d.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return d.useEffect(()=>()=>s(),[s]),q(()=>{var u,m;(m=(u=l().find(v=>v.ref.current===document.activeElement))==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[l]),(0,c.jsx)(I.div,{"aria-hidden":!0,...r,ref:i,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(t,50))}),onPointerMove:R(r.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),o.current===null&&(o.current=window.setInterval(t,50))}),onPointerLeave:R(r.onPointerLeave,()=>{s()})})}),cr="SelectSeparator",nt=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n;return(0,c.jsx)(I.div,{"aria-hidden":!0,...t,ref:i})});nt.displayName=cr;var Ne="SelectArrow",ur=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n,r=se(e),a=G(Ne,e),o=X(Ne,e);return a.open&&o.position==="popper"?(0,c.jsx)(Bt,{...r,...t,ref:i}):null});ur.displayName=Ne;var pr="SelectBubbleInput",at=d.forwardRef(({__scopeSelect:n,value:i,...e},t)=>{let r=d.useRef(null),a=A(t,r),o=De(i);return d.useEffect(()=>{let l=r.current;if(!l)return;let s=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(s,"value").set;if(o!==i&&u){let m=new Event("change",{bubbles:!0});u.call(l,i),l.dispatchEvent(m)}},[o,i]),(0,c.jsx)(I.select,{...e,style:{...Ft,...e.style},ref:a,defaultValue:i})});at.displayName=pr;function lt(n){return n===""||n===void 0}function it(n){let i=Dt(n),e=d.useRef(""),t=d.useRef(0),r=d.useCallback(o=>{let l=e.current+o;i(l),(function s(u){e.current=u,window.clearTimeout(t.current),u!==""&&(t.current=window.setTimeout(()=>s(""),1e3))})(l)},[i]),a=d.useCallback(()=>{e.current="",window.clearTimeout(t.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(t.current),[]),[e,r,a]}function st(n,i,e){let t=i.length>1&&Array.from(i).every(l=>l===i[0])?i[0]:i,r=e?n.indexOf(e):-1,a=fr(n,Math.max(r,0));t.length===1&&(a=a.filter(l=>l!==e));let o=a.find(l=>l.textValue.toLowerCase().startsWith(t.toLowerCase()));return o===e?void 0:o}function fr(n,i){return n.map((e,t)=>n[(i+t)%n.length])}var mr=Me,_e=Le,hr=He,dt=Ve,vr=Be,ct=Ke,gr=Ue,xr=Ge,ut=Ye,pt=$e,wr=Je,yr=et,br=tt,Sr=rt,ft=nt,Cr=Pe();const Re=jt("flex h-6 w-fit mb-1 items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"shadow-xs-solid border border-input hover:shadow-sm-solid focus:border-primary focus:shadow-md-solid disabled:hover:shadow-xs-solid",ghost:"opacity-70 hover:opacity-100 focus:opacity-100"}},defaultVariants:{variant:"default"}});var mt=d.forwardRef((n,i)=>{let e=(0,Cr.c)(12),t,r,a;e[0]===n?(t=e[1],r=e[2],a=e[3]):({className:r,children:t,...a}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=a);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=Ct.stopPropagation(),e[4]=o):o=e[4];let l;e[5]===r?l=e[6]:(l=Z(Re({}),r),e[5]=r,e[6]=l);let s;return e[7]!==t||e[8]!==a||e[9]!==i||e[10]!==l?(s=(0,c.jsx)("select",{ref:i,onClick:o,className:l,...a,children:t}),e[7]=t,e[8]=a,e[9]=i,e[10]=l,e[11]=s):s=e[11],s});mt.displayName="NativeSelect";var ne=Pe(),jr=mr,Nr=xr,_r=Lt(vr),Rr=hr,ht=d.forwardRef((n,i)=>{let e=(0,ne.c)(21),t,r,a,o,l,s;e[0]===n?(t=e[1],r=e[2],a=e[3],o=e[4],l=e[5],s=e[6]):({className:r,children:t,onClear:a,variant:s,hideChevron:l,...o}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=a,e[4]=o,e[5]=l,e[6]=s);let u=l===void 0?!1:l,m;e[7]!==r||e[8]!==s?(m=Z(Re({variant:s}),"mb-0",r),e[7]=r,e[8]=s,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==a?(v=a?(0,c.jsx)("span",{onPointerDown:S=>{S.preventDefault(),S.stopPropagation(),a()},children:(0,c.jsx)(Rt,{className:"h-4 w-4 opacity-50 hover:opacity-90"})}):!u&&(0,c.jsx)(ke,{className:"h-4 w-4 opacity-50"}),e[10]=u,e[11]=a,e[12]=v):v=e[12];let x;e[13]===v?x=e[14]:(x=(0,c.jsx)(dt,{asChild:!0,children:v}),e[13]=v,e[14]=x);let b;return e[15]!==t||e[16]!==o||e[17]!==i||e[18]!==m||e[19]!==x?(b=(0,c.jsxs)(_e,{ref:i,className:m,...o,children:[t,x]}),e[15]=t,e[16]=o,e[17]=i,e[18]=m,e[19]=x,e[20]=b):b=e[20],b});ht.displayName=_e.displayName;var Pr=Tt(ct),vt=d.forwardRef((n,i)=>{let e=(0,ne.c)(21),t,r,a,o;e[0]===n?(t=e[1],r=e[2],a=e[3],o=e[4]):({className:r,children:t,position:o,...a}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=a,e[4]=o);let l=o===void 0?"popper":o,s=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",u;e[5]!==r||e[6]!==s?(u=Z("max-h-[300px] relative z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s,r),e[5]=r,e[6]=s,e[7]=u):u=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=(0,c.jsx)(br,{className:"flex items-center justify-center h-[20px] bg-background text-muted-foreground cursor-default",children:(0,c.jsx)(_t,{className:"h-4 w-4"})}),e[8]=m):m=e[8];let v=l==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)",x;e[9]===v?x=e[10]:(x=Z("p-1",v),e[9]=v,e[10]=x);let b;e[11]!==t||e[12]!==x?(b=(0,c.jsx)(gr,{className:x,children:t}),e[11]=t,e[12]=x,e[13]=b):b=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=(0,c.jsx)(Sr,{className:"flex items-center justify-center h-[20px] bg-background text-muted-foreground cursor-default",children:(0,c.jsx)(ke,{className:"h-4 w-4 opacity-50"})}),e[14]=S):S=e[14];let p;return e[15]!==l||e[16]!==a||e[17]!==i||e[18]!==u||e[19]!==b?(p=(0,c.jsx)(_r,{children:(0,c.jsx)(Ht,{children:(0,c.jsxs)(Pr,{ref:i,className:u,position:l,...a,children:[m,b,S]})})}),e[15]=l,e[16]=a,e[17]=i,e[18]=u,e[19]=b,e[20]=p):p=e[20],p});vt.displayName=ct.displayName;var gt=d.forwardRef((n,i)=>{let e=(0,ne.c)(9),t,r;e[0]===n?(t=e[1],r=e[2]):({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r);let a;e[3]===t?a=e[4]:(a=Z("px-2 py-1.5 text-sm font-semibold",t),e[3]=t,e[4]=a);let o;return e[5]!==r||e[6]!==i||e[7]!==a?(o=(0,c.jsx)(ut,{ref:i,className:a,...r}),e[5]=r,e[6]=i,e[7]=a,e[8]=o):o=e[8],o});gt.displayName=ut.displayName;var xt=d.forwardRef((n,i)=>{let e=(0,ne.c)(17),t,r,a,o;e[0]===n?(t=e[1],r=e[2],a=e[3],o=e[4]):({className:r,children:t,subtitle:o,...a}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=a,e[4]=o);let l;e[5]===r?l=e[6]:(l=Z("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground",qt,r),e[5]=r,e[6]=l);let s;e[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,c.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,c.jsx)(yr,{children:(0,c.jsx)(Nt,{className:"h-3 w-3"})})}),e[7]=s):s=e[7];let u=typeof t=="string"?void 0:!0,m;e[8]!==t||e[9]!==u?(m=(0,c.jsx)(wr,{asChild:u,className:"flex w-full flex-1",children:t}),e[8]=t,e[9]=u,e[10]=m):m=e[10];let v;return e[11]!==a||e[12]!==i||e[13]!==o||e[14]!==l||e[15]!==m?(v=(0,c.jsxs)(pt,{ref:i,className:l,...a,children:[s,m,o]}),e[11]=a,e[12]=i,e[13]=o,e[14]=l,e[15]=m,e[16]=v):v=e[16],v});xt.displayName=pt.displayName;var wt=d.forwardRef((n,i)=>{let e=(0,ne.c)(9),t,r;e[0]===n?(t=e[1],r=e[2]):({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r);let a;e[3]===t?a=e[4]:(a=Z("-mx-1 my-1 h-px bg-muted",t),e[3]=t,e[4]=a);let o;return e[5]!==r||e[6]!==i||e[7]!==a?(o=(0,c.jsx)(ft,{ref:i,className:a,...r}),e[5]=r,e[6]=i,e[7]=a,e[8]=o):o=e[8],o});wt.displayName=ft.displayName;export{gt as a,Rr as c,dt as d,_e as f,xt as i,mt as l,De as m,vt as n,wt as o,we as p,Nr as r,ht as s,jr as t,Re as u};

Sorry, the diff of this file is too big to display

import{t as R}from"./chunk-LvLJmgfZ.js";import{d as D}from"./hotkeys-BHHWjLlp.js";import{r as j}from"./constants-B6Cb__3x.js";var Q=R((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=y,t.fromBig=k,t.split=g;var u=BigInt(2**32-1),c=BigInt(32);function k(o,e=!1){return e?{h:Number(o&u),l:Number(o>>c&u)}:{h:Number(o>>c&u)|0,l:Number(o&u)|0}}function g(o,e=!1){let n=o.length,l=new Uint32Array(n),m=new Uint32Array(n);for(let S=0;S<n;S++){let{h:M,l:$}=k(o[S],e);[l[S],m[S]]=[M,$]}return[l,m]}var H=(o,e)=>BigInt(o>>>0)<<c|BigInt(e>>>0);t.toBig=H;var x=(o,e,n)=>o>>>n;t.shrSH=x;var A=(o,e,n)=>o<<32-n|e>>>n;t.shrSL=A;var E=(o,e,n)=>o>>>n|e<<32-n;t.rotrSH=E;var P=(o,e,n)=>o<<32-n|e>>>n;t.rotrSL=P;var I=(o,e,n)=>o<<64-n|e>>>n-32;t.rotrBH=I;var _=(o,e,n)=>o>>>n-32|e<<64-n;t.rotrBL=_;var C=(o,e)=>e;t.rotr32H=C;var F=(o,e)=>o;t.rotr32L=F;var O=(o,e,n)=>o<<n|e>>>32-n;t.rotlSH=O;var B=(o,e,n)=>e<<n|o>>>32-n;t.rotlSL=B;var h=(o,e,n)=>e<<n-32|o>>>64-n;t.rotlBH=h;var w=(o,e,n)=>o<<n-32|e>>>64-n;t.rotlBL=w;function y(o,e,n,l){let m=(e>>>0)+(l>>>0);return{h:o+n+(m/2**32|0)|0,l:m|0}}var p=(o,e,n)=>(o>>>0)+(e>>>0)+(n>>>0);t.add3L=p;var T=(o,e,n,l)=>e+n+l+(o/2**32|0)|0;t.add3H=T;var f=(o,e,n,l)=>(o>>>0)+(e>>>0)+(n>>>0)+(l>>>0);t.add4L=f;var i=(o,e,n,l,m)=>e+n+l+m+(o/2**32|0)|0;t.add4H=i;var a=(o,e,n,l,m)=>(o>>>0)+(e>>>0)+(n>>>0)+(l>>>0)+(m>>>0);t.add5L=a;var d=(o,e,n,l,m,S)=>e+n+l+m+S+(o/2**32|0)|0;t.add5H=d,t.default={fromBig:k,split:g,toBig:H,shrSH:x,shrSL:A,rotrSH:E,rotrSL:P,rotrBH:I,rotrBL:_,rotr32H:C,rotr32L:F,rotlSH:O,rotlSL:B,rotlBH:h,rotlBL:w,add:y,add3L:p,add3H:T,add4L:f,add4H:i,add5H:d,add5L:a}})),Y=R((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0})),Z=R((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=c,t.anumber=k,t.abytes=g,t.ahash=H,t.aexists=x,t.aoutput=A,t.u8=E,t.u32=P,t.clean=I,t.createView=_,t.rotr=C,t.rotl=F,t.byteSwap=O,t.byteSwap32=B,t.bytesToHex=y,t.hexToBytes=f,t.asyncLoop=i,t.utf8ToBytes=a,t.bytesToUtf8=d,t.toBytes=o,t.kdfInputToBytes=e,t.concatBytes=n,t.checkOpts=l,t.createHasher=m,t.createOptHasher=S,t.createXOFer=M,t.randomBytes=$;var u=Y();function c(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function k(r){if(!Number.isSafeInteger(r)||r<0)throw Error("positive integer expected, got "+r)}function g(r,...s){if(!c(r))throw Error("Uint8Array expected");if(s.length>0&&!s.includes(r.length))throw Error("Uint8Array expected of length "+s+", got length="+r.length)}function H(r){if(typeof r!="function"||typeof r.create!="function")throw Error("Hash should be wrapped by utils.createHasher");k(r.outputLen),k(r.blockLen)}function x(r,s=!0){if(r.destroyed)throw Error("Hash instance has been destroyed");if(s&&r.finished)throw Error("Hash#digest() has already been called")}function A(r,s){g(r);let b=s.outputLen;if(r.length<b)throw Error("digestInto() expects output buffer of length at least "+b)}function E(r){return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}function P(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}function I(...r){for(let s=0;s<r.length;s++)r[s].fill(0)}function _(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}function C(r,s){return r<<32-s|r>>>s}function F(r,s){return r<<s|r>>>32-s>>>0}t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function O(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}t.swap8IfBE=t.isLE?r=>r:r=>O(r),t.byteSwapIfBE=t.swap8IfBE;function B(r){for(let s=0;s<r.length;s++)r[s]=O(r[s]);return r}t.swap32IfBE=t.isLE?r=>r:B;var h=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",w=Array.from({length:256},(r,s)=>s.toString(16).padStart(2,"0"));function y(r){if(g(r),h)return r.toHex();let s="";for(let b=0;b<r.length;b++)s+=w[r[b]];return s}var p={_0:48,_9:57,A:65,F:70,a:97,f:102};function T(r){if(r>=p._0&&r<=p._9)return r-p._0;if(r>=p.A&&r<=p.F)return r-(p.A-10);if(r>=p.a&&r<=p.f)return r-(p.a-10)}function f(r){if(typeof r!="string")throw Error("hex string expected, got "+typeof r);if(h)return Uint8Array.fromHex(r);let s=r.length,b=s/2;if(s%2)throw Error("hex string expected, got unpadded hex of length "+s);let L=new Uint8Array(b);for(let v=0,U=0;v<b;v++,U+=2){let X=T(r.charCodeAt(U)),W=T(r.charCodeAt(U+1));if(X===void 0||W===void 0){let J=r[U]+r[U+1];throw Error('hex string expected, got non-hex character "'+J+'" at index '+U)}L[v]=X*16+W}return L}t.nextTick=async()=>{};async function i(r,s,b){let L=Date.now();for(let v=0;v<r;v++){b(v);let U=Date.now()-L;U>=0&&U<s||(await(0,t.nextTick)(),L+=U)}}function a(r){if(typeof r!="string")throw Error("string expected");return new Uint8Array(new TextEncoder().encode(r))}function d(r){return new TextDecoder().decode(r)}function o(r){return typeof r=="string"&&(r=a(r)),g(r),r}function e(r){return typeof r=="string"&&(r=a(r)),g(r),r}function n(...r){let s=0;for(let L=0;L<r.length;L++){let v=r[L];g(v),s+=v.length}let b=new Uint8Array(s);for(let L=0,v=0;L<r.length;L++){let U=r[L];b.set(U,v),v+=U.length}return b}function l(r,s){if(s!==void 0&&{}.toString.call(s)!=="[object Object]")throw Error("options should be object or undefined");return Object.assign(r,s)}t.Hash=class{};function m(r){let s=L=>r().update(o(L)).digest(),b=r();return s.outputLen=b.outputLen,s.blockLen=b.blockLen,s.create=()=>r(),s}function S(r){let s=(L,v)=>r(v).update(o(L)).digest(),b=r({});return s.outputLen=b.outputLen,s.blockLen=b.blockLen,s.create=L=>r(L),s}function M(r){let s=(L,v)=>r(v).update(o(L)).digest(),b=r({});return s.outputLen=b.outputLen,s.blockLen=b.blockLen,s.create=L=>r(L),s}t.wrapConstructor=m,t.wrapConstructorWithOpts=S,t.wrapXOFConstructorWithOpts=M;function $(r=32){if(u.crypto&&typeof u.crypto.getRandomValues=="function")return u.crypto.getRandomValues(new Uint8Array(r));if(u.crypto&&typeof u.crypto.randomBytes=="function")return Uint8Array.from(u.crypto.randomBytes(r));throw Error("crypto.getRandomValues must be defined")}})),tt=R((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=w;var u=Q(),c=Z(),k=BigInt(0),g=BigInt(1),H=BigInt(2),x=BigInt(7),A=BigInt(256),E=BigInt(113),P=[],I=[],_=[];for(let f=0,i=g,a=1,d=0;f<24;f++){[a,d]=[d,(2*a+3*d)%5],P.push(2*(5*d+a)),I.push((f+1)*(f+2)/2%64);let o=k;for(let e=0;e<7;e++)i=(i<<g^(i>>x)*E)%A,i&H&&(o^=g<<(g<<BigInt(e))-g);_.push(o)}var C=(0,u.split)(_,!0),F=C[0],O=C[1],B=(f,i,a)=>a>32?(0,u.rotlBH)(f,i,a):(0,u.rotlSH)(f,i,a),h=(f,i,a)=>a>32?(0,u.rotlBL)(f,i,a):(0,u.rotlSL)(f,i,a);function w(f,i=24){let a=new Uint32Array(10);for(let d=24-i;d<24;d++){for(let n=0;n<10;n++)a[n]=f[n]^f[n+10]^f[n+20]^f[n+30]^f[n+40];for(let n=0;n<10;n+=2){let l=(n+8)%10,m=(n+2)%10,S=a[m],M=a[m+1],$=B(S,M,1)^a[l],r=h(S,M,1)^a[l+1];for(let s=0;s<50;s+=10)f[n+s]^=$,f[n+s+1]^=r}let o=f[2],e=f[3];for(let n=0;n<24;n++){let l=I[n],m=B(o,e,l),S=h(o,e,l),M=P[n];o=f[M],e=f[M+1],f[M]=m,f[M+1]=S}for(let n=0;n<50;n+=10){for(let l=0;l<10;l++)a[l]=f[n+l];for(let l=0;l<10;l++)f[n+l]^=~a[(l+2)%10]&a[(l+4)%10]}f[0]^=F[d],f[1]^=O[d]}(0,c.clean)(a)}var y=class G extends c.Hash{constructor(i,a,d,o=!1,e=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=i,this.suffix=a,this.outputLen=d,this.enableXOF=o,this.rounds=e,(0,c.anumber)(d),!(0<i&&i<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,c.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,c.swap32IfBE)(this.state32),w(this.state32,this.rounds),(0,c.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(i){(0,c.aexists)(this),i=(0,c.toBytes)(i),(0,c.abytes)(i);let{blockLen:a,state:d}=this,o=i.length;for(let e=0;e<o;){let n=Math.min(a-this.pos,o-e);for(let l=0;l<n;l++)d[this.pos++]^=i[e++];this.pos===a&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:i,suffix:a,pos:d,blockLen:o}=this;i[d]^=a,a&128&&d===o-1&&this.keccak(),i[o-1]^=128,this.keccak()}writeInto(i){(0,c.aexists)(this,!1),(0,c.abytes)(i),this.finish();let a=this.state,{blockLen:d}=this;for(let o=0,e=i.length;o<e;){this.posOut>=d&&this.keccak();let n=Math.min(d-this.posOut,e-o);i.set(a.subarray(this.posOut,this.posOut+n),o),this.posOut+=n,o+=n}return i}xofInto(i){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(i)}xof(i){return(0,c.anumber)(i),this.xofInto(new Uint8Array(i))}digestInto(i){if((0,c.aoutput)(i,this),this.finished)throw Error("digest() was already called");return this.writeInto(i),this.destroy(),i}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,c.clean)(this.state)}_cloneInto(i){let{blockLen:a,suffix:d,outputLen:o,rounds:e,enableXOF:n}=this;return i||(i=new G(a,d,o,n,e)),i.state32.set(this.state32),i.pos=this.pos,i.posOut=this.posOut,i.finished=this.finished,i.rounds=e,i.suffix=d,i.outputLen=o,i.enableXOF=n,i.destroyed=this.destroyed,i}};t.Keccak=y;var p=(f,i,a)=>(0,c.createHasher)(()=>new y(i,f,a));t.sha3_224=p(6,144,224/8),t.sha3_256=p(6,136,256/8),t.sha3_384=p(6,104,384/8),t.sha3_512=p(6,72,512/8),t.keccak_224=p(1,144,224/8),t.keccak_256=p(1,136,256/8),t.keccak_384=p(1,104,384/8),t.keccak_512=p(1,72,512/8);var T=(f,i,a)=>(0,c.createXOFer)((d={})=>new y(i,f,d.dkLen===void 0?a:d.dkLen,!0));t.shake128=T(31,168,128/8),t.shake256=T(31,136,256/8)})),rt=R(((t,u)=>{var{sha3_512:c}=tt(),k=24,g=32,H=(h=4,w=Math.random)=>{let y="";for(;y.length<h;)y+=Math.floor(w()*36).toString(36);return y};function x(h){let w=0n;for(let y of h.values()){let p=BigInt(y);w=(w<<8n)+p}return w}var A=(h="")=>x(c(h)).toString(36).slice(1),E=Array.from({length:26},(h,w)=>String.fromCharCode(w+97)),P=h=>E[Math.floor(h()*E.length)],I=({globalObj:h=typeof global<"u"?global:typeof window<"u"?window:{},random:w=Math.random}={})=>{let y=Object.keys(h).toString();return A(y.length?y+H(g,w):H(g,w)).substring(0,g)},_=h=>()=>h++,C=476782367,F=({random:h=Math.random,counter:w=_(Math.floor(h()*C)),length:y=k,fingerprint:p=I({random:h})}={})=>function(){let T=P(h),f=Date.now().toString(36),i=w().toString(36);return`${T+A(`${f+H(y,h)+i+p}`).substring(1,y)}`},O=F(),B=(h,{minLength:w=2,maxLength:y=g}={})=>{let p=h.length,T=/^[0-9a-z]+$/;return!!(typeof h=="string"&&p>=w&&p<=y&&T.test(h))};u.exports.getConstants=()=>({defaultLength:k,bigLength:g}),u.exports.init=F,u.exports.createId=O,u.exports.bufToBigInt=x,u.exports.createCounter=_,u.exports.createFingerprint=I,u.exports.isCuid=B})),N=R(((t,u)=>{var{createId:c,init:k,getConstants:g,isCuid:H}=rt();u.exports.createId=c,u.exports.init=k,u.exports.getConstants=g,u.exports.isCuid=H}));function V(t){return new URL(t,document.baseURI)}function z(t){let u=new URL(window.location.href);t(u.searchParams),window.history.replaceState({},"",u.toString())}function nt(t,u){if(typeof window>"u")return!1;let c=new URLSearchParams(window.location.search);return u===void 0?c.has(t):c.get(t)===u}function ot(){return V(`?file=${`__new__${K()}`}`).toString()}var et=/^(https?:\/\/\S+)$/;function it(t){return typeof t=="string"&&et.test(t)}function st({href:t,queryParams:u,keys:c}){let k=typeof u=="string"?new URLSearchParams(u):u;if(k.size===0||t.startsWith("http://")||t.startsWith("https://"))return t;let g=t.startsWith("#"),H=g&&t.includes("?");if(g&&!H){let B=c?[...k.entries()].filter(([y])=>c.includes(y)):[...k.entries()],h=new URLSearchParams;for(let[y,p]of B)h.set(y,p);let w=h.toString();return w?`/?${w}${t}`:t}let x=t,A="",E=new URLSearchParams,P=g?1:0,I=t.indexOf("#",P);I!==-1&&(A=t.slice(I),x=t.slice(0,I));let _=x.indexOf("?");_!==-1&&(E=new URLSearchParams(x.slice(_+1)),x=x.slice(0,_));let C=new URLSearchParams(E),F=c?[...k.entries()].filter(([B])=>c.includes(B)):[...k.entries()];for(let[B,h]of F)C.set(B,h);let O=C.toString();return O?`${x}?${O}${A}`:t}var at=(0,N().init)({length:6});function K(){return`s_${at()}`}function q(t){return t?/^s_[\da-z]{6}$/.test(t):!1}var ut=(()=>{let t=new URL(window.location.href).searchParams.get(j.sessionId);return q(t)?(z(u=>{u.has(j.kiosk)||u.delete(j.sessionId)}),D.debug("Connecting to existing session",{sessionId:t}),t):(D.debug("Starting a new session",{sessionId:t}),K())})();function ft(){return ut}export{it as a,V as c,nt as i,N as l,q as n,ot as o,st as r,z as s,ft as t};
import{s as oe}from"./chunk-LvLJmgfZ.js";import{d as ce,i as Ve,l as Ee,p as me,u as X}from"./useEvent-BhXAndur.js";import{t as Pe}from"./react-Bj1aDYRI.js";import{Bn as Oe,Dt as Ue,Et as ze,Mn as Re,Pn as Ae,Qt as ie,Un as Ge,Wn as le,Xr as We,_n as Ke,a as Xe,ar as de,bt as He,cr as Je,dr as he,f as ue,fr as xe,ft as Qe,gn as Ye,hr as pe,ir as fe,j as Ze,jn as ea,k as aa,mr as ta,or as be,sr as sa,tr as la,w as na,yn as ge}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as ne}from"./compiler-runtime-B3qBwwSJ.js";import{n as ra}from"./assertNever-CBU83Y6o.js";import{t as je}from"./add-database-form-DvnhmpaG.js";import"./tooltip-DxKBXCGp.js";import{t as H}from"./sortBy-CGfmqUg5.js";import{o as oa}from"./utils-YqBXNpsM.js";import{t as ca}from"./ErrorBoundary-B9Ifj8Jf.js";import{t as ma}from"./jsx-runtime-ZmTK25f3.js";import{r as ia,t as J}from"./button-CZ3Cs4qb.js";import{t as q}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import{B as da,I as Ne,L as ha,R as ua,k as re,z as xa}from"./JsonOutput-PE5ko4gi.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{r as pa}from"./requests-B4FYHTZl.js";import{t as fa}from"./createLucideIcon-BCdY6lG5.js";import{t as ba}from"./x-ZP5cObgf.js";import"./download-os8QlW6l.js";import"./markdown-renderer-DJy8ww5d.js";import{t as ye}from"./plus-B7DF33lD.js";import{t as ga}from"./refresh-cw-Dx8TEWFP.js";import{a as ja}from"./input-DUrq2DiR.js";import{c as ve,d as we,f as Se,l as ae,n as Na,o as ya,p as va,u as _e}from"./column-preview-CXjSXUhP.js";import{t as wa}from"./workflow-BphwJiK3.js";import{t as Sa}from"./badge-DX6CQ6PA.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import"./Combination-BAEdC-rz.js";import{t as te}from"./tooltip-CMQz28hC.js";import"./dates-CrvjILe3.js";import{t as _a}from"./context-BfYAMNLF.js";import"./popover-CH1FzjxU.js";import"./vega-loader.browser-DXARUlxo.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{t as Ca}from"./copy-icon-v8ME_JKB.js";import"./purify.es-DZrAQFIu.js";import{a as Ce,i as ke,n as ka,r as $e}from"./multi-map-DxdLNTBd.js";import{t as Fe}from"./cell-link-B9b7J8QK.js";import{n as Te}from"./useAsyncData-BMGLSTg8.js";import{a as $a,o as se,t as Fa,u as Ta}from"./command-2ElA5IkO.js";import"./chunk-5FQGJX7Z-DPlx2kjA.js";import"./katex-CDLTCvjQ.js";import{r as Ia}from"./html-to-image-CIQqSu-S.js";import{o as La}from"./focus-C1YokgL7.js";import{a as qa,i as Ba,n as Da,o as Ie,r as Ma,t as Va}from"./table-DScsXgJW.js";import{n as Ea}from"./icons-CCHmxi8d.js";import{t as Le}from"./useAddCell-CmuX2hOk.js";import{t as Pa}from"./empty-state-B8Cxr9nj.js";import{n as Oa,t as Ua}from"./common-DSlhalAu.js";var za=fa("square-equal",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}]]),_=oe(Pe(),1),Ra=ne(),t=oe(ma(),1);const Aa=a=>{let e=(0,Ra.c)(8),{variableName:s,className:l}=a,r;e[0]===s?r=e[1]:(r=()=>{let g=Ga(s);if(!g)return;let N=ue(g);N&&ie(N,s)},e[0]=s,e[1]=r);let o=r,n;e[2]===l?n=e[3]:(n=q("text-link opacity-80 hover:opacity-100 hover:underline",l),e[2]=l,e[3]=n);let b;return e[4]!==o||e[5]!==n||e[6]!==s?(b=(0,t.jsx)("button",{type:"button",onClick:o,className:n,children:s}),e[4]=o,e[5]=n,e[6]=s,e[7]=b):b=e[7],b};function Ga(a){let e=Ve.get(ge)[a];if(e)return e.declaredBy[0]}var R=ne(),C={engineEmpty:"pl-3",engine:"pl-3 pr-2",database:"pl-4",schemaEmpty:"pl-8",schema:"pl-7",tableLoading:"pl-11",tableSchemaless:"pl-8",tableWithSchema:"pl-12",columnLocal:"pl-5",columnSql:"pl-13",columnPreview:"pl-10"},Wa=me(a=>{let e=a(be),s=a(ge),l=a(Xe);return H(e,r=>{if(!r.variable_name)return-1;let o=Object.values(s).find(b=>b.name===r.variable_name);if(!o)return 0;let n=l.inOrderIds.indexOf(o.declaredBy[0]);return n===-1?0:n})});const qe=me(a=>{let e=new Map(a(la));for(let s of pe){let l=e.get(s);l&&(l.databases.length===0&&e.delete(s),l.databases.length===1&&l.databases[0].name==="memory"&&l.databases[0].schemas.length===0&&e.delete(s))}return H([...e.values()],s=>pe.has(s.name)?1:0)}),Ka=()=>{let a=(0,R.c)(32),[e,s]=_.useState(""),l=ce(de),r=X(Wa),o=X(qe);if(r.length===0&&o.length===0){let p;return a[0]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(Pa,{title:"No tables found",description:"Any datasets/dataframes in the global scope will be shown here.",action:(0,t.jsx)(je,{children:(0,t.jsxs)(J,{variant:"outline",size:"sm",children:["Add database or catalog",(0,t.jsx)(ye,{className:"h-4 w-4 ml-2"})]})}),icon:(0,t.jsx)(le,{})}),a[0]=p):p=a[0],p}let n=!!e.trim(),b;a[1]===l?b=a[2]:(b=p=>{l(p.length>0),s(p)},a[1]=l,a[2]=b);let g;a[3]!==e||a[4]!==b?(g=(0,t.jsx)($a,{placeholder:"Search tables...",className:"h-6 m-1",value:e,onValueChange:b,rootClassName:"flex-1 border-r border-b-0"}),a[3]=e,a[4]=b,a[5]=g):g=a[5];let N;a[6]===n?N=a[7]:(N=n&&(0,t.jsx)("button",{type:"button",className:"float-right border-b px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",onClick:()=>s(""),children:(0,t.jsx)(ba,{className:"h-4 w-4"})}),a[6]=n,a[7]=N);let j;a[8]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsx)(je,{children:(0,t.jsx)(J,{variant:"ghost",size:"sm",className:"px-2 rounded-none focus-visible:outline-hidden",children:(0,t.jsx)(ye,{className:"h-4 w-4"})})}),a[8]=j):j=a[8];let i;a[9]!==g||a[10]!==N?(i=(0,t.jsxs)("div",{className:"flex items-center w-full border-b",children:[g,N,j]}),a[9]=g,a[10]=N,a[11]=i):i=a[11];let c;if(a[12]!==o||a[13]!==n||a[14]!==e){let p;a[16]!==n||a[17]!==e?(p=u=>(0,t.jsx)(Xa,{connection:u,hasChildren:u.databases.length>0,children:u.databases.map(f=>(0,t.jsx)(Ha,{engineName:u.name,database:f,hasSearch:n,children:(0,t.jsx)(Ja,{schemas:f.schemas,defaultSchema:u.default_schema,defaultDatabase:u.default_database,engineName:u.name,databaseName:f.name,hasSearch:n,searchValue:e,dialect:u.dialect})},f.name))},u.name),a[16]=n,a[17]=e,a[18]=p):p=a[18],c=o.map(p),a[12]=o,a[13]=n,a[14]=e,a[15]=c}else c=a[15];let d;a[19]!==o.length||a[20]!==r.length?(d=o.length>0&&r.length>0&&(0,t.jsxs)(ve,{className:C.engine,children:[(0,t.jsx)(Ea,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs",children:"Python"})]}),a[19]=o.length,a[20]=r.length,a[21]=d):d=a[21];let x;a[22]!==e||a[23]!==r?(x=r.length>0&&(0,t.jsx)(Be,{tables:r,searchValue:e}),a[22]=e,a[23]=r,a[24]=x):x=a[24];let h;a[25]!==c||a[26]!==d||a[27]!==x?(h=(0,t.jsxs)(Ta,{className:"flex flex-col",children:[c,d,x]}),a[25]=c,a[26]=d,a[27]=x,a[28]=h):h=a[28];let m;return a[29]!==i||a[30]!==h?(m=(0,t.jsxs)(Fa,{className:"border-b bg-background rounded-none h-full pb-10 overflow-auto outline-hidden",shouldFilter:!1,children:[i,h]}),a[29]=i,a[30]=h,a[31]=m):m=a[31],m};var Xa=a=>{let e=(0,R.c)(26),{connection:s,children:l,hasChildren:r}=a,o=s.name===ta,n=o?"In-Memory":s.name,{previewDataSourceConnection:b}=pa(),[g,N]=_.useState(!1),j;e[0]!==s.name||e[1]!==b?(j=async()=>{N(!0),await b({engine:s.name}),setTimeout(()=>N(!1),500)},e[0]=s.name,e[1]=b,e[2]=j):j=e[2];let i=j,c;e[3]===s.dialect?c=e[4]:(c=(0,t.jsx)(Qe,{className:"h-4 w-4 text-muted-foreground",name:s.dialect}),e[3]=s.dialect,e[4]=c);let d;e[5]===s.dialect?d=e[6]:(d=ea(s.dialect),e[5]=s.dialect,e[6]=d);let x;e[7]===d?x=e[8]:(x=(0,t.jsx)("span",{className:"text-xs",children:d}),e[7]=d,e[8]=x);let h=n,m;e[9]===h?m=e[10]:(m=(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",(0,t.jsx)(Aa,{variableName:h}),")"]}),e[9]=h,e[10]=m);let p;e[11]!==i||e[12]!==o||e[13]!==g?(p=!o&&(0,t.jsx)(te,{content:"Refresh connection",children:(0,t.jsx)(J,{variant:"ghost",size:"icon",className:"ml-auto hover:bg-transparent hover:shadow-none",onClick:i,children:(0,t.jsx)(ga,{className:q("h-4 w-4 text-muted-foreground hover:text-foreground",g&&"animate-[spin_0.5s]")})})}),e[11]=i,e[12]=o,e[13]=g,e[14]=p):p=e[14];let u;e[15]!==c||e[16]!==x||e[17]!==m||e[18]!==p?(u=(0,t.jsxs)(ve,{className:C.engine,children:[c,x,m,p]}),e[15]=c,e[16]=x,e[17]=m,e[18]=p,e[19]=u):u=e[19];let f;e[20]!==l||e[21]!==r?(f=r?l:(0,t.jsx)(ae,{content:"No databases available",className:C.engineEmpty}),e[20]=l,e[21]=r,e[22]=f):f=e[22];let y;return e[23]!==u||e[24]!==f?(y=(0,t.jsxs)(t.Fragment,{children:[u,f]}),e[23]=u,e[24]=f,e[25]=y):y=e[25],y},Ha=a=>{let e=(0,R.c)(26),{hasSearch:s,engineName:l,database:r,children:o}=a,[n,b]=_.useState(!1),[g,N]=_.useState(!1),[j,i]=_.useState(s);j!==s&&(i(s),b(s));let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=q("text-sm flex flex-row gap-1 items-center cursor-pointer rounded-none",C.database),e[0]=c):c=e[0];let d;e[1]!==n||e[2]!==g?(d=()=>{b(!n),N(!g)},e[1]=n,e[2]=g,e[3]=d):d=e[3];let x=`${l}:${r.name}`,h;e[4]===n?h=e[5]:(h=(0,t.jsx)(Se,{isExpanded:n}),e[4]=n,e[5]=h);let m=g&&n?"text-foreground":"text-muted-foreground",p;e[6]===m?p=e[7]:(p=q("h-4 w-4",m),e[6]=m,e[7]=p);let u;e[8]===p?u=e[9]:(u=(0,t.jsx)(le,{className:p}),e[8]=p,e[9]=u);let f=g&&n&&"font-semibold",y;e[10]===f?y=e[11]:(y=q(f),e[10]=f,e[11]=y);let v;e[12]===r.name?v=e[13]:(v=r.name===""?(0,t.jsx)("i",{children:"Not connected"}):r.name,e[12]=r.name,e[13]=v);let w;e[14]!==v||e[15]!==y?(w=(0,t.jsx)("span",{className:y,children:v}),e[14]=v,e[15]=y,e[16]=w):w=e[16];let S;e[17]!==w||e[18]!==d||e[19]!==x||e[20]!==h||e[21]!==u?(S=(0,t.jsxs)(se,{className:c,onSelect:d,value:x,children:[h,u,w]}),e[17]=w,e[18]=d,e[19]=x,e[20]=h,e[21]=u,e[22]=S):S=e[22];let L=n&&o,k;return e[23]!==S||e[24]!==L?(k=(0,t.jsxs)(t.Fragment,{children:[S,L]}),e[23]=S,e[24]=L,e[25]=k):k=e[25],k},Ja=a=>{let e=(0,R.c)(22),{schemas:s,defaultSchema:l,defaultDatabase:r,dialect:o,engineName:n,databaseName:b,hasSearch:g,searchValue:N}=a;if(s.length===0){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(ae,{content:"No schemas available",className:C.schemaEmpty}),e[0]=c):c=e[0],c}let j;if(e[1]!==b||e[2]!==r||e[3]!==l||e[4]!==o||e[5]!==n||e[6]!==g||e[7]!==s||e[8]!==N){let c;e[10]===N?c=e[11]:(c=h=>N?h.tables.some(m=>m.name.toLowerCase().includes(N.toLowerCase())):!0,e[10]=N,e[11]=c);let d=s.filter(c),x;e[12]!==b||e[13]!==r||e[14]!==l||e[15]!==o||e[16]!==n||e[17]!==g||e[18]!==N?(x=h=>(0,t.jsx)(Qa,{databaseName:b,schema:h,hasSearch:g,children:(0,t.jsx)(Be,{tables:h.tables,searchValue:N,sqlTableContext:{engine:n,database:b,schema:h.name,defaultSchema:l,defaultDatabase:r,dialect:o}})},h.name),e[12]=b,e[13]=r,e[14]=l,e[15]=o,e[16]=n,e[17]=g,e[18]=N,e[19]=x):x=e[19],j=d.map(x),e[1]=b,e[2]=r,e[3]=l,e[4]=o,e[5]=n,e[6]=g,e[7]=s,e[8]=N,e[9]=j}else j=e[9];let i;return e[20]===j?i=e[21]:(i=(0,t.jsx)(t.Fragment,{children:j}),e[20]=j,e[21]=i),i},Qa=a=>{let e=(0,R.c)(24),{databaseName:s,schema:l,children:r,hasSearch:o}=a,[n,b]=_.useState(o),[g,N]=_.useState(!1),j=`${s}:${l.name}`;if(he(l.name))return r;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=q("text-sm flex flex-row gap-1 items-center cursor-pointer rounded-none",C.schema),e[0]=i):i=e[0];let c;e[1]!==n||e[2]!==g?(c=()=>{b(!n),N(!g)},e[1]=n,e[2]=g,e[3]=c):c=e[3];let d;e[4]===n?d=e[5]:(d=(0,t.jsx)(Se,{isExpanded:n}),e[4]=n,e[5]=d);let x=g&&n&&"text-foreground",h;e[6]===x?h=e[7]:(h=q("h-4 w-4 text-muted-foreground",x),e[6]=x,e[7]=h);let m;e[8]===h?m=e[9]:(m=(0,t.jsx)(Oe,{className:h}),e[8]=h,e[9]=m);let p=g&&n&&"font-semibold",u;e[10]===p?u=e[11]:(u=q(p),e[10]=p,e[11]=u);let f;e[12]!==l.name||e[13]!==u?(f=(0,t.jsx)("span",{className:u,children:l.name}),e[12]=l.name,e[13]=u,e[14]=f):f=e[14];let y;e[15]!==c||e[16]!==d||e[17]!==m||e[18]!==f||e[19]!==j?(y=(0,t.jsxs)(se,{className:i,onSelect:c,value:j,children:[d,m,f]}),e[15]=c,e[16]=d,e[17]=m,e[18]=f,e[19]=j,e[20]=y):y=e[20];let v=n&&r,w;return e[21]!==y||e[22]!==v?(w=(0,t.jsxs)(t.Fragment,{children:[y,v]}),e[21]=y,e[22]=v,e[23]=w):w=e[23],w},Be=a=>{let e=(0,R.c)(24),{tables:s,sqlTableContext:l,searchValue:r}=a,{addTableList:o}=fe(),[n,b]=_.useState(!1),[g,N]=_.useState(!1),j;e[0]!==o||e[1]!==l||e[2]!==s.length||e[3]!==n?(j=async()=>{if(s.length===0&&l&&!n){b(!0),N(!0);let{engine:m,database:p,schema:u}=l,f=await Ue.request({engine:m,database:p,schema:u});if(!(f!=null&&f.tables))throw N(!1),Error("No tables available");o({tables:f.tables,sqlTableContext:l}),N(!1)}},e[0]=o,e[1]=l,e[2]=s.length,e[3]=n,e[4]=j):j=e[4];let i;e[5]!==l||e[6]!==s.length||e[7]!==n?(i=[s.length,l,n],e[5]=l,e[6]=s.length,e[7]=n,e[8]=i):i=e[8];let{isPending:c,error:d}=Te(j,i);if(c||g){let m;return e[9]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(we,{message:"Loading tables...",className:C.tableLoading}),e[9]=m):m=e[9],m}if(d){let m;return e[10]===d?m=e[11]:(m=(0,t.jsx)(_e,{error:d,className:C.tableLoading}),e[10]=d,e[11]=m),m}if(s.length===0){let m;return e[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(ae,{content:"No tables found",className:C.tableLoading}),e[12]=m):m=e[12],m}let x;if(e[13]!==r||e[14]!==l||e[15]!==s){let m;e[17]===r?m=e[18]:(m=f=>r?f.name.toLowerCase().includes(r.toLowerCase()):!0,e[17]=r,e[18]=m);let p=s.filter(m),u;e[19]!==r||e[20]!==l?(u=f=>(0,t.jsx)(Ya,{table:f,sqlTableContext:l,isSearching:!!r},f.name),e[19]=r,e[20]=l,e[21]=u):u=e[21],x=p.map(u),e[13]=r,e[14]=l,e[15]=s,e[16]=x}else x=e[16];let h;return e[22]===x?h=e[23]:(h=(0,t.jsx)(t.Fragment,{children:x}),e[22]=x,e[23]=h),h},Ya=a=>{let e=(0,R.c)(64),{table:s,sqlTableContext:l,isSearching:r}=a,{addTable:o}=fe(),[n,b]=_.useState(!1),[g,N]=_.useState(!1),j=s.columns.length>0,i;e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==s.name||e[4]!==j||e[5]!==g?(i=async()=>{if(n&&!j&&l&&!g){N(!0);let{engine:M,database:Z,schema:Me}=l,ee=await ze.request({engine:M,database:Z,schema:Me,tableName:s.name});if(!(ee!=null&&ee.table))throw Error("No table details available");o({table:ee.table,sqlTableContext:l})}},e[0]=o,e[1]=n,e[2]=l,e[3]=s.name,e[4]=j,e[5]=g,e[6]=i):i=e[6];let c;e[7]!==n||e[8]!==j?(c=[n,j],e[7]=n,e[8]=j,e[9]=c):c=e[9];let{isFetching:d,isPending:x,error:h}=Te(i,c),m=X(oa),p=La(),{createNewCell:u}=na(),f=Le(),y;e[10]!==f||e[11]!==m||e[12]!==u||e[13]!==p||e[14]!==l||e[15]!==s?(y=()=>{Ia({autoInstantiate:m,createNewCell:u,fromCellId:p}),f((()=>{if(s.source_type==="catalog"){let M=l!=null&&l.database?`${l.database}.${s.name}`:s.name;return`${s.engine}.load_table("${M}")`}if(l)return xe({table:s,columnName:"*",sqlTableContext:l});switch(s.source_type){case"local":return`mo.ui.table(${s.name})`;case"duckdb":case"connection":return xe({table:s,columnName:"*",sqlTableContext:l});default:return ra(s.source_type),""}})())},e[10]=f,e[11]=m,e[12]=u,e[13]=p,e[14]=l,e[15]=s,e[16]=y):y=e[16];let v=y,w;e[17]!==s.num_columns||e[18]!==s.num_rows?(w=()=>{let M=[];return s.num_rows!=null&&M.push(`${s.num_rows} rows`),s.num_columns!=null&&M.push(`${s.num_columns} columns`),M.length===0?null:(0,t.jsx)("div",{className:"flex flex-row gap-2 items-center pl-6 group-hover:hidden",children:(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:M.join(", ")})})},e[17]=s.num_columns,e[18]=s.num_rows,e[19]=w):w=e[19];let S=w,L;e[20]!==h||e[21]!==d||e[22]!==x||e[23]!==l||e[24]!==s?(L=()=>{if(x||d)return(0,t.jsx)(we,{message:"Loading columns...",className:C.tableLoading});if(h)return(0,t.jsx)(_e,{error:h,className:C.tableLoading});let M=s.columns;return M.length===0?(0,t.jsx)(ae,{content:"No columns found",className:C.tableLoading}):M.map(Z=>(0,t.jsx)(Za,{table:s,column:Z,sqlTableContext:l},Z.name))},e[20]=h,e[21]=d,e[22]=x,e[23]=l,e[24]=s,e[25]=L):L=e[25];let k=L,B;e[26]!==n||e[27]!==r||e[28]!==s.source_type||e[29]!==s.type?(B=()=>{if(s.source_type!=="local")return(0,t.jsx)(s.type==="table"?Ae:Ge,{className:"h-3 w-3",strokeWidth:n||r?2.5:void 0})},e[26]=n,e[27]=r,e[28]=s.source_type,e[29]=s.type,e[30]=B):B=e[30];let V=B,E=l?`${l.database}.${l.schema}.${s.name}`:s.name,P=l&&(he(l.schema)?C.tableSchemaless:C.tableWithSchema),O=(n||r)&&"font-semibold",$;e[31]!==P||e[32]!==O?($=q("rounded-none group h-8 cursor-pointer",P,O),e[31]=P,e[32]=O,e[33]=$):$=e[33];let F;e[34]===n?F=e[35]:(F=()=>b(!n),e[34]=n,e[35]=F);let T;e[36]===V?T=e[37]:(T=V(),e[36]=V,e[37]=T);let D;e[38]===s.name?D=e[39]:(D=(0,t.jsx)("span",{className:"text-sm",children:s.name}),e[38]=s.name,e[39]=D);let U;e[40]!==T||e[41]!==D?(U=(0,t.jsxs)("div",{className:"flex gap-2 items-center flex-1 pl-1",children:[T,D]}),e[40]=T,e[41]=D,e[42]=U):U=e[42];let z;e[43]===S?z=e[44]:(z=S(),e[43]=S,e[44]=z);let I;e[45]===v?I=e[46]:(I=ia.stopPropagation(()=>v()),e[45]=v,e[46]=I);let Q;e[47]===Symbol.for("react.memo_cache_sentinel")?(Q=(0,t.jsx)(va,{className:"h-3 w-3"}),e[47]=Q):Q=e[47];let G;e[48]===I?G=e[49]:(G=(0,t.jsx)(te,{content:"Add table to notebook",delayDuration:400,children:(0,t.jsx)(J,{className:"group-hover:inline-flex hidden",variant:"text",size:"icon",onClick:I,children:Q})}),e[48]=I,e[49]=G);let W;e[50]!==n||e[51]!==F||e[52]!==U||e[53]!==z||e[54]!==G||e[55]!==$||e[56]!==E?(W=(0,t.jsxs)(se,{className:$,value:E,"aria-selected":n,forceMount:!0,onSelect:F,children:[U,z,G]}),e[50]=n,e[51]=F,e[52]=U,e[53]=z,e[54]=G,e[55]=$,e[56]=E,e[57]=W):W=e[57];let K;e[58]!==n||e[59]!==k?(K=n&&k(),e[58]=n,e[59]=k,e[60]=K):K=e[60];let Y;return e[61]!==W||e[62]!==K?(Y=(0,t.jsxs)(t.Fragment,{children:[W,K]}),e[61]=W,e[62]=K,e[63]=Y):Y=e[63],Y},Za=a=>{var U,z;let e=(0,R.c)(48),{table:s,column:l,sqlTableContext:r}=a,[o,n]=_.useState(!1),b=X(de),g=ce(sa);b&&o&&n(!1),g(o?I=>new Set([...I,`${s.name}:${l.name}`]):I=>(I.delete(`${s.name}:${l.name}`),new Set(I)));let N=Le(),{columnsPreviews:j}=Je(),i;e[0]!==l.name||e[1]!==s.primary_keys?(i=((U=s.primary_keys)==null?void 0:U.includes(l.name))||!1,e[0]=l.name,e[1]=s.primary_keys,e[2]=i):i=e[2];let c=i,d;e[3]!==l.name||e[4]!==s.indexes?(d=((z=s.indexes)==null?void 0:z.includes(l.name))||!1,e[3]=l.name,e[4]=s.indexes,e[5]=d):d=e[5];let x=d,h;e[6]===N?h=e[7]:(h=I=>{N(I)},e[6]=N,e[7]=h);let m=h,p=et,u=o?"font-semibold":"",f;e[8]!==l.name||e[9]!==u?(f=(0,t.jsx)("span",{className:u,children:l.name}),e[8]=l.name,e[9]=u,e[10]=f):f=e[10];let y=f,v=`${s.name}.${l.name}`,w=`${s.name}.${l.name}`,S;e[11]===o?S=e[12]:(S=()=>n(!o),e[11]=o,e[12]=S);let L=r?C.columnSql:C.columnLocal,k;e[13]===L?k=e[14]:(k=q("flex flex-row gap-2 items-center flex-1",L),e[13]=L,e[14]=k);let B;e[15]!==l.type||e[16]!==y?(B=(0,t.jsx)(ya,{columnName:y,dataType:l.type}),e[15]=l.type,e[16]=y,e[17]=B):B=e[17];let V;e[18]===c?V=e[19]:(V=c&&p({tooltipContent:"Primary key",content:"PK"}),e[18]=c,e[19]=V);let E;e[20]===x?E=e[21]:(E=x&&p({tooltipContent:"Indexed",content:"IDX"}),e[20]=x,e[21]=E);let P;e[22]!==k||e[23]!==B||e[24]!==V||e[25]!==E?(P=(0,t.jsxs)("div",{className:k,children:[B,V,E]}),e[22]=k,e[23]=B,e[24]=V,e[25]=E,e[26]=P):P=e[26];let O;e[27]===l.name?O=e[28]:(O=(0,t.jsx)(te,{content:"Copy column name",delayDuration:400,children:(0,t.jsx)(J,{variant:"text",size:"icon",className:"group-hover:opacity-100 opacity-0 hover:bg-muted text-muted-foreground hover:text-foreground",children:(0,t.jsx)(Ca,{tooltip:!1,value:l.name,className:"h-3 w-3"})})}),e[27]=l.name,e[28]=O);let $;e[29]===l.external_type?$=e[30]:($=(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l.external_type}),e[29]=l.external_type,e[30]=$);let F;e[31]!==P||e[32]!==O||e[33]!==$||e[34]!==v||e[35]!==w||e[36]!==S?(F=(0,t.jsxs)(se,{className:"rounded-none py-1 group cursor-pointer",value:w,onSelect:S,children:[P,O,$]},v),e[31]=P,e[32]=O,e[33]=$,e[34]=v,e[35]=w,e[36]=S,e[37]=F):F=e[37];let T;e[38]!==l||e[39]!==j||e[40]!==m||e[41]!==o||e[42]!==r||e[43]!==s?(T=o&&(0,t.jsx)("div",{className:q(C.columnPreview,"pr-2 py-2 bg-(--slate-1) shadow-inner border-b"),children:(0,t.jsx)(ca,{children:(0,t.jsx)(Na,{table:s,column:l,onAddColumnChart:m,preview:j.get(r?`${r.database}.${r.schema}.${s.name}:${l.name}`:`${s.name}:${l.name}`),sqlTableContext:r})})}),e[38]=l,e[39]=j,e[40]=m,e[41]=o,e[42]=r,e[43]=s,e[44]=T):T=e[44];let D;return e[45]!==F||e[46]!==T?(D=(0,t.jsxs)(t.Fragment,{children:[F,T]}),e[45]=F,e[46]=T,e[47]=D):D=e[47],D};function et(a){let{tooltipContent:e,content:s}=a;return(0,t.jsx)(te,{content:e,delayDuration:100,children:(0,t.jsx)("span",{className:"text-xs text-black bg-gray-100 dark:invert rounded px-1",children:s})})}function us(a){return a}var A={name:"name",type:"type-value",defs:"defs-refs"},at=[{id:A.name,accessorFn:a=>[a.name,a.declaredBy],enableSorting:!0,sortingFn:"alphanumeric",header:({column:a})=>(0,t.jsx)(re,{header:"Name",column:a}),cell:({getValue:a})=>{let[e,s]=a();return(0,t.jsx)(Ua,{name:e,declaredBy:s})}},{id:A.type,accessorFn:a=>[a.dataType,a.value],enableSorting:!0,sortingFn:"alphanumeric",header:({column:a})=>(0,t.jsx)(re,{header:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{children:"Type"}),(0,t.jsx)("span",{children:"Value"})]}),column:a}),cell:({getValue:a})=>{let[e,s]=a();return(0,t.jsxs)("div",{className:"max-w-[150px]",children:[(0,t.jsx)("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap text-muted-foreground font-mono text-xs",children:e}),(0,t.jsx)("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap",title:s??"",children:s})]})}},{id:A.defs,accessorFn:a=>[a.declaredBy,a.usedBy,a.name,a.declaredByNames,a.usedByNames],enableSorting:!0,sortingFn:"basic",header:({column:a})=>(0,t.jsx)(re,{header:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{children:"Declared By"}),(0,t.jsx)("span",{children:"Used By"})]}),column:a}),cell:({getValue:a})=>{let[e,s,l]=a(),r=o=>{let n=ue(o);n&&ie(n,l)};return(0,t.jsxs)("div",{className:"flex flex-col gap-1 py-1",children:[(0,t.jsxs)("div",{className:"flex flex-row overflow-auto gap-2 items-center",children:[(0,t.jsx)("span",{title:"Declared by",children:(0,t.jsx)(za,{className:"w-3.5 h-3.5 text-muted-foreground"})}),e.length===1?(0,t.jsx)(Fe,{variant:"focus",cellId:e[0],skipScroll:!0,onClick:()=>r(e[0])}):(0,t.jsx)("div",{className:"text-destructive flex flex-row gap-2",children:e.slice(0,3).map((o,n)=>(0,t.jsxs)("span",{className:"flex",children:[(0,t.jsx)(Fe,{variant:"focus",cellId:o,skipScroll:!0,className:"whitespace-nowrap text-destructive",onClick:()=>r(o)},o),n<e.length-1&&", "]},o))})]}),(0,t.jsxs)("div",{className:"flex flex-row overflow-auto gap-2 items-baseline",children:[(0,t.jsx)("span",{title:"Used by",children:(0,t.jsx)(wa,{className:"w-3.5 h-3.5 text-muted-foreground"})}),(0,t.jsx)(Oa,{maxCount:3,cellIds:s,skipScroll:!0,onClick:r})]})]})}}];function tt({variables:a,sort:e,cellIdToIndex:s}){e||(e={id:A.defs,desc:!1});let l=[];switch(e.id){case A.name:l=H(a,r=>r.name);break;case A.type:l=H(a,r=>r.dataType);break;case A.defs:l=H(a,r=>s.get(r.declaredBy[0]));break}return e.desc?l.reverse():l}const De=(0,_.memo)(({className:a,cellIds:e,variables:s})=>{let[l,r]=_.useState([]),[o,n]=_.useState(""),b=Ze(),{locale:g}=_a(),N=(0,_.useMemo)(()=>{let i=c=>{let d=b[c];return He(d)?`cell-${e.indexOf(c)}`:d??`cell-${e.indexOf(c)}`};return Object.values(s).map(c=>({...c,declaredByNames:c.declaredBy.map(i),usedByNames:c.usedBy.map(i)}))},[s,b,e]),j=ha({data:(0,_.useMemo)(()=>{let i=new Map;return e.forEach((c,d)=>i.set(c,d)),tt({variables:N,sort:l[0],cellIdToIndex:i})},[N,l,e]),columns:at,getCoreRowModel:ua(),onGlobalFilterChange:n,getFilteredRowModel:xa(),enableFilters:!0,enableGlobalFilter:!0,enableColumnPinning:!1,getColumnCanGlobalFilter(i){return i.columnDef.enableGlobalFilter??!0},globalFilterFn:"auto",manualSorting:!0,locale:g,onSortingChange:r,getSortedRowModel:da(),state:{sorting:l,globalFilter:o}});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ja,{className:"w-full",placeholder:"Search",value:o,onChange:i=>n(i.target.value)}),(0,t.jsxs)(Va,{className:q("w-full text-sm flex-1 border-separate border-spacing-0",a),children:[(0,t.jsx)(qa,{children:(0,t.jsx)(Ie,{className:"whitespace-nowrap text-xs",children:j.getFlatHeaders().map(i=>(0,t.jsx)(Ba,{className:"sticky top-0 bg-background border-b",children:Ne(i.column.columnDef.header,i.getContext())},i.id))})}),(0,t.jsx)(Da,{children:j.getRowModel().rows.map(i=>(0,t.jsx)(Ie,{className:"hover:bg-accent",children:i.getVisibleCells().map(c=>(0,t.jsx)(Ma,{className:"border-b",children:Ne(c.column.columnDef.cell,c.getContext())},c.id))},i.id))})]})]})});De.displayName="VariableTable";var st=ne(),lt=We("marimo:session-panel:state",{openSections:["variables"],hasUserInteracted:!1},Ye),nt=()=>{let a=(0,st.c)(24),e=Ke(),s=aa(),l=X(be),r=X(qe),[o,n]=Ee(lt),b=l.length+r.length,g;a[0]!==b||a[1]!==o.hasUserInteracted||a[2]!==o.openSections?(g=!o.hasUserInteracted&&b>0?[...new Set([...o.openSections,"datasources"])]:o.openSections,a[0]=b,a[1]=o.hasUserInteracted,a[2]=o.openSections,a[3]=g):g=a[3];let N=g,j;a[4]===n?j=a[5]:(j=v=>{n({openSections:v,hasUserInteracted:!0})},a[4]=n,a[5]=j);let i=j,c=!N.includes("datasources")&&b>0,d;a[6]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(le,{className:"w-4 h-4"}),a[6]=d):d=a[6];let x;a[7]!==b||a[8]!==c?(x=c&&(0,t.jsx)(Sa,{variant:"secondary",className:"ml-1 px-1.5 py-0 mb-px text-[10px]",children:b}),a[7]=b,a[8]=c,a[9]=x):x=a[9];let h;a[10]===x?h=a[11]:(h=(0,t.jsx)(Ce,{className:"px-3 py-2 text-xs font-semibold uppercase tracking-wide hover:no-underline",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[d,"Data sources",x]})}),a[10]=x,a[11]=h);let m;a[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)($e,{wrapperClassName:"p-0",children:(0,t.jsx)(Ka,{})}),a[12]=m):m=a[12];let p;a[13]===h?p=a[14]:(p=(0,t.jsxs)(ke,{value:"datasources",className:"border-b",children:[h,m]}),a[13]=h,a[14]=p);let u;a[15]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(Ce,{className:"px-3 py-2 text-xs font-semibold uppercase tracking-wide hover:no-underline",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(Re,{className:"w-4 h-4"}),"Variables"]})}),a[15]=u):u=a[15];let f;a[16]!==s||a[17]!==e?(f=(0,t.jsxs)(ke,{value:"variables",className:"border-b-0",children:[u,(0,t.jsx)($e,{wrapperClassName:"p-0",children:Object.keys(e).length===0?(0,t.jsx)("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:"No variables defined"}):(0,t.jsx)(De,{cellIds:s.inOrderIds,variables:e})})]}),a[16]=s,a[17]=e,a[18]=f):f=a[18];let y;return a[19]!==i||a[20]!==N||a[21]!==p||a[22]!==f?(y=(0,t.jsxs)(ka,{type:"multiple",value:N,onValueChange:i,className:"flex flex-col h-full overflow-auto",children:[p,f]}),a[19]=i,a[20]=N,a[21]=p,a[22]=f,a[23]=y):y=a[23],y};export{nt as default};
import{t as e}from"./createLucideIcon-BCdY6lG5.js";var r=e("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);export{r as t};
import{t as O}from"./chunk-LvLJmgfZ.js";import{d as j}from"./hotkeys-BHHWjLlp.js";import{t as T}from"./use-toast-BDYuj3zG.js";function k(){try{window.location.reload()}catch(w){j.error("Failed to reload page",w),T({title:"Failed to reload page",description:"Please refresh the page manually."})}}var F=O(((w,y)=>{var C=(function(){var g=String.fromCharCode,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",b={};function _(r,e){if(!b[r]){b[r]={};for(var a=0;a<r.length;a++)b[r][r.charAt(a)]=a}return b[r][e]}var d={compressToBase64:function(r){if(r==null)return"";var e=d._compress(r,6,function(a){return x.charAt(a)});switch(e.length%4){default:case 0:return e;case 1:return e+"===";case 2:return e+"==";case 3:return e+"="}},decompressFromBase64:function(r){return r==null?"":r==""?null:d._decompress(r.length,32,function(e){return _(x,r.charAt(e))})},compressToUTF16:function(r){return r==null?"":d._compress(r,15,function(e){return g(e+32)})+" "},decompressFromUTF16:function(r){return r==null?"":r==""?null:d._decompress(r.length,16384,function(e){return r.charCodeAt(e)-32})},compressToUint8Array:function(r){for(var e=d.compress(r),a=new Uint8Array(e.length*2),n=0,s=e.length;n<s;n++){var f=e.charCodeAt(n);a[n*2]=f>>>8,a[n*2+1]=f%256}return a},decompressFromUint8Array:function(r){if(r==null)return d.decompress(r);for(var e=Array(r.length/2),a=0,n=e.length;a<n;a++)e[a]=r[a*2]*256+r[a*2+1];var s=[];return e.forEach(function(f){s.push(g(f))}),d.decompress(s.join(""))},compressToEncodedURIComponent:function(r){return r==null?"":d._compress(r,6,function(e){return U.charAt(e)})},decompressFromEncodedURIComponent:function(r){return r==null?"":r==""?null:(r=r.replace(/ /g,"+"),d._decompress(r.length,32,function(e){return _(U,r.charAt(e))}))},compress:function(r){return d._compress(r,16,function(e){return g(e)})},_compress:function(r,e,a){if(r==null)return"";var n,s,f={},v={},m="",A="",p="",h=2,l=3,c=2,u=[],o=0,i=0,t;for(t=0;t<r.length;t+=1)if(m=r.charAt(t),Object.prototype.hasOwnProperty.call(f,m)||(f[m]=l++,v[m]=!0),A=p+m,Object.prototype.hasOwnProperty.call(f,A))p=A;else{if(Object.prototype.hasOwnProperty.call(v,p)){if(p.charCodeAt(0)<256){for(n=0;n<c;n++)o<<=1,i==e-1?(i=0,u.push(a(o)),o=0):i++;for(s=p.charCodeAt(0),n=0;n<8;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}else{for(s=1,n=0;n<c;n++)o=o<<1|s,i==e-1?(i=0,u.push(a(o)),o=0):i++,s=0;for(s=p.charCodeAt(0),n=0;n<16;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}h--,h==0&&(h=2**c,c++),delete v[p]}else for(s=f[p],n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;h--,h==0&&(h=2**c,c++),f[A]=l++,p=String(m)}if(p!==""){if(Object.prototype.hasOwnProperty.call(v,p)){if(p.charCodeAt(0)<256){for(n=0;n<c;n++)o<<=1,i==e-1?(i=0,u.push(a(o)),o=0):i++;for(s=p.charCodeAt(0),n=0;n<8;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}else{for(s=1,n=0;n<c;n++)o=o<<1|s,i==e-1?(i=0,u.push(a(o)),o=0):i++,s=0;for(s=p.charCodeAt(0),n=0;n<16;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}h--,h==0&&(h=2**c,c++),delete v[p]}else for(s=f[p],n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;h--,h==0&&(h=2**c,c++)}for(s=2,n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;for(;;)if(o<<=1,i==e-1){u.push(a(o));break}else i++;return u.join("")},decompress:function(r){return r==null?"":r==""?null:d._decompress(r.length,32768,function(e){return r.charCodeAt(e)})},_decompress:function(r,e,a){var n=[],s=4,f=4,v=3,m="",A=[],p,h,l,c,u,o,i,t={val:a(0),position:e,index:1};for(p=0;p<3;p+=1)n[p]=p;for(l=0,u=2**2,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;switch(l){case 0:for(l=0,u=2**8,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;i=g(l);break;case 1:for(l=0,u=2**16,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;i=g(l);break;case 2:return""}for(n[3]=i,h=i,A.push(i);;){if(t.index>r)return"";for(l=0,u=2**v,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;switch(i=l){case 0:for(l=0,u=2**8,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;n[f++]=g(l),i=f-1,s--;break;case 1:for(l=0,u=2**16,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;n[f++]=g(l),i=f-1,s--;break;case 2:return A.join("")}if(s==0&&(s=2**v,v++),n[i])m=n[i];else if(i===f)m=h+h.charAt(0);else return null;A.push(m),n[f++]=h+m.charAt(0),s--,h=m,s==0&&(s=2**v,v++)}}};return d})();typeof define=="function"&&define.amd?define(function(){return C}):y!==void 0&&y!=null?y.exports=C:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return C})})),P=F();function E(w){let{code:y,baseUrl:C="https://marimo.app"}=w,g=new URL(C);return y&&(g.hash=`#code/${(0,P.compressToEncodedURIComponent)(y)}`),g.href}export{F as n,k as r,E as t};
import{t as e}from"./shell-BVpF3W_J.js";export{e as shell};
var f={};function c(e,t){for(var r=0;r<t.length;r++)f[t[r]]=e}var l=["true","false"],k=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],h="ab.awk.bash.beep.cat.cc.cd.chown.chmod.chroot.clear.cp.curl.cut.diff.echo.find.gawk.gcc.get.git.grep.hg.kill.killall.ln.ls.make.mkdir.openssl.mv.nc.nl.node.npm.ping.ps.restart.rm.rmdir.sed.service.sh.shopt.shred.source.sort.sleep.ssh.start.stop.su.sudo.svn.tee.telnet.top.touch.vi.vim.wall.wc.wget.who.write.yes.zsh".split(".");c("atom",l),c("keyword",k),c("builtin",h);function d(e,t){if(e.eatSpace())return null;var r=e.sol(),n=e.next();if(n==="\\")return e.next(),null;if(n==="'"||n==='"'||n==="`")return t.tokens.unshift(a(n,n==="`"?"quote":"string")),u(e,t);if(n==="#")return r&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if(n==="$")return t.tokens.unshift(p),u(e,t);if(n==="+"||n==="=")return"operator";if(n==="-")return e.eat("-"),e.eatWhile(/\w/),"attribute";if(n=="<"){if(e.match("<<"))return"operator";var i=e.match(/^<-?\s*(?:['"]([^'"]*)['"]|([^'"\s]*))/);if(i)return t.tokens.unshift(g(i[1]||i[2])),"string.special"}if(/\d/.test(n)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var s=e.current();return e.peek()==="="&&/\w+/.test(s)?"def":f.hasOwnProperty(s)?f[s]:null}function a(e,t){var r=e=="("?")":e=="{"?"}":e;return function(n,i){for(var s,o=!1;(s=n.next())!=null;){if(s===r&&!o){i.tokens.shift();break}else if(s==="$"&&!o&&e!=="'"&&n.peek()!=r){o=!0,n.backUp(1),i.tokens.unshift(p);break}else{if(!o&&e!==r&&s===e)return i.tokens.unshift(a(e,t)),u(n,i);if(!o&&/['"]/.test(s)&&!/['"]/.test(e)){i.tokens.unshift(m(s,"string")),n.backUp(1);break}}o=!o&&s==="\\"}return t}}function m(e,t){return function(r,n){return n.tokens[0]=a(e,t),r.next(),u(r,n)}}var p=function(e,t){t.tokens.length>1&&e.eat("$");var r=e.next();return/['"({]/.test(r)?(t.tokens[0]=a(r,r=="("?"quote":r=="{"?"def":"string"),u(e,t)):(/\d/.test(r)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function g(e){return function(t,r){return t.sol()&&t.string==e&&r.tokens.shift(),t.skipToEnd(),"string.special"}}function u(e,t){return(t.tokens[0]||d)(e,t)}const w={name:"shell",startState:function(){return{tokens:[]}},token:function(e,t){return u(e,t)},languageData:{autocomplete:l.concat(k,h),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};export{w as t};
function o(n){for(var t={},e=n.split(" "),r=0;r<e.length;++r)t[e[r]]=!0;return t}var l=o("if elsif else stop require"),s=o("true false not");function i(n,t){var e=n.next();if(e=="/"&&n.eat("*"))return t.tokenize=a,a(n,t);if(e==="#")return n.skipToEnd(),"comment";if(e=='"')return t.tokenize=p(e),t.tokenize(n,t);if(e=="(")return t._indent.push("("),t._indent.push("{"),null;if(e==="{")return t._indent.push("{"),null;if(e==")"&&(t._indent.pop(),t._indent.pop()),e==="}")return t._indent.pop(),null;if(e==","||e==";"||/[{}\(\),;]/.test(e))return null;if(/\d/.test(e))return n.eatWhile(/[\d]/),n.eat(/[KkMmGg]/),"number";if(e==":")return n.eatWhile(/[a-zA-Z_]/),n.eatWhile(/[a-zA-Z0-9_]/),"operator";n.eatWhile(/\w/);var r=n.current();return r=="text"&&n.eat(":")?(t.tokenize=f,"string"):l.propertyIsEnumerable(r)?"keyword":s.propertyIsEnumerable(r)?"atom":null}function f(n,t){return t._multiLineString=!0,n.sol()?(n.next()=="."&&n.eol()&&(t._multiLineString=!1,t.tokenize=i),"string"):(n.eatSpace(),n.peek()=="#"?(n.skipToEnd(),"comment"):(n.skipToEnd(),"string"))}function a(n,t){for(var e=!1,r;(r=n.next())!=null;){if(e&&r=="/"){t.tokenize=i;break}e=r=="*"}return"comment"}function p(n){return function(t,e){for(var r=!1,u;(u=t.next())!=null&&!(u==n&&!r);)r=!r&&u=="\\";return r||(e.tokenize=i),"string"}}const c={name:"sieve",startState:function(n){return{tokenize:i,baseIndent:n||0,_indent:[]}},token:function(n,t){return n.eatSpace()?null:(t.tokenize||i)(n,t)},indent:function(n,t,e){var r=n._indent.length;return t&&t[0]=="}"&&r--,r<0&&(r=0),r*e.unit},languageData:{indentOnInput:/^\s*\}$/}};export{c as t};
import{t as e}from"./sieve-BSfPMeZl.js";export{e as sieve};
function l(t){o(t,"start");var e={},n=t.languageData||{},s=!1;for(var d in t)if(d!=n&&t.hasOwnProperty(d))for(var p=e[d]=[],r=t[d],a=0;a<r.length;a++){var i=r[a];p.push(new k(i,t)),(i.indent||i.dedent)&&(s=!0)}return{name:n.name,startState:function(){return{state:"start",pending:null,indent:s?[]:null}},copyState:function(u){var g={state:u.state,pending:u.pending,indent:u.indent&&u.indent.slice(0)};return u.stack&&(g.stack=u.stack.slice(0)),g},token:c(e),indent:x(e,n),mergeTokens:n.mergeTokens,languageData:n}}function o(t,e){if(!t.hasOwnProperty(e))throw Error("Undefined state "+e+" in simple mode")}function f(t,e){if(!t)return/(?:)/;var n="";return t instanceof RegExp?(t.ignoreCase&&(n="i"),t.unicode&&(n+="u"),t=t.source):t=String(t),RegExp((e===!1?"":"^")+"(?:"+t+")",n)}function h(t){if(!t)return null;if(t.apply)return t;if(typeof t=="string")return t.replace(/\./g," ");for(var e=[],n=0;n<t.length;n++)e.push(t[n]&&t[n].replace(/\./g," "));return e}function k(t,e){(t.next||t.push)&&o(e,t.next||t.push),this.regex=f(t.regex),this.token=h(t.token),this.data=t}function c(t){return function(e,n){if(n.pending){var s=n.pending.shift();return n.pending.length==0&&(n.pending=null),e.pos+=s.text.length,s.token}for(var d=t[n.state],p=0;p<d.length;p++){var r=d[p],a=(!r.data.sol||e.sol())&&e.match(r.regex);if(a){r.data.next?n.state=r.data.next:r.data.push?((n.stack||(n.stack=[])).push(n.state),n.state=r.data.push):r.data.pop&&n.stack&&n.stack.length&&(n.state=n.stack.pop()),r.data.indent&&n.indent.push(e.indentation()+e.indentUnit),r.data.dedent&&n.indent.pop();var i=r.token;if(i&&i.apply&&(i=i(a)),a.length>2&&r.token&&typeof r.token!="string"){n.pending=[];for(var u=2;u<a.length;u++)a[u]&&n.pending.push({text:a[u],token:r.token[u-1]});return e.backUp(a[0].length-(a[1]?a[1].length:0)),i[0]}else return i&&i.join?i[0]:i}}return e.next(),null}}function x(t,e){return function(n,s){if(n.indent==null||e.dontIndentStates&&e.dontIndentStates.indexOf(n.state)>-1)return null;var d=n.indent.length-1,p=t[n.state];t:for(;;){for(var r=0;r<p.length;r++){var a=p[r];if(a.data.dedent&&a.data.dedentIfLineStart!==!1){var i=a.regex.exec(s);if(i&&i[0]){d--,(a.next||a.push)&&(p=t[a.next||a.push]),s=s.slice(i[0].length);continue t}}}break}return d<0?0:n.indent[d]}}export{l as t};

Sorry, the diff of this file is too big to display

var s=/[+\-\/\\*~<>=@%|&?!.,:;^]/,d=/true|false|nil|self|super|thisContext/,r=function(n,e){this.next=n,this.parent=e},o=function(n,e,t){this.name=n,this.context=e,this.eos=t},l=function(){this.context=new r(c,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};l.prototype.userIndent=function(n,e){this.userIndentationDelta=n>0?n/e-this.indentation:0};var c=function(n,e,t){var a=new o(null,e,!1),i=n.next();return i==='"'?a=u(n,new r(u,e)):i==="'"?a=x(n,new r(x,e)):i==="#"?n.peek()==="'"?(n.next(),a=h(n,new r(h,e))):n.eatWhile(/[^\s.{}\[\]()]/)?a.name="string.special":a.name="meta":i==="$"?(n.next()==="<"&&(n.eatWhile(/[^\s>]/),n.next()),a.name="string.special"):i==="|"&&t.expectVariable?a.context=new r(p,e):/[\[\]{}()]/.test(i)?(a.name="bracket",a.eos=/[\[{(]/.test(i),i==="["?t.indentation++:i==="]"&&(t.indentation=Math.max(0,t.indentation-1))):s.test(i)?(n.eatWhile(s),a.name="operator",a.eos=i!==";"):/\d/.test(i)?(n.eatWhile(/[\w\d]/),a.name="number"):/[\w_]/.test(i)?(n.eatWhile(/[\w\d_]/),a.name=t.expectVariable?d.test(n.current())?"keyword":"variable":null):a.eos=t.expectVariable,a},u=function(n,e){return n.eatWhile(/[^"]/),new o("comment",n.eat('"')?e.parent:e,!0)},x=function(n,e){return n.eatWhile(/[^']/),new o("string",n.eat("'")?e.parent:e,!1)},h=function(n,e){return n.eatWhile(/[^']/),new o("string.special",n.eat("'")?e.parent:e,!1)},p=function(n,e){var t=new o(null,e,!1);return n.next()==="|"?(t.context=e.parent,t.eos=!0):(n.eatWhile(/[^|]/),t.name="variable"),t};const f={name:"smalltalk",startState:function(){return new l},token:function(n,e){if(e.userIndent(n.indentation(),n.indentUnit),n.eatSpace())return null;var t=e.context.next(n,e.context,e);return e.context=t.context,e.expectVariable=t.eos,t.name},blankLine:function(n,e){n.userIndent(0,e)},indent:function(n,e,t){var a=n.context.next===c&&e&&e.charAt(0)==="]"?-1:n.userIndentationDelta;return(n.indentation+a)*t.unit},languageData:{indentOnInput:/^\s*\]$/}};export{f as t};
import{t as a}from"./smalltalk-CkHVehky.js";export{a as smalltalk};
import{s as I}from"./chunk-LvLJmgfZ.js";import"./useEvent-BhXAndur.js";import{t as P}from"./react-Bj1aDYRI.js";import{w as q}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as $}from"./compiler-runtime-B3qBwwSJ.js";import{n as D}from"./constants-B6Cb__3x.js";import{t as F}from"./jsx-runtime-ZmTK25f3.js";import{i as G,t as w}from"./button-CZ3Cs4qb.js";import{t as T}from"./cn-BKtXLv3a.js";import{at as W}from"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{r as A}from"./requests-B4FYHTZl.js";import{n as M,t as B}from"./LazyAnyLanguageCodeMirror-DgZ8iknE.js";import{t as J}from"./x-ZP5cObgf.js";import{t as K}from"./spinner-DA8-7wQv.js";import{t as L}from"./plus-B7DF33lD.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import{r as R}from"./useTheme-DQozhcp1.js";import"./Combination-BAEdC-rz.js";import{t as U}from"./tooltip-CMQz28hC.js";import{a as V,c as Y,i as Q,n as X,r as Z}from"./dialog-eb-NieZw.js";import{n as ee}from"./ImperativeModal-BNN1HA7x.js";import{t as te}from"./RenderHTML-D-of_-s7.js";import"./purify.es-DZrAQFIu.js";import{n as se}from"./error-banner-B9ts0mNl.js";import{n as re}from"./useAsyncData-BMGLSTg8.js";import{a as le,o as oe,r as ie,t as ae,u as ne}from"./command-2ElA5IkO.js";import{o as me}from"./focus-C1YokgL7.js";import{n as ce,r as de,t as E}from"./react-resizable-panels.browser.esm-Da3ksQXL.js";import{t as pe}from"./empty-state-B8Cxr9nj.js";import{n as he,r as fe}from"./panel-context-HhzMRtZm.js";import{t as H}from"./kiosk-mode-WmM7aFkh.js";var O=$(),C=I(P(),1),s=I(F(),1);const xe=t=>{let e=(0,O.c)(6),{children:r}=t,{openModal:i,closeModal:o}=ee(),l;e[0]!==o||e[1]!==i?(l=()=>i((0,s.jsx)(ue,{onClose:o})),e[0]=o,e[1]=i,e[2]=l):l=e[2];let a;return e[3]!==r||e[4]!==l?(a=(0,s.jsx)(G,{onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=a):a=e[5],a};var ue=t=>{let e=(0,O.c)(4),{onClose:r}=t,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(Y,{children:"Contribute a Snippet"}),e[0]=i):i=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsxs)(V,{children:[i,(0,s.jsxs)(Z,{children:["Have a useful snippet you want to share with the community? Make a pull request"," ",(0,s.jsx)("a",{href:D.githubPage,target:"_blank",className:"underline",children:"on GitHub"}),"."]})]}),e[1]=o):o=e[1];let l;return e[2]===r?l=e[3]:(l=(0,s.jsxs)(X,{className:"max-w-md",children:[o,(0,s.jsx)(Q,{children:(0,s.jsx)(w,{"data-testid":"snippet-close-button",variant:"default",onClick:r,children:"Close"})})]}),e[2]=r,e[3]=l),l},k=$(),je=[W.lineWrapping],ve=()=>{let t=(0,k.c)(24),{readSnippets:e}=A(),[r,i]=C.useState(),o=he(),l=fe(),a;t[0]===e?a=t[1]:(a=()=>e(),t[0]=e,t[1]=a);let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=[],t[2]=c):c=t[2];let{data:N,error:j,isPending:g}=re(a,c);if(j){let m;return t[3]===j?m=t[4]:(m=(0,s.jsx)(se,{error:j}),t[3]=j,t[4]=m),m}if(g||!N){let m;return t[5]===Symbol.for("react.memo_cache_sentinel")?(m=(0,s.jsx)(K,{size:"medium",centered:!0}),t[5]=m):m=t[5],m}let _=o==="vertical",v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=(0,s.jsx)(le,{placeholder:"Search snippets...",className:"h-6 m-1",rootClassName:"flex-1 border-r"}),t[6]=v):v=t[6];let h,f;t[7]===Symbol.for("react.memo_cache_sentinel")?(h=(0,s.jsxs)("div",{className:"flex items-center w-full border-b",children:[v,(0,s.jsx)(xe,{children:(0,s.jsx)("button",{className:"float-right px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",children:(0,s.jsx)(L,{className:"h-4 w-4"})})})]}),f=(0,s.jsx)(ie,{children:"No results"}),t[7]=h,t[8]=f):(h=t[7],f=t[8]);let b;t[9]===Symbol.for("react.memo_cache_sentinel")?(b=m=>i(m),t[9]=b):b=t[9];let d;t[10]===N.snippets?d=t[11]:(d=(0,s.jsx)(E,{defaultSize:40,minSize:20,maxSize:70,children:(0,s.jsxs)(ae,{className:"h-full rounded-none",children:[h,f,(0,s.jsx)(Ne,{onSelect:b,snippets:N.snippets})]})}),t[10]=N.snippets,t[11]=d);let u=_?"h-1":"w-1",p;t[12]===u?p=t[13]:(p=T("bg-border hover:bg-primary/50 transition-colors",u),t[12]=u,t[13]=p);let x;t[14]===p?x=t[15]:(x=(0,s.jsx)(de,{className:p}),t[14]=p,t[15]=x);let n;t[16]===r?n=t[17]:(n=(0,s.jsx)(E,{defaultSize:60,minSize:20,children:(0,s.jsx)(C.Suspense,{children:(0,s.jsx)("div",{className:"h-full snippet-viewer flex flex-col overflow-hidden",children:r?(0,s.jsx)(be,{snippet:r,onClose:()=>i(void 0)},r.title):(0,s.jsx)(pe,{title:"",description:"Click on a snippet to view its content."})})})}),t[16]=r,t[17]=n);let S;return t[18]!==o||t[19]!==l||t[20]!==n||t[21]!==d||t[22]!==x?(S=(0,s.jsx)("div",{className:"flex-1 overflow-hidden h-full",children:(0,s.jsxs)(ce,{direction:o,className:"h-full",children:[d,x,n]},l)}),t[18]=o,t[19]=l,t[20]=n,t[21]=d,t[22]=x,t[23]=S):S=t[23],S},be=t=>{let e=(0,k.c)(33),{snippet:r,onClose:i}=t,{theme:o}=R(),{createNewCell:l}=q(),a=me(),c;e[0]!==l||e[1]!==a||e[2]!==r.sections?(c=()=>{for(let n of[...r.sections].reverse())n.code&&l({code:n.code,before:!1,cellId:a??"__end__",skipIfCodeExists:!0})},e[0]=l,e[1]=a,e[2]=r.sections,e[3]=c):c=e[3];let N=c,j;e[4]!==l||e[5]!==a?(j=n=>{l({code:n,before:!1,cellId:a??"__end__"})},e[4]=l,e[5]=a,e[6]=j):j=e[6];let g=j,_;e[7]===r.title?_=e[8]:(_=(0,s.jsx)("span",{children:r.title}),e[7]=r.title,e[8]=_);let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,s.jsx)(J,{className:"h-4 w-4"}),e[9]=v):v=e[9];let h;e[10]===i?h=e[11]:(h=(0,s.jsx)(w,{size:"sm",variant:"ghost",onClick:i,className:"h-6 w-6 p-0 hover:bg-muted-foreground/10",children:v}),e[10]=i,e[11]=h);let f;e[12]!==_||e[13]!==h?(f=(0,s.jsxs)("div",{className:"text-sm font-semibold bg-muted border-y px-2 py-1 flex justify-between items-center",children:[_,h]}),e[12]=_,e[13]=h,e[14]=f):f=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsx)(M,{className:"ml-2 h-4 w-4"}),e[15]=b):b=e[15];let d;e[16]===N?d=e[17]:(d=(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(H,{children:(0,s.jsxs)(w,{className:"float-right",size:"xs",variant:"outline",onClick:N,children:["Insert snippet",b]})})}),e[16]=N,e[17]=d);let u;if(e[18]!==g||e[19]!==r.sections||e[20]!==r.title||e[21]!==o){let n;e[23]!==g||e[24]!==r.title||e[25]!==o?(n=S=>{let{code:m,html:z,id:y}=S;return z?(0,s.jsx)("div",{children:te({html:z})},`${r.title}-${y}`):m?(0,s.jsxs)("div",{className:"relative hover-actions-parent pr-2",children:[(0,s.jsx)(H,{children:(0,s.jsx)(U,{content:"Insert snippet",children:(0,s.jsx)(w,{className:"absolute -top-2 -right-1 z-10 hover-action px-2 bg-background",size:"sm",variant:"outline",onClick:()=>{g(m)},children:(0,s.jsx)(M,{className:"h-5 w-5"})})})}),(0,s.jsx)(C.Suspense,{children:(0,s.jsx)(B,{theme:o==="dark"?"dark":"light",language:"python",className:"cm border rounded overflow-hidden",extensions:je,value:m,readOnly:!0},`${r.title}-${y}`)})]},`${r.title}-${y}`):null},e[23]=g,e[24]=r.title,e[25]=o,e[26]=n):n=e[26],u=r.sections.map(n),e[18]=g,e[19]=r.sections,e[20]=r.title,e[21]=o,e[22]=u}else u=e[22];let p;e[27]!==d||e[28]!==u?(p=(0,s.jsxs)("div",{className:"px-2 py-2 space-y-4 overflow-auto flex-1",children:[d,u]}),e[27]=d,e[28]=u,e[29]=p):p=e[29];let x;return e[30]!==p||e[31]!==f?(x=(0,s.jsxs)(s.Fragment,{children:[f,p]}),e[30]=p,e[31]=f,e[32]=x):x=e[32],x},Ne=t=>{let e=(0,k.c)(7),{snippets:r,onSelect:i}=t,o;if(e[0]!==i||e[1]!==r){let a;e[3]===i?a=e[4]:(a=c=>(0,s.jsx)(oe,{className:"rounded-none",onSelect:()=>i(c),children:(0,s.jsx)("div",{className:"flex flex-row gap-2 items-center",children:(0,s.jsx)("span",{className:"mt-1 text-accent-foreground",children:c.title})})},c.title),e[3]=i,e[4]=a),o=r.map(a),e[0]=i,e[1]=r,e[2]=o}else o=e[2];let l;return e[5]===o?l=e[6]:(l=(0,s.jsx)(ne,{className:"flex flex-col overflow-auto",children:o}),e[5]=o,e[6]=l),l};export{ve as default};
var i=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/,a=/[\|\!\+\-\*\?\~\^\&]/,c=/^(OR|AND|NOT|TO)$/;function k(n){return parseFloat(n).toString()===n}function s(n){return function(t,e){for(var r=!1,u;(u=t.next())!=null&&!(u==n&&!r);)r=!r&&u=="\\";return r||(e.tokenize=o),"string"}}function f(n){return function(t,e){return n=="|"?t.eat(/\|/):n=="&"&&t.eat(/\&/),e.tokenize=o,"operator"}}function l(n){return function(t,e){for(var r=n;(n=t.peek())&&n.match(i)!=null;)r+=t.next();return e.tokenize=o,c.test(r)?"operator":k(r)?"number":t.peek()==":"?"propertyName":"string"}}function o(n,t){var e=n.next();return e=='"'?t.tokenize=s(e):a.test(e)?t.tokenize=f(e):i.test(e)&&(t.tokenize=l(e)),t.tokenize==o?null:t.tokenize(n,t)}const z={name:"solr",startState:function(){return{tokenize:o}},token:function(n,t){return n.eatSpace()?null:t.tokenize(n,t)}};export{z as solr};
var u;function s(e){return RegExp("^(?:"+e.join("|")+")$","i")}var p=s("str.lang.langmatches.datatype.bound.sameterm.isiri.isuri.iri.uri.bnode.count.sum.min.max.avg.sample.group_concat.rand.abs.ceil.floor.round.concat.substr.strlen.replace.ucase.lcase.encode_for_uri.contains.strstarts.strends.strbefore.strafter.year.month.day.hours.minutes.seconds.timezone.tz.now.uuid.struuid.md5.sha1.sha256.sha384.sha512.coalesce.if.strlang.strdt.isnumeric.regex.exists.isblank.isliteral.a.bind".split(".")),m=s("base.prefix.select.distinct.reduced.construct.describe.ask.from.named.where.order.limit.offset.filter.optional.graph.by.asc.desc.as.having.undef.values.group.minus.in.not.service.silent.using.insert.delete.union.true.false.with.data.copy.to.move.add.create.drop.clear.load.into".split(".")),F=/[*+\-<>=&|\^\/!\?]/,l="[A-Za-z_\\-0-9]",x=RegExp("[A-Za-z]"),g=RegExp("(("+l+"|\\.)*("+l+"))?:");function d(e,t){var n=e.next();if(u=null,n=="$"||n=="?")return n=="?"&&e.match(/\s/,!1)?"operator":(e.match(/^[A-Za-z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Za-z0-9_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*/),"variableName.local");if(n=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(n=='"'||n=="'")return t.tokenize=h(n),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(n))return u=n,"bracket";if(n=="#")return e.skipToEnd(),"comment";if(F.test(n))return"operator";if(n==":")return f(e),"atom";if(n=="@")return e.eatWhile(/[a-z\d\-]/i),"meta";if(x.test(n)&&e.match(g))return f(e),"atom";e.eatWhile(/[_\w\d]/);var a=e.current();return p.test(a)?"builtin":m.test(a)?"keyword":"variable"}function f(e){e.match(/(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/i)}function h(e){return function(t,n){for(var a=!1,r;(r=t.next())!=null;){if(r==e&&!a){n.tokenize=d;break}a=!a&&r=="\\"}return"string"}}function o(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function i(e){e.indent=e.context.indent,e.context=e.context.prev}const v={name:"sparql",startState:function(){return{tokenize:d,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&t.context.align==null&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if(n!="comment"&&t.context&&t.context.align==null&&t.context.type!="pattern"&&(t.context.align=!0),u=="(")o(t,")",e.column());else if(u=="[")o(t,"]",e.column());else if(u=="{")o(t,"}",e.column());else if(/[\]\}\)]/.test(u)){for(;t.context&&t.context.type=="pattern";)i(t);t.context&&u==t.context.type&&(i(t),u=="}"&&t.context&&t.context.type=="pattern"&&i(t))}else u=="."&&t.context&&t.context.type=="pattern"?i(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?o(t,"pattern",e.column()):t.context.type=="pattern"&&!t.context.align&&(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t,n){var a=t&&t.charAt(0),r=e.context;if(/[\]\}]/.test(a))for(;r&&r.type=="pattern";)r=r.prev;var c=r&&a==r.type;return r?r.type=="pattern"?r.col:r.align?r.col+(c?0:1):r.indent+(c?0:n.unit):0},languageData:{commentTokens:{line:"#"}}};export{v as t};
import{t as r}from"./sparql-CmKKjr-f.js";export{r as sparql};
import{n as I}from"./assertNever-CBU83Y6o.js";import{a as J}from"./useLifecycle-ClI_npeg.js";import{t as p}from"./createLucideIcon-BCdY6lG5.js";import{t as R}from"./chart-no-axes-column-qvVRjhv1.js";import{r as Z,t as ee}from"./table-CfDbAm78.js";import{t as te}from"./square-function-B6mgCeFJ.js";var ae=p("align-center-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]]),ne=p("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),re=p("arrow-up-to-line",[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]),ie=p("baseline",[["path",{d:"M4 20h16",key:"14thso"}],["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),le=p("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]),P=p("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),oe=p("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]),se=p("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]),ce=p("chart-scatter",[["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}],["circle",{cx:"18.5",cy:"5.5",r:".5",fill:"currentColor",key:"lysivs"}],["circle",{cx:"11.5",cy:"11.5",r:".5",fill:"currentColor",key:"byv1b8"}],["circle",{cx:"7.5",cy:"16.5",r:".5",fill:"currentColor",key:"nkw3mc"}],["circle",{cx:"17.5",cy:"14.5",r:".5",fill:"currentColor",key:"1gjh6j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}]]),ue=p("ruler-dimension-line",[["path",{d:"M10 15v-3",key:"1pjskw"}],["path",{d:"M14 15v-3",key:"1o1mqj"}],["path",{d:"M18 15v-3",key:"cws6he"}],["path",{d:"M2 8V4",key:"3jv1jz"}],["path",{d:"M22 6H2",key:"1iqbfk"}],["path",{d:"M22 8V4",key:"16f4ou"}],["path",{d:"M6 15v-3",key:"1ij1qe"}],["rect",{x:"2",y:"12",width:"20",height:"8",rx:"2",key:"1tqiko"}]]),de=p("sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);function v(e){return e&&e.replaceAll(".","\\.").replaceAll("[","\\[").replaceAll("]","\\]").replaceAll(":","\\:")}const fe="__count__",Y="default",me="yearmonthdate",ye=6,ge="",pe={line:oe,bar:se,pie:Z,scatter:ce,heatmap:ee,area:le},U="mean",he={none:te,count:J,sum:de,mean:ie,median:ae,min:ne,max:re,distinct:J,valid:J,stdev:R,stdevp:R,variance:P,variancep:P,bin:ue},be={none:"No aggregation",count:"Count of records",sum:"Sum of values",mean:"Mean of values",median:"Median of values",min:"Minimum value",max:"Maximum value",distinct:"Count of distinct records",valid:"Count non-null records",stdev:"Standard deviation",stdevp:"Standard deviation of population",variance:"Variance",variancep:"Variance of population",bin:"Group values into bins"},ke=[Y,"accent","category10","category20","category20b","category20c","dark2","paired","pastel1","pastel2","set1","set2","set3","tableau10","tableau20","blues","greens","greys","oranges","purples","reds","bluegreen","bluepurple","goldgreen","goldorange","goldred","greenblue","orangered","purplebluegreen","purplered","redpurple","yellowgreenblue","yelloworangered","blueorange","brownbluegreen","purplegreen","pinkyellowgreen","purpleorange","redblue","redgrey","redyellowblue","redyellowgreen","spectral","rainbow","sinebow"],ve={number:"Continuous numerical scale",string:"Discrete categorical scale (inputs treated as strings)",temporal:"Continuous temporal scale"},xe={year:["Year","2025"],quarter:["Quarter","Q1 2025"],month:["Month","Jan 2025"],week:["Week","Jan 01, 2025"],day:["Day","Jan 01, 2025"],hours:["Hour","Jan 01, 2025 12:00"],minutes:["Minute","Jan 01, 2025 12:34"],seconds:["Second","Jan 01, 2025 12:34:56"],milliseconds:["Millisecond","Jan 01, 2025 12:34:56.789"],date:["Date","Jan 01, 2025"],dayofyear:["Day of Year","Day 1 of 2025"],yearmonth:["Year Month","Jan 2025"],yearmonthdate:["Year Month Date","Jan 01, 2025"],monthdate:["Month Date","Jan 01"]},Me=["number","string","temporal"],O=["year","quarter","month","date","week","day","dayofyear","hours","minutes","seconds","milliseconds"],X=["yearmonth","yearmonthdate","monthdate"],L=[...O,...X];[...L];const we=["ascending","descending"],q="none",Ce="bin",Ae=[q,"bin","count","sum","mean","median","min","max","distinct","valid","stdev","stdevp","variance","variancep"],N=[q,"count","distinct","valid"],y={LINE:"line",BAR:"bar",PIE:"pie",SCATTER:"scatter",HEATMAP:"heatmap",AREA:"area"},Ee=Object.values(y),Te=["X","Y","Color",q];function B(e){switch(e){case"number":case"integer":return"quantitative";case"string":case"boolean":case"unknown":return"nominal";case"date":case"datetime":case"time":case"temporal":return"temporal";default:return I(e),"nominal"}}function _e(e){switch(e){case"number":case"integer":return"number";case"string":case"boolean":case"unknown":return"string";case"date":case"datetime":case"time":return"temporal";default:return I(e),"string"}}function Q(e){switch(e){case y.PIE:return"arc";case y.SCATTER:return"point";case y.HEATMAP:return"rect";default:return e}}function j(e,t,a,i){if(e===y.HEATMAP)return a!=null&&a.maxbins?{maxbins:a==null?void 0:a.maxbins}:void 0;if(t!=="number")return;if(!(a!=null&&a.binned))return i;let n={};return a.step!==void 0&&(n.step=a.step),a.maxbins!==void 0&&(n.maxbins=a.maxbins),Object.keys(n).length===0?!0:n}function G(e){var i,n;let t=(i=e.color)==null?void 0:i.range;if(t!=null&&t.length)return{range:t};let a=(n=e.color)==null?void 0:n.scheme;if(a&&a!=="default")return{scheme:a}}function De(e,t){var o,c,u,f,h,s,g,k,b;if(e===y.PIE)return;let a;if(m((c=(o=t.general)==null?void 0:o.colorByColumn)==null?void 0:c.field))a=(u=t.general)==null?void 0:u.colorByColumn;else if(m((f=t.color)==null?void 0:f.field))switch((h=t.color)==null?void 0:h.field){case"X":a=(s=t.general)==null?void 0:s.xColumn;break;case"Y":a=(g=t.general)==null?void 0:g.yColumn;break;case"Color":a=(k=t.general)==null?void 0:k.colorByColumn;break;default:return}else return;if(!a||!m(a.field)||a.field==="none")return;if(a.field==="__count__")return{aggregate:"count",type:"quantitative"};let i=(b=t.color)==null?void 0:b.bin,n=a.selectedDataType||"string",r=a==null?void 0:a.aggregate;return{field:v(a.field),type:B(n),scale:G(t),aggregate:W(r,n),bin:j(e,n,i)}}function Ve(e,t){var a,i,n,r,o;if(!((a=t.general)!=null&&a.stacking||!m((n=(i=t.general)==null?void 0:i.colorByColumn)==null?void 0:n.field)||e!==y.BAR))return{field:v((o=(r=t.general)==null?void 0:r.colorByColumn)==null?void 0:o.field)}}function W(e,t,a){if(t!=="temporal"&&!(e==="none"||e==="bin"))return e?t==="string"?N.includes(e)?e:void 0:e:a||void 0}function qe(e){switch(e){case"integer":return",.0f";case"number":return",.2f";default:return}}function $(e){var u,f,h,s,g,k,b,M,w,C,_,D,V,A,E,T;let{formValues:t,xEncoding:a,yEncoding:i,colorByEncoding:n}=e;if(!t.tooltips)return;function r(l,x,d){if("aggregate"in l&&l.aggregate==="count"&&!m(l.field))return{aggregate:"count"};if(l&&"field"in l&&m(l.field))return l.timeUnit&&!d&&(d=l.field),{field:l.field,aggregate:l.aggregate,timeUnit:l.timeUnit,format:qe(x),title:d,bin:l.bin}}if(t.tooltips.auto){let l=[],x=r(a,((f=(u=t.general)==null?void 0:u.xColumn)==null?void 0:f.type)||"string",(h=t.xAxis)==null?void 0:h.label);x&&l.push(x);let d=r(i,((g=(s=t.general)==null?void 0:s.yColumn)==null?void 0:g.type)||"string",(k=t.yAxis)==null?void 0:k.label);d&&l.push(d);let z=r(n||{},((M=(b=t.general)==null?void 0:b.colorByColumn)==null?void 0:M.type)||"string");return z&&l.push(z),l}let o=t.tooltips.fields??[],c=[];for(let l of o){if("field"in a&&m(a.field)&&a.field===l.field){let d=r(a,((C=(w=t.general)==null?void 0:w.xColumn)==null?void 0:C.type)||"string",(_=t.xAxis)==null?void 0:_.label);d&&c.push(d);continue}if("field"in i&&m(i.field)&&i.field===l.field){let d=r(i,((V=(D=t.general)==null?void 0:D.yColumn)==null?void 0:V.type)||"string",(A=t.yAxis)==null?void 0:A.label);d&&c.push(d);continue}if(n&&"field"in n&&m(n.field)&&n.field===l.field){let d=r(n,((T=(E=t.general)==null?void 0:E.colorByColumn)==null?void 0:T.type)||"string");d&&c.push(d);continue}let x={field:v(l.field)};c.push(x)}return c}function Be(e,t,a,i,n){var A,E,T,l;let{xColumn:r,yColumn:o,colorByColumn:c,horizontal:u,stacking:f,title:h,facet:s}=t.general??{};if(e===y.PIE)return He(t,a,i,n);if(!m(r==null?void 0:r.field))return"X-axis column is required";if(!m(o==null?void 0:o.field))return"Y-axis column is required";let g=S(r,(A=t.xAxis)==null?void 0:A.bin,H((E=t.xAxis)==null?void 0:E.label),c!=null&&c.field&&u?f:void 0,e),k=U;(o==null?void 0:o.selectedDataType)==="string"&&(k="count");let b=S(o,(T=t.yAxis)==null?void 0:T.bin,H((l=t.yAxis)==null?void 0:l.label),c!=null&&c.field&&!u?f:void 0,e,k),M=s!=null&&s.row.field?F(s.row,e):void 0,w=s!=null&&s.column.field?F(s.column,e):void 0,C=De(e,t),_=K(e,t,a,i,n,h),D={x:u?b:g,y:u?g:b,xOffset:Ve(e,t),color:C,tooltip:$({formValues:t,xEncoding:g,yEncoding:b,colorByEncoding:C}),...M&&{row:M},...w&&{column:w}},V=Se(s==null?void 0:s.column,s==null?void 0:s.row);return{..._,mark:{type:Q(e)},encoding:D,...V}}function je(e,t){return{...e,data:{values:t}}}function S(e,t,a,i,n,r){let o=e.selectedDataType||"string";return e.field==="__count__"?{aggregate:"count",type:"quantitative",bin:j(n,o,t),title:a==="__count__"?void 0:a,stack:i}:{field:v(e.field),type:B(e.selectedDataType||"unknown"),bin:j(n,o,t),title:a,stack:i,aggregate:W(e.aggregate,o,r),sort:e.sort,timeUnit:Je(e)}}function F(e,t){let a=j(t,e.selectedDataType||"string",{maxbins:e.maxbins,binned:e.binned},{maxbins:6});return{field:v(e.field),sort:e.sort,timeUnit:Pe(e),type:B(e.selectedDataType||"unknown"),bin:a}}function He(e,t,a,i){var f,h,s,g;let{yColumn:n,colorByColumn:r,title:o}=e.general??{};if(!m(r==null?void 0:r.field))return"Color by column is required";if(!m(n==null?void 0:n.field))return"Size by column is required";let c=S(n,(f=e.xAxis)==null?void 0:f.bin,H((h=e.xAxis)==null?void 0:h.label),void 0,y.PIE),u={field:v(r.field),type:B(r.selectedDataType||"unknown"),scale:G(e),title:H((s=e.yAxis)==null?void 0:s.label)};return{...K(y.PIE,e,t,a,i,o),mark:{type:Q(y.PIE),innerRadius:(g=e.style)==null?void 0:g.innerRadius},encoding:{theta:c,color:u,tooltip:$({formValues:e,xEncoding:c,yEncoding:c,colorByEncoding:u})}}}function K(e,t,a,i,n,r){var c,u,f;let o=((c=t.style)==null?void 0:c.gridLines)??!1;return e===y.SCATTER&&(o=!0),{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"dark":"white",title:r,data:{values:[]},height:((u=t.yAxis)==null?void 0:u.height)??n,width:((f=t.xAxis)==null?void 0:f.width)??i,config:{axis:{grid:o}}}}function m(e){return e!==void 0&&e.trim()!==""}function H(e){let t=e==null?void 0:e.trim();return t===""?void 0:t}function Je(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Pe(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Se(e,t){let a={};return(e==null?void 0:e.linkXAxis)===!1&&(a.x="independent"),(t==null?void 0:t.linkYAxis)===!1&&(a.y="independent"),Object.keys(a).length>0?{resolve:{axis:a}}:void 0}export{P as A,Y as C,ve as D,ge as E,xe as O,U as S,me as T,be as _,Ae as a,ke as b,Te as c,q as d,Me as f,L as g,N as h,_e as i,v as k,X as l,we as m,Be as n,Ce as o,O as p,m as r,Ee as s,je as t,y as u,he as v,ye as w,fe as x,pe as y};
import{s as n}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-Bj1aDYRI.js";import{t as x}from"./compiler-runtime-B3qBwwSJ.js";import{t as N}from"./jsx-runtime-ZmTK25f3.js";import{n as g,t as k}from"./cn-BKtXLv3a.js";import{t as v}from"./createLucideIcon-BCdY6lG5.js";var d=v("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),y=x(),j=n(h(),1),w=n(N(),1),M=g("animate-spin",{variants:{centered:{true:"m-auto"},size:{small:"size-4",medium:"size-12",large:"size-20",xlarge:"size-20"}},defaultVariants:{size:"medium"}}),f=j.forwardRef((l,o)=>{let e=(0,y.c)(13),r,a,s,t;if(e[0]!==l){let{className:p,children:R,centered:c,size:z,...u}=l;a=p,r=c,t=z,s=u,e[0]=l,e[1]=r,e[2]=a,e[3]=s,e[4]=t}else r=e[1],a=e[2],s=e[3],t=e[4];let i;e[5]!==r||e[6]!==a||e[7]!==t?(i=k(M({centered:r,size:t}),a),e[5]=r,e[6]=a,e[7]=t,e[8]=i):i=e[8];let m;return e[9]!==s||e[10]!==o||e[11]!==i?(m=(0,w.jsx)(d,{ref:o,className:i,strokeWidth:1.5,...s}),e[9]=s,e[10]=o,e[11]=i,e[12]=m):m=e[12],m});f.displayName="Spinner";export{d as n,f as t};
const e={name:"spreadsheet",startState:function(){return{stringType:null,stack:[]}},token:function(t,a){if(t){switch(a.stack.length===0&&(t.peek()=='"'||t.peek()=="'")&&(a.stringType=t.peek(),t.next(),a.stack.unshift("string")),a.stack[0]){case"string":for(;a.stack[0]==="string"&&!t.eol();)t.peek()===a.stringType?(t.next(),a.stack.shift()):t.peek()==="\\"?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return"string";case"characterClass":for(;a.stack[0]==="characterClass"&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(/^\\./)||a.stack.shift();return"operator"}var s=t.peek();switch(s){case"[":return t.next(),a.stack.unshift("characterClass"),"bracket";case":":return t.next(),"operator";case"\\":return t.match(/\\[a-z]+/)?"string.special":(t.next(),"atom");case".":case",":case";":case"*":case"-":case"+":case"^":case"<":case"/":case"=":return t.next(),"atom";case"$":return t.next(),"builtin"}return t.match(/\d+/)?t.match(/^\w+/)?"error":"number":t.match(/^[a-zA-Z_]\w*/)?t.match(/(?=[\(.])/,!1)?"keyword":"variable":["[","]","(",")","{","}"].indexOf(s)==-1?(t.eatSpace()||t.next(),null):(t.next(),"bracket")}}};export{e as spreadsheet};
function o(a){var c=a.client||{},g=a.atoms||{false:!0,true:!0,null:!0},p=a.builtin||e(z),C=a.keywords||e(d),_=a.operatorChars||/^[*+\-%<>!=&|~^\/]/,s=a.support||{},y=a.hooks||{},S=a.dateSQL||{date:!0,time:!0,timestamp:!0},Q=a.backslashStringEscapes!==!1,N=a.brackets||/^[\{}\(\)\[\]]/,v=a.punctuation||/^[;.,:]/;function h(t,i){var r=t.next();if(y[r]){var n=y[r](t,i);if(n!==!1)return n}if(s.hexNumber&&(r=="0"&&t.match(/^[xX][0-9a-fA-F]+/)||(r=="x"||r=="X")&&t.match(/^'[0-9a-fA-F]*'/))||s.binaryNumber&&((r=="b"||r=="B")&&t.match(/^'[01]+'/)||r=="0"&&t.match(/^b[01]*/)))return"number";if(r.charCodeAt(0)>47&&r.charCodeAt(0)<58)return t.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),s.decimallessFloat&&t.match(/^\.(?!\.)/),"number";if(r=="?"&&(t.eatSpace()||t.eol()||t.eat(";")))return"macroName";if(r=="'"||r=='"'&&s.doubleQuote)return i.tokenize=x(r),i.tokenize(t,i);if((s.nCharCast&&(r=="n"||r=="N")||s.charsetCast&&r=="_"&&t.match(/[a-z][a-z0-9]*/i))&&(t.peek()=="'"||t.peek()=='"'))return"keyword";if(s.escapeConstant&&(r=="e"||r=="E")&&(t.peek()=="'"||t.peek()=='"'&&s.doubleQuote))return i.tokenize=function(m,k){return(k.tokenize=x(m.next(),!0))(m,k)},"keyword";if(s.commentSlashSlash&&r=="/"&&t.eat("/")||s.commentHash&&r=="#"||r=="-"&&t.eat("-")&&(!s.commentSpaceRequired||t.eat(" ")))return t.skipToEnd(),"comment";if(r=="/"&&t.eat("*"))return i.tokenize=b(1),i.tokenize(t,i);if(r=="."){if(s.zerolessFloat&&t.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(t.match(/^\.+/))return null;if(s.ODBCdotTable&&t.match(/^[\w\d_$#]+/))return"type"}else{if(_.test(r))return t.eatWhile(_),"operator";if(N.test(r))return"bracket";if(v.test(r))return t.eatWhile(v),"punctuation";if(r=="{"&&(t.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||t.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";t.eatWhile(/^[_\w\d]/);var l=t.current().toLowerCase();return S.hasOwnProperty(l)&&(t.match(/^( )+'[^']*'/)||t.match(/^( )+"[^"]*"/))?"number":g.hasOwnProperty(l)?"atom":p.hasOwnProperty(l)?"type":C.hasOwnProperty(l)?"keyword":c.hasOwnProperty(l)?"builtin":null}}function x(t,i){return function(r,n){for(var l=!1,m;(m=r.next())!=null;){if(m==t&&!l){n.tokenize=h;break}l=(Q||i)&&!l&&m=="\\"}return"string"}}function b(t){return function(i,r){var n=i.match(/^.*?(\/\*|\*\/)/);return n?n[1]=="/*"?r.tokenize=b(t+1):t>1?r.tokenize=b(t-1):r.tokenize=h:i.skipToEnd(),"comment"}}function w(t,i,r){i.context={prev:i.context,indent:t.indentation(),col:t.column(),type:r}}function j(t){t.indent=t.context.indent,t.context=t.context.prev}return{name:"sql",startState:function(){return{tokenize:h,context:null}},token:function(t,i){if(t.sol()&&i.context&&i.context.align==null&&(i.context.align=!1),i.tokenize==h&&t.eatSpace())return null;var r=i.tokenize(t,i);if(r=="comment")return r;i.context&&i.context.align==null&&(i.context.align=!0);var n=t.current();return n=="("?w(t,i,")"):n=="["?w(t,i,"]"):i.context&&i.context.type==n&&j(i),r},indent:function(t,i,r){var n=t.context;if(!n)return null;var l=i.charAt(0)==n.type;return n.align?n.col+(l?0:1):n.indent+(l?0:r.unit)},languageData:{commentTokens:{line:s.commentSlashSlash?"//":s.commentHash?"#":"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}}}function f(a){for(var c;(c=a.next())!=null;)if(c=="`"&&!a.eat("`"))return"string.special";return a.backUp(a.current().length-1),a.eatWhile(/\w/)?"string.special":null}function L(a){for(var c;(c=a.next())!=null;)if(c=='"'&&!a.eat('"'))return"string.special";return a.backUp(a.current().length-1),a.eatWhile(/\w/)?"string.special":null}function u(a){return a.eat("@")&&(a.match("session."),a.match("local."),a.match("global.")),a.eat("'")?(a.match(/^.*'/),"string.special"):a.eat('"')?(a.match(/^.*"/),"string.special"):a.eat("`")?(a.match(/^.*`/),"string.special"):a.match(/^[0-9a-zA-Z$\.\_]+/)?"string.special":null}function q(a){return a.eat("N")?"atom":a.match(/^[a-zA-Z.#!?]/)?"string.special":null}var d="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function e(a){for(var c={},g=a.split(" "),p=0;p<g.length;++p)c[g[p]]=!0;return c}var z="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";const F=o({keywords:e(d+"begin"),builtin:e(z),atoms:e("false true null unknown"),dateSQL:e("date time timestamp"),support:e("ODBCdotTable doubleQuote binaryNumber hexNumber")}),T=o({client:e("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:e(d+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:e("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:e("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:e("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":u}}),O=o({client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(d+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":u,"`":f,"\\":q}}),D=o({client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(d+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":u,"`":f,"\\":q}}),B=o({client:e("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:e(d+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:e("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:e("date time timestamp datetime"),support:e("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":u,":":u,"?":u,$:u,'"':L,"`":f}}),$=o({client:{},keywords:e("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:e("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:e("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:e("commentSlashSlash decimallessFloat"),hooks:{}}),A=o({client:e("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:e("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:e("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:e("date time timestamp"),support:e("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),E=o({keywords:e("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:e("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:e("date timestamp"),support:e("ODBCdotTable doubleQuote binaryNumber hexNumber")}),P=o({client:e("source"),keywords:e(d+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:e("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:e("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),W=o({keywords:e("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:e("false true"),builtin:e("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),H=o({client:e("source"),keywords:e("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:e("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),R=o({keywords:e("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:e("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:e("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable doubleQuote zerolessFloat")}),U=o({client:e("source"),keywords:e("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:e("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:e("time"),support:e("decimallessFloat zerolessFloat binaryNumber hexNumber")});export{$ as cassandra,U as esper,H as gpSQL,W as gql,E as hive,D as mariaDB,T as msSQL,O as mySQL,P as pgSQL,A as plSQL,R as sparkSQL,o as sql,B as sqlite,F as standardSQL};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var e=a("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),r=a("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]),t=a("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);export{r as n,e as r,t};
import{t}from"./createLucideIcon-BCdY6lG5.js";var e=t("square-function",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]]);export{e as t};
import{s as rt,t as st}from"./chunk-LvLJmgfZ.js";var Q=st(((c,h)=>{(function(w,_){typeof c=="object"&&h!==void 0?h.exports=_():typeof define=="function"&&define.amd?define(_):(w=typeof globalThis<"u"?globalThis:w||self).dayjs=_()})(c,(function(){var w=1e3,_=6e4,z=36e5,I="millisecond",k="second",L="minute",Y="hour",D="day",N="week",v="month",V="quarter",S="year",C="date",G="Invalid Date",X=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,tt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,et={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},U=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},nt={s:U,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+U(r,2,"0")+":"+U(e,2,"0")},m:function s(n,t){if(n.date()<t.date())return-s(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,v),i=t-e<0,o=n.clone().add(r+(i?-1:1),v);return+(-(r+(t-e)/(i?e-o:o-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:v,y:S,w:N,d:D,D:C,h:Y,m:L,s:k,ms:I,Q:V}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},W="en",T={};T[W]=et;var P="$isDayjsObject",J=function(s){return s instanceof E||!(!s||!s[P])},j=function s(n,t,r){var e;if(!n)return W;if(typeof n=="string"){var i=n.toLowerCase();T[i]&&(e=i),t&&(T[i]=t,e=i);var o=n.split("-");if(!e&&o.length>1)return s(o[0])}else{var u=n.name;T[u]=n,e=u}return!r&&e&&(W=e),e||!r&&W},l=function(s,n){if(J(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new E(t)},a=nt;a.l=j,a.i=J,a.w=function(s,n){return l(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var E=(function(){function s(t){this.$L=j(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[P]=!0}var n=s.prototype;return n.parse=function(t){this.$d=(function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var o=e.match(X);if(o){var u=o[2]-1||0,f=(o[7]||"0").substring(0,3);return i?new Date(Date.UTC(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,f)):new Date(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,f)}}return new Date(e)})(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==G},n.isSame=function(t,r){var e=l(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return l(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<l(t)},n.$g=function(t,r,e){return a.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,i=!!a.u(r)||r,o=a.p(t),u=function(A,g){var O=a.w(e.$u?Date.UTC(e.$y,g,A):new Date(e.$y,g,A),e);return i?O:O.endOf(D)},f=function(A,g){return a.w(e.toDate()[A].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(g)),e)},d=this.$W,$=this.$M,b=this.$D,H="set"+(this.$u?"UTC":"");switch(o){case S:return i?u(1,0):u(31,11);case v:return i?u(1,$):u(0,$+1);case N:var x=this.$locale().weekStart||0,R=(d<x?d+7:d)-x;return u(i?b-R:b+(6-R),$);case D:case C:return f(H+"Hours",0);case Y:return f(H+"Minutes",1);case L:return f(H+"Seconds",2);case k:return f(H+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,i=a.p(t),o="set"+(this.$u?"UTC":""),u=(e={},e[D]=o+"Date",e[C]=o+"Date",e[v]=o+"Month",e[S]=o+"FullYear",e[Y]=o+"Hours",e[L]=o+"Minutes",e[k]=o+"Seconds",e[I]=o+"Milliseconds",e)[i],f=i===D?this.$D+(r-this.$W):r;if(i===v||i===S){var d=this.clone().set(C,1);d.$d[u](f),d.init(),this.$d=d.set(C,Math.min(this.$D,d.daysInMonth())).$d}else u&&this.$d[u](f);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[a.p(t)]()},n.add=function(t,r){var e,i=this;t=Number(t);var o=a.p(r),u=function($){var b=l(i);return a.w(b.date(b.date()+Math.round($*t)),i)};if(o===v)return this.set(v,this.$M+t);if(o===S)return this.set(S,this.$y+t);if(o===D)return u(1);if(o===N)return u(7);var f=(e={},e[L]=_,e[Y]=z,e[k]=w,e)[o]||1,d=this.$d.getTime()+t*f;return a.w(d,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||G;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=a.z(this),u=this.$H,f=this.$m,d=this.$M,$=e.weekdays,b=e.months,H=e.meridiem,x=function(g,O,B,F){return g&&(g[O]||g(r,i))||B[O].slice(0,F)},R=function(g){return a.s(u%12||12,g,"0")},A=H||function(g,O,B){var F=g<12?"AM":"PM";return B?F.toLowerCase():F};return i.replace(tt,(function(g,O){return O||(function(B){switch(B){case"YY":return String(r.$y).slice(-2);case"YYYY":return a.s(r.$y,4,"0");case"M":return d+1;case"MM":return a.s(d+1,2,"0");case"MMM":return x(e.monthsShort,d,b,3);case"MMMM":return x(b,d);case"D":return r.$D;case"DD":return a.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return x(e.weekdaysMin,r.$W,$,2);case"ddd":return x(e.weekdaysShort,r.$W,$,3);case"dddd":return $[r.$W];case"H":return String(u);case"HH":return a.s(u,2,"0");case"h":return R(1);case"hh":return R(2);case"a":return A(u,f,!0);case"A":return A(u,f,!1);case"m":return String(f);case"mm":return a.s(f,2,"0");case"s":return String(r.$s);case"ss":return a.s(r.$s,2,"0");case"SSS":return a.s(r.$ms,3,"0");case"Z":return o}return null})(g)||o.replace(":","")}))},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var i,o=this,u=a.p(r),f=l(t),d=(f.utcOffset()-this.utcOffset())*_,$=this-f,b=function(){return a.m(o,f)};switch(u){case S:i=b()/12;break;case v:i=b();break;case V:i=b()/3;break;case N:i=($-d)/6048e5;break;case D:i=($-d)/864e5;break;case Y:i=$/z;break;case L:i=$/_;break;case k:i=$/w;break;default:i=$}return e?i:a.a(i)},n.daysInMonth=function(){return this.endOf(v).$D},n.$locale=function(){return T[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),i=j(t,r,!0);return i&&(e.$L=i),e},n.clone=function(){return a.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},s})(),q=E.prototype;return l.prototype=q,[["$ms",I],["$s",k],["$m",L],["$H",Y],["$W",D],["$M",v],["$y",S],["$D",C]].forEach((function(s){q[s[1]]=function(n){return this.$g(n,s[0],s[1])}})),l.extend=function(s,n){return s.$i||(s.$i=(s(n,E,l),!0)),l},l.locale=j,l.isDayjs=J,l.unix=function(s){return l(1e3*s)},l.en=T[W],l.Ls=T,l.p={},l}))})),it=rt(Q(),1),K=Object.defineProperty,p=(c,h)=>K(c,"name",{value:h,configurable:!0}),ot=(c,h)=>{for(var w in h)K(c,w,{get:h[w],enumerable:!0})},M={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},m={trace:p((...c)=>{},"trace"),debug:p((...c)=>{},"debug"),info:p((...c)=>{},"info"),warn:p((...c)=>{},"warn"),error:p((...c)=>{},"error"),fatal:p((...c)=>{},"fatal")},at=p(function(c="fatal"){let h=M.fatal;typeof c=="string"?c.toLowerCase()in M&&(h=M[c]):typeof c=="number"&&(h=c),m.trace=()=>{},m.debug=()=>{},m.info=()=>{},m.warn=()=>{},m.error=()=>{},m.fatal=()=>{},h<=M.fatal&&(m.fatal=console.error?console.error.bind(console,y("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",y("FATAL"))),h<=M.error&&(m.error=console.error?console.error.bind(console,y("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",y("ERROR"))),h<=M.warn&&(m.warn=console.warn?console.warn.bind(console,y("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",y("WARN"))),h<=M.info&&(m.info=console.info?console.info.bind(console,y("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",y("INFO"))),h<=M.debug&&(m.debug=console.debug?console.debug.bind(console,y("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",y("DEBUG"))),h<=M.trace&&(m.trace=console.debug?console.debug.bind(console,y("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",y("TRACE")))},"setLogLevel"),y=p(c=>`%c${(0,it.default)().format("ss.SSS")} : ${c} : `,"format"),{abs:ct,max:ft,min:lt}=Math;["w","e"].map(Z),["n","s"].map(Z),["n","w","e","s","nw","ne","sw","se"].map(Z);function Z(c){return{type:c}}export{Q as a,at as i,p as n,m as r,ot as t};
import{_ as ht,b as lt,c as It,f as Ot,l as Ut,m as ft,n as Rt,p as jt,r as Gt,s as Ht,t as Kt}from"./timer-B6DpdVnC.js";var pt={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function W(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),pt.hasOwnProperty(n)?{space:pt[n],local:t}:t}function Wt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e==="http://www.w3.org/1999/xhtml"&&n.documentElement.namespaceURI==="http://www.w3.org/1999/xhtml"?n.createElement(t):n.createElementNS(e,t)}}function $t(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function mt(t){var n=W(t);return(n.local?$t:Wt)(n)}function Ft(){}function rt(t){return t==null?Ft:function(){return this.querySelector(t)}}function Jt(t){typeof t!="function"&&(t=rt(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=Array(u),c,l,f=0;f<u;++f)(c=o[f])&&(l=t.call(c,c.__data__,f,o))&&("__data__"in c&&(l.__data__=c.__data__),a[f]=l);return new S(r,this._parents)}function Qt(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Zt(){return[]}function vt(t){return t==null?Zt:function(){return this.querySelectorAll(t)}}function tn(t){return function(){return Qt(t.apply(this,arguments))}}function nn(t){t=typeof t=="function"?tn(t):vt(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u=n[o],a=u.length,c,l=0;l<a;++l)(c=u[l])&&(r.push(t.call(c,c.__data__,l,u)),i.push(c));return new S(r,i)}function _t(t){return function(){return this.matches(t)}}function gt(t){return function(n){return n.matches(t)}}var en=Array.prototype.find;function rn(t){return function(){return en.call(this.children,t)}}function on(){return this.firstElementChild}function un(t){return this.select(t==null?on:rn(typeof t=="function"?t:gt(t)))}var sn=Array.prototype.filter;function an(){return Array.from(this.children)}function cn(t){return function(){return sn.call(this.children,t)}}function hn(t){return this.selectAll(t==null?an:cn(typeof t=="function"?t:gt(t)))}function ln(t){typeof t!="function"&&(t=_t(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=[],c,l=0;l<u;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&a.push(c);return new S(r,this._parents)}function dt(t){return Array(t.length)}function fn(){return new S(this._enter||this._groups.map(dt),this._parents)}function $(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}$.prototype={constructor:$,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function pn(t){return function(){return t}}function mn(t,n,e,r,i,o){for(var u=0,a,c=n.length,l=o.length;u<l;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new $(t,o[u]);for(;u<c;++u)(a=n[u])&&(i[u]=a)}function vn(t,n,e,r,i,o,u){var a,c,l=new Map,f=n.length,x=o.length,d=Array(f),_;for(a=0;a<f;++a)(c=n[a])&&(d[a]=_=u.call(c,c.__data__,a,n)+"",l.has(_)?i[a]=c:l.set(_,c));for(a=0;a<x;++a)_=u.call(t,o[a],a,o)+"",(c=l.get(_))?(r[a]=c,c.__data__=o[a],l.delete(_)):e[a]=new $(t,o[a]);for(a=0;a<f;++a)(c=n[a])&&l.get(d[a])===c&&(i[a]=c)}function _n(t){return t.__data__}function gn(t,n){if(!arguments.length)return Array.from(this,_n);var e=n?vn:mn,r=this._parents,i=this._groups;typeof t!="function"&&(t=pn(t));for(var o=i.length,u=Array(o),a=Array(o),c=Array(o),l=0;l<o;++l){var f=r[l],x=i[l],d=x.length,_=dn(t.call(f,f&&f.__data__,l,r)),E=_.length,k=a[l]=Array(E),I=u[l]=Array(E);e(f,x,k,I,c[l]=Array(d),_,n);for(var v=0,B=0,O,j;v<E;++v)if(O=k[v]){for(v>=B&&(B=v+1);!(j=I[B])&&++B<E;);O._next=j||null}}return u=new S(u,r),u._enter=a,u._exit=c,u}function dn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yn(){return new S(this._exit||this._groups.map(dt),this._parents)}function wn(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function xn(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,u=Math.min(i,o),a=Array(i),c=0;c<u;++c)for(var l=e[c],f=r[c],x=l.length,d=a[c]=Array(x),_,E=0;E<x;++E)(_=l[E]||f[E])&&(d[E]=_);for(;c<i;++c)a[c]=e[c];return new S(a,this._parents)}function An(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],u;--i>=0;)(u=r[i])&&(o&&u.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(u,o),o=u);return this}function bn(t){t||(t=zn);function n(x,d){return x&&d?t(x.__data__,d.__data__):!x-!d}for(var e=this._groups,r=e.length,i=Array(r),o=0;o<r;++o){for(var u=e[o],a=u.length,c=i[o]=Array(a),l,f=0;f<a;++f)(l=u[f])&&(c[f]=l);c.sort(n)}return new S(i,this._parents).order()}function zn(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function En(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Sn(){return Array.from(this)}function kn(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null}function Tn(){let t=0;for(let n of this)++t;return t}function Cn(){return!this.node()}function Mn(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,u=i.length,a;o<u;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function Nn(t){return function(){this.removeAttribute(t)}}function Pn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bn(t,n){return function(){this.setAttribute(t,n)}}function Vn(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Dn(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Xn(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Yn(t,n){var e=W(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Pn:Nn:typeof n=="function"?e.local?Xn:Dn:e.local?Vn:Bn)(e,n))}function yt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ln(t){return function(){this.style.removeProperty(t)}}function qn(t,n,e){return function(){this.style.setProperty(t,n,e)}}function In(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function On(t,n,e){return arguments.length>1?this.each((n==null?Ln:typeof n=="function"?In:qn)(t,n,e??"")):G(this.node(),t)}function G(t,n){return t.style.getPropertyValue(n)||yt(t).getComputedStyle(t,null).getPropertyValue(n)}function Un(t){return function(){delete this[t]}}function Rn(t,n){return function(){this[t]=n}}function jn(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function Gn(t,n){return arguments.length>1?this.each((n==null?Un:typeof n=="function"?jn:Rn)(t,n)):this.node()[t]}function wt(t){return t.trim().split(/^|\s+/)}function it(t){return t.classList||new xt(t)}function xt(t){this._node=t,this._names=wt(t.getAttribute("class")||"")}xt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function At(t,n){for(var e=it(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function bt(t,n){for(var e=it(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Hn(t){return function(){At(this,t)}}function Kn(t){return function(){bt(this,t)}}function Wn(t,n){return function(){(n.apply(this,arguments)?At:bt)(this,t)}}function $n(t,n){var e=wt(t+"");if(arguments.length<2){for(var r=it(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?Wn:n?Hn:Kn)(e,n))}function Fn(){this.textContent=""}function Jn(t){return function(){this.textContent=t}}function Qn(t){return function(){this.textContent=t.apply(this,arguments)??""}}function Zn(t){return arguments.length?this.each(t==null?Fn:(typeof t=="function"?Qn:Jn)(t)):this.node().textContent}function te(){this.innerHTML=""}function ne(t){return function(){this.innerHTML=t}}function ee(t){return function(){this.innerHTML=t.apply(this,arguments)??""}}function re(t){return arguments.length?this.each(t==null?te:(typeof t=="function"?ee:ne)(t)):this.node().innerHTML}function ie(){this.nextSibling&&this.parentNode.appendChild(this)}function oe(){return this.each(ie)}function ue(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function se(){return this.each(ue)}function ae(t){var n=typeof t=="function"?t:mt(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ce(){return null}function he(t,n){var e=typeof t=="function"?t:mt(t),r=n==null?ce:typeof n=="function"?n:rt(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function le(){var t=this.parentNode;t&&t.removeChild(this)}function fe(){return this.each(le)}function pe(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function me(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ve(t){return this.select(t?me:pe)}function _e(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ge(t){return function(n){t.call(this,n,this.__data__)}}function de(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function ye(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function we(t,n,e){return function(){var r=this.__on,i,o=ge(n);if(r){for(var u=0,a=r.length;u<a;++u)if((i=r[u]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function xe(t,n,e){var r=de(t+""),i,o=r.length,u;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,f;c<l;++c)for(i=0,f=a[c];i<o;++i)if((u=r[i]).type===f.type&&u.name===f.name)return f.value}return}for(a=n?we:ye,i=0;i<o;++i)this.each(a(r[i],n,e));return this}function zt(t,n,e){var r=yt(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Ae(t,n){return function(){return zt(this,t,n)}}function be(t,n){return function(){return zt(this,t,n.apply(this,arguments))}}function ze(t,n){return this.each((typeof n=="function"?be:Ae)(t,n))}function*Ee(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,u;i<o;++i)(u=r[i])&&(yield u)}var Et=[null];function S(t,n){this._groups=t,this._parents=n}function St(){return new S([[document.documentElement]],Et)}function Se(){return this}S.prototype=St.prototype={constructor:S,select:Jt,selectAll:nn,selectChild:un,selectChildren:hn,filter:ln,data:gn,enter:fn,exit:yn,join:wn,merge:xn,selection:Se,order:An,sort:bn,call:En,nodes:Sn,node:kn,size:Tn,empty:Cn,each:Mn,attr:Yn,style:On,property:Gn,classed:$n,text:Zn,html:re,raise:oe,lower:se,append:ae,insert:he,remove:fe,clone:ve,datum:_e,on:xe,dispatch:ze,[Symbol.iterator]:Ee};var H=St;function U(t){return typeof t=="string"?new S([[document.querySelector(t)]],[document.documentElement]):new S([[t]],Et)}function ke(t){let n;for(;n=t.sourceEvent;)t=n;return t}function R(t,n){if(t=ke(t),n===void 0&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}const Te={passive:!1},F={capture:!0,passive:!1};function Ce(t){t.stopImmediatePropagation()}function J(t){t.preventDefault(),t.stopImmediatePropagation()}function kt(t){var n=t.document.documentElement,e=U(t).on("dragstart.drag",J,F);"onselectstart"in n?e.on("selectstart.drag",J,F):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Tt(t,n){var e=t.document.documentElement,r=U(t).on("dragstart.drag",null);n&&(r.on("click.drag",J,F),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function Ct(t,n,e){var r=new Kt;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var Me=lt("start","end","cancel","interrupt"),Ne=[];function Q(t,n,e,r,i,o){var u=t.__transition;if(!u)t.__transition={};else if(e in u)return;Pe(t,e,{name:n,index:r,group:i,on:Me,tween:Ne,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function ot(t,n){var e=M(t,n);if(e.state>0)throw Error("too late; already scheduled");return e}function P(t,n){var e=M(t,n);if(e.state>3)throw Error("too late; already running");return e}function M(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw Error("transition not found");return e}function Pe(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=Gt(o,0,e.time);function o(l){e.state=1,e.timer.restart(u,e.delay,e.time),e.delay<=l&&u(l-e.delay)}function u(l){var f,x,d,_;if(e.state!==1)return c();for(f in r)if(_=r[f],_.name===e.name){if(_.state===3)return Ct(u);_.state===4?(_.state=6,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete r[f]):+f<n&&(_.state=6,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete r[f])}if(Ct(function(){e.state===3&&(e.state=4,e.timer.restart(a,e.delay,e.time),a(l))}),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),e.state===2){for(e.state=3,i=Array(d=e.tween.length),f=0,x=-1;f<d;++f)(_=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(i[++x]=_);i.length=x+1}}function a(l){for(var f=l<e.duration?e.ease.call(null,l/e.duration):(e.timer.restart(c),e.state=5,1),x=-1,d=i.length;++x<d;)i[x].call(t,f);e.state===5&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){for(var l in e.state=6,e.timer.stop(),delete r[n],r)return;delete t.__transition}}function Z(t,n){var e=t.__transition,r,i,o=!0,u;if(e){for(u in n=n==null?null:n+"",e){if((r=e[u]).name!==n){o=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[u]}o&&delete t.__transition}}function Be(t){return this.each(function(){Z(this,t)})}function Ve(t,n){var e,r;return function(){var i=P(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,a=r.length;u<a;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function De(t,n,e){var r,i;if(typeof e!="function")throw Error();return function(){var o=P(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},c=0,l=i.length;c<l;++c)if(i[c].name===n){i[c]=a;break}c===l&&i.push(a)}o.tween=i}}function Xe(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=M(this.node(),e).tween,i=0,o=r.length,u;i<o;++i)if((u=r[i]).name===t)return u.value;return null}return this.each((n==null?Ve:De)(e,t,n))}function ut(t,n,e){var r=t._id;return t.each(function(){var i=P(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return M(i,r).value[n]}}function Mt(t,n){var e;return(typeof n=="number"?jt:n instanceof ht?ft:(e=ht(n))?(n=e,ft):Ot)(t,n)}function Ye(t){return function(){this.removeAttribute(t)}}function Le(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qe(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttribute(t);return u===i?null:u===r?o:o=n(r=u,e)}}function Ie(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttributeNS(t.space,t.local);return u===i?null:u===r?o:o=n(r=u,e)}}function Oe(t,n,e){var r,i,o;return function(){var u,a=e(this),c;return a==null?void this.removeAttribute(t):(u=this.getAttribute(t),c=a+"",u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,a)))}}function Ue(t,n,e){var r,i,o;return function(){var u,a=e(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),c=a+"",u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,a)))}}function Re(t,n){var e=W(t),r=e==="transform"?Ut:Mt;return this.attrTween(t,typeof n=="function"?(e.local?Ue:Oe)(e,r,ut(this,"attr."+t,n)):n==null?(e.local?Le:Ye)(e):(e.local?Ie:qe)(e,r,n))}function je(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Ge(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function He(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&Ge(t,o)),e}return i._value=n,i}function Ke(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&je(t,o)),e}return i._value=n,i}function We(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw Error();var r=W(t);return this.tween(e,(r.local?He:Ke)(r,n))}function $e(t,n){return function(){ot(this,t).delay=+n.apply(this,arguments)}}function Fe(t,n){return n=+n,function(){ot(this,t).delay=n}}function Je(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?$e:Fe)(n,t)):M(this.node(),n).delay}function Qe(t,n){return function(){P(this,t).duration=+n.apply(this,arguments)}}function Ze(t,n){return n=+n,function(){P(this,t).duration=n}}function tr(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Qe:Ze)(n,t)):M(this.node(),n).duration}function nr(t,n){if(typeof n!="function")throw Error();return function(){P(this,t).ease=n}}function er(t){var n=this._id;return arguments.length?this.each(nr(n,t)):M(this.node(),n).ease}function rr(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw Error();P(this,t).ease=e}}function ir(t){if(typeof t!="function")throw Error();return this.each(rr(this._id,t))}function or(t){typeof t!="function"&&(t=_t(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=[],c,l=0;l<u;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&a.push(c);return new Y(r,this._parents,this._name,this._id)}function ur(t){if(t._id!==this._id)throw Error();for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=Array(r),a=0;a<o;++a)for(var c=n[a],l=e[a],f=c.length,x=u[a]=Array(f),d,_=0;_<f;++_)(d=c[_]||l[_])&&(x[_]=d);for(;a<r;++a)u[a]=n[a];return new Y(u,this._parents,this._name,this._id)}function sr(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function ar(t,n,e){var r,i,o=sr(n)?ot:P;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function cr(t,n){var e=this._id;return arguments.length<2?M(this.node(),e).on.on(t):this.each(ar(e,t,n))}function hr(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function lr(){return this.on("end.remove",hr(this._id))}function fr(t){var n=this._name,e=this._id;typeof t!="function"&&(t=rt(t));for(var r=this._groups,i=r.length,o=Array(i),u=0;u<i;++u)for(var a=r[u],c=a.length,l=o[u]=Array(c),f,x,d=0;d<c;++d)(f=a[d])&&(x=t.call(f,f.__data__,d,a))&&("__data__"in f&&(x.__data__=f.__data__),l[d]=x,Q(l[d],n,e,d,l,M(f,e)));return new Y(o,this._parents,n,e)}function pr(t){var n=this._name,e=this._id;typeof t!="function"&&(t=vt(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var c=r[a],l=c.length,f,x=0;x<l;++x)if(f=c[x]){for(var d=t.call(f,f.__data__,x,c),_,E=M(f,e),k=0,I=d.length;k<I;++k)(_=d[k])&&Q(_,n,e,k,d,E);o.push(d),u.push(f)}return new Y(o,u,n,e)}var mr=H.prototype.constructor;function vr(){return new mr(this._groups,this._parents)}function _r(t,n){var e,r,i;return function(){var o=G(this,t),u=(this.style.removeProperty(t),G(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}function Nt(t){return function(){this.style.removeProperty(t)}}function gr(t,n,e){var r,i=e+"",o;return function(){var u=G(this,t);return u===i?null:u===r?o:o=n(r=u,e)}}function dr(t,n,e){var r,i,o;return function(){var u=G(this,t),a=e(this),c=a+"";return a??(c=a=(this.style.removeProperty(t),G(this,t))),u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,a))}}function yr(t,n){var e,r,i,o="style."+n,u="end."+o,a;return function(){var c=P(this,t),l=c.on,f=c.value[o]==null?a||(a=Nt(n)):void 0;(l!==e||i!==f)&&(r=(e=l).copy()).on(u,i=f),c.on=r}}function wr(t,n,e){var r=(t+="")=="transform"?It:Mt;return n==null?this.styleTween(t,_r(t,r)).on("end.style."+t,Nt(t)):typeof n=="function"?this.styleTween(t,dr(t,r,ut(this,"style."+t,n))).each(yr(this._id,t)):this.styleTween(t,gr(t,r,n),e).on("end.style."+t,null)}function xr(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Ar(t,n,e){var r,i;function o(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&xr(t,u,e)),r}return o._value=n,o}function br(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw Error();return this.tween(r,Ar(t,n,e??""))}function zr(t){return function(){this.textContent=t}}function Er(t){return function(){this.textContent=t(this)??""}}function Sr(t){return this.tween("text",typeof t=="function"?Er(ut(this,"text",t)):zr(t==null?"":t+""))}function kr(t){return function(n){this.textContent=t.call(this,n)}}function Tr(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&kr(i)),n}return r._value=t,r}function Cr(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw Error();return this.tween(n,Tr(t))}function Mr(){for(var t=this._name,n=this._id,e=Pt(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],a=u.length,c,l=0;l<a;++l)if(c=u[l]){var f=M(c,n);Q(c,t,e,l,u,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Y(r,this._parents,t,e)}function Nr(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,u){var a={value:u},c={value:function(){--i===0&&o()}};e.each(function(){var l=P(this,r),f=l.on;f!==t&&(n=(t=f).copy(),n._.cancel.push(a),n._.interrupt.push(a),n._.end.push(c)),l.on=n}),i===0&&o()})}var Pr=0;function Y(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Br(t){return H().transition(t)}function Pt(){return++Pr}var L=H.prototype;Y.prototype=Br.prototype={constructor:Y,select:fr,selectAll:pr,selectChild:L.selectChild,selectChildren:L.selectChildren,filter:or,merge:ur,selection:vr,transition:Mr,call:L.call,nodes:L.nodes,node:L.node,size:L.size,empty:L.empty,each:L.each,on:cr,attr:Re,attrTween:We,style:wr,styleTween:br,text:Sr,textTween:Cr,remove:lr,tween:Xe,delay:Je,duration:tr,ease:er,easeVarying:ir,end:Nr,[Symbol.iterator]:L[Symbol.iterator]};function Vr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Dr={time:null,delay:0,duration:250,ease:Vr};function Xr(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw Error(`transition ${n} not found`);return e}function Yr(t){var n,e;t instanceof Y?(n=t._id,t=t._name):(n=Pt(),(e=Dr).time=Rt(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],a=u.length,c,l=0;l<a;++l)(c=u[l])&&Q(c,t,n,l,u,e||Xr(c,n));return new Y(r,this._parents,t,n)}H.prototype.interrupt=Be,H.prototype.transition=Yr;var tt=t=>()=>t;function Lr(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function q(t,n,e){this.k=t,this.x=n,this.y=e}q.prototype={constructor:q,scale:function(t){return t===1?this:new q(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new q(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nt=new q(1,0,0);qr.prototype=q.prototype;function qr(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nt;return t.__zoom}function st(t){t.stopImmediatePropagation()}function K(t){t.preventDefault(),t.stopImmediatePropagation()}function Ir(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Or(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Bt(){return this.__zoom||nt}function Ur(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Rr(){return navigator.maxTouchPoints||"ontouchstart"in this}function jr(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],u=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}function Gr(){var t=Ir,n=Or,e=jr,r=Ur,i=Rr,o=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],a=250,c=Ht,l=lt("start","zoom","end"),f,x,d,_=500,E=150,k=0,I=10;function v(s){s.property("__zoom",Bt).on("wheel.zoom",Vt,{passive:!1}).on("mousedown.zoom",Dt).on("dblclick.zoom",Xt).filter(i).on("touchstart.zoom",Yt).on("touchmove.zoom",Lt).on("touchend.zoom touchcancel.zoom",qt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(s,p,h,m){var g=s.selection?s.selection():s;g.property("__zoom",Bt),s===g?g.interrupt().each(function(){V(this,arguments).event(m).start().zoom(null,typeof p=="function"?p.apply(this,arguments):p).end()}):at(s,p,h,m)},v.scaleBy=function(s,p,h,m){v.scaleTo(s,function(){return this.__zoom.k*(typeof p=="function"?p.apply(this,arguments):p)},h,m)},v.scaleTo=function(s,p,h,m){v.transform(s,function(){var g=n.apply(this,arguments),w=this.__zoom,y=h==null?j(g):typeof h=="function"?h.apply(this,arguments):h,A=w.invert(y),b=typeof p=="function"?p.apply(this,arguments):p;return e(O(B(w,b),y,A),g,u)},h,m)},v.translateBy=function(s,p,h,m){v.transform(s,function(){return e(this.__zoom.translate(typeof p=="function"?p.apply(this,arguments):p,typeof h=="function"?h.apply(this,arguments):h),n.apply(this,arguments),u)},null,m)},v.translateTo=function(s,p,h,m,g){v.transform(s,function(){var w=n.apply(this,arguments),y=this.__zoom,A=m==null?j(w):typeof m=="function"?m.apply(this,arguments):m;return e(nt.translate(A[0],A[1]).scale(y.k).translate(typeof p=="function"?-p.apply(this,arguments):-p,typeof h=="function"?-h.apply(this,arguments):-h),w,u)},m,g)};function B(s,p){return p=Math.max(o[0],Math.min(o[1],p)),p===s.k?s:new q(p,s.x,s.y)}function O(s,p,h){var m=p[0]-h[0]*s.k,g=p[1]-h[1]*s.k;return m===s.x&&g===s.y?s:new q(s.k,m,g)}function j(s){return[(+s[0][0]+ +s[1][0])/2,(+s[0][1]+ +s[1][1])/2]}function at(s,p,h,m){s.on("start.zoom",function(){V(this,arguments).event(m).start()}).on("interrupt.zoom end.zoom",function(){V(this,arguments).event(m).end()}).tween("zoom",function(){var g=this,w=arguments,y=V(g,w).event(m),A=n.apply(g,w),b=h==null?j(A):typeof h=="function"?h.apply(g,w):h,N=Math.max(A[1][0]-A[0][0],A[1][1]-A[0][1]),z=g.__zoom,T=typeof p=="function"?p.apply(g,w):p,D=c(z.invert(b).concat(N/z.k),T.invert(b).concat(N/T.k));return function(C){if(C===1)C=T;else{var X=D(C),et=N/X[2];C=new q(et,b[0]-X[0]*et,b[1]-X[1]*et)}y.zoom(null,C)}})}function V(s,p,h){return!h&&s.__zooming||new ct(s,p)}function ct(s,p){this.that=s,this.args=p,this.active=0,this.sourceEvent=null,this.extent=n.apply(s,p),this.taps=0}ct.prototype={event:function(s){return s&&(this.sourceEvent=s),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(s,p){return this.mouse&&s!=="mouse"&&(this.mouse[1]=p.invert(this.mouse[0])),this.touch0&&s!=="touch"&&(this.touch0[1]=p.invert(this.touch0[0])),this.touch1&&s!=="touch"&&(this.touch1[1]=p.invert(this.touch1[0])),this.that.__zoom=p,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(s){var p=U(this.that).datum();l.call(s,this.that,new Lr(s,{sourceEvent:this.sourceEvent,target:v,type:s,transform:this.that.__zoom,dispatch:l}),p)}};function Vt(s,...p){if(!t.apply(this,arguments))return;var h=V(this,p).event(s),m=this.__zoom,g=Math.max(o[0],Math.min(o[1],m.k*2**r.apply(this,arguments))),w=R(s);if(h.wheel)(h.mouse[0][0]!==w[0]||h.mouse[0][1]!==w[1])&&(h.mouse[1]=m.invert(h.mouse[0]=w)),clearTimeout(h.wheel);else{if(m.k===g)return;h.mouse=[w,m.invert(w)],Z(this),h.start()}K(s),h.wheel=setTimeout(y,E),h.zoom("mouse",e(O(B(m,g),h.mouse[0],h.mouse[1]),h.extent,u));function y(){h.wheel=null,h.end()}}function Dt(s,...p){if(d||!t.apply(this,arguments))return;var h=s.currentTarget,m=V(this,p,!0).event(s),g=U(s.view).on("mousemove.zoom",b,!0).on("mouseup.zoom",N,!0),w=R(s,h),y=s.clientX,A=s.clientY;kt(s.view),st(s),m.mouse=[w,this.__zoom.invert(w)],Z(this),m.start();function b(z){if(K(z),!m.moved){var T=z.clientX-y,D=z.clientY-A;m.moved=T*T+D*D>k}m.event(z).zoom("mouse",e(O(m.that.__zoom,m.mouse[0]=R(z,h),m.mouse[1]),m.extent,u))}function N(z){g.on("mousemove.zoom mouseup.zoom",null),Tt(z.view,m.moved),K(z),m.event(z).end()}}function Xt(s,...p){if(t.apply(this,arguments)){var h=this.__zoom,m=R(s.changedTouches?s.changedTouches[0]:s,this),g=h.invert(m),w=h.k*(s.shiftKey?.5:2),y=e(O(B(h,w),m,g),n.apply(this,p),u);K(s),a>0?U(this).transition().duration(a).call(at,y,m,s):U(this).call(v.transform,y,m,s)}}function Yt(s,...p){if(t.apply(this,arguments)){var h=s.touches,m=h.length,g=V(this,p,s.changedTouches.length===m).event(s),w,y,A,b;for(st(s),y=0;y<m;++y)A=h[y],b=R(A,this),b=[b,this.__zoom.invert(b),A.identifier],g.touch0?!g.touch1&&g.touch0[2]!==b[2]&&(g.touch1=b,g.taps=0):(g.touch0=b,w=!0,g.taps=1+!!f);f&&(f=clearTimeout(f)),w&&(g.taps<2&&(x=b[0],f=setTimeout(function(){f=null},_)),Z(this),g.start())}}function Lt(s,...p){if(this.__zooming){var h=V(this,p).event(s),m=s.changedTouches,g=m.length,w,y,A,b;for(K(s),w=0;w<g;++w)y=m[w],A=R(y,this),h.touch0&&h.touch0[2]===y.identifier?h.touch0[0]=A:h.touch1&&h.touch1[2]===y.identifier&&(h.touch1[0]=A);if(y=h.that.__zoom,h.touch1){var N=h.touch0[0],z=h.touch0[1],T=h.touch1[0],D=h.touch1[1],C=(C=T[0]-N[0])*C+(C=T[1]-N[1])*C,X=(X=D[0]-z[0])*X+(X=D[1]-z[1])*X;y=B(y,Math.sqrt(C/X)),A=[(N[0]+T[0])/2,(N[1]+T[1])/2],b=[(z[0]+D[0])/2,(z[1]+D[1])/2]}else if(h.touch0)A=h.touch0[0],b=h.touch0[1];else return;h.zoom("touch",e(O(y,A,b),h.extent,u))}}function qt(s,...p){if(this.__zooming){var h=V(this,p).event(s),m=s.changedTouches,g=m.length,w,y;for(st(s),d&&clearTimeout(d),d=setTimeout(function(){d=null},_),w=0;w<g;++w)y=m[w],h.touch0&&h.touch0[2]===y.identifier?delete h.touch0:h.touch1&&h.touch1[2]===y.identifier&&delete h.touch1;if(h.touch1&&!h.touch0&&(h.touch0=h.touch1,delete h.touch1),h.touch0)h.touch0[1]=this.__zoom.invert(h.touch0[0]);else if(h.end(),h.taps===2&&(y=R(y,this),Math.hypot(x[0]-y[0],x[1]-y[1])<I)){var A=U(this).on("dblclick.zoom");A&&A.apply(this,arguments)}}}return v.wheelDelta=function(s){return arguments.length?(r=typeof s=="function"?s:tt(+s),v):r},v.filter=function(s){return arguments.length?(t=typeof s=="function"?s:tt(!!s),v):t},v.touchable=function(s){return arguments.length?(i=typeof s=="function"?s:tt(!!s),v):i},v.extent=function(s){return arguments.length?(n=typeof s=="function"?s:tt([[+s[0][0],+s[0][1]],[+s[1][0],+s[1][1]]]),v):n},v.scaleExtent=function(s){return arguments.length?(o[0]=+s[0],o[1]=+s[1],v):[o[0],o[1]]},v.translateExtent=function(s){return arguments.length?(u[0][0]=+s[0][0],u[1][0]=+s[1][0],u[0][1]=+s[0][1],u[1][1]=+s[1][1],v):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},v.constrain=function(s){return arguments.length?(e=s,v):e},v.duration=function(s){return arguments.length?(a=+s,v):a},v.interpolate=function(s){return arguments.length?(c=s,v):c},v.on=function(){var s=l.on.apply(l,arguments);return s===l?v:s},v.clickDistance=function(s){return arguments.length?(k=(s=+s)*s,v):Math.sqrt(k)},v.tapDistance=function(s){return arguments.length?(I=+s,v):I},v}export{J as a,Ce as c,Tt as i,R as l,nt as n,Te as o,kt as r,F as s,Gr as t,U as u};
import{s as d}from"./chunk-LvLJmgfZ.js";import{t as m}from"./react-Bj1aDYRI.js";var e=d(m(),1),f={prefix:String(Math.round(Math.random()*1e10)),current:0},l=e.createContext(f),p=e.createContext(!1);typeof window<"u"&&window.document&&window.document.createElement;var c=new WeakMap;function x(t=!1){var u,i;let r=(0,e.useContext)(l),n=(0,e.useRef)(null);if(n.current===null&&!t){let a=(i=(u=e.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:u.ReactCurrentOwner)==null?void 0:i.current;if(a){let o=c.get(a);o==null?c.set(a,{id:r.current,state:a.memoizedState}):a.memoizedState!==o.state&&(r.current=o.id,c.delete(a))}n.current=++r.current}return n.current}function S(t){let r=(0,e.useContext)(l),n=x(!!t),u=`react-aria${r.prefix}`;return t||`${u}-${n}`}function _(t){let r=e.useId(),[n]=(0,e.useState)(s()),u=n?"react-aria":`react-aria${f.prefix}`;return t||`${u}-${r}`}var E=typeof e.useId=="function"?_:S;function w(){return!1}function C(){return!0}function R(t){return()=>{}}function s(){return typeof e.useSyncExternalStore=="function"?e.useSyncExternalStore(R,w,C):(0,e.useContext)(p)}export{E as n,s as t};
import{u as o}from"./useEvent-BhXAndur.js";import{t}from"./createReducer-B3rBsy4P.js";import{t as a}from"./uuid-DXdzqzcr.js";function d(){return{pendingCommands:[],isReady:!1}}var{reducer:f,createActions:g,valueAtom:r,useActions:i}=t(d,{addCommand:(n,m)=>{let e={id:a(),text:m,timestamp:Date.now()};return{...n,pendingCommands:[...n.pendingCommands,e]}},removeCommand:(n,m)=>({...n,pendingCommands:n.pendingCommands.filter(e=>e.id!==m)}),setReady:(n,m)=>({...n,isReady:m}),clearCommands:n=>({...n,pendingCommands:[]})});const s=()=>o(r);function p(){return i()}export{s as n,p as t};
import{p as i}from"./useEvent-BhXAndur.js";import{Xr as l,gn as h,hn as o}from"./cells-DPp5cDaO.js";import{d as m}from"./once-Bul8mtFs.js";import{t as d}from"./createLucideIcon-BCdY6lG5.js";var p=d("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),f="marimo:ai:chatState:v5";const v=i(null),u=l("marimo:ai:includeOtherCells",!0,h);function C(a){let t=new Map;for(let[s,e]of a.entries()){if(e.messages.length===0)continue;let c=m(e.messages,n=>n.id);t.set(s,{...e,messages:c})}return t}const r=l(f,{chats:new Map,activeChatId:null},o({toSerializable:a=>({chats:[...C(a.chats).entries()],activeChatId:a.activeChatId}),fromSerializable:a=>({chats:new Map(a.chats),activeChatId:a.activeChatId})})),g=i(a=>{let t=a(r);return t.activeChatId?t.chats.get(t.activeChatId):null},(a,t,s)=>{t(r,e=>({...e,activeChatId:s}))});export{p as a,u as i,v as n,r,g as t};
import{t as A}from"./graphlib-B4SLw_H3.js";import{t as G}from"./dagre-DFula7I5.js";import"./purify.es-DZrAQFIu.js";import{u as H}from"./src-CvyFXpBy.js";import{_ as O}from"./step-CVy5FnKg.js";import{t as P}from"./line-BA7eTS55.js";import{g as R}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as m,r as B}from"./src-CsZby044.js";import{E as U,b as t,c as C,s as v}from"./chunk-ABZYJK2D-0jga8uiE.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import"./chunk-N4CR4FBY-BNoQB557.js";import"./chunk-55IACEB6-njZIr50E.js";import"./chunk-QN33PNHL-BOQncxfy.js";import{i as I,n as W,t as M}from"./chunk-DI55MBZ5-rLpl7joX.js";var F=m(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),J=m(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),_=m((e,i)=>{let o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),s=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",s.width+2*t().state.padding).attr("height",s.height+2*t().state.padding).attr("rx",t().state.radius),o},"drawSimpleState"),j=m((e,i)=>{let o=m(function(g,f,S){let b=g.append("tspan").attr("x",2*t().state.padding).text(f);S||b.attr("dy",t().state.textHeight)},"addTspan"),s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),d=s.height,x=e.append("text").attr("x",t().state.padding).attr("y",d+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description"),c=!0,a=!0;i.descriptions.forEach(function(g){c||(o(x,g,a),a=!1),c=!1});let n=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+d+t().state.dividerMargin/2).attr("y2",t().state.padding+d+t().state.dividerMargin/2).attr("class","descr-divider"),h=x.node().getBBox(),p=Math.max(h.width,s.width);return n.attr("x2",p+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",p+2*t().state.padding).attr("height",h.height+d+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Y=m((e,i,o)=>{let s=t().state.padding,d=2*t().state.padding,x=e.node().getBBox(),c=x.width,a=x.x,n=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),h=n.node().getBBox().width+d,p=Math.max(h,c);p===c&&(p+=d);let g,f=e.node().getBBox();i.doc,g=a-s,h>c&&(g=(c-p)/2+s),Math.abs(a-f.x)<s&&h>c&&(g=a-(h-c)/2);let S=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",S).attr("class",o?"alt-composit":"composit").attr("width",p).attr("height",f.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),n.attr("x",g+s),h<=c&&n.attr("x",a+(p-d)/2-h/2+s),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",f.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),$=m(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),X=m((e,i)=>{let o=t().state.forkWidth,s=t().state.forkHeight;if(i.parentId){let d=o;o=s,s=d}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",s).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),q=m((e,i,o,s)=>{let d=0,x=s.append("text");x.style("text-anchor","start"),x.attr("class","noteText");let c=e.replace(/\r\n/g,"<br/>");c=c.replace(/\n/g,"<br/>");let a=c.split(v.lineBreakRegex),n=1.25*t().state.noteMargin;for(let h of a){let p=h.trim();if(p.length>0){let g=x.append("tspan");if(g.text(p),n===0){let f=g.node().getBBox();n+=f.height}d+=n,g.attr("x",i+t().state.noteMargin),g.attr("y",o+d+1.25*t().state.noteMargin)}}return{textWidth:x.node().getBBox().width,textHeight:d}},"_drawLongText"),Z=m((e,i)=>{i.attr("class","state-note");let o=i.append("rect").attr("x",0).attr("y",t().state.padding),{textWidth:s,textHeight:d}=q(e,0,0,i.append("g"));return o.attr("height",d+2*t().state.noteMargin),o.attr("width",s+t().state.noteMargin*2),o},"drawNote"),T=m(function(e,i){let o=i.id,s={id:o,label:i.id,width:0,height:0},d=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&F(d),i.type==="end"&&$(d),(i.type==="fork"||i.type==="join")&&X(d,i),i.type==="note"&&Z(i.note.text,d),i.type==="divider"&&J(d),i.type==="default"&&i.descriptions.length===0&&_(d,i),i.type==="default"&&i.descriptions.length>0&&j(d,i);let x=d.node().getBBox();return s.width=x.width+2*t().state.padding,s.height=x.height+2*t().state.padding,s},"drawState"),D=0,K=m(function(e,i,o){let s=m(function(n){switch(n){case M.relationType.AGGREGATION:return"aggregation";case M.relationType.EXTENSION:return"extension";case M.relationType.COMPOSITION:return"composition";case M.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(n=>!Number.isNaN(n.y));let d=i.points,x=P().x(function(n){return n.x}).y(function(n){return n.y}).curve(O),c=e.append("path").attr("d",x(d)).attr("id","edge"+D).attr("class","transition"),a="";if(t().state.arrowMarkerAbsolute&&(a=U(!0)),c.attr("marker-end","url("+a+"#"+s(M.relationType.DEPENDENCY)+"End)"),o.title!==void 0){let n=e.append("g").attr("class","stateLabel"),{x:h,y:p}=R.calcLabelPosition(i.points),g=v.getRows(o.title),f=0,S=[],b=0,N=0;for(let u=0;u<=g.length;u++){let l=n.append("text").attr("text-anchor","middle").text(g[u]).attr("x",h).attr("y",p+f),y=l.node().getBBox();b=Math.max(b,y.width),N=Math.min(N,y.x),B.info(y.x,h,p+f),f===0&&(f=l.node().getBBox().height,B.info("Title height",f,p)),S.push(l)}let k=f*g.length;if(g.length>1){let u=(g.length-1)*f*.5;S.forEach((l,y)=>l.attr("y",p+y*f-u)),k=f*g.length}let r=n.node().getBBox();n.insert("rect",":first-child").attr("class","box").attr("x",h-b/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",b+t().state.padding).attr("height",k+t().state.padding),B.info(r)}D++},"drawEdge"),w,z={},Q=m(function(){},"setConf"),V=m(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),tt=m(function(e,i,o,s){w=t().state;let d=t().securityLevel,x;d==="sandbox"&&(x=H("#i"+i));let c=H(d==="sandbox"?x.nodes()[0].contentDocument.body:"body"),a=d==="sandbox"?x.nodes()[0].contentDocument:document;B.debug("Rendering diagram "+e);let n=c.select(`[id='${i}']`);V(n),L(s.db.getRootDoc(),n,void 0,!1,c,a,s);let h=w.padding,p=n.node().getBBox(),g=p.width+h*2,f=p.height+h*2;C(n,f,g*1.75,w.useMaxWidth),n.attr("viewBox",`${p.x-w.padding} ${p.y-w.padding} `+g+" "+f)},"draw"),et=m(e=>e?e.length*w.fontSizeFactor:1,"getLabelWidth"),L=m((e,i,o,s,d,x,c)=>{let a=new A({compound:!0,multigraph:!0}),n,h=!0;for(n=0;n<e.length;n++)if(e[n].stmt==="relation"){h=!1;break}o?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:w.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:w.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});let p=c.db.getStates(),g=c.db.getRelations(),f=Object.keys(p);for(let r of f){let u=p[r];o&&(u.parentId=o);let l;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");l=L(u.doc,y,u.id,!s,d,x,c);{y=Y(y,u,s);let E=y.node().getBBox();l.width=E.width,l.height=E.height+w.padding/2,z[u.id]={y:w.compositTitleSize}}}else l=T(i,u,a);if(u.note){let y=T(i,{descriptions:[],id:u.id+"-note",note:u.note,type:"note"},a);u.note.position==="left of"?(a.setNode(l.id+"-note",y),a.setNode(l.id,l)):(a.setNode(l.id,l),a.setNode(l.id+"-note",y)),a.setParent(l.id,l.id+"-group"),a.setParent(l.id+"-note",l.id+"-group")}else a.setNode(l.id,l)}B.debug("Count=",a.nodeCount(),a);let S=0;g.forEach(function(r){S++,B.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:et(r.title),height:w.labelHeight*v.getRows(r.title).length,labelpos:"c"},"id"+S)}),G(a),B.debug("Graph after layout",a.nodes());let b=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(B.warn("Node "+r+": "+JSON.stringify(a.node(r))),d.select("#"+b.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(z[r]?z[r].y:0)-a.node(r).height/2)+" )"),d.select("#"+b.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),x.querySelectorAll("#"+b.id+" #"+r+" .divider").forEach(u=>{let l=u.parentElement,y=0,E=0;l&&(l.parentElement&&(y=l.parentElement.getBBox().width),E=parseInt(l.getAttribute("data-x-shift"),10),Number.isNaN(E)&&(E=0)),u.setAttribute("x1",0-E+8),u.setAttribute("x2",y-E-8)})):B.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let N=b.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(B.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),N=b.getBBox();let k={id:o||"root",label:o||"root",width:0,height:0};return k.width=N.width+2*w.padding,k.height=N.height+2*w.padding,B.debug("Doc rendered",k,a),k},"renderDoc"),at={parser:W,get db(){return new M(1)},renderer:{setConf:Q,draw:tt},styles:I,init:m(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{at as diagram};
import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as t}from"./src-CsZby044.js";import"./chunk-ABZYJK2D-0jga8uiE.js";import"./chunk-HN2XXSSU-Bdbi3Mns.js";import"./chunk-CVBHYZKI-DU48rJVu.js";import"./chunk-ATLVNIR6-B17dg7Ry.js";import"./dist-C1VXabOr.js";import"./chunk-JA3XYJ7Z-DOm8KfKa.js";import"./chunk-JZLCHNYA-48QVgmR4.js";import"./chunk-QXUST7PY-DkCIa8tJ.js";import"./chunk-N4CR4FBY-BNoQB557.js";import"./chunk-55IACEB6-njZIr50E.js";import"./chunk-QN33PNHL-BOQncxfy.js";import{i,n as o,r as m,t as p}from"./chunk-DI55MBZ5-rLpl7joX.js";var a={parser:o,get db(){return new p(2)},renderer:m,styles:i,init:t(r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{a as diagram};
import"./math-BJjKGmt3.js";function d(t){this._context=t}d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function D(t){return new d(t)}function e(){}function r(t,i,s){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+s)/6)}function l(t){this._context=t}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function F(t){return new l(t)}function w(t){this._context=t}w.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function H(t){return new w(t)}function E(t){this._context=t}E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var s=(this._x0+4*this._x1+t)/6,_=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(s,_):this._context.moveTo(s,_);break;case 3:this._point=4;default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function I(t){return new E(t)}function S(t,i){this._basis=new l(t),this._beta=i}S.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,s=t.length-1;if(s>0)for(var _=t[0],h=i[0],n=t[s]-_,o=i[s]-h,a=-1,c;++a<=s;)c=a/s,this._basis.point(this._beta*t[a]+(1-this._beta)*(_+c*n),this._beta*i[a]+(1-this._beta)*(h+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};var L=(function t(i){function s(_){return i===1?new l(_):new S(_,i)}return s.beta=function(_){return t(+_)},s})(.85);function x(t,i,s){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-s),t._x2,t._y2)}function p(t,i){this._context=t,this._k=(1-i)/6}p.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:x(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var R=(function t(i){function s(_){return new p(_,i)}return s.tension=function(_){return t(+_)},s})(0);function f(t,i){this._context=t,this._k=(1-i)/6}f.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var U=(function t(i){function s(_){return new f(_,i)}return s.tension=function(_){return t(+_)},s})(0);function b(t,i){this._context=t,this._k=(1-i)/6}b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var V=(function t(i){function s(_){return new b(_,i)}return s.tension=function(_){return t(+_)},s})(0);function k(t,i,s){var _=t._x1,h=t._y1,n=t._x2,o=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);_=(_*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,h=(h*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var v=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,N=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*v+t._x1*t._l23_2a-i*t._l12_2a)/N,o=(o*v+t._y1*t._l23_2a-s*t._l12_2a)/N}t._context.bezierCurveTo(_,h,n,o,t._x2,t._y2)}function m(t,i){this._context=t,this._alpha=i}m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var W=(function t(i){function s(_){return i?new m(_,i):new p(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function P(t,i){this._context=t,this._alpha=i}P.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var G=(function t(i){function s(_){return i?new P(_,i):new f(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function z(t,i){this._context=t,this._alpha=i}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var J=(function t(i){function s(_){return i?new z(_,i):new b(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function C(t){this._context=t}C.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function K(t){return new C(t)}function M(t){return t<0?-1:1}function g(t,i,s){var _=t._x1-t._x0,h=i-t._x1,n=(t._y1-t._y0)/(_||h<0&&-0),o=(s-t._y1)/(h||_<0&&-0),a=(n*h+o*_)/(_+h);return(M(n)+M(o))*Math.min(Math.abs(n),Math.abs(o),.5*Math.abs(a))||0}function A(t,i){var s=t._x1-t._x0;return s?(3*(t._y1-t._y0)/s-i)/2:i}function T(t,i,s){var _=t._x0,h=t._y0,n=t._x1,o=t._y1,a=(n-_)/3;t._context.bezierCurveTo(_+a,h+a*i,n-a,o-a*s,n,o)}function u(t){this._context=t}u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:T(this,this._t0,A(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var s=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,T(this,A(this,s=g(this,t,i)),s);break;default:T(this,this._t0,s=g(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=s}}};function q(t){this._context=new j(t)}(q.prototype=Object.create(u.prototype)).point=function(t,i){u.prototype.point.call(this,i,t)};function j(t){this._context=t}j.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,s,_,h,n){this._context.bezierCurveTo(i,t,_,s,n,h)}};function Q(t){return new u(t)}function X(t){return new q(t)}function O(t){this._context=t}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,s=t.length;if(s)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),s===2)this._context.lineTo(t[1],i[1]);else for(var _=B(t),h=B(i),n=0,o=1;o<s;++n,++o)this._context.bezierCurveTo(_[0][n],h[0][n],_[1][n],h[1][n],t[o],i[o]);(this._line||this._line!==0&&s===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function B(t){var i,s=t.length-1,_,h=Array(s),n=Array(s),o=Array(s);for(h[0]=0,n[0]=2,o[0]=t[0]+2*t[1],i=1;i<s-1;++i)h[i]=1,n[i]=4,o[i]=4*t[i]+2*t[i+1];for(h[s-1]=2,n[s-1]=7,o[s-1]=8*t[s-1]+t[s],i=1;i<s;++i)_=h[i]/n[i-1],n[i]-=_,o[i]-=_*o[i-1];for(h[s-1]=o[s-1]/n[s-1],i=s-2;i>=0;--i)h[i]=(o[i]-h[i+1])/n[i];for(n[s-1]=(t[s]+h[s-1])/2,i=0;i<s-1;++i)n[i]=2*t[i+1]-h[i+1];return[h,n]}function Y(t){return new O(t)}function y(t,i){this._context=t,this._t=i}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var s=this._x*(1-this._t)+t*this._t;this._context.lineTo(s,this._y),this._context.lineTo(s,i)}break}this._x=t,this._y=i}};function Z(t){return new y(t,.5)}function $(t){return new y(t,0)}function tt(t){return new y(t,1)}export{F as _,Q as a,J as c,V as d,U as f,H as g,I as h,Y as i,G as l,L as m,$ as n,X as o,R as p,Z as r,K as s,tt as t,W as u,D as v};
import{n as t,t as s}from"./stex-jWatZkll.js";export{s as stex,t as stexMath};
function g(k){function l(t,e){t.cmdState.push(e)}function h(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function b(t){var e=t.cmdState.pop();e&&e.closeBracket()}function p(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var a=e[n];if(a.name!="DEFAULT")return a}return{styleIdentifier:function(){return null}}}function i(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var r={};r.importmodule=i("importmodule","tag",["string","builtin"]),r.documentclass=i("documentclass","tag",["","atom"]),r.usepackage=i("usepackage","tag",["atom"]),r.begin=i("begin","tag",["atom"]),r.end=i("end","tag",["atom"]),r.label=i("label","tag",["atom"]),r.ref=i("ref","tag",["atom"]),r.eqref=i("eqref","tag",["atom"]),r.cite=i("cite","tag",["atom"]),r.bibitem=i("bibitem","tag",["atom"]),r.Bibitem=i("Bibitem","tag",["atom"]),r.RBibitem=i("RBibitem","tag",["atom"]),r.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function c(t,e){t.f=e}function m(t,e){var n;if(t.match(/^\\[a-zA-Z@\xc0-\u1fff\u2060-\uffff]+/)){var a=t.current().slice(1);return n=r.hasOwnProperty(a)?r[a]:r.DEFAULT,n=new n,l(e,n),c(e,d),n.style}if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return c(e,function(o,f){return s(o,f,"\\]")}),"keyword";if(t.match("\\("))return c(e,function(o,f){return s(o,f,"\\)")}),"keyword";if(t.match("$$"))return c(e,function(o,f){return s(o,f,"$$")}),"keyword";if(t.match("$"))return c(e,function(o,f){return s(o,f,"$")}),"keyword";var u=t.next();if(u=="%")return t.skipToEnd(),"comment";if(u=="}"||u=="]"){if(n=h(e),n)n.closeBracket(u),c(e,d);else return"error";return"bracket"}else return u=="{"||u=="["?(n=r.DEFAULT,n=new n,l(e,n),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),n=p(e),n.name=="begin"&&(n.argument=t.current()),n.styleIdentifier())}function s(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return c(e,m),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variableName.special";if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/]/)||t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var a=t.next();return a=="{"||a=="}"||a=="["||a=="]"||a=="("||a==")"?"bracket":a=="%"?(t.skipToEnd(),"comment"):"error"}function d(t,e){var n=t.peek(),a;return n=="{"||n=="["?(a=h(e),a.openBracket(n),t.eat(n),c(e,m),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(c(e,m),b(e),m(t,e))}return{name:"stex",startState:function(){return{cmdState:[],f:k?function(t,e){return s(t,e)}:m}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=m,t.cmdState.length=0},languageData:{commentTokens:{line:"%"}}}}const y=g(!1),S=g(!0);export{S as n,y as t};
import{t as s}from"./stylus-D28PuRsm.js";export{s as stylus};
var N="a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.bgsound.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.nobr.noframes.noscript.object.ol.optgroup.option.output.p.param.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.track.u.ul.var.video".split("."),q=["domain","regexp","url-prefix","url"],L=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],P="width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.dynamic-range.video-dynamic-range".split("."),C="align-content.align-items.align-self.alignment-adjust.alignment-baseline.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backface-visibility.background.background-attachment.background-clip.background-color.background-image.background-origin.background-position.background-repeat.background-size.baseline-shift.binding.bleed.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-feature-settings.font-family.font-kerning.font-language-override.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-weight.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-position.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.justify-content.left.letter-spacing.line-break.line-height.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marker-offset.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.max-height.max-width.min-height.min-width.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotation.rotation-point.ruby-align.ruby-overhang.ruby-position.ruby-span.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-outline.text-overflow.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.unicode-bidi.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode.font-smoothing.osx-font-smoothing".split("."),_=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],U=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],E="aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen".split("."),O="above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.avoid.avoid-column.avoid-page.avoid-region.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.column.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.dashed.decimal.decimal-leading-zero.default.default-button.destination-atop.destination-in.destination-out.destination-over.devanagari.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fixed.flat.flex.footnotes.forwards.from.geometricPrecision.georgian.graytext.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hebrew.help.hidden.hide.high.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.malayalam.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row-resize.rtl.run-in.running.s-resize.sans-serif.scale.scale3d.scaleX.scaleY.scaleZ.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.semi-condensed.semi-expanded.separate.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.solid.somali.source-atop.source-in.source-out.source-over.space.spell-out.square.square-button.standard.start.static.status-bar.stretch.stroke.sub.subpixel-antialiased.super.sw-resize.symbolic.symbols.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.x-large.x-small.xor.xx-large.xx-small.bicubic.optimizespeed.grayscale.row.row-reverse.wrap.wrap-reverse.column-reverse.flex-start.flex-end.space-between.space-around.unset".split("."),W=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],A=["for","if","else","unless","from","to"],R=["null","true","false","href","title","type","not-allowed","readonly","disabled"],J=N.concat(q,L,P,C,_,E,O,U,W,A,R,["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"]);function S(t){return t=t.sort(function(e,r){return r>e}),RegExp("^(("+t.join(")|(")+"))\\b")}function m(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=!0;return e}function K(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var M=m(N),$=/^(a|b|i|s|col|em)$/i,Q=m(C),V=m(_),ee=m(O),te=m(E),re=m(q),ie=S(q),ae=m(P),oe=m(L),ne=m(U),le=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,se=S(W),ce=m(A),X=new RegExp(/^\-(moz|ms|o|webkit)-/i),de=m(R),j="",s={},h,g,Y,o;function ue(t,e){if(j=t.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),e.context.line.firstWord=j?j[0].replace(/^\s*/,""):"",e.context.line.indent=t.indentation(),h=t.peek(),t.match("//"))return t.skipToEnd(),["comment","comment"];if(t.match("/*"))return e.tokenize=Z,Z(t,e);if(h=='"'||h=="'")return t.next(),e.tokenize=T(h),e.tokenize(t,e);if(h=="@")return t.next(),t.eatWhile(/[\w\\-]/),["def",t.current()];if(h=="#"){if(t.next(),t.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(t.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return t.match(X)?["meta","vendor-prefixes"]:t.match(/^-?[0-9]?\.?[0-9]/)?(t.eatWhile(/[a-z%]/i),["number","unit"]):h=="!"?(t.next(),[t.match(/^(important|optional)/i)?"keyword":"operator","important"]):h=="."&&t.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:t.match(ie)?(t.peek()=="("&&(e.tokenize=me),["property","word"]):t.match(/^[a-z][\w-]*\(/i)?(t.backUp(1),["keyword","mixin"]):t.match(/^(\+|-)[a-z][\w-]*\(/i)?(t.backUp(1),["keyword","block-mixin"]):t.string.match(/^\s*&/)&&t.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:t.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(t.backUp(1),["variableName.special","reference"]):t.match(/^&{1}\s*$/)?["variableName.special","reference"]:t.match(se)?["operator","operator"]:t.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?t.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!b(t.current())?(t.match("."),["variable","variable-name"]):["variable","word"]:t.match(le)?["operator",t.current()]:/[:;,{}\[\]\(\)]/.test(h)?(t.next(),[null,h]):(t.next(),[null,null])}function Z(t,e){for(var r=!1,i;(i=t.next())!=null;){if(r&&i=="/"){e.tokenize=null;break}r=i=="*"}return["comment","comment"]}function T(t){return function(e,r){for(var i=!1,l;(l=e.next())!=null;){if(l==t&&!i){t==")"&&e.backUp(1);break}i=!i&&l=="\\"}return(l==t||!i&&t!=")")&&(r.tokenize=null),["string","string"]}}function me(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=T(")"),[null,"("]}function D(t,e,r,i){this.type=t,this.indent=e,this.prev=r,this.line=i||{firstWord:"",indent:0}}function a(t,e,r,i){return i=i>=0?i:e.indentUnit,t.context=new D(r,e.indentation()+i,t.context),r}function f(t,e,r){var i=t.context.indent-e.indentUnit;return r||(r=!1),t.context=t.context.prev,r&&(t.context.indent=i),t.context.type}function pe(t,e,r){return s[r.context.type](t,e,r)}function B(t,e,r,i){for(var l=i||1;l>0;l--)r.context=r.context.prev;return pe(t,e,r)}function b(t){return t.toLowerCase()in M}function k(t){return t=t.toLowerCase(),t in Q||t in ne}function w(t){return t.toLowerCase()in ce}function F(t){return t.toLowerCase().match(X)}function y(t){var e=t.toLowerCase(),r="variable";return b(t)?r="tag":w(t)?r="block-keyword":k(t)?r="property":e in ee||e in de?r="atom":e=="return"||e in te?r="keyword":t.match(/^[A-Z]/)&&(r="string"),r}function I(t,e){return n(e)&&(t=="{"||t=="]"||t=="hash"||t=="qualifier")||t=="block-mixin"}function G(t,e){return t=="{"&&e.match(/^\s*\$?[\w-]+/i,!1)}function H(t,e){return t==":"&&e.match(/^[a-z-]+/,!1)}function v(t){return t.sol()||t.string.match(RegExp("^\\s*"+K(t.current())))}function n(t){return t.eol()||t.match(/^\s*$/,!1)}function u(t){var e=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r=typeof t=="string"?t.match(e):t.string.match(e);return r?r[0].replace(/^\s*/,""):""}s.block=function(t,e,r){if(t=="comment"&&v(e)||t==","&&n(e)||t=="mixin")return a(r,e,"block",0);if(G(t,e))return a(r,e,"interpolation");if(n(e)&&t=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(e.string)&&!b(u(e)))return a(r,e,"block",0);if(I(t,e))return a(r,e,"block");if(t=="}"&&n(e))return a(r,e,"block",0);if(t=="variable-name")return e.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||w(u(e))?a(r,e,"variableName"):a(r,e,"variableName",0);if(t=="=")return!n(e)&&!w(u(e))?a(r,e,"block",0):a(r,e,"block");if(t=="*"&&(n(e)||e.match(/\s*(,|\.|#|\[|:|{)/,!1)))return o="tag",a(r,e,"block");if(H(t,e))return a(r,e,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(t))return a(r,e,n(e)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return a(r,e,"keyframes");if(/@extends?/.test(t))return a(r,e,"extend",0);if(t&&t.charAt(0)=="@")return e.indentation()>0&&k(e.current().slice(1))?(o="variable","block"):/(@import|@require|@charset)/.test(t)?a(r,e,"block",0):a(r,e,"block");if(t=="reference"&&n(e))return a(r,e,"block");if(t=="(")return a(r,e,"parens");if(t=="vendor-prefixes")return a(r,e,"vendorPrefixes");if(t=="word"){var i=e.current();if(o=y(i),o=="property")return v(e)?a(r,e,"block",0):(o="atom","block");if(o=="tag"){if(/embed|menu|pre|progress|sub|table/.test(i)&&k(u(e))||e.string.match(RegExp("\\[\\s*"+i+"|"+i+"\\s*\\]")))return o="atom","block";if($.test(i)&&(v(e)&&e.string.match(/=/)||!v(e)&&!e.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!b(u(e))))return o="variable",w(u(e))?"block":a(r,e,"block",0);if(n(e))return a(r,e,"block")}if(o=="block-keyword")return o="keyword",e.current(/(if|unless)/)&&!v(e)?"block":a(r,e,"block");if(i=="return")return a(r,e,"block",0);if(o=="variable"&&e.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return a(r,e,"block")}return r.context.type},s.parens=function(t,e,r){if(t=="(")return a(r,e,"parens");if(t==")")return r.context.prev.type=="parens"?f(r,e):e.string.match(/^[a-z][\w-]*\(/i)&&n(e)||w(u(e))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(u(e))||!e.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&b(u(e))?a(r,e,"block"):e.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||e.string.match(/^\s*(\(|\)|[0-9])/)||e.string.match(/^\s+[a-z][\w-]*\(/i)||e.string.match(/^\s+[\$-]?[a-z]/i)?a(r,e,"block",0):n(e)?a(r,e,"block"):a(r,e,"block",0);if(t&&t.charAt(0)=="@"&&k(e.current().slice(1))&&(o="variable"),t=="word"){var i=e.current();o=y(i),o=="tag"&&$.test(i)&&(o="variable"),(o=="property"||i=="to")&&(o="atom")}return t=="variable-name"?a(r,e,"variableName"):H(t,e)?a(r,e,"pseudo"):r.context.type},s.vendorPrefixes=function(t,e,r){return t=="word"?(o="property",a(r,e,"block",0)):f(r,e)},s.pseudo=function(t,e,r){return k(u(e.string))?B(t,e,r):(e.match(/^[a-z-]+/),o="variableName.special",n(e)?a(r,e,"block"):f(r,e))},s.atBlock=function(t,e,r){if(t=="(")return a(r,e,"atBlock_parens");if(I(t,e))return a(r,e,"block");if(G(t,e))return a(r,e,"interpolation");if(t=="word"){var i=e.current().toLowerCase();if(o=/^(only|not|and|or)$/.test(i)?"keyword":re.hasOwnProperty(i)?"tag":oe.hasOwnProperty(i)?"attribute":ae.hasOwnProperty(i)?"property":V.hasOwnProperty(i)?"string.special":y(e.current()),o=="tag"&&n(e))return a(r,e,"block")}return t=="operator"&&/^(not|and|or)$/.test(e.current())&&(o="keyword"),r.context.type},s.atBlock_parens=function(t,e,r){if(t=="{"||t=="}")return r.context.type;if(t==")")return n(e)?a(r,e,"block"):a(r,e,"atBlock");if(t=="word"){var i=e.current().toLowerCase();return o=y(i),/^(max|min)/.test(i)&&(o="property"),o=="tag"&&(o=$.test(i)?"variable":"atom"),r.context.type}return s.atBlock(t,e,r)},s.keyframes=function(t,e,r){return e.indentation()=="0"&&(t=="}"&&v(e)||t=="]"||t=="hash"||t=="qualifier"||b(e.current()))?B(t,e,r):t=="{"?a(r,e,"keyframes"):t=="}"?v(e)?f(r,e,!0):a(r,e,"keyframes"):t=="unit"&&/^[0-9]+\%$/.test(e.current())?a(r,e,"keyframes"):t=="word"&&(o=y(e.current()),o=="block-keyword")?(o="keyword",a(r,e,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(t)?a(r,e,n(e)?"block":"atBlock"):t=="mixin"?a(r,e,"block",0):r.context.type},s.interpolation=function(t,e,r){return t=="{"&&f(r,e)&&a(r,e,"block"),t=="}"?e.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||e.string.match(/^\s*[a-z]/i)&&b(u(e))?a(r,e,"block"):!e.string.match(/^(\{|\s*\&)/)||e.match(/\s*[\w-]/,!1)?a(r,e,"block",0):a(r,e,"block"):t=="variable-name"?a(r,e,"variableName",0):(t=="word"&&(o=y(e.current()),o=="tag"&&(o="atom")),r.context.type)},s.extend=function(t,e,r){return t=="["||t=="="?"extend":t=="]"?f(r,e):t=="word"?(o=y(e.current()),"extend"):f(r,e)},s.variableName=function(t,e,r){return t=="string"||t=="["||t=="]"||e.current().match(/^(\.|\$)/)?(e.current().match(/^\.[\w-]+/i)&&(o="variable"),"variableName"):B(t,e,r)};const he={name:"stylus",startState:function(){return{tokenize:null,state:"block",context:new D("block",0,null)}},token:function(t,e){return!e.tokenize&&t.eatSpace()?null:(g=(e.tokenize||ue)(t,e),g&&typeof g=="object"&&(Y=g[1],g=g[0]),o=g,e.state=s[e.state](Y,t,e),o)},indent:function(t,e,r){var i=t.context,l=e&&e.charAt(0),x=i.indent,z=u(e),p=i.line.indent,c=t.context.prev?t.context.prev.line.firstWord:"",d=t.context.prev?t.context.prev.line.indent:p;return i.prev&&(l=="}"&&(i.type=="block"||i.type=="atBlock"||i.type=="keyframes")||l==")"&&(i.type=="parens"||i.type=="atBlock_parens")||l=="{"&&i.type=="at")?x=i.indent-r.unit:/(\})/.test(l)||(/@|\$|\d/.test(l)||/^\{/.test(e)||/^\s*\/(\/|\*)/.test(e)||/^\s*\/\*/.test(c)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(e)||/^(\+|-)?[a-z][\w-]*\(/i.test(e)||/^return/.test(e)||w(z)?x=p:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(l)||b(z)?x=/\,\s*$/.test(c)?d:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(c)||b(c)?p<=d?d:d+r.unit:p:!/,\s*$/.test(e)&&(F(z)||k(z))&&(x=w(c)?p<=d?d:d+r.unit:/^\{/.test(c)?p<=d?p:d+r.unit:F(c)||k(c)?p>=d?d:p:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(c)||/=\s*$/.test(c)||b(c)||/^\$[\w-\.\[\]\'\"]/.test(c)?d+r.unit:p)),x},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:J}};export{he as t};
import{t}from"./swift-D-jfpPuv.js";export{t as swift};
function u(t){for(var n={},e=0;e<t.length;e++)n[t[e]]=!0;return n}var l=u("_.var.let.actor.class.enum.extension.import.protocol.struct.func.typealias.associatedtype.open.public.internal.fileprivate.private.deinit.init.new.override.self.subscript.super.convenience.dynamic.final.indirect.lazy.required.static.unowned.unowned(safe).unowned(unsafe).weak.as.is.break.case.continue.default.else.fallthrough.for.guard.if.in.repeat.switch.where.while.defer.return.inout.mutating.nonmutating.isolated.nonisolated.catch.do.rethrows.throw.throws.async.await.try.didSet.get.set.willSet.assignment.associativity.infix.left.none.operator.postfix.precedence.precedencegroup.prefix.right.Any.AnyObject.Type.dynamicType.Self.Protocol.__COLUMN__.__FILE__.__FUNCTION__.__LINE__".split(".")),f=u(["var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),p=u(["true","false","nil","self","super","_"]),d=u(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String","UInt8","UInt16","UInt32","UInt64","Void"]),h="+-/*%=|&<>~^?!",m=":;,.(){}[]",v=/^\-?0b[01][01_]*/,_=/^\-?0o[0-7][0-7_]*/,k=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,y=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,x=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,g=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,z=/^\#[A-Za-z]+/,w=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function s(t,n,e){if(t.sol()&&(n.indented=t.indentation()),t.eatSpace())return null;var r=t.peek();if(r=="/"){if(t.match("//"))return t.skipToEnd(),"comment";if(t.match("/*"))return n.tokenize.push(c),c(t,n)}if(t.match(z))return"builtin";if(t.match(w))return"attribute";if(t.match(v)||t.match(_)||t.match(k)||t.match(y))return"number";if(t.match(g))return"property";if(h.indexOf(r)>-1)return t.next(),"operator";if(m.indexOf(r)>-1)return t.next(),t.match(".."),"punctuation";var i;if(i=t.match(/("""|"|')/)){var a=A.bind(null,i[0]);return n.tokenize.push(a),a(t,n)}if(t.match(x)){var o=t.current();return d.hasOwnProperty(o)?"type":p.hasOwnProperty(o)?"atom":l.hasOwnProperty(o)?(f.hasOwnProperty(o)&&(n.prev="define"),"keyword"):e=="define"?"def":"variable"}return t.next(),null}function b(){var t=0;return function(n,e,r){var i=s(n,e,r);if(i=="punctuation"){if(n.current()=="(")++t;else if(n.current()==")"){if(t==0)return n.backUp(1),e.tokenize.pop(),e.tokenize[e.tokenize.length-1](n,e);--t}}return i}}function A(t,n,e){for(var r=t.length==1,i,a=!1;i=n.peek();)if(a){if(n.next(),i=="(")return e.tokenize.push(b()),"string";a=!1}else{if(n.match(t))return e.tokenize.pop(),"string";n.next(),a=i=="\\"}return r&&e.tokenize.pop(),"string"}function c(t,n){for(var e;e=t.next();)if(e==="/"&&t.eat("*"))n.tokenize.push(c);else if(e==="*"&&t.eat("/")){n.tokenize.pop();break}return"comment"}function I(t,n,e){this.prev=t,this.align=n,this.indented=e}function O(t,n){var e=n.match(/^\s*($|\/[\/\*]|[)}\]])/,!1)?null:n.column()+1;t.context=new I(t.context,e,t.indented)}function $(t){t.context&&(t.context=(t.indented=t.context.indented,t.context.prev))}const F={name:"swift",startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(t,n){var e=n.prev;n.prev=null;var r=(n.tokenize[n.tokenize.length-1]||s)(t,n,e);if(!r||r=="comment"?n.prev=e:n.prev||(n.prev=r),r=="punctuation"){var i=/[\(\[\{]|([\]\)\}])/.exec(t.current());i&&(i[1]?$:O)(n,t)}return r},indent:function(t,n,e){var r=t.context;if(!r)return 0;var i=/^[\]\}\)]/.test(n);return r.align==null?r.indented+(i?0:e.unit):r.align-(i?1:0)},languageData:{indentOnInput:/^\s*[\)\}\]]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}};export{F as t};
import{s as z}from"./chunk-LvLJmgfZ.js";import{d as ne,n as E,p as T,u as U}from"./useEvent-BhXAndur.js";import{t as ie}from"./react-Bj1aDYRI.js";import{G as _}from"./cells-DPp5cDaO.js";import{t as le}from"./react-dom-CSu739Rf.js";import{t as D}from"./compiler-runtime-B3qBwwSJ.js";import{a as ce,d as $,f as ue,l as I}from"./hotkeys-BHHWjLlp.js";import{p as de}from"./utils-YqBXNpsM.js";import{r as H}from"./config-Q0O7_stz.js";import{r as M,t as W}from"./useEventListener-Cb-RVVEn.js";import{t as fe}from"./jsx-runtime-ZmTK25f3.js";import{n as L,t as G}from"./cn-BKtXLv3a.js";import{E as pe,S as he,_ as F,w as me}from"./Combination-BAEdC-rz.js";import{m as ye}from"./select-BVdzZKAh.js";import{l as be}from"./dist-DwV58Fb1.js";function we(){try{return window.__MARIMO_MOUNT_CONFIG__.version}catch{return $.warn("Failed to get version from mount config"),null}}const ge=T(we()||"latest"),ve=T(!0),xe=T(null);le();var m=z(ie(),1),je=(0,m.createContext)(null);function Re(a){let t=(0,m.useRef)({});return m.createElement(je.Provider,{value:t},a.children)}var ke=(0,m.createContext)({isSelected:!1}),Se={"Content-Type":"application/json"},Ee=/\{[^{}]+\}/g,Te=class extends Request{constructor(a,t){for(let e in super(a,t),t)e in this||(this[e]=t[e])}};function $e(a){let{baseUrl:t="",fetch:e=globalThis.fetch,querySerializer:s,bodySerializer:r,headers:o,...n}={...a};t.endsWith("/")&&(t=t.substring(0,t.length-1)),o=X(Se,o);let i=[];async function u(l,c){let{fetch:f=e,headers:h,params:d={},parseAs:v="json",querySerializer:b,bodySerializer:k=r??Ce,...R}=c||{},S=typeof s=="function"?s:B(s);b&&(S=typeof b=="function"?b:B({...typeof s=="object"?s:{},...b}));let y={redirect:"follow",...n,...R,headers:X(o,h,d.header)};y.body&&(y.body=k(y.body)),y.body instanceof FormData&&y.headers.delete("Content-Type");let x=new Te(Oe(l,{baseUrl:t,params:d,querySerializer:S}),y),N={baseUrl:t,fetch:f,parseAs:v,querySerializer:S,bodySerializer:k};for(let w of i)if(w&&typeof w=="object"&&typeof w.onRequest=="function"){x.schemaPath=l,x.params=d;let g=await w.onRequest(x,N);if(g){if(!(g instanceof Request))throw Error("Middleware must return new Request() when modifying the request");x=g}}let p=await f(x);for(let w=i.length-1;w>=0;w--){let g=i[w];if(g&&typeof g=="object"&&typeof g.onResponse=="function"){let q=await g.onResponse(p,N);if(q){if(!(q instanceof Response))throw Error("Middleware must return new Response() when modifying the response");p=q}}}if(p.status===204||p.headers.get("Content-Length")==="0")return p.ok?{data:{},response:p}:{error:{},response:p};if(p.ok)return v==="stream"?{data:p.body,response:p}:{data:await p[v](),response:p};let O=await p.text();try{O=JSON.parse(O)}catch{}return{error:O,response:p}}return{async GET(l,c){return u(l,{...c,method:"GET"})},async PUT(l,c){return u(l,{...c,method:"PUT"})},async POST(l,c){return u(l,{...c,method:"POST"})},async DELETE(l,c){return u(l,{...c,method:"DELETE"})},async OPTIONS(l,c){return u(l,{...c,method:"OPTIONS"})},async HEAD(l,c){return u(l,{...c,method:"HEAD"})},async PATCH(l,c){return u(l,{...c,method:"PATCH"})},async TRACE(l,c){return u(l,{...c,method:"TRACE"})},use(...l){for(let c of l)if(c){if(typeof c!="object"||!("onRequest"in c||"onResponse"in c))throw Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");i.push(c)}},eject(...l){for(let c of l){let f=i.indexOf(c);f!==-1&&i.splice(f,1)}}}}function P(a,t,e){if(t==null)return"";if(typeof t=="object")throw Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${a}=${(e==null?void 0:e.allowReserved)===!0?t:encodeURIComponent(t)}`}function J(a,t,e){if(!t||typeof t!="object")return"";let s=[],r={simple:",",label:".",matrix:";"}[e.style]||"&";if(e.style!=="deepObject"&&e.explode===!1){for(let i in t)s.push(i,e.allowReserved===!0?t[i]:encodeURIComponent(t[i]));let n=s.join(",");switch(e.style){case"form":return`${a}=${n}`;case"label":return`.${n}`;case"matrix":return`;${a}=${n}`;default:return n}}for(let n in t){let i=e.style==="deepObject"?`${a}[${n}]`:n;s.push(P(i,t[n],e))}let o=s.join(r);return e.style==="label"||e.style==="matrix"?`${r}${o}`:o}function V(a,t,e){if(!Array.isArray(t))return"";if(e.explode===!1){let o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[e.style]||",",n=(e.allowReserved===!0?t:t.map(i=>encodeURIComponent(i))).join(o);switch(e.style){case"simple":return n;case"label":return`.${n}`;case"matrix":return`;${a}=${n}`;default:return`${a}=${n}`}}let s={simple:",",label:".",matrix:";"}[e.style]||"&",r=[];for(let o of t)e.style==="simple"||e.style==="label"?r.push(e.allowReserved===!0?o:encodeURIComponent(o)):r.push(P(a,o,e));return e.style==="label"||e.style==="matrix"?`${s}${r.join(s)}`:r.join(s)}function B(a){return function(t){let e=[];if(t&&typeof t=="object")for(let s in t){let r=t[s];if(r!=null){if(Array.isArray(r)){e.push(V(s,r,{style:"form",explode:!0,...a==null?void 0:a.array,allowReserved:(a==null?void 0:a.allowReserved)||!1}));continue}if(typeof r=="object"){e.push(J(s,r,{style:"deepObject",explode:!0,...a==null?void 0:a.object,allowReserved:(a==null?void 0:a.allowReserved)||!1}));continue}e.push(P(s,r,a))}}return e.join("&")}}function Pe(a,t){let e=a;for(let s of a.match(Ee)??[]){let r=s.substring(1,s.length-1),o=!1,n="simple";if(r.endsWith("*")&&(o=!0,r=r.substring(0,r.length-1)),r.startsWith(".")?(n="label",r=r.substring(1)):r.startsWith(";")&&(n="matrix",r=r.substring(1)),!t||t[r]===void 0||t[r]===null)continue;let i=t[r];if(Array.isArray(i)){e=e.replace(s,V(r,i,{style:n,explode:o}));continue}if(typeof i=="object"){e=e.replace(s,J(r,i,{style:n,explode:o}));continue}if(n==="matrix"){e=e.replace(s,`;${P(r,i)}`);continue}e=e.replace(s,n==="label"?`.${i}`:i)}return e}function Ce(a){return JSON.stringify(a)}function Oe(a,t){var r;let e=`${t.baseUrl}${a}`;(r=t.params)!=null&&r.path&&(e=Pe(e,t.params.path));let s=t.querySerializer(t.params.query??{});return s.startsWith("?")&&(s=s.substring(1)),s&&(e+=`?${s}`),e}function X(...a){let t=new Headers;for(let e of a){if(!e||typeof e!="object")continue;let s=e instanceof Headers?e.entries():Object.entries(e);for(let[r,o]of s)if(o===null)t.delete(r);else if(Array.isArray(o))for(let n of o)t.append(r,n);else o!==void 0&&t.set(r,o)}return t}function qe(a){return $e(a)}function K(){let a=H().httpURL;return a.search="",a.hash="",a.toString()}const A={post(a,t,e={}){let s=`${_.withTrailingSlash(e.baseUrl??K())}api${a}`;return fetch(s,{method:"POST",headers:{"Content-Type":"application/json",...A.headers(),...e.headers},body:JSON.stringify(t),signal:e.signal}).then(async r=>{var n;let o=(n=r.headers.get("Content-Type"))==null?void 0:n.startsWith("application/json");if(!r.ok){let i=o?await r.json():await r.text();throw Error(r.statusText,{cause:i})}return o?r.json():r.text()}).catch(r=>{throw $.error(`Error requesting ${s}`,r),r})},get(a,t={}){let e=`${_.withTrailingSlash(t.baseUrl??K())}api${a}`;return fetch(e,{method:"GET",headers:{...A.headers(),...t.headers}}).then(s=>{var r;if(!s.ok)throw Error(s.statusText);return(r=s.headers.get("Content-Type"))!=null&&r.startsWith("application/json")?s.json():null}).catch(s=>{throw $.error(`Error requesting ${e}`,s),s})},headers(){return H().headers()},handleResponse:a=>a.error?Promise.reject(a.error):Promise.resolve(a.data),handleResponseReturnNull:a=>a.error?Promise.reject(a.error):Promise.resolve(null)};function Ae(a){let t=qe({baseUrl:a.httpURL.toString()});return t.use({onRequest:e=>{let s=a.headers();for(let[r,o]of Object.entries(s))e.headers.set(r,o);return e}}),t}var Q=T({});function Ne(){return U(Q)}function ze(){let a=ne(Q);return{registerAction:E((t,e)=>{a(s=>({...s,[t]:e}))}),unregisterAction:E(t=>{a(e=>{let{[t]:s,...r}=e;return r})})}}var Y=D();function Ue(a,t){let e=(0,Y.c)(13),{registerAction:s,unregisterAction:r}=ze(),o=U(de),n=t===ue.NOOP,i;e[0]===t?i=e[1]:(i=d=>t(d),e[0]=t,e[1]=i);let u=E(i),l;e[2]!==t||e[3]!==o||e[4]!==a?(l=d=>{if(d.defaultPrevented)return;let v=o.getHotkey(a).key;I(v)(d)&&t(d)!==!1&&(d.preventDefault(),d.stopPropagation())},e[2]=t,e[3]=o,e[4]=a,e[5]=l):l=e[5];let c=E(l);W(document,"keydown",c);let f,h;e[6]!==n||e[7]!==u||e[8]!==s||e[9]!==a||e[10]!==r?(f=()=>{if(!n)return s(a,u),()=>r(a)},h=[u,a,n,s,r],e[6]=n,e[7]=u,e[8]=s,e[9]=a,e[10]=r,e[11]=f,e[12]=h):(f=e[11],h=e[12]),(0,m.useEffect)(f,h)}function _e(a,t){let e=(0,Y.c)(2),s;e[0]===t?s=e[1]:(s=r=>{if(!r.defaultPrevented)for(let[o,n]of ce.entries(t))I(o)(r)&&($.debug("Satisfied",o,r),n(r)!==!1&&(r.preventDefault(),r.stopPropagation()))},e[0]=t,e[1]=s),W(a,"keydown",s)}var j=z(fe(),1),C="Switch",[De,it]=pe(C),[Ie,He]=De(C),Z=m.forwardRef((a,t)=>{let{__scopeSwitch:e,name:s,checked:r,defaultChecked:o,required:n,disabled:i,value:u="on",onCheckedChange:l,form:c,...f}=a,[h,d]=m.useState(null),v=M(t,y=>d(y)),b=m.useRef(!1),k=h?c||!!h.closest("form"):!0,[R,S]=he({prop:r,defaultProp:o??!1,onChange:l,caller:C});return(0,j.jsxs)(Ie,{scope:e,checked:R,disabled:i,children:[(0,j.jsx)(F.button,{type:"button",role:"switch","aria-checked":R,"aria-required":n,"data-state":ae(R),"data-disabled":i?"":void 0,disabled:i,value:u,...f,ref:v,onClick:me(a.onClick,y=>{S(x=>!x),k&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})}),k&&(0,j.jsx)(re,{control:h,bubbles:!b.current,name:s,value:u,checked:R,required:n,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});Z.displayName=C;var ee="SwitchThumb",te=m.forwardRef((a,t)=>{let{__scopeSwitch:e,...s}=a,r=He(ee,e);return(0,j.jsx)(F.span,{"data-state":ae(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:t})});te.displayName=ee;var Me="SwitchBubbleInput",re=m.forwardRef(({__scopeSwitch:a,control:t,checked:e,bubbles:s=!0,...r},o)=>{let n=m.useRef(null),i=M(n,o),u=ye(e),l=be(t);return m.useEffect(()=>{let c=n.current;if(!c)return;let f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==e&&h){let d=new Event("click",{bubbles:s});h.call(c,e),c.dispatchEvent(d)}},[u,e,s]),(0,j.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:i,style:{...r.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});re.displayName=Me;function ae(a){return a?"checked":"unchecked"}var se=Z,We=te,Le=D(),Ge=L("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{default:"h-6 w-11 mb-1",sm:"h-4.5 w-8.5",xs:"h-4 w-7"}},defaultVariants:{size:"default"}}),Fe=L("pointer-events-none block rounded-full bg-background shadow-xs ring-0 transition-transform",{variants:{size:{default:"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",sm:"h-3.5 w-3.5 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",xs:"h-3 w-3 data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0"}},defaultVariants:{size:"default"}}),oe=m.forwardRef((a,t)=>{let e=(0,Le.c)(16),s,r,o;e[0]===a?(s=e[1],r=e[2],o=e[3]):({className:s,size:o,...r}=a,e[0]=a,e[1]=s,e[2]=r,e[3]=o);let n;e[4]!==s||e[5]!==o?(n=G(Ge({size:o}),s),e[4]=s,e[5]=o,e[6]=n):n=e[6];let i;e[7]===o?i=e[8]:(i=G(Fe({size:o})),e[7]=o,e[8]=i);let u;e[9]===i?u=e[10]:(u=(0,j.jsx)(We,{className:i}),e[9]=i,e[10]=u);let l;return e[11]!==r||e[12]!==t||e[13]!==n||e[14]!==u?(l=(0,j.jsx)(se,{className:n,...r,ref:t,children:u}),e[11]=r,e[12]=t,e[13]=n,e[14]=u,e[15]=l):l=e[15],l});oe.displayName=se.displayName;export{A as a,Re as c,ve as d,Ne as i,ge as l,Ue as n,Ae as o,_e as r,ke as s,oe as t,xe as u};
import{t}from"./createLucideIcon-BCdY6lG5.js";var a=t("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]),h=t("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]),e=t("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);export{h as n,a as r,e as t};
import{s as n}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-Bj1aDYRI.js";import{t as w}from"./compiler-runtime-B3qBwwSJ.js";import{t as g}from"./jsx-runtime-ZmTK25f3.js";import{t as c}from"./cn-BKtXLv3a.js";var d=w(),f=n(h(),1),m=n(g(),1),i=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("w-full caption-bottom text-sm",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("div",{className:"w-full overflow-auto scrollbar-thin flex-1 print:overflow-hidden",children:(0,m.jsx)("table",{ref:o,className:l,...r})}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});i.displayName="Table";var b=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("[&_tr]:border-b bg-background",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("thead",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});b.displayName="TableHeader";var p=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("[&_tr:last-child]:border-0",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("tbody",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});p.displayName="TableBody";var v=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("bg-primary font-medium text-primary-foreground",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("tfoot",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});v.displayName="TableFooter";var N=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("border-b transition-colors bg-background hover:bg-(--slate-2) data-[state=selected]:bg-(--slate-3)",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("tr",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});N.displayName="TableRow";var u=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("th",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});u.displayName="TableHead";var x=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("p-1.5 align-middle [&:has([role=checkbox])]:pr-0",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("td",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});x.displayName="TableCell";var y=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("mt-4 text-sm text-muted-foreground",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("caption",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});y.displayName="TableCaption";export{b as a,u as i,p as n,N as o,x as r,i as t};
import{t}from"./tcl-BrQdCDVA.js";export{t as tcl};
function s(r){for(var t={},n=r.split(" "),e=0;e<n.length;++e)t[n[e]]=!0;return t}var f=s("Tcl safe after append array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd close concat continue dde eof encoding error eval exec exit expr fblocked fconfigure fcopy file fileevent filename filename flush for foreach format gets glob global history http if incr info interp join lappend lindex linsert list llength load lrange lreplace lsearch lset lsort memory msgcat namespace open package parray pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp registry regsub rename resource return scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest tclvars tell time trace unknown unset update uplevel upvar variable vwait"),u=s("if elseif else and not or eq ne in ni for foreach while switch"),c=/[+\-*&%=<>!?^\/\|]/;function i(r,t,n){return t.tokenize=n,n(r,t)}function o(r,t){var n=t.beforeParams;t.beforeParams=!1;var e=r.next();if((e=='"'||e=="'")&&t.inParams)return i(r,t,m(e));if(/[\[\]{}\(\),;\.]/.test(e))return e=="("&&n?t.inParams=!0:e==")"&&(t.inParams=!1),null;if(/\d/.test(e))return r.eatWhile(/[\w\.]/),"number";if(e=="#")return r.eat("*")?i(r,t,p):e=="#"&&r.match(/ *\[ *\[/)?i(r,t,d):(r.skipToEnd(),"comment");if(e=='"')return r.skipTo(/"/),"comment";if(e=="$")return r.eatWhile(/[$_a-z0-9A-Z\.{:]/),r.eatWhile(/}/),t.beforeParams=!0,"builtin";if(c.test(e))return r.eatWhile(c),"comment";r.eatWhile(/[\w\$_{}\xa1-\uffff]/);var a=r.current().toLowerCase();return f&&f.propertyIsEnumerable(a)?"keyword":u&&u.propertyIsEnumerable(a)?(t.beforeParams=!0,"keyword"):null}function m(r){return function(t,n){for(var e=!1,a,l=!1;(a=t.next())!=null;){if(a==r&&!e){l=!0;break}e=!e&&a=="\\"}return l&&(n.tokenize=o),"string"}}function p(r,t){for(var n=!1,e;e=r.next();){if(e=="#"&&n){t.tokenize=o;break}n=e=="*"}return"comment"}function d(r,t){for(var n=0,e;e=r.next();){if(e=="#"&&n==2){t.tokenize=o;break}e=="]"?n++:e!=" "&&(n=0)}return"meta"}const k={name:"tcl",startState:function(){return{tokenize:o,beforeParams:!1,inParams:!1}},token:function(r,t){return r.eatSpace()?null:t.tokenize(r,t)},languageData:{commentTokens:{line:"#"}}};export{k as t};

Sorry, the diff of this file is too big to display

import{s as cr}from"./chunk-LvLJmgfZ.js";import{t as lt}from"./react-Bj1aDYRI.js";import{Jn as nt}from"./cells-DPp5cDaO.js";import{G as ut,K as ot,q as dt}from"./zod-H_cgTO0M.js";import{t as mr}from"./compiler-runtime-B3qBwwSJ.js";import{t as ft}from"./jsx-runtime-ZmTK25f3.js";import{i as ct,r as mt}from"./button-CZ3Cs4qb.js";import{t as de}from"./cn-BKtXLv3a.js";import{t as yt}from"./createLucideIcon-BCdY6lG5.js";import{S as gt}from"./Combination-BAEdC-rz.js";import{t as pt}from"./tooltip-CMQz28hC.js";import{t as vt}from"./useDebounce-7iEVSqwM.js";import{t as ht}from"./label-E64zk6_7.js";var bt=yt("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),x=cr(lt(),1),pe=r=>r.type==="checkbox",le=r=>r instanceof Date,q=r=>r==null,yr=r=>typeof r=="object",O=r=>!q(r)&&!Array.isArray(r)&&yr(r)&&!le(r),gr=r=>O(r)&&r.target?pe(r.target)?r.target.checked:r.target.value:r,_t=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,pr=(r,a)=>r.has(_t(a)),xt=r=>{let a=r.constructor&&r.constructor.prototype;return O(a)&&a.hasOwnProperty("isPrototypeOf")},Te=typeof window<"u"&&window.HTMLElement!==void 0&&typeof document<"u";function B(r){let a,e=Array.isArray(r),t=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)a=new Date(r);else if(r instanceof Set)a=new Set(r);else if(!(Te&&(r instanceof Blob||t))&&(e||O(r)))if(a=e?[]:{},!e&&!xt(r))a=r;else for(let s in r)r.hasOwnProperty(s)&&(a[s]=B(r[s]));else return r;return a}var ve=r=>Array.isArray(r)?r.filter(Boolean):[],E=r=>r===void 0,m=(r,a,e)=>{if(!a||!O(r))return e;let t=ve(a.split(/[,[\].]+?/)).reduce((s,l)=>q(s)?s:s[l],r);return E(t)||t===r?E(r[a])?e:r[a]:t},G=r=>typeof r=="boolean",Me=r=>/^\w*$/.test(r),vr=r=>ve(r.replace(/["|']|\]/g,"").split(/\.|\[/)),D=(r,a,e)=>{let t=-1,s=Me(a)?[a]:vr(a),l=s.length,n=l-1;for(;++t<l;){let o=s[t],f=e;if(t!==n){let c=r[o];f=O(c)||Array.isArray(c)?c:isNaN(+s[t+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;r[o]=f,r=r[o]}return r},Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},J={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ee={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},hr=x.createContext(null),ne=()=>x.useContext(hr),br=r=>{let{children:a,...e}=r;return x.createElement(hr.Provider,{value:e},a)},_r=(r,a,e,t=!0)=>{let s={defaultValues:a._defaultValues};for(let l in r)Object.defineProperty(s,l,{get:()=>{let n=l;return a._proxyFormState[n]!==J.all&&(a._proxyFormState[n]=!t||J.all),e&&(e[n]=!0),r[n]}});return s},$=r=>O(r)&&!Object.keys(r).length,xr=(r,a,e,t)=>{e(r);let{name:s,...l}=r;return $(l)||Object.keys(l).length>=Object.keys(a).length||Object.keys(l).find(n=>a[n]===(!t||J.all))},H=r=>Array.isArray(r)?r:[r],Vr=(r,a,e)=>!r||!a||r===a||H(r).some(t=>t&&(e?t===a:t.startsWith(a)||a.startsWith(t)));function Se(r){let a=x.useRef(r);a.current=r,x.useEffect(()=>{let e=!r.disabled&&a.current.subject&&a.current.subject.subscribe({next:a.current.next});return()=>{e&&e.unsubscribe()}},[r.disabled])}function Vt(r){let a=ne(),{control:e=a.control,disabled:t,name:s,exact:l}=r||{},[n,o]=x.useState(e._formState),f=x.useRef(!0),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),b=x.useRef(s);return b.current=s,Se({disabled:t,next:_=>f.current&&Vr(b.current,_.name,l)&&xr(_,c.current,e._updateFormState)&&o({...e._formState,..._}),subject:e._subjects.state}),x.useEffect(()=>(f.current=!0,c.current.isValid&&e._updateValid(!0),()=>{f.current=!1}),[e]),x.useMemo(()=>_r(n,e,c.current,!1),[n,e])}var Z=r=>typeof r=="string",Ar=(r,a,e,t,s)=>Z(r)?(t&&a.watch.add(r),m(e,r,s)):Array.isArray(r)?r.map(l=>(t&&a.watch.add(l),m(e,l))):(t&&(a.watchAll=!0),e);function Fr(r){let a=ne(),{control:e=a.control,name:t,defaultValue:s,disabled:l,exact:n}=r||{},o=x.useRef(t);o.current=t,Se({disabled:l,subject:e._subjects.values,next:b=>{Vr(o.current,b.name,n)&&c(B(Ar(o.current,e._names,b.values||e._formValues,!1,s)))}});let[f,c]=x.useState(e._getWatch(t,s));return x.useEffect(()=>e._removeUnmounted()),f}function At(r){let a=ne(),{name:e,disabled:t,control:s=a.control,shouldUnregister:l}=r,n=pr(s._names.array,e),o=Fr({control:s,name:e,defaultValue:m(s._formValues,e,m(s._defaultValues,e,r.defaultValue)),exact:!0}),f=Vt({control:s,name:e,exact:!0}),c=x.useRef(s.register(e,{...r.rules,value:o,...G(r.disabled)?{disabled:r.disabled}:{}})),b=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(f.errors,e)},isDirty:{enumerable:!0,get:()=>!!m(f.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!m(f.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!m(f.validatingFields,e)},error:{enumerable:!0,get:()=>m(f.errors,e)}}),[f,e]),_=x.useMemo(()=>({name:e,value:o,...G(t)||f.disabled?{disabled:f.disabled||t}:{},onChange:N=>c.current.onChange({target:{value:gr(N),name:e},type:Fe.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:m(s._formValues,e),name:e},type:Fe.BLUR}),ref:N=>{let k=m(s._fields,e);k&&N&&(k._f.ref={focus:()=>N.focus(),select:()=>N.select(),setCustomValidity:v=>N.setCustomValidity(v),reportValidity:()=>N.reportValidity()})}}),[e,s._formValues,t,f.disabled,o,s._fields]);return x.useEffect(()=>{let N=s._options.shouldUnregister||l,k=(v,h)=>{let A=m(s._fields,v);A&&A._f&&(A._f.mount=h)};if(k(e,!0),N){let v=B(m(s._options.defaultValues,e));D(s._defaultValues,e,v),E(m(s._formValues,e))&&D(s._formValues,e,v)}return!n&&s.register(e),()=>{(n?N&&!s._state.action:N)?s.unregister(e):k(e,!1)}},[e,s,n,l]),x.useEffect(()=>{s._updateDisabledField({disabled:t,fields:s._fields,name:e})},[t,e,s]),x.useMemo(()=>({field:_,formState:f,fieldState:b}),[_,f,b])}var Ft=r=>r.render(At(r)),Be=(r,a,e,t,s)=>a?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[t]:s||!0}}:{},ae=()=>{let r=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let e=(Math.random()*16+r)%16|0;return(a=="x"?e:e&3|8).toString(16)})},Le=(r,a,e={})=>e.shouldFocus||E(e.shouldFocus)?e.focusName||`${r}.${E(e.focusIndex)?a:e.focusIndex}.`:"",he=r=>({isOnSubmit:!r||r===J.onSubmit,isOnBlur:r===J.onBlur,isOnChange:r===J.onChange,isOnAll:r===J.all,isOnTouch:r===J.onTouched}),Re=(r,a,e)=>!e&&(a.watchAll||a.watch.has(r)||[...a.watch].some(t=>r.startsWith(t)&&/^\.\w+/.test(r.slice(t.length)))),fe=(r,a,e,t)=>{for(let s of e||Object.keys(r)){let l=m(r,s);if(l){let{_f:n,...o}=l;if(n){if(n.refs&&n.refs[0]&&a(n.refs[0],s)&&!t||n.ref&&a(n.ref,n.name)&&!t)return!0;if(fe(o,a))break}else if(O(o)&&fe(o,a))break}}},Sr=(r,a,e)=>{let t=H(m(r,e));return D(t,"root",a[e]),D(r,e,t),r},Ie=r=>r.type==="file",Q=r=>typeof r=="function",we=r=>{if(!Te)return!1;let a=r?r.ownerDocument:0;return r instanceof(a&&a.defaultView?a.defaultView.HTMLElement:HTMLElement)},ke=r=>Z(r),Pe=r=>r.type==="radio",De=r=>r instanceof RegExp,wr={value:!1,isValid:!1},kr={value:!0,isValid:!0},Dr=r=>{if(Array.isArray(r)){if(r.length>1){let a=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:a,isValid:!!a.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!E(r[0].attributes.value)?E(r[0].value)||r[0].value===""?kr:{value:r[0].value,isValid:!0}:kr:wr}return wr},jr={isValid:!1,value:null},Nr=r=>Array.isArray(r)?r.reduce((a,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:a,jr):jr;function Cr(r,a,e="validate"){if(ke(r)||Array.isArray(r)&&r.every(ke)||G(r)&&!r)return{type:e,message:ke(r)?r:"",ref:a}}var ce=r=>O(r)&&!De(r)?r:{value:r,message:""},qe=async(r,a,e,t,s,l)=>{let{ref:n,refs:o,required:f,maxLength:c,minLength:b,min:_,max:N,pattern:k,validate:v,name:h,valueAsNumber:A,mount:j}=r._f,w=m(e,h);if(!j||a.has(h))return{};let W=o?o[0]:n,X=F=>{s&&W.reportValidity&&(W.setCustomValidity(G(F)?"":F||""),W.reportValidity())},T={},ue=Pe(n),Ve=pe(n),ie=ue||Ve,oe=(A||Ie(n))&&E(n.value)&&E(w)||we(n)&&n.value===""||w===""||Array.isArray(w)&&!w.length,z=Be.bind(null,h,t,T),Ae=(F,C,M,R=ee.maxLength,Y=ee.minLength)=>{let K=F?C:M;T[h]={type:F?R:Y,message:K,ref:n,...z(F?R:Y,K)}};if(l?!Array.isArray(w)||!w.length:f&&(!ie&&(oe||q(w))||G(w)&&!w||Ve&&!Dr(o).isValid||ue&&!Nr(o).isValid)){let{value:F,message:C}=ke(f)?{value:!!f,message:f}:ce(f);if(F&&(T[h]={type:ee.required,message:C,ref:W,...z(ee.required,C)},!t))return X(C),T}if(!oe&&(!q(_)||!q(N))){let F,C,M=ce(N),R=ce(_);if(!q(w)&&!isNaN(w)){let Y=n.valueAsNumber||w&&+w;q(M.value)||(F=Y>M.value),q(R.value)||(C=Y<R.value)}else{let Y=n.valueAsDate||new Date(w),K=ge=>new Date(new Date().toDateString()+" "+ge),me=n.type=="time",ye=n.type=="week";Z(M.value)&&w&&(F=me?K(w)>K(M.value):ye?w>M.value:Y>new Date(M.value)),Z(R.value)&&w&&(C=me?K(w)<K(R.value):ye?w<R.value:Y<new Date(R.value))}if((F||C)&&(Ae(!!F,M.message,R.message,ee.max,ee.min),!t))return X(T[h].message),T}if((c||b)&&!oe&&(Z(w)||l&&Array.isArray(w))){let F=ce(c),C=ce(b),M=!q(F.value)&&w.length>+F.value,R=!q(C.value)&&w.length<+C.value;if((M||R)&&(Ae(M,F.message,C.message),!t))return X(T[h].message),T}if(k&&!oe&&Z(w)){let{value:F,message:C}=ce(k);if(De(F)&&!w.match(F)&&(T[h]={type:ee.pattern,message:C,ref:n,...z(ee.pattern,C)},!t))return X(C),T}if(v){if(Q(v)){let F=Cr(await v(w,e),W);if(F&&(T[h]={...F,...z(ee.validate,F.message)},!t))return X(F.message),T}else if(O(v)){let F={};for(let C in v){if(!$(F)&&!t)break;let M=Cr(await v[C](w,e),W,C);M&&(F={...M,...z(C,M.message)},X(M.message),t&&(T[h]=F))}if(!$(F)&&(T[h]={ref:W,...F},!t))return T}}return X(!0),T},$e=(r,a)=>[...r,...H(a)],He=r=>Array.isArray(r)?r.map(()=>{}):void 0;function We(r,a,e){return[...r.slice(0,a),...H(e),...r.slice(a)]}var ze=(r,a,e)=>Array.isArray(r)?(E(r[e])&&(r[e]=void 0),r.splice(e,0,r.splice(a,1)[0]),r):[],Ke=(r,a)=>[...H(a),...H(r)];function St(r,a){let e=0,t=[...r];for(let s of a)t.splice(s-e,1),e++;return ve(t).length?t:[]}var Ge=(r,a)=>E(a)?[]:St(r,H(a).sort((e,t)=>e-t)),Je=(r,a,e)=>{[r[a],r[e]]=[r[e],r[a]]};function wt(r,a){let e=a.slice(0,-1).length,t=0;for(;t<e;)r=E(r)?t++:r[a[t++]];return r}function kt(r){for(let a in r)if(r.hasOwnProperty(a)&&!E(r[a]))return!1;return!0}function U(r,a){let e=Array.isArray(a)?a:Me(a)?[a]:vr(a),t=e.length===1?r:wt(r,e),s=e.length-1,l=e[s];return t&&delete t[l],s!==0&&(O(t)&&$(t)||Array.isArray(t)&&kt(t))&&U(r,e.slice(0,-1)),r}var Er=(r,a,e)=>(r[a]=e,r);function Dt(r){let a=ne(),{control:e=a.control,name:t,keyName:s="id",shouldUnregister:l,rules:n}=r,[o,f]=x.useState(e._getFieldArray(t)),c=x.useRef(e._getFieldArray(t).map(ae)),b=x.useRef(o),_=x.useRef(t),N=x.useRef(!1);_.current=t,b.current=o,e._names.array.add(t),n&&e.register(t,n),Se({next:({values:v,name:h})=>{if(h===_.current||!h){let A=m(v,_.current);Array.isArray(A)&&(f(A),c.current=A.map(ae))}},subject:e._subjects.array});let k=x.useCallback(v=>{N.current=!0,e._updateFieldArray(t,v)},[e,t]);return x.useEffect(()=>{if(e._state.action=!1,Re(t,e._names)&&e._subjects.state.next({...e._formState}),N.current&&(!he(e._options.mode).isOnSubmit||e._formState.isSubmitted))if(e._options.resolver)e._executeSchema([t]).then(v=>{let h=m(v.errors,t),A=m(e._formState.errors,t);(A?!h&&A.type||h&&(A.type!==h.type||A.message!==h.message):h&&h.type)&&(h?D(e._formState.errors,t,h):U(e._formState.errors,t),e._subjects.state.next({errors:e._formState.errors}))});else{let v=m(e._fields,t);v&&v._f&&!(he(e._options.reValidateMode).isOnSubmit&&he(e._options.mode).isOnSubmit)&&qe(v,e._names.disabled,e._formValues,e._options.criteriaMode===J.all,e._options.shouldUseNativeValidation,!0).then(h=>!$(h)&&e._subjects.state.next({errors:Sr(e._formState.errors,h,t)}))}e._subjects.values.next({name:t,values:{...e._formValues}}),e._names.focus&&fe(e._fields,(v,h)=>{if(e._names.focus&&h.startsWith(e._names.focus)&&v.focus)return v.focus(),1}),e._names.focus="",e._updateValid(),N.current=!1},[o,t,e]),x.useEffect(()=>(!m(e._formValues,t)&&e._updateFieldArray(t),()=>{(e._options.shouldUnregister||l)&&e.unregister(t)}),[t,e,s,l]),{swap:x.useCallback((v,h)=>{let A=e._getFieldArray(t);Je(A,v,h),Je(c.current,v,h),k(A),f(A),e._updateFieldArray(t,A,Je,{argA:v,argB:h},!1)},[k,t,e]),move:x.useCallback((v,h)=>{let A=e._getFieldArray(t);ze(A,v,h),ze(c.current,v,h),k(A),f(A),e._updateFieldArray(t,A,ze,{argA:v,argB:h},!1)},[k,t,e]),prepend:x.useCallback((v,h)=>{let A=H(B(v)),j=Ke(e._getFieldArray(t),A);e._names.focus=Le(t,0,h),c.current=Ke(c.current,A.map(ae)),k(j),f(j),e._updateFieldArray(t,j,Ke,{argA:He(v)})},[k,t,e]),append:x.useCallback((v,h)=>{let A=H(B(v)),j=$e(e._getFieldArray(t),A);e._names.focus=Le(t,j.length-1,h),c.current=$e(c.current,A.map(ae)),k(j),f(j),e._updateFieldArray(t,j,$e,{argA:He(v)})},[k,t,e]),remove:x.useCallback(v=>{let h=Ge(e._getFieldArray(t),v);c.current=Ge(c.current,v),k(h),f(h),!Array.isArray(m(e._fields,t))&&D(e._fields,t,void 0),e._updateFieldArray(t,h,Ge,{argA:v})},[k,t,e]),insert:x.useCallback((v,h,A)=>{let j=H(B(h)),w=We(e._getFieldArray(t),v,j);e._names.focus=Le(t,v,A),c.current=We(c.current,v,j.map(ae)),k(w),f(w),e._updateFieldArray(t,w,We,{argA:v,argB:He(h)})},[k,t,e]),update:x.useCallback((v,h)=>{let A=B(h),j=Er(e._getFieldArray(t),v,A);c.current=[...j].map((w,W)=>!w||W===v?ae():c.current[W]),k(j),f([...j]),e._updateFieldArray(t,j,Er,{argA:v,argB:A},!0,!1)},[k,t,e]),replace:x.useCallback(v=>{let h=H(B(v));c.current=h.map(ae),k([...h]),f([...h]),e._updateFieldArray(t,[...h],A=>A,{},!0,!1)},[k,t,e]),fields:x.useMemo(()=>o.map((v,h)=>({...v,[s]:c.current[h]||ae()})),[o,s])}}var Ye=()=>{let r=[];return{get observers(){return r},next:a=>{for(let e of r)e.next&&e.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(e=>e!==a)}}),unsubscribe:()=>{r=[]}}},Ze=r=>q(r)||!yr(r);function se(r,a){if(Ze(r)||Ze(a))return r===a;if(le(r)&&le(a))return r.getTime()===a.getTime();let e=Object.keys(r),t=Object.keys(a);if(e.length!==t.length)return!1;for(let s of e){let l=r[s];if(!t.includes(s))return!1;if(s!=="ref"){let n=a[s];if(le(l)&&le(n)||O(l)&&O(n)||Array.isArray(l)&&Array.isArray(n)?!se(l,n):l!==n)return!1}}return!0}var Or=r=>r.type==="select-multiple",jt=r=>Pe(r)||pe(r),Qe=r=>we(r)&&r.isConnected,Ur=r=>{for(let a in r)if(Q(r[a]))return!0;return!1};function je(r,a={}){let e=Array.isArray(r);if(O(r)||e)for(let t in r)Array.isArray(r[t])||O(r[t])&&!Ur(r[t])?(a[t]=Array.isArray(r[t])?[]:{},je(r[t],a[t])):q(r[t])||(a[t]=!0);return a}function Tr(r,a,e){let t=Array.isArray(r);if(O(r)||t)for(let s in r)Array.isArray(r[s])||O(r[s])&&!Ur(r[s])?E(a)||Ze(e[s])?e[s]=Array.isArray(r[s])?je(r[s],[]):{...je(r[s])}:Tr(r[s],q(a)?{}:a[s],e[s]):e[s]=!se(r[s],a[s]);return e}var be=(r,a)=>Tr(r,a,je(a)),Mr=(r,{valueAsNumber:a,valueAsDate:e,setValueAs:t})=>E(r)?r:a?r===""?NaN:r&&+r:e&&Z(r)?new Date(r):t?t(r):r;function Xe(r){let a=r.ref;return Ie(a)?a.files:Pe(a)?Nr(r.refs).value:Or(a)?[...a.selectedOptions].map(({value:e})=>e):pe(a)?Dr(r.refs).value:Mr(E(a.value)?r.ref.value:a.value,r)}var Nt=(r,a,e,t)=>{let s={};for(let l of r){let n=m(a,l);n&&D(s,l,n._f)}return{criteriaMode:e,names:[...r],fields:s,shouldUseNativeValidation:t}},_e=r=>E(r)?r:De(r)?r.source:O(r)?De(r.value)?r.value.source:r.value:r,Br="AsyncFunction",Ct=r=>!!r&&!!r.validate&&!!(Q(r.validate)&&r.validate.constructor.name===Br||O(r.validate)&&Object.values(r.validate).find(a=>a.constructor.name===Br)),Et=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate);function Lr(r,a,e){let t=m(r,e);if(t||Me(e))return{error:t,name:e};let s=e.split(".");for(;s.length;){let l=s.join("."),n=m(a,l),o=m(r,l);if(n&&!Array.isArray(n)&&e!==l)return{name:e};if(o&&o.type)return{name:l,error:o};s.pop()}return{name:e}}var Ot=(r,a,e,t,s)=>s.isOnAll?!1:!e&&s.isOnTouch?!(a||r):(e?t.isOnBlur:s.isOnBlur)?!r:(e?t.isOnChange:s.isOnChange)?r:!0,Ut=(r,a)=>!ve(m(r,a)).length&&U(r,a),Tt={mode:J.onSubmit,reValidateMode:J.onChange,shouldFocusError:!0};function Mt(r={}){let a={...Tt,...r},e={submitCount:0,isDirty:!1,isLoading:Q(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:a.errors||{},disabled:a.disabled||!1},t={},s=(O(a.defaultValues)||O(a.values))&&B(a.defaultValues||a.values)||{},l=a.shouldUnregister?{}:B(s),n={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,c=0,b={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},_={values:Ye(),array:Ye(),state:Ye()},N=he(a.mode),k=he(a.reValidateMode),v=a.criteriaMode===J.all,h=i=>u=>{clearTimeout(c),c=setTimeout(i,u)},A=async i=>{if(!a.disabled&&(b.isValid||i)){let u=a.resolver?$((await ie()).errors):await z(t,!0);u!==e.isValid&&_.state.next({isValid:u})}},j=(i,u)=>{!a.disabled&&(b.isValidating||b.validatingFields)&&((i||Array.from(o.mount)).forEach(d=>{d&&(u?D(e.validatingFields,d,u):U(e.validatingFields,d))}),_.state.next({validatingFields:e.validatingFields,isValidating:!$(e.validatingFields)}))},w=(i,u=[],d,p,g=!0,y=!0)=>{if(p&&d&&!a.disabled){if(n.action=!0,y&&Array.isArray(m(t,i))){let V=d(m(t,i),p.argA,p.argB);g&&D(t,i,V)}if(y&&Array.isArray(m(e.errors,i))){let V=d(m(e.errors,i),p.argA,p.argB);g&&D(e.errors,i,V),Ut(e.errors,i)}if(b.touchedFields&&y&&Array.isArray(m(e.touchedFields,i))){let V=d(m(e.touchedFields,i),p.argA,p.argB);g&&D(e.touchedFields,i,V)}b.dirtyFields&&(e.dirtyFields=be(s,l)),_.state.next({name:i,isDirty:F(i,u),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else D(l,i,u)},W=(i,u)=>{D(e.errors,i,u),_.state.next({errors:e.errors})},X=i=>{e.errors=i,_.state.next({errors:e.errors,isValid:!1})},T=(i,u,d,p)=>{let g=m(t,i);if(g){let y=m(l,i,E(d)?m(s,i):d);E(y)||p&&p.defaultChecked||u?D(l,i,u?y:Xe(g._f)):R(i,y),n.mount&&A()}},ue=(i,u,d,p,g)=>{let y=!1,V=!1,S={name:i};if(!a.disabled){let I=!!(m(t,i)&&m(t,i)._f&&m(t,i)._f.disabled);if(!d||p){b.isDirty&&(V=e.isDirty,e.isDirty=S.isDirty=F(),y=V!==S.isDirty);let L=I||se(m(s,i),u);V=!!(!I&&m(e.dirtyFields,i)),L||I?U(e.dirtyFields,i):D(e.dirtyFields,i,!0),S.dirtyFields=e.dirtyFields,y||(y=b.dirtyFields&&V!==!L)}if(d){let L=m(e.touchedFields,i);L||(D(e.touchedFields,i,d),S.touchedFields=e.touchedFields,y||(y=b.touchedFields&&L!==d))}y&&g&&_.state.next(S)}return y?S:{}},Ve=(i,u,d,p)=>{let g=m(e.errors,i),y=b.isValid&&G(u)&&e.isValid!==u;if(a.delayError&&d?(f=h(()=>W(i,d)),f(a.delayError)):(clearTimeout(c),f=null,d?D(e.errors,i,d):U(e.errors,i)),(d?!se(g,d):g)||!$(p)||y){let V={...p,...y&&G(u)?{isValid:u}:{},errors:e.errors,name:i};e={...e,...V},_.state.next(V)}},ie=async i=>{j(i,!0);let u=await a.resolver(l,a.context,Nt(i||o.mount,t,a.criteriaMode,a.shouldUseNativeValidation));return j(i),u},oe=async i=>{let{errors:u}=await ie(i);if(i)for(let d of i){let p=m(u,d);p?D(e.errors,d,p):U(e.errors,d)}else e.errors=u;return u},z=async(i,u,d={valid:!0})=>{for(let p in i){let g=i[p];if(g){let{_f:y,...V}=g;if(y){let S=o.array.has(y.name),I=g._f&&Ct(g._f);I&&b.validatingFields&&j([p],!0);let L=await qe(g,o.disabled,l,v,a.shouldUseNativeValidation&&!u,S);if(I&&b.validatingFields&&j([p]),L[y.name]&&(d.valid=!1,u))break;!u&&(m(L,y.name)?S?Sr(e.errors,L,y.name):D(e.errors,y.name,L[y.name]):U(e.errors,y.name))}!$(V)&&await z(V,u,d)}}return d.valid},Ae=()=>{for(let i of o.unMount){let u=m(t,i);u&&(u._f.refs?u._f.refs.every(d=>!Qe(d)):!Qe(u._f.ref))&&Ce(i)}o.unMount=new Set},F=(i,u)=>!a.disabled&&(i&&u&&D(l,i,u),!se(tr(),s)),C=(i,u,d)=>Ar(i,o,{...n.mount?l:E(u)?s:Z(i)?{[i]:u}:u},d,u),M=i=>ve(m(n.mount?l:s,i,a.shouldUnregister?m(s,i,[]):[])),R=(i,u,d={})=>{let p=m(t,i),g=u;if(p){let y=p._f;y&&(!y.disabled&&D(l,i,Mr(u,y)),g=we(y.ref)&&q(u)?"":u,Or(y.ref)?[...y.ref.options].forEach(V=>V.selected=g.includes(V.value)):y.refs?pe(y.ref)?y.refs.length>1?y.refs.forEach(V=>(!V.defaultChecked||!V.disabled)&&(V.checked=Array.isArray(g)?!!g.find(S=>S===V.value):g===V.value)):y.refs[0]&&(y.refs[0].checked=!!g):y.refs.forEach(V=>V.checked=V.value===g):Ie(y.ref)?y.ref.value="":(y.ref.value=g,y.ref.type||_.values.next({name:i,values:{...l}})))}(d.shouldDirty||d.shouldTouch)&&ue(i,g,d.shouldTouch,d.shouldDirty,!0),d.shouldValidate&&ge(i)},Y=(i,u,d)=>{for(let p in u){let g=u[p],y=`${i}.${p}`,V=m(t,y);(o.array.has(i)||O(g)||V&&!V._f)&&!le(g)?Y(y,g,d):R(y,g,d)}},K=(i,u,d={})=>{let p=m(t,i),g=o.array.has(i),y=B(u);D(l,i,y),g?(_.array.next({name:i,values:{...l}}),(b.isDirty||b.dirtyFields)&&d.shouldDirty&&_.state.next({name:i,dirtyFields:be(s,l),isDirty:F(i,y)})):p&&!p._f&&!q(y)?Y(i,y,d):R(i,y,d),Re(i,o)&&_.state.next({...e}),_.values.next({name:n.mount?i:void 0,values:{...l}})},me=async i=>{n.mount=!0;let u=i.target,d=u.name,p=!0,g=m(t,d),y=()=>u.type?Xe(g._f):gr(i),V=S=>{p=Number.isNaN(S)||le(S)&&isNaN(S.getTime())||se(S,m(l,d,S))};if(g){let S,I,L=y(),te=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,at=!Et(g._f)&&!a.resolver&&!m(e.errors,d)&&!g._f.deps||Ot(te,m(e.touchedFields,d),e.isSubmitted,k,N),Oe=Re(d,o,te);D(l,d,L),te?(g._f.onBlur&&g._f.onBlur(i),f&&f(0)):g._f.onChange&&g._f.onChange(i);let Ue=ue(d,L,te,!1),st=!$(Ue)||Oe;if(!te&&_.values.next({name:d,type:i.type,values:{...l}}),at)return b.isValid&&(a.mode==="onBlur"&&te?A():te||A()),st&&_.state.next({name:d,...Oe?{}:Ue});if(!te&&Oe&&_.state.next({...e}),a.resolver){let{errors:dr}=await ie([d]);if(V(L),p){let it=Lr(e.errors,t,d),fr=Lr(dr,t,it.name||d);S=fr.error,d=fr.name,I=$(dr)}}else j([d],!0),S=(await qe(g,o.disabled,l,v,a.shouldUseNativeValidation))[d],j([d]),V(L),p&&(S?I=!1:b.isValid&&(I=await z(t,!0)));p&&(g._f.deps&&ge(g._f.deps),Ve(d,I,S,Ue))}},ye=(i,u)=>{if(m(e.errors,u)&&i.focus)return i.focus(),1},ge=async(i,u={})=>{let d,p,g=H(i);if(a.resolver){let y=await oe(E(i)?i:g);d=$(y),p=i?!g.some(V=>m(y,V)):d}else i?(p=(await Promise.all(g.map(async y=>{let V=m(t,y);return await z(V&&V._f?{[y]:V}:V)}))).every(Boolean),!(!p&&!e.isValid)&&A()):p=d=await z(t);return _.state.next({...!Z(i)||b.isValid&&d!==e.isValid?{}:{name:i},...a.resolver||!i?{isValid:d}:{},errors:e.errors}),u.shouldFocus&&!p&&fe(t,ye,i?g:o.mount),p},tr=i=>{let u={...n.mount?l:s};return E(i)?u:Z(i)?m(u,i):i.map(d=>m(u,d))},ar=(i,u)=>({invalid:!!m((u||e).errors,i),isDirty:!!m((u||e).dirtyFields,i),error:m((u||e).errors,i),isValidating:!!m(e.validatingFields,i),isTouched:!!m((u||e).touchedFields,i)}),Xr=i=>{i&&H(i).forEach(u=>U(e.errors,u)),_.state.next({errors:i?e.errors:{}})},sr=(i,u,d)=>{let p=(m(t,i,{_f:{}})._f||{}).ref,{ref:g,message:y,type:V,...S}=m(e.errors,i)||{};D(e.errors,i,{...S,...u,ref:p}),_.state.next({name:i,errors:e.errors,isValid:!1}),d&&d.shouldFocus&&p&&p.focus&&p.focus()},et=(i,u)=>Q(i)?_.values.subscribe({next:d=>i(C(void 0,u),d)}):C(i,u,!0),Ce=(i,u={})=>{for(let d of i?H(i):o.mount)o.mount.delete(d),o.array.delete(d),u.keepValue||(U(t,d),U(l,d)),!u.keepError&&U(e.errors,d),!u.keepDirty&&U(e.dirtyFields,d),!u.keepTouched&&U(e.touchedFields,d),!u.keepIsValidating&&U(e.validatingFields,d),!a.shouldUnregister&&!u.keepDefaultValue&&U(s,d);_.values.next({values:{...l}}),_.state.next({...e,...u.keepDirty?{isDirty:F()}:{}}),!u.keepIsValid&&A()},ir=({disabled:i,name:u,field:d,fields:p})=>{(G(i)&&n.mount||i||o.disabled.has(u))&&(i?o.disabled.add(u):o.disabled.delete(u),ue(u,Xe(d?d._f:m(p,u)._f),!1,!1,!0))},Ee=(i,u={})=>{let d=m(t,i),p=G(u.disabled)||G(a.disabled);return D(t,i,{...d||{},_f:{...d&&d._f?d._f:{ref:{name:i}},name:i,mount:!0,...u}}),o.mount.add(i),d?ir({field:d,disabled:G(u.disabled)?u.disabled:a.disabled,name:i}):T(i,!0,u.value),{...p?{disabled:u.disabled||a.disabled}:{},...a.progressive?{required:!!u.required,min:_e(u.min),max:_e(u.max),minLength:_e(u.minLength),maxLength:_e(u.maxLength),pattern:_e(u.pattern)}:{},name:i,onChange:me,onBlur:me,ref:g=>{if(g){Ee(i,u),d=m(t,i);let y=E(g.value)&&g.querySelectorAll&&g.querySelectorAll("input,select,textarea")[0]||g,V=jt(y),S=d._f.refs||[];if(V?S.find(I=>I===y):y===d._f.ref)return;D(t,i,{_f:{...d._f,...V?{refs:[...S.filter(Qe),y,...Array.isArray(m(s,i))?[{}]:[]],ref:{type:y.type,name:i}}:{ref:y}}}),T(i,!1,void 0,y)}else d=m(t,i,{}),d._f&&(d._f.mount=!1),(a.shouldUnregister||u.shouldUnregister)&&!(pr(o.array,i)&&n.action)&&o.unMount.add(i)}}},lr=()=>a.shouldFocusError&&fe(t,ye,o.mount),rt=i=>{G(i)&&(_.state.next({disabled:i}),fe(t,(u,d)=>{let p=m(t,d);p&&(u.disabled=p._f.disabled||i,Array.isArray(p._f.refs)&&p._f.refs.forEach(g=>{g.disabled=p._f.disabled||i}))},0,!1))},nr=(i,u)=>async d=>{let p;d&&(d.preventDefault&&d.preventDefault(),d.persist&&d.persist());let g=B(l);if(o.disabled.size)for(let y of o.disabled)D(g,y,void 0);if(_.state.next({isSubmitting:!0}),a.resolver){let{errors:y,values:V}=await ie();e.errors=y,g=V}else await z(t);if(U(e.errors,"root"),$(e.errors)){_.state.next({errors:{}});try{await i(g,d)}catch(y){p=y}}else u&&await u({...e.errors},d),lr(),setTimeout(lr);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$(e.errors)&&!p,submitCount:e.submitCount+1,errors:e.errors}),p)throw p},tt=(i,u={})=>{m(t,i)&&(E(u.defaultValue)?K(i,B(m(s,i))):(K(i,u.defaultValue),D(s,i,B(u.defaultValue))),u.keepTouched||U(e.touchedFields,i),u.keepDirty||(U(e.dirtyFields,i),e.isDirty=u.defaultValue?F(i,B(m(s,i))):F()),u.keepError||(U(e.errors,i),b.isValid&&A()),_.state.next({...e}))},ur=(i,u={})=>{let d=i?B(i):s,p=B(d),g=$(i),y=g?s:p;if(u.keepDefaultValues||(s=d),!u.keepValues){if(u.keepDirtyValues){let V=new Set([...o.mount,...Object.keys(be(s,l))]);for(let S of Array.from(V))m(e.dirtyFields,S)?D(y,S,m(l,S)):K(S,m(y,S))}else{if(Te&&E(i))for(let V of o.mount){let S=m(t,V);if(S&&S._f){let I=Array.isArray(S._f.refs)?S._f.refs[0]:S._f.ref;if(we(I)){let L=I.closest("form");if(L){L.reset();break}}}}t={}}l=a.shouldUnregister?u.keepDefaultValues?B(s):{}:B(y),_.array.next({values:{...y}}),_.values.next({values:{...y}})}o={mount:u.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},n.mount=!b.isValid||!!u.keepIsValid||!!u.keepDirtyValues,n.watch=!!a.shouldUnregister,_.state.next({submitCount:u.keepSubmitCount?e.submitCount:0,isDirty:g?!1:u.keepDirty?e.isDirty:!!(u.keepDefaultValues&&!se(i,s)),isSubmitted:u.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:g?{}:u.keepDirtyValues?u.keepDefaultValues&&l?be(s,l):e.dirtyFields:u.keepDefaultValues&&i?be(s,i):u.keepDirty?e.dirtyFields:{},touchedFields:u.keepTouched?e.touchedFields:{},errors:u.keepErrors?e.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},or=(i,u)=>ur(Q(i)?i(l):i,u);return{control:{register:Ee,unregister:Ce,getFieldState:ar,handleSubmit:nr,setError:sr,_executeSchema:ie,_getWatch:C,_getDirty:F,_updateValid:A,_removeUnmounted:Ae,_updateFieldArray:w,_updateDisabledField:ir,_getFieldArray:M,_reset:ur,_resetDefaultValues:()=>Q(a.defaultValues)&&a.defaultValues().then(i=>{or(i,a.resetOptions),_.state.next({isLoading:!1})}),_updateFormState:i=>{e={...e,...i}},_disableForm:rt,_subjects:_,_proxyFormState:b,_setErrors:X,get _fields(){return t},get _formValues(){return l},get _state(){return n},set _state(i){n=i},get _defaultValues(){return s},get _names(){return o},set _names(i){o=i},get _formState(){return e},set _formState(i){e=i},get _options(){return a},set _options(i){a={...a,...i}}},trigger:ge,register:Ee,handleSubmit:nr,watch:et,setValue:K,getValues:tr,reset:or,resetField:tt,clearErrors:Xr,unregister:Ce,setError:sr,setFocus:(i,u={})=>{let d=m(t,i),p=d&&d._f;if(p){let g=p.refs?p.refs[0]:p.ref;g.focus&&(g.focus(),u.shouldSelect&&Q(g.select)&&g.select())}},getFieldState:ar}}function Bt(r={}){let a=x.useRef(void 0),e=x.useRef(void 0),[t,s]=x.useState({isDirty:!1,isValidating:!1,isLoading:Q(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,defaultValues:Q(r.defaultValues)?void 0:r.defaultValues});a.current||(a.current={...Mt(r),formState:t});let l=a.current.control;return l._options=r,Se({subject:l._subjects.state,next:n=>{xr(n,l._proxyFormState,l._updateFormState,!0)&&s({...l._formState})}}),x.useEffect(()=>l._disableForm(r.disabled),[l,r.disabled]),x.useEffect(()=>{if(l._proxyFormState.isDirty){let n=l._getDirty();n!==t.isDirty&&l._subjects.state.next({isDirty:n})}},[l,t.isDirty]),x.useEffect(()=>{r.values&&!se(r.values,e.current)?(l._reset(r.values,l._options.resetOptions),e.current=r.values,s(n=>({...n}))):l._resetDefaultValues()},[r.values,l]),x.useEffect(()=>{r.errors&&l._setErrors(r.errors)},[r.errors,l]),x.useEffect(()=>{l._state.mount||(l._updateValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),x.useEffect(()=>{r.shouldUnregister&&l._subjects.values.next({values:l._getWatch()})},[r.shouldUnregister,l]),a.current.formState=_r(t,l),a.current}var Rr=(r,a,e)=>{if(r&&"reportValidity"in r){let t=m(e,a);r.setCustomValidity(t&&t.message||""),r.reportValidity()}},er=(r,a)=>{for(let e in a.fields){let t=a.fields[e];t&&t.ref&&"reportValidity"in t.ref?Rr(t.ref,e,r):t&&t.refs&&t.refs.forEach(s=>Rr(s,e,r))}},Ir=(r,a)=>{a.shouldUseNativeValidation&&er(r,a);let e={};for(let t in r){let s=m(a.fields,t),l=Object.assign(r[t]||{},{ref:s&&s.ref});if(Lt(a.names||Object.keys(r),t)){let n=Object.assign({},m(e,t));D(n,"root",l),D(e,t,n)}else D(e,t,l)}return e},Lt=(r,a)=>{let e=Pr(a);return r.some(t=>Pr(t).match(`^${e}\\.\\d+`))};function Pr(r){return r.replace(/\]|\[/g,"")}function qr(r,a){try{var e=r()}catch(t){return a(t)}return e&&e.then?e.then(void 0,a):e}function Rt(r,a){for(var e={};r.length;){var t=r[0],s=t.code,l=t.message,n=t.path.join(".");if(!e[n])if("unionErrors"in t){var o=t.unionErrors[0].errors[0];e[n]={message:o.message,type:o.code}}else e[n]={message:l,type:s};if("unionErrors"in t&&t.unionErrors.forEach(function(b){return b.errors.forEach(function(_){return r.push(_)})}),a){var f=e[n].types,c=f&&f[t.code];e[n]=Be(n,a,e,s,c?[].concat(c,t.message):t.message)}r.shift()}return e}function It(r,a){for(var e={};r.length;){var t=r[0],s=t.code,l=t.message,n=t.path.join(".");if(!e[n])if(t.code==="invalid_union"&&t.errors.length>0){var o=t.errors[0][0];e[n]={message:o.message,type:o.code}}else e[n]={message:l,type:s};if(t.code==="invalid_union"&&t.errors.forEach(function(b){return b.forEach(function(_){return r.push(_)})}),a){var f=e[n].types,c=f&&f[t.code];e[n]=Be(n,a,e,s,c?[].concat(c,t.message):t.message)}r.shift()}return e}function Pt(r,a,e){if(e===void 0&&(e={}),(function(t){return"_def"in t&&typeof t._def=="object"&&"typeName"in t._def})(r))return function(t,s,l){try{return Promise.resolve(qr(function(){return Promise.resolve(r[e.mode==="sync"?"parse":"parseAsync"](t,a)).then(function(n){return l.shouldUseNativeValidation&&er({},l),{errors:{},values:e.raw?Object.assign({},t):n}})},function(n){if((function(o){return Array.isArray(o==null?void 0:o.issues)})(n))return{values:{},errors:Ir(Rt(n.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw n}))}catch(n){return Promise.reject(n)}};if((function(t){return"_zod"in t&&typeof t._zod=="object"})(r))return function(t,s,l){try{return Promise.resolve(qr(function(){return Promise.resolve((e.mode==="sync"?ut:ot)(r,t,a)).then(function(n){return l.shouldUseNativeValidation&&er({},l),{errors:{},values:e.raw?Object.assign({},t):n}})},function(n){if((function(o){return o instanceof dt})(n))return{values:{},errors:Ir(It(n.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw n}))}catch(n){return Promise.reject(n)}};throw Error("Invalid input: not a Zod schema")}var re=mr(),P=cr(ft(),1),qt=br;const $t=()=>{let r=(0,re.c)(4),a=ne().formState.errors;if(Object.keys(a).length===0)return null;let e;r[0]===a?e=r[1]:(e=Object.values(a).map(Wt).filter(Boolean),r[0]=a,r[1]=e);let t=e.join(", "),s;return r[2]===t?s=r[3]:(s=(0,P.jsx)("div",{className:"text-destructive p-2 rounded-md bg-red-500/10",children:t}),r[2]=t,r[3]=s),s};var $r=x.createContext({}),Ht=r=>{let a=(0,re.c)(10),e;a[0]===r?e=a[1]:({...e}=r,a[0]=r,a[1]=e);let t;a[2]===e.name?t=a[3]:(t={name:e.name},a[2]=e.name,a[3]=t);let s;a[4]===e?s=a[5]:(s=(0,P.jsx)(Ft,{...e}),a[4]=e,a[5]=s);let l;return a[6]!==e.name||a[7]!==t||a[8]!==s?(l=(0,P.jsx)($r,{value:t,children:s},e.name),a[6]=e.name,a[7]=t,a[8]=s,a[9]=l):l=a[9],l},xe=()=>{let r=(0,re.c)(11),a=x.use($r),e=x.use(Hr),{getFieldState:t,formState:s}=ne(),l;r[0]!==a.name||r[1]!==s||r[2]!==t?(l=t(a.name,s),r[0]=a.name,r[1]=s,r[2]=t,r[3]=l):l=r[3];let n=l;if(!a)throw Error("useFormField should be used within <FormField>");let{id:o}=e,f=`${o}-form-item`,c=`${o}-form-item-description`,b=`${o}-form-item-message`,_;return r[4]!==a.name||r[5]!==n||r[6]!==o||r[7]!==f||r[8]!==c||r[9]!==b?(_={id:o,name:a.name,formItemId:f,formDescriptionId:c,formMessageId:b,...n},r[4]=a.name,r[5]=n,r[6]=o,r[7]=f,r[8]=c,r[9]=b,r[10]=_):_=r[10],_},Hr=x.createContext({}),Wr=x.forwardRef((r,a)=>{let e=(0,re.c)(14),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let l=x.useId(),n;e[3]===l?n=e[4]:(n={id:l},e[3]=l,e[4]=n);let o;e[5]===t?o=e[6]:(o=de("flex flex-col gap-1",t),e[5]=t,e[6]=o);let f;e[7]!==s||e[8]!==a||e[9]!==o?(f=(0,P.jsx)("div",{ref:a,className:o,...s}),e[7]=s,e[8]=a,e[9]=o,e[10]=f):f=e[10];let c;return e[11]!==n||e[12]!==f?(c=(0,P.jsx)(Hr,{value:n,children:f}),e[11]=n,e[12]=f,e[13]=c):c=e[13],c});Wr.displayName="FormItem";var zr=x.forwardRef((r,a)=>{let e=(0,re.c)(11),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let{error:l,formItemId:n}=xe();if(!s.children)return;let o=l&&"text-destructive",f;e[3]!==t||e[4]!==o?(f=de(o,t),e[3]=t,e[4]=o,e[5]=f):f=e[5];let c;return e[6]!==n||e[7]!==s||e[8]!==a||e[9]!==f?(c=(0,P.jsx)(ht,{ref:a,className:f,htmlFor:n,...s}),e[6]=n,e[7]=s,e[8]=a,e[9]=f,e[10]=c):c=e[10],c});zr.displayName="FormLabel";var Kr=x.forwardRef((r,a)=>{let e=(0,re.c)(8),t;e[0]===r?t=e[1]:({...t}=r,e[0]=r,e[1]=t);let{error:s,formItemId:l,formDescriptionId:n,formMessageId:o}=xe(),f=s?`${n} ${o}`:n,c=!!s,b;return e[2]!==l||e[3]!==t||e[4]!==a||e[5]!==f||e[6]!==c?(b=(0,P.jsx)(ct,{ref:a,id:l,"aria-describedby":f,"aria-invalid":c,...t}),e[2]=l,e[3]=t,e[4]=a,e[5]=f,e[6]=c,e[7]=b):b=e[7],b});Kr.displayName="FormControl";var Gr=x.forwardRef((r,a)=>{let e=(0,re.c)(10),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let{formDescriptionId:l}=xe();if(!s.children)return null;let n;e[3]===t?n=e[4]:(n=de("text-sm text-muted-foreground",t),e[3]=t,e[4]=n);let o;return e[5]!==l||e[6]!==s||e[7]!==a||e[8]!==n?(o=(0,P.jsx)("p",{ref:a,id:l,className:n,...s}),e[5]=l,e[6]=s,e[7]=a,e[8]=n,e[9]=o):o=e[9],o});Gr.displayName="FormDescription";var Jr=x.forwardRef((r,a)=>{let e=(0,re.c)(12),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:s,children:t,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let{error:n,formMessageId:o}=xe(),f=n!=null&&n.message?String(n==null?void 0:n.message):t;if(!f)return null;let c;e[4]===s?c=e[5]:(c=de("text-xs font-medium text-destructive",s),e[4]=s,e[5]=c);let b;return e[6]!==f||e[7]!==o||e[8]!==l||e[9]!==a||e[10]!==c?(b=(0,P.jsx)("p",{ref:a,id:o,className:c,...l,children:f}),e[6]=f,e[7]=o,e[8]=l,e[9]=a,e[10]=c,e[11]=b):b=e[11],b});Jr.displayName="FormMessage";var Yr=r=>{let a=(0,re.c)(7),{className:e}=r,{error:t}=xe(),s=t!=null&&t.message?String(t==null?void 0:t.message):null;if(!s)return null;let l;a[0]===e?l=a[1]:(l=de("stroke-[1.8px]",e),a[0]=e,a[1]=l);let n;a[2]===l?n=a[3]:(n=(0,P.jsx)(nt,{className:l}),a[2]=l,a[3]=n);let o;return a[4]!==s||a[5]!==n?(o=(0,P.jsx)(pt,{content:s,children:n}),a[4]=s,a[5]=n,a[6]=o):o=a[6],o};Yr.displayName="FormMessageTooltip";function Wt(r){return r==null?void 0:r.message}var rr=mr(),Ne=x.forwardRef((r,a)=>{let e=(0,rr.c)(16),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:s,bottomAdornment:t,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let n;e[4]===s?n=e[5]:(n=de("shadow-xs-solid hover:shadow-sm-solid disabled:shadow-xs-solid focus-visible:shadow-md-solid","flex w-full mb-1 rounded-sm border border-input bg-background px-3 py-2 text-sm font-code ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-accent disabled:cursor-not-allowed disabled:opacity-50 min-h-6",s),e[4]=s,e[5]=n);let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=mt.stopPropagation(),e[6]=o):o=e[6];let f;e[7]!==l||e[8]!==a||e[9]!==n?(f=(0,P.jsx)("textarea",{className:n,onClick:o,ref:a,...l}),e[7]=l,e[8]=a,e[9]=n,e[10]=f):f=e[10];let c;e[11]===t?c=e[12]:(c=t&&(0,P.jsx)("div",{className:"absolute right-0 bottom-1 flex items-center pr-[6px] pointer-events-none text-muted-foreground h-6",children:t}),e[11]=t,e[12]=c);let b;return e[13]!==f||e[14]!==c?(b=(0,P.jsxs)("div",{className:"relative",children:[f,c]}),e[13]=f,e[14]=c,e[15]=b):b=e[15],b});Ne.displayName="Textarea";const Zr=x.forwardRef((r,a)=>{let e=(0,rr.c)(16),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:t,onValueChange:s,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let n;e[4]!==s||e[5]!==l.delay||e[6]!==l.value?(n={initialValue:l.value,delay:l.delay,onChange:s},e[4]=s,e[5]=l.delay,e[6]=l.value,e[7]=n):n=e[7];let{value:o,onChange:f}=vt(n),c;e[8]===f?c=e[9]:(c=_=>f(_.target.value),e[8]=f,e[9]=c);let b;return e[10]!==t||e[11]!==l||e[12]!==a||e[13]!==c||e[14]!==o?(b=(0,P.jsx)(Ne,{ref:a,className:t,...l,onChange:c,value:o}),e[10]=t,e[11]=l,e[12]=a,e[13]=c,e[14]=o,e[15]=b):b=e[15],b});Zr.displayName="DebouncedTextarea";const Qr=x.forwardRef((r,a)=>{let e=(0,rr.c)(23),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:t,onValueChange:s,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let[n,o]=x.useState(l.value),f;e[4]!==n||e[5]!==s||e[6]!==l.value?(f={prop:l.value,defaultProp:n,onChange:s},e[4]=n,e[5]=s,e[6]=l.value,e[7]=f):f=e[7];let[c,b]=gt(f),_,N;e[8]===c?(_=e[9],N=e[10]):(_=()=>{o(c||"")},N=[c],e[8]=c,e[9]=_,e[10]=N),x.useEffect(_,N);let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=j=>o(j.target.value),e[11]=k):k=e[11];let v,h;e[12]!==n||e[13]!==b?(v=()=>b(n),h=j=>{j.ctrlKey&&j.key==="Enter"&&(j.preventDefault(),b(n))},e[12]=n,e[13]=b,e[14]=v,e[15]=h):(v=e[14],h=e[15]);let A;return e[16]!==t||e[17]!==n||e[18]!==l||e[19]!==a||e[20]!==v||e[21]!==h?(A=(0,P.jsx)(Ne,{ref:a,className:t,...l,value:n,onChange:k,onBlur:v,onKeyDown:h}),e[16]=t,e[17]=n,e[18]=l,e[19]=a,e[20]=v,e[21]=h,e[22]=A):A=e[22],A});Qr.displayName="OnBlurredTextarea";export{ne as _,Kr as a,Ht as c,Jr as d,Yr as f,Bt as g,Dt as h,qt as i,Wr as l,br as m,Qr as n,Gr as o,Pt as p,Ne as r,$t as s,Zr as t,zr as u,Fr as v,bt as y};
var u={addition:"inserted",attributes:"propertyName",bold:"strong",cite:"keyword",code:"monospace",definitionList:"list",deletion:"deleted",div:"punctuation",em:"emphasis",footnote:"variable",footCite:"qualifier",header:"heading",html:"comment",image:"atom",italic:"emphasis",link:"link",linkDefinition:"link",list1:"list",list2:"list.special",list3:"list",notextile:"string.special",pre:"operator",p:"content",quote:"bracket",span:"quote",specialChar:"character",strong:"strong",sub:"content.special",sup:"content.special",table:"variableName.special",tableHeading:"operator"};function b(t,e){e.mode=r.newLayout,e.tableHeading=!1,e.layoutType==="definitionList"&&e.spanningLayout&&t.match(a("definitionListEnd"),!1)&&(e.spanningLayout=!1)}function d(t,e,i){if(i==="_")return t.eat("_")?s(t,e,"italic",/__/,2):s(t,e,"em",/_/,1);if(i==="*")return t.eat("*")?s(t,e,"bold",/\*\*/,2):s(t,e,"strong",/\*/,1);if(i==="[")return t.match(/\d+\]/)&&(e.footCite=!0),o(e);if(i==="("&&t.match(/^(r|tm|c)\)/))return u.specialChar;if(i==="<"&&t.match(/(\w+)[^>]+>[^<]+<\/\1>/))return u.html;if(i==="?"&&t.eat("?"))return s(t,e,"cite",/\?\?/,2);if(i==="="&&t.eat("="))return s(t,e,"notextile",/==/,2);if(i==="-"&&!t.eat("-"))return s(t,e,"deletion",/-/,1);if(i==="+")return s(t,e,"addition",/\+/,1);if(i==="~")return s(t,e,"sub",/~/,1);if(i==="^")return s(t,e,"sup",/\^/,1);if(i==="%")return s(t,e,"span",/%/,1);if(i==="@")return s(t,e,"code",/@/,1);if(i==="!"){var l=s(t,e,"image",/(?:\([^\)]+\))?!/,1);return t.match(/^:\S+/),l}return o(e)}function s(t,e,i,l,p){var c=t.pos>p?t.string.charAt(t.pos-p-1):null,m=t.peek();if(e[i]){if((!m||/\W/.test(m))&&c&&/\S/.test(c)){var h=o(e);return e[i]=!1,h}}else(!c||/\W/.test(c))&&m&&/\S/.test(m)&&t.match(RegExp("^.*\\S"+l.source+"(?:\\W|$)"),!1)&&(e[i]=!0,e.mode=r.attributes);return o(e)}function o(t){var e=f(t);if(e)return e;var i=[];return t.layoutType&&i.push(u[t.layoutType]),i=i.concat(y(t,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),t.layoutType==="header"&&i.push(u.header+"-"+t.header),i.length?i.join(" "):null}function f(t){var e=t.layoutType;switch(e){case"notextile":case"code":case"pre":return u[e];default:return t.notextile?u.notextile+(e?" "+u[e]:""):null}}function y(t){for(var e=[],i=1;i<arguments.length;++i)t[arguments[i]]&&e.push(u[arguments[i]]);return e}function g(t){var e=t.spanningLayout,i=t.layoutType;for(var l in t)t.hasOwnProperty(l)&&delete t[l];t.mode=r.newLayout,e&&(t.layoutType=i,t.spanningLayout=!0)}var n={cache:{},single:{bc:"bc",bq:"bq",definitionList:/- .*?:=+/,definitionListEnd:/.*=:\s*$/,div:"div",drawTable:/\|.*\|/,foot:/fn\d+/,header:/h[1-6]/,html:/\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(t){switch(t){case"drawTable":return n.makeRe("^",n.single.drawTable,"$");case"html":return n.makeRe("^",n.single.html,"(?:",n.single.html,")*","$");case"linkDefinition":return n.makeRe("^",n.single.linkDefinition,"$");case"listLayout":return n.makeRe("^",n.single.list,a("allAttributes"),"*\\s+");case"tableCellAttributes":return n.makeRe("^",n.choiceRe(n.single.tableCellAttributes,a("allAttributes")),"+\\.");case"type":return n.makeRe("^",a("allTypes"));case"typeLayout":return n.makeRe("^",a("allTypes"),a("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return n.makeRe("^",a("allAttributes"),"+");case"allTypes":return n.choiceRe(n.single.div,n.single.foot,n.single.header,n.single.bc,n.single.bq,n.single.notextile,n.single.pre,n.single.table,n.single.para);case"allAttributes":return n.choiceRe(n.attributes.selector,n.attributes.css,n.attributes.lang,n.attributes.align,n.attributes.pad);default:return n.makeRe("^",n.single[t])}},makeRe:function(){for(var t="",e=0;e<arguments.length;++e){var i=arguments[e];t+=typeof i=="string"?i:i.source}return new RegExp(t)},choiceRe:function(){for(var t=[arguments[0]],e=1;e<arguments.length;++e)t[e*2-1]="|",t[e*2]=arguments[e];return t.unshift("(?:"),t.push(")"),n.makeRe.apply(null,t)}};function a(t){return n.cache[t]||(n.cache[t]=n.createRe(t))}var r={newLayout:function(t,e){if(t.match(a("typeLayout"),!1))return e.spanningLayout=!1,(e.mode=r.blockType)(t,e);var i;return f(e)||(t.match(a("listLayout"),!1)?i=r.list:t.match(a("drawTable"),!1)?i=r.table:t.match(a("linkDefinition"),!1)?i=r.linkDefinition:t.match(a("definitionList"))?i=r.definitionList:t.match(a("html"),!1)&&(i=r.html)),(e.mode=i||r.text)(t,e)},blockType:function(t,e){var i,l;if(e.layoutType=null,i=t.match(a("type")))l=i[0];else return(e.mode=r.text)(t,e);return(i=l.match(a("header")))?(e.layoutType="header",e.header=parseInt(i[0][1])):l.match(a("bq"))?e.layoutType="quote":l.match(a("bc"))?e.layoutType="code":l.match(a("foot"))?e.layoutType="footnote":l.match(a("notextile"))?e.layoutType="notextile":l.match(a("pre"))?e.layoutType="pre":l.match(a("div"))?e.layoutType="div":l.match(a("table"))&&(e.layoutType="table"),e.mode=r.attributes,o(e)},text:function(t,e){if(t.match(a("text")))return o(e);var i=t.next();return i==='"'?(e.mode=r.link)(t,e):d(t,e,i)},attributes:function(t,e){return e.mode=r.layoutLength,t.match(a("attributes"))?u.attributes:o(e)},layoutLength:function(t,e){return t.eat(".")&&t.eat(".")&&(e.spanningLayout=!0),e.mode=r.text,o(e)},list:function(t,e){e.listDepth=t.match(a("list"))[0].length;var i=(e.listDepth-1)%3;return i?i===1?e.layoutType="list2":e.layoutType="list3":e.layoutType="list1",e.mode=r.attributes,o(e)},link:function(t,e){return e.mode=r.text,t.match(a("link"))?(t.match(/\S+/),u.link):o(e)},linkDefinition:function(t){return t.skipToEnd(),u.linkDefinition},definitionList:function(t,e){return t.match(a("definitionList")),e.layoutType="definitionList",t.match(/\s*$/)?e.spanningLayout=!0:e.mode=r.attributes,o(e)},html:function(t){return t.skipToEnd(),u.html},table:function(t,e){return e.layoutType="table",(e.mode=r.tableCell)(t,e)},tableCell:function(t,e){return t.match(a("tableHeading"))?e.tableHeading=!0:t.eat("|"),e.mode=r.tableCellAttributes,o(e)},tableCellAttributes:function(t,e){return e.mode=r.tableText,t.match(a("tableCellAttributes"))?u.attributes:o(e)},tableText:function(t,e){return t.match(a("tableText"))?o(e):t.peek()==="|"?(e.mode=r.tableCell,o(e)):d(t,e,t.next())}};const k={name:"textile",startState:function(){return{mode:r.newLayout}},token:function(t,e){return t.sol()&&b(t,e),e.mode(t,e)},blankLine:g};export{k as t};
import{t}from"./textile-DXBc8HMq.js";export{t as textile};
var u={},c={allTags:!0,closeAll:!0,list:!0,newJournal:!0,newTiddler:!0,permaview:!0,saveChanges:!0,search:!0,slider:!0,tabs:!0,tag:!0,tagging:!0,tags:!0,tiddler:!0,timeline:!0,today:!0,version:!0,option:!0,with:!0,filter:!0},l=/[\w_\-]/i,f=/^\-\-\-\-+$/,m=/^\/\*\*\*$/,k=/^\*\*\*\/$/,h=/^<<<$/,s=/^\/\/\{\{\{$/,d=/^\/\/\}\}\}$/,p=/^<!--\{\{\{-->$/,b=/^<!--\}\}\}-->$/,$=/^\{\{\{$/,v=/^\}\}\}$/,x=/.*?\}\}\}/;function a(e,t,n){return t.tokenize=n,n(e,t)}function i(e,t){var n=e.sol(),r=e.peek();if(t.block=!1,n&&/[<\/\*{}\-]/.test(r)){if(e.match($))return t.block=!0,a(e,t,o);if(e.match(h))return"quote";if(e.match(m)||e.match(k)||e.match(s)||e.match(d)||e.match(p)||e.match(b))return"comment";if(e.match(f))return"contentSeparator"}if(e.next(),n&&/[\/\*!#;:>|]/.test(r)){if(r=="!")return e.skipToEnd(),"header";if(r=="*")return e.eatWhile("*"),"comment";if(r=="#")return e.eatWhile("#"),"comment";if(r==";")return e.eatWhile(";"),"comment";if(r==":")return e.eatWhile(":"),"comment";if(r==">")return e.eatWhile(">"),"quote";if(r=="|")return"header"}if(r=="{"&&e.match("{{"))return a(e,t,o);if(/[hf]/i.test(r)&&/[ti]/i.test(e.peek())&&e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if(r=='"')return"string";if(r=="~"||/[\[\]]/.test(r)&&e.match(r))return"brace";if(r=="@")return e.eatWhile(l),"link";if(/\d/.test(r))return e.eatWhile(/\d/),"number";if(r=="/"){if(e.eat("%"))return a(e,t,z);if(e.eat("/"))return a(e,t,w)}if(r=="_"&&e.eat("_"))return a(e,t,W);if(r=="-"&&e.eat("-")){if(e.peek()!=" ")return a(e,t,_);if(e.peek()==" ")return"brace"}return r=="'"&&e.eat("'")?a(e,t,g):r=="<"&&e.eat("<")?a(e,t,y):(e.eatWhile(/[\w\$_]/),u.propertyIsEnumerable(e.current())?"keyword":null)}function z(e,t){for(var n=!1,r;r=e.next();){if(r=="/"&&n){t.tokenize=i;break}n=r=="%"}return"comment"}function g(e,t){for(var n=!1,r;r=e.next();){if(r=="'"&&n){t.tokenize=i;break}n=r=="'"}return"strong"}function o(e,t){var n=t.block;return n&&e.current()?"comment":!n&&e.match(x)||n&&e.sol()&&e.match(v)?(t.tokenize=i,"comment"):(e.next(),"comment")}function w(e,t){for(var n=!1,r;r=e.next();){if(r=="/"&&n){t.tokenize=i;break}n=r=="/"}return"emphasis"}function W(e,t){for(var n=!1,r;r=e.next();){if(r=="_"&&n){t.tokenize=i;break}n=r=="_"}return"link"}function _(e,t){for(var n=!1,r;r=e.next();){if(r=="-"&&n){t.tokenize=i;break}n=r=="-"}return"deleted"}function y(e,t){if(e.current()=="<<")return"meta";var n=e.next();return n?n==">"&&e.peek()==">"?(e.next(),t.tokenize=i,"meta"):(e.eatWhile(/[\w\$_]/),c.propertyIsEnumerable(e.current())?"keyword":null):(t.tokenize=i,null)}const S={name:"tiddlywiki",startState:function(){return{tokenize:i}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}};export{S as tiddlyWiki};
function a(n,e,t){return function(r,f){for(;!r.eol();){if(r.match(e)){f.tokenize=u;break}r.next()}return t&&(f.tokenize=t),n}}function p(n){return function(e,t){for(;!e.eol();)e.next();return t.tokenize=u,n}}function u(n,e){function t(m){return e.tokenize=m,m(n,e)}var r=n.sol(),f=n.next();switch(f){case"{":return n.eat("/"),n.eatSpace(),n.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),e.tokenize=d,"tag";case"_":if(n.eat("_"))return t(a("strong","__",u));break;case"'":if(n.eat("'"))return t(a("em","''",u));break;case"(":if(n.eat("("))return t(a("link","))",u));break;case"[":return t(a("url","]",u));case"|":if(n.eat("|"))return t(a("comment","||"));break;case"-":if(n.eat("="))return t(a("header string","=-",u));if(n.eat("-"))return t(a("error tw-deleted","--",u));break;case"=":if(n.match("=="))return t(a("tw-underline","===",u));break;case":":if(n.eat(":"))return t(a("comment","::"));break;case"^":return t(a("tw-box","^"));case"~":if(n.match("np~"))return t(a("meta","~/np~"));break}if(r)switch(f){case"!":return n.match("!!!!!")||n.match("!!!!")||n.match("!!!")||n.match("!!"),t(p("header string"));case"*":case"#":case"+":return t(p("tw-listitem bracket"))}return null}var k,l;function d(n,e){var t=n.next(),r=n.peek();return t=="}"?(e.tokenize=u,"tag"):t=="("||t==")"?"bracket":t=="="?(l="equals",r==">"&&(n.next(),r=n.peek()),/[\'\"]/.test(r)||(e.tokenize=z()),"operator"):/[\'\"]/.test(t)?(e.tokenize=v(t),e.tokenize(n,e)):(n.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function v(n){return function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}}function z(){return function(n,e){for(;!n.eol();){var t=n.next(),r=n.peek();if(t==" "||t==","||/[ )}]/.test(r)){e.tokenize=d;break}}return"string"}}var i,c;function s(){for(var n=arguments.length-1;n>=0;n--)i.cc.push(arguments[n])}function o(){return s.apply(null,arguments),!0}function x(n,e){var t=i.context&&i.context.noIndent;i.context={prev:i.context,pluginName:n,indent:i.indented,startOfLine:e,noIndent:t}}function b(){i.context&&(i.context=i.context.prev)}function w(n){if(n=="openPlugin")return i.pluginName=k,o(g,L(i.startOfLine));if(n=="closePlugin"){var e=!1;return i.context?(e=i.context.pluginName!=k,b()):e=!0,e&&(c="error"),o(O(e))}else return n=="string"&&((!i.context||i.context.name!="!cdata")&&x("!cdata"),i.tokenize==u&&b()),o()}function L(n){return function(e){return e=="selfclosePlugin"||e=="endPlugin"||e=="endPlugin"&&x(i.pluginName,n),o()}}function O(n){return function(e){return n&&(c="error"),e=="endPlugin"?o():s()}}function g(n){return n=="keyword"?(c="attribute",o(g)):n=="equals"?o(P,g):s()}function P(n){return n=="keyword"?(c="string",o()):n=="string"?o(h):s()}function h(n){return n=="string"?o(h):s()}const y={name:"tiki",startState:function(){return{tokenize:u,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(n,e){if(n.sol()&&(e.startOfLine=!0,e.indented=n.indentation()),n.eatSpace())return null;c=l=k=null;var t=e.tokenize(n,e);if((t||l)&&t!="comment")for(i=e;!(e.cc.pop()||w)(l||t););return e.startOfLine=!1,c||t},indent:function(n,e,t){var r=n.context;if(r&&r.noIndent)return 0;for(r&&/^{\//.test(e)&&(r=r.prev);r&&!r.startOfLine;)r=r.prev;return r?r.indent+t.unit:0}};export{y as tiki};
import{a as _,s as q}from"./precisionRound-CU2C3Vxx.js";import{a as z,i as G}from"./linear-BWciPXnd.js";import{A as D,C as d,D as w,E as A,M as k,N as H,O as x,S as J,T as y,_ as K,c as C,j as Q,k as I,l as U,o as j,p as E,s as V,t as W,v as F,w as X,x as L,y as Z}from"./defaultLocale-BLne0bXb.js";import{n as $}from"./init-DRQmrFIb.js";function nn(r,u){let o;if(u===void 0)for(let t of r)t!=null&&(o<t||o===void 0&&t>=t)&&(o=t);else{let t=-1;for(let a of r)(a=u(a,++t,r))!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}return o}function rn(r,u){let o;if(u===void 0)for(let t of r)t!=null&&(o>t||o===void 0&&t>=t)&&(o=t);else{let t=-1;for(let a of r)(a=u(a,++t,r))!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}return o}function N(r,u,o,t,a,f){let e=[[y,1,D],[y,5,5*D],[y,15,15*D],[y,30,30*D],[f,1,x],[f,5,5*x],[f,15,15*x],[f,30,30*x],[a,1,w],[a,3,3*w],[a,6,6*w],[a,12,12*w],[t,1,A],[t,2,2*A],[o,1,Q],[u,1,I],[u,3,3*I],[r,1,k]];function h(s,i,m){let l=i<s;l&&([s,i]=[i,s]);let c=m&&typeof m.range=="function"?m:p(s,i,m),g=c?c.range(s,+i+1):[];return l?g.reverse():g}function p(s,i,m){let l=Math.abs(i-s)/m,c=q(([,,b])=>b).right(e,l);if(c===e.length)return r.every(_(s/k,i/k,m));if(c===0)return H.every(Math.max(_(s,i,m),1));let[g,M]=e[l/e[c-1][2]<e[c][2]/l?c-1:c];return g.every(M)}return[h,p]}var[tn,an]=N(V,U,K,Z,J,X),[on,sn]=N(j,C,E,F,L,d);function O(r,u){r=r.slice();var o=0,t=r.length-1,a=r[o],f=r[t],e;return f<a&&(e=o,o=t,t=e,e=a,a=f,f=e),r[o]=u.floor(a),r[t]=u.ceil(f),r}function un(r){return new Date(r)}function en(r){return r instanceof Date?+r:+new Date(+r)}function S(r,u,o,t,a,f,e,h,p,s){var i=G(),m=i.invert,l=i.domain,c=s(".%L"),g=s(":%S"),M=s("%I:%M"),b=s("%I %p"),T=s("%a %d"),B=s("%b %d"),P=s("%B"),R=s("%Y");function Y(n){return(p(n)<n?c:h(n)<n?g:e(n)<n?M:f(n)<n?b:t(n)<n?a(n)<n?T:B:o(n)<n?P:R)(n)}return i.invert=function(n){return new Date(m(n))},i.domain=function(n){return arguments.length?l(Array.from(n,en)):l().map(un)},i.ticks=function(n){var v=l();return r(v[0],v[v.length-1],n??10)},i.tickFormat=function(n,v){return v==null?Y:s(v)},i.nice=function(n){var v=l();return(!n||typeof n.range!="function")&&(n=u(v[0],v[v.length-1],n??10)),n?l(O(v,n)):i},i.copy=function(){return z(i,S(r,u,o,t,a,f,e,h,p,s))},i}function fn(){return $.apply(S(on,sn,j,C,E,F,L,d,y,W).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{tn as a,an as i,fn as n,rn as o,O as r,nn as s,S as t};
import"./purify.es-DZrAQFIu.js";import{u as X}from"./src-CvyFXpBy.js";import{t as it}from"./arc-D1owqr0z.js";import{n as s,r as S,t as xt}from"./src-CsZby044.js";import{G as bt,Q as kt,X as _t,Z as vt,a as wt,b as St,o as $t}from"./chunk-ABZYJK2D-0jga8uiE.js";var Y=(function(){var i=s(function(r,h,o,d){for(o||(o={}),d=r.length;d--;o[r[d]]=h);return o},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],n=[1,11],l=[1,12],u=[1,13],g=[1,16],p=[1,17],m={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(r,h,o,d,y,c,v){var f=c.length-1;switch(y){case 1:return c[f-1];case 2:this.$=[];break;case 3:c[f-1].push(c[f]),this.$=c[f-1];break;case 4:case 5:this.$=c[f];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(c[f].substr(6)),this.$=c[f].substr(6);break;case 9:this.$=c[f].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=c[f].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(c[f].substr(8)),this.$=c[f].substr(8);break;case 15:d.addTask(c[f],0,""),this.$=c[f];break;case 16:d.addEvent(c[f].substr(2)),this.$=c[f];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:n,16:l,17:u,18:14,19:15,20:g,21:p},i(t,[2,7],{1:[2,1]}),i(t,[2,3]),{9:18,11:e,12:a,14:n,16:l,17:u,18:14,19:15,20:g,21:p},i(t,[2,5]),i(t,[2,6]),i(t,[2,8]),{13:[1,19]},{15:[1,20]},i(t,[2,11]),i(t,[2,12]),i(t,[2,13]),i(t,[2,14]),i(t,[2,15]),i(t,[2,16]),i(t,[2,4]),i(t,[2,9]),i(t,[2,10])],defaultActions:{},parseError:s(function(r,h){if(h.recoverable)this.trace(r);else{var o=Error(r);throw o.hash=h,o}},"parseError"),parse:s(function(r){var h=this,o=[0],d=[],y=[null],c=[],v=this.table,f="",M=0,N=0,A=0,B=2,F=1,W=c.slice.call(arguments,1),b=Object.create(this.lexer),w={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(w.yy[k]=this.yy[k]);b.setInput(r,w.yy),w.yy.lexer=b,w.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var I=b.yylloc;c.push(I);var C=b.options&&b.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function L(E){o.length-=2*E,y.length-=E,c.length-=E}s(L,"popStack");function O(){var E=d.pop()||b.lex()||F;return typeof E!="number"&&(E instanceof Array&&(d=E,E=d.pop()),E=h.symbols_[E]||E),E}s(O,"lex");for(var _,q,P,$,U,R={},D,T,tt,V;;){if(P=o[o.length-1],this.defaultActions[P]?$=this.defaultActions[P]:(_??(_=O()),$=v[P]&&v[P][_]),$===void 0||!$.length||!$[0]){var et="";for(D in V=[],v[P])this.terminals_[D]&&D>B&&V.push("'"+this.terminals_[D]+"'");et=b.showPosition?"Parse error on line "+(M+1)+`:
`+b.showPosition()+`
Expecting `+V.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(M+1)+": Unexpected "+(_==F?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(et,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:I,expected:V})}if($[0]instanceof Array&&$.length>1)throw Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch($[0]){case 1:o.push(_),y.push(b.yytext),c.push(b.yylloc),o.push($[1]),_=null,q?(_=q,q=null):(N=b.yyleng,f=b.yytext,M=b.yylineno,I=b.yylloc,A>0&&A--);break;case 2:if(T=this.productions_[$[1]][1],R.$=y[y.length-T],R._$={first_line:c[c.length-(T||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(T||1)].first_column,last_column:c[c.length-1].last_column},C&&(R._$.range=[c[c.length-(T||1)].range[0],c[c.length-1].range[1]]),U=this.performAction.apply(R,[f,N,M,w.yy,$[1],y,c].concat(W)),U!==void 0)return U;T&&(o=o.slice(0,-1*T*2),y=y.slice(0,-1*T),c=c.slice(0,-1*T)),o.push(this.productions_[$[1]][0]),y.push(R.$),c.push(R._$),tt=v[o[o.length-2]][o[o.length-1]],o.push(tt);break;case 3:return!0}}return!0},"parse")};m.lexer=(function(){return{EOF:1,parseError:s(function(r,h){if(this.yy.parser)this.yy.parser.parseError(r,h);else throw Error(r)},"parseError"),setInput:s(function(r,h){return this.yy=h||this.yy||{},this._input=r,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:s(function(){var r=this._input[0];return this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r,r.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var h=r.length,o=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var d=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),o.length-1&&(this.yylineno-=o.length-1);var y=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:o?(o.length===d.length?this.yylloc.first_column:0)+d[d.length-o.length].length-o[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),h=Array(r.length+1).join("-");return r+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:s(function(r,h){var o,d,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),d=r[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],o=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var c in y)this[c]=y[c];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,h,o,d;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),c=0;c<y.length;c++)if(o=this._input.match(this.rules[y[c]]),o&&(!h||o[0].length>h[0].length)){if(h=o,d=c,this.options.backtrack_lexer){if(r=this.test_match(o,y[c]),r!==!1)return r;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(r=this.test_match(h,y[d]),r===!1?!1:r):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:s(function(){return this.next()||this.lex()},"lex"),begin:s(function(r){this.conditionStack.push(r)},"begin"),popState:s(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},"topState"),pushState:s(function(r){this.begin(r)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(r,h,o,d){switch(o){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}})();function x(){this.yy={}}return s(x,"Parser"),x.prototype=m,m.Parser=x,new x})();Y.parser=Y;var Et=Y,nt={};xt(nt,{addEvent:()=>dt,addSection:()=>lt,addTask:()=>ht,addTaskOrg:()=>ut,clear:()=>at,default:()=>It,getCommonDb:()=>st,getSections:()=>ot,getTasks:()=>ct});var j="",rt=0,Q=[],G=[],z=[],st=s(()=>$t,"getCommonDb"),at=s(function(){Q.length=0,G.length=0,j="",z.length=0,wt()},"clear"),lt=s(function(i){j=i,Q.push(i)},"addSection"),ot=s(function(){return Q},"getSections"),ct=s(function(){let i=pt(),t=0;for(;!i&&t<100;)i=pt(),t++;return G.push(...z),G},"getTasks"),ht=s(function(i,t,e){let a={id:rt++,section:j,type:j,task:i,score:t||0,events:e?[e]:[]};z.push(a)},"addTask"),dt=s(function(i){z.find(t=>t.id===rt-1).events.push(i)},"addEvent"),ut=s(function(i){let t={section:j,type:j,description:i,task:i,classes:[]};G.push(t)},"addTaskOrg"),pt=s(function(){let i=s(function(e){return z[e].processed},"compileTask"),t=!0;for(let[e,a]of z.entries())i(e),t&&(t=a.processed);return t},"compileTasks"),It={clear:at,getCommonDb:st,addSection:lt,getSections:ot,getTasks:ct,addTask:ht,addTaskOrg:ut,addEvent:dt},Tt=12,Z=s(function(i,t){let e=i.append("rect");return 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),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),Mt=s(function(i,t){let e=i.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),a=i.append("g");a.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(g){let p=it().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(n,"smile");function l(g){let p=it().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(l,"sad");function u(g){g.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(u,"ambivalent"),t.score>3?n(a):t.score<3?l(a):u(a),e},"drawFace"),Nt=s(function(i,t){let e=i.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),yt=s(function(i,t){let e=t.text.replace(/<br\s*\/?>/gi," "),a=i.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class!==void 0&&a.attr("class",t.class);let n=a.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(e),a},"drawText"),At=s(function(i,t){function e(n,l,u,g,p){return n+","+l+" "+(n+u)+","+l+" "+(n+u)+","+(l+g-p)+" "+(n+u-p*1.2)+","+(l+g)+" "+n+","+(l+g)}s(e,"genPoints");let a=i.append("polygon");a.attr("points",e(t.x,t.y,50,20,7)),a.attr("class","labelBox"),t.y+=t.labelMargin,t.x+=.5*t.labelMargin,yt(i,t)},"drawLabel"),Ct=s(function(i,t,e){let a=i.append("g"),n=J();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=e.width,n.height=e.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,Z(a,n),ft(e)(t.text,a,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),gt=-1,Lt=s(function(i,t,e){let a=t.x+e.width/2,n=i.append("g");gt++,n.append("line").attr("id","task"+gt).attr("x1",a).attr("y1",t.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Mt(n,{cx:a,cy:300+(5-t.score)*30,score:t.score});let l=J();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=e.width,l.height=e.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,Z(n,l),ft(e)(t.task,n,l.x,l.y,l.width,l.height,{class:"task"},e,t.colour)},"drawTask"),Pt=s(function(i,t){Z(i,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Ht=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),J=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ft=(function(){function i(n,l,u,g,p,m,x,r){a(l.append("text").attr("x",u+p/2).attr("y",g+m/2+5).style("font-color",r).style("text-anchor","middle").text(n),x)}s(i,"byText");function t(n,l,u,g,p,m,x,r,h){let{taskFontSize:o,taskFontFamily:d}=r,y=n.split(/<br\s*\/?>/gi);for(let c=0;c<y.length;c++){let v=c*o-o*(y.length-1)/2,f=l.append("text").attr("x",u+p/2).attr("y",g).attr("fill",h).style("text-anchor","middle").style("font-size",o).style("font-family",d);f.append("tspan").attr("x",u+p/2).attr("dy",v).text(y[c]),f.attr("y",g+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(f,x)}}s(t,"byTspan");function e(n,l,u,g,p,m,x,r){let h=l.append("switch"),o=h.append("foreignObject").attr("x",u).attr("y",g).attr("width",p).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");o.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,h,u,g,p,m,x,r),a(o,x)}s(e,"byFo");function a(n,l){for(let u in l)u in l&&n.attr(u,l[u])}return s(a,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?e:n.textPlacement==="old"?i:t}})(),Ot=s(function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function K(i,t){i.each(function(){var e=X(this),a=e.text().split(/(\s+|<br>)/).reverse(),n,l=[],u=1.1,g=e.attr("y"),p=parseFloat(e.attr("dy")),m=e.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",p+"em");for(let x=0;x<a.length;x++)n=a[a.length-1-x],l.push(n),m.text(l.join(" ").trim()),(m.node().getComputedTextLength()>t||n==="<br>")&&(l.pop(),m.text(l.join(" ").trim()),l=n==="<br>"?[""]:[n],m=e.append("tspan").attr("x",0).attr("y",g).attr("dy",u+"em").text(n))})}s(K,"wrap");var Rt=s(function(i,t,e,a){var x;let n=e%Tt-1,l=i.append("g");t.section=n,l.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+n));let u=l.append("g"),g=l.append("g"),p=g.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(K,t.width).node().getBBox(),m=(x=a.fontSize)!=null&&x.replace?a.fontSize.replace("px",""):a.fontSize;return t.height=p.height+m*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width+=2*t.padding,g.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),zt(u,t,n,a),t},"drawNode"),jt=s(function(i,t,e){var u;let a=i.append("g"),n=a.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(K,t.width).node().getBBox(),l=(u=e.fontSize)!=null&&u.replace?e.fontSize.replace("px",""):e.fontSize;return a.remove(),n.height+l*1.1*.5+t.padding},"getVirtualNodeHeight"),zt=s(function(i,t,e){i.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+10} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),i.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),H={drawRect:Z,drawCircle:Nt,drawSection:Ct,drawText:yt,drawLabel:At,drawTask:Lt,drawBackgroundRect:Pt,getTextObj:Ht,getNoteRect:J,initGraphics:Ot,drawNode:Rt,getVirtualNodeHeight:jt},Bt=s(function(i,t,e,a){var F,W,b;let n=St(),l=((F=n.timeline)==null?void 0:F.leftMargin)??50;S.debug("timeline",a.db);let u=n.securityLevel,g;u==="sandbox"&&(g=X("#i"+t));let p=X(u==="sandbox"?g.nodes()[0].contentDocument.body:"body").select("#"+t);p.append("g");let m=a.db.getTasks(),x=a.db.getCommonDb().getDiagramTitle();S.debug("task",m),H.initGraphics(p);let r=a.db.getSections();S.debug("sections",r);let h=0,o=0,d=0,y=0,c=50+l,v=50;y=50;let f=0,M=!0;r.forEach(function(w){let k={number:f,descr:w,section:f,width:150,padding:20,maxHeight:h},I=H.getVirtualNodeHeight(p,k,n);S.debug("sectionHeight before draw",I),h=Math.max(h,I+20)});let N=0,A=0;S.debug("tasks.length",m.length);for(let[w,k]of m.entries()){let I={number:w,descr:k,section:k.section,width:150,padding:20,maxHeight:o},C=H.getVirtualNodeHeight(p,I,n);S.debug("taskHeight before draw",C),o=Math.max(o,C+20),N=Math.max(N,k.events.length);let L=0;for(let O of k.events){let _={descr:O,section:k.section,number:k.section,width:150,padding:20,maxHeight:50};L+=H.getVirtualNodeHeight(p,_,n)}k.events.length>0&&(L+=(k.events.length-1)*10),A=Math.max(A,L)}S.debug("maxSectionHeight before draw",h),S.debug("maxTaskHeight before draw",o),r&&r.length>0?r.forEach(w=>{let k=m.filter(O=>O.section===w),I={number:f,descr:w,section:f,width:200*Math.max(k.length,1)-50,padding:20,maxHeight:h};S.debug("sectionNode",I);let C=p.append("g"),L=H.drawNode(C,I,f,n);S.debug("sectionNode output",L),C.attr("transform",`translate(${c}, ${y})`),v+=h+50,k.length>0&&mt(p,k,f,c,v,o,n,N,A,h,!1),c+=200*Math.max(k.length,1),v=y,f++}):(M=!1,mt(p,m,f,c,v,o,n,N,A,h,!0));let B=p.node().getBBox();S.debug("bounds",B),x&&p.append("text").text(x).attr("x",B.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),d=M?h+o+150:o+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",l).attr("y1",d).attr("x2",B.width+3*l).attr("y2",d).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),bt(void 0,p,((W=n.timeline)==null?void 0:W.padding)??50,((b=n.timeline)==null?void 0:b.useMaxWidth)??!1)},"draw"),mt=s(function(i,t,e,a,n,l,u,g,p,m,x){var r;for(let h of t){let o={descr:h.task,section:e,number:e,width:150,padding:20,maxHeight:l};S.debug("taskNode",o);let d=i.append("g").attr("class","taskWrapper"),y=H.drawNode(d,o,e,u).height;if(S.debug("taskHeight after draw",y),d.attr("transform",`translate(${a}, ${n})`),l=Math.max(l,y),h.events){let c=i.append("g").attr("class","lineWrapper"),v=l;n+=100,v+=Ft(i,h.events,e,a,n,u),n-=100,c.append("line").attr("x1",a+190/2).attr("y1",n+l).attr("x2",a+190/2).attr("y2",n+l+100+p+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}a+=200,x&&!((r=u.timeline)!=null&&r.disableMulticolor)&&e++}n-=10},"drawTasks"),Ft=s(function(i,t,e,a,n,l){let u=0,g=n;n+=100;for(let p of t){let m={descr:p,section:e,number:e,width:150,padding:20,maxHeight:50};S.debug("eventNode",m);let x=i.append("g").attr("class","eventWrapper"),r=H.drawNode(x,m,e,l).height;u+=r,x.attr("transform",`translate(${a}, ${n})`),n=n+10+r}return n=g,u},"drawEvents"),Wt={setConf:s(()=>{},"setConf"),draw:Bt},Dt=s(i=>{let t="";for(let e=0;e<i.THEME_COLOR_LIMIT;e++)i["lineColor"+e]=i["lineColor"+e]||i["cScaleInv"+e],kt(i["lineColor"+e])?i["lineColor"+e]=vt(i["lineColor"+e],20):i["lineColor"+e]=_t(i["lineColor"+e],20);for(let e=0;e<i.THEME_COLOR_LIMIT;e++){let a=""+(17-3*e);t+=`
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
fill: ${i["cScale"+e]};
}
.section-${e-1} text {
fill: ${i["cScaleLabel"+e]};
}
.node-icon-${e-1} {
font-size: 40px;
color: ${i["cScaleLabel"+e]};
}
.section-edge-${e-1}{
stroke: ${i["cScale"+e]};
}
.edge-depth-${e-1}{
stroke-width: ${a};
}
.section-${e-1} line {
stroke: ${i["cScaleInv"+e]} ;
stroke-width: 3;
}
.lineWrapper line{
stroke: ${i["cScaleLabel"+e]} ;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return t},"genSections"),Vt={db:nt,renderer:Wt,parser:Et,styles:s(i=>`
.edge {
stroke-width: 3;
}
${Dt(i)}
.section-root rect, .section-root path, .section-root circle {
fill: ${i.git0};
}
.section-root text {
fill: ${i.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.eventWrapper {
filter: brightness(120%);
}
`,"getStyles")};export{Vt as diagram};
import{r as Ar}from"./chunk-LvLJmgfZ.js";var Rr={value:()=>{}};function Xt(){for(var t=0,r=arguments.length,n={},i;t<r;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw Error("illegal type: "+i);n[i]=[]}return new F(n)}function F(t){this._=t}function Hr(t,r){return t.trim().split(/^|\s+/).map(function(n){var i="",a=n.indexOf(".");if(a>=0&&(i=n.slice(a+1),n=n.slice(0,a)),n&&!r.hasOwnProperty(n))throw Error("unknown type: "+n);return{type:n,name:i}})}F.prototype=Xt.prototype={constructor:F,on:function(t,r){var n=this._,i=Hr(t+"",n),a,e=-1,o=i.length;if(arguments.length<2){for(;++e<o;)if((a=(t=i[e]).type)&&(a=Xr(n[a],t.name)))return a;return}if(r!=null&&typeof r!="function")throw Error("invalid callback: "+r);for(;++e<o;)if(a=(t=i[e]).type)n[a]=Ot(n[a],t.name,r);else if(r==null)for(a in n)n[a]=Ot(n[a],t.name,null);return this},copy:function(){var t={},r=this._;for(var n in r)t[n]=r[n].slice();return new F(t)},call:function(t,r){if((a=arguments.length-2)>0)for(var n=Array(a),i=0,a,e;i<a;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(e=this._[t],i=0,a=e.length;i<a;++i)e[i].value.apply(r,n)},apply:function(t,r,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var i=this._[t],a=0,e=i.length;a<e;++a)i[a].value.apply(r,n)}};function Xr(t,r){for(var n=0,i=t.length,a;n<i;++n)if((a=t[n]).name===r)return a.value}function Ot(t,r,n){for(var i=0,a=t.length;i<a;++i)if(t[i].name===r){t[i]=Rr,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:r,value:n}),t}var Or=Xt;function A(t,r,n){t.prototype=r.prototype=n,n.constructor=t}function C(t,r){var n=Object.create(t.prototype);for(var i in r)n[i]=r[i];return n}function N(){}var $=.7,R=1/$,H="\\s*([+-]?\\d+)\\s*",P="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",v="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sr=/^#([0-9a-f]{3,8})$/,jr=RegExp(`^rgb\\(${H},${H},${H}\\)$`),Ir=RegExp(`^rgb\\(${v},${v},${v}\\)$`),Tr=RegExp(`^rgba\\(${H},${H},${H},${P}\\)$`),Dr=RegExp(`^rgba\\(${v},${v},${v},${P}\\)$`),Cr=RegExp(`^hsl\\(${P},${v},${v}\\)$`),Pr=RegExp(`^hsla\\(${P},${v},${v},${P}\\)$`),St={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};A(N,X,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jt,formatHex:jt,formatHex8:Yr,formatHsl:Br,formatRgb:It,toString:It});function jt(){return this.rgb().formatHex()}function Yr(){return this.rgb().formatHex8()}function Br(){return Yt(this).formatHsl()}function It(){return this.rgb().formatRgb()}function X(t){var r,n;return t=(t+"").trim().toLowerCase(),(r=Sr.exec(t))?(n=r[1].length,r=parseInt(r[1],16),n===6?Tt(r):n===3?new p(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):n===8?K(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):n===4?K(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=jr.exec(t))?new p(r[1],r[2],r[3],1):(r=Ir.exec(t))?new p(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=Tr.exec(t))?K(r[1],r[2],r[3],r[4]):(r=Dr.exec(t))?K(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=Cr.exec(t))?Pt(r[1],r[2]/100,r[3]/100,1):(r=Pr.exec(t))?Pt(r[1],r[2]/100,r[3]/100,r[4]):St.hasOwnProperty(t)?Tt(St[t]):t==="transparent"?new p(NaN,NaN,NaN,0):null}function Tt(t){return new p(t>>16&255,t>>8&255,t&255,1)}function K(t,r,n,i){return i<=0&&(t=r=n=NaN),new p(t,r,n,i)}function ft(t){return t instanceof N||(t=X(t)),t?(t=t.rgb(),new p(t.r,t.g,t.b,t.opacity)):new p}function Y(t,r,n,i){return arguments.length===1?ft(t):new p(t,r,n,i??1)}function p(t,r,n,i){this.r=+t,this.g=+r,this.b=+n,this.opacity=+i}A(p,Y,C(N,{brighter(t){return t=t==null?R:R**+t,new p(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?$:$**+t,new p(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new p(_(this.r),_(this.g),_(this.b),Q(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Dt,formatHex:Dt,formatHex8:Lr,formatRgb:Ct,toString:Ct}));function Dt(){return`#${q(this.r)}${q(this.g)}${q(this.b)}`}function Lr(){return`#${q(this.r)}${q(this.g)}${q(this.b)}${q((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ct(){let t=Q(this.opacity);return`${t===1?"rgb(":"rgba("}${_(this.r)}, ${_(this.g)}, ${_(this.b)}${t===1?")":`, ${t})`}`}function Q(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function q(t){return t=_(t),(t<16?"0":"")+t.toString(16)}function Pt(t,r,n,i){return i<=0?t=r=n=NaN:n<=0||n>=1?t=r=NaN:r<=0&&(t=NaN),new d(t,r,n,i)}function Yt(t){if(t instanceof d)return new d(t.h,t.s,t.l,t.opacity);if(t instanceof N||(t=X(t)),!t)return new d;if(t instanceof d)return t;t=t.rgb();var r=t.r/255,n=t.g/255,i=t.b/255,a=Math.min(r,n,i),e=Math.max(r,n,i),o=NaN,u=e-a,c=(e+a)/2;return u?(o=r===e?(n-i)/u+(n<i)*6:n===e?(i-r)/u+2:(r-n)/u+4,u/=c<.5?e+a:2-e-a,o*=60):u=c>0&&c<1?0:o,new d(o,u,c,t.opacity)}function W(t,r,n,i){return arguments.length===1?Yt(t):new d(t,r,n,i??1)}function d(t,r,n,i){this.h=+t,this.s=+r,this.l=+n,this.opacity=+i}A(d,W,C(N,{brighter(t){return t=t==null?R:R**+t,new d(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?$:$**+t,new d(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,r=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*r,a=2*n-i;return new p(pt(t>=240?t-240:t+120,a,i),pt(t,a,i),pt(t<120?t+240:t-120,a,i),this.opacity)},clamp(){return new d(Bt(this.h),G(this.s),G(this.l),Q(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=Q(this.opacity);return`${t===1?"hsl(":"hsla("}${Bt(this.h)}, ${G(this.s)*100}%, ${G(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Bt(t){return t=(t||0)%360,t<0?t+360:t}function G(t){return Math.max(0,Math.min(1,t||0))}function pt(t,r,n){return(t<60?r+(n-r)*t/60:t<180?n:t<240?r+(n-r)*(240-t)/60:r)*255}const Lt=Math.PI/180,Vt=180/Math.PI;var U=18,zt=.96422,Ft=1,Kt=.82521,Qt=4/29,O=6/29,Wt=3*O*O,Vr=O*O*O;function Gt(t){if(t instanceof x)return new x(t.l,t.a,t.b,t.opacity);if(t instanceof M)return Ut(t);t instanceof p||(t=ft(t));var r=bt(t.r),n=bt(t.g),i=bt(t.b),a=gt((.2225045*r+.7168786*n+.0606169*i)/Ft),e,o;return r===n&&n===i?e=o=a:(e=gt((.4360747*r+.3850649*n+.1430804*i)/zt),o=gt((.0139322*r+.0971045*n+.7141733*i)/Kt)),new x(116*a-16,500*(e-a),200*(a-o),t.opacity)}function Z(t,r,n,i){return arguments.length===1?Gt(t):new x(t,r,n,i??1)}function x(t,r,n,i){this.l=+t,this.a=+r,this.b=+n,this.opacity=+i}A(x,Z,C(N,{brighter(t){return new x(this.l+U*(t??1),this.a,this.b,this.opacity)},darker(t){return new x(this.l-U*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,r=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return r=zt*yt(r),t=Ft*yt(t),n=Kt*yt(n),new p(mt(3.1338561*r-1.6168667*t-.4906146*n),mt(-.9787684*r+1.9161415*t+.033454*n),mt(.0719453*r-.2289914*t+1.4052427*n),this.opacity)}}));function gt(t){return t>Vr?t**(1/3):t/Wt+Qt}function yt(t){return t>O?t*t*t:Wt*(t-Qt)}function mt(t){return 255*(t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055)}function bt(t){return(t/=255)<=.04045?t/12.92:((t+.055)/1.055)**2.4}function zr(t){if(t instanceof M)return new M(t.h,t.c,t.l,t.opacity);if(t instanceof x||(t=Gt(t)),t.a===0&&t.b===0)return new M(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var r=Math.atan2(t.b,t.a)*Vt;return new M(r<0?r+360:r,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function J(t,r,n,i){return arguments.length===1?zr(t):new M(t,r,n,i??1)}function M(t,r,n,i){this.h=+t,this.c=+r,this.l=+n,this.opacity=+i}function Ut(t){if(isNaN(t.h))return new x(t.l,0,0,t.opacity);var r=t.h*Lt;return new x(t.l,Math.cos(r)*t.c,Math.sin(r)*t.c,t.opacity)}A(M,J,C(N,{brighter(t){return new M(this.h,this.c,this.l+U*(t??1),this.opacity)},darker(t){return new M(this.h,this.c,this.l-U*(t??1),this.opacity)},rgb(){return Ut(this).rgb()}}));var Zt=-.14861,dt=1.78277,wt=-.29227,tt=-.90649,B=1.97294,Jt=B*tt,tr=B*dt,rr=dt*wt-tt*Zt;function Fr(t){if(t instanceof E)return new E(t.h,t.s,t.l,t.opacity);t instanceof p||(t=ft(t));var r=t.r/255,n=t.g/255,i=t.b/255,a=(rr*i+Jt*r-tr*n)/(rr+Jt-tr),e=i-a,o=(B*(n-a)-wt*e)/tt,u=Math.sqrt(o*o+e*e)/(B*a*(1-a)),c=u?Math.atan2(o,e)*Vt-120:NaN;return new E(c<0?c+360:c,u,a,t.opacity)}function vt(t,r,n,i){return arguments.length===1?Fr(t):new E(t,r,n,i??1)}function E(t,r,n,i){this.h=+t,this.s=+r,this.l=+n,this.opacity=+i}A(E,vt,C(N,{brighter(t){return t=t==null?R:R**+t,new E(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?$:$**+t,new E(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Lt,r=+this.l,n=isNaN(this.s)?0:this.s*r*(1-r),i=Math.cos(t),a=Math.sin(t);return new p(255*(r+n*(Zt*i+dt*a)),255*(r+n*(wt*i+tt*a)),255*(r+B*i*n),this.opacity)}}));function nr(t,r,n,i,a){var e=t*t,o=e*t;return((1-3*t+3*e-o)*r+(4-6*e+3*o)*n+(1+3*t+3*e-3*o)*i+o*a)/6}function ir(t){var r=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,r-1):Math.floor(n*r),a=t[i],e=t[i+1],o=i>0?t[i-1]:2*a-e,u=i<r-1?t[i+2]:2*e-a;return nr((n-i/r)*r,o,a,e,u)}}function ar(t){var r=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*r),a=t[(i+r-1)%r],e=t[i%r],o=t[(i+1)%r],u=t[(i+2)%r];return nr((n-i/r)*r,a,e,o,u)}}var rt=t=>()=>t;function or(t,r){return function(n){return t+n*r}}function Kr(t,r,n){return t**=+n,r=r**+n-t,n=1/n,function(i){return(t+i*r)**+n}}function nt(t,r){var n=r-t;return n?or(t,n>180||n<-180?n-360*Math.round(n/360):n):rt(isNaN(t)?r:t)}function Qr(t){return(t=+t)==1?g:function(r,n){return n-r?Kr(r,n,t):rt(isNaN(r)?n:r)}}function g(t,r){var n=r-t;return n?or(t,n):rt(isNaN(t)?r:t)}var it=(function t(r){var n=Qr(r);function i(a,e){var o=n((a=Y(a)).r,(e=Y(e)).r),u=n(a.g,e.g),c=n(a.b,e.b),l=g(a.opacity,e.opacity);return function(s){return a.r=o(s),a.g=u(s),a.b=c(s),a.opacity=l(s),a+""}}return i.gamma=t,i})(1);function er(t){return function(r){var n=r.length,i=Array(n),a=Array(n),e=Array(n),o,u;for(o=0;o<n;++o)u=Y(r[o]),i[o]=u.r||0,a[o]=u.g||0,e[o]=u.b||0;return i=t(i),a=t(a),e=t(e),u.opacity=1,function(c){return u.r=i(c),u.g=a(c),u.b=e(c),u+""}}}var Wr=er(ir),Gr=er(ar);function xt(t,r){r||(r=[]);var n=t?Math.min(r.length,t.length):0,i=r.slice(),a;return function(e){for(a=0;a<n;++a)i[a]=t[a]*(1-e)+r[a]*e;return i}}function ur(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Ur(t,r){return(ur(r)?xt:sr)(t,r)}function sr(t,r){var n=r?r.length:0,i=t?Math.min(n,t.length):0,a=Array(i),e=Array(n),o;for(o=0;o<i;++o)a[o]=L(t[o],r[o]);for(;o<n;++o)e[o]=r[o];return function(u){for(o=0;o<i;++o)e[o]=a[o](u);return e}}function lr(t,r){var n=new Date;return t=+t,r=+r,function(i){return n.setTime(t*(1-i)+r*i),n}}function w(t,r){return t=+t,r=+r,function(n){return t*(1-n)+r*n}}function cr(t,r){var n={},i={},a;for(a in(typeof t!="object"||!t)&&(t={}),(typeof r!="object"||!r)&&(r={}),r)a in t?n[a]=L(t[a],r[a]):i[a]=r[a];return function(e){for(a in n)i[a]=n[a](e);return i}}var Mt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Nt=new RegExp(Mt.source,"g");function Zr(t){return function(){return t}}function Jr(t){return function(r){return t(r)+""}}function kt(t,r){var n=Mt.lastIndex=Nt.lastIndex=0,i,a,e,o=-1,u=[],c=[];for(t+="",r+="";(i=Mt.exec(t))&&(a=Nt.exec(r));)(e=a.index)>n&&(e=r.slice(n,e),u[o]?u[o]+=e:u[++o]=e),(i=i[0])===(a=a[0])?u[o]?u[o]+=a:u[++o]=a:(u[++o]=null,c.push({i:o,x:w(i,a)})),n=Nt.lastIndex;return n<r.length&&(e=r.slice(n),u[o]?u[o]+=e:u[++o]=e),u.length<2?c[0]?Jr(c[0].x):Zr(r):(r=c.length,function(l){for(var s=0,h;s<r;++s)u[(h=c[s]).i]=h.x(l);return u.join("")})}function L(t,r){var n=typeof r,i;return r==null||n==="boolean"?rt(r):(n==="number"?w:n==="string"?(i=X(r))?(r=i,it):kt:r instanceof X?it:r instanceof Date?lr:ur(r)?xt:Array.isArray(r)?sr:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?cr:w)(t,r)}function tn(t){var r=t.length;return function(n){return t[Math.max(0,Math.min(r-1,Math.floor(n*r)))]}}function rn(t,r){var n=nt(+t,+r);return function(i){var a=n(i);return a-360*Math.floor(a/360)}}function hr(t,r){return t=+t,r=+r,function(n){return Math.round(t*(1-n)+r*n)}}var fr=180/Math.PI,pr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gr(t,r,n,i,a,e){var o,u,c;return(o=Math.sqrt(t*t+r*r))&&(t/=o,r/=o),(c=t*n+r*i)&&(n-=t*c,i-=r*c),(u=Math.sqrt(n*n+i*i))&&(n/=u,i/=u,c/=u),t*i<r*n&&(t=-t,r=-r,c=-c,o=-o),{translateX:a,translateY:e,rotate:Math.atan2(r,t)*fr,skewX:Math.atan(c)*fr,scaleX:o,scaleY:u}}var $t;function nn(t){let r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return r.isIdentity?pr:gr(r.a,r.b,r.c,r.d,r.e,r.f)}function an(t){return t==null||($t||($t=document.createElementNS("http://www.w3.org/2000/svg","g")),$t.setAttribute("transform",t),!(t=$t.transform.baseVal.consolidate()))?pr:(t=t.matrix,gr(t.a,t.b,t.c,t.d,t.e,t.f))}function yr(t,r,n,i){function a(l){return l.length?l.pop()+" ":""}function e(l,s,h,f,y,b){if(l!==h||s!==f){var m=y.push("translate(",null,r,null,n);b.push({i:m-4,x:w(l,h)},{i:m-2,x:w(s,f)})}else(h||f)&&y.push("translate("+h+r+f+n)}function o(l,s,h,f){l===s?s&&h.push(a(h)+"rotate("+s+i):(l-s>180?s+=360:s-l>180&&(l+=360),f.push({i:h.push(a(h)+"rotate(",null,i)-2,x:w(l,s)}))}function u(l,s,h,f){l===s?s&&h.push(a(h)+"skewX("+s+i):f.push({i:h.push(a(h)+"skewX(",null,i)-2,x:w(l,s)})}function c(l,s,h,f,y,b){if(l!==h||s!==f){var m=y.push(a(y)+"scale(",null,",",null,")");b.push({i:m-4,x:w(l,h)},{i:m-2,x:w(s,f)})}else(h!==1||f!==1)&&y.push(a(y)+"scale("+h+","+f+")")}return function(l,s){var h=[],f=[];return l=t(l),s=t(s),e(l.translateX,l.translateY,s.translateX,s.translateY,h,f),o(l.rotate,s.rotate,h,f),u(l.skewX,s.skewX,h,f),c(l.scaleX,l.scaleY,s.scaleX,s.scaleY,h,f),l=s=null,function(y){for(var b=-1,m=f.length,k;++b<m;)h[(k=f[b]).i]=k.x(y);return h.join("")}}}var mr=yr(nn,"px, ","px)","deg)"),br=yr(an,", ",")",")"),on=1e-12;function dr(t){return((t=Math.exp(t))+1/t)/2}function en(t){return((t=Math.exp(t))-1/t)/2}function un(t){return((t=Math.exp(2*t))-1)/(t+1)}var wr=(function t(r,n,i){function a(e,o){var u=e[0],c=e[1],l=e[2],s=o[0],h=o[1],f=o[2],y=s-u,b=h-c,m=y*y+b*b,k,I;if(m<on)I=Math.log(f/l)/r,k=function(D){return[u+D*y,c+D*b,l*Math.exp(r*D*I)]};else{var lt=Math.sqrt(m),ct=(f*f-l*l+i*m)/(2*l*n*lt),ht=(f*f-l*l-i*m)/(2*f*n*lt),T=Math.log(Math.sqrt(ct*ct+1)-ct);I=(Math.log(Math.sqrt(ht*ht+1)-ht)-T)/r,k=function(D){var At=D*I,Rt=dr(T),Ht=l/(n*lt)*(Rt*un(r*At+T)-en(T));return[u+Ht*y,c+Ht*b,l*Rt/dr(r*At+T)]}}return k.duration=I*1e3*r/Math.SQRT2,k}return a.rho=function(e){var o=Math.max(.001,+e),u=o*o;return t(o,u,u*u)},a})(Math.SQRT2,2,4);function vr(t){return function(r,n){var i=t((r=W(r)).h,(n=W(n)).h),a=g(r.s,n.s),e=g(r.l,n.l),o=g(r.opacity,n.opacity);return function(u){return r.h=i(u),r.s=a(u),r.l=e(u),r.opacity=o(u),r+""}}}var sn=vr(nt),ln=vr(g);function cn(t,r){var n=g((t=Z(t)).l,(r=Z(r)).l),i=g(t.a,r.a),a=g(t.b,r.b),e=g(t.opacity,r.opacity);return function(o){return t.l=n(o),t.a=i(o),t.b=a(o),t.opacity=e(o),t+""}}function xr(t){return function(r,n){var i=t((r=J(r)).h,(n=J(n)).h),a=g(r.c,n.c),e=g(r.l,n.l),o=g(r.opacity,n.opacity);return function(u){return r.h=i(u),r.c=a(u),r.l=e(u),r.opacity=o(u),r+""}}}var Mr=xr(nt),hn=xr(g);function Nr(t){return(function r(n){n=+n;function i(a,e){var o=t((a=vt(a)).h,(e=vt(e)).h),u=g(a.s,e.s),c=g(a.l,e.l),l=g(a.opacity,e.opacity);return function(s){return a.h=o(s),a.s=u(s),a.l=c(s**+n),a.opacity=l(s),a+""}}return i.gamma=r,i})(1)}var fn=Nr(nt),pn=Nr(g);function kr(t,r){r===void 0&&(r=t,t=L);for(var n=0,i=r.length-1,a=r[0],e=Array(i<0?0:i);n<i;)e[n]=t(a,a=r[++n]);return function(o){var u=Math.max(0,Math.min(i-1,Math.floor(o*=i)));return e[u](o-u)}}function gn(t,r){for(var n=Array(r),i=0;i<r;++i)n[i]=t(i/(r-1));return n}var yn=Ar({interpolate:()=>L,interpolateArray:()=>Ur,interpolateBasis:()=>ir,interpolateBasisClosed:()=>ar,interpolateCubehelix:()=>fn,interpolateCubehelixLong:()=>pn,interpolateDate:()=>lr,interpolateDiscrete:()=>tn,interpolateHcl:()=>Mr,interpolateHclLong:()=>hn,interpolateHsl:()=>sn,interpolateHslLong:()=>ln,interpolateHue:()=>rn,interpolateLab:()=>cn,interpolateNumber:()=>w,interpolateNumberArray:()=>xt,interpolateObject:()=>cr,interpolateRgb:()=>it,interpolateRgbBasis:()=>Wr,interpolateRgbBasisClosed:()=>Gr,interpolateRound:()=>hr,interpolateString:()=>kt,interpolateTransformCss:()=>mr,interpolateTransformSvg:()=>br,interpolateZoom:()=>wr,piecewise:()=>kr,quantize:()=>gn},1),S=0,at=0,_t=0,$r=1e3,ot,V,et=0,j=0,ut=0,z=typeof performance=="object"&&performance.now?performance:Date,_r=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qt(){return j||(j=(_r(mn),z.now()+ut))}function mn(){j=0}function st(){this._call=this._time=this._next=null}st.prototype=qr.prototype={constructor:st,restart:function(t,r,n){if(typeof t!="function")throw TypeError("callback is not a function");n=(n==null?qt():+n)+(r==null?0:+r),!this._next&&V!==this&&(V?V._next=this:ot=this,V=this),this._call=t,this._time=n,Et()},stop:function(){this._call&&(this._call=null,this._time=1/0,Et())}};function qr(t,r,n){var i=new st;return i.restart(t,r,n),i}function bn(){qt(),++S;for(var t=ot,r;t;)(r=j-t._time)>=0&&t._call.call(void 0,r),t=t._next;--S}function Er(){j=(et=z.now())+ut,S=at=0;try{bn()}finally{S=0,wn(),j=0}}function dn(){var t=z.now(),r=t-et;r>$r&&(ut-=r,et=t)}function wn(){for(var t,r=ot,n,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(n=r._next,r._next=null,r=t?t._next=n:ot=n);V=t,Et(i)}function Et(t){S||(at&&(at=clearTimeout(at)),t-j>24?(t<1/0&&(at=setTimeout(Er,t-z.now()-ut)),_t&&(_t=clearInterval(_t))):(_t||(_t=(et=z.now(),setInterval(dn,$r))),S=1,_r(Er)))}export{X as _,kr as a,Or as b,mr as c,L as d,kt as f,Z as g,J as h,yn as i,br as l,it as m,qt as n,Mr as o,w as p,qr as r,wr as s,st as t,hr as u,W as v,Y as y};
import{t as r}from"./createLucideIcon-BCdY6lG5.js";var s=r("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const e=6048e5,i=864e5,u=6e4,f=36e5,p=1e3,y=43200,l=1440,n=3600*24;n*7,n*365.2425;const o=Symbol.for("constructDateFrom");function c(t,a){return typeof t=="function"?t(a):t&&typeof t=="object"&&o in t?t[o](a):t instanceof Date?new t.constructor(a):new Date(a)}function m(t,a){return c(a||t,t)}export{u as a,l as c,f as i,y as l,c as n,p as o,i as r,e as s,m as t,s as u};
import{s as l}from"./chunk-LvLJmgfZ.js";import{t as v}from"./react-Bj1aDYRI.js";import{t as h}from"./compiler-runtime-B3qBwwSJ.js";import{t as x}from"./jsx-runtime-ZmTK25f3.js";import{n as y,t as f}from"./cn-BKtXLv3a.js";import{S as N,_ as w,w as z}from"./Combination-BAEdC-rz.js";var u=l(v(),1),m=l(x(),1),p="Toggle",g=u.forwardRef((a,n)=>{let{pressed:e,defaultPressed:r,onPressedChange:s,...o}=a,[t,i]=N({prop:e,onChange:s,defaultProp:r??!1,caller:p});return(0,m.jsx)(w.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...o,ref:n,onClick:z(a.onClick,()=>{a.disabled||i(!t)})})});g.displayName=p;var b=g,C=h(),j=y(f("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","data-[state=on]:bg-muted data-[state=on]:text-muted-foreground"),{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted hover:text-muted-foreground"},size:{default:"h-9 px-3",xs:"h-4 w-4",sm:"h-6 px-2",lg:"h-10 px-5"}},defaultVariants:{variant:"default",size:"default"}}),c=u.forwardRef((a,n)=>{let e=(0,C.c)(13),r,s,o,t;e[0]===a?(r=e[1],s=e[2],o=e[3],t=e[4]):({className:r,variant:t,size:o,...s}=a,e[0]=a,e[1]=r,e[2]=s,e[3]=o,e[4]=t);let i;e[5]!==r||e[6]!==o||e[7]!==t?(i=f(j({variant:t,size:o,className:r})),e[5]=r,e[6]=o,e[7]=t,e[8]=i):i=e[8];let d;return e[9]!==s||e[10]!==n||e[11]!==i?(d=(0,m.jsx)(b,{ref:n,className:i,...s}),e[9]=s,e[10]=n,e[11]=i,e[12]=d):d=e[12],d});c.displayName=b.displayName;export{c as t};
import{t as o}from"./toml-ClSouHPE.js";export{o as toml};
const i={name:"toml",startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(n,e){let r;if(!e.inString&&(r=n.match(/^('''|"""|'|")/))&&(e.stringType=r[0],e.inString=!0),n.sol()&&!e.inString&&e.inArray===0&&(e.lhs=!0),e.inString){for(;e.inString;)if(n.match(e.stringType))e.inString=!1;else if(n.peek()==="\\")n.next(),n.next();else{if(n.eol())break;n.match(/^.[^\\\"\']*/)}return e.lhs?"property":"string"}else{if(e.inArray&&n.peek()==="]")return n.next(),e.inArray--,"bracket";if(e.lhs&&n.peek()==="["&&n.skipTo("]"))return n.next(),n.peek()==="]"&&n.next(),"atom";if(n.peek()==="#")return n.skipToEnd(),"comment";if(n.eatSpace())return null;if(e.lhs&&n.eatWhile(function(t){return t!="="&&t!=" "}))return"property";if(e.lhs&&n.peek()==="=")return n.next(),e.lhs=!1,null;if(!e.lhs&&n.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!e.lhs&&(n.match("true")||n.match("false")))return"atom";if(!e.lhs&&n.peek()==="[")return e.inArray++,n.next(),"bracket";if(!e.lhs&&n.match(/^\-?\d+(?:\.\d+)?/))return"number";n.eatSpace()||n.next()}return null},languageData:{commentTokens:{line:"#"}}};export{i as t};
import{s as F}from"./chunk-LvLJmgfZ.js";import{t as ee}from"./react-Bj1aDYRI.js";import{t as te}from"./compiler-runtime-B3qBwwSJ.js";import{r as S}from"./useEventListener-Cb-RVVEn.js";import{t as re}from"./jsx-runtime-ZmTK25f3.js";import{t as ne}from"./cn-BKtXLv3a.js";import{E as oe,S as ie,_ as ae,b as le,c as se,d as ce,f as ue,m as de,s as pe,u as fe,w,x as K}from"./Combination-BAEdC-rz.js";import{a as he,c as X,i as xe,o as me,s as ge,t as ve}from"./dist-DwV58Fb1.js";var s=F(ee(),1),p=F(re(),1),[_,Ve]=oe("Tooltip",[X]),R=X(),Y="TooltipProvider",ye=700,L="tooltip.open",[be,O]=_(Y),M=r=>{let{__scopeTooltip:e,delayDuration:t=ye,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=r,l=s.useRef(!0),u=s.useRef(!1),a=s.useRef(0);return s.useEffect(()=>{let f=a.current;return()=>window.clearTimeout(f)},[]),(0,p.jsx)(be,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:s.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:i})};M.displayName=Y;var E="Tooltip",[we,j]=_(E),z=r=>{let{__scopeTooltip:e,children:t,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:l,delayDuration:u}=r,a=O(E,r.__scopeTooltip),f=R(e),[c,x]=s.useState(null),h=ue(),d=s.useRef(0),m=l??a.disableHoverableContent,v=u??a.delayDuration,g=s.useRef(!1),[b,y]=ie({prop:n,defaultProp:o??!1,onChange:B=>{B?(a.onOpen(),document.dispatchEvent(new CustomEvent(L))):a.onClose(),i==null||i(B)},caller:E}),T=s.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),D=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,g.current=!1,y(!0)},[y]),P=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,y(!1)},[y]),A=s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{g.current=!0,y(!0),d.current=0},v)},[v,y]);return s.useEffect(()=>()=>{d.current&&(d.current=(window.clearTimeout(d.current),0))},[]),(0,p.jsx)(ge,{...f,children:(0,p.jsx)(we,{scope:e,contentId:h,open:b,stateAttribute:T,trigger:c,onTriggerChange:x,onTriggerEnter:s.useCallback(()=>{a.isOpenDelayedRef.current?A():D()},[a.isOpenDelayedRef,A,D]),onTriggerLeave:s.useCallback(()=>{m?P():(window.clearTimeout(d.current),d.current=0)},[P,m]),onOpen:D,onClose:P,disableHoverableContent:m,children:t})})};z.displayName=E;var I="TooltipTrigger",q=s.forwardRef((r,e)=>{let{__scopeTooltip:t,...n}=r,o=j(I,t),i=O(I,t),l=R(t),u=S(e,s.useRef(null),o.onTriggerChange),a=s.useRef(!1),f=s.useRef(!1),c=s.useCallback(()=>a.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),(0,p.jsx)(xe,{asChild:!0,...l,children:(0,p.jsx)(ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:w(r.onPointerMove,x=>{x.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:w(r.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:w(r.onPointerDown,()=>{o.open&&o.onClose(),a.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:w(r.onFocus,()=>{a.current||o.onOpen()}),onBlur:w(r.onBlur,o.onClose),onClick:w(r.onClick,o.onClose)})})});q.displayName=I;var N="TooltipPortal",[Ce,Te]=_(N,{forceMount:void 0}),G=r=>{let{__scopeTooltip:e,forceMount:t,children:n,container:o}=r,i=j(N,e);return(0,p.jsx)(Ce,{scope:e,forceMount:t,children:(0,p.jsx)(K,{present:t||i.open,children:(0,p.jsx)(ce,{asChild:!0,container:o,children:n})})})};G.displayName=N;var C="TooltipContent",J=s.forwardRef((r,e)=>{let t=Te(C,r.__scopeTooltip),{forceMount:n=t.forceMount,side:o="top",...i}=r,l=j(C,r.__scopeTooltip);return(0,p.jsx)(K,{present:n||l.open,children:l.disableHoverableContent?(0,p.jsx)(Q,{side:o,...i,ref:e}):(0,p.jsx)(Ee,{side:o,...i,ref:e})})}),Ee=s.forwardRef((r,e)=>{let t=j(C,r.__scopeTooltip),n=O(C,r.__scopeTooltip),o=s.useRef(null),i=S(e,o),[l,u]=s.useState(null),{trigger:a,onClose:f}=t,c=o.current,{onPointerInTransitChange:x}=n,h=s.useCallback(()=>{u(null),x(!1)},[x]),d=s.useCallback((m,v)=>{let g=m.currentTarget,b={x:m.clientX,y:m.clientY},y=Pe(b,De(b,g.getBoundingClientRect())),T=Le(v.getBoundingClientRect());u(Me([...y,...T])),x(!0)},[x]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(a&&c){let m=g=>d(g,c),v=g=>d(g,a);return a.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{a.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[a,c,d,h]),s.useEffect(()=>{if(l){let m=v=>{let g=v.target,b={x:v.clientX,y:v.clientY},y=(a==null?void 0:a.contains(g))||(c==null?void 0:c.contains(g)),T=!Oe(b,l);y?h():T&&(h(),f())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[a,c,l,f,h]),(0,p.jsx)(Q,{...r,ref:i})}),[je,_e]=_(E,{isInside:!1}),Re=le("TooltipContent"),Q=s.forwardRef((r,e)=>{let{__scopeTooltip:t,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:l,...u}=r,a=j(C,t),f=R(t),{onClose:c}=a;return s.useEffect(()=>(document.addEventListener(L,c),()=>document.removeEventListener(L,c)),[c]),s.useEffect(()=>{if(a.trigger){let x=h=>{var d;(d=h.target)!=null&&d.contains(a.trigger)&&c()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[a.trigger,c]),(0,p.jsx)(de,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:x=>x.preventDefault(),onDismiss:c,children:(0,p.jsxs)(me,{"data-state":a.stateAttribute,...f,...u,ref:e,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(Re,{children:n}),(0,p.jsx)(je,{scope:t,isInside:!0,children:(0,p.jsx)(ve,{id:a.contentId,role:"tooltip",children:o||n})})]})})});J.displayName=C;var U="TooltipArrow",ke=s.forwardRef((r,e)=>{let{__scopeTooltip:t,...n}=r,o=R(t);return _e(U,t).isInside?null:(0,p.jsx)(he,{...o,...n,ref:e})});ke.displayName=U;function De(r,e){let t=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),o=Math.abs(e.right-r.x),i=Math.abs(e.left-r.x);switch(Math.min(t,n,o,i)){case i:return"left";case o:return"right";case t:return"top";case n:return"bottom";default:throw Error("unreachable")}}function Pe(r,e,t=5){let n=[];switch(e){case"top":n.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":n.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":n.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":n.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return n}function Le(r){let{top:e,right:t,bottom:n,left:o}=r;return[{x:o,y:e},{x:t,y:e},{x:t,y:n},{x:o,y:n}]}function Oe(r,e){let{x:t,y:n}=r,o=!1;for(let i=0,l=e.length-1;i<e.length;l=i++){let u=e[i],a=e[l],f=u.x,c=u.y,x=a.x,h=a.y;c>n!=h>n&&t<(x-f)*(n-c)/(h-c)+f&&(o=!o)}return o}function Me(r){let e=r.slice();return e.sort((t,n)=>t.x<n.x?-1:t.x>n.x?1:t.y<n.y?-1:t.y>n.y?1:0),Ie(e)}function Ie(r){if(r.length<=1)return r.slice();let e=[];for(let n=0;n<r.length;n++){let o=r[n];for(;e.length>=2;){let i=e[e.length-1],l=e[e.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))e.pop();else break}e.push(o)}e.pop();let t=[];for(let n=r.length-1;n>=0;n--){let o=r[n];for(;t.length>=2;){let i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Ne=M,He=z,Ae=q,Be=G,V=J,H=te(),Fe=r=>{let e=(0,H.c)(6),t,n;e[0]===r?(t=e[1],n=e[2]):({delayDuration:n,...t}=r,e[0]=r,e[1]=t,e[2]=n);let o=n===void 0?400:n,i;return e[3]!==o||e[4]!==t?(i=(0,p.jsx)(Ne,{delayDuration:o,...t}),e[3]=o,e[4]=t,e[5]=i):i=e[5],i},W=pe(Be),Z=He,Se=se(V),$=Ae,k=s.forwardRef((r,e)=>{let t=(0,H.c)(11),n,o,i;t[0]===r?(n=t[1],o=t[2],i=t[3]):({className:n,sideOffset:i,...o}=r,t[0]=r,t[1]=n,t[2]=o,t[3]=i);let l=i===void 0?4:i,u;t[4]===n?u=t[5]:(u=ne("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-xs data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",n),t[4]=n,t[5]=u);let a;return t[6]!==o||t[7]!==e||t[8]!==l||t[9]!==u?(a=(0,p.jsx)(fe,{children:(0,p.jsx)(Se,{ref:e,sideOffset:l,className:u,...o})}),t[6]=o,t[7]=e,t[8]=l,t[9]=u,t[10]=a):a=t[10],a});k.displayName=V.displayName;var Ke=r=>{let e=(0,H.c)(22),t,n,o,i,l,u,a,f;e[0]===r?(t=e[1],n=e[2],o=e[3],i=e[4],l=e[5],u=e[6],a=e[7],f=e[8]):({content:o,children:n,usePortal:u,asChild:a,tabIndex:f,side:l,align:t,...i}=r,e[0]=r,e[1]=t,e[2]=n,e[3]=o,e[4]=i,e[5]=l,e[6]=u,e[7]=a,e[8]=f);let c=u===void 0?!0:u,x=a===void 0?!0:a;if(o==null||o==="")return n;let h;e[9]!==x||e[10]!==n||e[11]!==f?(h=(0,p.jsx)($,{asChild:x,tabIndex:f,children:n}),e[9]=x,e[10]=n,e[11]=f,e[12]=h):h=e[12];let d;e[13]!==t||e[14]!==o||e[15]!==l||e[16]!==c?(d=c?(0,p.jsx)(W,{children:(0,p.jsx)(k,{side:l,align:t,children:o})}):(0,p.jsx)(k,{side:l,align:t,children:o}),e[13]=t,e[14]=o,e[15]=l,e[16]=c,e[17]=d):d=e[17];let m;return e[18]!==i||e[19]!==h||e[20]!==d?(m=(0,p.jsxs)(Z,{disableHoverableContent:!0,...i,children:[h,d]}),e[18]=i,e[19]=h,e[20]=d,e[21]=m):m=e[21],m};export{Z as a,Fe as i,k as n,$ as o,W as r,M as s,Ke as t};
var ue=Object.defineProperty;var ce=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>ce(t,typeof e!="symbol"?e+"":e,n);var at,lt,ot,ut,ct;import{C as de,w as he}from"./_Uint8Array-BGESiCQL.js";import{a as fe,d as ye}from"./hotkeys-BHHWjLlp.js";import{St as yt,a as pe,c as ge,gt as me,o as ve,wt as be}from"./vega-loader.browser-DXARUlxo.js";var xe="[object Number]";function we(t){return typeof t=="number"||de(t)&&he(t)==xe}var Ie=we;const pt=Uint8Array.of(65,82,82,79,87,49),$={V1:0,V2:1,V3:2,V4:3,V5:4},S={NONE:0,Schema:1,DictionaryBatch:2,RecordBatch:3,Tensor:4,SparseTensor:5},l={Dictionary:-1,NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Duration:18,LargeBinary:19,LargeUtf8:20,LargeList:21,RunEndEncoded:22,BinaryView:23,Utf8View:24,ListView:25,LargeListView:26},gt={HALF:0,SINGLE:1,DOUBLE:2},z={DAY:0,MILLISECOND:1},m={SECOND:0,MILLISECOND:1,MICROSECOND:2,NANOSECOND:3},C={YEAR_MONTH:0,DAY_TIME:1,MONTH_DAY_NANO:2},W={Sparse:0,Dense:1},mt=Uint8Array,vt=Uint16Array,bt=Uint32Array,xt=BigUint64Array,wt=Int8Array,Le=Int16Array,x=Int32Array,L=BigInt64Array,Ae=Float32Array,k=Float64Array;function Ne(t,e){let n=Math.log2(t)-3;return(e?[wt,Le,x,L]:[mt,vt,bt,xt])[n]}Object.getPrototypeOf(Int8Array);function X(t,e){let n=0,r=t.length;if(r<=2147483648)do{let i=n+r>>>1;t[i]<=e?n=i+1:r=i}while(n<r);else do{let i=Math.trunc((n+r)/2);t[i]<=e?n=i+1:r=i}while(n<r);return n}function J(t,e,n){if(e(t))return t;throw Error(n(t))}function w(t,e,n){return e=Array.isArray(e)?e:Object.values(e),J(t,r=>e.includes(r),n??(()=>`${t} must be one of ${e}`))}function It(t,e){for(let[n,r]of Object.entries(t))if(r===e)return n;return"<Unknown>"}const G=t=>`Unsupported data type: "${It(l,t)}" (id ${t})`,Lt=(t,e,n=!0,r=null)=>({name:t,type:e,nullable:n,metadata:r});function At(t){return Object.hasOwn(t,"name")&&Nt(t.type)}function Nt(t){return typeof(t==null?void 0:t.typeId)=="number"}function B(t,e="",n=!0){return At(t)?t:Lt(e,J(t,Nt,()=>"Data type expected."),n)}const Ee=(t,e,n=!1,r=-1)=>({typeId:l.Dictionary,id:r,dictionary:t,indices:e||Dt(),ordered:n}),Et=(t=32,e=!0)=>({typeId:l.Int,bitWidth:w(t,[8,16,32,64]),signed:e,values:Ne(t,e)}),Dt=()=>Et(32),De=(t=2)=>({typeId:l.Float,precision:w(t,gt),values:[vt,Ae,k][t]}),Se=()=>({typeId:l.Binary,offsets:x}),Be=()=>({typeId:l.Utf8,offsets:x}),Oe=(t,e,n=128)=>({typeId:l.Decimal,precision:t,scale:e,bitWidth:w(n,[128,256]),values:xt}),Te=t=>({typeId:l.Date,unit:w(t,z),values:t===z.DAY?x:L}),Me=(t=m.MILLISECOND,e=32)=>({typeId:l.Time,unit:w(t,m),bitWidth:w(e,[32,64]),values:e===32?x:L}),Ce=(t=m.MILLISECOND,e=null)=>({typeId:l.Timestamp,unit:w(t,m),timezone:e,values:L}),Ue=(t=C.MONTH_DAY_NANO)=>({typeId:l.Interval,unit:w(t,C),values:t===C.MONTH_DAY_NANO?void 0:x}),Ve=t=>({typeId:l.List,children:[B(t)],offsets:x}),Fe=t=>({typeId:l.Struct,children:Array.isArray(t)&&At(t[0])?t:Object.entries(t).map(([e,n])=>Lt(e,n))}),Re=(t,e,n,r)=>(n??(n=e.map((i,s)=>s)),{typeId:l.Union,mode:w(t,W),typeIds:n,typeMap:n.reduce((i,s,a)=>(i[s]=a,i),{}),children:e.map((i,s)=>B(i,`_${s}`)),typeIdForValue:r,offsets:x}),$e=t=>({typeId:l.FixedSizeBinary,stride:t}),ze=(t,e)=>({typeId:l.FixedSizeList,stride:e,children:[B(t)]}),ke=(t,e)=>({typeId:l.Map,keysSorted:t,children:[e],offsets:x}),je=(t=m.MILLISECOND)=>({typeId:l.Duration,unit:w(t,m),values:L}),Ye=()=>({typeId:l.LargeBinary,offsets:L}),_e=()=>({typeId:l.LargeUtf8,offsets:L}),He=t=>({typeId:l.LargeList,children:[B(t)],offsets:L}),Pe=(t,e)=>({typeId:l.RunEndEncoded,children:[J(B(t,"run_ends"),n=>n.type.typeId===l.Int,()=>"Run-ends must have an integer type."),B(e,"values")]}),We=t=>({typeId:l.ListView,children:[B(t,"value")],offsets:x}),Xe=t=>({typeId:l.LargeListView,children:[B(t,"value")],offsets:L});var j=new k(2).buffer;new L(j),new bt(j),new x(j),new mt(j);function O(t){if(t>2**53-1||t<-(2**53-1))throw Error(`BigInt exceeds integer number representation: ${t}`);return Number(t)}function Z(t,e){return Number(t/e)+Number(t%e)/Number(e)}var U=t=>BigInt.asUintN(64,t);function Je(t,e){let n=e<<1,r;return BigInt.asIntN(64,t[n+1])<0?(r=U(~t[n])|U(~t[n+1])<<64n,r=-(r+1n)):r=t[n]|t[n+1]<<64n,r}function Ge(t,e){let n=e<<2,r;return BigInt.asIntN(64,t[n+3])<0?(r=U(~t[n])|U(~t[n+1])<<64n|U(~t[n+2])<<128n|U(~t[n+3])<<192n,r=-(r+1n)):r=t[n]|t[n+1]<<64n|t[n+2]<<128n|t[n+3]<<192n,r}var Ze=new TextDecoder("utf-8");new TextEncoder;function Y(t){return Ze.decode(t)}function St(t,e){return(t[e>>3]&1<<e%8)!=0}function N(t,e){let n=e+h(t,e),r=n-h(t,n),i=v(t,r);return(s,a,o=null)=>{if(s<i){let u=v(t,r+s);if(u)return a(t,n+u)}return o}}function M(t,e){return e}function F(t,e){return!!qe(t,e)}function qe(t,e){return q(t,e)<<24>>24}function q(t,e){return t[e]}function v(t,e){return Ke(t,e)<<16>>16}function Ke(t,e){return t[e]|t[e+1]<<8}function h(t,e){return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24}function Bt(t,e){return h(t,e)>>>0}function b(t,e){return O(BigInt.asIntN(64,BigInt(Bt(t,e))+(BigInt(Bt(t,e+4))<<32n)))}function _(t,e){let n=e+h(t,e),r=h(t,n);return n+=4,Y(t.subarray(n,n+r))}function T(t,e,n,r){if(!e)return[];let i=e+h(t,e);return Array.from({length:h(t,i)},(s,a)=>r(t,i+4+a*n))}const K=Symbol("rowIndex");function Q(t,e){class n{constructor(s){this[K]=s}toJSON(){return Tt(t,e,this[K])}}let r=n.prototype;for(let i=0;i<t.length;++i){if(Object.hasOwn(r,t[i]))continue;let s=e[i];Object.defineProperty(r,t[i],{get(){return s.at(this[K])},enumerable:!0})}return i=>new n(i)}function Ot(t,e){return n=>Tt(t,e,n)}function Tt(t,e,n){let r={};for(let i=0;i<t.length;++i)r[t[i]]=e[i].at(n);return r}function Qe(t){return t instanceof P}var H=(at=class{constructor({length:t,nullCount:e,type:n,validity:r,values:i,offsets:s,sizes:a,children:o}){this.length=t,this.nullCount=e,this.type=n,this.validity=r,this.values=i,this.offsets=s,this.sizes=a,this.children=o,(!e||!this.validity)&&(this.at=u=>this.value(u))}get[Symbol.toStringTag](){return"Batch"}at(t){return this.isValid(t)?this.value(t):null}isValid(t){return St(this.validity,t)}value(t){return this.values[t]}slice(t,e){let n=e-t,r=Array(n);for(let i=0;i<n;++i)r[i]=this.at(t+i);return r}*[Symbol.iterator](){for(let t=0;t<this.length;++t)yield this.at(t)}},A(at,"ArrayType",null),at),P=class extends H{constructor(t){super(t);let{length:e,values:n}=this;this.values=n.subarray(0,e)}slice(t,e){return this.nullCount?super.slice(t,e):this.values.subarray(t,e)}[Symbol.iterator](){return this.nullCount?super[Symbol.iterator]():this.values[Symbol.iterator]()}},tt=(lt=class extends H{},A(lt,"ArrayType",k),lt),f=(ot=class extends H{},A(ot,"ArrayType",Array),ot),tn=class extends f{value(t){return null}},V=class extends tt{value(t){return O(this.values[t])}},en=class extends tt{value(t){let e=this.values[t],n=(e&31744)>>10,r=(e&1023)/1024,i=(-1)**((e&32768)>>15);switch(n){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(n-15)*(1+r)}},nn=class extends f{value(t){return St(this.values,t)}},Mt=class extends H{constructor(t){super(t);let{bitWidth:e,scale:n}=this.type;this.decimal=e===128?Je:Ge,this.scale=10n**BigInt(n)}},rn=(ut=class extends Mt{value(t){return Z(this.decimal(this.values,t),this.scale)}},A(ut,"ArrayType",k),ut),sn=(ct=class extends Mt{value(t){return this.decimal(this.values,t)}},A(ct,"ArrayType",Array),ct),Ct=class extends f{constructor(t){super(t),this.source=t}value(t){return new Date(this.source.value(t))}},an=class extends tt{value(t){return 864e5*this.values[t]}};const ln=V;var on=class extends V{value(t){return super.value(t)*1e3}};const un=V;var cn=class extends V{value(t){return Z(this.values[t],1000n)}},dn=class extends V{value(t){return Z(this.values[t],1000000n)}},hn=class extends f{value(t){return this.values.subarray(t<<1,t+1<<1)}},fn=class extends f{value(t){let e=this.values,n=t<<4;return Float64Array.of(h(e,n),h(e,n+4),b(e,n+8))}},Ut=({values:t,offsets:e},n)=>t.subarray(e[n],e[n+1]),Vt=({values:t,offsets:e},n)=>t.subarray(O(e[n]),O(e[n+1])),yn=class extends f{value(t){return Ut(this,t)}},pn=class extends f{value(t){return Vt(this,t)}},gn=class extends f{value(t){return Y(Ut(this,t))}},mn=class extends f{value(t){return Y(Vt(this,t))}},vn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(e[t],e[t+1])}},bn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(O(e[t]),O(e[t+1]))}},xn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(e,n)}},wn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(O(e),O(n))}},Ft=class extends f{constructor(t){super(t),this.stride=this.type.stride}},In=class extends Ft{value(t){let{stride:e,values:n}=this;return n.subarray(t*e,(t+1)*e)}},Ln=class extends Ft{value(t){let{children:e,stride:n}=this;return e[0].slice(t*n,(t+1)*n)}};function Rt({children:t,offsets:e},n){let[r,i]=t[0].children,s=e[n],a=e[n+1],o=[];for(let u=s;u<a;++u)o.push([r.at(u),i.at(u)]);return o}var An=class extends f{value(t){return Rt(this,t)}},Nn=class extends f{value(t){return new Map(Rt(this,t))}},$t=class extends f{constructor({typeIds:t,...e}){super(e),this.typeIds=t,this.typeMap=this.type.typeMap}value(t,e=t){let{typeIds:n,children:r,typeMap:i}=this;return r[i[n[t]]].at(e)}},En=class extends $t{value(t){return super.value(t,this.offsets[t])}},zt=class extends f{constructor(t,e=Ot){super(t),this.names=this.type.children.map(n=>n.name),this.factory=e(this.names,this.children)}value(t){return this.factory(t)}},Dn=class extends zt{constructor(t){super(t,Q)}},Sn=class extends f{value(t){let[{values:e},n]=this.children;return n.at(X(e,t))}},Bn=class extends f{setDictionary(t){return this.dictionary=t,this.cache=t.cache(),this}value(t){return this.cache[this.key(t)]}key(t){return this.values[t]}},kt=class extends f{constructor({data:t,...e}){super(e),this.data=t}view(t){let{values:e,data:n}=this,r=t<<4,i=r+4,s=e,a=h(s,r);return a>12&&(i=h(s,r+12),s=n[h(s,r+8)]),s.subarray(i,i+a)}},On=class extends kt{value(t){return this.view(t)}},Tn=class extends kt{value(t){return Y(this.view(t))}};function jt(t){let e=[];return{add(n){return e.push(n),this},clear:()=>e=[],done:()=>new Mn(e,t)}}var Mn=class{constructor(t,e=(n=>(n=t[0])==null?void 0:n.type)()){this.type=e,this.length=t.reduce((s,a)=>s+a.length,0),this.nullCount=t.reduce((s,a)=>s+a.nullCount,0),this.data=t;let r=t.length,i=new Int32Array(r+1);if(r===1){let[s]=t;i[1]=s.length,this.at=a=>s.at(a)}else for(let s=0,a=0;s<r;++s)i[s+1]=a+=t[s].length;this.offsets=i}get[Symbol.toStringTag](){return"Column"}[Symbol.iterator](){let t=this.data;return t.length===1?t[0][Symbol.iterator]():Cn(t)}at(t){var i;let{data:e,offsets:n}=this,r=X(n,t)-1;return(i=e[r])==null?void 0:i.at(t-n[r])}get(t){return this.at(t)}toArray(){let{length:t,nullCount:e,data:n}=this,r=!e&&Qe(n[0]),i=n.length;if(r&&i===1)return n[0].values;let s=new(!i||e>0?Array:n[0].constructor.ArrayType??n[0].values.constructor)(t);return r?Un(s,n):Vn(s,n)}cache(){return this._cache??(this._cache=this.toArray())}};function*Cn(t){for(let e=0;e<t.length;++e){let n=t[e][Symbol.iterator]();for(let r=n.next();!r.done;r=n.next())yield r.value}}function Un(t,e){for(let n=0,r=0;n<e.length;++n){let{values:i}=e[n];t.set(i,r),r+=i.length}return t}function Vn(t,e){let n=-1;for(let r=0;r<e.length;++r){let i=e[r];for(let s=0;s<i.length;++s)t[++n]=i.at(s)}return t}var Fn=class le{constructor(e,n,r=!1){let i=e.fields.map(a=>a.name);this.schema=e,this.names=i,this.children=n,this.factory=r?Q:Ot;let s=[];this.getFactory=a=>s[a]??(s[a]=this.factory(i,n.map(o=>o.data[a])))}get[Symbol.toStringTag](){return"Table"}get numCols(){return this.names.length}get numRows(){var e;return((e=this.children[0])==null?void 0:e.length)??0}getChildAt(e){return this.children[e]}getChild(e){let n=this.names.findIndex(r=>r===e);return n>-1?this.children[n]:void 0}selectAt(e,n=[]){let{children:r,factory:i,schema:s}=this,{fields:a}=s;return new le({...s,fields:e.map((o,u)=>Rn(a[o],n[u]))},e.map(o=>r[o]),i===Q)}select(e,n){let r=this.names,i=e.map(s=>r.indexOf(s));return this.selectAt(i,n)}toColumns(){let{children:e,names:n}=this,r={};return n.forEach((i,s)=>{var a;return r[i]=((a=e[s])==null?void 0:a.toArray())??[]}),r}toArray(){var a;let{children:e,getFactory:n,numRows:r}=this,i=((a=e[0])==null?void 0:a.data)??[],s=Array(r);for(let o=0,u=-1;o<i.length;++o){let d=n(o);for(let c=0;c<i[o].length;++c)s[++u]=d(c)}return s}*[Symbol.iterator](){var i;let{children:e,getFactory:n}=this,r=((i=e[0])==null?void 0:i.data)??[];for(let s=0;s<r.length;++s){let a=n(s);for(let o=0;o<r[s].length;++o)yield a(o)}}at(e){let{children:n,getFactory:r,numRows:i}=this;if(e<0||e>=i)return null;let[{offsets:s}]=n,a=X(s,e)-1;return r(a)(e-s[a])}get(e){return this.at(e)}};function Rn(t,e){return e!=null&&e!==t.name?{...t,name:e}:t}function $n(t,e={}){let{typeId:n,bitWidth:r,precision:i,unit:s}=t,{useBigInt:a,useDate:o,useDecimalBigInt:u,useMap:d,useProxy:c}=e;switch(n){case l.Null:return tn;case l.Bool:return nn;case l.Int:case l.Time:case l.Duration:return a||r<64?P:V;case l.Float:return i?P:en;case l.Date:return Yt(s===z.DAY?an:ln,o&&Ct);case l.Timestamp:return Yt(s===m.SECOND?on:s===m.MILLISECOND?un:s===m.MICROSECOND?cn:dn,o&&Ct);case l.Decimal:return u?sn:rn;case l.Interval:return s===C.DAY_TIME?hn:s===C.YEAR_MONTH?P:fn;case l.FixedSizeBinary:return In;case l.Utf8:return gn;case l.LargeUtf8:return mn;case l.Binary:return yn;case l.LargeBinary:return pn;case l.BinaryView:return On;case l.Utf8View:return Tn;case l.List:return vn;case l.LargeList:return bn;case l.Map:return d?Nn:An;case l.ListView:return xn;case l.LargeListView:return wn;case l.FixedSizeList:return Ln;case l.Struct:return c?Dn:zt;case l.RunEndEncoded:return Sn;case l.Dictionary:return Bn;case l.Union:return t.mode?En:$t}throw Error(G(n))}function Yt(t,e){return e?class extends e{constructor(n){super(new t(n))}}:t}function zn(t,e){return{offset:b(t,e),metadataLength:h(t,e+8),bodyLength:b(t,e+16)}}function _t(t,e){return T(t,e,24,zn)}function Ht(t,e,n){let r=N(t,e);if(r(10,M,0))throw Error("Record batch compression not implemented");let i=n<$.V4?8:0;return{length:r(4,b,0),nodes:T(t,r(6,M),16,(s,a)=>({length:b(s,a),nullCount:b(s,a+8)})),regions:T(t,r(8,M),16+i,(s,a)=>({offset:b(s,a+i),length:b(s,a+i+8)})),variadic:T(t,r(12,M),8,b)}}function kn(t,e,n){let r=N(t,e);return{id:r(4,b,0),data:r(6,(i,s)=>Ht(i,s,n)),isDelta:r(8,F,!1)}}function Pt(t,e,n,r){w(n,l,G);let i=N(t,e);switch(n){case l.Binary:return Se();case l.Utf8:return Be();case l.LargeBinary:return Ye();case l.LargeUtf8:return _e();case l.List:return Ve(r[0]);case l.ListView:return We(r[0]);case l.LargeList:return He(r[0]);case l.LargeListView:return Xe(r[0]);case l.Struct:return Fe(r);case l.RunEndEncoded:return Pe(r[0],r[1]);case l.Int:return Et(i(4,h,0),i(6,F,!1));case l.Float:return De(i(4,v,gt.HALF));case l.Decimal:return Oe(i(4,h,0),i(6,h,0),i(8,h,128));case l.Date:return Te(i(4,v,z.MILLISECOND));case l.Time:return Me(i(4,v,m.MILLISECOND),i(6,h,32));case l.Timestamp:return Ce(i(4,v,m.SECOND),i(6,_));case l.Interval:return Ue(i(4,v,C.YEAR_MONTH));case l.Duration:return je(i(4,v,m.MILLISECOND));case l.FixedSizeBinary:return $e(i(4,h,0));case l.FixedSizeList:return ze(r[0],i(4,h,0));case l.Map:return ke(i(4,F,!1),r[0]);case l.Union:return Re(i(4,v,W.Sparse),r,T(t,i(6,M),4,h))}return{typeId:n}}function et(t,e){let n=T(t,e,4,(r,i)=>{let s=N(r,i);return[s(4,_),s(6,_)]});return n.length?new Map(n):null}function Wt(t,e,n){let r=N(t,e);return{version:n,endianness:r(4,v,0),fields:r(6,jn,[]),metadata:r(8,et)}}function jn(t,e){return T(t,e,4,Xt)}function Xt(t,e){let n=N(t,e),r=n(8,q,l.NONE),i=n(10,M,0),s=n(12,_n),a=Pt(t,i,r,n(14,(o,u)=>Yn(o,u)));return s&&(s.dictionary=a,a=s),{name:n(4,_),type:a,nullable:n(6,F,!1),metadata:n(16,et)}}function Yn(t,e){let n=T(t,e,4,Xt);return n.length?n:null}function _n(t,e){if(!e)return null;let n=N(t,e);return Ee(null,n(6,Hn,Dt()),n(8,F,!1),n(4,b,0))}function Hn(t,e){return Pt(t,e,l.Int)}var Pn=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,Wn=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`,Xn=t=>`Unsupported message type: ${t} (${It(S,t)})`;function nt(t,e){let n=h(t,e)||0;if(e+=4,n===-1&&(n=h(t,e)||0,e+=4),n===0)return null;let r=t.subarray(e,e+=n);if(r.byteLength<n)throw Error(Pn(n,r.byteLength));let i=N(r,0),s=i(4,v,$.V1),a=i(6,q,S.NONE),o=i(8,M,0),u=i(10,b,0),d;if(o){let c=a===S.Schema?Wt:a===S.DictionaryBatch?kn:a===S.RecordBatch?Ht:null;if(!c)throw Error(Xn(a));if(d=c(r,o,s),u>0){let g=t.subarray(e,e+=u);if(g.byteLength<u)throw Error(Wn(u,g.byteLength));d.body=g}}return{version:s,type:a,index:e,content:d}}function Jn(t){let e=t instanceof ArrayBuffer?new Uint8Array(t):t;return e instanceof Uint8Array&&Gn(e)?qn(e):Zn(e)}function Gn(t){if(!t||t.length<4)return!1;for(let e=0;e<6;++e)if(pt[e]!==t[e])return!1;return!0}function Zn(t){let e=[t].flat(),n,r=[],i=[];for(let s of e){if(!(s instanceof Uint8Array))throw Error("IPC data batch was not a Uint8Array.");let a=0;for(;;){let o=nt(s,a);if(o===null)break;if(a=o.index,o.content)switch(o.type){case S.Schema:n||(n=o.content);break;case S.RecordBatch:r.push(o.content);break;case S.DictionaryBatch:i.push(o.content);break}}}return{schema:n,dictionaries:i,records:r,metadata:null}}function qn(t){let e=t.byteLength-(pt.length+4),n=N(t,e-h(t,e)),r=n(4,v,$.V1),i=n(8,_t,[]),s=n(10,_t,[]);return{schema:n(6,(a,o)=>Wt(a,o,r)),dictionaries:i.map(({offset:a})=>nt(t,a).content),records:s.map(({offset:a})=>nt(t,a).content),metadata:n(12,et)}}function rt(t,e){return Kn(Jn(t),e)}function Kn(t,e={}){let{schema:n={fields:[]},dictionaries:r,records:i}=t,{version:s,fields:a}=n,o=new Map,u=tr(e,s,o),d=new Map;Qn(n,y=>{let p=y.type;p.typeId===l.Dictionary&&d.set(p.id,p.dictionary)});let c=new Map;for(let y of r){let{id:p,data:E,isDelta:D,body:oe}=y,dt=d.get(p),ht=it(dt,u({...E,body:oe}));if(c.has(p)){let ft=c.get(p);D||ft.clear(),ft.add(ht)}else{if(D)throw Error("Delta update can not be first dictionary batch.");c.set(p,jt(dt).add(ht))}}c.forEach((y,p)=>o.set(p,y.done()));let g=a.map(y=>jt(y.type));for(let y of i){let p=u(y);a.forEach((E,D)=>g[D].add(it(E.type,p)))}return new Fn(n,g.map(y=>y.done()),e.useProxy)}function Qn(t,e){t.fields.forEach(function n(r){var i,s,a;e(r),(s=(i=r.type.dictionary)==null?void 0:i.children)==null||s.forEach(n),(a=r.type.children)==null||a.forEach(n)})}function tr(t,e,n){let r={version:e,options:t,dictionary:i=>n.get(i)};return i=>{let{length:s,nodes:a,regions:o,variadic:u,body:d}=i,c=-1,g=-1,y=-1;return{...r,length:s,node:()=>a[++c],buffer:p=>{let{length:E,offset:D}=o[++g];return p?new p(d.buffer,d.byteOffset+D,E/p.BYTES_PER_ELEMENT):d.subarray(D,D+E)},variadic:()=>u[++y],visit(p){return p.map(E=>it(E.type,this))}}}}function it(t,e){let{typeId:n}=t,{length:r,options:i,node:s,buffer:a,variadic:o,version:u}=e,d=$n(t,i);if(n===l.Null)return new d({length:r,nullCount:r,type:t});let c={...s(),type:t};switch(n){case l.Bool:case l.Int:case l.Time:case l.Duration:case l.Float:case l.Decimal:case l.Date:case l.Timestamp:case l.Interval:case l.FixedSizeBinary:return new d({...c,validity:a(),values:a(t.values)});case l.Utf8:case l.LargeUtf8:case l.Binary:case l.LargeBinary:return new d({...c,validity:a(),offsets:a(t.offsets),values:a()});case l.BinaryView:case l.Utf8View:return new d({...c,validity:a(),values:a(),data:Array.from({length:o()},()=>a())});case l.List:case l.LargeList:case l.Map:return new d({...c,validity:a(),offsets:a(t.offsets),children:e.visit(t.children)});case l.ListView:case l.LargeListView:return new d({...c,validity:a(),offsets:a(t.offsets),sizes:a(t.offsets),children:e.visit(t.children)});case l.FixedSizeList:case l.Struct:return new d({...c,validity:a(),children:e.visit(t.children)});case l.RunEndEncoded:return new d({...c,children:e.visit(t.children)});case l.Dictionary:{let{id:g,indices:y}=t;return new d({...c,validity:a(),values:a(y.values)}).setDictionary(e.dictionary(g))}case l.Union:return u<$.V5&&a(),new d({...c,typeIds:a(wt),offsets:t.mode===W.Sparse?null:a(t.offsets),children:e.visit(t.children)});default:throw Error(G(n))}}new Uint16Array(new Uint8Array([1,0]).buffer)[0];function R(t,e){let n=new Map;return(...r)=>{let i=e(...r);if(n.has(i))return n.get(i);let s=t(...r).finally(()=>{n.delete(i)});return n.set(i,s),s}}function st(t,e){return ve(t,e)}function er(){return pe()}const I=ge;function Jt(){let t=nr(er()),e=n=>JSON.stringify(n);return{load:R(t.load.bind(t),e),sanitize:R(t.sanitize.bind(t),e),http:R(t.http.bind(t),e),file:R(t.file.bind(t),e)}}function nr(t){return{...t,async load(e,n){return e.endsWith(".arrow")?rt(await Gt(e),{useProxy:!1}).toArray():t.load(e,n)}}}const Gt=R(t=>fetch(t).then(e=>e.arrayBuffer()),t=>t);var Zt=I.integer,qt=I.number,rr=I.date,ir=I.boolean,Kt=()=>(I.integer=t=>{if(t==="")return"";if(t==="-inf"||t==="inf")return t;function e(r){let i=Zt(r);return Number.isNaN(i)?r:i}let n=Number.parseInt(t,10);if(Ie(n)){if(!(Math.abs(n)>2**53-1))return e(t);try{return BigInt(t)}catch{return e(t)}}else return""},I.number=t=>{if(t==="-inf"||t==="inf")return t;let e=qt(t);return Number.isNaN(e)?t:e},()=>{I.integer=Zt,I.number=qt}),Qt=()=>(I.date=t=>{if(t==="")return"";if(t==null)return null;if(!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return t;try{let e=new Date(t);return Number.isNaN(e.getTime())?t:e}catch{return ye.warn(`Failed to parse date: ${t}`),t}},()=>{I.date=rr});I.boolean=t=>t==="True"?!0:t==="False"?!1:ir(t);const te=Jt();async function sr(t,e,n={}){let{handleBigIntAndNumberLike:r=!1,replacePeriod:i=!1}=n;if(t.endsWith(".arrow")||(e==null?void 0:e.type)==="arrow")return rt(await Gt(t),{useProxy:!0,useDate:!0,useBigInt:r}).toArray();let s=[Qt];r&&s.push(Kt);let a=[];try{let o=await te.load(t);if(!e){if(typeof o=="string")try{JSON.parse(o),e={type:"json"}}catch{e={type:"csv",parse:"auto"}}typeof o=="object"&&(e={type:"json"})}let u=(e==null?void 0:e.type)==="csv";u&&typeof o=="string"&&(o=lr(o)),u&&typeof o=="string"&&i&&(o=or(o));let d=(e==null?void 0:e.parse)||"auto";return typeof d=="object"&&(d=fe.mapValues(d,c=>c==="time"?"string":c==="datetime"?"date":c)),a=s.map(c=>c()),u?st(o,{...e,parse:d}):st(o,e)}finally{a.forEach(o=>o())}}function ar(t,e=!0){let n=[Qt];e&&n.push(Kt);let r=n.map(s=>s()),i=st(t,{type:"csv",parse:"auto"});return r.forEach(s=>s()),i}function lr(t){return t!=null&&t.includes(",")?ee(t,e=>{let n=new Set;return e.map(r=>{let i=cr(r,n);return n.add(i),i})}):t}function or(t){return t!=null&&t.includes(".")?ee(t,e=>e.map(n=>n.replaceAll(".","\u2024"))):t}function ee(t,e){let n=t.split(`
`);return n[0]=e(n[0].split(",")).join(","),n.join(`
`)}var ur="\u200B";function cr(t,e){let n=t,r=1;for(;e.has(n);)n=`${t}${ur.repeat(r)}`,r++;return n}var dr={version:"1.1.0"};function hr(t,e,n,r){if(me(t))return`[${t.map(i=>e(be(i)?i:ne(i,n))).join(", ")}]`;if(yt(t)){let i="",{title:s,image:a,...o}=t;s&&(i+=`<h2>${e(s)}</h2>`),a&&(i+=`<img src="${new URL(e(a),r||location.href).href}">`);let u=Object.keys(o);if(u.length>0){i+="<table>";for(let d of u){let c=o[d];c!==void 0&&(yt(c)&&(c=ne(c,n)),i+=`<tr><td class="key">${e(d)}</td><td class="value">${e(c)}</td></tr>`)}i+="</table>"}return i||"{}"}return e(t)}function fr(t){let e=[];return function(n,r){return typeof r!="object"||!r?r:(e.length=e.indexOf(this)+1,e.length>t?"[Object]":e.indexOf(r)>=0?"[Circular]":(e.push(r),r))}}function ne(t,e){return JSON.stringify(t,fr(e))}var yr=`#vg-tooltip-element {
visibility: hidden;
padding: 8px;
position: fixed;
z-index: 1000;
font-family: sans-serif;
font-size: 11px;
border-radius: 3px;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
white-space: pre-line;
}
#vg-tooltip-element.visible {
visibility: visible;
}
#vg-tooltip-element h2 {
margin-top: 0;
margin-bottom: 10px;
font-size: 13px;
}
#vg-tooltip-element table {
border-spacing: 0;
}
#vg-tooltip-element table tr {
border: none;
}
#vg-tooltip-element table tr td {
overflow: hidden;
text-overflow: ellipsis;
padding-top: 2px;
padding-bottom: 2px;
vertical-align: text-top;
}
#vg-tooltip-element table tr td.key {
color: #808080;
max-width: 150px;
text-align: right;
padding-right: 4px;
}
#vg-tooltip-element table tr td.value {
display: block;
max-width: 300px;
max-height: 7em;
text-align: left;
}
#vg-tooltip-element {
/* The default theme is the light theme. */
background-color: rgba(255, 255, 255, 0.95);
border: 1px solid #d9d9d9;
color: black;
}
#vg-tooltip-element.dark-theme {
background-color: rgba(32, 32, 32, 0.9);
border: 1px solid #f5f5f5;
color: white;
}
#vg-tooltip-element.dark-theme td.key {
color: #bfbfbf;
}
`,re="vg-tooltip-element",pr={offsetX:10,offsetY:10,id:re,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:gr,maxDepth:2,formatTooltip:hr,baseURL:"",anchor:"cursor",position:["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]};function gr(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;")}function mr(t){if(!/^[A-Za-z]+[-:.\w]*$/.test(t))throw Error("Invalid HTML ID");return yr.toString().replaceAll(re,t)}function ie(t,e,{offsetX:n,offsetY:r}){let i=se({x1:t.clientX,x2:t.clientX,y1:t.clientY,y2:t.clientY},e,n,r);for(let s of["bottom-right","bottom-left","top-right","top-left"])if(ae(i[s],e))return i[s];return i["top-left"]}function vr(t,e,n,r,i){let{position:s,offsetX:a,offsetY:o}=i,u=t._el.getBoundingClientRect(),d=t._origin,c=se(br(u,d,n),r,a,o),g=Array.isArray(s)?s:[s];for(let y of g)if(ae(c[y],r)&&!xr(e,c[y],r))return c[y];return ie(e,r,i)}function br(t,e,n){let r=n.isVoronoi?n.datum.bounds:n.bounds,i=t.left+e[0]+r.x1,s=t.top+e[1]+r.y1,a=n;for(;a.mark.group;)a=a.mark.group,i+=a.x??0,s+=a.y??0;let o=r.x2-r.x1,u=r.y2-r.y1;return{x1:i,x2:i+o,y1:s,y2:s+u}}function se(t,e,n,r){let i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2,a=t.x1-e.width-n,o=i-e.width/2,u=t.x2+n,d=t.y1-e.height-r,c=s-e.height/2,g=t.y2+r;return{top:{x:o,y:d},bottom:{x:o,y:g},left:{x:a,y:c},right:{x:u,y:c},"top-left":{x:a,y:d},"top-right":{x:u,y:d},"bottom-left":{x:a,y:g},"bottom-right":{x:u,y:g}}}function ae(t,e){return t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight}function xr(t,e,n){return t.clientX>=e.x&&t.clientX<=e.x+n.width&&t.clientY>=e.y&&t.clientY<=e.y+n.height}var wr=class{constructor(t){A(this,"call");A(this,"options");A(this,"el");this.options={...pr,...t};let e=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){let n=document.createElement("style");n.setAttribute("id",this.options.styleId),n.innerHTML=mr(e);let r=document.head;r.childNodes.length>0?r.insertBefore(n,r.childNodes[0]):r.appendChild(n)}}tooltipHandler(t,e,n,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),r==null||r===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);let{x:i,y:s}=this.options.anchor==="mark"?vr(t,e,n,this.el.getBoundingClientRect(),this.options):ie(e,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${s}px`,this.el.style.left=`${i}px`}};dr.version;const Ir=new wr;export{Jt as a,te as i,ar as n,rt as o,sr as r,Ir as t};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-U3RlLbPJ.js","./clear-button-DMZhBF9S.js","./cn-BKtXLv3a.js","./clsx-D8GwTfvk.js","./compiler-runtime-B3qBwwSJ.js","./react-Bj1aDYRI.js","./chunk-LvLJmgfZ.js","./jsx-runtime-ZmTK25f3.js","./cells-DPp5cDaO.js","./preload-helper-D2MJg03u.js","./badge-DX6CQ6PA.js","./button-CZ3Cs4qb.js","./hotkeys-BHHWjLlp.js","./useEventListener-Cb-RVVEn.js","./Combination-BAEdC-rz.js","./react-dom-CSu739Rf.js","./select-BVdzZKAh.js","./menu-items-BMjcEb2j.js","./dist-DwV58Fb1.js","./check-Dr3SxUsb.js","./createLucideIcon-BCdY6lG5.js","./x-ZP5cObgf.js","./tooltip-CMQz28hC.js","./use-toast-BDYuj3zG.js","./utils-YqBXNpsM.js","./useEvent-BhXAndur.js","./_baseIsEqual-B9N9Mw_N.js","./_Uint8Array-BGESiCQL.js","./invariant-CAG_dYON.js","./merge-BBX6ug-N.js","./_baseFor-Duhs3RiJ.js","./zod-H_cgTO0M.js","./DeferredRequestRegistry-CMf25YiV.js","./Deferred-DxQeE5uh.js","./uuid-DXdzqzcr.js","./config-Q0O7_stz.js","./constants-B6Cb__3x.js","./session-BOFn9QrD.js","./requests-B4FYHTZl.js","./useLifecycle-ClI_npeg.js","./assertNever-CBU83Y6o.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./_hasUnicode-CWqKLxBC.js","./_arrayReduce-TT0iOGKY.js","./useNonce-CS26E0hA.js","./useTheme-DQozhcp1.js","./once-Bul8mtFs.js","./capabilities-MM7JYRxj.js","./createReducer-B3rBsy4P.js","./paths-BzSgteR-.js","./dist-ChS0Dc_R.js","./dist-DBwNzi3C.js","./dist-CtsanegT.js","./dist-bBwmhqty.js","./dist-Btv5Rh1v.js","./dist-Dcqqg9UU.js","./dist-sMh6mJ2d.js","./dist-CoCQUAeM.js","./dist-Gqv0jSNr.js","./stex-jWatZkll.js","./toDate-DETS9bBd.js","./cjs-CH5Rj0g8.js","./_baseProperty-NKyJO2oh.js","./debounce-B3mjKxHe.js","./now-6sUe0ZdD.js","./toInteger-CDcO32Gx.js","./database-zap-k4ePIFAU.js","./main-U5Goe76G.js","./cells-jmgGt1lS.css","./CellStatus-CZlcjSUO.js","./multi-icon-jM74Rbvg.js","./multi-icon-pwGWVz3d.css","./useDateFormatter-CqhdUl2n.js","./context-BfYAMNLF.js","./SSRProvider-BIDQNg9Q.js","./en-US-CCVfmA-q.js","./ellipsis-DfDsMPvA.js","./refresh-cw-Dx8TEWFP.js","./workflow-BphwJiK3.js","./CellStatus-2Psjnl5F.css","./empty-state-B8Cxr9nj.js","./cell-link-B9b7J8QK.js","./ImperativeModal-BNN1HA7x.js","./alert-dialog-BW4srmS0.js","./dialog-eb-NieZw.js","./input-DUrq2DiR.js","./useDebounce-7iEVSqwM.js","./numbers-D7O23mOZ.js","./useNumberFormatter-Db6Vjve5.js","./usePress-C__vuri5.js","./runs-YUGrkyfE.js","./react-vega-BL1HBBjq.js","./precisionRound-CU2C3Vxx.js","./defaultLocale-JieDVWC_.js","./linear-BWciPXnd.js","./timer-B6DpdVnC.js","./init-DRQmrFIb.js","./time-DkuObi5n.js","./defaultLocale-BLne0bXb.js","./range-1DwpgXvM.js","./vega-loader.browser-DXARUlxo.js","./treemap-CZF0Enj1.js","./path-D7fidI_g.js","./colors-DUsH-HF1.js","./ordinal-DG_POl79.js","./arc-D1owqr0z.js","./math-BJjKGmt3.js","./array-Cf4PUXPA.js","./step-CVy5FnKg.js","./line-BA7eTS55.js","./chevron-right--18M_6o9.js","./circle-check-DquVD4wZ.js","./circle-play-EowqxNIC.js","./react-resizable-panels.browser.esm-Da3ksQXL.js","./bundle.esm-i_UbZC0w.js"])))=>i.map(i=>d[i]);
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-ZmTK25f3.js";import{t as _}from"./spinner-DA8-7wQv.js";import{t as p}from"./preload-helper-D2MJg03u.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-U3RlLbPJ.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,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,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,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115]),import.meta.url).then(t=>({default:t.Tracing}))),c=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s,{}),children:(0,r.jsx)(o,{})}),t[0]=e):e=t[0],e},s=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"flex flex-col items-center justify-center h-full",children:(0,r.jsx)(_,{})}),t[0]=e):e=t[0],e}})();export{u as __tla,c as default};
import{s as L}from"./chunk-LvLJmgfZ.js";import{d as ee,p as te,u as O}from"./useEvent-BhXAndur.js";import{t as le}from"./react-Bj1aDYRI.js";import{$n as re,W as A,k as se,qn as ae}from"./cells-DPp5cDaO.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import{t as ne}from"./jsx-runtime-ZmTK25f3.js";import{t as oe}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{t as ce}from"./createLucideIcon-BCdY6lG5.js";import{n as de,r as U}from"./CellStatus-CZlcjSUO.js";import{r as me}from"./x-ZP5cObgf.js";import{t as pe}from"./chevron-right--18M_6o9.js";import{t as ue}from"./circle-check-DquVD4wZ.js";import{t as he}from"./circle-play-EowqxNIC.js";import"./dist-bBwmhqty.js";import"./dist-Btv5Rh1v.js";import"./dist-Dcqqg9UU.js";import"./dist-sMh6mJ2d.js";import"./dist-CoCQUAeM.js";import"./session-BOFn9QrD.js";import{r as fe}from"./useTheme-DQozhcp1.js";import"./Combination-BAEdC-rz.js";import{t as V}from"./tooltip-CMQz28hC.js";import"./vega-loader.browser-DXARUlxo.js";import{r as xe,t as ve}from"./react-vega-BL1HBBjq.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{t as ge}from"./cell-link-B9b7J8QK.js";import{t as je}from"./bundle.esm-i_UbZC0w.js";import{n as ye,r as Se,t as W}from"./react-resizable-panels.browser.esm-Da3ksQXL.js";import{t as Ie}from"./empty-state-B8Cxr9nj.js";import"./multi-icon-jM74Rbvg.js";import{t as be}from"./clear-button-DMZhBF9S.js";import{n as Ne,t as Te}from"./runs-YUGrkyfE.js";var we=ce("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),q=ie(),z=L(le(),1);const Y="hoveredCellId",G="cellHover";var ke="cellNum",J="cell",F="startTimestamp",K="endTimestamp",X="status";function Re(t,e,l,i){let n="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:i==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:Y,bind:{element:`#${e}`}},{name:G,select:{type:"point",on:"mouseover",fields:[J],clear:"mouseout"}}],height:{step:l==="sideBySide"?26:21},encoding:{y:{field:ke,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:l==="sideBySide"?null:void 0},x:{field:F,type:"temporal",axis:{orient:"top",title:null}},x2:{field:K,type:"temporal"},tooltip:[{field:F,type:"temporal",timeUnit:n,title:"Start"},{field:K,type:"temporal",timeUnit:n,title:"End"}],size:{value:{expr:`${Y} == toString(datum.${J}) ? 19.5 : 18`}},color:{field:X,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${X} === 'queued' ? 9999999999999 : datum.${F}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function Z(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var r=L(ne(),1),Q=te(new Map);const _e=()=>{let t=(0,q.c)(32),{runIds:e,runMap:l}=O(Te),i=O(Q),{clearRuns:n}=Ne(),{theme:o}=fe(),[a,w]=(0,z.useState)("above"),u;t[0]===a?u=t[1]:(u=()=>{w(a==="above"?"sideBySide":"above")},t[0]=a,t[1]=u);let d=u;if(e.length===0){let s;return t[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,r.jsx)(Ie,{title:"No traces",description:(0,r.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,r.jsx)(re,{})}),t[2]=s):s=t[2],s}let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=(0,r.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=m):m=t[3];let x=a==="sideBySide",p;t[4]!==x||t[5]!==d?(p=(0,r.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[m,(0,r.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:d,defaultChecked:x,className:"h-3 cursor-pointer"})]}),t[4]=x,t[5]=d,t[6]=p):p=t[6];let c;t[7]===n?c=t[8]:(c=(0,r.jsx)(be,{dataTestId:"clear-traces-button",onClick:n}),t[7]=n,t[8]=c);let h;t[9]!==p||t[10]!==c?(h=(0,r.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[p,c]}),t[9]=p,t[10]=c,t[11]=h):h=t[11];let v;if(t[12]!==a||t[13]!==i||t[14]!==e||t[15]!==l||t[16]!==o){let s;t[18]!==a||t[19]!==i||t[20]!==l||t[21]!==o?(s=(N,T)=>{let b=l.get(N);return b?(0,r.jsx)(Me,{run:b,isExpanded:i.get(b.runId),isMostRecentRun:T===0,chartPosition:a,theme:o},b.runId):null},t[18]=a,t[19]=i,t[20]=l,t[21]=o,t[22]=s):s=t[22],v=e.map(s),t[12]=a,t[13]=i,t[14]=e,t[15]=l,t[16]=o,t[17]=v}else v=t[17];let g;t[23]===v?g=t[24]:(g=(0,r.jsx)("div",{className:"flex flex-col gap-3",children:v}),t[23]=v,t[24]=g);let j;t[25]!==h||t[26]!==g?(j=(0,r.jsx)(W,{defaultSize:50,minSize:30,maxSize:80,children:(0,r.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[h,g]})}),t[25]=h,t[26]=g,t[27]=j):j=t[27];let I;t[28]===Symbol.for("react.memo_cache_sentinel")?(I=(0,r.jsx)(Se,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[28]=I):I=t[28];let f;t[29]===Symbol.for("react.memo_cache_sentinel")?(f=(0,r.jsx)(W,{defaultSize:50,children:(0,r.jsx)("div",{})}),t[29]=f):f=t[29];let y;return t[30]===j?y=t[31]:(y=(0,r.jsxs)(ye,{direction:"horizontal",className:"h-full",children:[j,I,f]}),t[30]=j,t[31]=y),y};var Me=({run:t,isMostRecentRun:e,chartPosition:l,isExpanded:i,theme:n})=>{let o=ee(Q);i??(i=e);let a=()=>{o(d=>{let m=new Map(d);return m.set(t.runId,!i),m})},w=(0,r.jsx)(i?me:pe,{height:16,className:"inline"}),u=(0,r.jsxs)("span",{className:"text-sm cursor-pointer",onClick:a,children:["Run - ",A(t.runStartTime),w]});return i?(0,r.jsx)($e,{run:t,chartPosition:l,theme:n,title:u},t.runId):(0,r.jsx)("div",{className:"flex flex-col",children:(0,r.jsx)("pre",{className:"font-mono font-semibold",children:u})},t.runId)},$e=t=>{let e=(0,q.c)(40),{run:l,chartPosition:i,theme:n,title:o}=t,[a,w]=(0,z.useState)(),u=(0,z.useRef)(null),{ref:d,width:m}=je(),x=m===void 0?300:m,p=se(),c,h;if(e[0]!==p||e[1]!==i||e[2]!==l.cellRuns||e[3]!==l.runId||e[4]!==n){let k=[...l.cellRuns.values()].map(S=>{let R=S.elapsedTime??0;return{cell:S.cellId,cellNum:p.inOrderIds.indexOf(S.cellId),startTimestamp:Z(S.startTime),endTimestamp:Z(S.startTime+R),elapsedTime:U(R*1e3),status:S.status}});c=`hiddenInputElement-${l.runId}`,h=xe(Re(k,c,i,n)),e[0]=p,e[1]=i,e[2]=l.cellRuns,e[3]=l.runId,e[4]=n,e[5]=c,e[6]=h}else c=e[5],h=e[6];let v=h.spec,g=n==="dark"?"dark":void 0,j=x-50,I=i==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==I?(f={theme:g,width:j,height:I,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=I,e[10]=f):f=e[10];let y;e[11]!==f||e[12]!==v?(y={ref:u,spec:v,options:f},e[11]=f,e[12]=v,e[13]=y):y=e[13];let s=ve(y),N;e[14]===(s==null?void 0:s.view)?N=e[15]:(N=()=>{let k=[{signalName:G,handler:(S,R)=>{var H;let C=(H=R.cell)==null?void 0:H[0];w(C??null)}}];return k.forEach(S=>{let{signalName:R,handler:C}=S;s==null||s.view.addSignalListener(R,C)}),()=>{k.forEach(S=>{let{signalName:R,handler:C}=S;s==null||s.view.removeSignalListener(R,C)})}},e[14]=s==null?void 0:s.view,e[15]=N);let T;e[16]===s?T=e[17]:(T=[s],e[16]=s,e[17]=T),(0,z.useEffect)(N,T);let b;e[18]!==c||e[19]!==a||e[20]!==l?(b=(0,r.jsx)(ze,{run:l,hoveredCellId:a,hiddenInputElementId:c}),e[18]=c,e[19]=a,e[20]=l,e[21]=b):b=e[21];let _=b,D=i==="sideBySide"?"-mt-0.5 flex-1":"",E;e[22]===Symbol.for("react.memo_cache_sentinel")?(E=(0,r.jsx)(z.Suspense,{children:(0,r.jsx)("div",{ref:u})}),e[22]=E):E=e[22];let P;e[23]!==d||e[24]!==D?(P=(0,r.jsx)("div",{className:D,ref:d,children:E}),e[23]=d,e[24]=D,e[25]=P):P=e[25];let M=P;if(i==="above"){let k;e[26]!==M||e[27]!==o||e[28]!==_?(k=(0,r.jsxs)("pre",{className:"font-mono font-semibold",children:[o,M,_]}),e[26]=M,e[27]=o,e[28]=_,e[29]=k):k=e[29];let S;return e[30]!==l.runId||e[31]!==k?(S=(0,r.jsx)("div",{className:"flex flex-col",children:k},l.runId),e[30]=l.runId,e[31]=k,e[32]=S):S=e[32],S}let $;e[33]!==o||e[34]!==_?($=(0,r.jsxs)("pre",{className:"font-mono font-semibold",children:[o,_]}),e[33]=o,e[34]=_,e[35]=$):$=e[35];let B;return e[36]!==M||e[37]!==l.runId||e[38]!==$?(B=(0,r.jsxs)("div",{className:"flex flex-row",children:[$,M]},l.runId),e[36]=M,e[37]=l.runId,e[38]=$,e[39]=B):B=e[39],B},ze=t=>{let e=(0,q.c)(12),{run:l,hoveredCellId:i,hiddenInputElementId:n}=t,o=(0,z.useRef)(null),a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=c=>{o.current&&(o.current.value=String(c),o.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=a):a=e[0];let w=a,u=i||"",d;e[1]!==n||e[2]!==u?(d=(0,r.jsx)("input",{type:"text",id:n,defaultValue:u,hidden:!0,ref:o}),e[1]=n,e[2]=u,e[3]=d):d=e[3];let m;e[4]===l.cellRuns?m=e[5]:(m=[...l.cellRuns.values()],e[4]=l.cellRuns,e[5]=m);let x;e[6]!==i||e[7]!==m?(x=m.map(c=>(0,r.jsx)(Ee,{cellRun:c,hovered:c.cellId===i,dispatchHoverEvent:w},c.cellId)),e[6]=i,e[7]=m,e[8]=x):x=e[8];let p;return e[9]!==d||e[10]!==x?(p=(0,r.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[d,x]}),e[9]=d,e[10]=x,e[11]=p):p=e[11],p},Ce={success:(0,r.jsx)(ue,{color:"green",size:14}),running:(0,r.jsx)(he,{color:"var(--blue-10)",size:14}),error:(0,r.jsx)(ae,{color:"red",size:14}),queued:(0,r.jsx)(we,{color:"grey",size:14})},Ee=t=>{let e=(0,q.c)(39),{cellRun:l,hovered:i,dispatchHoverEvent:n}=t,o;e[0]===l.elapsedTime?o=e[1]:(o=l.elapsedTime?U(l.elapsedTime*1e3):"-",e[0]=l.elapsedTime,e[1]=o);let a=o,w;e[2]!==l.elapsedTime||e[3]!==a?(w=l.elapsedTime?(0,r.jsxs)("span",{children:["This cell took ",(0,r.jsx)(de,{elapsedTime:a})," to run"]}):(0,r.jsx)("span",{children:"This cell has not been run"}),e[2]=l.elapsedTime,e[3]=a,e[4]=w):w=e[4];let u=w,d;e[5]!==l.cellId||e[6]!==n?(d=()=>{n(l.cellId)},e[5]=l.cellId,e[6]=n,e[7]=d):d=e[7];let m=d,x;e[8]===n?x=e[9]:(x=()=>{n(null)},e[8]=n,e[9]=x);let p=x,c=i&&"bg-(--gray-3) opacity-100",h;e[10]===c?h=e[11]:(h=oe("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",c),e[10]=c,e[11]=h);let v;e[12]===l.startTime?v=e[13]:(v=A(l.startTime),e[12]=l.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,r.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===l.cellId?j=e[17]:(j=(0,r.jsxs)("span",{className:"text-(--gray-10) w-16",children:["(",(0,r.jsx)(ge,{cellId:l.cellId}),")"]}),e[16]=l.cellId,e[17]=j);let I;e[18]===l.code?I=e[19]:(I=(0,r.jsx)("span",{className:"w-40 truncate -ml-1",children:l.code}),e[18]=l.code,e[19]=I);let f;e[20]===a?f=e[21]:(f=(0,r.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:a}),e[20]=a,e[21]=f);let y;e[22]!==u||e[23]!==f?(y=(0,r.jsx)(V,{content:u,children:f}),e[22]=u,e[23]=f,e[24]=y):y=e[24];let s=Ce[l.status],N;e[25]!==l.status||e[26]!==s?(N=(0,r.jsx)(V,{content:l.status,children:s}),e[25]=l.status,e[26]=s,e[27]=N):N=e[27];let T;e[28]!==y||e[29]!==N?(T=(0,r.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[y,N]}),e[28]=y,e[29]=N,e[30]=T):T=e[30];let b;return e[31]!==m||e[32]!==p||e[33]!==I||e[34]!==T||e[35]!==h||e[36]!==g||e[37]!==j?(b=(0,r.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:p,children:[g,j,I,T]}),e[31]=m,e[32]=p,e[33]=I,e[34]=T,e[35]=h,e[36]=g,e[37]=j,e[38]=b):b=e[38],b};export{_e as Tracing};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);export{t};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);export{t};

Sorry, the diff of this file is too big to display

function C(n){var r=0,u=n.children,i=u&&u.length;if(!i)r=1;else for(;--i>=0;)r+=u[i].value;n.value=r}function D(){return this.eachAfter(C)}function F(n,r){let u=-1;for(let i of this)n.call(r,i,++u,this);return this}function G(n,r){for(var u=this,i=[u],e,o,a=-1;u=i.pop();)if(n.call(r,u,++a,this),e=u.children)for(o=e.length-1;o>=0;--o)i.push(e[o]);return this}function H(n,r){for(var u=this,i=[u],e=[],o,a,h,l=-1;u=i.pop();)if(e.push(u),o=u.children)for(a=0,h=o.length;a<h;++a)i.push(o[a]);for(;u=e.pop();)n.call(r,u,++l,this);return this}function J(n,r){let u=-1;for(let i of this)if(n.call(r,i,++u,this))return i}function K(n){return this.eachAfter(function(r){for(var u=+n(r.data)||0,i=r.children,e=i&&i.length;--e>=0;)u+=i[e].value;r.value=u})}function N(n){return this.eachBefore(function(r){r.children&&r.children.sort(n)})}function P(n){for(var r=this,u=Q(r,n),i=[r];r!==u;)r=r.parent,i.push(r);for(var e=i.length;n!==u;)i.splice(e,0,n),n=n.parent;return i}function Q(n,r){if(n===r)return n;var u=n.ancestors(),i=r.ancestors(),e=null;for(n=u.pop(),r=i.pop();n===r;)e=n,n=u.pop(),r=i.pop();return e}function U(){for(var n=this,r=[n];n=n.parent;)r.push(n);return r}function V(){return Array.from(this)}function W(){var n=[];return this.eachBefore(function(r){r.children||n.push(r)}),n}function X(){var n=this,r=[];return n.each(function(u){u!==n&&r.push({source:u.parent,target:u})}),r}function*Y(){var n=this,r,u=[n],i,e,o;do for(r=u.reverse(),u=[];n=r.pop();)if(yield n,i=n.children)for(e=0,o=i.length;e<o;++e)u.push(i[e]);while(u.length)}function I(n,r){n instanceof Map?(n=[void 0,n],r===void 0&&(r=S)):r===void 0&&(r=$);for(var u=new A(n),i,e=[u],o,a,h,l;i=e.pop();)if((a=r(i.data))&&(l=(a=Array.from(a)).length))for(i.children=a,h=l-1;h>=0;--h)e.push(o=a[h]=new A(a[h])),o.parent=i,o.depth=i.depth+1;return u.eachBefore(O)}function Z(){return I(this).eachBefore(_)}function $(n){return n.children}function S(n){return Array.isArray(n)?n[1]:null}function _(n){n.data.value!==void 0&&(n.value=n.data.value),n.data=n.data.data}function O(n){var r=0;do n.height=r;while((n=n.parent)&&n.height<++r)}function A(n){this.data=n,this.depth=this.height=0,this.parent=null}A.prototype=I.prototype={constructor:A,count:D,each:F,eachAfter:H,eachBefore:G,find:J,sum:K,sort:N,path:P,ancestors:U,descendants:V,leaves:W,links:X,copy:Z,[Symbol.iterator]:Y};function nn(n){return n==null?null:E(n)}function E(n){if(typeof n!="function")throw Error();return n}function m(){return 0}function M(n){return function(){return n}}function L(n){n.x0=Math.round(n.x0),n.y0=Math.round(n.y0),n.x1=Math.round(n.x1),n.y1=Math.round(n.y1)}function R(n,r,u,i,e){for(var o=n.children,a,h=-1,l=o.length,v=n.value&&(i-r)/n.value;++h<l;)a=o[h],a.y0=u,a.y1=e,a.x0=r,a.x1=r+=a.value*v}function b(n,r,u,i,e){for(var o=n.children,a,h=-1,l=o.length,v=n.value&&(e-u)/n.value;++h<l;)a=o[h],a.x0=r,a.x1=i,a.y0=u,a.y1=u+=a.value*v}var j=(1+Math.sqrt(5))/2;function q(n,r,u,i,e,o){for(var a=[],h=r.children,l,v,f=0,y=0,t=h.length,s,p,d=r.value,c,g,B,w,T,k,x;f<t;){s=e-u,p=o-i;do c=h[y++].value;while(!c&&y<t);for(g=B=c,k=Math.max(p/s,s/p)/(d*n),x=c*c*k,T=Math.max(B/x,x/g);y<t;++y){if(c+=v=h[y].value,v<g&&(g=v),v>B&&(B=v),x=c*c*k,w=Math.max(B/x,x/g),w>T){c-=v;break}T=w}a.push(l={value:c,dice:s<p,children:h.slice(f,y)}),l.dice?R(l,u,i,e,d?i+=p*c/d:o):b(l,u,i,d?u+=s*c/d:e,o),d-=c,f=y}return a}var z=(function n(r){function u(i,e,o,a,h){q(r,i,e,o,a,h)}return u.ratio=function(i){return n((i=+i)>1?i:1)},u})(j);function rn(){var n=z,r=!1,u=1,i=1,e=[0],o=m,a=m,h=m,l=m,v=m;function f(t){return t.x0=t.y0=0,t.x1=u,t.y1=i,t.eachBefore(y),e=[0],r&&t.eachBefore(L),t}function y(t){var s=e[t.depth],p=t.x0+s,d=t.y0+s,c=t.x1-s,g=t.y1-s;c<p&&(p=c=(p+c)/2),g<d&&(d=g=(d+g)/2),t.x0=p,t.y0=d,t.x1=c,t.y1=g,t.children&&(s=e[t.depth+1]=o(t)/2,p+=v(t)-s,d+=a(t)-s,c-=h(t)-s,g-=l(t)-s,c<p&&(p=c=(p+c)/2),g<d&&(d=g=(d+g)/2),n(t,p,d,c,g))}return f.round=function(t){return arguments.length?(r=!!t,f):r},f.size=function(t){return arguments.length?(u=+t[0],i=+t[1],f):[u,i]},f.tile=function(t){return arguments.length?(n=E(t),f):n},f.padding=function(t){return arguments.length?f.paddingInner(t).paddingOuter(t):f.paddingInner()},f.paddingInner=function(t){return arguments.length?(o=typeof t=="function"?t:M(+t),f):o},f.paddingOuter=function(t){return arguments.length?f.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):f.paddingTop()},f.paddingTop=function(t){return arguments.length?(a=typeof t=="function"?t:M(+t),f):a},f.paddingRight=function(t){return arguments.length?(h=typeof t=="function"?t:M(+t),f):h},f.paddingBottom=function(t){return arguments.length?(l=typeof t=="function"?t:M(+t),f):l},f.paddingLeft=function(t){return arguments.length?(v=typeof t=="function"?t:M(+t),f):v},f}export{b as a,m as c,A as d,O as f,z as i,M as l,j as n,R as o,I as p,q as r,L as s,rn as t,nn as u};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as e}from"./chunk-FWNWRKHM-DzIkWreD.js";export{e as createTreemapServices};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);export{t};
var e={};function c(a){if(a.eatSpace())return null;var r=a.sol(),n=a.next();if(n==="\\")return a.match("fB")||a.match("fR")||a.match("fI")||a.match("u")||a.match("d")||a.match("%")||a.match("&")?"string":a.match("m[")?(a.skipTo("]"),a.next(),"string"):a.match("s+")||a.match("s-")?(a.eatWhile(/[\d-]/),"string"):((a.match("(")||a.match("*("))&&a.eatWhile(/[\w-]/),"string");if(r&&(n==="."||n==="'")&&a.eat("\\")&&a.eat('"'))return a.skipToEnd(),"comment";if(r&&n==="."){if(a.match("B ")||a.match("I ")||a.match("R "))return"attribute";if(a.match("TH ")||a.match("SH ")||a.match("SS ")||a.match("HP "))return a.skipToEnd(),"quote";if(a.match(/[A-Z]/)&&a.match(/[A-Z]/)||a.match(/[a-z]/)&&a.match(/[a-z]/))return"attribute"}a.eatWhile(/[\w-]/);var t=a.current();return e.hasOwnProperty(t)?e[t]:null}function h(a,r){return(r.tokens[0]||c)(a,r)}const m={name:"troff",startState:function(){return{tokens:[]}},token:function(a,r){return h(a,r)}};export{m as t};
import{t as o}from"./troff-BGDyQn9x.js";export{o as troff};
import{t}from"./ttcn-cfg-CQMSrhCz.js";export{t as ttcnCfg};
function i(e){for(var t={},T=e.split(" "),E=0;E<T.length;++E)t[T[E]]=!0;return t}var I={name:"ttcn-cfg",keywords:i("Yes No LogFile FileMask ConsoleMask AppendFile TimeStampFormat LogEventTypes SourceInfoFormat LogEntityName LogSourceInfo DiskFullAction LogFileNumber LogFileSize MatchingHints Detailed Compact SubCategories Stack Single None Seconds DateTime Time Stop Error Retry Delete TCPPort KillTimer NumHCs UnixSocketsEnabled LocalAddress"),fileNCtrlMaskOptions:i("TTCN_EXECUTOR TTCN_ERROR TTCN_WARNING TTCN_PORTEVENT TTCN_TIMEROP TTCN_VERDICTOP TTCN_DEFAULTOP TTCN_TESTCASE TTCN_ACTION TTCN_USER TTCN_FUNCTION TTCN_STATISTICS TTCN_PARALLEL TTCN_MATCHING TTCN_DEBUG EXECUTOR ERROR WARNING PORTEVENT TIMEROP VERDICTOP DEFAULTOP TESTCASE ACTION USER FUNCTION STATISTICS PARALLEL MATCHING DEBUG LOG_ALL LOG_NOTHING ACTION_UNQUALIFIED DEBUG_ENCDEC DEBUG_TESTPORT DEBUG_UNQUALIFIED DEFAULTOP_ACTIVATE DEFAULTOP_DEACTIVATE DEFAULTOP_EXIT DEFAULTOP_UNQUALIFIED ERROR_UNQUALIFIED EXECUTOR_COMPONENT EXECUTOR_CONFIGDATA EXECUTOR_EXTCOMMAND EXECUTOR_LOGOPTIONS EXECUTOR_RUNTIME EXECUTOR_UNQUALIFIED FUNCTION_RND FUNCTION_UNQUALIFIED MATCHING_DONE MATCHING_MCSUCCESS MATCHING_MCUNSUCC MATCHING_MMSUCCESS MATCHING_MMUNSUCC MATCHING_PCSUCCESS MATCHING_PCUNSUCC MATCHING_PMSUCCESS MATCHING_PMUNSUCC MATCHING_PROBLEM MATCHING_TIMEOUT MATCHING_UNQUALIFIED PARALLEL_PORTCONN PARALLEL_PORTMAP PARALLEL_PTC PARALLEL_UNQUALIFIED PORTEVENT_DUALRECV PORTEVENT_DUALSEND PORTEVENT_MCRECV PORTEVENT_MCSEND PORTEVENT_MMRECV PORTEVENT_MMSEND PORTEVENT_MQUEUE PORTEVENT_PCIN PORTEVENT_PCOUT PORTEVENT_PMIN PORTEVENT_PMOUT PORTEVENT_PQUEUE PORTEVENT_STATE PORTEVENT_UNQUALIFIED STATISTICS_UNQUALIFIED STATISTICS_VERDICT TESTCASE_FINISH TESTCASE_START TESTCASE_UNQUALIFIED TIMEROP_GUARD TIMEROP_READ TIMEROP_START TIMEROP_STOP TIMEROP_TIMEOUT TIMEROP_UNQUALIFIED USER_UNQUALIFIED VERDICTOP_FINAL VERDICTOP_GETVERDICT VERDICTOP_SETVERDICT VERDICTOP_UNQUALIFIED WARNING_UNQUALIFIED"),externalCommands:i("BeginControlPart EndControlPart BeginTestCase EndTestCase"),multiLineStrings:!0},U=I.keywords,a=I.fileNCtrlMaskOptions,R=I.externalCommands,S=I.multiLineStrings,l=I.indentStatements!==!1,A=/[\|]/,n;function P(e,t){var T=e.next();if(T=='"'||T=="'")return t.tokenize=L(T),t.tokenize(e,t);if(/[:=]/.test(T))return n=T,"punctuation";if(T=="#")return e.skipToEnd(),"comment";if(/\d/.test(T))return e.eatWhile(/[\w\.]/),"number";if(A.test(T))return e.eatWhile(A),"operator";if(T=="[")return e.eatWhile(/[\w_\]]/),"number";e.eatWhile(/[\w\$_]/);var E=e.current();return U.propertyIsEnumerable(E)?"keyword":a.propertyIsEnumerable(E)?"atom":R.propertyIsEnumerable(E)?"deleted":"variable"}function L(e){return function(t,T){for(var E=!1,N,_=!1;(N=t.next())!=null;){if(N==e&&!E){var C=t.peek();C&&(C=C.toLowerCase(),(C=="b"||C=="h"||C=="o")&&t.next()),_=!0;break}E=!E&&N=="\\"}return(_||!(E||S))&&(T.tokenize=null),"string"}}function O(e,t,T,E,N){this.indented=e,this.column=t,this.type=T,this.align=E,this.prev=N}function o(e,t,T){var E=e.indented;return e.context&&e.context.type=="statement"&&(E=e.context.indented),e.context=new O(E,t,T,null,e.context)}function r(e){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const s={name:"ttcn",startState:function(){return{tokenize:null,context:new O(0,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var T=t.context;if(e.sol()&&(T.align??(T.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;n=null;var E=(t.tokenize||P)(e,t);if(E=="comment")return E;if(T.align??(T.align=!0),(n==";"||n==":"||n==",")&&T.type=="statement")r(t);else if(n=="{")o(t,e.column(),"}");else if(n=="[")o(t,e.column(),"]");else if(n=="(")o(t,e.column(),")");else if(n=="}"){for(;T.type=="statement";)T=r(t);for(T.type=="}"&&(T=r(t));T.type=="statement";)T=r(t)}else n==T.type?r(t):l&&((T.type=="}"||T.type=="top")&&n!=";"||T.type=="statement"&&n=="newstatement")&&o(t,e.column(),"statement");return t.startOfLine=!1,E},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"#"}}};export{s as t};
import{t}from"./ttcn-De1OdISX.js";export{t as ttcn};
function o(t){for(var e={},n=t.split(" "),r=0;r<n.length;++r)e[n[r]]=!0;return e}var i={name:"ttcn",keywords:o("activate address alive all alt altstep and and4b any break case component const continue control deactivate display do else encode enumerated except exception execute extends extension external for from function goto group if import in infinity inout interleave label language length log match message mixed mod modifies module modulepar mtc noblock not not4b nowait of on optional or or4b out override param pattern port procedure record recursive rem repeat return runs select self sender set signature system template testcase to type union value valueof var variant while with xor xor4b"),builtin:o("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue decomp decvalue float2int float2str hex2bit hex2int hex2oct hex2str int2bit int2char int2float int2hex int2oct int2str int2unichar isbound ischosen ispresent isvalue lengthof log2str oct2bit oct2char oct2hex oct2int oct2str regexp replace rnd sizeof str2bit str2float str2hex str2int str2oct substr unichar2int unichar2char enum2int"),types:o("anytype bitstring boolean char charstring default float hexstring integer objid octetstring universal verdicttype timer"),timerOps:o("read running start stop timeout"),portOps:o("call catch check clear getcall getreply halt raise receive reply send trigger"),configOps:o("create connect disconnect done kill killed map unmap"),verdictOps:o("getverdict setverdict"),sutOps:o("action"),functionOps:o("apply derefers refers"),verdictConsts:o("error fail inconc none pass"),booleanConsts:o("true false"),otherConsts:o("null NULL omit"),visibilityModifiers:o("private public friend"),templateMatch:o("complement ifpresent subset superset permutation"),multiLineStrings:!0},f=[];function p(t){if(t)for(var e in t)t.hasOwnProperty(e)&&f.push(e)}p(i.keywords),p(i.builtin),p(i.timerOps),p(i.portOps);var y=i.keywords||{},v=i.builtin||{},x=i.timerOps||{},g=i.portOps||{},k=i.configOps||{},O=i.verdictOps||{},E=i.sutOps||{},w=i.functionOps||{},I=i.verdictConsts||{},z=i.booleanConsts||{},C=i.otherConsts||{},L=i.types||{},S=i.visibilityModifiers||{},M=i.templateMatch||{},T=i.multiLineStrings,W=i.indentStatements!==!1,d=/[+\-*&@=<>!\/]/,a;function D(t,e){var n=t.next();if(n=='"'||n=="'")return e.tokenize=N(n),e.tokenize(t,e);if(/[\[\]{}\(\),;\\:\?\.]/.test(n))return a=n,"punctuation";if(n=="#")return t.skipToEnd(),"atom";if(n=="%")return t.eatWhile(/\b/),"atom";if(/\d/.test(n))return t.eatWhile(/[\w\.]/),"number";if(n=="/"){if(t.eat("*"))return e.tokenize=b,b(t,e);if(t.eat("/"))return t.skipToEnd(),"comment"}if(d.test(n))return n=="@"&&(t.match("try")||t.match("catch")||t.match("lazy"))?"keyword":(t.eatWhile(d),"operator");t.eatWhile(/[\w\$_\xa1-\uffff]/);var r=t.current();return y.propertyIsEnumerable(r)?"keyword":v.propertyIsEnumerable(r)?"builtin":x.propertyIsEnumerable(r)||k.propertyIsEnumerable(r)||O.propertyIsEnumerable(r)||g.propertyIsEnumerable(r)||E.propertyIsEnumerable(r)||w.propertyIsEnumerable(r)?"def":I.propertyIsEnumerable(r)||z.propertyIsEnumerable(r)||C.propertyIsEnumerable(r)?"string":L.propertyIsEnumerable(r)?"typeName.standard":S.propertyIsEnumerable(r)?"modifier":M.propertyIsEnumerable(r)?"atom":"variable"}function N(t){return function(e,n){for(var r=!1,l,m=!1;(l=e.next())!=null;){if(l==t&&!r){var s=e.peek();s&&(s=s.toLowerCase(),(s=="b"||s=="h"||s=="o")&&e.next()),m=!0;break}r=!r&&l=="\\"}return(m||!(r||T))&&(n.tokenize=null),"string"}}function b(t,e){for(var n=!1,r;r=t.next();){if(r=="/"&&n){e.tokenize=null;break}n=r=="*"}return"comment"}function h(t,e,n,r,l){this.indented=t,this.column=e,this.type=n,this.align=r,this.prev=l}function u(t,e,n){var r=t.indented;return t.context&&t.context.type=="statement"&&(r=t.context.indented),t.context=new h(r,e,n,null,t.context)}function c(t){var e=t.context.type;return(e==")"||e=="]"||e=="}")&&(t.indented=t.context.indented),t.context=t.context.prev}const _={name:"ttcn",startState:function(){return{tokenize:null,context:new h(0,0,"top",!1),indented:0,startOfLine:!0}},token:function(t,e){var n=e.context;if(t.sol()&&(n.align??(n.align=!1),e.indented=t.indentation(),e.startOfLine=!0),t.eatSpace())return null;a=null;var r=(e.tokenize||D)(t,e);if(r=="comment")return r;if(n.align??(n.align=!0),(a==";"||a==":"||a==",")&&n.type=="statement")c(e);else if(a=="{")u(e,t.column(),"}");else if(a=="[")u(e,t.column(),"]");else if(a=="(")u(e,t.column(),")");else if(a=="}"){for(;n.type=="statement";)n=c(e);for(n.type=="}"&&(n=c(e));n.type=="statement";)n=c(e)}else a==n.type?c(e):W&&((n.type=="}"||n.type=="top")&&a!=";"||n.type=="statement"&&a=="newstatement")&&u(e,t.column(),"statement");return e.startOfLine=!1,r},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:f}};export{_ as t};
var i;function u(e){return RegExp("^(?:"+e.join("|")+")$","i")}u([]);var f=u(["@prefix","@base","a"]),x=/[*+\-<>=&|]/;function p(e,t){var n=e.next();if(i=null,n=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(n=='"'||n=="'")return t.tokenize=s(n),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(n))return i=n,null;if(n=="#")return e.skipToEnd(),"comment";if(x.test(n))return e.eatWhile(x),null;if(n==":")return"operator";if(e.eatWhile(/[_\w\d]/),e.peek()==":")return"variableName.special";var r=e.current();return f.test(r)?"meta":n>="A"&&n<="Z"?"comment":"keyword";var r}function s(e){return function(t,n){for(var r=!1,o;(o=t.next())!=null;){if(o==e&&!r){n.tokenize=p;break}r=!r&&o=="\\"}return"string"}}function c(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function a(e){e.indent=e.context.indent,e.context=e.context.prev}const m={name:"turtle",startState:function(){return{tokenize:p,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&t.context.align==null&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if(n!="comment"&&t.context&&t.context.align==null&&t.context.type!="pattern"&&(t.context.align=!0),i=="(")c(t,")",e.column());else if(i=="[")c(t,"]",e.column());else if(i=="{")c(t,"}",e.column());else if(/[\]\}\)]/.test(i)){for(;t.context&&t.context.type=="pattern";)a(t);t.context&&i==t.context.type&&a(t)}else i=="."&&t.context&&t.context.type=="pattern"?a(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?c(t,"pattern",e.column()):t.context.type=="pattern"&&!t.context.align&&(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t,n){var r=t&&t.charAt(0),o=e.context;if(/[\]\}]/.test(r))for(;o&&o.type=="pattern";)o=o.prev;var l=o&&r==o.type;return o?o.type=="pattern"?o.col:o.align?o.col+(l?0:1):o.indent+(l?0:n.unit):0},languageData:{commentTokens:{line:"#"}}};export{m as t};
import{t}from"./turtle-DNhfxysg.js";export{t as turtle};
import{Hn as o,Wn as r}from"./cells-DPp5cDaO.js";import{t}from"./createLucideIcon-BCdY6lG5.js";import{i as c,n as i,r as p,t as d}from"./file-video-camera-C3wGzBnE.js";import{t as m}from"./file-Ch78NKWp.js";var s=t("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),f=t("folder-archive",[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]]),h=t("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);function u(a){let n=a.split(".").pop();if(n===void 0)return"unknown";switch(n.toLowerCase()){case"py":return"python";case"txt":case"md":case"qmd":return"text";case"png":case"jpg":case"jpeg":case"gif":return"image";case"csv":return"data";case"json":return"json";case"js":case"ts":case"tsx":case"html":case"css":case"toml":case"yaml":case"yml":case"wasm":return"code";case"mp3":case"m4a":case"m4v":case"ogg":case"wav":return"audio";case"mp4":case"webm":case"mkv":return"video";case"pdf":return"pdf";case"zip":case"tar":case"gz":return"zip";default:return"unknown"}}const $={directory:h,python:s,json:c,code:s,text:o,image:i,audio:p,video:d,pdf:s,zip:f,data:r,unknown:m};var e=" ";const v={directory:a=>`os.listdir("${a}")`,python:a=>`with open("${a}", "r") as _f:
${e}...
`,json:a=>`with open("${a}", "r") as _f:
${e}_data = json.load(_f)
`,code:a=>`with open("${a}", "r") as _f:
${e}...
`,text:a=>`with open("${a}", "r") as _f:
${e}...
`,image:a=>`mo.image("${a}")`,audio:a=>`mo.audio("${a}")`,video:a=>`mo.video("${a}")`,pdf:a=>`with open("${a}", "rb") as _f:
${e}...
`,zip:a=>`with open("${a}", "rb") as _f:
${e}...
`,data:a=>`with open("${a}", "r") as _f:
${e}...
`,unknown:a=>`with open("${a}", "r") as _f:
${e}...
`};export{v as n,u as r,$ as t};
import{t as e}from"./createLucideIcon-BCdY6lG5.js";var a=e("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const t={Insert:"insert",Remove:"remove",Rename:"rename"};export{a as n,t};
const s=["vertical","grid","slides"],e=["slides"];export{e as n,s as t};
import{s as A}from"./chunk-LvLJmgfZ.js";import{t as O}from"./react-Bj1aDYRI.js";import{t as _}from"./compiler-runtime-B3qBwwSJ.js";var l=_(),c=A(O(),1),u=1,I=1e4,T=0;function E(){return T=(T+1)%Number.MAX_VALUE,T.toString()}var S=new Map,f=t=>{if(S.has(t))return;let a=setTimeout(()=>{S.delete(t),r({type:"REMOVE_TOAST",toastId:t})},I);S.set(t,a)};const D=(t,a)=>{switch(a.type){case"ADD_TOAST":return{...t,toasts:[a.toast,...t.toasts].slice(0,u)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(s=>s.id===a.toast.id?{...s,...a.toast}:s)};case"DISMISS_TOAST":{let{toastId:s}=a;return s?f(s):t.toasts.forEach(o=>{f(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return a.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==a.toastId)};case"UPSERT_TOAST":return t.toasts.findIndex(s=>s.id===a.toast.id)>-1?{...t,toasts:t.toasts.map(s=>s.id===a.toast.id?{...s,...a.toast}:s)}:{...t,toasts:[a.toast,...t.toasts].slice(0,u)}}};var p=new Set,d={toasts:[]};function r(t){d=D(d,t),p.forEach(a=>{a(d)})}function h({id:t,...a}){let s=t||E(),o=i=>r({type:"UPDATE_TOAST",toast:{...i,id:s}}),e=()=>r({type:"DISMISS_TOAST",toastId:s}),n=i=>r({type:"UPSERT_TOAST",toast:{...i,id:s,open:!0,onOpenChange:m=>{m||e()}}});return r({type:"ADD_TOAST",toast:{...a,id:s,open:!0,onOpenChange:i=>{i||e()}}}),{id:s,dismiss:e,update:o,upsert:n}}function y(){let t=(0,l.c)(5),[a,s]=c.useState(d),o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>(p.add(s),()=>{p.delete(s)}),t[0]=o):o=t[0];let e;t[1]===a?e=t[2]:(e=[a],t[1]=a,t[2]=e),c.useEffect(o,e);let n;return t[3]===a?n=t[4]:(n={...a,dismiss:M},t[3]=a,t[4]=n),n}function M(t){return r({type:"DISMISS_TOAST",toastId:t})}export{y as n,h as t};
import{u as l}from"./useEvent-BhXAndur.js";import{w as s}from"./cells-DPp5cDaO.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-YqBXNpsM.js";import{n as f}from"./html-to-image-CIQqSu-S.js";import{o as c}from"./focus-C1YokgL7.js";var p=i();function u(){let o=(0,p.c)(4),a=l(n),r=c(),{createNewCell:t}=s(),e;return o[0]!==a||o[1]!==t||o[2]!==r?(e=m=>{m.includes("alt")&&f({autoInstantiate:a,createNewCell:t,fromCellId:r}),t({code:m,before:!1,cellId:r??"__end__"})},o[0]=a,o[1]=t,o[2]=r,o[3]=e):e=o[3],e}export{u as t};
import{s as S}from"./chunk-LvLJmgfZ.js";import{n as _}from"./useEvent-BhXAndur.js";import{t as A}from"./react-Bj1aDYRI.js";import{t as D}from"./compiler-runtime-B3qBwwSJ.js";import{t as F}from"./invariant-CAG_dYON.js";var E=D(),y=S(A(),1),a={error(e,s){return{status:"error",data:s,error:e,isPending:!1,isFetching:!1}},success(e){return{status:"success",data:e,error:void 0,isPending:!1,isFetching:!1}},loading(e){return{status:"loading",data:e,error:void 0,isPending:!1,isFetching:!0}},pending(){return{status:"pending",data:void 0,error:void 0,isPending:!0,isFetching:!0}}};function q(...e){F(e.length>0,"combineAsyncData requires at least one response");let s=()=>{e.forEach(r=>r.refetch())},t=e.find(r=>r.status==="error");if(t!=null&&t.error)return{...a.error(t.error),refetch:s};if(e.every(r=>r.status==="success"))return{...a.success(e.map(r=>r.data)),refetch:s};let n=e.some(r=>r.status==="loading"),v=e.every(r=>r.data!==void 0);return n&&v?{...a.loading(e.map(r=>r.data)),refetch:s}:{...a.pending(),refetch:s}}function w(e,s){let t=(0,E.c)(17),[n,v]=(0,y.useState)(0),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.pending(),t[0]=r):r=t[0];let[o,l]=(0,y.useState)(r),g;t[1]===e?g=t[2]:(g=typeof e=="function"?{fetch:e}:e,t[1]=e,t[2]=g);let c=_(g.fetch),p;t[3]===c?p=t[4]:(p=()=>{let i=new AbortController,f=!1;return l(x),c({previous:()=>{f=!0}}).then(b=>{i.signal.aborted||f||l(a.success(b))}).catch(b=>{i.signal.aborted||l(P=>a.error(b,P.data))}),()=>{i.abort()}},t[3]=c,t[4]=p);let h;t[5]!==s||t[6]!==c||t[7]!==n?(h=[...s,n,c],t[5]=s,t[6]=c,t[7]=n,t[8]=h):h=t[8],(0,y.useEffect)(p,h);let u;t[9]===o?u=t[10]:(u=i=>{let f;typeof i=="function"?(F(o.status==="success"||o.status==="loading","No previous state value."),f=i(o.data)):f=i,l(a.success(f))},t[9]=o,t[10]=u);let d;t[11]===n?d=t[12]:(d=()=>v(n+1),t[11]=n,t[12]=d);let m;return t[13]!==o||t[14]!==u||t[15]!==d?(m={...o,setData:u,refetch:d},t[13]=o,t[14]=u,t[15]=d,t[16]=m):m=t[16],m}function x(e){return e.status==="success"?a.loading(e.data):a.pending()}export{w as n,q as t};
import{s as T}from"./chunk-LvLJmgfZ.js";import{t as N}from"./react-Bj1aDYRI.js";import{t as _}from"./compiler-runtime-B3qBwwSJ.js";import{d as f,s as S}from"./hotkeys-BHHWjLlp.js";import{r as k}from"./constants-B6Cb__3x.js";import{S as C}from"./config-Q0O7_stz.js";import{t as F}from"./createLucideIcon-BCdY6lG5.js";import{P as M}from"./usePress-C__vuri5.js";var A=F("case-sensitive",[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]]),R=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,w=new WeakMap,s=[];function P(t,e){let r=M(t==null?void 0:t[0]),a=e instanceof r.Element?{root:e}:e,l=(a==null?void 0:a.root)??document.body,h=(a==null?void 0:a.shouldUseInert)&&R,m=new Set(t),u=new Set,v=n=>h&&n instanceof r.HTMLElement?n.inert:n.getAttribute("aria-hidden")==="true",o=(n,i)=>{h&&n instanceof r.HTMLElement?n.inert=i:i?n.setAttribute("aria-hidden","true"):(n.removeAttribute("aria-hidden"),n instanceof r.HTMLElement&&(n.inert=!1))},p=n=>{for(let d of n.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))m.add(d);let i=d=>{if(u.has(d)||m.has(d)||d.parentElement&&u.has(d.parentElement)&&d.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let L of m)if(d.contains(L))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i}),x=i(n);if(x===NodeFilter.FILTER_ACCEPT&&b(n),x!==NodeFilter.FILTER_REJECT){let d=c.nextNode();for(;d!=null;)b(d),d=c.nextNode()}},b=n=>{let i=w.get(n)??0;v(n)&&i===0||(i===0&&o(n,!0),u.add(n),w.set(n,i+1))};s.length&&s[s.length-1].disconnect(),p(l);let E=new MutationObserver(n=>{for(let i of n)if(i.type==="childList"&&![...m,...u].some(c=>c.contains(i.target)))for(let c of i.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?m.add(c):c instanceof Element&&p(c)});E.observe(l,{childList:!0,subtree:!0});let y={visibleNodes:m,hiddenNodes:u,observe(){E.observe(l,{childList:!0,subtree:!0})},disconnect(){E.disconnect()}};return s.push(y),()=>{E.disconnect();for(let n of u){let i=w.get(n);i!=null&&(i===1?(o(n,!1),w.delete(n)):w.set(n,i-1))}y===s[s.length-1]?(s.pop(),s.length&&s[s.length-1].observe()):s.splice(s.indexOf(y),1)}}function H(t){let e=s[s.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const I=typeof window<"u"&&window.parent!==window;function K(){new URLSearchParams(window.location.search).has(k.vscode)&&(!I||C()||(f.log("[vscode] Registering VS Code bindings"),W(),D(),q(),z()))}function D(){window.addEventListener("copy",()=>{var t;g({command:"copy",text:((t=window.getSelection())==null?void 0:t.toString())??""})}),window.addEventListener("cut",()=>{var e;let t=((e=window.getSelection())==null?void 0:e.toString())??"";S()&&document.execCommand("insertText",!1,""),g({command:"cut",text:t})}),window.addEventListener("message",async t=>{try{let e=t.data,r=S();switch(e.command){case"paste":if(f.log(`[vscode] Received paste mac=${r}`,e),r){let a=document.activeElement;if(!a){f.warn("[vscode] No active element to paste into"),document.execCommand("insertText",!1,e.text);return}let l=new DataTransfer;l.setData("text/plain",e.text),a.dispatchEvent(new ClipboardEvent("paste",{clipboardData:l}))}else f.log("[vscode] Not pasting on mac");return}}catch(e){f.error("Error in paste message handler",e)}})}function W(){document.addEventListener("keydown",t=>{var e,r;if((t.ctrlKey||t.metaKey)&&t.key==="c"){let a=((e=window.getSelection())==null?void 0:e.toString())??"";f.log("[vscode] Sending copy",a),g({command:"copy",text:a});return}if((t.ctrlKey||t.metaKey)&&t.key==="x"){let a=((r=window.getSelection())==null?void 0:r.toString())??"";S()&&document.execCommand("insertText",!1,""),f.log("[vscode] Sending cut",a),g({command:"cut",text:a});return}if((t.ctrlKey||t.metaKey)&&t.key==="v"){f.log("[vscode] Sending paste"),g({command:"paste"});return}})}function q(){document.addEventListener("click",t=>{let e=t.target;if(e.tagName!=="A")return;let r=e.getAttribute("href");r&&(r.startsWith("http://")||r.startsWith("https://"))&&(t.preventDefault(),g({command:"external_link",url:r}))})}function z(){document.addEventListener("contextmenu",t=>{t.preventDefault(),g({command:"context_menu"})})}function g(t){var e;(e=window.parent)==null||e.postMessage(t,"*")}var O=_(),J=T(N(),1);function U(t){let e=(0,O.c)(6),[r,a]=(0,J.useState)(t),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(!0)},e[0]=l):l=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(!1)},e[1]=h):h=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(V)},e[2]=m):m=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={setTrue:l,setFalse:h,toggle:m},e[3]=u):u=e[3];let v;return e[4]===r?v=e[5]:(v=[r,u],e[4]=r,e[5]=v),v}function V(t){return!t}export{P as a,H as i,K as n,A as o,g as r,U as t};
import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ne,u as x}from"./useEvent-BhXAndur.js";import{Gn as ie,Sn as de,Tn as se,Un as re,Wn as ce,_ as he,dt as G,oi as me,qn as pe,w as ke}from"./cells-DPp5cDaO.js";import{t as fe}from"./compiler-runtime-B3qBwwSJ.js";import{a as ue,o as ye,r as be}from"./utils-YqBXNpsM.js";import{t as xe}from"./jsx-runtime-ZmTK25f3.js";import{r as je}from"./requests-B4FYHTZl.js";import{t as f}from"./createLucideIcon-BCdY6lG5.js";import{n as K,r as V}from"./x-ZP5cObgf.js";import{a as ve,m as Ce}from"./download-os8QlW6l.js";import{t as ge}from"./chevron-right--18M_6o9.js";import{t as Q}from"./circle-plus-haI9GLDP.js";import{t as Ie}from"./code-xml-CgN_Yig7.js";import{t as we}from"./eye-off-AK_9uodG.js";import{n as ze,t as We}from"./play-GLWQQs7F.js";import{t as Me}from"./link-DxicfMbs.js";import{a as _e,n as Se}from"./state-D4T75eZb.js";import{t as Te}from"./trash-2-DDsWrxuJ.js";import{t as Ae}from"./use-toast-BDYuj3zG.js";import{r as Ne}from"./mode-Bn7pdJvO.js";import{a as De,c as Re,n as Be}from"./dialog-eb-NieZw.js";import{n as Ee}from"./ImperativeModal-BNN1HA7x.js";import{t as He}from"./copy-DHrHayPa.js";import{i as Ue}from"./useRunCells-D2HBb4DB.js";import{r as F}from"./html-to-image-CIQqSu-S.js";import{t as qe}from"./label-E64zk6_7.js";import{t as Oe}from"./useDeleteCell-DdRX94yC.js";import{n as Pe,t as Le}from"./icons-CCHmxi8d.js";import{n as $}from"./name-cell-input-Bc7geMVf.js";import{t as J}from"./multi-icon-jM74Rbvg.js";import{t as Fe}from"./useSplitCell-C4khe6eU.js";var X=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),Y=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Z=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Ge=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),ee=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),le=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ke(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ve(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function te(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Qe=fe(),l=ae(xe(),1);function $e(a){let e=(0,Qe.c)(47),{cell:c,closePopover:u}=a,{createNewCell:h,updateCellConfig:d,updateCellName:j,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:T}=ke(),A=Fe(),N=Ue(c==null?void 0:c.cellId),D=!x(he),R=Oe(),{openModal:v}=Ee(),B=ne(Se),E=x(be),y=x(ye),oe=x(Ne),b=x(ue),{saveCellConfig:s}=je();if(!c||oe){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0],t}let{cellId:o,config:n,getEditorView:r,name:m,hasOutput:C,hasConsoleOutput:H,status:U}=c,g;e[1]!==o||e[2]!==n.disabled||e[3]!==s||e[4]!==d?(g=async()=>{let t={disabled:!n.disabled};await s({configs:{[o]:t}}),d({cellId:o,config:t})},e[1]=o,e[2]=n.disabled,e[3]=s,e[4]=d,e[5]=g):g=e[5];let q=g,I;e[6]!==o||e[7]!==n.hide_code||e[8]!==r||e[9]!==s||e[10]!==d?(I=async()=>{let t={hide_code:!n.hide_code};await s({configs:{[o]:t}}),d({cellId:o,config:t});let L=r();L&&(t.hide_code?L.contentDOM.blur():L.focus())},e[6]=o,e[7]=n.hide_code,e[8]=r,e[9]=s,e[10]=d,e[11]=I):I=e[11];let O=I,i=o===me,w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=(0,l.jsx)(We,{size:13,strokeWidth:1.5}),e[12]=w):w=e[12];let P=U==="running"||U==="queued"||U==="disabled-transitively"||n.disabled,k;e[13]===N?k=e[14]:(k=()=>N(),e[13]=N,e[14]=k);let z;return e[15]!==_||e[16]!==E||e[17]!==b||e[18]!==y||e[19]!==D||e[20]!==o||e[21]!==S||e[22]!==u||e[23]!==n.disabled||e[24]!==n.hide_code||e[25]!==h||e[26]!==R||e[27]!==r||e[28]!==H||e[29]!==C||e[30]!==i||e[31]!==T||e[32]!==p||e[33]!==m||e[34]!==v||e[35]!==s||e[36]!==M||e[37]!==W||e[38]!==B||e[39]!==A||e[40]!==P||e[41]!==k||e[42]!==q||e[43]!==O||e[44]!==d||e[45]!==j?(z=[[{icon:w,label:"Run cell",hotkey:"cell.run",hidden:P,redundant:!0,handle:k},{icon:(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!E,handle:()=>{B(t=>(t==null?void 0:t.cellId)===o?null:{cellId:o})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Z,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>A({cellId:o})},{icon:(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=r();t&&se({[o]:t})}},{icon:n.hide_code?(0,l.jsx)(re,{size:13,strokeWidth:1.5}):(0,l.jsx)(we,{size:13,strokeWidth:1.5}),label:n.hide_code?"Show code":"Hide code",handle:O,hotkey:"cell.hideCode"},{icon:n.disabled?(0,l.jsx)(ee,{size:13,strokeWidth:1.5}):(0,l.jsx)(le,{size:13,strokeWidth:1.5}),label:n.disabled?"Enable execution":"Disable execution",handle:q,hidden:i}],[{icon:(0,l.jsx)(Le,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),G(t,{language:"markdown",keepCodeAsIs:!1}),n.hide_code||(await s({configs:{[o]:{hide_code:!0}}}),d({cellId:o,config:{hide_code:!0}}),T({cellId:o})))},hidden:i},{icon:(0,l.jsx)(ce,{size:13,strokeWidth:1.5}),label:"Convert to SQL",handle:()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),G(t,{language:"sql",keepCodeAsIs:!1}))},hidden:i},{icon:(0,l.jsx)(Pe,{}),label:"Toggle as Python",handle:()=>{let t=r();t&&(F({autoInstantiate:y,createNewCell:h}),de(t,"python",{force:!0}))},hidden:i}],[{icon:(0,l.jsxs)(J,{children:[(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),(0,l.jsx)(K,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>h({cellId:o,before:!0}),hidden:i,redundant:!0},{icon:(0,l.jsxs)(J,{children:[(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),(0,l.jsx)(V,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>h({cellId:o,before:!1}),redundant:!0},{icon:(0,l.jsx)(K,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:o,before:!0}),hidden:i},{icon:(0,l.jsx)(V,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:o,before:!1}),hidden:i},{icon:(0,l.jsx)(Ce,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:o,direction:"left"}),hidden:b!=="columns"||i},{icon:(0,l.jsx)(ge,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:o,direction:"right"}),hidden:b!=="columns"||i},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:o,scroll:!1}),hidden:i},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:i},{icon:(0,l.jsx)(ie,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:b!=="columns"||i}],[{icon:(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>ve(o,"result")},{icon:(0,l.jsx)(pe,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||H),handle:()=>{S({cellId:o})}}],[{icon:(0,l.jsx)(Ge,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:Ze,handleHeadless:()=>{v((0,l.jsxs)(Be,{children:[(0,l.jsx)(De,{children:(0,l.jsx)(Re,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(qe,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)($,{placeholder:"cell name",value:m,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),v(null))},onChange:t=>j({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)($,{placeholder:"cell name",value:m,onChange:t=>j({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:i},{icon:(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!te(m),tooltip:te(m)?void 0:"Only named cells can be linked to",handle:async()=>{await He(Ke(m)),Ae({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!D,variant:"danger",icon:(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),handle:()=>{R({cellId:o})}}]].map(Xe).filter(Je),e[15]=_,e[16]=E,e[17]=b,e[18]=y,e[19]=D,e[20]=o,e[21]=S,e[22]=u,e[23]=n.disabled,e[24]=n.hide_code,e[25]=h,e[26]=R,e[27]=r,e[28]=H,e[29]=C,e[30]=i,e[31]=T,e[32]=p,e[33]=m,e[34]=v,e[35]=s,e[36]=M,e[37]=W,e[38]=B,e[39]=A,e[40]=P,e[41]=k,e[42]=q,e[43]=O,e[44]=d,e[45]=j,e[46]=z):z=e[46],z}function Je(a){return a.length>0}function Xe(a){return a.filter(Ye)}function Ye(a){return!a.hidden}function Ze(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Z as a,ee as i,Ve as n,Y as o,le as r,X as s,$e as t};
import{s as c}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-Bj1aDYRI.js";import{t as d}from"./context-BfYAMNLF.js";var s=c(p(),1);function i(r,t){let e=(0,s.useRef)(null);return r&&e.current&&t(r,e.current)&&(r=e.current),e.current=r,r}var u=new Map,f=class{format(r){return this.formatter.format(r)}formatToParts(r){return this.formatter.formatToParts(r)}formatRange(r,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(r,t);if(t<r)throw RangeError("End date must be >= start date");return`${this.formatter.format(r)} \u2013 ${this.formatter.format(t)}`}formatRangeToParts(r,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(r,t);if(t<r)throw RangeError("End date must be >= start date");let e=this.formatter.formatToParts(r),n=this.formatter.formatToParts(t);return[...e.map(o=>({...o,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...n.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let r=this.formatter.resolvedOptions();return g()&&(this.resolvedHourCycle||(this.resolvedHourCycle=T(r.locale,this.options)),r.hourCycle=this.resolvedHourCycle,r.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),r.calendar==="ethiopic-amete-alem"&&(r.calendar="ethioaa"),r}constructor(r,t={}){this.formatter=l(r,t),this.options=t}},y={true:{ja:"h11"},false:{}};function l(r,t={}){if(typeof t.hour12=="boolean"&&v()){t={...t};let o=y[String(t.hour12)][r.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=o??a,delete t.hour12}let e=r+(t?Object.entries(t).sort((o,a)=>o[0]<a[0]?-1:1).join():"");if(u.has(e))return u.get(e);let n=new Intl.DateTimeFormat(r,t);return u.set(e,n),n}var h=null;function v(){return h??(h=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),h}var m=null;function g(){return m??(m=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),m}function T(r,t){if(!t.timeStyle&&!t.hour)return;r=r.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),r+=(r.includes("-u-")?"":"-u")+"-nu-latn";let e=l(r,{...t,timeZone:void 0}),n=parseInt(e.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),o=parseInt(e.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(n===0&&o===23)return"h23";if(n===24&&o===23)return"h24";if(n===0&&o===11)return"h11";if(n===12&&o===11)return"h12";throw Error("Unexpected hour cycle result")}function w(r){r=i(r??{},R);let{locale:t}=d();return(0,s.useMemo)(()=>new f(t,r),[t,r])}function R(r,t){if(r===t)return!0;let e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(let o of e)if(t[o]!==r[o])return!1;return!0}export{f as n,i as r,w as t};
import{s as C}from"./chunk-LvLJmgfZ.js";import{n as b}from"./useEvent-BhXAndur.js";import{t as E}from"./react-Bj1aDYRI.js";import{t as V}from"./compiler-runtime-B3qBwwSJ.js";import{t as S}from"./debounce-B3mjKxHe.js";var v=V(),s=C(E(),1);function T(u,e){let t=(0,v.c)(4),[a,l]=(0,s.useState)(u),n,r;return t[0]!==e||t[1]!==u?(n=()=>{let f=setTimeout(()=>l(u),e);return()=>{clearTimeout(f)}},r=[u,e],t[0]=e,t[1]=u,t[2]=n,t[3]=r):(n=t[2],r=t[3]),(0,s.useEffect)(n,r),a}function x(u){let e=(0,v.c)(18),{initialValue:t,onChange:a,delay:l,disabled:n}=u,[r,f]=(0,s.useState)(t),o=T(r,l||200),i=b(a),c,m;e[0]===t?(c=e[1],m=e[2]):(c=()=>{f(t)},m=[t],e[0]=t,e[1]=c,e[2]=m),(0,s.useEffect)(c,m);let d;e[3]!==o||e[4]!==n||e[5]!==t||e[6]!==i?(d=()=>{n||o!==t&&i(o)},e[3]=o,e[4]=n,e[5]=t,e[6]=i,e[7]=d):d=e[7];let p;if(e[8]!==o||e[9]!==n||e[10]!==i?(p=[o,n,i],e[8]=o,e[9]=n,e[10]=i,e[11]=p):p=e[11],(0,s.useEffect)(d,p),n){let h;return e[12]!==r||e[13]!==a?(h={value:r,debouncedValue:r,onChange:a},e[12]=r,e[13]=a,e[14]=h):h=e[14],h}let g;return e[15]!==o||e[16]!==r?(g={value:r,debouncedValue:o,onChange:f},e[15]=o,e[16]=r,e[17]=g):g=e[17],g}function y(u,e){let t=(0,v.c)(3),a=b(u),l;return t[0]!==e||t[1]!==a?(l=S(a,e),t[0]=e,t[1]=a,t[2]=l):l=t[2],l}export{y as n,x as t};
import{s as a}from"./chunk-LvLJmgfZ.js";import{t as c}from"./react-Bj1aDYRI.js";var o=Object.prototype.hasOwnProperty;function u(t,r,n){for(n of t.keys())if(i(n,r))return n}function i(t,r){var n,e,f;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((e=t.length)===r.length)for(;e--&&i(t[e],r[e]););return e===-1}if(n===Set){if(t.size!==r.size)return!1;for(e of t)if(f=e,f&&typeof f=="object"&&(f=u(r,f),!f)||!r.has(f))return!1;return!0}if(n===Map){if(t.size!==r.size)return!1;for(e of t)if(f=e[0],f&&typeof f=="object"&&(f=u(r,f),!f)||!i(e[1],r.get(f)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),r=new Uint8Array(r);else if(n===DataView){if((e=t.byteLength)===r.byteLength)for(;e--&&t.getInt8(e)===r.getInt8(e););return e===-1}if(ArrayBuffer.isView(t)){if((e=t.byteLength)===r.byteLength)for(;e--&&t[e]===r[e];);return e===-1}if(!n||typeof t=="object"){for(n in e=0,t)if(o.call(t,n)&&++e&&!o.call(r,n)||!(n in r)||!i(t[n],r[n]))return!1;return Object.keys(r).length===e}}return t!==t&&r!==r}var s=a(c(),1);function y(t){let r=s.useRef(t);return i(t,r.current)||(r.current=t),r.current}export{y as t};
import{s as D}from"./chunk-LvLJmgfZ.js";import{i as m,n as u}from"./useEvent-BhXAndur.js";import{_ as p,w as h,y as I}from"./cells-DPp5cDaO.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{t as _}from"./useEventListener-Cb-RVVEn.js";import{t as v}from"./jsx-runtime-ZmTK25f3.js";import{t as w}from"./button-CZ3Cs4qb.js";import{r as y}from"./requests-B4FYHTZl.js";import{t as b}from"./use-toast-BDYuj3zG.js";import{n as x}from"./renderShortcut-BckyRbYt.js";var j=C(),d=D(v(),1);const f=e=>{let t=(0,j.c)(7),l;t[0]===e?l=t[1]:(l=a=>{var s;(a.ctrlKey||a.metaKey)&&a.key==="z"&&(a.preventDefault(),a.stopPropagation(),(s=e.onClick)==null||s.call(e,a))},t[0]=e,t[1]=l);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={capture:!0},t[2]=r):r=t[2],_(window,"keydown",l,r);let o=e.children??"Undo",i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,d.jsx)(x,{className:"ml-2",shortcut:"cmd-z"}),t[3]=i):i=t[3];let n;return t[4]!==o||t[5]!==e?(n=(0,d.jsxs)(w,{"data-testid":"undo-button",size:"sm",variant:"outline",...e,children:[o," ",i]}),t[4]=o,t[5]=e,t[6]=n):n=t[6],n};var g=C();function z(){let e=(0,g.c)(4),{deleteCell:t,undoDeleteCell:l}=h(),{sendDeleteCell:r}=y(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=i=>{var s;if(m.get(p))return;let{cellId:n}=i,a=(((s=m.get(I).cellData[n])==null?void 0:s.code)??"").trim()==="";if(t({cellId:n}),r({cellId:n}).catch(()=>{l()}),!a){let{dismiss:c}=b({title:"Cell deleted",description:"You can bring it back by clicking undo or through the command palette.",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{l(),k()}})}),k=c}},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}function K(){let e=(0,g.c)(4),{deleteCell:t,undoDeleteCell:l}=h(),{sendDeleteCell:r}=y(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=async i=>{if(m.get(p))return;let{cellIds:n}=i;for(let c of n)await r({cellId:c}).then(()=>{t({cellId:c})});let{dismiss:a}=b({title:"Cells deleted",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{for(let c of n)l();s()}})}),s=a},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}export{K as n,f as r,z as t};
import{s as U}from"./chunk-LvLJmgfZ.js";import{d as Y,l as Z,n as V,p as $,u as ee}from"./useEvent-BhXAndur.js";import{t as te}from"./react-Bj1aDYRI.js";import{U as le,gt as re}from"./cells-DPp5cDaO.js";import{t as B}from"./compiler-runtime-B3qBwwSJ.js";import{t as se}from"./jsx-runtime-ZmTK25f3.js";import{t as ae}from"./cn-BKtXLv3a.js";import{t as ne}from"./createLucideIcon-BCdY6lG5.js";import{t as oe}from"./useCellActionButton-DUDHPTmq.js";import{a as ie,n as ce,o as me,t as de}from"./tooltip-CMQz28hC.js";import{d as he}from"./alert-dialog-BW4srmS0.js";import{i as G,r as pe,t as J}from"./popover-CH1FzjxU.js";import{a as fe,c as ue,i as xe,o as je,r as be,t as ye,u as ve}from"./command-2ElA5IkO.js";import{n as ge}from"./focus-C1YokgL7.js";import{a as Ne,i as we}from"./renderShortcut-BckyRbYt.js";var ke=ne("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),K=B(),p=U(te(),1),t=U(se(),1);const L=p.memo(p.forwardRef((n,l)=>{let e=(0,K.c)(46),{children:r,showTooltip:m,...d}=n,f=m===void 0?!0:m,[h,o]=(0,p.useState)(!1),k;e[0]===o?k=e[1]:(k=()=>o(!1),e[0]=o,e[1]=k);let X=k,A=(0,p.useRef)(null),u=oe({cell:d,closePopover:X}),F=he(),C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{le(()=>{A.current&&A.current.scrollIntoView({behavior:"auto",block:"nearest"})})},e[2]=C):C=e[2];let H=V(C),S;e[3]!==H||e[4]!==o?(S=s=>{o(c=>{let w=typeof s=="function"?s(c):s;return w&&H(),w})},e[3]=H,e[4]=o,e[5]=S):S=e[5];let i=V(S),_;e[6]===i?_=e[7]:(_=()=>({toggle:()=>i(Ce)}),e[6]=i,e[7]=_),(0,p.useImperativeHandle)(l,_);let M=pe,O=ye,R=fe,q=re(d.cellId),x;e[8]!==R||e[9]!==q?(x=(0,t.jsx)(R,{placeholder:"Search actions...",className:"h-6 m-1",...q}),e[8]=R,e[9]=q,e[10]=x):x=e[10];let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=(0,t.jsx)(be,{children:"No results"}),e[11]=I):I=e[11];let j;if(e[12]!==u||e[13]!==o){let s;e[15]!==u.length||e[16]!==o?(s=(c,w)=>(0,t.jsxs)(p.Fragment,{children:[(0,t.jsx)(xe,{children:c.map(a=>{if(a.redundant)return null;let E=(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[a.icon&&(0,t.jsx)("div",{className:"mr-2 w-5 text-muted-foreground",children:a.icon}),(0,t.jsx)("div",{className:"flex-1",children:a.label}),(0,t.jsxs)("div",{className:"shrink-0 text-sm",children:[a.hotkey&&we(a.hotkey),a.rightElement]})]});return a.tooltip&&(E=(0,t.jsx)(de,{content:a.tooltip,delayDuration:100,children:E})),(0,t.jsx)(je,{className:ae(a.disabled&&"opacity-50!"),onSelect:()=>{a.disableClick||a.disabled||(a.handle(),o(!1))},variant:a.variant,children:E},a.label)})},w),w<u.length-1&&(0,t.jsx)(ue,{})]},w),e[15]=u.length,e[16]=o,e[17]=s):s=e[17],j=u.map(s),e[12]=u,e[13]=o,e[14]=j}else j=e[14];let b;e[18]===j?b=e[19]:(b=(0,t.jsxs)(ve,{children:[I,j]}),e[18]=j,e[19]=b);let y;e[20]!==O||e[21]!==x||e[22]!==b?(y=(0,t.jsxs)(O,{children:[x,b]}),e[20]=O,e[21]=x,e[22]=b,e[23]=y):y=e[23];let T;e[24]!==M||e[25]!==F||e[26]!==y?(T=(0,t.jsx)(M,{className:"w-[300px] p-0 pt-1 overflow-auto",scrollable:!0,...F,children:y}),e[24]=M,e[25]=F,e[26]=y,e[27]=T):T=e[27];let v=T;if(!f){let s;e[28]===r?s=e[29]:(s=(0,t.jsx)(G,{asChild:!0,children:r}),e[28]=r,e[29]=s);let c;return e[30]!==v||e[31]!==i||e[32]!==h||e[33]!==s?(c=(0,t.jsxs)(J,{open:h,onOpenChange:i,children:[s,v]}),e[30]=v,e[31]=i,e[32]=h,e[33]=s,e[34]=c):c=e[34],c}let D;e[35]===Symbol.for("react.memo_cache_sentinel")?(D=(0,t.jsx)(ce,{tabIndex:-1,children:Ne("cell.cellActions")}),e[35]=D):D=e[35];let z=!h&&D,g;e[36]===r?g=e[37]:(g=(0,t.jsx)(me,{ref:A,children:(0,t.jsx)(G,{className:"flex",children:r})}),e[36]=r,e[37]=g);let N;e[38]!==z||e[39]!==g?(N=(0,t.jsxs)(ie,{delayDuration:200,disableHoverableContent:!0,children:[z,g]}),e[38]=z,e[39]=g,e[40]=N):N=e[40];let P;return e[41]!==v||e[42]!==i||e[43]!==h||e[44]!==N?(P=(0,t.jsxs)(J,{open:h,onOpenChange:i,children:[N,v]}),e[41]=v,e[42]=i,e[43]=h,e[44]=N,e[45]=P):P=e[45],P})),Q=p.memo(n=>{let l=(0,K.c)(5),{children:e,cellId:r}=n,m;l[0]===r?m=l[1]:(m=ge(r),l[0]=r,l[1]=m);let d=ee(m);if(!d)return null;let f;return l[2]!==e||l[3]!==d?(f=(0,t.jsx)(L,{showTooltip:!1,...d,children:e}),l[2]=e,l[3]=d,l[4]=f):f=l[4],f});Q.displayName="ConnectionCellActionsDropdown";function Ce(n){return!n}var Se=B();const W=$("minimap");function _e(){let n=(0,Se.c)(3),[l,e]=Z(W),r;return n[0]!==l||n[1]!==e?(r={dependencyPanelTab:l,setDependencyPanelTab:e},n[0]=l,n[1]=e,n[2]=r):r=n[2],r}function Ie(){return Y(W)}export{ke as a,Q as i,Ie as n,L as r,_e as t};
import{s as at}from"./chunk-LvLJmgfZ.js";import{t as ut}from"./react-Bj1aDYRI.js";import{t as ot}from"./compiler-runtime-B3qBwwSJ.js";import{t as it}from"./_baseIsEqual-B9N9Mw_N.js";function $(t){return"init"in t}function q(t){return!!t.write}function B(t){return"v"in t||"e"in t}function _(t){if("e"in t)throw t.e;return t.v}var j=new WeakMap;function F(t){var e;return z(t)&&!!((e=j.get(t))!=null&&e[0])}function ft(t){let e=j.get(t);e!=null&&e[0]&&(e[0]=!1,e[1].forEach(n=>n()))}function T(t,e){let n=j.get(t);if(!n){n=[!0,new Set],j.set(t,n);let r=()=>{n[0]=!1};t.then(r,r)}n[1].add(e)}function z(t){return typeof(t==null?void 0:t.then)=="function"}function G(t,e,n){if(!n.p.has(t)){n.p.add(t);let r=()=>n.p.delete(t);e.then(r,r)}}function H(t,e,n){var l;let r=new Set;for(let a of((l=n.get(t))==null?void 0:l.t)||[])r.add(a);for(let a of e.p)r.add(a);return r}var st=(t,e,...n)=>e.read(...n),ct=(t,e,...n)=>e.write(...n),dt=(t,e)=>{if(e.INTERNAL_onInit)return e.INTERNAL_onInit(t)},ht=(t,e,n)=>{var r;return(r=e.onMount)==null?void 0:r.call(e,n)},gt=(t,e)=>{var n;let r=w(t),l=r[0],a=r[6],u=r[9],f=l.get(e);return f||(f={d:new Map,p:new Set,n:0},l.set(e,f),(n=a.i)==null||n.call(a,e),u==null||u(t,e)),f},pt=t=>{let e=w(t),n=e[1],r=e[3],l=e[4],a=e[5],u=e[6],f=e[13],c=[],i=o=>{try{o()}catch(s){c.push(s)}};do{u.f&&i(u.f);let o=new Set,s=o.add.bind(o);r.forEach(d=>{var g;return(g=n.get(d))==null?void 0:g.l.forEach(s)}),r.clear(),a.forEach(s),a.clear(),l.forEach(s),l.clear(),o.forEach(i),r.size&&f(t)}while(r.size||a.size||l.size);if(c.length)throw AggregateError(c)},vt=t=>{let e=w(t),n=e[1],r=e[2],l=e[3],a=e[11],u=e[14],f=e[17],c=[],i=new WeakSet,o=new WeakSet,s=Array.from(l);for(;s.length;){let d=s[s.length-1],g=a(t,d);if(o.has(d)){s.pop();continue}if(i.has(d)){r.get(d)===g.n&&c.push([d,g]),o.add(d),s.pop();continue}i.add(d);for(let h of H(d,g,n))i.has(h)||s.push(h)}for(let d=c.length-1;d>=0;--d){let[g,h]=c[d],E=!1;for(let m of h.d.keys())if(m!==g&&l.has(m)){E=!0;break}E&&(u(t,g),f(t,g)),r.delete(g)}},yt=(t,e)=>{var n,r;let l=w(t),a=l[1],u=l[2],f=l[3],c=l[6],i=l[7],o=l[11],s=l[12],d=l[13],g=l[14],h=l[16],E=l[17],m=l[20],p=o(t,e);if(B(p)){if(a.has(e)&&u.get(e)!==p.n)return p;let y=!1;for(let[W,M]of p.d)if(g(t,W).n!==M){y=!0;break}if(!y)return p}p.d.clear();let v=!0;function S(){a.has(e)&&(E(t,e),d(t),s(t))}function N(y){var W;if(y===e){let U=o(t,y);if(!B(U))if($(y))m(t,y,y.init);else throw Error("no atom init");return _(U)}let M=g(t,y);try{return _(M)}finally{p.d.set(y,M.n),F(p.v)&&G(e,p.v,M),a.has(e)&&((W=a.get(y))==null||W.t.add(e)),v||S()}}let k,I,R={get signal(){return k||(k=new AbortController),k.signal},get setSelf(){return!I&&q(e)&&(I=(...y)=>{if(!v)try{return h(t,e,...y)}finally{d(t),s(t)}}),I}},D=p.n;try{let y=i(t,e,N,R);return m(t,e,y),z(y)&&(T(y,()=>k==null?void 0:k.abort()),y.then(S,S)),(n=c.r)==null||n.call(c,e),p}catch(y){return delete p.v,p.e=y,++p.n,p}finally{v=!1,D!==p.n&&u.get(e)===D&&(u.set(e,p.n),f.add(e),(r=c.c)==null||r.call(c,e))}},wt=(t,e)=>{let n=w(t),r=n[1],l=n[2],a=n[11],u=[e];for(;u.length;){let f=u.pop(),c=a(t,f);for(let i of H(f,c,r)){let o=a(t,i);l.set(i,o.n),u.push(i)}}},mt=(t,e,...n)=>{let r=w(t),l=r[3],a=r[6],u=r[8],f=r[11],c=r[12],i=r[13],o=r[14],s=r[15],d=r[16],g=r[17],h=r[20],E=!0,m=v=>_(o(t,v)),p=(v,...S)=>{var N;let k=f(t,v);try{if(v===e){if(!$(v))throw Error("atom not writable");let I=k.n,R=S[0];h(t,v,R),g(t,v),I!==k.n&&(l.add(v),s(t,v),(N=a.c)==null||N.call(a,v));return}else return d(t,v,...S)}finally{E||(i(t),c(t))}};try{return u(t,e,m,p,...n)}finally{E=!1}},bt=(t,e)=>{var g;var n;let r=w(t),l=r[1],a=r[3],u=r[6],f=r[11],c=r[15],i=r[18],o=r[19],s=f(t,e),d=l.get(e);if(d&&!F(s.v)){for(let[h,E]of s.d)if(!d.d.has(h)){let m=f(t,h);i(t,h).t.add(e),d.d.add(h),E!==m.n&&(a.add(h),c(t,h),(n=u.c)==null||n.call(u,h))}for(let h of d.d)s.d.has(h)||(d.d.delete(h),(g=o(t,h))==null||g.t.delete(e))}},Et=(t,e)=>{var n;let r=w(t),l=r[1],a=r[4],u=r[6],f=r[10],c=r[11],i=r[12],o=r[13],s=r[14],d=r[16],g=r[18],h=c(t,e),E=l.get(e);if(!E){s(t,e);for(let m of h.d.keys())g(t,m).t.add(e);E={l:new Set,d:new Set(h.d.keys()),t:new Set},l.set(e,E),q(e)&&a.add(()=>{let m=!0,p=(...v)=>{try{return d(t,e,...v)}finally{m||(o(t),i(t))}};try{let v=f(t,e,p);v&&(E.u=()=>{m=!0;try{v()}finally{m=!1}})}finally{m=!1}}),(n=u.m)==null||n.call(u,e)}return E},kt=(t,e)=>{var d,g;var n;let r=w(t),l=r[1],a=r[5],u=r[6],f=r[11],c=r[19],i=f(t,e),o=l.get(e);if(!o||o.l.size)return o;let s=!1;for(let h of o.t)if((d=l.get(h))!=null&&d.d.has(e)){s=!0;break}if(!s){o.u&&a.add(o.u),o=void 0,l.delete(e);for(let h of i.d.keys())(g=c(t,h))==null||g.t.delete(e);(n=u.u)==null||n.call(u,e);return}return o},St=(t,e,n)=>{let r=w(t)[11],l=r(t,e),a="v"in l,u=l.v;if(z(n))for(let f of l.d.keys())G(e,n,r(t,f));l.v=n,delete l.e,(!a||!Object.is(u,l.v))&&(++l.n,z(u)&&ft(u))},It=(t,e)=>{let n=w(t)[14];return _(n(t,e))},Mt=(t,e,...n)=>{let r=w(t),l=r[12],a=r[13],u=r[16];try{return u(t,e,...n)}finally{a(t),l(t)}},At=(t,e,n)=>{let r=w(t),l=r[12],a=r[18],u=r[19],f=a(t,e).l;return f.add(n),l(t),()=>{f.delete(n),u(t,e),l(t)}},J=new WeakMap,w=t=>J.get(t);function Nt(t){let e=w(t),n=e[24];return n?n(e):e}function K(...t){let e={get(r){let l=w(e)[21];return l(e,r)},set(r,...l){let a=w(e)[22];return a(e,r,...l)},sub(r,l){let a=w(e)[23];return a(e,r,l)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},st,ct,dt,ht,gt,pt,vt,yt,wt,mt,bt,Et,kt,St,It,Mt,At,void 0].map((r,l)=>t[l]||r);return J.set(e,Object.freeze(n)),e}var Wt=0;function Q(t,e){let n=`atom${++Wt}`,r={toString(){return n}};return typeof t=="function"?r.read=t:(r.init=t,r.read=_t,r.write=jt),e&&(r.write=e),r}function _t(t){return t(this)}function jt(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}var X;function C(){return X?X():K()}var Y;function zt(){return Y||(Y=C()),Y}var b=at(ut(),1),x=(0,b.createContext)(void 0);function O(t){let e=(0,b.useContext)(x);return(t==null?void 0:t.store)||e||zt()}function Ct({children:t,store:e}){let n=(0,b.useRef)(null);return e?(0,b.createElement)(x.Provider,{value:e},t):(n.current===null&&(n.current=C()),(0,b.createElement)(x.Provider,{value:n.current},t))}var L=t=>typeof(t==null?void 0:t.then)=="function",P=t=>{t.status||(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}))},Ot=b.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(P(t),t)}),V=new WeakMap,Z=(t,e)=>{let n=V.get(t);return n||(n=new Promise((r,l)=>{let a=t,u=i=>o=>{a===i&&r(o)},f=i=>o=>{a===i&&l(o)},c=()=>{try{let i=e();L(i)?(V.set(i,n),a=i,i.then(u(i),f(i)),T(i,c)):r(i)}catch(i){l(i)}};t.then(u(t),f(t)),T(t,c)}),V.set(t,n)),n};function tt(t,e){let{delay:n,unstable_promiseStatus:r=!b.use}=e||{},l=O(e),[[a,u,f],c]=(0,b.useReducer)(o=>{let s=l.get(t);return Object.is(o[0],s)&&o[1]===l&&o[2]===t?o:[s,l,t]},void 0,()=>[l.get(t),l,t]),i=a;if((u!==l||f!==t)&&(c(),i=l.get(t)),(0,b.useEffect)(()=>{let o=l.sub(t,()=>{if(r)try{let s=l.get(t);L(s)&&P(Z(s,()=>l.get(t)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),o},[l,t,n,r]),(0,b.useDebugValue)(i),L(i)){let o=Z(i,()=>l.get(t));return r&&P(o),Ot(o)}return i}function et(t,e){let n=O(e);return(0,b.useCallback)((...r)=>n.set(t,...r),[n,t])}function Rt(t,e){return[tt(t,e),et(t,e)]}function Tt(t,e){return it(t,e)}var rt=Tt,xt=ot();const A=C();async function Lt(t,e){return e(A.get(t))?A.get(t):new Promise(n=>{let r=A.sub(t,()=>{let l=A.get(t);e(l)&&(r(),n(l))})})}function Pt(t,e){let n=(0,xt.c)(5),r=O(),l,a;n[0]!==t||n[1]!==e||n[2]!==r?(l=()=>{let u=r.get(t);r.sub(t,()=>{let f=r.get(t);e(f,u),u=f})},a=[t,e,r],n[0]=t,n[1]=e,n[2]=r,n[3]=l,n[4]=a):(l=n[3],a=n[4]),(0,b.useEffect)(l,a)}var nt=Symbol("sentinel");function Vt(t,e=rt){let n=nt;return Q(r=>{let l=r(t);return(n===nt||!e(n,l))&&(n=l),n})}var Dt=typeof window<"u"?b.useInsertionEffect||b.useLayoutEffect:()=>{};function lt(t){let e=b.useRef(Ut);Dt(()=>{e.current=t},[t]);let n=b.useRef(null);return n.current||(n.current=function(){return e.current.apply(this,arguments)}),n.current}function Ut(){throw Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}var $t=lt;export{Pt as a,Ct as c,et as d,O as f,Nt as g,K as h,A as i,Rt as l,C as m,$t as n,Lt as o,Q as p,Vt as r,rt as s,lt as t,tt as u};
import{s as E}from"./chunk-LvLJmgfZ.js";import{t as d}from"./react-Bj1aDYRI.js";import{t as b}from"./compiler-runtime-B3qBwwSJ.js";var a=E(d(),1);function m(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function v(...t){return n=>{let e=!1,u=t.map(r=>{let f=m(r,n);return!e&&typeof f=="function"&&(e=!0),f});if(e)return()=>{for(let r=0;r<u.length;r++){let f=u[r];typeof f=="function"?f():m(t[r],null)}}}}function L(...t){return a.useCallback(v(...t),t)}var g=b();function h(t){return typeof t=="object"&&!!t&&"current"in t}function j(t,n,e,u){let r=(0,g.c)(8),f=(0,a.useRef)(e),o,c;r[0]===e?(o=r[1],c=r[2]):(o=()=>{f.current=e},c=[e],r[0]=e,r[1]=o,r[2]=c),(0,a.useEffect)(o,c);let l,i;r[3]!==u||r[4]!==t||r[5]!==n?(l=()=>{let s=h(t)?t.current:t;if(!s)return;let p=y=>f.current(y);return s.addEventListener(n,p,u),()=>{s.removeEventListener(n,p,u)}},i=[n,t,u],r[3]=u,r[4]=t,r[5]=n,r[6]=l,r[7]=i):(l=r[6],i=r[7]),(0,a.useEffect)(l,i)}export{v as n,L as r,j as t};
import"./chunk-LvLJmgfZ.js";import{t as o}from"./react-Bj1aDYRI.js";import{t as m}from"./compiler-runtime-B3qBwwSJ.js";import{t as e}from"./capabilities-MM7JYRxj.js";var a=m();o();function i(){let t=(0,a.c)(1),r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(),t[0]=r):r=t[0],r}export{i as t};
import{s as l}from"./chunk-LvLJmgfZ.js";import{p as x}from"./useEvent-BhXAndur.js";import{t as k}from"./react-Bj1aDYRI.js";import{d as v}from"./hotkeys-BHHWjLlp.js";import{t as f}from"./jsx-runtime-ZmTK25f3.js";import{r as j}from"./requests-B4FYHTZl.js";import{t as n}from"./use-toast-BDYuj3zG.js";import{t as o}from"./kbd-Cm6Ba9qg.js";const y=x(null),m="packages-install-input",p=()=>{requestAnimationFrame(()=>{let e=document.getElementById(m);e&&e.focus()})},P=e=>{e.openApplication("packages"),p()};var a=l(f(),1);const g=(e,t)=>{n(t?{title:"Failed to add package",description:t,variant:"danger"}:{title:"Package added",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," and its dependencies has been added to your environment."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})},N=(e,t)=>{n(t?{title:"Failed to upgrade package",description:t,variant:"danger"}:{title:"Package upgraded",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," has been upgraded."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})},q=(e,t)=>{n(t?{title:"Failed to remove package",description:t,variant:"danger"}:{title:"Package removed",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," has been removed from your environment."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})};var F=l(k(),1);function S(){let[e,t]=(0,F.useState)(!1),{addPackage:h}=j();return{loading:e,handleInstallPackages:async(d,r)=>{t(!0);try{for(let[s,i]of d.entries()){let c=await h({package:i});c.success?g(i):g(i,c.error),s<d.length-1&&await new Promise(u=>setTimeout(u,1e3))}r==null||r()}catch(s){v.error(s)}finally{t(!1)}}}}export{p as a,m as i,q as n,P as o,N as r,y as s,S as t};
import{s as o}from"./chunk-LvLJmgfZ.js";import{t as m}from"./react-Bj1aDYRI.js";import{t as v}from"./useEventListener-Cb-RVVEn.js";var e=o(m(),1);function b(a,f){let{delayMs:r,whenVisible:n,disabled:l=!1,skipIfRunning:c=!1}=f,t=(0,e.useRef)(void 0),s=(0,e.useRef)(!1);(0,e.useEffect)(()=>{t.current=a},[a]);let u=(0,e.useCallback)(async()=>{var i;if(!(s.current&&c)){s.current=!0;try{await((i=t.current)==null?void 0:i.call(t))}finally{s.current=!1}}},[c]);return(0,e.useEffect)(()=>{if(r===null||l)return;let i=setInterval(()=>{n&&document.visibilityState!=="visible"||u()},r);return()=>clearInterval(i)},[r,n,l,u]),v(document,"visibilitychange",()=>{document.visibilityState==="visible"&&n&&!l&&u()}),null}export{b as t};
import{s as z}from"./chunk-LvLJmgfZ.js";import{t as I}from"./react-Bj1aDYRI.js";import{t as r}from"./toString-DlRqgfqz.js";import{r as O}from"./assertNever-CBU83Y6o.js";import{t as U}from"./_arrayReduce-TT0iOGKY.js";import{t}from"./createLucideIcon-BCdY6lG5.js";function Z(u){return function(e){return u==null?void 0:u[e]}}var j=Z({\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"}),R=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,L=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function M(u){return u=r(u),u&&u.replace(R,j).replace(L,"")}var T=M,w=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function D(u){return u.match(w)||[]}var N=D,S=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function C(u){return S.test(u)}var G=C,n="\\ud800-\\udfff",H="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",x="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",Y="\\xac\\xb1\\xd7\\xf7",J="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",V="\\u2000-\\u206f",_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",d="A-Z\\xc0-\\xd6\\xd8-\\xde",$="\\ufe0e\\ufe0f",i=Y+J+V+_,c="['\u2019]",y="["+i+"]",K="["+H+"]",s="\\d+",W="["+x+"]",h="["+o+"]",p="[^"+n+i+s+x+o+d+"]",q="(?:"+K+"|\\ud83c[\\udffb-\\udfff])",B="[^"+n+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",f="["+d+"]",F="\\u200d",m="(?:"+h+"|"+p+")",P="(?:"+f+"|"+p+")",k="(?:"+c+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+c+"(?:D|LL|M|RE|S|T|VE))?",v=q+"?",E="["+$+"]?",Q="(?:"+F+"(?:"+[B,l,g].join("|")+")"+E+v+")*",X="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",u0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",e0=E+v+Q,f0="(?:"+[W,l,g].join("|")+")"+e0,t0=RegExp([f+"?"+h+"+"+k+"(?="+[y,f,"$"].join("|")+")",P+"+"+A+"(?="+[y,f+m,"$"].join("|")+")",f+"?"+m+"+"+k,f+"+"+A,u0,X,s,f0].join("|"),"g");function a0(u){return u.match(t0)||[]}var r0=a0;function n0(u,e,a){return u=r(u),e=a?void 0:e,e===void 0?G(u)?r0(u):N(u):u.match(e)||[]}var x0=n0,o0=RegExp("['\u2019]","g");function d0(u){return function(e){return U(x0(T(e).replace(o0,"")),u,"")}}var i0=d0(function(u,e,a){return u+(a?" ":"")+O(e)}),c0=t("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),y0=t("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),s0=t("toggle-left",[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]),h0=t("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]),b=z(I(),1);function p0(u){(0,b.useEffect)(u,[])}function l0(u){(0,b.useEffect)(()=>u(),[])}export{y0 as a,s0 as i,l0 as n,c0 as o,h0 as r,i0 as s,p0 as t};
var me=Object.defineProperty;var we=(n,e,t)=>e in n?me(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var k=(n,e,t)=>we(n,typeof e!="symbol"?e+"":e,t);var J;import{s as ye}from"./chunk-LvLJmgfZ.js";import{t as $e}from"./react-Bj1aDYRI.js";import{t as Re}from"./compiler-runtime-B3qBwwSJ.js";function M(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=M();function ne(n){R=n}var z={exec:()=>null};function u(n,e=""){let t=typeof n=="string"?n:n.source,s={replace:(r,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(b.caret,"$1"),t=t.replace(r,c),s},getRegex:()=>new RegExp(t,e)};return s}var b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Se=/^(?:[ \t]*(?:\n|$))+/,Te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ze=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ae=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,O=/(?:[*+-]|\d{1,9}[.)])/,re=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,se=u(re).replace(/bull/g,O).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),_e=u(re).replace(/bull/g,O).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Q=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pe=/^[^\n]+/,N=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ie=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",N).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Le=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,O).getRegex(),I="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",j=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ce=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",j).replace("tag",I).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ie=u(Q).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex(),G={blockquote:u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ie).getRegex(),code:Te,def:Ie,fences:ze,heading:Ae,hr:A,html:Ce,lheading:se,list:Le,newline:Se,paragraph:ie,table:z,text:Pe},le=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex(),Be={...G,lheading:_e,table:le,paragraph:u(Q).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",le).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex()},Ee={...G,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",j).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(Q).replace("hr",A).replace("heading",` *#{1,6} *[^
]`).replace("lheading",se).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ve=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ae=/^( {2,}|\\)\n(?!\s*$)/,Ze=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,L=/[\p{P}\p{S}]/u,H=/[\s\p{P}\p{S}]/u,oe=/[^\s\p{P}\p{S}]/u,De=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,H).getRegex(),ce=/(?!~)[\p{P}\p{S}]/u,Me=/(?!~)[\s\p{P}\p{S}]/u,Oe=/(?:[^\s\p{P}\p{S}]|~)/u,Qe=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,he=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ne=u(he,"u").replace(/punct/g,L).getRegex(),je=u(he,"u").replace(/punct/g,ce).getRegex(),pe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ge=u(pe,"gu").replace(/notPunctSpace/g,oe).replace(/punctSpace/g,H).replace(/punct/g,L).getRegex(),He=u(pe,"gu").replace(/notPunctSpace/g,Oe).replace(/punctSpace/g,Me).replace(/punct/g,ce).getRegex(),Xe=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,oe).replace(/punctSpace/g,H).replace(/punct/g,L).getRegex(),Fe=u(/\\(punct)/,"gu").replace(/punct/g,L).getRegex(),Ue=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Je=u(j).replace("(?:-->|$)","-->").getRegex(),Ke=u("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Je).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),C=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ve=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",C).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ue=u(/^!?\[(label)\]\[(ref)\]/).replace("label",C).replace("ref",N).getRegex(),ge=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",N).getRegex(),X={_backpedal:z,anyPunctuation:Fe,autolink:Ue,blockSkip:Qe,br:ae,code:ve,del:z,emStrongLDelim:Ne,emStrongRDelimAst:Ge,emStrongRDelimUnd:Xe,escape:qe,link:Ve,nolink:ge,punctuation:De,reflink:ue,reflinkSearch:u("reflink|nolink(?!\\()","g").replace("reflink",ue).replace("nolink",ge).getRegex(),tag:Ke,text:Ze,url:z},We={...X,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",C).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",C).getRegex()},F={...X,emStrongRDelimAst:He,emStrongLDelim:je,url:u(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ye={...F,br:u(ae).replace("{2,}","*").getRegex(),text:u(F.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},B={normal:G,gfm:Be,pedantic:Ee},_={normal:X,gfm:F,breaks:Ye,pedantic:We},et={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ke=n=>et[n];function w(n,e){if(e){if(b.escapeTest.test(n))return n.replace(b.escapeReplace,ke)}else if(b.escapeTestNoEncode.test(n))return n.replace(b.escapeReplaceNoEncode,ke);return n}function de(n){try{n=encodeURI(n).replace(b.percentDecode,"%")}catch{return null}return n}function fe(n,e){var r;let t=n.replace(b.findPipe,(l,c,i)=>{let o=!1,a=c;for(;--a>=0&&i[a]==="\\";)o=!o;return o?"|":" |"}).split(b.splitPipe),s=0;if(t[0].trim()||t.shift(),t.length>0&&!((r=t.at(-1))!=null&&r.trim())&&t.pop(),e)if(t.length>e)t.splice(e);else for(;t.length<e;)t.push("");for(;s<t.length;s++)t[s]=t[s].trim().replace(b.slashPipe,"|");return t}function P(n,e,t){let s=n.length;if(s===0)return"";let r=0;for(;r<s;){let l=n.charAt(s-r-1);if(l===e&&!t)r++;else if(l!==e&&t)r++;else break}return n.slice(0,s-r)}function tt(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])t++;else if(n[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function xe(n,e,t,s,r){let l=e.href,c=e.title||null,i=n[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:l,title:c,text:i,tokens:s.inlineTokens(i)};return s.state.inLink=!1,o}function nt(n,e,t){let s=n.match(t.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
`).map(l=>{let c=l.match(t.other.beginningSpace);if(c===null)return l;let[i]=c;return i.length>=r.length?l.slice(r.length):l}).join(`
`)}var E=class{constructor(n){k(this,"options");k(this,"rules");k(this,"lexer");this.options=n||R}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:P(t,`
`)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],s=nt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=P(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:P(e[0],`
`)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=P(e[0],`
`).split(`
`),s="",r="",l=[];for(;t.length>0;){let c=!1,i=[],o;for(o=0;o<t.length;o++)if(this.rules.other.blockquoteStart.test(t[o]))i.push(t[o]),c=!0;else if(!c)i.push(t[o]);else break;t=t.slice(o);let a=i.join(`
`),h=a.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
${a}`:a,r=r?`${r}
${h}`:h;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=f,t.length===0)break;let p=l.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let x=p,d=x.raw+`
`+t.join(`
`),m=this.blockquote(d);l[l.length-1]=m,s=s.substring(0,s.length-x.raw.length)+m.raw,r=r.substring(0,r.length-x.text.length)+m.text;break}else if((p==null?void 0:p.type)==="list"){let x=p,d=x.raw+`
`+t.join(`
`),m=this.list(d);l[l.length-1]=m,s=s.substring(0,s.length-p.raw.length)+m.raw,r=r.substring(0,r.length-x.raw.length)+m.raw,t=d.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:s,tokens:l,text:r}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),s=t.length>1,r={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let l=this.rules.other.listItemRegex(t),c=!1;for(;n;){let o=!1,a="",h="";if(!(e=l.exec(n))||this.rules.block.hr.test(n))break;a=e[0],n=n.substring(a.length);let f=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,Z=>" ".repeat(3*Z.length)),p=n.split(`
`,1)[0],x=!f.trim(),d=0;if(this.options.pedantic?(d=2,h=f.trimStart()):x?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,h=f.slice(d),d+=e[1].length),x&&this.rules.other.blankLine.test(p)&&(a+=p+`
`,n=n.substring(p.length+1),o=!0),!o){let Z=this.rules.other.nextBulletRegex(d),Y=this.rules.other.hrRegex(d),ee=this.rules.other.fencesBeginRegex(d),te=this.rules.other.headingBeginRegex(d),be=this.rules.other.htmlBeginRegex(d);for(;n;){let D=n.split(`
`,1)[0],T;if(p=D,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),T=p):T=p.replace(this.rules.other.tabCharGlobal," "),ee.test(p)||te.test(p)||be.test(p)||Z.test(p)||Y.test(p))break;if(T.search(this.rules.other.nonSpaceChar)>=d||!p.trim())h+=`
`+T.slice(d);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ee.test(f)||te.test(f)||Y.test(f))break;h+=`
`+p}!x&&!p.trim()&&(x=!0),a+=D+`
`,n=n.substring(D.length+1),f=T.slice(d)}}r.loose||(c?r.loose=!0:this.rules.other.doubleBlankLine.test(a)&&(c=!0));let m=null,W;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(W=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:a,task:!!m,checked:W,loose:!1,text:h,tokens:[]}),r.raw+=a}let i=r.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let o=0;o<r.items.length;o++)if(this.lexer.state.top=!1,r.items[o].tokens=this.lexer.blockTokens(r.items[o].text,[]),!r.loose){let a=r.items[o].tokens.filter(h=>h.type==="space");r.loose=a.length>0&&a.some(h=>this.rules.other.anyLine.test(h.raw))}if(r.loose)for(let o=0;o<r.items.length;o++)r.items[o].loose=!0;return r}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:s,title:r}}}table(n){var c;let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=fe(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(c=e[3])!=null&&c.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?l.align.push("right"):this.rules.other.tableAlignCenter.test(i)?l.align.push("center"):this.rules.other.tableAlignLeft.test(i)?l.align.push("left"):l.align.push(null);for(let i=0;i<t.length;i++)l.header.push({text:t[i],tokens:this.lexer.inline(t[i]),header:!0,align:l.align[i]});for(let i of r)l.rows.push(fe(i,l.header.length).map((o,a)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:l.align[a]})));return l}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let l=P(t.slice(0,-1),"\\");if((t.length-l.length)%2==0)return}else{let l=tt(e[2],"()");if(l===-2)return;if(l>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],r="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],r=l[3])}else r=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(s=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s.slice(1):s.slice(1,-1)),xe(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let s=e[(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!s){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return xe(t,s,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(n);if(s&&!(s[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!t||this.rules.inline.punctuation.exec(t))){let r=[...s[0]].length-1,l,c,i=r,o=0,a=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,e=e.slice(-1*n.length+r);(s=a.exec(e))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(c=[...l].length,s[3]||s[4]){i+=c;continue}else if((s[5]||s[6])&&r%3&&!((r+c)%3)){o+=c;continue}if(i-=c,i>0)continue;c=Math.min(c,c+i+o);let h=[...s[0]][0].length,f=n.slice(0,r+s.index+h+c);if(Math.min(r,c)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(n){var t;let e;if(e=this.rules.inline.url.exec(n)){let s,r;if(e[2]==="@")s=e[0],r="mailto:"+s;else{let l;do l=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(l!==e[0]);s=e[0],r=e[1]==="www."?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},y=class K{constructor(e){k(this,"tokens");k(this,"options");k(this,"state");k(this,"tokenizer");k(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||R,this.options.tokenizer=this.options.tokenizer||new E,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:b,block:B.normal,inline:_.normal};this.options.pedantic?(t.block=B.pedantic,t.inline=_.pedantic):this.options.gfm&&(t.block=B.gfm,this.options.breaks?t.inline=_.breaks:t.inline=_.gfm),this.tokenizer.rules=t}static get rules(){return{block:B,inline:_}}static lex(e,t){return new K(t).lex(e)}static lexInline(e,t){return new K(t).inlineTokens(e)}lex(e){e=e.replace(b.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){var r,l,c;for(this.options.pedantic&&(e=e.replace(b.tabCharGlobal," ").replace(b.spaceLine,""));e;){let i;if((l=(r=this.options.extensions)==null?void 0:r.block)!=null&&l.some(a=>(i=a.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=t.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=t.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue.at(-1).src=a.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=t.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=`
`+i.raw,a.text+=`
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let o=e;if((c=this.options.extensions)!=null&&c.startBlock){let a=1/0,h=e.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},h),typeof f=="number"&&f>=0&&(a=Math.min(a,f))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=t.at(-1);s&&(a==null?void 0:a.type)==="paragraph"?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=t.at(-1);(a==null?void 0:a.type)==="text"?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(i);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var i,o,a;let s=e,r=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,c="";for(;e;){l||(c=""),l=!1;let h;if((o=(i=this.options.extensions)==null?void 0:i.inline)!=null&&o.some(p=>(h=p.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let p=t.at(-1);h.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,s,c)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let f=e;if((a=this.options.extensions)!=null&&a.startInline){let p=1/0,x=e.slice(1),d;this.options.extensions.startInline.forEach(m=>{d=m.call({lexer:this},x),typeof d=="number"&&d>=0&&(p=Math.min(p,d))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(f)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(c=h.raw.slice(-1)),l=!0;let p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw Error(p)}}return t}},q=class{constructor(n){k(this,"options");k(this,"parser");this.options=n||R}space(n){return""}code({text:n,lang:e,escaped:t}){var l;let s=(l=(e||"").match(b.notSpaceStart))==null?void 0:l[0],r=n.replace(b.endingNewline,"")+`
`;return s?'<pre><code class="language-'+w(s)+'">'+(t?r:w(r,!0))+`</code></pre>
`:"<pre><code>"+(t?r:w(r,!0))+`</code></pre>
`}blockquote({tokens:n}){return`<blockquote>
${this.parser.parse(n)}</blockquote>
`}html({text:n}){return n}heading({tokens:n,depth:e}){return`<h${e}>${this.parser.parseInline(n)}</h${e}>
`}hr(n){return`<hr>
`}list(n){let e=n.ordered,t=n.start,s="";for(let c=0;c<n.items.length;c++){let i=n.items[c];s+=this.listitem(i)}let r=e?"ol":"ul",l=e&&t!==1?' start="'+t+'"':"";return"<"+r+l+`>
`+s+"</"+r+`>
`}listitem(n){var t;let e="";if(n.task){let s=this.checkbox({checked:!!n.checked});n.loose?((t=n.tokens[0])==null?void 0:t.type)==="paragraph"?(n.tokens[0].text=s+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=s+" "+w(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):e+=s+" "}return e+=this.parser.parse(n.tokens,!!n.loose),`<li>${e}</li>
`}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
`}table(n){let e="",t="";for(let r=0;r<n.header.length;r++)t+=this.tablecell(n.header[r]);e+=this.tablerow({text:t});let s="";for(let r=0;r<n.rows.length;r++){let l=n.rows[r];t="";for(let c=0;c<l.length;c++)t+=this.tablecell(l[c]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+s+`</table>
`}tablerow({text:n}){return`<tr>
${n}</tr>
`}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${w(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let s=this.parser.parseInline(t),r=de(n);if(r===null)return s;n=r;let l='<a href="'+n+'"';return e&&(l+=' title="'+w(e)+'"'),l+=">"+s+"</a>",l}image({href:n,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let r=de(n);if(r===null)return w(t);n=r;let l=`<img src="${n}" alt="${t}"`;return e&&(l+=` title="${w(e)}"`),l+=">",l}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:w(n.text)}},U=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},$=class V{constructor(e){k(this,"options");k(this,"renderer");k(this,"textRenderer");this.options=e||R,this.options.renderer=this.options.renderer||new q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new U}static parse(e,t){return new V(t).parse(e)}static parseInline(e,t){return new V(t).parseInline(e)}parse(e,t=!0){var r,l;let s="";for(let c=0;c<e.length;c++){let i=e[c];if((l=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&l[i.type]){let a=i,h=this.options.extensions.renderers[a.type].call({parser:this},a);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){s+=h||"";continue}}let o=i;switch(o.type){case"space":s+=this.renderer.space(o);continue;case"hr":s+=this.renderer.hr(o);continue;case"heading":s+=this.renderer.heading(o);continue;case"code":s+=this.renderer.code(o);continue;case"table":s+=this.renderer.table(o);continue;case"blockquote":s+=this.renderer.blockquote(o);continue;case"list":s+=this.renderer.list(o);continue;case"html":s+=this.renderer.html(o);continue;case"paragraph":s+=this.renderer.paragraph(o);continue;case"text":{let a=o,h=this.renderer.text(a);for(;c+1<e.length&&e[c+1].type==="text";)a=e[++c],h+=`
`+this.renderer.text(a);t?s+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):s+=h;continue}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw Error(a)}}}return s}parseInline(e,t=this.renderer){var r,l;let s="";for(let c=0;c<e.length;c++){let i=e[c];if((l=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&l[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){s+=a||"";continue}}let o=i;switch(o.type){case"escape":s+=t.text(o);break;case"html":s+=t.html(o);break;case"link":s+=t.link(o);break;case"image":s+=t.image(o);break;case"strong":s+=t.strong(o);break;case"em":s+=t.em(o);break;case"codespan":s+=t.codespan(o);break;case"br":s+=t.br(o);break;case"del":s+=t.del(o);break;case"text":s+=t.text(o);break;default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw Error(a)}}}return s}},v=(J=class{constructor(n){k(this,"options");k(this,"block");this.options=n||R}preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?y.lex:y.lexInline}provideParser(){return this.block?$.parse:$.parseInline}},k(J,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),J),S=new class{constructor(...n){k(this,"defaults",M());k(this,"options",this.setOptions);k(this,"parse",this.parseMarkdown(!0));k(this,"parseInline",this.parseMarkdown(!1));k(this,"Parser",$);k(this,"Renderer",q);k(this,"TextRenderer",U);k(this,"Lexer",y);k(this,"Tokenizer",E);k(this,"Hooks",v);this.use(...n)}walkTokens(n,e){var s,r;let t=[];for(let l of n)switch(t=t.concat(e.call(this,l)),l.type){case"table":{let c=l;for(let i of c.header)t=t.concat(this.walkTokens(i.tokens,e));for(let i of c.rows)for(let o of i)t=t.concat(this.walkTokens(o.tokens,e));break}case"list":{let c=l;t=t.concat(this.walkTokens(c.items,e));break}default:{let c=l;(r=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&r[c.type]?this.defaults.extensions.childTokens[c.type].forEach(i=>{let o=c[i].flat(1/0);t=t.concat(this.walkTokens(o,e))}):c.tokens&&(t=t.concat(this.walkTokens(c.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw Error("extension name required");if("renderer"in r){let l=e.renderers[r.name];l?e.renderers[r.name]=function(...c){let i=r.renderer.apply(this,c);return i===!1&&(i=l.apply(this,c)),i}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let l=e[r.level];l?l.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),t.renderer){let r=this.defaults.renderer||new q(this.defaults);for(let l in t.renderer){if(!(l in r))throw Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,i=t.renderer[c],o=r[c];r[c]=(...a)=>{let h=i.apply(r,a);return h===!1&&(h=o.apply(r,a)),h||""}}s.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new E(this.defaults);for(let l in t.tokenizer){if(!(l in r))throw Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,i=t.tokenizer[c],o=r[c];r[c]=(...a)=>{let h=i.apply(r,a);return h===!1&&(h=o.apply(r,a)),h}}s.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new v;for(let l in t.hooks){if(!(l in r))throw Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,i=t.hooks[c],o=r[c];v.passThroughHooks.has(l)?r[c]=a=>{if(this.defaults.async)return Promise.resolve(i.call(r,a)).then(f=>o.call(r,f));let h=i.call(r,a);return o.call(r,h)}:r[c]=(...a)=>{let h=i.apply(r,a);return h===!1&&(h=o.apply(r,a)),h}}s.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,l=t.walkTokens;s.walkTokens=function(c){let i=[];return i.push(l.call(this,c)),r&&(i=i.concat(r.call(this,c))),i}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return y.lex(n,e??this.defaults)}parser(n,e){return $.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let s={...t},r={...this.defaults,...s},l=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return l(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(e==null)return l(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=n);let c=r.hooks?r.hooks.provideLexer():n?y.lex:y.lexInline,i=r.hooks?r.hooks.provideParser():n?$.parse:$.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(e):e).then(o=>c(o,r)).then(o=>r.hooks?r.hooks.processAllTokens(o):o).then(o=>r.walkTokens?Promise.all(this.walkTokens(o,r.walkTokens)).then(()=>o):o).then(o=>i(o,r)).then(o=>r.hooks?r.hooks.postprocess(o):o).catch(l);try{r.hooks&&(e=r.hooks.preprocess(e));let o=c(e,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let a=i(o,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(o){return l(o)}}}onError(n,e){return t=>{if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+w(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}};function g(n,e){return S.parse(n,e)}g.options=g.setOptions=function(n){return S.setOptions(n),g.defaults=S.defaults,ne(g.defaults),g},g.getDefaults=M,g.defaults=R,g.use=function(...n){return S.use(...n),g.defaults=S.defaults,ne(g.defaults),g},g.walkTokens=function(n,e){return S.walkTokens(n,e)},g.parseInline=S.parseInline,g.Parser=$,g.parser=$.parse,g.Renderer=q,g.TextRenderer=U,g.Lexer=y,g.lexer=y.lex,g.Tokenizer=E,g.Hooks=v,g.parse=g,g.options,g.setOptions,g.use,g.walkTokens,g.parseInline,$.parse,y.lex;var rt=Re(),st=ye($e(),1);function it(){let n=(0,rt.c)(2),[e,t]=(0,st.useState)(0),s;return n[0]===e?s=n[1]:(s=()=>{t(e+1)},n[0]=e,n[1]=s),s}export{g as n,it as t};
import{s as de}from"./chunk-LvLJmgfZ.js";import{d as D,l as Oe,p as Be,u as ee}from"./useEvent-BhXAndur.js";import{t as Ue}from"./react-Bj1aDYRI.js";import{Hn as Ye,Mt as $e,Qn as Fe,Wn as Ge,cn as Ke,g as Je,ii as te,ln as Qe,m as ce,pn as he,qn as Xe,t as Ze,un as et,vr as tt,w as pe}from"./cells-DPp5cDaO.js";import{t as W}from"./compiler-runtime-B3qBwwSJ.js";import{n as at}from"./assertNever-CBU83Y6o.js";import{s as me}from"./useLifecycle-ClI_npeg.js";import{n as ot}from"./add-database-form-DvnhmpaG.js";import{n as nt,x as it}from"./ai-model-dropdown-Dk2SdB3C.js";import{a as ue,d as I}from"./hotkeys-BHHWjLlp.js";import{y as lt}from"./utils-YqBXNpsM.js";import{n as _,t as fe}from"./constants-B6Cb__3x.js";import{S as ye,h as st,x as rt}from"./config-Q0O7_stz.js";import{t as dt}from"./jsx-runtime-ZmTK25f3.js";import{r as ct,t as ae}from"./button-CZ3Cs4qb.js";import{r as P}from"./requests-B4FYHTZl.js";import{t as h}from"./createLucideIcon-BCdY6lG5.js";import{a as be,f as ht,i as ke,m as pt,p as xe,u as we}from"./layout-_O8thjaV.js";import{t as ge}from"./check-Dr3SxUsb.js";import{c as mt,d as je,n as ut,o as ft,r as ve,t as yt}from"./download-os8QlW6l.js";import{f as bt}from"./maps-D2_Mq1pZ.js";import{r as kt}from"./useCellActionButton-DUDHPTmq.js";import{t as xt}from"./copy-D-8y6iMN.js";import{t as wt}from"./download-Dg7clfkc.js";import{t as gt}from"./eye-off-AK_9uodG.js";import{t as jt}from"./file-plus-corner-CvAy4H5W.js";import{t as vt}from"./file-Ch78NKWp.js";import{i as Ct,n as zt,r as Mt,t as Wt}from"./youtube--tNPNRy6.js";import{n as _t,r as St,t as At}from"./square-CuJ72M8f.js";import{n as Nt}from"./play-GLWQQs7F.js";import{t as Dt}from"./link-DxicfMbs.js";import{r as It}from"./input-DUrq2DiR.js";import{t as Pt}from"./settings-OBbrbhij.js";import{y as Et}from"./textarea-CRI7xDBj.js";import{t as C}from"./use-toast-BDYuj3zG.js";import{n as Ce,t as Tt}from"./paths-BzSgteR-.js";import{o as Ht}from"./session-BOFn9QrD.js";import{a as Lt,c as qt,i as Rt,n as Vt,r as Ot,s as Bt,t as Ut}from"./select-BVdzZKAh.js";import{t as Yt}from"./tooltip-CMQz28hC.js";import{a as ze,i as $t,r as Ft}from"./mode-Bn7pdJvO.js";import{o as Gt}from"./alert-dialog-BW4srmS0.js";import{a as Kt,c as Jt,i as Qt,n as Xt,r as Zt}from"./dialog-eb-NieZw.js";import{n as oe}from"./ImperativeModal-BNN1HA7x.js";import{r as ea,t as ta}from"./share-ipf2hrOh.js";import{t as U}from"./copy-DHrHayPa.js";import{r as aa}from"./useRunCells-D2HBb4DB.js";import{a as oa}from"./cell-link-B9b7J8QK.js";import{a as Me}from"./renderShortcut-BckyRbYt.js";import{t as na}from"./icons-CCHmxi8d.js";import{t as ia}from"./links-DWIqY1l5.js";import{r as la,t as sa}from"./hooks-BGeojgid.js";import{t as We}from"./types-iYXk7c05.js";var ra=h("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),da=h("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),_e=h("clipboard-copy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]),Se=h("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]),Ae=h("diamond-plus",[["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z",key:"1ey20j"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),ca=h("fast-forward",[["path",{d:"M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z",key:"b19h5q"}],["path",{d:"M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z",key:"h7h5ge"}]]),ha=h("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]),pa=h("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]),Ne=h("layout-template",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]),ma=h("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),ua=h("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),De=h("presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),fa=h("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),ya=h("square-power",[["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M7.998 9.003a5 5 0 1 0 8-.005",key:"1pek45"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]),Ie=h("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),Pe=W(),ne=de(Ue(),1),a=de(dt(),1),Y="https://static.marimo.app";const ba=e=>{let t=(0,Pe.c)(25),{onClose:n}=e,[o,l]=(0,ne.useState)(""),{exportAsHTML:r}=P(),s=`${o}-${Math.random().toString(36).slice(2,6)}`,i=`${Y}/static/${s}`,d;t[0]!==r||t[1]!==n||t[2]!==s?(d=async v=>{v.preventDefault(),n();let S=await r({download:!1,includeCode:!0,files:ht.INSTANCE.filenames()}),z=C({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${Y}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:S,path:s})}).catch(()=>{z.dismiss(),C({title:"Error uploading static page",description:(0,a.jsxs)("div",{children:["Please try again later. If the problem persists, please file a bug report on"," ",(0,a.jsx)("a",{href:_.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),z.dismiss(),C({title:"Static page uploaded!",description:(0,a.jsxs)("div",{children:["The URL has been copied to your clipboard.",(0,a.jsx)("br",{}),"You can share it with anyone."]})})},t[0]=r,t[1]=n,t[2]=s,t[3]=d):d=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(Jt,{children:"Share static notebook"}),t[4]=p):p=t[4];let w;t[5]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsxs)(Kt,{children:[p,(0,a.jsxs)(Zt,{children:["You can publish a static, non-interactive version of this notebook to the public web. We will create a link for you that lives on"," ",(0,a.jsx)("a",{href:Y,target:"_blank",children:Y}),"."]})]}),t[5]=w):w=t[5];let g;t[6]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{l(v.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},t[6]=g):g=t[6];let m;t[7]===o?m=t[8]:(m=(0,a.jsx)(It,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:g,required:!0,autoComplete:"off"}),t[7]=o,t[8]=m);let u;t[9]===i?u=t[10]:(u=(0,a.jsxs)("div",{className:"font-semibold text-sm text-muted-foreground gap-2 flex flex-col",children:["Anyone will be able to access your notebook at this URL:",(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(ka,{text:i}),(0,a.jsx)("span",{className:"text-primary",children:i})]})]}),t[9]=i,t[10]=u);let f;t[11]!==m||t[12]!==u?(f=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[m,u]}),t[11]=m,t[12]=u,t[13]=f):f=t[13];let y;t[14]===n?y=t[15]:(y=(0,a.jsx)(ae,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),t[14]=n,t[15]=y);let b;t[16]===i?b=t[17]:(b=(0,a.jsx)(ae,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await U(i)},children:"Create"}),t[16]=i,t[17]=b);let k;t[18]!==y||t[19]!==b?(k=(0,a.jsxs)(Qt,{children:[y,b]}),t[18]=y,t[19]=b,t[20]=k):k=t[20];let j;return t[21]!==d||t[22]!==k||t[23]!==f?(j=(0,a.jsx)(Xt,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:d,children:[w,f,k]})}),t[21]=d,t[22]=k,t[23]=f,t[24]=j):j=t[24],j};var ka=e=>{let t=(0,Pe.c)(8),[n,o]=ne.useState(!1),l;t[0]===e.text?l=t[1]:(l=ct.stopPropagation(async p=>{p.preventDefault(),await U(e.text),o(!0),setTimeout(()=>o(!1),2e3)}),t[0]=e.text,t[1]=l);let r=l,s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(xt,{size:14,strokeWidth:1.5}),t[2]=s):s=t[2];let i;t[3]===r?i=t[4]:(i=(0,a.jsx)(ae,{"data-testid":"copy-static-notebook-url-button",onClick:r,size:"xs",variant:"secondary",children:s}),t[3]=r,t[4]=i);let d;return t[5]!==n||t[6]!==i?(d=(0,a.jsx)(Yt,{content:"Copied!",open:n,children:i}),t[5]=n,t[6]=i,t[7]=d):d=t[7],d},xa=W();function wa(){let e=document.getElementsByClassName(fe.outputArea);for(let t of e){let n=t.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=te.findElement(t);if(!o){I.warn("Could not find HTMLCellId for visible output area",t);continue}return{cellId:te.parse(o.id)}}}return I.warn("No visible output area found for scroll anchor"),null}function ga(e){if(!e){I.warn("No scroll anchor provided to restore scroll position");return}let t=document.getElementById(te.create(e.cellId));if(!t){I.warn("Could not find cell element to restore scroll position",e.cellId);return}if(!t.querySelector(`.${fe.outputArea}`)){I.warn("Could not find output area to restore scroll position",e.cellId);return}t.scrollIntoView({block:"start",behavior:"auto"})}function Ee(){let e=(0,xa.c)(2),t=D(ze),n;return e[0]===t?n=e[1]:(n=()=>{let o=wa();t(l=>({mode:$t(l.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ga(o)})})},e[0]=t,e[1]=n),n}const Te=Be(!1);var ja=W();const va=()=>{let e=(0,ja.c)(7),{selectedLayout:t}=be(),{setLayoutView:n}=ke();if(ye()&&!he("wasm_layouts"))return null;let o;e[0]===n?o=e[1]:(o=i=>n(i),e[0]=n,e[1]=o);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Bt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(qt,{placeholder:"Select a view"})}),e[2]=l):l=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(Vt,{children:(0,a.jsxs)(Ot,{children:[(0,a.jsx)(Lt,{children:"View as"}),We.map(za)]})}),e[3]=r):r=e[3];let s;return e[4]!==t||e[5]!==o?(s=(0,a.jsxs)(Ut,{"data-testid":"layout-select",value:t,onValueChange:o,children:[l,r]}),e[4]=t,e[5]=o,e[6]=s):s=e[6],s};function Ca(e){return(0,a.jsx)(He(e),{className:"h-4 w-4"})}function He(e){switch(e){case"vertical":return ma;case"grid":return Mt;case"slides":return De;default:return at(e),At}}function Le(e){return me(e)}function za(e){return(0,a.jsx)(Rt,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[Ca(e),(0,a.jsx)("span",{children:Le(e)})]})},e)}var Ma=W();function Wa(e){let t=(0,Ma.c)(5),{openPrompt:n,closeModal:o}=oe(),{sendCopy:l}=P(),r;return t[0]!==o||t[1]!==n||t[2]!==l||t[3]!==e?(r=()=>{if(!e)return null;let s=Tt.guessDeliminator(e);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${Ce.basename(e)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:i=>{let d=s.join(Ce.dirname(e),i);l({source:e,destination:d}).then(()=>{o(),C({title:"Notebook copied",description:"A copy of the notebook has been created."}),ia(d)})}})},t[0]=o,t[1]=n,t[2]=l,t[3]=e,t[4]=r):r=t[4],r}const _a=()=>{let{updateCellConfig:e}=pe(),{saveCellConfig:t}=P();return(0,ne.useCallback)(async()=>{let n=new $e,o=ce(),l=o.cellIds.inOrderIds,r={};for(let i of l){if(o.cellData[i]===void 0)continue;let{code:d,config:p}=o.cellData[i];p.hide_code||n.isSupported(d)&&(r[i]={hide_code:!0})}let s=ue.entries(r);if(s.length!==0){await t({configs:r});for(let[i,d]of s)e({cellId:i,config:d})}},[e])};var Sa=W();function qe(){let e=(0,Sa.c)(4),{openConfirm:t}=oe(),n=D(st),{sendRestart:o}=P(),l;return e[0]!==t||e[1]!==o||e[2]!==n?(l=()=>{t({title:"Restart Kernel",description:"This will restart the Python kernel. You'll lose all data that's in memory. You will also lose any unsaved changes, so make sure to save your work before restarting.",variant:"destructive",confirmAction:(0,a.jsx)(Gt,{onClick:async()=>{n({state:rt.CLOSING}),await o(),ea()},"aria-label":"Confirm Restart",children:"Restart"})})},e[0]=t,e[1]=o,e[2]=n,e[3]=l):l=e[3],l}var Aa=W(),E=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation()};function Na(){var se,re;let e=(0,Aa.c)(40),t=oa(),{openModal:n,closeModal:o}=oe(),{toggleApplication:l}=Ke(),{selectedPanel:r}=Qe(),[s]=Oe(ze),i=ee(Ft),d=_a(),[p]=lt(),{updateCellConfig:w,undoDeleteCell:g,clearAllCellOutputs:m,addSetupCellIfDoesntExist:u,collapseAllCells:f,expandAllCells:y}=pe(),b=qe(),k=aa(),j=Wa(t),v=D(Te),S=D(nt),z=D(it),{exportAsMarkdown:$,readCode:A,saveCellConfig:F,updateCellOutputs:G}=P(),K=ee(Je),J=ee(Ze),{selectedLayout:Q}=be(),{setLayoutView:X}=ke(),T=Ee(),Z=la(),H=((se=p.sharing)==null?void 0:se.html)??!0,L=((re=p.sharing)==null?void 0:re.wasm)??!0,q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q=he("server_side_pdf_export"),e[0]=q):q=e[0];let le=q,R=le||s.mode==="present",Re=Ga,V;e[1]===Symbol.for("react.memo_cache_sentinel")?(V=(0,a.jsx)(wt,{size:14,strokeWidth:1.5}),e[1]=V):V=e[1];let O;e[2]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(xe,{size:14,strokeWidth:1.5}),e[2]=O):O=e[2];let M;e[3]===t?M=e[4]:(M=async()=>{if(!t){ie();return}await we({filename:t,includeCode:!0})},e[3]=t,e[4]=M);let B;return e[5]!==u||e[6]!==J||e[7]!==m||e[8]!==o||e[9]!==f||e[10]!==j||e[11]!==y||e[12]!==$||e[13]!==t||e[14]!==K||e[15]!==d||e[16]!==i||e[17]!==n||e[18]!==R||e[19]!==A||e[20]!==b||e[21]!==k||e[22]!==F||e[23]!==Q||e[24]!==r||e[25]!==v||e[26]!==z||e[27]!==X||e[28]!==S||e[29]!==H||e[30]!==L||e[31]!==M||e[32]!==Z||e[33]!==l||e[34]!==T||e[35]!==g||e[36]!==w||e[37]!==G||e[38]!==s.mode?(B=[{icon:V,label:"Download",handle:E,dropdown:[{icon:O,label:"Download as HTML",handle:M},{icon:(0,a.jsx)(xe,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!t){ie();return}await we({filename:t,includeCode:!1})}},{icon:(0,a.jsx)(na,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let c=await $({download:!1});ve(new Blob([c],{type:"text/plain"}),je.toMarkdown(document.title))}},{icon:(0,a.jsx)(pt,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let c=await A();ve(new Blob([c.contents],{type:"text/plain"}),je.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(Nt,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:s.mode!=="present",tooltip:s.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",Me("global.hideCode",!1)]}),handle:Fa},{icon:(0,a.jsx)(vt,{size:14,strokeWidth:1.5}),label:"Download as PDF",disabled:!R,tooltip:R?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",Me("global.hideCode",!1)]}),handle:async()=>{if(le){if(!t){ie();return}await mt("Downloading PDF...",async N=>{await sa({takeScreenshots:()=>Z({progress:N}),updateCellOutputs:G}),await ut({filename:t,webpdf:!1})});return}let c=new Event("export-beforeprint"),x=new Event("export-afterprint");(function(){window.dispatchEvent(c),setTimeout($a,0),setTimeout(()=>window.dispatchEvent(x),0)})()}}]},{icon:(0,a.jsx)(fa,{size:14,strokeWidth:1.5}),label:"Share",handle:E,hidden:!H&&!L,dropdown:[{icon:(0,a.jsx)(St,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!H,handle:async()=>{n((0,a.jsx)(ba,{onClose:o}))}},{icon:(0,a.jsx)(Dt,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!L,handle:async()=>{await U(ta({code:(await A()).contents})),C({title:"Copied",description:"Link copied to clipboard."})}}]},{icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:E,dropdown:et.flatMap(c=>{let{type:x,Icon:N,hidden:Ve}=c;return Ve?[]:{label:me(x),rightElement:Re(r===x),icon:(0,a.jsx)(N,{size:14,strokeWidth:1.5}),handle:()=>l(x)}})},{icon:(0,a.jsx)(De,{size:14,strokeWidth:1.5}),label:"Present as",handle:E,dropdown:[{icon:s.mode==="present"?(0,a.jsx)(Et,{size:14,strokeWidth:1.5}):(0,a.jsx)(Ne,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{T()}},...We.map((c,x)=>{let N=He(c);return{divider:x===0,label:Le(c),icon:(0,a.jsx)(N,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:Q===c&&(0,a.jsx)(ge,{size:14})}),handle:()=>{X(c),s.mode==="edit"&&T()}}})]},{icon:(0,a.jsx)(ha,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!t||ye(),handle:j},{icon:(0,a.jsx)(_e,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!t,handle:async()=>{await U((await A()).contents),C({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(kt,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!K||i,handle:async()=>{let c=tt(ce());await F({configs:ue.fromEntries(c.map(Ya))});for(let x of c)w({cellId:x,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(Ae,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{u({})}},{icon:(0,a.jsx)(Ge,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(ot,{onClose:o}))}},{icon:(0,a.jsx)(Ie,{size:14,strokeWidth:1.5}),label:"Undo cell deletion",hidden:!J||i,handle:()=>{g()}},{icon:(0,a.jsx)(ya,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:b},{icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{k()}},{icon:(0,a.jsx)(Xe,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{m()}},{icon:(0,a.jsx)(gt,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:f,redundant:!0},{icon:(0,a.jsx)(ra,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:y,redundant:!0},{divider:!0,icon:(0,a.jsx)(Se,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>v(Ua)},{icon:(0,a.jsx)(pa,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>z(Ba)},{icon:(0,a.jsx)(Pt,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>S(Oa),redundant:!0},{icon:(0,a.jsx)(bt,{size:14,strokeWidth:1.5}),label:"Resources",handle:E,dropdown:[{icon:(0,a.jsx)(Fe,{size:14,strokeWidth:1.5}),label:"Documentation",handle:Va},{icon:(0,a.jsx)(Ct,{size:14,strokeWidth:1.5}),label:"GitHub",handle:Ra},{icon:(0,a.jsx)(zt,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:qa},{icon:(0,a.jsx)(Wt,{size:14,strokeWidth:1.5}),label:"YouTube",handle:La},{icon:(0,a.jsx)(Ye,{size:14,strokeWidth:1.5}),label:"Changelog",handle:Ha}]},{divider:!0,icon:(0,a.jsx)(_t,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:Ta},{icon:(0,a.jsx)(jt,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:Ea}].filter(Pa).map(Da),e[5]=u,e[6]=J,e[7]=m,e[8]=o,e[9]=f,e[10]=j,e[11]=y,e[12]=$,e[13]=t,e[14]=K,e[15]=d,e[16]=i,e[17]=n,e[18]=R,e[19]=A,e[20]=b,e[21]=k,e[22]=F,e[23]=Q,e[24]=r,e[25]=v,e[26]=z,e[27]=X,e[28]=S,e[29]=H,e[30]=L,e[31]=M,e[32]=Z,e[33]=l,e[34]=T,e[35]=g,e[36]=w,e[37]=G,e[38]=s.mode,e[39]=B):B=e[39],B}function Da(e){return e.dropdown?{...e,dropdown:e.dropdown.filter(Ia)}:e}function Ia(e){return!e.hidden}function Pa(e){return!e.hidden}function Ea(){let e=Ht();window.open(e,"_blank")}function Ta(){let e=document.baseURI.split("?")[0];window.open(e,"_self")}function Ha(){window.open(_.releasesPage,"_blank")}function La(){window.open(_.youtube,"_blank")}function qa(){window.open(_.discordLink,"_blank")}function Ra(){window.open(_.githubPage,"_blank")}function Va(){window.open(_.docsPage,"_blank")}function Oa(e){return!e}function Ba(e){return!e}function Ua(e){return!e}function Ya(e){return[e,{disabled:!1}]}function $a(){return window.print()}async function Fa(){let e=document.getElementById("App");e&&await ft({element:e,filename:document.title,prepare:yt})}function Ga(e){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:e&&(0,a.jsx)(ge,{size:14})})}function ie(){C({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{Ee as a,Ae as c,Te as i,Se as l,qe as n,Ie as o,va as r,Ne as s,Na as t,_e as u};
import{s as h}from"./chunk-LvLJmgfZ.js";import{t as c}from"./react-Bj1aDYRI.js";import{t as y}from"./context-BfYAMNLF.js";var l=new Map,m=!1;try{m=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}var u=!1;try{u=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}var p={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},f=class{format(t){var e;let r="";if(r=!m&&this.options.signDisplay!=null?b(this.numberFormatter,this.options.signDisplay,t):this.numberFormatter.format(t),this.options.style==="unit"&&!u){let{unit:s,unitDisplay:i="short",locale:a}=this.resolvedOptions();if(!s)return r;let o=(e=p[s])==null?void 0:e[i];r+=o[a]||o.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw RangeError("End date must be >= start date");return`${this.format(t)} \u2013 ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw RangeError("End date must be >= start date");let e=this.numberFormatter.formatToParts(t),s=this.numberFormatter.formatToParts(r);return[...e.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...s.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!m&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!u&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,r={}){this.numberFormatter=d(t,r),this.options=r}};function d(t,r={}){var a;let{numberingSystem:e}=r;if(e&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${e}`),r.style==="unit"&&!u){let{unit:o,unitDisplay:n="short"}=r;if(!o)throw Error('unit option must be provided with style: "unit"');if(!((a=p[o])!=null&&a[n]))throw Error(`Unsupported unit ${o} with unitDisplay = ${n}`);r={...r,style:"decimal"}}let s=t+(r?Object.entries(r).sort((o,n)=>o[0]<n[0]?-1:1).join():"");if(l.has(s))return l.get(s);let i=new Intl.NumberFormat(t,r);return l.set(s,i),i}function b(t,r,e){if(r==="auto")return t.format(e);if(r==="never")return t.format(Math.abs(e));{let s=!1;if(r==="always"?s=e>0||Object.is(e,0):r==="exceptZero"&&(Object.is(e,-0)||Object.is(e,0)?e=Math.abs(e):s=e>0),s){let i=t.format(-e),a=t.format(e),o=i.replace(a,"").replace(/\u200e|\u061C/,"");return[...o].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(a,"!!!").replace(o,"+").replace("!!!",a)}else return t.format(e)}}var g=h(c(),1);function D(t={}){let{locale:r}=y();return(0,g.useMemo)(()=>new f(r,t),[r,t])}export{f as n,D as t};
import{s as Ge}from"./chunk-LvLJmgfZ.js";import{t as Ve}from"./react-Bj1aDYRI.js";import{t as Be}from"./react-dom-CSu739Rf.js";import{n as We}from"./clsx-D8GwTfvk.js";import{n as _e}from"./SSRProvider-BIDQNg9Q.js";var f=Ge(Ve(),1),A=typeof document<"u"?f.useLayoutEffect:()=>{},Ye=f.useInsertionEffect??A;function T(e){let t=(0,f.useRef)(null);return Ye(()=>{t.current=e},[e]),(0,f.useCallback)((...n)=>{let r=t.current;return r==null?void 0:r(...n)},[])}function Xe(e){let[t,n]=(0,f.useState)(e),r=(0,f.useRef)(null),a=T(()=>{if(!r.current)return;let l=r.current.next();if(l.done){r.current=null;return}t===l.value?a():n(l.value)});return A(()=>{r.current&&a()}),[t,T(l=>{r.current=l(t),a()})]}var qe=!!(typeof window<"u"&&window.document&&window.document.createElement),O=new Map,U;typeof FinalizationRegistry<"u"&&(U=new FinalizationRegistry(e=>{O.delete(e)}));function me(e){let[t,n]=(0,f.useState)(e),r=(0,f.useRef)(null),a=_e(t),l=(0,f.useRef)(null);if(U&&U.register(l,a),qe){let u=O.get(a);u&&!u.includes(r)?u.push(r):O.set(a,[r])}return A(()=>{let u=a;return()=>{U&&U.unregister(l),O.delete(u)}},[a]),(0,f.useEffect)(()=>{let u=r.current;return u&&n(u),()=>{u&&(r.current=null)}}),a}function $e(e,t){if(e===t)return e;let n=O.get(e);if(n)return n.forEach(a=>a.current=t),t;let r=O.get(t);return r?(r.forEach(a=>a.current=e),e):t}function Je(e=[]){let t=me(),[n,r]=Xe(t),a=(0,f.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return A(a,[t,a,...e]),n}function Z(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}var L=e=>(e==null?void 0:e.ownerDocument)??document,j=e=>e&&"window"in e&&e.window===e?e:L(e).defaultView||window;function Qe(e){return typeof e=="object"&&!!e&&"nodeType"in e&&typeof e.nodeType=="number"}function Ze(e){return Qe(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var et=!1;function V(){return et}function w(e,t){if(!V())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName==="SLOT"&&n.assignedSlot?n.assignedSlot.parentNode:Ze(n)?n.host:n.parentNode}return!1}var tt=(e=document)=>{var n;if(!V())return e.activeElement;let t=e.activeElement;for(;t&&"shadowRoot"in t&&((n=t.shadowRoot)!=null&&n.activeElement);)t=t.shadowRoot.activeElement;return t};function b(e){return V()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function ee(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let l=t[a],u=r[a];typeof l=="function"&&typeof u=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Z(l,u):(a==="className"||a==="UNSAFE_className")&&typeof l=="string"&&typeof u=="string"?t[a]=We(l,u):a==="id"&&l&&u?t.id=$e(l,u):t[a]=u===void 0?l:u}}return t}function z(e){if(nt())e.focus({preventScroll:!0});else{let t=rt(e);e.focus(),it(t)}}var B=null;function nt(){if(B==null){B=!1;try{document.createElement("div").focus({get preventScroll(){return B=!0,!0}})}catch{}}return B}function rt(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function it(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function W(e){var n;if(typeof window>"u"||window.navigator==null)return!1;let t=(n=window.navigator.userAgentData)==null?void 0:n.brands;return Array.isArray(t)&&t.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function te(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function P(e){let t=null;return()=>(t??(t=e()),t)}var x=P(function(){return te(/^Mac/i)}),Ee=P(function(){return te(/^iPhone/i)}),ne=P(function(){return te(/^iPad/i)||x()&&navigator.maxTouchPoints>1}),_=P(function(){return Ee()||ne()}),at=P(function(){return x()||_()}),be=P(function(){return W(/AppleWebKit/i)&&!he()}),he=P(function(){return W(/Chrome/i)}),re=P(function(){return W(/Android/i)}),ot=P(function(){return W(/Firefox/i)}),st=(0,f.createContext)({isNative:!0,open:ut,useHref:e=>e});function ie(){return(0,f.useContext)(st)}function M(e,t,n=!0){var E;var r;let{metaKey:a,ctrlKey:l,altKey:u,shiftKey:d}=t;ot()&&(r=window.event)!=null&&((E=r.type)!=null&&E.startsWith("key"))&&e.target==="_blank"&&(x()?a=!0:l=!0);let v=be()&&x()&&!ne()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:l,altKey:u,shiftKey:d}):new MouseEvent("click",{metaKey:a,ctrlKey:l,altKey:u,shiftKey:d,bubbles:!0,cancelable:!0});M.isOpening=n,z(e),e.dispatchEvent(v),M.isOpening=!1}M.isOpening=!1;function lt(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function ut(e,t){lt(e,n=>M(n,t))}function ct(e){let t=ie().useHref(e.href??"");return{"data-href":e.href?t:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function dt(e){let t=ie().useHref((e==null?void 0:e.href)??"");return{href:e!=null&&e.href?t:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}var S=new Map,ae=new Set;function Te(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=S.get(r.target);a||(a=new Set,S.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=S.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),S.delete(r.target)),S.size===0)){for(let l of ae)l();ae.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Te):Te());function ft(){for(let[e]of S)"isConnected"in e&&!e.isConnected&&S.delete(e)}function we(e){requestAnimationFrame(()=>{ft(),S.size===0?e():ae.add(e)})}function Pe(){let e=(0,f.useRef)(new Map),t=(0,f.useCallback)((a,l,u,d)=>{let v=d!=null&&d.once?(...E)=>{e.current.delete(u),u(...E)}:u;e.current.set(u,{type:l,eventTarget:a,fn:v,options:d}),a.addEventListener(l,v,d)},[]),n=(0,f.useCallback)((a,l,u,d)=>{var E;let v=((E=e.current.get(u))==null?void 0:E.fn)||u;a.removeEventListener(l,v,d),e.current.delete(u)},[]),r=(0,f.useCallback)(()=>{e.current.forEach((a,l)=>{n(a.eventTarget,a.type,l,a.options)})},[n]);return(0,f.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Le(e,t){A(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Se(e){return e.pointerType===""&&e.isTrusted?!0:re()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ke(e){return!re()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var pt=typeof Element<"u"&&"checkVisibility"in Element.prototype;function gt(e){let t=j(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a=n!=="none"&&r!=="hidden"&&r!=="collapse";if(a){let{getComputedStyle:l}=e.ownerDocument.defaultView,{display:u,visibility:d}=l(e);a=u!=="none"&&d!=="hidden"&&d!=="collapse"}return a}function vt(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function oe(e,t){return pt?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&gt(e)&&vt(e,t)&&(!e.parentElement||oe(e.parentElement,e))}var se=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],yt=se.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";se.push('[tabindex]:not([tabindex="-1"]):not([disabled])');var mt=se.join(':not([hidden]):not([tabindex="-1"]),');function Ae(e){return e.matches(yt)&&oe(e)&&!Me(e)}function Et(e){return e.matches(mt)&&oe(e)&&!Me(e)}function Me(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function bt(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function Ke(e,t,n){bt(e,t),t.set(e,n)}function le(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ce(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function ht(e){let t=(0,f.useRef)({isFocused:!1,observer:null});A(()=>{let r=t.current;return()=>{r.observer&&(r.observer=(r.observer.disconnect(),null))}},[]);let n=T(r=>{e==null||e(r)});return(0,f.useCallback)(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let a=r.target;a.addEventListener("focusout",l=>{t.current.isFocused=!1,a.disabled&&n(le(l)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&a.disabled){var l;(l=t.current.observer)==null||l.disconnect();let u=a===document.activeElement?null:document.activeElement;a.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[n])}var ue=!1;function Tt(e){for(;e&&!Ae(e);)e=e.parentElement;let t=j(e),n=t.document.activeElement;if(!n||n===e)return;ue=!0;let r=!1,a=h=>{(h.target===n||r)&&h.stopImmediatePropagation()},l=h=>{(h.target===n||r)&&(h.stopImmediatePropagation(),!e&&!r&&(r=!0,z(n),v()))},u=h=>{(h.target===e||r)&&h.stopImmediatePropagation()},d=h=>{(h.target===e||r)&&(h.stopImmediatePropagation(),r||(r=!0,z(n),v()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",l,!0),t.addEventListener("focusin",d,!0),t.addEventListener("focus",u,!0);let v=()=>{cancelAnimationFrame(E),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",l,!0),t.removeEventListener("focusin",d,!0),t.removeEventListener("focus",u,!0),ue=!1,r=!1},E=requestAnimationFrame(v);return v}var F="default",ce="",Y=new WeakMap;function wt(e){if(_()){if(F==="default"){let t=L(e);ce=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}F="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Y.set(e,e.style[t]),e.style[t]="none"}}function Ie(e){if(_()){if(F!=="disabled")return;F="restoring",setTimeout(()=>{we(()=>{if(F==="restoring"){let t=L(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=ce||""),ce="",F="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Y.has(e)){let t=Y.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Y.delete(e)}}var de=f.createContext({register:()=>{}});de.displayName="PressResponderContext";function Pt(e,t){return t.get?t.get.call(e):t.value}function Oe(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Lt(e,t){return Pt(e,Oe(e,t,"get"))}function St(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=n}}function xe(e,t,n){return St(e,Oe(e,t,"set"),n),n}Be();function kt(e){let t=(0,f.useContext)(de);if(t){let{register:n,...r}=t;e=ee(r,e),n()}return Le(t,e.ref),e}var X=new WeakMap,q=class{continuePropagation(){xe(this,X,!1)}get shouldStopPropagation(){return Lt(this,X)}constructor(e,t,n,r){var E;Ke(this,X,{writable:!0,value:void 0}),xe(this,X,!0);let a=(E=(r==null?void 0:r.target)??n.currentTarget)==null?void 0:E.getBoundingClientRect(),l,u=0,d,v=null;n.clientX!=null&&n.clientY!=null&&(d=n.clientX,v=n.clientY),a&&(d!=null&&v!=null?(l=d-a.left,u=v-a.top):(l=a.width/2,u=a.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=l,this.y=u}},Fe=Symbol("linkClicked"),He="react-aria-pressable-style",Ne="data-react-aria-pressable";function At(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:l,onClick:u,isDisabled:d,isPressed:v,preventFocusOnPress:E,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:H,ref:$,...Ue}=kt(e),[je,ge]=(0,f.useState)(!1),C=(0,f.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:N,removeAllGlobalListeners:J}=Pe(),D=T((i,c)=>{let m=C.current;if(d||m.didFirePressStart)return!1;let o=!0;if(m.isTriggeringEvent=!0,r){let p=new q("pressstart",c,i);r(p),o=p.shouldStopPropagation}return n&&n(!0),m.isTriggeringEvent=!1,m.didFirePressStart=!0,ge(!0),o}),I=T((i,c,m=!0)=>{let o=C.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let p=!0;if(a){let s=new q("pressend",c,i);a(s),p=s.shouldStopPropagation}if(n&&n(!1),ge(!1),t&&m&&!d){let s=new q("press",c,i);t(s),p&&(p=s.shouldStopPropagation)}return o.isTriggeringEvent=!1,p}),R=T((i,c)=>{let m=C.current;if(d)return!1;if(l){m.isTriggeringEvent=!0;let o=new q("pressup",c,i);return l(o),m.isTriggeringEvent=!1,o.shouldStopPropagation}return!0}),k=T(i=>{let c=C.current;if(c.isPressed&&c.target){c.didFirePressStart&&c.pointerType!=null&&I(K(c.target,i),c.pointerType,!1),c.isPressed=!1,c.isOverTarget=!1,c.activePointerId=null,c.pointerType=null,J(),H||Ie(c.target);for(let m of c.disposables)m();c.disposables=[]}}),ve=T(i=>{h&&k(i)}),Q=T(i=>{d||(u==null||u(i))}),ye=T((i,c)=>{if(!d&&u){let m=new MouseEvent("click",i);Ce(m,c),u(le(m))}}),ze=(0,f.useMemo)(()=>{let i=C.current,c={onKeyDown(o){if(pe(o.nativeEvent,o.currentTarget)&&w(o.currentTarget,b(o.nativeEvent))){var p;De(b(o.nativeEvent),o.key)&&o.preventDefault();let s=!0;if(!i.isPressed&&!o.repeat){i.target=o.currentTarget,i.isPressed=!0,i.pointerType="keyboard",s=D(o,"keyboard");let g=o.currentTarget;N(L(o.currentTarget),"keyup",Z(y=>{pe(y,g)&&!y.repeat&&w(g,b(y))&&i.target&&R(K(i.target,y),"keyboard")},m),!0)}s&&o.stopPropagation(),o.metaKey&&x()&&((p=i.metaKeyEvents)==null||p.set(o.key,o.nativeEvent))}else o.key==="Meta"&&(i.metaKeyEvents=new Map)},onClick(o){if(!(o&&!w(o.currentTarget,b(o.nativeEvent)))&&o&&o.button===0&&!i.isTriggeringEvent&&!M.isOpening){let p=!0;if(d&&o.preventDefault(),!i.ignoreEmulatedMouseEvents&&!i.isPressed&&(i.pointerType==="virtual"||Se(o.nativeEvent))){let s=D(o,"virtual"),g=R(o,"virtual"),y=I(o,"virtual");Q(o),p=s&&g&&y}else if(i.isPressed&&i.pointerType!=="keyboard"){let s=i.pointerType||o.nativeEvent.pointerType||"virtual",g=R(K(o.currentTarget,o),s),y=I(K(o.currentTarget,o),s,!0);p=g&&y,i.isOverTarget=!1,Q(o),k(o)}i.ignoreEmulatedMouseEvents=!1,p&&o.stopPropagation()}}},m=o=>{var g;if(i.isPressed&&i.target&&pe(o,i.target)){var p;De(b(o),o.key)&&o.preventDefault();let y=b(o),G=w(i.target,b(o));I(K(i.target,o),"keyboard",G),G&&ye(o,i.target),J(),o.key!=="Enter"&&fe(i.target)&&w(i.target,y)&&!o[Fe]&&(o[Fe]=!0,M(i.target,o,!1)),i.isPressed=!1,(p=i.metaKeyEvents)==null||p.delete(o.key)}else if(o.key==="Meta"&&((g=i.metaKeyEvents)!=null&&g.size)){var s;let y=i.metaKeyEvents;i.metaKeyEvents=void 0;for(let G of y.values())(s=i.target)==null||s.dispatchEvent(new KeyboardEvent("keyup",G))}};if(typeof PointerEvent<"u"){c.onPointerDown=s=>{if(s.button!==0||!w(s.currentTarget,b(s.nativeEvent)))return;if(ke(s.nativeEvent)){i.pointerType="virtual";return}i.pointerType=s.pointerType;let g=!0;if(!i.isPressed){i.isPressed=!0,i.isOverTarget=!0,i.activePointerId=s.pointerId,i.target=s.currentTarget,H||wt(i.target),g=D(s,i.pointerType);let y=b(s.nativeEvent);"releasePointerCapture"in y&&y.releasePointerCapture(s.pointerId),N(L(s.currentTarget),"pointerup",o,!1),N(L(s.currentTarget),"pointercancel",p,!1)}g&&s.stopPropagation()},c.onMouseDown=s=>{if(w(s.currentTarget,b(s.nativeEvent))&&s.button===0){if(E){let g=Tt(s.target);g&&i.disposables.push(g)}s.stopPropagation()}},c.onPointerUp=s=>{!w(s.currentTarget,b(s.nativeEvent))||i.pointerType==="virtual"||s.button===0&&!i.isPressed&&R(s,i.pointerType||s.pointerType)},c.onPointerEnter=s=>{s.pointerId===i.activePointerId&&i.target&&!i.isOverTarget&&i.pointerType!=null&&(i.isOverTarget=!0,D(K(i.target,s),i.pointerType))},c.onPointerLeave=s=>{s.pointerId===i.activePointerId&&i.target&&i.isOverTarget&&i.pointerType!=null&&(i.isOverTarget=!1,I(K(i.target,s),i.pointerType,!1),ve(s))};let o=s=>{if(s.pointerId===i.activePointerId&&i.isPressed&&s.button===0&&i.target){if(w(i.target,b(s))&&i.pointerType!=null){let g=!1,y=setTimeout(()=>{i.isPressed&&i.target instanceof HTMLElement&&(g?k(s):(z(i.target),i.target.click()))},80);N(s.currentTarget,"click",()=>g=!0,!0),i.disposables.push(()=>clearTimeout(y))}else k(s);i.isOverTarget=!1}},p=s=>{k(s)};c.onDragStart=s=>{w(s.currentTarget,b(s.nativeEvent))&&k(s)}}return c},[N,d,E,J,H,k,ve,I,D,R,Q,ye]);return(0,f.useEffect)(()=>{if(!$)return;let i=L($.current);if(!i||!i.head||i.getElementById(He))return;let c=i.createElement("style");c.id=He,c.textContent=`
@layer {
[${Ne}] {
touch-action: pan-x pan-y pinch-zoom;
}
}
`.trim(),i.head.prepend(c)},[$]),(0,f.useEffect)(()=>{let i=C.current;return()=>{H||Ie(i.target??void 0);for(let c of i.disposables)c();i.disposables=[]}},[H]),{isPressed:v||je,pressProps:ee(Ue,ze,{[Ne]:!0})}}function fe(e){return e.tagName==="A"&&e.hasAttribute("href")}function pe(e,t){let{key:n,code:r}=e,a=t,l=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof j(a).HTMLInputElement&&!Re(a,n)||a instanceof j(a).HTMLTextAreaElement||a.isContentEditable)&&!((l==="link"||!l&&fe(a))&&n!=="Enter")}function K(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function Mt(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!fe(e)}function De(e,t){return e instanceof HTMLInputElement?!Re(e,t):Mt(e)}var Kt=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Re(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":Kt.has(e.type)}export{tt as A,x as C,z as D,_ as E,Z as F,Je as I,me as L,V as M,L as N,ee as O,j as P,T as R,ne as S,at as T,ie as _,Ce as a,he as b,Ae as c,Se as d,Le as f,M as g,dt as h,ht as i,b as j,w as k,Et as l,we as m,de as n,ue as o,Pe as p,le as r,Ke as s,At as t,ke as u,ct as v,re as w,be as x,Ee as y,A as z};
import{d as I,n as i,p as g}from"./useEvent-BhXAndur.js";import{Cr as k,it as v,m as p,w as F,xn as b,yr as x}from"./cells-DPp5cDaO.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{d as D}from"./hotkeys-BHHWjLlp.js";import{o as H}from"./dist-ChS0Dc_R.js";import{r as V}from"./requests-B4FYHTZl.js";var u=C();const w=g(!1);function _(){let r=(0,u.c)(2),n=d(),t;return r[0]===n?t=r[1]:(t=()=>n(k(p())),r[0]=n,r[1]=t),i(t)}function j(r){let n=(0,u.c)(3),t=d(),e;return n[0]!==r||n[1]!==t?(e=()=>{r!==void 0&&t([r])},n[0]=r,n[1]=t,n[2]=e):e=n[2],i(e)}function q(){let r=(0,u.c)(2),n=d(),t;return r[0]===n?t=r[1]:(t=()=>n(x(p())),r[0]=n,r[1]=t),i(t)}function d(){let r=(0,u.c)(4),{prepareForRun:n}=F(),{sendRun:t}=V(),e=I(w),o;return r[0]!==n||r[1]!==t||r[2]!==e?(o=async s=>{if(s.length===0)return;let c=p();return e(!0),y({cellIds:s,sendRun:t,prepareForRun:n,notebook:c})},r[0]=n,r[1]=t,r[2]=e,r[3]=o):o=r[3],i(o)}async function y({cellIds:r,sendRun:n,prepareForRun:t,notebook:e}){var m,R,h;if(r.length===0)return;let{cellHandles:o,cellData:s}=e,c=[];for(let a of r){let l=(R=(m=o[a])==null?void 0:m.current)==null?void 0:R.editorView,f;l?(b(l)!=="markdown"&&H(l),f=v(l)):f=((h=s[a])==null?void 0:h.code)||"",c.push(f),t({cellId:a})}await n({cellIds:r,codes:c}).catch(a=>{D.error(a)})}export{d as a,j as i,y as n,_ as o,q as r,w as t};
import{s as n}from"./chunk-LvLJmgfZ.js";import{n as p}from"./useEvent-BhXAndur.js";import{f as d,it as f,w as u}from"./cells-DPp5cDaO.js";import{t as c}from"./compiler-runtime-B3qBwwSJ.js";import{t as C}from"./jsx-runtime-ZmTK25f3.js";import{t as h}from"./use-toast-BDYuj3zG.js";import{r as v}from"./useDeleteCell-DdRX94yC.js";var x=c(),b=n(C(),1);function j(){let t=(0,x.c)(3),{splitCell:o,undoSplitCell:r}=u(),i;return t[0]!==o||t[1]!==r?(i=s=>{let l=d(s.cellId);if(!l)return;let a=f(l);o(s);let{dismiss:e}=h({title:"Cell split",action:(0,b.jsx)(v,{"data-testid":"undo-split-button",size:"sm",variant:"outline",onClick:()=>{r({...s,snapshot:a}),m()},children:"Undo"})}),m=e},t[0]=o,t[1]=r,t[2]=i):i=t[2],p(i)}export{j as t};
import{i as o,p as d,u as h}from"./useEvent-BhXAndur.js";import{t as f}from"./compiler-runtime-B3qBwwSJ.js";import{_ as k,t as y}from"./utils-YqBXNpsM.js";var b=f();const g=["light","dark","system"];var p=d(t=>{if(y()){if(document.body.classList.contains("dark-mode")||document.body.classList.contains("dark")||document.body.dataset.theme==="dark"||document.body.dataset.mode==="dark"||s()==="dark")return"dark";let e=window.getComputedStyle(document.body),r=e.getPropertyValue("color-scheme").trim();if(r)return r.includes("dark")?"dark":"light";let a=e.getPropertyValue("background-color").match(/\d+/g);if(a){let[m,u,l]=a.map(Number);return(m*299+u*587+l*114)/1e3<128?"dark":"light"}return"light"}return t(k).display.theme}),n=d(!1);function v(){if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia("(prefers-color-scheme: dark)");o.set(n,t.matches),t.addEventListener("change",e=>{o.set(n,e.matches)})}v();function s(){switch(document.body.dataset.vscodeThemeKind){case"vscode-dark":return"dark";case"vscode-high-contrast":return"dark";case"vscode-light":return"light"}}var i=d(s());function w(){let t=new MutationObserver(()=>{let e=s();o.set(i,e)});return t.observe(document.body,{attributes:!0,attributeFilter:["data-vscode-theme-kind"]}),()=>t.disconnect()}w();const c=d(t=>{let e=t(p),r=t(i);if(r!==void 0)return r;let a=t(n);return e==="system"?a?"dark":"light":e});function L(){let t=(0,b.c)(3),e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={store:o},t[0]=e):e=t[0];let r=h(c,e),a;return t[1]===r?a=t[2]:(a={theme:r},t[1]=r,t[2]=a),a}export{c as n,L as r,g as t};
var Ct=Object.defineProperty;var _e=t=>{throw TypeError(t)};var _t=(t,e,n)=>e in t?Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var a=(t,e,n)=>_t(t,typeof e!="symbol"?e+"":e,n),ce=(t,e,n)=>e.has(t)||_e("Cannot "+n);var u=(t,e,n)=>(ce(t,e,"read from private field"),n?n.call(t):e.get(t)),N=(t,e,n)=>e.has(t)?_e("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),P=(t,e,n,r)=>(ce(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ee=(t,e,n)=>(ce(t,e,"access private method"),n);var j,Z,gt,yt,le,U,z,$,q,O,Y,I,H,D,vt,xt,Et,ue;import{s as Se}from"./chunk-LvLJmgfZ.js";import{i as de,l as te,p as T,u as St}from"./useEvent-BhXAndur.js";import{t as Rt}from"./react-Bj1aDYRI.js";import{Ur as kt,Yr as Ft,b as Nt,ei as qt,mn as Mt,ti as K,y as Pt}from"./cells-DPp5cDaO.js";import{t as Re}from"./compiler-runtime-B3qBwwSJ.js";import{t as jt}from"./get-6uJrSKbw.js";import{t as At}from"./assertNever-CBU83Y6o.js";import{t as It}from"./debounce-B3mjKxHe.js";import{t as Lt}from"./_baseSet-5Rdwpmr3.js";import{d as x,p as b}from"./hotkeys-BHHWjLlp.js";import{t as Tt}from"./invariant-CAG_dYON.js";import{S as Ut}from"./utils-YqBXNpsM.js";import{S as zt}from"./config-Q0O7_stz.js";import{a as Ot}from"./switch-dWLWbbtg.js";import{n as ke}from"./globals-BgACvYmr.js";import{t as Fe}from"./ErrorBoundary-B9Ifj8Jf.js";import{t as Dt}from"./jsx-runtime-ZmTK25f3.js";import{t as Wt}from"./button-CZ3Cs4qb.js";import{t as Ht}from"./cn-BKtXLv3a.js";import{Z as Bt}from"./JsonOutput-PE5ko4gi.js";import{t as Vt}from"./createReducer-B3rBsy4P.js";import{t as me}from"./requests-B4FYHTZl.js";import{t as Ne}from"./createLucideIcon-BCdY6lG5.js";import{t as Xt}from"./x-ZP5cObgf.js";import{a as qe,l as $t,r as Me}from"./markdown-renderer-DJy8ww5d.js";import{t as Yt}from"./DeferredRequestRegistry-CMf25YiV.js";import{t as fe}from"./Deferred-DxQeE5uh.js";import{t as Pe}from"./uuid-DXdzqzcr.js";import{t as Qt}from"./use-toast-BDYuj3zG.js";import{t as je}from"./tooltip-CMQz28hC.js";import{t as Ae}from"./mode-Bn7pdJvO.js";import{n as Gt,r as Kt,t as Jt}from"./share-ipf2hrOh.js";import{r as Zt,t as en}from"./react-resizable-panels.browser.esm-Da3ksQXL.js";import{t as Ie}from"./toggle-zVW4FXNz.js";function tn(t,e,n){return t==null?t:Lt(t,e,n)}var ne=tn,nn=Ne("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]),rn=Ne("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);function sn(t){return{all:t||(t=new Map),on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(s){s(n)}),(r=t.get("*"))&&r.slice().map(function(s){s(e,n)})}}}var c=Se(Rt(),1),pe=(0,c.createContext)(null),an=t=>{let{controller:e}=(0,c.useContext)(pe),n=c.useRef(Symbol("fill"));return(0,c.useEffect)(()=>(e.mount({name:t.name,ref:n.current,children:t.children}),()=>{e.unmount({name:t.name,ref:n.current})}),[]),(0,c.useEffect)(()=>{e.update({name:t.name,ref:n.current,children:t.children})}),null},on=Object.defineProperty,ln=(t,e,n)=>e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Le=(t,e,n)=>(ln(t,typeof e=="symbol"?e:e+"",n),n),Te=console,un=class{constructor(t){Le(this,"_bus"),Le(this,"_db"),this._bus=t,this.handleFillMount=this.handleFillMount.bind(this),this.handleFillUpdated=this.handleFillUpdated.bind(this),this.handleFillUnmount=this.handleFillUnmount.bind(this),this._db={byName:new Map,byFill:new Map}}mount(){this._bus.on("fill-mount",this.handleFillMount),this._bus.on("fill-updated",this.handleFillUpdated),this._bus.on("fill-unmount",this.handleFillUnmount)}unmount(){this._bus.off("fill-mount",this.handleFillMount),this._bus.off("fill-updated",this.handleFillUpdated),this._bus.off("fill-unmount",this.handleFillUnmount)}handleFillMount({fill:t}){let e=c.Children.toArray(t.children),n=t.name,r={fill:t,children:e,name:n},s=this._db.byName.get(n);s?(s.components.push(r),s.listeners.forEach(i=>i([...s.components]))):this._db.byName.set(n,{listeners:[],components:[r]}),this._db.byFill.set(t.ref,r)}handleFillUpdated({fill:t}){let e=this._db.byFill.get(t.ref),n=c.Children.toArray(t.children);if(e){e.children=n;let r=this._db.byName.get(e.name);if(r)r.listeners.forEach(s=>s([...r.components]));else throw Error("registration was expected to be defined")}else{Te.error("[handleFillUpdated] component was expected to be defined");return}}handleFillUnmount({fill:t}){let e=this._db.byFill.get(t.ref);if(!e){Te.error("[handleFillUnmount] component was expected to be defined");return}let n=e.name,r=this._db.byName.get(n);if(!r)throw Error("registration was expected to be defined");r.components=r.components.filter(s=>s!==e),this._db.byFill.delete(t.ref),r.listeners.length===0&&r.components.length===0?this._db.byName.delete(n):r.listeners.forEach(s=>s([...r.components]))}onComponentsChange(t,e){let n=this._db.byName.get(t);n?(n.listeners.push(e),e(n.components)):(this._db.byName.set(t,{listeners:[e],components:[]}),e([]))}getFillsByName(t){let e=this._db.byName.get(t);return e?e.components.map(n=>n.fill):[]}getChildrenByName(t){let e=this._db.byName.get(t);return e?e.components.map(n=>n.children).reduce((n,r)=>n.concat(r),[]):[]}removeOnComponentsChange(t,e){let n=this._db.byName.get(t);if(!n)throw Error("expected registration to be defined");let r=n.listeners;r.splice(r.indexOf(e),1)}},cn=Object.defineProperty,dn=(t,e,n)=>e in t?cn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mn=(t,e,n)=>(dn(t,typeof e=="symbol"?e:e+"",n),n),Ue=class{constructor(){mn(this,"bus",sn())}mount(t){this.bus.emit("fill-mount",{fill:t})}unmount(t){this.bus.emit("fill-unmount",{fill:t})}update(t){this.bus.emit("fill-updated",{fill:t})}};function fn(t){let e=t||new Ue;return{controller:e,manager:new un(e.bus)}}var pn=({controller:t,children:e})=>{let[n]=c.useState(()=>{let r=fn(t);return r.manager.mount(),r});return c.useEffect(()=>()=>{n.manager.unmount()},[]),c.createElement(pe.Provider,{value:n},e)};function he(t,e){let[n,r]=(0,c.useState)([]),{manager:s}=(0,c.useContext)(pe);return(0,c.useEffect)(()=>(s.onComponentsChange(t,r),()=>{s.removeOnComponentsChange(t,r)}),[t]),n.flatMap((i,m)=>{let{children:l}=i;return l.map((h,v)=>{if(typeof h=="number"||typeof h=="string")throw Error("Only element children will work here");return c.cloneElement(h,{key:m.toString()+v.toString(),...e})})})}var ze=t=>{let e=he(t.name,t.childProps);if(typeof t.children=="function"){let n=t.children(e);if(c.isValidElement(n)||n===null)return n;throw Error("Slot rendered with function must return a valid React Element.")}return e};const hn=T(null);var{valueAtom:gn,useActions:yn}=Vt(()=>({banners:[]}),{addBanner:(t,e)=>({...t,banners:[...t.banners,{...e,id:Pe()}]}),removeBanner:(t,e)=>({...t,banners:t.banners.filter(n=>n.id!==e)}),clearBanners:t=>({...t,banners:[]})});const bn=()=>St(gn);function wn(){return yn()}const vn=new Ue,re={SIDEBAR:"sidebar",CONTEXT_AWARE_PANEL:"context-aware-panel"};var xn=class{constructor(){a(this,"subscriptions",new Map)}addSubscription(t,e){var n;this.subscriptions.has(t)||this.subscriptions.set(t,new Set),(n=this.subscriptions.get(t))==null||n.add(e)}removeSubscription(t,e){var n;(n=this.subscriptions.get(t))==null||n.delete(e)}notify(t,e){for(let n of this.subscriptions.get(t)??[])n(e)}},Oe=class Ce{constructor(e){a(this,"subscriptions",new xn);this.producer=e}static withProducerCallback(e){return new Ce(e)}static empty(){return new Ce}startProducer(){this.producer&&this.producer(e=>{this.subscriptions.notify("message",e)})}connect(){return new Promise(e=>setTimeout(e,0)).then(()=>{this.subscriptions.notify("open",new Event("open"))})}get readyState(){return WebSocket.OPEN}reconnect(e,n){this.close(),this.connect()}close(){this.subscriptions.notify("close",new Event("close"))}send(e){return this.subscriptions.notify("message",new MessageEvent("message",{data:e})),Promise.resolve()}addEventListener(e,n){this.subscriptions.addSubscription(e,n),e==="open"&&n(new Event("open")),e==="message"&&this.startProducer()}removeEventListener(e,n){this.subscriptions.removeSubscription(e,n)}},En=1e10,Cn=1e3;function se(t,e){let n=t.map(r=>`"${r}"`).join(", ");return Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${n}`)}function _n(t={}){let e={};function n(o){e=o}let r={};function s(o){var f;r.unregisterHandler&&r.unregisterHandler(),r=o,(f=r.registerHandler)==null||f.call(r,G)}let i;function m(o){if(typeof o=="function"){i=o;return}i=(f,y)=>{let d=o[f];if(d)return d(y);let g=o._;if(!g)throw Error(`The requested method has no handler: ${f}`);return g(f,y)}}let{maxRequestTime:l=Cn}=t;t.transport&&s(t.transport),t.requestHandler&&m(t.requestHandler),t._debugHooks&&n(t._debugHooks);let h=0;function v(){return h<=En?++h:h=0}let E=new Map,w=new Map;function _(o,...f){let y=f[0];return new Promise((d,g)=>{var V;if(!r.send)throw se(["send"],"make requests");let A=v(),W={type:"request",id:A,method:o,params:y};E.set(A,{resolve:d,reject:g}),l!==1/0&&w.set(A,setTimeout(()=>{w.delete(A),g(Error("RPC request timed out."))},l)),(V=e.onSend)==null||V.call(e,W),r.send(W)})}let S=new Proxy(_,{get:(o,f,y)=>f in o?Reflect.get(o,f,y):d=>_(f,d)}),R=S;function k(o,...f){var g;let y=f[0];if(!r.send)throw se(["send"],"send messages");let d={type:"message",id:o,payload:y};(g=e.onSend)==null||g.call(e,d),r.send(d)}let F=new Proxy(k,{get:(o,f,y)=>f in o?Reflect.get(o,f,y):d=>k(f,d)}),C=F,M=new Map,L=new Set;function B(o,f){var y;if(!r.registerHandler)throw se(["registerHandler"],"register message listeners");if(o==="*"){L.add(f);return}M.has(o)||M.set(o,new Set),(y=M.get(o))==null||y.add(f)}function Q(o,f){var y,d;if(o==="*"){L.delete(f);return}(y=M.get(o))==null||y.delete(f),((d=M.get(o))==null?void 0:d.size)===0&&M.delete(o)}async function G(o){var f,y;if((f=e.onReceive)==null||f.call(e,o),!("type"in o))throw Error("Message does not contain a type.");if(o.type==="request"){if(!r.send||!i)throw se(["send","requestHandler"],"handle requests");let{id:d,method:g,params:A}=o,W;try{W={type:"response",id:d,success:!0,payload:await i(g,A)}}catch(V){if(!(V instanceof Error))throw V;W={type:"response",id:d,success:!1,error:V.message}}(y=e.onSend)==null||y.call(e,W),r.send(W);return}if(o.type==="response"){let d=w.get(o.id);d!=null&&clearTimeout(d);let{resolve:g,reject:A}=E.get(o.id)??{};o.success?g==null||g(o.payload):A==null||A(Error(o.error));return}if(o.type==="message"){for(let g of L)g(o.id,o.payload);let d=M.get(o.id);if(!d)return;for(let g of d)g(o.payload);return}throw Error(`Unexpected RPC message type: ${o.type}`)}return{setTransport:s,setRequestHandler:m,request:S,requestProxy:R,send:F,sendProxy:C,addMessageListener:B,removeMessageListener:Q,proxy:{send:C,request:R},_setDebugHooks:n}}function Sn(t){return _n(t)}var De="[transport-id]";function Rn(t,e){let{transportId:n}=e;return n==null?t:{[De]:n,data:t}}function kn(t,e){let{transportId:n,filter:r}=e,s=r==null?void 0:r();if(n!=null&&s!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let i=t;if(n){if(t[De]!==n)return[!0];i=t.data}return s===!1?[!0]:[!1,i]}function Fn(t,e={}){let{transportId:n,filter:r,remotePort:s}=e,i=t,m=s??t,l;return{send(h){m.postMessage(Rn(h,{transportId:n}))},registerHandler(h){l=v=>{let E=v.data,[w,_]=kn(E,{transportId:n,filter:()=>r==null?void 0:r(v)});w||h(_)},i.addEventListener("message",l)},unregisterHandler(){l&&i.removeEventListener("message",l)}}}function Nn(t,e){return Fn(t,e)}function We(t){return Sn({transport:Nn(t,{transportId:"marimo-transport"}),maxRequestTime:2e4,_debugHooks:{onSend:e=>{x.debug("[rpc] Parent -> Worker",e)},onReceive:e=>{x.debug("[rpc] Worker -> Parent",e)}}})}const He=T("Initializing..."),qn=T(t=>{let e=t(Pt),n=Object.values(e.cellRuntime);return n.some(r=>!$t(r.output))?!0:n.every(r=>r.status==="idle")});var Be=Gt(),Ve="marimo:file",Xe=new kt(null);const Mn={saveFile(t){Xe.set(Ve,t)},readFile(){return Xe.get(Ve)}};var Pn={saveFile(t){K.setCodeForHash((0,Be.compressToEncodedURIComponent)(t))},readFile(){let t=K.getCodeFromHash()||K.getCodeFromSearchParam();return t?(0,Be.decompressFromEncodedURIComponent)(t):null}};const jn={saveFile(t){},readFile(){let t=document.querySelector("marimo-code");return t?decodeURIComponent(t.textContent||"").trim():null}};var An={saveFile(t){},readFile(){if(window.location.hostname!=="marimo.app")return null;let t=new URL("files/wasm-intro.py",document.baseURI);return fetch(t.toString()).then(e=>e.ok?e.text():null).catch(()=>null)}},In={saveFile(t){},readFile(){return["import marimo","app = marimo.App()","","@app.cell","def __():"," return","",'if __name__ == "__main__":'," app.run()"].join(`
`)}},$e=class{constructor(t){this.stores=t}insert(t,e){this.stores.splice(t,0,e)}saveFile(t){this.stores.forEach(e=>e.saveFile(t))}readFile(){for(let t of this.stores){let e=t.readFile();if(e)return e}return null}};const ie=new $e([jn,Pn]),ge=new $e([Mn,An,In]);var Ye=class bt{constructor(){a(this,"initialized",new fe);a(this,"sendRename",async({filename:e})=>(e===null||(K.setFilename(e),await this.rpc.proxy.request.bridge({functionName:"rename_file",payload:e})),null));a(this,"sendSave",async e=>{if(!this.saveRpc)return x.warn("Save RPC not initialized"),null;await this.saveRpc.saveNotebook(e);let n=await this.readCode();return n.contents&&(ie.saveFile(n.contents),ge.saveFile(n.contents)),this.rpc.proxy.request.saveNotebook(e).catch(r=>{x.error(r)}),null});a(this,"sendCopy",async()=>{b()});a(this,"sendStdin",async e=>(await this.rpc.proxy.request.bridge({functionName:"put_input",payload:e.text}),null));a(this,"sendPdb",async()=>{b()});a(this,"sendRun",async e=>(await this.rpc.proxy.request.loadPackages(e.codes.join(`
`)),await this.putControlRequest({type:"execute-cells",...e}),null));a(this,"sendRunScratchpad",async e=>(await this.rpc.proxy.request.loadPackages(e.code),await this.putControlRequest({type:"execute-scratchpad",...e}),null));a(this,"sendInterrupt",async()=>(this.interruptBuffer!==void 0&&(this.interruptBuffer[0]=2),null));a(this,"sendShutdown",async()=>(window.close(),null));a(this,"sendFormat",async e=>await this.rpc.proxy.request.bridge({functionName:"format",payload:e}));a(this,"sendDeleteCell",async e=>(await this.putControlRequest({type:"delete-cell",...e}),null));a(this,"sendInstallMissingPackages",async e=>(this.putControlRequest({type:"install-packages",...e}),null));a(this,"sendCodeCompletionRequest",async e=>(de.get(Nt)||await this.rpc.proxy.request.bridge({functionName:"code_complete",payload:e}),null));a(this,"saveUserConfig",async e=>(await this.rpc.proxy.request.bridge({functionName:"save_user_config",payload:e}),Ot.post("/kernel/save_user_config",e,{baseUrl:"/"}).catch(n=>(x.error(n),null))));a(this,"saveAppConfig",async e=>(await this.rpc.proxy.request.bridge({functionName:"save_app_config",payload:e}),null));a(this,"saveCellConfig",async e=>(await this.putControlRequest({type:"update-cell-config",...e}),null));a(this,"sendRestart",async()=>{let e=await this.readCode();return e.contents&&(ie.saveFile(e.contents),ge.saveFile(e.contents)),Kt(),null});a(this,"readCode",async()=>this.saveRpc?{contents:await this.saveRpc.readNotebook()}:(x.warn("Save RPC not initialized"),{contents:""}));a(this,"readSnippets",async()=>await this.rpc.proxy.request.bridge({functionName:"read_snippets",payload:void 0}));a(this,"openFile",async({path:e})=>{let n=Jt({code:null,baseUrl:window.location.origin});return window.open(n,"_blank"),null});a(this,"sendListFiles",async e=>await this.rpc.proxy.request.bridge({functionName:"list_files",payload:e}));a(this,"sendSearchFiles",async e=>await this.rpc.proxy.request.bridge({functionName:"search_files",payload:e}));a(this,"sendComponentValues",async e=>(await this.putControlRequest({type:"update-ui-element",...e,token:Pe()}),null));a(this,"sendInstantiate",async e=>null);a(this,"sendFunctionRequest",async e=>(await this.putControlRequest({type:"invoke-function",...e}),null));a(this,"sendCreateFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"create_file_or_directory",payload:e}));a(this,"sendDeleteFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"delete_file_or_directory",payload:e}));a(this,"sendRenameFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"move_file_or_directory",payload:e}));a(this,"sendUpdateFile",async e=>await this.rpc.proxy.request.bridge({functionName:"update_file",payload:e}));a(this,"sendFileDetails",async e=>await this.rpc.proxy.request.bridge({functionName:"file_details",payload:e}));a(this,"exportAsHTML",async e=>await this.rpc.proxy.request.bridge({functionName:"export_html",payload:e}));a(this,"exportAsMarkdown",async e=>await this.rpc.proxy.request.bridge({functionName:"export_markdown",payload:e}));a(this,"previewDatasetColumn",async e=>(await this.putControlRequest({type:"preview-dataset-column",...e}),null));a(this,"previewSQLTable",async e=>(await this.putControlRequest({type:"preview-sql-table",...e}),null));a(this,"previewSQLTableList",async e=>(await this.putControlRequest({type:"list-sql-tables",...e}),null));a(this,"previewDataSourceConnection",async e=>(await this.putControlRequest({type:"list-data-source-connection",...e}),null));a(this,"validateSQL",async e=>(await this.putControlRequest({type:"validate-sql",...e}),null));a(this,"sendModelValue",async e=>(await this.putControlRequest({type:"model",...e}),null));a(this,"syncCellIds",()=>Promise.resolve(null));a(this,"addPackage",async e=>this.rpc.proxy.request.addPackage(e));a(this,"removePackage",async e=>this.rpc.proxy.request.removePackage(e));a(this,"getPackageList",async()=>await this.rpc.proxy.request.listPackages());a(this,"getDependencyTree",async()=>({tree:{dependencies:[],name:"",tags:[],version:null}}));a(this,"listSecretKeys",async e=>(await this.putControlRequest({type:"list-secret-keys",...e}),null));a(this,"getUsageStats",b);a(this,"openTutorial",b);a(this,"getRecentFiles",b);a(this,"getWorkspaceFiles",b);a(this,"getRunningNotebooks",b);a(this,"shutdownSession",b);a(this,"exportAsPDF",b);a(this,"autoExportAsHTML",b);a(this,"autoExportAsMarkdown",b);a(this,"autoExportAsIPYNB",b);a(this,"updateCellOutputs",b);a(this,"writeSecret",b);a(this,"invokeAiTool",b);a(this,"clearCache",b);a(this,"getCacheInfo",b);zt()&&(this.rpc=We(new Worker(new URL(""+new URL("worker-BPV9SmHz.js",import.meta.url).href,""+import.meta.url),{type:"module",name:ke()})),this.rpc.addMessageListener("ready",()=>{this.startSession()}),this.rpc.addMessageListener("initialized",()=>{this.saveRpc=this.getSaveWorker(),this.setInterruptBuffer(),this.initialized.resolve()}),this.rpc.addMessageListener("initializingMessage",({message:e})=>{de.set(He,e)}),this.rpc.addMessageListener("initializedError",({error:e})=>{this.initialized.status==="resolved"&&(x.error(e),Qt({title:"Error initializing",description:e,variant:"danger"})),this.initialized.reject(Error(e))}),this.rpc.addMessageListener("kernelMessage",({message:e})=>{var n;(n=this.messageConsumer)==null||n.call(this,new MessageEvent("message",{data:e}))}))}static get INSTANCE(){let e="_marimo_private_PyodideBridge";return window[e]||(window[e]=new bt),window[e]}getSaveWorker(){return Ae()==="read"?(x.debug("Skipping SaveWorker in read-mode"),{readFile:b,readNotebook:b,saveNotebook:b}):We(new Worker(new URL(""+new URL("save-worker-CtJsIYIM.js",import.meta.url).href,""+import.meta.url),{type:"module",name:ke()})).proxy.request}async startSession(){let e=await ie.readFile(),n=await ge.readFile(),r=K.getFilename(),s=de.get(Ut),i={},m=new URLSearchParams(window.location.search);for(let l of m.keys()){let h=m.getAll(l);i[l]=h.length===1?h[0]:h}await this.rpc.proxy.request.startSession({queryParameters:i,code:e||n||"",filename:r,userConfig:{...s,runtime:{...s.runtime,auto_instantiate:Ae()==="read"?!0:s.runtime.auto_instantiate}}})}setInterruptBuffer(){crossOriginIsolated?(this.interruptBuffer=new Uint8Array(new SharedArrayBuffer(1)),this.rpc.proxy.request.setInterruptBuffer(this.interruptBuffer)):x.warn("Not running in a secure context; interrupts are not available.")}attachMessageConsumer(e){this.messageConsumer=e,this.rpc.proxy.send.consumerReady({})}async putControlRequest(e){await this.rpc.proxy.request.bridge({functionName:"put_control_request",payload:e})}};function Ln(){return Oe.withProducerCallback(t=>{Ye.INSTANCE.attachMessageConsumer(t)})}function ae(t){return()=>({TYPE:t,is(e){return e.type===t},create(e){return new CustomEvent(t,e)}})}const Qe=ae("marimo-value-input")(),Ge=ae("marimo-value-update")(),Ke=ae("marimo-value-ready")(),Je=ae("marimo-incoming-message")();function Tn(t,e){return Qe.create({bubbles:!0,composed:!0,detail:{value:t,element:e}})}var Ze=class wt{static get INSTANCE(){let e="_marimo_private_UIElementRegistry";return window[e]||(window[e]=new wt),window[e]}constructor(){this.entries=new Map}has(e){return this.entries.has(e)}set(e,n){this.entries.has(e)&&x.debug("UIElementRegistry overwriting entry for objectId.",e),this.entries.set(e,{objectId:e,value:n,elements:new Set})}registerInstance(e,n){let r=this.entries.get(e);r===void 0?this.entries.set(e,{objectId:e,value:qt(n,this),elements:new Set([n])}):r.elements.add(n)}removeInstance(e,n){let r=this.entries.get(e);r!=null&&r.elements.has(n)&&r.elements.delete(n)}removeElementsByCell(e){[...this.entries.keys()].filter(n=>n.startsWith(`${e}-`)).forEach(n=>{this.entries.delete(n)})}lookupValue(e){let n=this.entries.get(e);return n===void 0?void 0:n.value}broadcastMessage(e,n,r){let s=this.entries.get(e);s===void 0?x.warn("UIElementRegistry missing entry",e):s.elements.forEach(i=>{i.dispatchEvent(Je.create({bubbles:!1,composed:!0,detail:{objectId:e,message:n,buffers:r}}))})}broadcastValueUpdate(e,n,r){let s=this.entries.get(n);s===void 0?x.warn("UIElementRegistry missing entry",n):(s.value=r,s.elements.forEach(i=>{i!==e&&i.dispatchEvent(Ge.create({bubbles:!1,composed:!0,detail:{value:r,element:i}}))}),document.dispatchEvent(Ke.create({bubbles:!0,composed:!0,detail:{objectId:n}})))}};const Un=Ze.INSTANCE,zn=new Yt("function-call-result",async(t,e)=>{await me().sendFunctionRequest({functionCallId:t,...e})}),On="68px";var Dn="288px";const Wn=t=>t?/^\d+$/.test(t)?`${t}px`:t:Dn,Hn=Ft({isOpen:!0},(t,e)=>{if(!e)return t;switch(e.type){case"toggle":return{...t,isOpen:e.isOpen??t.isOpen};case"setWidth":return{...t,width:e.width};default:return t}});function ye(t,e=[]){let n=[];if(t instanceof DataView)n.push(e);else if(Array.isArray(t))for(let[r,s]of t.entries())n.push(...ye(s,[...e,r]));else if(typeof t=="object"&&t)for(let[r,s]of Object.entries(t))n.push(...ye(s,[...e,r]));return n}function Bn(t){let e=ye(t);if(e.length===0)return{state:t,buffers:[],bufferPaths:[]};let n=structuredClone(t),r=[],s=[];for(let i of e){let m=jt(t,i);if(m instanceof DataView){let l=qe(m);r.push(l),s.push(i),ne(n,i,l)}}return{state:n,buffers:r,bufferPaths:s}}function et(t){let{state:e,bufferPaths:n,buffers:r}=t;if(!n||n.length===0)return e;r&&Tt(r.length===n.length,"Buffers and buffer paths not the same length");let s=e;for(let[i,m]of n.entries()){let l=r==null?void 0:r[i];if(l==null){x.warn("[anywidget] Could not find buffer at path",m);continue}typeof l=="string"?ne(s,m,Me(l)):ne(s,m,l)}return s}var Vn=(gt=class{constructor(t=1e4){N(this,j,new Map);N(this,Z);P(this,Z,t)}get(t){let e=u(this,j).get(t);return e||(e=new fe,u(this,j).set(t,e),setTimeout(()=>{e.status==="pending"&&(e.reject(Error(`Model not found for key: ${t}`)),u(this,j).delete(t))},u(this,Z))),e.promise}set(t,e){let n=u(this,j).get(t);n||(n=new fe,u(this,j).set(t,n)),n.resolve(e)}has(t){let e=u(this,j).get(t);return e!==void 0&&e.status==="resolved"}getSync(t){let e=u(this,j).get(t);if(e&&e.status==="resolved")return e.value}delete(t){u(this,j).delete(t)}},j=new WeakMap,Z=new WeakMap,gt),tt=Symbol("marimo"),nt={invoke:async()=>{let t="anywidget.invoke not supported in marimo. Please file an issue at https://github.com/marimo-team/marimo/issues";throw x.warn(t),Error(t)}};function J(t){return t[tt]}const be=new Vn;var Xn=(yt=tt,H=class{constructor(e,n){N(this,D);N(this,le,"change");N(this,U);N(this,z);N(this,$);N(this,q,{});N(this,O,new AbortController);N(this,Y);N(this,I);a(this,yt,{updateAndEmitDiffs:e=>ee(this,D,xt).call(this,e),emitCustomMessage:(e,n)=>ee(this,D,Et).call(this,e,n),resolveWidget:async e=>{var s;if(u(this,I)&&u(this,Y)===e)return u(this,I);u(this,I)&&u(this,Y)!==e&&(u(this,O).abort(),P(this,O,new AbortController),P(this,I,void 0)),P(this,Y,e);let n=typeof e=="function"?await e():e,r=await((s=n.initialize)==null?void 0:s.call(n,{model:this,experimental:nt}));return r&&u(this,O).signal.addEventListener("abort",r),P(this,I,async(i,m)=>{var h;let l=await((h=n.render)==null?void 0:h.call(n,{model:this,el:i,experimental:nt}));l&&AbortSignal.any([m,u(this,O).signal]).addEventListener("abort",l)}),u(this,I)},destroy:()=>{u(this,O).abort()}});a(this,"widget_manager",{async get_model(e){let n=await H._modelManager.get(e);if(!n)throw Error(`Model not found with id: ${e}. This is likely because the model was not registered.`);return n}});N(this,ue,It(()=>{let e=u(this,q)[u(this,le)];if(e)for(let n of e)try{n()}catch(r){x.error("Error emitting event",r)}},0));P(this,z,e),P(this,$,n),P(this,U,new Map)}off(e,n){var r;if(!e){P(this,q,{});return}if(!n){u(this,q)[e]=new Set;return}(r=u(this,q)[e])==null||r.delete(n)}send(e,n,r){let s=(r??[]).map(i=>i instanceof ArrayBuffer?new DataView(i):new DataView(i.buffer,i.byteOffset,i.byteLength));return u(this,$).sendCustomMessage(e,s).then(()=>n==null?void 0:n())}get(e){return u(this,z)[e]}set(e,n){P(this,z,{...u(this,z),[e]:n}),u(this,U).set(e,n),ee(this,D,vt).call(this,`change:${e}`,n),u(this,ue).call(this)}save_changes(){if(u(this,U).size===0)return;let e=Object.fromEntries(u(this,U).entries());u(this,U).clear(),u(this,$).sendUpdate(e)}on(e,n){u(this,q)[e]||(u(this,q)[e]=new Set),u(this,q)[e].add(n)}},le=new WeakMap,U=new WeakMap,z=new WeakMap,$=new WeakMap,q=new WeakMap,O=new WeakMap,Y=new WeakMap,I=new WeakMap,D=new WeakSet,vt=function(e,n){if(!u(this,q)[e])return;let r=u(this,q)[e];for(let s of r)try{s(n)}catch(i){x.error("Error emitting event",i)}},xt=function(e){e!=null&&Object.keys(e).forEach(n=>{let r=n;u(this,z)[r]!==e[r]&&this.set(r,e[r])})},Et=function(e,n=[]){let r=u(this,q)["msg:custom"];if(r)for(let s of r)try{s(e.content,n)}catch(i){x.error("Error emitting event",i)}},ue=new WeakMap,a(H,"_modelManager",be),H);async function $n(t,e){let n=e.model_id,r=e.message;x.debug("AnyWidget message",r);let s=("buffers"in r?r.buffers:[]).map(Me);switch(r.method){case"open":{let{state:i,buffer_paths:m=[]}=r,l=et({state:i,bufferPaths:m,buffers:s}),h=t.getSync(n);if(h){J(h).updateAndEmitDiffs(l);return}let v=new Xn(l,{async sendUpdate(E){let{state:w,buffers:_,bufferPaths:S}=Bn(E);await me().sendModelValue({modelId:n,message:{method:"update",state:w,bufferPaths:S},buffers:_})},async sendCustomMessage(E,w){await me().sendModelValue({modelId:n,message:{method:"custom",content:E},buffers:w.map(qe)})}});t.set(n,v);return}case"custom":J(await t.get(n)).emitCustomMessage({method:"custom",content:r.content},s);return;case"close":{let i=t.getSync(n);i&&J(i).destroy(),t.delete(n);return}case"update":{let{state:i,buffer_paths:m=[]}=r,l=et({state:i,bufferPaths:m,buffers:s});J(await t.get(n)).updateAndEmitDiffs(l);return}default:At(r)}}Mt(be,"MODEL_MANAGER");const rt=T(null),Yn=T(null),st=T(!1),Qn=T(!1),it=T(!1);var Gn=Re();const at=t=>{let e=(0,Gn.c)(8),{onResize:n,startingWidth:r,minWidth:s,maxWidth:i}=t,m=(0,c.useRef)(null),l=(0,c.useRef)(null),h=(0,c.useRef)(null),v,E;e[0]!==i||e[1]!==s||e[2]!==n?(v=()=>{let R=m.current,k=l.current,F=h.current;if(!R||!k&&!F)return;let C=Number.parseInt(window.getComputedStyle(R).width,10),M=0,L=!1,B=null,Q=d=>{if(!R||!L||!B)return;let g=d.clientX-M;M=d.clientX,C=B==="left"?C-g:C+g,s&&(C=Math.max(s,C)),i&&(C=Math.min(i,C)),R.style.width=`${C}px`},G=()=>{L&&(n==null||n(C),L=!1,B=null),document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",G)},o=(d,g)=>{d.preventDefault(),L=!0,B=g,M=d.clientX,document.addEventListener("mousemove",Q),document.addEventListener("mouseup",G)},f=d=>o(d,"left"),y=d=>o(d,"right");return k&&k.addEventListener("mousedown",f),F&&F.addEventListener("mousedown",y),()=>{k&&k.removeEventListener("mousedown",f),F&&F.removeEventListener("mousedown",y),document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",G)}},E=[s,i,n],e[0]=i,e[1]=s,e[2]=n,e[3]=v,e[4]=E):(v=e[3],E=e[4]),(0,c.useEffect)(v,E);let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w={left:l,right:h},e[5]=w):w=e[5];let _=r==="contentWidth"?"var(--content-width-medium)":`${r}px`,S;return e[6]===_?S=e[7]:(S={resizableDivRef:m,handleRefs:w,style:{width:_}},e[6]=_,e[7]=S),S};function ot(t){t||window.dispatchEvent(new Event("resize"))}var lt=Re(),p=Se(Dt(),1);const Kn=()=>{let t=(0,lt.c)(16),[e,n]=te(rt),[r,s]=te(st),[i,m]=te(Qn),[l,h]=te(it),v;t[0]!==s||t[1]!==n?(v=()=>{n(null),s(!1)},t[0]=s,t[1]=n,t[2]=v):v=t[2];let E=v;if(he(re.CONTEXT_AWARE_PANEL).length===0||!e||!r)return null;let w;t[3]!==l||t[4]!==i||t[5]!==h||t[6]!==m?(w=()=>(0,p.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[(0,p.jsx)(je,{content:i?"Unpin panel":"Pin panel",children:(0,p.jsx)(Ie,{size:"xs",onPressedChange:()=>m(!i),pressed:i,"aria-label":i?"Unpin panel":"Pin panel",children:i?(0,p.jsx)(rn,{className:"w-4 h-4"}):(0,p.jsx)(Bt,{className:"w-4 h-4"})})}),(0,p.jsx)(je,{content:l?(0,p.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,p.jsx)("span",{children:"Follow focused table"}),(0,p.jsx)("span",{className:"text-xs text-muted-foreground w-64",children:"The panel updates as cells that output tables are focused. Click to fix to the current cell."})]}):(0,p.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,p.jsx)("span",{children:"Focus on current table"}),(0,p.jsx)("span",{className:"text-xs text-muted-foreground w-64",children:"The panel is focused on the current table. Click to update based on which cell is focused."})]}),children:(0,p.jsx)(Ie,{size:"xs",onPressedChange:()=>h(!l),pressed:l,"aria-label":l?"Follow focused cell":"Fixed",children:(0,p.jsx)(nn,{className:Ht("w-4 h-4",l&&"text-primary")})})})]}),t[3]=l,t[4]=i,t[5]=h,t[6]=m,t[7]=w):w=t[7];let _=w,S;t[8]!==E||t[9]!==_?(S=()=>(0,p.jsxs)("div",{className:"mt-2 pb-7 mb-4 h-full overflow-auto",children:[(0,p.jsxs)("div",{className:"flex flex-row justify-between items-center mx-2",children:[_(),(0,p.jsx)(Wt,{variant:"linkDestructive",size:"icon",onClick:E,"aria-label":"Close selection panel",children:(0,p.jsx)(Xt,{className:"w-4 h-4"})})]}),(0,p.jsx)(Fe,{children:(0,p.jsx)(ze,{name:re.CONTEXT_AWARE_PANEL})})]}),t[8]=E,t[9]=_,t[10]=S):S=t[10];let R=S;if(!i){let C;return t[11]===R?C=t[12]:(C=(0,p.jsx)(Zn,{children:R()}),t[11]=R,t[12]=C),C}let k;t[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,p.jsx)(Zt,{onDragging:ot,className:"resize-handle border-border z-20 print:hidden border-l"}),t[13]=k):k=t[13];let F;return t[14]===R?F=t[15]:(F=(0,p.jsxs)(p.Fragment,{children:[k,(0,p.jsx)(en,{defaultSize:20,minSize:15,maxSize:80,children:R()})]}),t[14]=R,t[15]=F),F},Jn=t=>{let e=(0,lt.c)(2),{children:n}=t,r;return e[0]===n?r=e[1]:(r=(0,p.jsx)(Fe,{children:(0,p.jsx)(an,{name:re.CONTEXT_AWARE_PANEL,children:n})}),e[0]=n,e[1]=r),r};var Zn=({children:t})=>{let{resizableDivRef:e,handleRefs:n,style:r}=at({startingWidth:400,minWidth:300,maxWidth:1500});return(0,p.jsxs)("div",{className:"absolute z-40 right-0 h-full bg-background flex flex-row",children:[(0,p.jsx)("div",{ref:n.left,className:"w-1 h-full cursor-col-resize border-l"}),(0,p.jsx)("div",{ref:e,style:r,children:t})]})};function er(){var t=[...arguments];return(0,c.useMemo)(()=>e=>{t.forEach(n=>n(e))},t)}var ut=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function oe(t){let e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function we(t){return"nodeType"in t}function X(t){var e;return t?oe(t)?t:we(t)?((e=t.ownerDocument)==null?void 0:e.defaultView)??window:window:window}function ct(t){let{Document:e}=X(t);return t instanceof e}function dt(t){return oe(t)?!1:t instanceof X(t).HTMLElement}function mt(t){return t instanceof X(t).SVGElement}function tr(t){return t?oe(t)?t.document:we(t)?ct(t)?t:dt(t)||mt(t)?t.ownerDocument:document:document:document}var ve=ut?c.useLayoutEffect:c.useEffect;function ft(t){let e=(0,c.useRef)(t);return ve(()=>{e.current=t}),(0,c.useCallback)(function(){var n=[...arguments];return e.current==null?void 0:e.current(...n)},[])}function nr(){let t=(0,c.useRef)(null);return[(0,c.useCallback)((e,n)=>{t.current=setInterval(e,n)},[]),(0,c.useCallback)(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[])]}function rr(t,e){e===void 0&&(e=[t]);let n=(0,c.useRef)(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function sr(t,e){let n=(0,c.useRef)();return(0,c.useMemo)(()=>{let r=t(n.current);return n.current=r,r},[...e])}function ir(t){let e=ft(t),n=(0,c.useRef)(null);return[n,(0,c.useCallback)(r=>{r!==n.current&&(e==null||e(r,n.current)),n.current=r},[])]}function ar(t){let e=(0,c.useRef)();return(0,c.useEffect)(()=>{e.current=t},[t]),e.current}var xe={};function or(t,e){return(0,c.useMemo)(()=>{if(e)return e;let n=xe[t]==null?0:xe[t]+1;return xe[t]=n,t+"-"+n},[t,e])}function pt(t){return function(e){return[...arguments].slice(1).reduce((n,r)=>{let s=Object.entries(r);for(let[i,m]of s){let l=n[i];l!=null&&(n[i]=l+t*m)}return n},{...e})}}var lr=pt(1),ur=pt(-1);function cr(t){return"clientX"in t&&"clientY"in t}function dr(t){if(!t)return!1;let{KeyboardEvent:e}=X(t.target);return e&&t instanceof e}function mr(t){if(!t)return!1;let{TouchEvent:e}=X(t.target);return e&&t instanceof e}function fr(t){if(mr(t)){if(t.touches&&t.touches.length){let{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){let{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return cr(t)?{x:t.clientX,y:t.clientY}:null}var Ee=Object.freeze({Translate:{toString(t){if(!t)return;let{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[Ee.Translate.toString(t),Ee.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),ht="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function pr(t){return t.matches(ht)?t:t.querySelector(ht)}export{vn as $,Yn as A,Un as B,or as C,at as D,ot as E,On as F,Tn as G,Qe as H,Wn as I,ie as J,Ye as K,Hn as L,be as M,J as N,st as O,$n as P,re as Q,zn as R,ar as S,Jn as T,Ke as U,Je as V,Ge as W,He as X,qn as Y,Oe as Z,nr as _,fr as a,he as at,sr as b,ct as c,we as d,hn as et,mt as f,ft as g,er as h,pr as i,ze as it,it as j,rt as k,dt as l,ur as m,lr as n,wn as nt,tr as o,ne as ot,oe as p,Ln as q,ut as r,pn as rt,X as s,Ee as t,bn as tt,dr as u,ve as v,Kn as w,ir as x,rr as y,Ze as z};
import{d as k,i as x,l as z,p as o,u as C}from"./useEvent-BhXAndur.js";import{A as n,B as D,I as j,J as I,N as d,P as h,R as t,T as l,U as J,b as r,w as _}from"./zod-H_cgTO0M.js";import{t as N}from"./compiler-runtime-B3qBwwSJ.js";import{t as R}from"./merge-BBX6ug-N.js";import{d as f,n as S,u as U}from"./hotkeys-BHHWjLlp.js";import{t as F}from"./invariant-CAG_dYON.js";const M=["pip","uv","rye","poetry","pixi"];var $=["normal","compact","medium","full","columns"],q=["auto","native","polars","lazy-polars","pandas"];const G="openai/gpt-4o";var O=["html","markdown","ipynb"];const H=["manual","ask","agent"];var u=h({api_key:t().optional(),base_url:t().optional(),project:t().optional()}).loose(),K=h({chat_model:t().nullish(),edit_model:t().nullish(),autocomplete_model:t().nullish(),displayed_models:_(t()).default([]),custom_models:_(t()).default([])});const y=n({completion:h({activate_on_typing:l().prefault(!0),signature_hint_on_typing:l().prefault(!1),copilot:D([l(),r(["github","codeium","custom"])]).prefault(!1).transform(a=>a===!0?"github":a),codeium_api_key:t().nullish()}).prefault({}),save:n({autosave:r(["off","after_delay"]).prefault("after_delay"),autosave_delay:d().nonnegative().transform(a=>Math.max(a,1e3)).prefault(1e3),format_on_save:l().prefault(!1)}).prefault({}),formatting:n({line_length:d().nonnegative().prefault(79).transform(a=>Math.min(a,1e3))}).prefault({}),keymap:n({preset:r(["default","vim"]).prefault("default"),overrides:j(t(),t()).prefault({}),destructive_delete:l().prefault(!0)}).prefault({}),runtime:n({auto_instantiate:l().prefault(!0),on_cell_change:r(["lazy","autorun"]).prefault("autorun"),auto_reload:r(["off","lazy","autorun"]).prefault("off"),reactive_tests:l().prefault(!0),watcher_on_save:r(["lazy","autorun"]).prefault("lazy"),default_sql_output:r(q).prefault("auto"),default_auto_download:_(r(O)).prefault([])}).prefault({}),display:n({theme:r(["light","dark","system"]).prefault("light"),code_editor_font_size:d().nonnegative().prefault(14),cell_output:r(["above","below"]).prefault("below"),dataframes:r(["rich","plain"]).prefault("rich"),default_table_page_size:d().prefault(10),default_table_max_columns:d().prefault(50),default_width:r($).prefault("medium").transform(a=>a==="normal"?"compact":a),locale:t().nullable().optional(),reference_highlighting:l().prefault(!0)}).prefault({}),package_management:n({manager:r(M).prefault("pip")}).prefault({}),ai:n({rules:t().prefault(""),mode:r(H).prefault("manual"),inline_tooltip:l().prefault(!1),open_ai:u.optional(),anthropic:u.optional(),google:u.optional(),ollama:u.optional(),openrouter:u.optional(),wandb:u.optional(),open_ai_compatible:u.optional(),azure:u.optional(),bedrock:n({region_name:t().optional(),profile_name:t().optional(),aws_access_key_id:t().optional(),aws_secret_access_key:t().optional()}).optional(),custom_providers:j(t(),u).prefault({}),models:K.prefault({displayed_models:[],custom_models:[]})}).prefault({}),experimental:n({markdown:l().optional(),rtc:l().optional()}).prefault(()=>({})),server:n({disable_file_downloads:l().optional()}).prefault(()=>({})),diagnostics:n({enabled:l().optional(),sql_linter:l().optional()}).prefault(()=>({})),sharing:n({html:l().optional(),wasm:l().optional()}).optional(),mcp:n({presets:_(r(["marimo","context7"])).optional()}).optional().prefault({})}).partial().prefault(()=>({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})),A=t(),L=r(q).prefault("auto"),b=h({width:r($).prefault("medium").transform(a=>a==="normal"?"compact":a),app_title:A.nullish(),css_file:t().nullish(),html_head_file:t().nullish(),auto_download:_(r(O)).prefault([]),sql_output:L}).prefault(()=>({width:"medium",auto_download:[],sql_output:"auto"}));function E(a){try{return b.parse(a)}catch(e){return f.error(`Marimo got an unexpected value in the configuration file: ${e}`),b.parse({})}}function Q(a){try{let e=y.parse(a);for(let[p,s]of Object.entries(e.experimental??{}))s===!0&&f.log(`\u{1F9EA} Experimental feature "${p}" is enabled.`);return e}catch(e){return e instanceof J?f.error(`Marimo got an unexpected value in the configuration file: ${I(e)}`):f.error(`Marimo got an unexpected value in the configuration file: ${e}`),P()}}function V(a){try{let e=a;return F(typeof e=="object","internal-error: marimo-config-overrides is not an object"),Object.keys(e).length>0&&f.log("\u{1F527} Project configuration overrides:",e),e}catch(e){return f.error(`Marimo got an unexpected configuration overrides: ${e}`),{}}}function P(){return y.parse({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})}var W=N();const v=o(P()),T=o({}),i=o(a=>{let e=a(T);return R({},a(v),e)}),X=o(a=>a(i).runtime.auto_instantiate),Y=o(a=>a(i).keymap.overrides??{}),Z=o(U()),aa=o(a=>new S(a(Y),{platform:a(Z)})),ea=o(a=>a(i).save),ta=o(a=>a(i).ai),oa=o(a=>a(i).completion),ra=o(a=>a(i).keymap.preset);function la(){return z(v)}function na(){let a=(0,W.c)(3),e=C(i),p=k(v),s;return a[0]!==e||a[1]!==p?(s=[e,p],a[0]=e,a[1]=p,a[2]=s):s=a[2],s}function ia(){return x.get(i)}const sa=o(a=>B(a(i)));o(a=>a(i).display.code_editor_font_size);const pa=o(a=>a(i).display.locale);function B(a){var e,p,s,m,c,w;return!!((p=(e=a.ai)==null?void 0:e.models)!=null&&p.chat_model)||!!((m=(s=a.ai)==null?void 0:s.models)!=null&&m.edit_model)||!!((w=(c=a.ai)==null?void 0:c.models)!=null&&w.autocomplete_model)}const g=o(E({}));function ua(){return z(g)}function fa(){return k(g)}function ma(){return x.get(g)}const ca=o(a=>a(g).width);o(a=>{var m,c;let e=a(i),p=((m=e.snippets)==null?void 0:m.custom_paths)??[],s=(c=e.snippets)==null?void 0:c.include_default_snippets;return p.length>0||s===!0});const da=o(a=>{var e;return((e=a(i).server)==null?void 0:e.disable_file_downloads)??!1});function _a(){return!1}export{Q as A,b as C,y as D,M as E,E as O,v as S,G as T,i as _,ca as a,fa as b,oa as c,ma as d,ia as f,pa as g,ra as h,g as i,V as k,T as l,B as m,ta as n,X as o,aa as p,sa as r,ea as s,_a as t,da as u,ua as v,A as w,la as x,na as y};
function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g,t=>{let x=Math.trunc(Math.random()*16);return(t==="x"?x:x&3|8).toString(16)})}export{r as t};
var c="error";function a(e){return RegExp("^(("+e.join(")|(")+"))\\b","i")}var v=RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),k=RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),x=RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),w=RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),I=RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),z=RegExp("^[_A-Za-z][_A-Za-z0-9]*"),u=["class","module","sub","enum","select","while","if","function","get","set","property","try","structure","synclock","using","with"],d=["else","elseif","case","catch","finally"],m=["next","loop"],h=["and","andalso","or","orelse","xor","in","not","is","isnot","like"],E=a(h),f="#const.#else.#elseif.#end.#if.#region.addhandler.addressof.alias.as.byref.byval.cbool.cbyte.cchar.cdate.cdbl.cdec.cint.clng.cobj.compare.const.continue.csbyte.cshort.csng.cstr.cuint.culng.cushort.declare.default.delegate.dim.directcast.each.erase.error.event.exit.explicit.false.for.friend.gettype.goto.handles.implements.imports.infer.inherits.interface.isfalse.istrue.lib.me.mod.mustinherit.mustoverride.my.mybase.myclass.namespace.narrowing.new.nothing.notinheritable.notoverridable.of.off.on.operator.option.optional.out.overloads.overridable.overrides.paramarray.partial.private.protected.public.raiseevent.readonly.redim.removehandler.resume.return.shadows.shared.static.step.stop.strict.then.throw.to.true.trycast.typeof.until.until.when.widening.withevents.writeonly".split("."),p="object.boolean.char.string.byte.sbyte.short.ushort.int16.uint16.integer.uinteger.int32.uint32.long.ulong.int64.uint64.decimal.single.double.float.date.datetime.intptr.uintptr".split("."),L=a(f),R=a(p),C='"',O=a(u),g=a(d),b=a(m),y=a(["end"]),T=a(["do"]),F=null;function s(e,n){n.currentIndent++}function o(e,n){n.currentIndent--}function l(e,n){if(e.eatSpace())return null;if(e.peek()==="'")return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var r=!1;if((e.match(/^\d*\.\d+F?/i)||e.match(/^\d+\.\d*F?/)||e.match(/^\.\d+F?/))&&(r=!0),r)return e.eat(/J/i),"number";var t=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?t=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),t=!0):e.match(/^0(?![\dx])/i)&&(t=!0),t)return e.eat(/L/i),"number"}return e.match(C)?(n.tokenize=j(e.current()),n.tokenize(e,n)):e.match(I)||e.match(w)?null:e.match(x)||e.match(v)||e.match(E)?"operator":e.match(k)?null:e.match(T)?(s(e,n),n.doInCurrentLine=!0,"keyword"):e.match(O)?(n.doInCurrentLine?n.doInCurrentLine=!1:s(e,n),"keyword"):e.match(g)?"keyword":e.match(y)?(o(e,n),o(e,n),"keyword"):e.match(b)?(o(e,n),"keyword"):e.match(R)||e.match(L)?"keyword":e.match(z)?"variable":(e.next(),c)}function j(e){var n=e.length==1,r="string";return function(t,i){for(;!t.eol();){if(t.eatWhile(/[^'"]/),t.match(e))return i.tokenize=l,r;t.eat(/['"]/)}return n&&(i.tokenize=l),r}}function S(e,n){var r=n.tokenize(e,n),t=e.current();if(t===".")return r=n.tokenize(e,n),r==="variable"?"variable":c;var i="[({".indexOf(t);return i!==-1&&s(e,n),F==="dedent"&&o(e,n)||(i="])}".indexOf(t),i!==-1&&o(e,n))?c:r}const _={name:"vb",startState:function(){return{tokenize:l,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,n){e.sol()&&(n.currentIndent+=n.nextLineIndent,n.nextLineIndent=0,n.doInCurrentLine=0);var r=S(e,n);return n.lastToken={style:r,content:e.current()},r},indent:function(e,n,r){var t=n.replace(/^\s+|\s+$/g,"");return t.match(b)||t.match(y)||t.match(g)?r.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.unit},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:"'"},autocomplete:u.concat(d).concat(m).concat(h).concat(f).concat(p)}};export{_ as t};
import{t as o}from"./vb-BX7-Md9G.js";export{o as vb};
function p(h){var l="error";function a(e){return RegExp("^(("+e.join(")|(")+"))\\b","i")}var f=RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),y=RegExp("^((<>)|(<=)|(>=))"),g=RegExp("^[\\.,]"),x=RegExp("^[\\(\\)]"),k=RegExp("^[A-Za-z][_A-Za-z0-9]*"),w=["class","sub","select","while","if","function","property","with","for"],I=["else","elseif","case"],C=["next","loop","wend"],L=a(["and","or","not","xor","is","mod","eqv","imp"]),D=["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"],S=["true","false","nothing","empty","null"],E="abs.array.asc.atn.cbool.cbyte.ccur.cdate.cdbl.chr.cint.clng.cos.csng.cstr.date.dateadd.datediff.datepart.dateserial.datevalue.day.escape.eval.execute.exp.filter.formatcurrency.formatdatetime.formatnumber.formatpercent.getlocale.getobject.getref.hex.hour.inputbox.instr.instrrev.int.fix.isarray.isdate.isempty.isnull.isnumeric.isobject.join.lbound.lcase.left.len.loadpicture.log.ltrim.rtrim.trim.maths.mid.minute.month.monthname.msgbox.now.oct.replace.rgb.right.rnd.round.scriptengine.scriptenginebuildversion.scriptenginemajorversion.scriptengineminorversion.second.setlocale.sgn.sin.space.split.sqr.strcomp.string.strreverse.tan.time.timer.timeserial.timevalue.typename.ubound.ucase.unescape.vartype.weekday.weekdayname.year".split("."),O="vbBlack.vbRed.vbGreen.vbYellow.vbBlue.vbMagenta.vbCyan.vbWhite.vbBinaryCompare.vbTextCompare.vbSunday.vbMonday.vbTuesday.vbWednesday.vbThursday.vbFriday.vbSaturday.vbUseSystemDayOfWeek.vbFirstJan1.vbFirstFourDays.vbFirstFullWeek.vbGeneralDate.vbLongDate.vbShortDate.vbLongTime.vbShortTime.vbObjectError.vbOKOnly.vbOKCancel.vbAbortRetryIgnore.vbYesNoCancel.vbYesNo.vbRetryCancel.vbCritical.vbQuestion.vbExclamation.vbInformation.vbDefaultButton1.vbDefaultButton2.vbDefaultButton3.vbDefaultButton4.vbApplicationModal.vbSystemModal.vbOK.vbCancel.vbAbort.vbRetry.vbIgnore.vbYes.vbNo.vbCr.VbCrLf.vbFormFeed.vbLf.vbNewLine.vbNullChar.vbNullString.vbTab.vbVerticalTab.vbUseDefault.vbTrue.vbFalse.vbEmpty.vbNull.vbInteger.vbLong.vbSingle.vbDouble.vbCurrency.vbDate.vbString.vbObject.vbError.vbBoolean.vbVariant.vbDataObject.vbDecimal.vbByte.vbArray".split("."),i=["WScript","err","debug","RegExp"],z=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],R=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],T=["server","response","request","session","application"],j=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],F=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],o=R.concat(z);i=i.concat(O),h.isASP&&(i=i.concat(T),o=o.concat(F,j));var B=a(D),A=a(S),N=a(E),W=a(i),q=a(o),M='"',K=a(w),s=a(I),u=a(C),v=a(["end"]),Y=a(["do"]),H=a(["on error resume next","exit"]),J=a(["rem"]);function d(e,t){t.currentIndent++}function c(e,t){t.currentIndent--}function b(e,t){if(e.eatSpace())return null;if(e.peek()==="'"||e.match(J))return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var r=!1;if((e.match(/^\d*\.\d+/i)||e.match(/^\d+\.\d*/)||e.match(/^\.\d+/))&&(r=!0),r)return e.eat(/J/i),"number";var n=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?n=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),n=!0):e.match(/^0(?![\dx])/i)&&(n=!0),n)return e.eat(/L/i),"number"}return e.match(M)?(t.tokenize=P(e.current()),t.tokenize(e,t)):e.match(y)||e.match(f)||e.match(L)?"operator":e.match(g)?null:e.match(x)?"bracket":e.match(H)?(t.doInCurrentLine=!0,"keyword"):e.match(Y)?(d(e,t),t.doInCurrentLine=!0,"keyword"):e.match(K)?(t.doInCurrentLine?t.doInCurrentLine=!1:d(e,t),"keyword"):e.match(s)?"keyword":e.match(v)?(c(e,t),c(e,t),"keyword"):e.match(u)?(t.doInCurrentLine?t.doInCurrentLine=!1:c(e,t),"keyword"):e.match(B)?"keyword":e.match(A)?"atom":e.match(q)?"variableName.special":e.match(N)||e.match(W)?"builtin":e.match(k)?"variable":(e.next(),l)}function P(e){var t=e.length==1,r="string";return function(n,m){for(;!n.eol();){if(n.eatWhile(/[^'"]/),n.match(e))return m.tokenize=b,r;n.eat(/['"]/)}return t&&(m.tokenize=b),r}}function V(e,t){var r=t.tokenize(e,t),n=e.current();return n==="."?(r=t.tokenize(e,t),n=e.current(),r&&(r.substr(0,8)==="variable"||r==="builtin"||r==="keyword")?((r==="builtin"||r==="keyword")&&(r="variable"),o.indexOf(n.substr(1))>-1&&(r="keyword"),r):l):r}return{name:"vbscript",startState:function(){return{tokenize:b,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var r=V(e,t);return t.lastToken={style:r,content:e.current()},r===null&&(r=null),r},indent:function(e,t,r){var n=t.replace(/^\s+|\s+$/g,"");return n.match(u)||n.match(v)||n.match(s)?r.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.unit}}}const _=p({}),G=p({isASP:!0});export{G as n,_ as t};
import{n as r,t}from"./vbscript-DNMzJOTU.js";export{t as vbScript,r as vbScriptASP};
import{s as Z}from"./chunk-LvLJmgfZ.js";import{n as C}from"./useEvent-BhXAndur.js";import{t as R}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import{t as tt}from"./compiler-runtime-B3qBwwSJ.js";import{t as nt}from"./_baseUniq-BP3iN0f3.js";import{t as et}from"./debounce-B3mjKxHe.js";import{r as rt,t as at}from"./tooltip-DxKBXCGp.js";import{a as V,d as j}from"./hotkeys-BHHWjLlp.js";import{n as z}from"./config-Q0O7_stz.js";import{t as it}from"./jsx-runtime-ZmTK25f3.js";import{r as ot}from"./button-CZ3Cs4qb.js";import{u as lt}from"./toDate-DETS9bBd.js";import"./session-BOFn9QrD.js";import{r as ct}from"./useTheme-DQozhcp1.js";import"./Combination-BAEdC-rz.js";import{t as st}from"./tooltip-CMQz28hC.js";import{t as mt}from"./isValid-DDt9wNjK.js";import{n as pt}from"./vega-loader.browser-DXARUlxo.js";import{t as ut}from"./react-vega-BL1HBBjq.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{r as ft,t as dt}from"./alert-BOoN6gJ1.js";import{n as ht}from"./error-banner-B9ts0mNl.js";import{n as gt}from"./useAsyncData-BMGLSTg8.js";import{t as yt}from"./formats-CobRswjh.js";import{t as H}from"./useDeepCompareMemoize-5OUgerQ3.js";function vt(t){return t&&t.length?nt(t):[]}var N=vt,kt=tt(),x=Z(R(),1);function bt(t){return t.data&&"url"in t.data&&(t.data.url=z(t.data.url).href),t}const u={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"};var F=new Set(["boxplot","errorband","errorbar"]);const S={getMarkType(t){let n=typeof t=="string"?t:t.type;if(F.has(n))throw Error("Not supported");return n},isInteractive(t){let n=typeof t=="string"?t:t.type;return!F.has(n)},makeClickable(t){let n=typeof t=="string"?t:t.type;return n in u?typeof t=="string"?{type:t,cursor:"pointer",tooltip:!0}:{...t,type:n,cursor:"pointer",tooltip:!0}:t},getOpacity(t){return typeof t=="string"?null:"opacity"in t&&typeof t.opacity=="number"?t.opacity:null}},y={point(t){return t==null?"select_point":`select_point_${t}`},interval(t){return t==null?"select_interval":`select_interval_${t}`},legendSelection(t){return`legend_selection_${t}`},binColoring(t){return t==null?"bin_coloring":`bin_coloring_${t}`},HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint(t){return t.some(n=>n.startsWith("select_point"))},hasInterval(t){return t.some(n=>n.startsWith("select_interval"))},hasLegend(t){return t.some(n=>n.startsWith("legend_selection"))},hasPanZoom(t){return t.some(n=>n.startsWith("pan_zoom"))},isBinColoring(t){return t.startsWith("bin_coloring")}},O={highlight(){return{name:y.HIGHLIGHT,select:{type:"point",on:"mouseover"}}},interval(t,n){return{name:y.interval(n),select:{type:"interval",encodings:W(t),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}},point(t,n){return{name:y.point(n),select:{type:"point",encodings:W(t),on:"click[!event.metaKey]"}}},binColoring(t){return{name:y.binColoring(t),select:{type:"point",on:"click[!event.metaKey]"}}},legend(t){return{name:y.legendSelection(t),select:{type:"point",fields:[t]},bind:"legend"}},panZoom(){return{name:y.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}}}};function W(t){switch(S.getMarkType(t.mark)){case u.image:case u.trail:return;case u.area:case u.arc:return["color"];case u.bar:{let n=wt(t);return n==="horizontal"?["y"]:n==="vertical"?["x"]:void 0}case u.circle:case u.geoshape:case u.line:case u.point:case u.rect:case u.rule:case u.square:case u.text:case u.tick:return["x","y"]}}function P(t){return"params"in t&&t.params&&t.params.length>0?N(t.params.filter(n=>n==null?!1:"select"in n&&n.select!==void 0).map(n=>n.name)):"layer"in t?N(t.layer.flatMap(P)):"vconcat"in t?N(t.vconcat.flatMap(P)):"hconcat"in t?N(t.hconcat.flatMap(P)):[]}function wt(t){var a,r;if(!t||!("mark"in t))return;let n=(a=t.encoding)==null?void 0:a.x,e=(r=t.encoding)==null?void 0:r.y;if(n&&"type"in n&&n.type==="nominal")return"vertical";if(e&&"type"in e&&e.type==="nominal"||n&&"aggregate"in n)return"horizontal";if(e&&"aggregate"in e)return"vertical"}function xt(t){if(!t.encoding)return[];let n=[];for(let e of Object.values(t.encoding))e&&typeof e=="object"&&"bin"in e&&e.bin&&"field"in e&&typeof e.field=="string"&&n.push(e.field);return n}function D(t){if(!t||!("encoding"in t))return[];let{encoding:n}=t;return n?Object.entries(n).flatMap(e=>{let[a,r]=e;return!r||!St.has(a)?[]:"field"in r&&typeof r.field=="string"?[r.field]:"condition"in r&&r.condition&&typeof r.condition=="object"&&"field"in r.condition&&r.condition.field&&typeof r.condition.field=="string"?[r.condition.field]:[]}):[]}var St=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function G(t,n,e,a){let r=e.filter(o=>y.isBinColoring(o)),i={and:(r.length>0?r:e).map(o=>({param:o}))};if(t==="opacity"){let o=S.getOpacity(a)||1;return{...n,opacity:{condition:{test:i,value:o},value:o/5}}}else return n}function At(t){if(!("select"in t)||!t.select)return JSON.stringify(t);let n=t.select;if(typeof n=="string")return JSON.stringify({type:n,bind:t.bind});let e={type:n.type,encodings:"encodings"in n&&n.encodings?[...n.encodings].sort():void 0,fields:"fields"in n&&n.fields?[...n.fields].sort():void 0,bind:t.bind};return JSON.stringify(e)}function $(t){let n=E(t);if(n.length===0)return t;let e=jt(n);return e.length===0?t:{...L(K(t,new Set(e.map(a=>a.name))),e.map(a=>a.name)),params:[...t.params||[],...e]}}function E(t){let n=[];if("vconcat"in t&&Array.isArray(t.vconcat))for(let e of t.vconcat)n.push(...E(e));else if("hconcat"in t&&Array.isArray(t.hconcat))for(let e of t.hconcat)n.push(...E(e));else{if("layer"in t)return[];"mark"in t&&"params"in t&&t.params&&t.params.length>0&&n.push({params:t.params})}return n}function jt(t){if(t.length===0)return[];let n=new Map,e=t.length;for(let{params:r}of t){let i=new Set;for(let o of r){let l=At(o);i.has(l)||(i.add(l),n.has(l)||n.set(l,{count:0,param:o}),n.get(l).count++)}}let a=[];for(let[,{count:r,param:i}]of n)r===e&&a.push(i);return a}function K(t,n){if("vconcat"in t&&Array.isArray(t.vconcat))return{...t,vconcat:t.vconcat.map(e=>K(e,n))};if("hconcat"in t&&Array.isArray(t.hconcat))return{...t,hconcat:t.hconcat.map(e=>K(e,n))};if("mark"in t&&"params"in t&&t.params){let e=t.params,a=[];for(let r of e){if(!r||typeof r!="object"||!("name"in r)){a.push(r);continue}n.has(r.name)||a.push(r)}if(a.length===0){let{params:r,...i}=t;return i}return{...t,params:a}}return t}function L(t,n){return"vconcat"in t&&Array.isArray(t.vconcat)?{...t,vconcat:t.vconcat.map(e=>L(e,n))}:"hconcat"in t&&Array.isArray(t.hconcat)?{...t,hconcat:t.hconcat.map(e=>L(e,n))}:"layer"in t?t:"mark"in t&&S.isInteractive(t.mark)?{...t,mark:S.makeClickable(t.mark),encoding:G("opacity",t.encoding||{},n,t.mark)}:t}function T(t,n){var l,k;let{chartSelection:e=!0,fieldSelection:a=!0}=n;if(!e&&!a)return t;(l=t.params)!=null&&l.some(s=>s.bind==="legend")&&(a=!1);let r=(k=t.params)==null?void 0:k.some(s=>!s.bind);r&&(e=!1);let i="vconcat"in t||"hconcat"in t;if(r&&i)return t;if("vconcat"in t){let s=t.vconcat.map(m=>"mark"in m?T(m,{chartSelection:e,fieldSelection:a}):m);return $({...t,vconcat:s})}if("hconcat"in t){let s=t.hconcat.map(m=>"mark"in m?T(m,{chartSelection:e,fieldSelection:a}):m);return $({...t,hconcat:s})}if("layer"in t){let s=t.params&&t.params.length>0,m=a!==!1&&!s,v=[];if(m){let p=t.layer.flatMap(f=>"mark"in f?D(f):[]);v=[...new Set(p)],Array.isArray(a)&&(v=v.filter(f=>a.includes(f)))}let w=t.layer.map((p,f)=>{if(!("mark"in p))return p;let h=p;if(f===0&&v.length>0){let _=v.map(M=>O.legend(M));h={...h,params:[...h.params||[],..._]}}return h=q(h,e,f),h=J(h),f===0&&(h=B(h)),h});return{...t,layer:w}}if(!("mark"in t)||!S.isInteractive(t.mark))return t;let o=t;return o=Ot(o,a),o=q(o,e,void 0),o=J(o),o=B(o),o}function Ot(t,n){if(n===!1)return t;let e=D(t);Array.isArray(n)&&(e=e.filter(i=>n.includes(i)));let a=e.map(i=>O.legend(i)),r=[...t.params||[],...a];return{...t,params:r}}function q(t,n,e){if(n===!1)return t;let a;try{a=S.getMarkType(t.mark)}catch{return t}if(a==="geoshape")return t;let r=xt(t),i=n===!0?r.length>0?["point"]:_t(a):[n];if(!i||i.length===0)return t;let o=i.map(k=>k==="interval"?O.interval(t,e):O.point(t,e)),l=[...t.params||[],...o];return r.length>0&&i.includes("point")&&l.push(O.binColoring(e)),{...t,params:l}}function B(t){let n;try{n=S.getMarkType(t.mark)}catch{}if(n==="geoshape")return t;let e=t.params||[];return e.some(a=>a.bind==="scales")?t:{...t,params:[...e,O.panZoom()]}}function J(t){let n="encoding"in t?t.encoding:void 0,e=t.params||[],a=e.map(r=>r.name);return e.length===0||!S.isInteractive(t.mark)?t:{...t,mark:S.makeClickable(t.mark),encoding:G("opacity",n||{},a,t.mark)}}function _t(t){switch(t){case"arc":case"area":return["point"];case"text":case"bar":return["point","interval"];case"line":return;default:return["point","interval"]}}async function Mt(t){if(!t)return t;let n="datasets"in t?{...t.datasets}:{},e=async r=>{if(!r)return r;if("layer"in r){let l=await Promise.all(r.layer.map(e));r={...r,layer:l}}if("hconcat"in r){let l=await Promise.all(r.hconcat.map(e));r={...r,hconcat:l}}if("vconcat"in r){let l=await Promise.all(r.vconcat.map(e));r={...r,vconcat:l}}if("spec"in r&&(r={...r,spec:await e(r.spec)}),!r.data||!("url"in r.data))return r;let i;try{i=z(r.data.url)}catch{return r}let o=await rt(i.href,r.data.format);return n[i.pathname]=o,{...r,data:{name:i.pathname}}},a=await e(t);return Object.keys(n).length===0?a:{...a,datasets:n}}var d=Z(it(),1);pt("arrow",yt);var Nt=t=>{let n=(0,kt.c)(12),{value:e,setValue:a,chartSelection:r,fieldSelection:i,spec:o,embedOptions:l}=t,k,s;n[0]===o?(k=n[1],s=n[2]):(k=async()=>Mt(o),s=[o],n[0]=o,n[1]=k,n[2]=s);let{data:m,error:v}=gt(k,s);if(v){let p;return n[3]===v?p=n[4]:(p=(0,d.jsx)(ht,{error:v}),n[3]=v,n[4]=p),p}if(!m)return null;let w;return n[5]!==r||n[6]!==l||n[7]!==i||n[8]!==m||n[9]!==a||n[10]!==e?(w=(0,d.jsx)(Pt,{value:e,setValue:a,chartSelection:r,fieldSelection:i,spec:m,embedOptions:l}),n[5]=r,n[6]=l,n[7]=i,n[8]=m,n[9]=a,n[10]=e,n[11]=w):w=n[11],w},Pt=({value:t,setValue:n,chartSelection:e,fieldSelection:a,spec:r,embedOptions:i})=>{let{theme:o}=ct(),l=(0,x.useRef)(null),k=(0,x.useRef)(void 0),[s,m]=(0,x.useState)(),v=(0,x.useMemo)(()=>i&&"actions"in i?i.actions:{source:!1,compiled:!1},[i]),w=H(r),p=(0,x.useMemo)(()=>T(bt(w),{chartSelection:e,fieldSelection:a}),[w,e,a]),f=(0,x.useMemo)(()=>P(p),[p]),h=C(c=>{n({...t,...c})}),_=(0,x.useMemo)(()=>et((c,g)=>{j.debug("[Vega signal]",c,g);let b=V.mapValues(g,Ct);b=V.mapValues(b,It),h({[c]:b})},100),[h]),M=H(f),I=(0,x.useMemo)(()=>M.reduce((c,g)=>(y.PAN_ZOOM===g||y.isBinColoring(g)||c.push({signalName:g,handler:(b,Y)=>_(b,Y)}),c),[]),[M,_]),Q=C(c=>{j.error(c),j.debug(p),m(c)}),U=C(c=>{j.debug("[Vega view] created",c),k.current=c,m(void 0)}),X=()=>{let c=[];return y.hasPoint(f)&&c.push(["Point selection","click to select a point; hold shift for multi-select"]),y.hasInterval(f)&&c.push(["Interval selection","click and drag to select an interval"]),y.hasLegend(f)&&c.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),y.hasPanZoom(f)&&c.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),c.length===0?null:(0,d.jsx)(st,{delayDuration:300,side:"left",content:(0,d.jsx)("div",{className:"text-xs flex flex-col",children:c.map((g,b)=>(0,d.jsxs)("div",{children:[(0,d.jsxs)("span",{className:"font-bold tracking-wide",children:[g[0],":"]})," ",g[1]]},b))}),children:(0,d.jsx)(lt,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})},A=ut({ref:l,spec:p,options:{theme:o==="dark"?"dark":void 0,actions:v,mode:"vega-lite",tooltip:at.call,renderer:"canvas"},onError:Q,onEmbed:U});return(0,x.useEffect)(()=>(I.forEach(({signalName:c,handler:g})=>{try{A==null||A.view.addSignalListener(c,g)}catch(b){j.error(b)}}),()=>{I.forEach(({signalName:c,handler:g})=>{try{A==null||A.view.removeSignalListener(c,g)}catch(b){j.error(b)}})}),[A,I]),(0,d.jsxs)(d.Fragment,{children:[s&&(0,d.jsxs)(dt,{variant:"destructive",children:[(0,d.jsx)(ft,{children:s.message}),(0,d.jsx)("div",{className:"text-md",children:s.stack})]}),(0,d.jsxs)("div",{className:"relative",onPointerDown:ot.stopPropagation(),children:[(0,d.jsx)("div",{ref:l}),X()]})]})};function It(t){return t instanceof Set?[...t]:t}function Ct(t){return Array.isArray(t)?t.map(n=>n instanceof Date&&mt(n)?new Date(n).getTime():n):t}var Et=Nt;export{Et as default};
import{a as Tt,n as _n,r as Wn,s as Jn,t as qn}from"./precisionRound-CU2C3Vxx.js";import{i as _t,n as Hn,r as Gn,t as Zn}from"./defaultLocale-JieDVWC_.js";import{C as Vn,N as Wt,S as Qn,T as Jt,_ as qt,a as Kn,b as it,c as Ht,i as Xn,l as Gt,n as tr,o as nr,p as Zt,r as rr,s as er,t as ar,v as st,w as ur,x as or}from"./defaultLocale-BLne0bXb.js";function E(t,n,r){return t.fields=n||[],t.fname=r,t}function ir(t){return t==null?null:t.fname}function Vt(t){return t==null?null:t.fields}function Qt(t){return t.length===1?sr(t[0]):lr(t)}var sr=t=>function(n){return n[t]},lr=t=>{let n=t.length;return function(r){for(let e=0;e<n;++e)r=r[t[e]];return r}};function v(t){throw Error(t)}function wt(t){let n=[],r=t.length,e=null,a=0,u="",o,i,c;t+="";function l(){n.push(u+t.substring(o,i)),u="",o=i+1}for(o=i=0;i<r;++i)if(c=t[i],c==="\\")u+=t.substring(o,i++),o=i;else if(c===e)l(),e=null,a=-1;else{if(e)continue;o===a&&c==='"'||o===a&&c==="'"?(o=i+1,e=c):c==="."&&!a?i>o?l():o=i+1:c==="["?(i>o&&l(),a=o=i+1):c==="]"&&(a||v("Access path missing open bracket: "+t),a>0&&l(),a=0,o=i+1)}return a&&v("Access path missing closing bracket: "+t),e&&v("Access path missing closing quote: "+t),i>o&&(i++,l()),n}function lt(t,n,r){let e=wt(t);return t=e.length===1?e[0]:t,E((r&&r.get||Qt)(e),[t],n||t)}var cr=lt("id"),W=E(t=>t,[],"identity"),I=E(()=>0,[],"zero"),Kt=E(()=>1,[],"one"),fr=E(()=>!0,[],"true"),hr=E(()=>!1,[],"false"),gr=new Set([...Object.getOwnPropertyNames(Object.prototype).filter(t=>typeof Object.prototype[t]=="function"),"__proto__"]);function pr(t,n,r){let e=[n].concat([].slice.call(r));console[t].apply(console,e)}var mr=0,dr=1,yr=2,vr=3,br=4;function Mr(t,n,r=pr){let e=t||0;return{level(a){return arguments.length?(e=+a,this):e},error(){return e>=1&&r(n||"error","ERROR",arguments),this},warn(){return e>=2&&r(n||"warn","WARN",arguments),this},info(){return e>=3&&r(n||"log","INFO",arguments),this},debug(){return e>=4&&r(n||"log","DEBUG",arguments),this}}}var J=Array.isArray;function $(t){return t===Object(t)}var Xt=t=>t!=="__proto__";function Cr(...t){return t.reduce((n,r)=>{for(let e in r)if(e==="signals")n.signals=Tr(n.signals,r.signals);else{let a=e==="legend"?{layout:1}:e==="style"?!0:null;jt(n,e,r[e],a)}return n},{})}function jt(t,n,r,e){if(!Xt(n))return;let a,u;if($(r)&&!J(r))for(a in u=$(t[n])?t[n]:t[n]={},r)e&&(e===!0||e[a])?jt(u,a,r[a]):Xt(a)&&(u[a]=r[a]);else t[n]=r}function Tr(t,n){if(t==null)return n;let r={},e=[];function a(u){r[u.name]||(r[u.name]=1,e.push(u))}return n.forEach(a),t.forEach(a),e}function P(t){return t[t.length-1]}function q(t){return t==null||t===""?null:+t}var tn=t=>n=>t*Math.exp(n),nn=t=>n=>Math.log(t*n),rn=t=>n=>Math.sign(n)*Math.log1p(Math.abs(n/t)),en=t=>n=>Math.sign(n)*Math.expm1(Math.abs(n))*t,ct=t=>n=>n<0?-((-n)**+t):n**+t;function ft(t,n,r,e){let a=r(t[0]),u=r(P(t)),o=(u-a)*n;return[e(a-o),e(u-o)]}function wr(t,n){return ft(t,n,q,W)}function jr(t,n){var r=Math.sign(t[0]);return ft(t,n,nn(r),tn(r))}function Dr(t,n,r){return ft(t,n,ct(r),ct(1/r))}function kr(t,n,r){return ft(t,n,rn(r),en(r))}function ht(t,n,r,e,a){let u=e(t[0]),o=e(P(t)),i=n==null?(u+o)/2:e(n);return[a(i+(u-i)*r),a(i+(o-i)*r)]}function Or(t,n,r){return ht(t,n,r,q,W)}function Ur(t,n,r){let e=Math.sign(t[0]);return ht(t,n,r,nn(e),tn(e))}function xr(t,n,r,e){return ht(t,n,r,ct(e),ct(1/e))}function Nr(t,n,r,e){return ht(t,n,r,rn(e),en(e))}function Ar(t){return 1+~~(new Date(t).getMonth()/3)}function Er(t){return 1+~~(new Date(t).getUTCMonth()/3)}function R(t){return t==null?[]:J(t)?t:[t]}function Sr(t,n,r){let e=t[0],a=t[1],u;return a<e&&(u=a,a=e,e=u),u=a-e,u>=r-n?[n,r]:[e=Math.min(Math.max(e,n),r-u),e+u]}function B(t){return typeof t=="function"}var Fr="descending";function Pr(t,n,r){r||(r={}),n=R(n)||[];let e=[],a=[],u={},o=r.comparator||zr;return R(t).forEach((i,c)=>{i!=null&&(e.push(n[c]===Fr?-1:1),a.push(i=B(i)?i:lt(i,null,r)),(Vt(i)||[]).forEach(l=>u[l]=1))}),a.length===0?null:E(o(a,e),Object.keys(u))}var Dt=(t,n)=>(t<n||t==null)&&n!=null?-1:(t>n||n==null)&&t!=null?1:(n=n instanceof Date?+n:n,(t=t instanceof Date?+t:t)!==t&&n===n?-1:n!==n&&t===t?1:0),zr=(t,n)=>t.length===1?Yr(t[0],n[0]):Ir(t,n,t.length),Yr=(t,n)=>function(r,e){return Dt(t(r),t(e))*n},Ir=(t,n,r)=>(n.push(0),function(e,a){let u,o=0,i=-1;for(;o===0&&++i<r;)u=t[i],o=Dt(u(e),u(a));return o*n[i]});function an(t){return B(t)?t:()=>t}function $r(t,n){let r;return e=>{r&&clearTimeout(r),r=setTimeout(()=>(n(e),r=null),t)}}function z(t){for(let n,r,e=1,a=arguments.length;e<a;++e)for(r in n=arguments[e],n)t[r]=n[r];return t}function Rr(t,n){let r=0,e,a,u,o;if(t&&(e=t.length))if(n==null){for(a=t[r];r<e&&(a==null||a!==a);a=t[++r]);for(u=o=a;r<e;++r)a=t[r],a!=null&&(a<u&&(u=a),a>o&&(o=a))}else{for(a=n(t[r]);r<e&&(a==null||a!==a);a=n(t[++r]));for(u=o=a;r<e;++r)a=n(t[r]),a!=null&&(a<u&&(u=a),a>o&&(o=a))}return[u,o]}function Br(t,n){let r=t.length,e=-1,a,u,o,i,c;if(n==null){for(;++e<r;)if(u=t[e],u!=null&&u>=u){a=o=u;break}if(e===r)return[-1,-1];for(i=c=e;++e<r;)u=t[e],u!=null&&(a>u&&(a=u,i=e),o<u&&(o=u,c=e))}else{for(;++e<r;)if(u=n(t[e],e,t),u!=null&&u>=u){a=o=u;break}if(e===r)return[-1,-1];for(i=c=e;++e<r;)u=n(t[e],e,t),u!=null&&(a>u&&(a=u,i=e),o<u&&(o=u,c=e))}return[i,c]}function N(t,n){return Object.hasOwn(t,n)}var gt={};function Lr(t){let n={},r;function e(u){return N(n,u)&&n[u]!==gt}let a={size:0,empty:0,object:n,has:e,get(u){return e(u)?n[u]:void 0},set(u,o){return e(u)||(++a.size,n[u]===gt&&--a.empty),n[u]=o,this},delete(u){return e(u)&&(--a.size,++a.empty,n[u]=gt),this},clear(){a.size=a.empty=0,a.object=n={}},test(u){return arguments.length?(r=u,a):r},clean(){let u={},o=0;for(let i in n){let c=n[i];c!==gt&&(!r||!r(c))&&(u[i]=c,++o)}a.size=o,a.empty=0,a.object=n=u}};return t&&Object.keys(t).forEach(u=>{a.set(u,t[u])}),a}function _r(t,n,r,e,a,u){if(!r&&r!==0)return u;let o=+r,i=t[0],c=P(t),l;c<i&&(l=i,i=c,c=l),l=Math.abs(n-i);let h=Math.abs(c-n);return l<h&&l<=o?e:h<=o?a:u}function Wr(t,n,r){let e=t.prototype=Object.create(n.prototype);return Object.defineProperty(e,"constructor",{value:t,writable:!0,enumerable:!0,configurable:!0}),z(e,r)}function Jr(t,n,r,e){let a=n[0],u=n[n.length-1],o;return a>u&&(o=a,a=u,u=o),r=r===void 0||r,e=e===void 0||e,(r?a<=t:a<t)&&(e?t<=u:t<u)}function qr(t){return typeof t=="boolean"}function un(t){return Object.prototype.toString.call(t)==="[object Date]"}function on(t){return t&&B(t[Symbol.iterator])}function sn(t){return typeof t=="number"}function Hr(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function pt(t){return typeof t=="string"}function Gr(t,n,r){t&&(t=n?R(t).map(i=>i.replace(/\\(.)/g,"$1")):R(t));let e=t&&t.length,a=r&&r.get||Qt,u=i=>a(n?[i]:wt(i)),o;if(!e)o=function(){return""};else if(e===1){let i=u(t[0]);o=function(c){return""+i(c)}}else{let i=t.map(u);o=function(c){let l=""+i[0](c),h=0;for(;++h<e;)l+="|"+i[h](c);return l}}return E(o,t,"key")}function Zr(t,n){let r=t[0],e=P(t),a=+n;return a?a===1?e:r+a*(e-r):r}var Vr=1e4;function Qr(t){t=+t||Vr;let n,r,e,a=()=>{n={},r={},e=0},u=(o,i)=>(++e>t&&(r=n,n={},e=1),n[o]=i);return a(),{clear:a,has:o=>N(n,o)||N(r,o),get:o=>N(n,o)?n[o]:N(r,o)?u(o,r[o]):void 0,set:(o,i)=>N(n,o)?n[o]=i:u(o,i)}}function Kr(t,n,r,e){let a=n.length,u=r.length;if(!u)return n;if(!a)return r;let o=e||new n.constructor(a+u),i=0,c=0,l=0;for(;i<a&&c<u;++l)o[l]=t(n[i],r[c])>0?r[c++]:n[i++];for(;i<a;++i,++l)o[l]=n[i];for(;c<u;++c,++l)o[l]=r[c];return o}function H(t,n){let r="";for(;--n>=0;)r+=t;return r}function Xr(t,n,r,e){let a=r||" ",u=t+"",o=n-u.length;return o<=0?u:e==="left"?H(a,o)+u:e==="center"?H(a,~~(o/2))+u+H(a,Math.ceil(o/2)):u+H(a,o)}function ln(t){return t&&P(t)-t[0]||0}function mt(t){return J(t)?`[${t.map(n=>n===null?"null":mt(n))}]`:$(t)||pt(t)?JSON.stringify(t).replaceAll("\u2028","\\u2028").replaceAll("\u2029","\\u2029"):t}function cn(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}var te=t=>sn(t)||un(t)?t:Date.parse(t);function fn(t,n){return n||(n=te),t==null||t===""?null:n(t)}function hn(t){return t==null||t===""?null:t+""}function gn(t){let n={},r=t.length;for(let e=0;e<r;++e)n[t[e]]=!0;return n}function ne(t,n,r,e){let a=e??"\u2026",u=t+"",o=u.length,i=Math.max(0,n-a.length);return o<=n?u:r==="left"?a+u.slice(o-i):r==="center"?u.slice(0,Math.ceil(i/2))+a+u.slice(o-~~(i/2)):u.slice(0,i)+a}function re(t,n,r){if(t)if(n){let e=t.length;for(let a=0;a<e;++a){let u=n(t[a]);u&&r(u,a,t)}}else t.forEach(r)}var pn={},kt={},Ot=34,G=10,Ut=13;function mn(t){return Function("d","return {"+t.map(function(n,r){return JSON.stringify(n)+": d["+r+'] || ""'}).join(",")+"}")}function ee(t,n){var r=mn(t);return function(e,a){return n(r(e),a,t)}}function dn(t){var n=Object.create(null),r=[];return t.forEach(function(e){for(var a in e)a in n||r.push(n[a]=a)}),r}function T(t,n){var r=t+"",e=r.length;return e<n?Array(n-e+1).join(0)+r:r}function ae(t){return t<0?"-"+T(-t,6):t>9999?"+"+T(t,6):T(t,4)}function ue(t){var n=t.getUTCHours(),r=t.getUTCMinutes(),e=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":ae(t.getUTCFullYear(),4)+"-"+T(t.getUTCMonth()+1,2)+"-"+T(t.getUTCDate(),2)+(a?"T"+T(n,2)+":"+T(r,2)+":"+T(e,2)+"."+T(a,3)+"Z":e?"T"+T(n,2)+":"+T(r,2)+":"+T(e,2)+"Z":r||n?"T"+T(n,2)+":"+T(r,2)+"Z":"")}function oe(t){var n=RegExp('["'+t+`
\r]`),r=t.charCodeAt(0);function e(s,f){var g,p,m=a(s,function(d,C){if(g)return g(d,C-1);p=d,g=f?ee(d,f):mn(d)});return m.columns=p||[],m}function a(s,f){var g=[],p=s.length,m=0,d=0,C,x=p<=0,j=!1;s.charCodeAt(p-1)===G&&--p,s.charCodeAt(p-1)===Ut&&--p;function y(){if(x)return kt;if(j)return j=!1,pn;var ut,ot=m,_;if(s.charCodeAt(ot)===Ot){for(;m++<p&&s.charCodeAt(m)!==Ot||s.charCodeAt(++m)===Ot;);return(ut=m)>=p?x=!0:(_=s.charCodeAt(m++))===G?j=!0:_===Ut&&(j=!0,s.charCodeAt(m)===G&&++m),s.slice(ot+1,ut-1).replace(/""/g,'"')}for(;m<p;){if((_=s.charCodeAt(ut=m++))===G)j=!0;else if(_===Ut)j=!0,s.charCodeAt(m)===G&&++m;else if(_!==r)continue;return s.slice(ot,ut)}return x=!0,s.slice(ot,p)}for(;(C=y())!==kt;){for(var at=[];C!==pn&&C!==kt;)at.push(C),C=y();f&&(at=f(at,d++))==null||g.push(at)}return g}function u(s,f){return s.map(function(g){return f.map(function(p){return h(g[p])}).join(t)})}function o(s,f){return f??(f=dn(s)),[f.map(h).join(t)].concat(u(s,f)).join(`
`)}function i(s,f){return f??(f=dn(s)),u(s,f).join(`
`)}function c(s){return s.map(l).join(`
`)}function l(s){return s.map(h).join(t)}function h(s){return s==null?"":s instanceof Date?ue(s):n.test(s+="")?'"'+s.replace(/"/g,'""')+'"':s}return{parse:e,parseRows:a,format:o,formatBody:i,formatRows:c,formatRow:l,formatValue:h}}function ie(t){return t}function se(t){if(t==null)return ie;var n,r,e=t.scale[0],a=t.scale[1],u=t.translate[0],o=t.translate[1];return function(i,c){c||(n=r=0);var l=2,h=i.length,s=Array(h);for(s[0]=(n+=i[0])*e+u,s[1]=(r+=i[1])*a+o;l<h;)s[l]=i[l],++l;return s}}function le(t,n){for(var r,e=t.length,a=e-n;a<--e;)r=t[a],t[a++]=t[e],t[e]=r}function ce(t,n){return typeof n=="string"&&(n=t.objects[n]),n.type==="GeometryCollection"?{type:"FeatureCollection",features:n.geometries.map(function(r){return yn(t,r)})}:yn(t,n)}function yn(t,n){var r=n.id,e=n.bbox,a=n.properties==null?{}:n.properties,u=vn(t,n);return r==null&&e==null?{type:"Feature",properties:a,geometry:u}:e==null?{type:"Feature",id:r,properties:a,geometry:u}:{type:"Feature",id:r,bbox:e,properties:a,geometry:u}}function vn(t,n){var r=se(t.transform),e=t.arcs;function a(h,s){s.length&&s.pop();for(var f=e[h<0?~h:h],g=0,p=f.length;g<p;++g)s.push(r(f[g],g));h<0&&le(s,p)}function u(h){return r(h)}function o(h){for(var s=[],f=0,g=h.length;f<g;++f)a(h[f],s);return s.length<2&&s.push(s[0]),s}function i(h){for(var s=o(h);s.length<4;)s.push(s[0]);return s}function c(h){return h.map(i)}function l(h){var s=h.type,f;switch(s){case"GeometryCollection":return{type:s,geometries:h.geometries.map(l)};case"Point":f=u(h.coordinates);break;case"MultiPoint":f=h.coordinates.map(u);break;case"LineString":f=o(h.arcs);break;case"MultiLineString":f=h.arcs.map(o);break;case"Polygon":f=c(h.arcs);break;case"MultiPolygon":f=h.arcs.map(c);break;default:return null}return{type:s,coordinates:f}}return l(n)}function fe(t,n){var r={},e={},a={},u=[],o=-1;n.forEach(function(l,h){var s=t.arcs[l<0?~l:l],f;s.length<3&&!s[1][0]&&!s[1][1]&&(f=n[++o],n[o]=l,n[h]=f)}),n.forEach(function(l){var h=i(l),s=h[0],f=h[1],g,p;if(g=a[s])if(delete a[g.end],g.push(l),g.end=f,p=e[f]){delete e[p.start];var m=p===g?g:g.concat(p);e[m.start=g.start]=a[m.end=p.end]=m}else e[g.start]=a[g.end]=g;else if(g=e[f])if(delete e[g.start],g.unshift(l),g.start=s,p=a[s]){delete a[p.end];var d=p===g?g:p.concat(g);e[d.start=p.start]=a[d.end=g.end]=d}else e[g.start]=a[g.end]=g;else g=[l],e[g.start=s]=a[g.end=f]=g});function i(l){var h=t.arcs[l<0?~l:l],s=h[0],f;return t.transform?(f=[0,0],h.forEach(function(g){f[0]+=g[0],f[1]+=g[1]})):f=h[h.length-1],l<0?[f,s]:[s,f]}function c(l,h){for(var s in l){var f=l[s];delete h[f.start],delete f.start,delete f.end,f.forEach(function(g){r[g<0?~g:g]=1}),u.push(f)}}return c(a,e),c(e,a),n.forEach(function(l){r[l<0?~l:l]||u.push([l])}),u}function he(t){return vn(t,ge.apply(this,arguments))}function ge(t,n,r){var e,a,u;if(arguments.length>1)e=pe(t,n,r);else for(a=0,e=Array(u=t.arcs.length);a<u;++a)e[a]=a;return{type:"MultiLineString",arcs:fe(t,e)}}function pe(t,n,r){var e=[],a=[],u;function o(s){var f=s<0?~s:s;(a[f]||(a[f]=[])).push({i:s,g:u})}function i(s){s.forEach(o)}function c(s){s.forEach(i)}function l(s){s.forEach(c)}function h(s){switch(u=s,s.type){case"GeometryCollection":s.geometries.forEach(h);break;case"LineString":i(s.arcs);break;case"MultiLineString":case"Polygon":c(s.arcs);break;case"MultiPolygon":l(s.arcs);break}}return h(n),a.forEach(r==null?function(s){e.push(s[0].i)}:function(s){r(s[0].g,s[s.length-1].g)&&e.push(s[0].i)}),e}var b="year",D="quarter",w="month",M="week",k="date",me="day",F="dayofyear",O="hours",U="minutes",A="seconds",S="milliseconds",bn=[b,D,w,M,k,"day",F,O,U,A,S],xt=bn.reduce((t,n,r)=>(t[n]=1+r,t),{});function Mn(t){let n=R(t).slice(),r={};return n.length||v("Missing time unit."),n.forEach(e=>{N(xt,e)?r[e]=1:v(`Invalid time unit: ${e}.`)}),(r.week||r.day?1:0)+(r.quarter||r.month||r.date?1:0)+(r.dayofyear?1:0)>1&&v(`Incompatible time units: ${t}`),n.sort((e,a)=>xt[e]-xt[a]),n}var de={[b]:"%Y ",[D]:"Q%q ",[w]:"%b ",[k]:"%d ",[M]:"W%U ",day:"%a ",[F]:"%j ",[O]:"%H:00",[U]:"00:%M",[A]:":%S",[S]:".%L",[`${b}-${w}`]:"%Y-%m ",[`${b}-${w}-${k}`]:"%Y-%m-%d ",[`${O}-${U}`]:"%H:%M"};function ye(t,n){let r=z({},de,n),e=Mn(t),a=e.length,u="",o=0,i,c;for(o=0;o<a;)for(i=e.length;i>o;--i)if(c=e.slice(o,i).join("-"),r[c]!=null){u+=r[c],o=i;break}return u.trim()}var Y=new Date;function Nt(t){return Y.setFullYear(t),Y.setMonth(0),Y.setDate(1),Y.setHours(0,0,0,0),Y}function ve(t){return Cn(new Date(t))}function be(t){return At(new Date(t))}function Cn(t){return st.count(Nt(t.getFullYear())-1,t)}function At(t){return Zt.count(Nt(t.getFullYear())-1,t)}function Et(t){return Nt(t).getDay()}function Me(t,n,r,e,a,u,o){if(0<=t&&t<100){let i=new Date(-1,n,r,e,a,u,o);return i.setFullYear(t),i}return new Date(t,n,r,e,a,u,o)}function Ce(t){return Tn(new Date(t))}function Te(t){return St(new Date(t))}function Tn(t){let n=Date.UTC(t.getUTCFullYear(),0,1);return it.count(n-1,t)}function St(t){let n=Date.UTC(t.getUTCFullYear(),0,1);return qt.count(n-1,t)}function Ft(t){return Y.setTime(Date.UTC(t,0,1)),Y.getUTCDay()}function we(t,n,r,e,a,u,o){if(0<=t&&t<100){let i=new Date(Date.UTC(-1,n,r,e,a,u,o));return i.setUTCFullYear(r.y),i}return new Date(Date.UTC(t,n,r,e,a,u,o))}function wn(t,n,r,e,a){let u=n||1,o=P(t),i=(C,x,j)=>(j||(j=C),je(r[j],e[j],C===o&&u,x)),c=new Date,l=gn(t),h=l.year?i(b):an(2012),s=l.month?i(w):l.quarter?i(D):I,f=l.week&&l.day?i("day",1,M+"day"):l.week?i(M,1):l.day?i("day",1):l.date?i(k,1):l.dayofyear?i(F,1):Kt,g=l.hours?i(O):I,p=l.minutes?i(U):I,m=l.seconds?i(A):I,d=l.milliseconds?i(S):I;return function(C){c.setTime(+C);let x=h(c);return a(x,s(c),f(c,x),g(c),p(c),m(c),d(c))}}function je(t,n,r,e){let a=r<=1?t:e?(u,o)=>e+r*Math.floor((t(u,o)-e)/r):(u,o)=>r*Math.floor(t(u,o)/r);return n?(u,o)=>n(a(u,o),o):a}function L(t,n,r){return n+t*7-(r+6)%7}var De={[b]:t=>t.getFullYear(),[D]:t=>Math.floor(t.getMonth()/3),[w]:t=>t.getMonth(),[k]:t=>t.getDate(),[O]:t=>t.getHours(),[U]:t=>t.getMinutes(),[A]:t=>t.getSeconds(),[S]:t=>t.getMilliseconds(),[F]:t=>Cn(t),[M]:t=>At(t),[M+"day"]:(t,n)=>L(At(t),t.getDay(),Et(n)),day:(t,n)=>L(1,t.getDay(),Et(n))},ke={[D]:t=>3*t,[M]:(t,n)=>L(t,0,Et(n))};function Oe(t,n){return wn(t,n||1,De,ke,Me)}var Ue={[b]:t=>t.getUTCFullYear(),[D]:t=>Math.floor(t.getUTCMonth()/3),[w]:t=>t.getUTCMonth(),[k]:t=>t.getUTCDate(),[O]:t=>t.getUTCHours(),[U]:t=>t.getUTCMinutes(),[A]:t=>t.getUTCSeconds(),[S]:t=>t.getUTCMilliseconds(),[F]:t=>Tn(t),[M]:t=>St(t),day:(t,n)=>L(1,t.getUTCDay(),Ft(n)),[M+"day"]:(t,n)=>L(St(t),t.getUTCDay(),Ft(n))},xe={[D]:t=>3*t,[M]:(t,n)=>L(t,0,Ft(n))};function Ne(t,n){return wn(t,n||1,Ue,xe,we)}var Ae={[b]:nr,[D]:Ht.every(3),[w]:Ht,[M]:Zt,[k]:st,day:st,[F]:st,[O]:or,[U]:Vn,[A]:Jt,[S]:Wt},Ee={[b]:er,[D]:Gt.every(3),[w]:Gt,[M]:qt,[k]:it,day:it,[F]:it,[O]:Qn,[U]:ur,[A]:Jt,[S]:Wt};function dt(t){return Ae[t]}function yt(t){return Ee[t]}function jn(t,n,r){return t?t.offset(n,r):void 0}function Se(t,n,r){return jn(dt(t),n,r)}function Fe(t,n,r){return jn(yt(t),n,r)}function Dn(t,n,r,e){return t?t.range(n,r,e):void 0}function Pe(t,n,r,e){return Dn(dt(t),n,r,e)}function ze(t,n,r,e){return Dn(yt(t),n,r,e)}var Z=1e3,V=Z*60,Q=V*60,vt=Q*24,Ye=vt*7,kn=vt*30,Pt=vt*365,On=[b,w,k,O,U,A,S],K=On.slice(0,-1),X=K.slice(0,-1),tt=X.slice(0,-1),Ie=tt.slice(0,-1),$e=[b,M],Un=[b,w],xn=[b],nt=[[K,1,Z],[K,5,5*Z],[K,15,15*Z],[K,30,30*Z],[X,1,V],[X,5,5*V],[X,15,15*V],[X,30,30*V],[tt,1,Q],[tt,3,3*Q],[tt,6,6*Q],[tt,12,12*Q],[Ie,1,vt],[$e,1,Ye],[Un,1,kn],[Un,3,3*kn],[xn,1,Pt]];function Re(t){let n=t.extent,r=t.maxbins||40,e=Math.abs(ln(n))/r,a=Jn(i=>i[2]).right(nt,e),u,o;return a===nt.length?(u=xn,o=Tt(n[0]/Pt,n[1]/Pt,r)):a?(a=nt[e/nt[a-1][2]<nt[a][2]/e?a-1:a],u=a[0],o=a[1]):(u=On,o=Math.max(Tt(n[0],n[1],r),1)),{units:u,step:o}}function rt(t){let n={};return r=>n[r]||(n[r]=t(r))}function Be(t,n){return r=>{let e=t(r),a=e.indexOf(n);if(a<0)return e;let u=Le(e,a),o=u<e.length?e.slice(u):"";for(;--u>a;)if(e[u]!=="0"){++u;break}return e.slice(0,u)+o}}function Le(t,n){let r=t.lastIndexOf("e"),e;if(r>0)return r;for(r=t.length;--r>n;)if(e=t.charCodeAt(r),e>=48&&e<=57)return r+1}function Nn(t){let n=rt(t.format),r=t.formatPrefix;return{format:n,formatPrefix:r,formatFloat(e){let a=_t(e||",");if(a.precision==null){switch(a.precision=12,a.type){case"%":a.precision-=2;break;case"e":--a.precision;break}return Be(n(a),n(".1f")(1)[1])}else return n(a)},formatSpan(e,a,u,o){o=_t(o??",f");let i=Tt(e,a,u),c=Math.max(Math.abs(e),Math.abs(a)),l;if(o.precision==null)switch(o.type){case"s":return isNaN(l=_n(i,c))||(o.precision=l),r(o,c);case"":case"e":case"g":case"p":case"r":isNaN(l=qn(i,c))||(o.precision=l-(o.type==="e"));break;case"f":case"%":isNaN(l=Wn(i))||(o.precision=l-(o.type==="%")*2);break}return n(o)}}}var zt;An();function An(){return zt=Nn({format:Zn,formatPrefix:Hn})}function En(t){return Nn(Gn(t))}function bt(t){return arguments.length?zt=En(t):zt}function Sn(t,n,r){r||(r={}),$(r)||v(`Invalid time multi-format specifier: ${r}`);let e=n(A),a=n(U),u=n(O),o=n(k),i=n(M),c=n(w),l=n(D),h=n(b),s=t(r.milliseconds||".%L"),f=t(r.seconds||":%S"),g=t(r.minutes||"%I:%M"),p=t(r.hours||"%I %p"),m=t(r.date||r.day||"%a %d"),d=t(r.week||"%b %d"),C=t(r.month||"%B"),x=t(r.quarter||"%B"),j=t(r.year||"%Y");return y=>(e(y)<y?s:a(y)<y?f:u(y)<y?g:o(y)<y?p:c(y)<y?i(y)<y?m:d:h(y)<y?l(y)<y?C:x:j)(y)}function Fn(t){let n=rt(t.format),r=rt(t.utcFormat);return{timeFormat:e=>pt(e)?n(e):Sn(n,dt,e),utcFormat:e=>pt(e)?r(e):Sn(r,yt,e),timeParse:rt(t.parse),utcParse:rt(t.utcParse)}}var Yt;Pn();function Pn(){return Yt=Fn({format:ar,parse:tr,utcFormat:rr,utcParse:Xn})}function zn(t){return Fn(Kn(t))}function et(t){return arguments.length?Yt=zn(t):Yt}var It=(t,n)=>z({},t,n);function _e(t,n){return It(t?En(t):bt(),n?zn(n):et())}function Yn(t,n){let r=arguments.length;return r&&r!==2&&v("defaultLocale expects either zero or two arguments."),r?It(bt(t),et(n)):It(bt(),et())}function We(){return An(),Pn(),Yn()}var Je=/^(data:|([A-Za-z]+:)?\/\/)/,qe=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,He=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Ge="file://";function Ze(t){return n=>({options:n||{},sanitize:Qe,load:Ve,fileAccess:!1,file:Ke(),http:ta})}async function Ve(t,n){let r=await this.sanitize(t,n),e=r.href;return r.localFile?this.file(e):this.http(e,n==null?void 0:n.http)}async function Qe(t,n){n=z({},this.options,n);let r=this.fileAccess,e={href:null},a,u,o,i=qe.test(t.replace(He,""));(t==null||typeof t!="string"||!i)&&v("Sanitize failure, invalid URI: "+mt(t));let c=Je.test(t);return(o=n.baseURL)&&!c&&(!t.startsWith("/")&&!o.endsWith("/")&&(t="/"+t),t=o+t),u=(a=t.startsWith(Ge))||n.mode==="file"||n.mode!=="http"&&!c&&r,a?t=t.slice(7):t.startsWith("//")&&(n.defaultProtocol==="file"?(t=t.slice(2),u=!0):t=(n.defaultProtocol||"http")+":"+t),Object.defineProperty(e,"localFile",{value:!!u}),e.href=t,n.target&&(e.target=n.target+""),n.rel&&(e.rel=n.rel+""),n.context==="image"&&n.crossOrigin&&(e.crossOrigin=n.crossOrigin+""),e}function Ke(t){return Xe}async function Xe(){v("No file system access.")}async function ta(t,n){let r=z({},this.options.http,n),e=n&&n.response,a=await fetch(t,r);return a.ok?B(a[e])?a[e]():a.text():v(a.status+""+a.statusText)}var na=t=>t!=null&&t===t,ra=t=>t==="true"||t==="false"||t===!0||t===!1,ea=t=>!Number.isNaN(Date.parse(t)),In=t=>!Number.isNaN(+t)&&!(t instanceof Date),aa=t=>In(t)&&Number.isInteger(+t),$t={boolean:cn,integer:q,number:q,date:fn,string:hn,unknown:W},Mt=[ra,aa,In,ea],ua=["boolean","integer","number","date"];function $n(t,n){if(!t||!t.length)return"unknown";let r=t.length,e=Mt.length,a=Mt.map((u,o)=>o+1);for(let u=0,o=0,i,c;u<r;++u)for(c=n?t[u][n]:t[u],i=0;i<e;++i)if(a[i]&&na(c)&&!Mt[i](c)&&(a[i]=0,++o,o===Mt.length))return"string";return ua[a.reduce((u,o)=>u===0?o:u,0)-1]}function Rn(t,n){return n.reduce((r,e)=>(r[e]=$n(t,e),r),{})}function Bn(t){let n=function(r,e){let a={delimiter:t};return Rt(r,e?z(e,a):a)};return n.responseType="text",n}function Rt(t,n){return n.header&&(t=n.header.map(mt).join(n.delimiter)+`
`+t),oe(n.delimiter).parse(t+"")}Rt.responseType="text";function oa(t){return typeof Buffer=="function"&&B(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function Bt(t,n){let r=n&&n.property?lt(n.property):W;return $(t)&&!oa(t)?ia(r(t),n):r(JSON.parse(t))}Bt.responseType="json";function ia(t,n){return!J(t)&&on(t)&&(t=[...t]),n&&n.copy?JSON.parse(JSON.stringify(t)):t}var sa={interior:(t,n)=>t!==n,exterior:(t,n)=>t===n};function Ln(t,n){let r,e,a,u;return t=Bt(t,n),n&&n.feature?(r=ce,a=n.feature):n&&n.mesh?(r=he,a=n.mesh,u=sa[n.filter]):v("Missing TopoJSON feature or mesh parameter."),e=(e=t.objects[a])?r(t,e,u):v("Invalid TopoJSON object: "+a),e&&e.features||[e]}Ln.responseType="json";var Ct={dsv:Rt,csv:Bn(","),tsv:Bn(" "),json:Bt,topojson:Ln};function Lt(t,n){return arguments.length>1?(Ct[t]=n,this):N(Ct,t)?Ct[t]:null}function la(t){let n=Lt(t);return n&&n.responseType||"text"}function ca(t,n,r,e){n||(n={});let a=Lt(n.type||"json");return a||v("Unknown data format type: "+n.type),t=a(t,n),n.parse&&fa(t,n.parse,r,e),N(t,"columns")&&delete t.columns,t}function fa(t,n,r,e){if(!t.length)return;let a=et();r||(r=a.timeParse),e||(e=a.utcParse);let u=t.columns||Object.keys(t[0]),o,i,c,l,h,s;n==="auto"&&(n=Rn(t,u)),u=Object.keys(n);let f=u.map(g=>{let p=n[g],m,d;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return m=p.split(/:(.+)?/,2),d=m[1],(d[0]==="'"&&d[d.length-1]==="'"||d[0]==='"'&&d[d.length-1]==='"')&&(d=d.slice(1,-1)),(m[0]==="utc"?e:r)(d);if(!$t[p])throw Error("Illegal format pattern: "+g+":"+p);return $t[p]});for(c=0,h=t.length,s=u.length;c<h;++c)for(o=t[c],l=0;l<s;++l)i=u[l],o[i]=f[l](o[i])}var ha=Ze();export{Sr as $,Or as $t,Se as A,Cr as At,be as B,ln as Bt,bn as C,Hr as Ct,ve as D,Mr as Dt,Re as E,Zr as Et,yt as F,Dr as Ft,vr as G,gn as Gt,br as H,cn as Ht,Fe as I,kr as It,E as J,fr as Jt,mr as K,hn as Kt,ze as L,P as Lt,ye as M,Xr as Mt,Mn as N,wr as Nt,Oe as O,Qr as Ot,Ne as P,jr as Pt,Dt as Q,I as Qt,Ce as R,Ar as Rt,A as S,$ as St,b as T,Gr as Tt,gr as U,fn as Ut,mt as V,wt as Vt,dr as W,q as Wt,ir as X,re as Xt,Vt as Y,Er as Yt,R as Z,jt as Zt,O as _,qr as _t,ha as a,Rr as at,w as b,on as bt,$t as c,Lr as ct,bt as d,N as dt,Ur as en,Pr as et,We as f,cr as ft,F as g,J as gt,me as h,Jr as ht,Rn as i,z as it,Pe as j,Kt as jt,dt as k,Kr as kt,Yn as l,lt,k as m,Wr as mt,Lt as n,Nr as nn,$r as nt,ca as o,Br as ot,et as p,W as pt,yr as q,ne as qt,$n as r,v as rt,la as s,hr as st,Ct as t,xr as tn,an as tt,_e as u,_r as ut,S as v,un as vt,M as w,pt as wt,D as x,sn as xt,U as y,B as yt,Te as z,H as zt};
import{t as o}from"./velocity-viirwPm7.js";export{o as velocity};
function o(t){for(var e={},r=t.split(" "),n=0;n<r.length;++n)e[r[n]]=!0;return e}var f=o("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),i=o("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),c=o("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"),k=/[+\-*&%=<>!?:\/|]/;function s(t,e,r){return e.tokenize=r,r(t,e)}function l(t,e){var r=e.beforeParams;e.beforeParams=!1;var n=t.next();if(n=="'"&&!e.inString&&e.inParams)return e.lastTokenWasBuiltin=!1,s(t,e,m(n));if(n=='"'){if(e.lastTokenWasBuiltin=!1,e.inString)return e.inString=!1,"string";if(e.inParams)return s(t,e,m(n))}else{if(/[\[\]{}\(\),;\.]/.test(n))return n=="("&&r?e.inParams=!0:n==")"&&(e.inParams=!1,e.lastTokenWasBuiltin=!0),null;if(/\d/.test(n))return e.lastTokenWasBuiltin=!1,t.eatWhile(/[\w\.]/),"number";if(n=="#"&&t.eat("*"))return e.lastTokenWasBuiltin=!1,s(t,e,p);if(n=="#"&&t.match(/ *\[ *\[/))return e.lastTokenWasBuiltin=!1,s(t,e,h);if(n=="#"&&t.eat("#"))return e.lastTokenWasBuiltin=!1,t.skipToEnd(),"comment";if(n=="$")return t.eat("!"),t.eatWhile(/[\w\d\$_\.{}-]/),c&&c.propertyIsEnumerable(t.current())?"keyword":(e.lastTokenWasBuiltin=!0,e.beforeParams=!0,"builtin");if(k.test(n))return e.lastTokenWasBuiltin=!1,t.eatWhile(k),"operator";t.eatWhile(/[\w\$_{}@]/);var a=t.current();return f&&f.propertyIsEnumerable(a)?"keyword":i&&i.propertyIsEnumerable(a)||t.current().match(/^#@?[a-z0-9_]+ *$/i)&&t.peek()=="("&&!(i&&i.propertyIsEnumerable(a.toLowerCase()))?(e.beforeParams=!0,e.lastTokenWasBuiltin=!1,"keyword"):e.inString?(e.lastTokenWasBuiltin=!1,"string"):t.pos>a.length&&t.string.charAt(t.pos-a.length-1)=="."&&e.lastTokenWasBuiltin?"builtin":(e.lastTokenWasBuiltin=!1,null)}}function m(t){return function(e,r){for(var n=!1,a,u=!1;(a=e.next())!=null;){if(a==t&&!n){u=!0;break}if(t=='"'&&e.peek()=="$"&&!n){r.inString=!0,u=!0;break}n=!n&&a=="\\"}return u&&(r.tokenize=l),"string"}}function p(t,e){for(var r=!1,n;n=t.next();){if(n=="#"&&r){e.tokenize=l;break}r=n=="*"}return"comment"}function h(t,e){for(var r=0,n;n=t.next();){if(n=="#"&&r==2){e.tokenize=l;break}n=="]"?r++:n!=" "&&(r=0)}return"meta"}const b={name:"velocity",startState:function(){return{tokenize:l,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(t,e){return t.eatSpace()?null:e.tokenize(t,e)},languageData:{commentTokens:{line:"##",block:{open:"#*",close:"*#"}}}};export{b as t};
function T(i){var r=i.statementIndentUnit,s=i.dontAlignCalls,c=i.noIndentKeywords||[],m=i.multiLineStrings,l=i.hooks||{};function v(e){for(var n={},t=e.split(" "),a=0;a<t.length;++a)n[t[a]]=!0;return n}var g=v("accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor"),b=/[\+\-\*\/!~&|^%=?:]/,h=/[\[\]{}()]/,k=/\d[0-9_]*/,_=/\d*\s*'s?d\s*\d[0-9_]*/i,S=/\d*\s*'s?b\s*[xz01][xz01_]*/i,M=/\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i,U=/\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i,$=/(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i,D=/^((\w+)|[)}\]])/,V=/[)}\]]/,u,p,K=v("case checker class clocking config function generate interface module package primitive program property specify sequence table task"),d={};for(var y in K)d[y]="end"+y;for(var P in d.begin="end",d.casex="endcase",d.casez="endcase",d.do="while",d.fork="join;join_any;join_none",d.covergroup="endgroup",c){var y=c[P];d[y]&&(d[y]=void 0)}var R=v("always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while");function x(e,n){var t=e.peek(),a;if(l[t]&&(a=l[t](e,n))!=0||l.tokenBase&&(a=l.tokenBase(e,n))!=0)return a;if(/[,;:\.]/.test(t))return u=e.next(),null;if(h.test(t))return u=e.next(),"bracket";if(t=="`")return e.next(),e.eatWhile(/[\w\$_]/)?"def":null;if(t=="$")return e.next(),e.eatWhile(/[\w\$_]/)?"meta":null;if(t=="#")return e.next(),e.eatWhile(/[\d_.]/),"def";if(t=='"')return e.next(),n.tokenize=F(t),n.tokenize(e,n);if(t=="/"){if(e.next(),e.eat("*"))return n.tokenize=A,A(e,n);if(e.eat("/"))return e.skipToEnd(),"comment";e.backUp(1)}if(e.match($)||e.match(_)||e.match(S)||e.match(M)||e.match(U)||e.match(k)||e.match($))return"number";if(e.eatWhile(b))return"meta";if(e.eatWhile(/[\w\$_]/)){var o=e.current();return g[o]?(d[o]&&(u="newblock"),R[o]&&(u="newstatement"),p=o,"keyword"):"variable"}return e.next(),null}function F(e){return function(n,t){for(var a=!1,o,w=!1;(o=n.next())!=null;){if(o==e&&!a){w=!0;break}a=!a&&o=="\\"}return(w||!(a||m))&&(t.tokenize=x),"string"}}function A(e,n){for(var t=!1,a;a=e.next();){if(a=="/"&&t){n.tokenize=x;break}t=a=="*"}return"comment"}function B(e,n,t,a,o){this.indented=e,this.column=n,this.type=t,this.align=a,this.prev=o}function f(e,n,t){var a=e.indented;return e.context=new B(a,n,t,null,e.context)}function j(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}function q(e,n){if(e==n)return!0;var t=n.split(";");for(var a in t)if(e==t[a])return!0;return!1}function G(){var e=[];for(var n in d)if(d[n]){var t=d[n].split(";");for(var a in t)e.push(t[a])}return RegExp("[{}()\\[\\]]|("+e.join("|")+")$")}return{name:"verilog",startState:function(e){var n={tokenize:null,context:new B(-e,0,"top",!1),indented:0,startOfLine:!0};return l.startState&&l.startState(n),n},token:function(e,n){var t=n.context;if(e.sol()&&(t.align??(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),l.token){var a=l.token(e,n);if(a!==void 0)return a}if(e.eatSpace())return null;u=null,p=null;var a=(n.tokenize||x)(e,n);if(a=="comment"||a=="meta"||a=="variable")return a;if(t.align??(t.align=!0),u==t.type)j(n);else if(u==";"&&t.type=="statement"||t.type&&q(p,t.type))for(t=j(n);t&&t.type=="statement";)t=j(n);else if(u=="{")f(n,e.column(),"}");else if(u=="[")f(n,e.column(),"]");else if(u=="(")f(n,e.column(),")");else if(t&&t.type=="endcase"&&u==":")f(n,e.column(),"statement");else if(u=="newstatement")f(n,e.column(),"statement");else if(u=="newblock"&&!(p=="function"&&t&&(t.type=="statement"||t.type=="endgroup"))&&!(p=="task"&&t&&t.type=="statement")){var o=d[p];f(n,e.column(),o)}return n.startOfLine=!1,a},indent:function(e,n,t){if(e.tokenize!=x&&e.tokenize!=null)return null;if(l.indent){var a=l.indent(e);if(a>=0)return a}var o=e.context,w=n&&n.charAt(0);o.type=="statement"&&w=="}"&&(o=o.prev);var I=!1,E=n.match(D);return E&&(I=q(E[0],o.type)),o.type=="statement"?o.indented+(w=="{"?0:r||t.unit):V.test(o.type)&&o.align&&!s?o.column+(I?0:1):o.type==")"&&!I?o.indented+(r||t.unit):o.indented+(I?0:t.unit)},languageData:{indentOnInput:G(),commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}}}const H=T({});var N={"|":"link",">":"property",$:"variable",$$:"variable","?$":"qualifier","?*":"qualifier","-":"contentSeparator","/":"property","/-":"property","@":"variableName.special","@-":"variableName.special","@++":"variableName.special","@+=":"variableName.special","@+=-":"variableName.special","@--":"variableName.special","@-=":"variableName.special","%+":"tag","%-":"tag","%":"tag",">>":"tag","<<":"tag","<>":"tag","#":"tag","^":"attribute","^^":"attribute","^!":"attribute","*":"variable","**":"variable","\\":"keyword",'"':"comment"},O={"/":"beh-hier",">":"beh-hier","-":"phys-hier","|":"pipe","?":"when","@":"stage","\\":"keyword"},z=3,C=!1,L=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,J=/^[! ] */,W=/^\/[\/\*]/;const Q=T({hooks:{electricInput:!1,token:function(i,r){var s=void 0,c;if(i.sol()&&!r.tlvInBlockComment){i.peek()=="\\"&&(s="def",i.skipToEnd(),i.string.match(/\\SV/)?r.tlvCodeActive=!1:i.string.match(/\\TLV/)&&(r.tlvCodeActive=!0)),r.tlvCodeActive&&i.pos==0&&r.indented==0&&(c=i.match(J,!1))&&(r.indented=c[0].length);var m=r.indented,l=m/z;if(l<=r.tlvIndentationStyle.length){var v=i.string.length==m,g=l*z;if(g<i.string.length){var b=i.string.slice(g),h=b[0];O[h]&&(c=b.match(L))&&N[c[1]]&&(m+=z,h=="\\"&&g>0||(r.tlvIndentationStyle[l]=O[h],C&&(r.statementComment=!1),l++))}if(!v)for(;r.tlvIndentationStyle.length>l;)r.tlvIndentationStyle.pop()}r.tlvNextIndent=m}if(r.tlvCodeActive){var k=!1;C&&(k=i.peek()!=" "&&s===void 0&&!r.tlvInBlockComment&&i.column()==r.tlvIndentationStyle.length*z,k&&(r.statementComment&&(k=!1),r.statementComment=i.match(W,!1)));var c;if(s===void 0)if(r.tlvInBlockComment)i.match(/^.*?\*\//)?(r.tlvInBlockComment=!1,C&&!i.eol()&&(r.statementComment=!1)):i.skipToEnd(),s="comment";else if((c=i.match(W))&&!r.tlvInBlockComment)c[0]=="//"?i.skipToEnd():r.tlvInBlockComment=!0,s="comment";else if(c=i.match(L)){var _=c[1],S=c[2];N.hasOwnProperty(_)&&(S.length>0||i.eol())?s=N[_]:i.backUp(i.current().length-1)}else i.match(/^\t+/)?s="invalid":i.match(/^[\[\]{}\(\);\:]+/)?s="meta":(c=i.match(/^[mM]4([\+_])?[\w\d_]*/))?s=c[1]=="+"?"keyword.special":"keyword":i.match(/^ +/)?i.eol()&&(s="error"):i.match(/^[\w\d_]+/)?s="number":i.next()}else i.match(/^[mM]4([\w\d_]*)/)&&(s="keyword");return s},indent:function(i){return i.tlvCodeActive==1?i.tlvNextIndent:-1},startState:function(i){i.tlvIndentationStyle=[],i.tlvCodeActive=!0,i.tlvNextIndent=-1,i.tlvInBlockComment=!1,C&&(i.statementComment=!1)}}});export{H as n,Q as t};
import{n as o,t as r}from"./verilog-CZguTLBV.js";export{r as tlv,o as verilog};
import{t as o}from"./vhdl-CAEhCBOl.js";export{o as vhdl};
function c(n){for(var t={},e=n.split(","),r=0;r<e.length;++r){var i=e[r].toUpperCase(),a=e[r].charAt(0).toUpperCase()+e[r].slice(1);t[e[r]]=!0,t[i]=!0,t[a]=!0}return t}function f(n){return n.eatWhile(/[\w\$_]/),"meta"}var g=c("null"),p={"`":f,$:f},d=!1,b=c("abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,end block,end case,end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for,function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage,literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map,postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor"),h=c("architecture,entity,begin,case,port,else,elsif,end,for,function,if"),m=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/,o;function l(n,t){var e=n.next();if(p[e]){var r=p[e](n,t);if(r!==!1)return r}if(e=='"')return t.tokenize=v(e),t.tokenize(n,t);if(e=="'")return t.tokenize=k(e),t.tokenize(n,t);if(/[\[\]{}\(\),;\:\.]/.test(e))return o=e,null;if(/[\d']/.test(e))return n.eatWhile(/[\w\.']/),"number";if(e=="-"&&n.eat("-"))return n.skipToEnd(),"comment";if(m.test(e))return n.eatWhile(m),"operator";n.eatWhile(/[\w\$_]/);var i=n.current();return b.propertyIsEnumerable(i.toLowerCase())?(h.propertyIsEnumerable(i)&&(o="newstatement"),"keyword"):g.propertyIsEnumerable(i)?"atom":"variable"}function k(n){return function(t,e){for(var r=!1,i,a=!1;(i=t.next())!=null;){if(i==n&&!r){a=!0;break}r=!r&&i=="--"}return(a||!(r||d))&&(e.tokenize=l),"string"}}function v(n){return function(t,e){for(var r=!1,i,a=!1;(i=t.next())!=null;){if(i==n&&!r){a=!0;break}r=!r&&i=="--"}return(a||!(r||d))&&(e.tokenize=l),"string.special"}}function y(n,t,e,r,i){this.indented=n,this.column=t,this.type=e,this.align=r,this.prev=i}function s(n,t,e){return n.context=new y(n.indented,t,e,null,n.context)}function u(n){var t=n.context.type;return(t==")"||t=="]"||t=="}")&&(n.indented=n.context.indented),n.context=n.context.prev}const x={name:"vhdl",startState:function(n){return{tokenize:null,context:new y(-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(n,t){var e=t.context;if(n.sol()&&(e.align??(e.align=!1),t.indented=n.indentation(),t.startOfLine=!0),n.eatSpace())return null;o=null;var r=(t.tokenize||l)(n,t);if(r=="comment"||r=="meta")return r;if(e.align??(e.align=!0),(o==";"||o==":")&&e.type=="statement")u(t);else if(o=="{")s(t,n.column(),"}");else if(o=="[")s(t,n.column(),"]");else if(o=="(")s(t,n.column(),")");else if(o=="}"){for(;e.type=="statement";)e=u(t);for(e.type=="}"&&(e=u(t));e.type=="statement";)e=u(t)}else o==e.type?u(t):(e.type=="}"||e.type=="top"||e.type=="statement"&&o=="newstatement")&&s(t,n.column(),"statement");return t.startOfLine=!1,r},indent:function(n,t,e){if(n.tokenize!=l&&n.tokenize!=null)return 0;var r=t&&t.charAt(0),i=n.context,a=r==i.type;return i.type=="statement"?i.indented+(r=="{"?0:e.unit):i.align?i.column+(a?0:1):i.indented+(a?0:e.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"--"}}};export{x as t};
var L,p,y,k,x,D=-1,m=function(n){addEventListener("pageshow",(function(e){e.persisted&&(D=e.timeStamp,n(e))}),!0)},F=function(){var n=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(n&&n.responseStart>0&&n.responseStart<performance.now())return n},S=function(){var n=F();return n&&n.activationStart||0},d=function(n,e){var t=F(),r="navigate";return D>=0?r="back-forward-cache":t&&(document.prerendering||S()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-"))),{name:n,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},h=function(n,e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(n)){var r=new PerformanceObserver((function(i){Promise.resolve().then((function(){e(i.getEntries())}))}));return r.observe(Object.assign({type:n,buffered:!0},t||{})),r}}catch{}},l=function(n,e,t,r){var i,a;return function(c){e.value>=0&&(c||r)&&((a=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=a,e.rating=(function(o,u){return o>u[1]?"poor":o>u[0]?"needs-improvement":"good"})(e.value,t),n(e))}},w=function(n){requestAnimationFrame((function(){return requestAnimationFrame((function(){return n()}))}))},E=function(n){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&n()}))},P=function(n){var e=!1;return function(){e||(e=(n(),!0))}},v=-1,R=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},T=function(n){document.visibilityState==="hidden"&&v>-1&&(v=n.type==="visibilitychange"?n.timeStamp:0,V())},q=function(){addEventListener("visibilitychange",T,!0),addEventListener("prerenderingchange",T,!0)},V=function(){removeEventListener("visibilitychange",T,!0),removeEventListener("prerenderingchange",T,!0)},H=function(){return v<0&&(v=R(),q(),m((function(){setTimeout((function(){v=R(),q()}),0)}))),{get firstHiddenTime(){return v}}},I=function(n){document.prerendering?addEventListener("prerenderingchange",(function(){return n()}),!0):n()},N=[1800,3e3],W=function(n,e){e||(e={}),I((function(){var t,r=H(),i=d("FCP"),a=h("paint",(function(c){c.forEach((function(o){o.name==="first-contentful-paint"&&(a.disconnect(),o.startTime<r.firstHiddenTime&&(i.value=Math.max(o.startTime-S(),0),i.entries.push(o),t(!0)))}))}));a&&(t=l(n,i,N,e.reportAllChanges),m((function(c){i=d("FCP"),t=l(n,i,N,e.reportAllChanges),w((function(){i.value=performance.now()-c.timeStamp,t(!0)}))})))}))},O=[.1,.25],Y=function(n,e){e||(e={}),W(P((function(){var t,r=d("CLS",0),i=0,a=[],c=function(u){u.forEach((function(f){if(!f.hadRecentInput){var K=a[0],U=a[a.length-1];i&&f.startTime-U.startTime<1e3&&f.startTime-K.startTime<5e3?(i+=f.value,a.push(f)):(i=f.value,a=[f])}})),i>r.value&&(r.value=i,r.entries=a,t())},o=h("layout-shift",c);o&&(t=l(n,r,O,e.reportAllChanges),E((function(){c(o.takeRecords()),t(!0)})),m((function(){i=0,r=d("CLS",0),t=l(n,r,O,e.reportAllChanges),w((function(){return t()}))})),setTimeout(t,0))})))},B=0,A=1/0,b=0,Q=function(n){n.forEach((function(e){e.interactionId&&(A=Math.min(A,e.interactionId),b=Math.max(b,e.interactionId),B=b?(b-A)/7+1:0)}))},j=function(){return L?B:performance.interactionCount||0},X=function(){"interactionCount"in performance||L||(L=h("event",Q,{type:"event",buffered:!0,durationThreshold:0}))},s=[],C=new Map,_=0,Z=function(){return s[Math.min(s.length-1,Math.floor((j()-_)/50))]},nn=[],en=function(n){if(nn.forEach((function(i){return i(n)})),n.interactionId||n.entryType==="first-input"){var e=s[s.length-1],t=C.get(n.interactionId);if(t||s.length<10||n.duration>e.latency){if(t)n.duration>t.latency?(t.entries=[n],t.latency=n.duration):n.duration===t.latency&&n.startTime===t.entries[0].startTime&&t.entries.push(n);else{var r={id:n.interactionId,latency:n.duration,entries:[n]};C.set(r.id,r),s.push(r)}s.sort((function(i,a){return a.latency-i.latency})),s.length>10&&s.splice(10).forEach((function(i){return C.delete(i.id)}))}}},$=function(n){var e=self.requestIdleCallback||self.setTimeout,t=-1;return n=P(n),document.visibilityState==="hidden"?n():(t=e(n),E(n)),t},z=[200,500],tn=function(n,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e||(e={}),I((function(){X();var t,r=d("INP"),i=function(c){$((function(){c.forEach(en);var o=Z();o&&o.latency!==r.value&&(r.value=o.latency,r.entries=o.entries,t())}))},a=h("event",i,{durationThreshold:e.durationThreshold??40});t=l(n,r,z,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),E((function(){i(a.takeRecords()),t(!0)})),m((function(){_=j(),s.length=0,C.clear(),r=d("INP"),t=l(n,r,z,e.reportAllChanges)})))})))},G=[2500,4e3],M={},rn=function(n,e){e||(e={}),I((function(){var t,r=H(),i=d("LCP"),a=function(u){e.reportAllChanges||(u=u.slice(-1)),u.forEach((function(f){f.startTime<r.firstHiddenTime&&(i.value=Math.max(f.startTime-S(),0),i.entries=[f],t())}))},c=h("largest-contentful-paint",a);if(c){t=l(n,i,G,e.reportAllChanges);var o=P((function(){M[i.id]||(a(c.takeRecords()),c.disconnect(),M[i.id]=!0,t(!0))}));["keydown","click"].forEach((function(u){addEventListener(u,(function(){return $(o)}),{once:!0,capture:!0})})),E(o),m((function(u){i=d("LCP"),t=l(n,i,G,e.reportAllChanges),w((function(){i.value=performance.now()-u.timeStamp,M[i.id]=!0,t(!0)}))}))}}))},g={passive:!0,capture:!0},an=new Date,J=function(n,e){p||(p=e,y=n,k=new Date,un(removeEventListener),on())},on=function(){if(y>=0&&y<k-an){var n={entryType:"first-input",name:p.type,target:p.target,cancelable:p.cancelable,startTime:p.timeStamp,processingStart:p.timeStamp+y};x.forEach((function(e){e(n)})),x=[]}},cn=function(n){if(n.cancelable){var e=(n.timeStamp>1e12?new Date:performance.now())-n.timeStamp;n.type=="pointerdown"?(function(t,r){var i=function(){J(t,r),c()},a=function(){c()},c=function(){removeEventListener("pointerup",i,g),removeEventListener("pointercancel",a,g)};addEventListener("pointerup",i,g),addEventListener("pointercancel",a,g)})(e,n):J(e,n)}},un=function(n){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return n(e,cn,g)}))};export{Y as onCLS,tn as onINP,rn as onLCP};
import{t as e}from"./webidl-BNJg_7gX.js";export{e as webIDL};
function a(t){return RegExp("^(("+t.join(")|(")+"))\\b")}var i=["Clamp","Constructor","EnforceRange","Exposed","ImplicitThis","Global","PrimaryGlobal","LegacyArrayClass","LegacyUnenumerableNamedProperties","LenientThis","NamedConstructor","NewObject","NoInterfaceObject","OverrideBuiltins","PutForwards","Replaceable","SameObject","TreatNonObjectAsNull","TreatNullAs","EmptyString","Unforgeable","Unscopeable"],s=a(i),o="unsigned.short.long.unrestricted.float.double.boolean.byte.octet.Promise.ArrayBuffer.DataView.Int8Array.Int16Array.Int32Array.Uint8Array.Uint16Array.Uint32Array.Uint8ClampedArray.Float32Array.Float64Array.ByteString.DOMString.USVString.sequence.object.RegExp.Error.DOMException.FrozenArray.any.void".split("."),u=a(o),c=["attribute","callback","const","deleter","dictionary","enum","getter","implements","inherit","interface","iterable","legacycaller","maplike","partial","required","serializer","setlike","setter","static","stringifier","typedef","optional","readonly","or"],f=a(c),l=["true","false","Infinity","NaN","null"],d=a(l),y=a(["callback","dictionary","enum","interface"]),p=a(["typedef"]),b=/^[:<=>?]/,h=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,g=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,m=/^_?[A-Za-z][0-9A-Z_a-z-]*/,A=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,D=/^"[^"]*"/,k=/^\/\*.*?\*\//,E=/^\/\*.*/,C=/^.*?\*\//;function N(t,e){if(t.eatSpace())return null;if(e.inComment)return t.match(C)?(e.inComment=!1,"comment"):(t.skipToEnd(),"comment");if(t.match("//"))return t.skipToEnd(),"comment";if(t.match(k))return"comment";if(t.match(E))return e.inComment=!0,"comment";if(t.match(/^-?[0-9\.]/,!1)&&(t.match(h)||t.match(g)))return"number";if(t.match(D))return"string";if(e.startDef&&t.match(m))return"def";if(e.endDef&&t.match(A))return e.endDef=!1,"def";if(t.match(f))return"keyword";if(t.match(u)){var r=e.lastToken,n=(t.match(/^\s*(.+?)\b/,!1)||[])[1];return r===":"||r==="implements"||n==="implements"||n==="="?"builtin":"type"}return t.match(s)?"builtin":t.match(d)?"atom":t.match(m)?"variable":t.match(b)?"operator":(t.next(),null)}const T={name:"webidl",startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(t,e){var r=N(t,e);if(r){var n=t.current();e.lastToken=n,r==="keyword"?(e.startDef=y.test(n),e.endDef=e.endDef||p.test(n)):e.startDef=!1}return r},languageData:{autocomplete:i.concat(o).concat(c).concat(l)}};export{T as t};

Sorry, the diff of this file is too big to display

import{t}from"./createLucideIcon-BCdY6lG5.js";var e=t("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);export{e as t};
import{s as V}from"./chunk-LvLJmgfZ.js";import{t as B}from"./react-Bj1aDYRI.js";import{t as G}from"./compiler-runtime-B3qBwwSJ.js";import{t as H}from"./jsx-runtime-ZmTK25f3.js";import{t as W}from"./button-CZ3Cs4qb.js";import{r as I}from"./requests-B4FYHTZl.js";import{r as D}from"./input-DUrq2DiR.js";import{t as E}from"./use-toast-BDYuj3zG.js";import{c as J,i as O,n as Q,s as U,t as X}from"./select-BVdzZKAh.js";import{a as Z,c as $,i as ee,n as te,r as re}from"./dialog-eb-NieZw.js";import{t as ae}from"./links-7AQBmdyV.js";import{t as P}from"./label-E64zk6_7.js";import{r as L}from"./field-CySaBlkz.js";var oe=G(),T=V(B(),1),t=V(H(),1);function le(a){return a.sort((e,r)=>e.provider==="env"?1:r.provider==="env"?-1:0)}const ne=a=>{let e=(0,oe.c)(43),{providerNames:r,onClose:A,onSuccess:F}=a,{writeSecret:Y}=I(),[o,M]=T.useState(""),[n,R]=T.useState(""),[l,z]=T.useState(r[0]),g;e[0]!==o||e[1]!==l||e[2]!==F||e[3]!==n||e[4]!==Y?(g=async i=>{if(i.preventDefault(),!l){E({title:"Error",description:"No location selected for the secret.",variant:"danger"});return}if(!o||!n||!l){E({title:"Error",description:"Please fill in all fields.",variant:"danger"});return}try{await Y({key:o,value:n,provider:"dotenv",name:l}),E({title:"Secret created",description:"The secret has been created successfully."}),F(o)}catch{E({title:"Error",description:"Failed to create secret. Please try again.",variant:"danger"})}},e[0]=o,e[1]=l,e[2]=F,e[3]=n,e[4]=Y,e[5]=g):g=e[5];let q=g,j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsxs)(Z,{children:[(0,t.jsx)($,{children:"Add Secret"}),(0,t.jsx)(re,{children:"Add a new secret to your environment variables."})]}),e[6]=j):j=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(P,{htmlFor:"key",children:"Key"}),e[7]=y):y=e[7];let S;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=i=>{M(ie(i.target.value))},e[8]=S):S=e[8];let s;e[9]===o?s=e[10]:(s=(0,t.jsxs)("div",{className:"grid gap-2",children:[y,(0,t.jsx)(D,{id:"key",value:o,onChange:S,placeholder:"MY_SECRET_KEY",required:!0})]}),e[9]=o,e[10]=s);let _;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(P,{htmlFor:"value",children:"Value"}),e[11]=_):_=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=i=>R(i.target.value),e[12]=b):b=e[12];let c;e[13]===n?c=e[14]:(c=(0,t.jsx)(D,{id:"value",type:"password",value:n,onChange:b,required:!0,autoComplete:"off"}),e[13]=n,e[14]=c);let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=se()&&(0,t.jsx)(L,{children:"Note: You are sending this key over http."}),e[15]=C):C=e[15];let d;e[16]===c?d=e[17]:(d=(0,t.jsxs)("div",{className:"grid gap-2",children:[_,c,C]}),e[16]=c,e[17]=d);let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)(P,{htmlFor:"location",children:"Location"}),e[18]=N):N=e[18];let m;e[19]===r.length?m=e[20]:(m=r.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No dotenv locations configured."}),e[19]=r.length,e[20]=m);let h;e[21]!==l||e[22]!==r?(h=r.length>0&&(0,t.jsxs)(X,{value:l,onValueChange:i=>z(i),children:[(0,t.jsx)(U,{children:(0,t.jsx)(J,{placeholder:"Select a provider"})}),(0,t.jsx)(Q,{children:r.map(ce)})]}),e[21]=l,e[22]=r,e[23]=h):h=e[23];let k;e[24]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsxs)(L,{children:["You can configure the location by setting the"," ",(0,t.jsx)(ae,{href:"https://links.marimo.app/dotenv",children:"dotenv configuration"}),"."]}),e[24]=k):k=e[24];let p;e[25]!==m||e[26]!==h?(p=(0,t.jsxs)("div",{className:"grid gap-2",children:[N,m,h,k]}),e[25]=m,e[26]=h,e[27]=p):p=e[27];let u;e[28]!==d||e[29]!==p||e[30]!==s?(u=(0,t.jsxs)("div",{className:"grid gap-4 py-4",children:[s,d,p]}),e[28]=d,e[29]=p,e[30]=s,e[31]=u):u=e[31];let f;e[32]===A?f=e[33]:(f=(0,t.jsx)(W,{type:"button",variant:"outline",onClick:A,children:"Cancel"}),e[32]=A,e[33]=f);let K=!o||!n||!l,v;e[34]===K?v=e[35]:(v=(0,t.jsx)(W,{type:"submit",disabled:K,children:"Add Secret"}),e[34]=K,e[35]=v);let x;e[36]!==f||e[37]!==v?(x=(0,t.jsxs)(ee,{children:[f,v]}),e[36]=f,e[37]=v,e[38]=x):x=e[38];let w;return e[39]!==q||e[40]!==u||e[41]!==x?(w=(0,t.jsx)(te,{children:(0,t.jsxs)("form",{onSubmit:q,children:[j,u,x]})}),e[39]=q,e[40]=u,e[41]=x,e[42]=w):w=e[42],w};function ie(a){return a.replaceAll(/\W/g,"_")}function se(){return window.location.href.startsWith("http://")}function ce(a){return(0,t.jsx)(O,{value:a,children:a},a)}export{le as n,ne as t};
var p=Object.defineProperty;var y=(s,i,e)=>i in s?p(s,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[i]=e;var o=(s,i,e)=>y(s,typeof i!="symbol"?i+"":i,e);var m;(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
PartySocket requires a global 'EventTarget' class to be available!
You can polyfill this global by adding this to your code before any partysocket imports:
\`\`\`
import 'partysocket/event-target-polyfill';
\`\`\`
Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
`);var _=class extends Event{constructor(i,e){super("error",e);o(this,"message");o(this,"error");this.message=i.message,this.error=i}},d=class extends Event{constructor(i=1e3,e="",t){super("close",t);o(this,"code");o(this,"reason");o(this,"wasClean",!0);this.code=i,this.reason=e}},u={Event,ErrorEvent:_,CloseEvent:d};function w(s,i){if(!s)throw Error(i)}function b(s){return new s.constructor(s.type,s)}function E(s){return"data"in s?new MessageEvent(s.type,s):"code"in s||"reason"in s?new d(s.code||1999,s.reason||"unknown reason",s):"error"in s?new _(s.error,s):new Event(s.type,s)}var c=typeof process<"u"&&((m=process.versions)==null?void 0:m.node)!==void 0&&typeof document>"u"?E:b,h={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},g=!1,v=class a extends EventTarget{constructor(e,t,n={}){super();o(this,"_ws");o(this,"_retryCount",-1);o(this,"_uptimeTimeout");o(this,"_connectTimeout");o(this,"_shouldReconnect",!0);o(this,"_connectLock",!1);o(this,"_binaryType","blob");o(this,"_closeCalled",!1);o(this,"_messageQueue",[]);o(this,"_debugLogger",console.log.bind(console));o(this,"_url");o(this,"_protocols");o(this,"_options");o(this,"onclose",null);o(this,"onerror",null);o(this,"onmessage",null);o(this,"onopen",null);o(this,"_handleOpen",e=>{this._debug("open event");let{minUptime:t=h.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),t),w(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(n=>{var r;(r=this._ws)==null||r.send(n)}),this._messageQueue=[],this.onopen&&this.onopen(e),this.dispatchEvent(c(e))});o(this,"_handleMessage",e=>{this._debug("message event"),this.onmessage&&this.onmessage(e),this.dispatchEvent(c(e))});o(this,"_handleError",e=>{this._debug("error event",e.message),this._disconnect(void 0,e.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(e),this._debug("exec error listeners"),this.dispatchEvent(c(e)),this._connect()});o(this,"_handleClose",e=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(e),this.dispatchEvent(c(e))});this._url=e,this._protocols=t,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._options.debugLogger&&(this._debugLogger=this._options.debugLogger),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return a.CONNECTING}get OPEN(){return a.OPEN}get CLOSING(){return a.CLOSING}get CLOSED(){return a.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((e,t)=>(typeof t=="string"?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?a.CLOSED:a.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(e=1e3,t){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)}reconnect(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED||this._disconnect(e,t),this._connect()}send(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{let{maxEnqueuedMessages:t=h.maxEnqueuedMessages}=this._options;this._messageQueue.length<t&&(this._debug("enqueue",e),this._messageQueue.push(e))}}_debug(...e){this._options.debug&&this._debugLogger("RWS>",...e)}_getNextDelay(){let{reconnectionDelayGrowFactor:e=h.reconnectionDelayGrowFactor,minReconnectionDelay:t=h.minReconnectionDelay,maxReconnectionDelay:n=h.maxReconnectionDelay}=this._options,r=0;return this._retryCount>0&&(r=t*e**(this._retryCount-1),r>n&&(r=n)),this._debug("next delay",r),r}_wait(){return new Promise(e=>{setTimeout(e,this._getNextDelay())})}_getNextProtocols(e){if(!e)return Promise.resolve(null);if(typeof e=="string"||Array.isArray(e))return Promise.resolve(e);if(typeof e=="function"){let t=e();if(!t)return Promise.resolve(null);if(typeof t=="string"||Array.isArray(t))return Promise.resolve(t);if(t.then)return t}throw Error("Invalid protocols")}_getNextUrl(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){let t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;let{maxRetries:e=h.maxRetries,connectionTimeout:t=h.connectionTimeout}=this._options;if(this._retryCount>=e){this._debug("max retries reached",this._retryCount,">=",e);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([n,r])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!g&&(console.error(`\u203C\uFE0F No WebSocket implementation available. You should define options.WebSocket.
For example, if you're using node.js, run \`npm install ws\`, and then in your code:
import PartySocket from 'partysocket';
import WS from 'ws';
const partysocket = new PartySocket({
host: "127.0.0.1:1999",
room: "test-room",
WebSocket: WS
});
`),g=!0);let l=this._options.WebSocket||WebSocket;this._debug("connect",{url:n,protocols:r}),this._ws=r?new l(n,r):new l(n),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),t)}).catch(n=>{this._connectLock=!1,this._handleError(new u.ErrorEvent(Error(n.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new u.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(e=1e3,t){if(this._clearTimeouts(),this._ws){this._removeListeners();try{(this._ws.readyState===this.OPEN||this._ws.readyState===this.CONNECTING)&&this._ws.close(e,t),this._handleClose(new u.CloseEvent(e,t,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};export{v as t};
import{t as r}from"./createLucideIcon-BCdY6lG5.js";var t=r("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),a=r("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),e=r("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);export{a as n,t as r,e as t};
var x=(function(){function e(z){return{type:z,style:"keyword"}}for(var t=e("operator"),n={type:"atom",style:"atom"},r={type:"punctuation",style:null},s={type:"axis_specifier",style:"qualifier"},o={",":r},p="after.all.allowing.ancestor.ancestor-or-self.any.array.as.ascending.at.attribute.base-uri.before.boundary-space.by.case.cast.castable.catch.child.collation.comment.construction.contains.content.context.copy.copy-namespaces.count.decimal-format.declare.default.delete.descendant.descendant-or-self.descending.diacritics.different.distance.document.document-node.element.else.empty.empty-sequence.encoding.end.entire.every.exactly.except.external.first.following.following-sibling.for.from.ftand.ftnot.ft-option.ftor.function.fuzzy.greatest.group.if.import.in.inherit.insensitive.insert.instance.intersect.into.invoke.is.item.language.last.lax.least.let.levels.lowercase.map.modify.module.most.namespace.next.no.node.nodes.no-inherit.no-preserve.not.occurs.of.only.option.order.ordered.ordering.paragraph.paragraphs.parent.phrase.preceding.preceding-sibling.preserve.previous.processing-instruction.relationship.rename.replace.return.revalidation.same.satisfies.schema.schema-attribute.schema-element.score.self.sensitive.sentence.sentences.sequence.skip.sliding.some.stable.start.stemming.stop.strict.strip.switch.text.then.thesaurus.times.to.transform.treat.try.tumbling.type.typeswitch.union.unordered.update.updating.uppercase.using.validate.value.variable.version.weight.when.where.wildcards.window.with.without.word.words.xquery".split("."),a=0,i=p.length;a<i;a++)o[p[a]]=e(p[a]);for(var g="xs:anyAtomicType.xs:anySimpleType.xs:anyType.xs:anyURI.xs:base64Binary.xs:boolean.xs:byte.xs:date.xs:dateTime.xs:dateTimeStamp.xs:dayTimeDuration.xs:decimal.xs:double.xs:duration.xs:ENTITIES.xs:ENTITY.xs:float.xs:gDay.xs:gMonth.xs:gMonthDay.xs:gYear.xs:gYearMonth.xs:hexBinary.xs:ID.xs:IDREF.xs:IDREFS.xs:int.xs:integer.xs:item.xs:java.xs:language.xs:long.xs:Name.xs:NCName.xs:negativeInteger.xs:NMTOKEN.xs:NMTOKENS.xs:nonNegativeInteger.xs:nonPositiveInteger.xs:normalizedString.xs:NOTATION.xs:numeric.xs:positiveInteger.xs:precisionDecimal.xs:QName.xs:short.xs:string.xs:time.xs:token.xs:unsignedByte.xs:unsignedInt.xs:unsignedLong.xs:unsignedShort.xs:untyped.xs:untypedAtomic.xs:yearMonthDuration".split("."),a=0,i=g.length;a<i;a++)o[g[a]]=n;for(var f=["eq","ne","lt","le","gt","ge",":=","=",">",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"],a=0,i=f.length;a<i;a++)o[f[a]]=t;for(var v=["self::","attribute::","child::","descendant::","descendant-or-self::","parent::","ancestor::","ancestor-or-self::","following::","preceding::","following-sibling::","preceding-sibling::"],a=0,i=v.length;a<i;a++)o[v[a]]=s;return o})();function m(e,t,n){return t.tokenize=n,n(e,t)}function l(e,t){var n=e.next(),r=!1,s=q(e);if(n=="<"){if(e.match("!--",!0))return m(e,t,D);if(e.match("![CDATA",!1))return t.tokenize=E,"tag";if(e.match("?",!1))return m(e,t,_);var o=e.eat("/");e.eatSpace();for(var p="",a;a=e.eat(/[^\s\u00a0=<>\"\'\/?]/);)p+=a;return m(e,t,N(p,o))}else{if(n=="{")return u(t,{type:"codeblock"}),null;if(n=="}")return c(t),null;if(b(t))return n==">"?"tag":n=="/"&&e.eat(">")?(c(t),"tag"):"variable";if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if(n==="("&&e.eat(":"))return u(t,{type:"comment"}),m(e,t,w);if(!s&&(n==='"'||n==="'"))return k(e,t,n);if(n==="$")return m(e,t,T);if(n===":"&&e.eat("="))return"keyword";if(n==="(")return u(t,{type:"paren"}),null;if(n===")")return c(t),null;if(n==="[")return u(t,{type:"bracket"}),null;if(n==="]")return c(t),null;var i=x.propertyIsEnumerable(n)&&x[n];if(s&&n==='"')for(;e.next()!=='"';);if(s&&n==="'")for(;e.next()!=="'";);i||e.eatWhile(/[\w\$_-]/);var g=e.eat(":");!e.eat(":")&&g&&e.eatWhile(/[\w\$_-]/),e.match(/^[ \t]*\(/,!1)&&(r=!0);var f=e.current();return i=x.propertyIsEnumerable(f)&&x[f],r&&!i&&(i={type:"function_call",style:"def"}),A(t)?(c(t),"variable"):((f=="element"||f=="attribute"||i.type=="axis_specifier")&&u(t,{type:"xmlconstructor"}),i?i.style:"variable")}}function w(e,t){for(var n=!1,r=!1,s=0,o;o=e.next();){if(o==")"&&n)if(s>0)s--;else{c(t);break}else o==":"&&r&&s++;n=o==":",r=o=="("}return"comment"}function I(e,t){return function(n,r){for(var s;s=n.next();)if(s==e){c(r),t&&(r.tokenize=t);break}else if(n.match("{",!1)&&d(r))return u(r,{type:"codeblock"}),r.tokenize=l,"string";return"string"}}function k(e,t,n,r){let s=I(n,r);return u(t,{type:"string",name:n,tokenize:s}),m(e,t,s)}function T(e,t){var n=/[\w\$_-]/;if(e.eat('"')){for(;e.next()!=='"';);e.eat(":")}else e.eatWhile(n),e.match(":=",!1)||e.eat(":");return e.eatWhile(n),t.tokenize=l,"variable"}function N(e,t){return function(n,r){if(n.eatSpace(),t&&n.eat(">"))return c(r),r.tokenize=l,"tag";if(n.eat("/")||u(r,{type:"tag",name:e,tokenize:l}),n.eat(">"))r.tokenize=l;else return r.tokenize=y,"tag";return"tag"}}function y(e,t){var n=e.next();return n=="/"&&e.eat(">")?(d(t)&&c(t),b(t)&&c(t),"tag"):n==">"?(d(t)&&c(t),"tag"):n=="="?null:n=='"'||n=="'"?k(e,t,n,y):(d(t)||u(t,{type:"attribute",tokenize:y}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace(),(e.match(">",!1)||e.match("/",!1))&&(c(t),t.tokenize=l),"attribute")}function D(e,t){for(var n;n=e.next();)if(n=="-"&&e.match("->",!0))return t.tokenize=l,"comment"}function E(e,t){for(var n;n=e.next();)if(n=="]"&&e.match("]",!0))return t.tokenize=l,"comment"}function _(e,t){for(var n;n=e.next();)if(n=="?"&&e.match(">",!0))return t.tokenize=l,"processingInstruction"}function b(e){return h(e,"tag")}function d(e){return h(e,"attribute")}function A(e){return h(e,"xmlconstructor")}function q(e){return e.current()==='"'?e.match(/^[^\"]+\"\:/,!1):e.current()==="'"?e.match(/^[^\"]+\'\:/,!1):!1}function h(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function u(e,t){e.stack.push(t)}function c(e){e.stack.pop(),e.tokenize=e.stack.length&&e.stack[e.stack.length-1].tokenize||l}const M={name:"xquery",startState:function(){return{tokenize:l,cc:[],stack:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},languageData:{commentTokens:{block:{open:"(:",close:":)"}}}};export{M as t};
import{t as r}from"./xquery-CGV_r322.js";export{r as xQuery};
var j,Q,K,Z,q,J,tt,it,et,st;import{t as zt}from"./linear-BWciPXnd.js";import{n as ui}from"./ordinal-DG_POl79.js";import{t as xi}from"./range-1DwpgXvM.js";import"./defaultLocale-JieDVWC_.js";import"./purify.es-DZrAQFIu.js";import"./src-CvyFXpBy.js";import{t as Ot}from"./line-BA7eTS55.js";import{i as Wt}from"./chunk-S3R3BYOJ-8loRaCFh.js";import{n as di}from"./init-DRQmrFIb.js";import{n,r as Ft}from"./src-CsZby044.js";import{B as pi,C as Xt,I as fi,T as mi,U as yi,_ as bi,a as Ai,c as Ci,d as wi,v as Si,y as mt,z as ki}from"./chunk-ABZYJK2D-0jga8uiE.js";import{t as _i}from"./chunk-EXTU4WIE-Dmu97ZvI.js";import"./dist-C1VXabOr.js";import{t as Ti}from"./chunk-JA3XYJ7Z-DOm8KfKa.js";function yt(){var e=ui().unknown(void 0),t=e.domain,i=e.range,s=0,a=1,l,g,f=!1,p=0,_=0,L=.5;delete e.unknown;function w(){var b=t().length,v=a<s,D=v?a:s,P=v?s:a;l=(P-D)/Math.max(1,b-p+_*2),f&&(l=Math.floor(l)),D+=(P-D-l*(b-p))*L,g=l*(1-p),f&&(D=Math.round(D),g=Math.round(g));var E=xi(b).map(function(m){return D+l*m});return i(v?E.reverse():E)}return e.domain=function(b){return arguments.length?(t(b),w()):t()},e.range=function(b){return arguments.length?([s,a]=b,s=+s,a=+a,w()):[s,a]},e.rangeRound=function(b){return[s,a]=b,s=+s,a=+a,f=!0,w()},e.bandwidth=function(){return g},e.step=function(){return l},e.round=function(b){return arguments.length?(f=!!b,w()):f},e.padding=function(b){return arguments.length?(p=Math.min(1,_=+b),w()):p},e.paddingInner=function(b){return arguments.length?(p=Math.min(1,b),w()):p},e.paddingOuter=function(b){return arguments.length?(_=+b,w()):_},e.align=function(b){return arguments.length?(L=Math.max(0,Math.min(1,b)),w()):L},e.copy=function(){return yt(t(),[s,a]).round(f).paddingInner(p).paddingOuter(_).align(L)},di.apply(w(),arguments)}var bt=(function(){var e=n(function(h,A,x,u){for(x||(x={}),u=h.length;u--;x[h[u]]=A);return x},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],l=[1,6],g=[1,7],f=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],_=[1,26],L=[1,28],w=[1,29],b=[1,30],v=[1,31],D=[1,32],P=[1,33],E=[1,34],m=[1,35],T=[1,36],r=[1,37],z=[1,43],O=[1,42],V=[1,47],S=[1,50],c=[1,10,12,14,16,18,19,21,23,34,35,36],M=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],y=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],Y=[1,64],U={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,A,x,u,k,o,at){var d=o.length-1;switch(k){case 5:u.setOrientation(o[d]);break;case 9:u.setDiagramTitle(o[d].text.trim());break;case 12:u.setLineData({text:"",type:"text"},o[d]);break;case 13:u.setLineData(o[d-1],o[d]);break;case 14:u.setBarData({text:"",type:"text"},o[d]);break;case 15:u.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),u.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:this.$=[Number(o[d-2]),...o[d]];break;case 21:this.$=[Number(o[d])];break;case 22:u.setXAxisTitle(o[d]);break;case 23:u.setXAxisTitle(o[d-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(o[d]);break;case 26:u.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 27:this.$=o[d-1];break;case 28:this.$=[o[d-2],...o[d]];break;case 29:this.$=[o[d]];break;case 30:u.setYAxisTitle(o[d]);break;case 31:u.setYAxisTitle(o[d-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 37:this.$={text:o[d],type:"text"};break;case 38:this.$={text:o[d],type:"text"};break;case 39:this.$={text:o[d],type:"markdown"};break;case 40:this.$=o[d];break;case 41:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:a,35:l,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:a,35:l,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:l,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(f,[2,34]),e(f,[2,35]),e(f,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:a,35:l,36:g}),{1:[2,3]},e(f,[2,5]),e(t,[2,7],{4:22,34:a,35:l,36:g}),{11:23,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{11:39,13:38,24:z,27:O,29:40,30:41,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{11:45,15:44,27:V,33:46,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{11:49,17:48,24:S,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{11:52,17:51,24:S,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{20:[1,53]},{22:[1,54]},e(c,[2,18]),{1:[2,2]},e(c,[2,8]),e(c,[2,9]),e(M,[2,37],{40:55,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r}),e(M,[2,38]),e(M,[2,39]),e(y,[2,40]),e(y,[2,42]),e(y,[2,43]),e(y,[2,44]),e(y,[2,45]),e(y,[2,46]),e(y,[2,47]),e(y,[2,48]),e(y,[2,49]),e(y,[2,50]),e(y,[2,51]),e(c,[2,10]),e(c,[2,22],{30:41,29:56,24:z,27:O}),e(c,[2,24]),e(c,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},e(c,[2,11]),e(c,[2,30],{33:60,27:V}),e(c,[2,32]),{31:[1,61]},e(c,[2,12]),{17:62,24:S},{25:63,27:Y},e(c,[2,14]),{17:65,24:S},e(c,[2,16]),e(c,[2,17]),e(y,[2,41]),e(c,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(c,[2,31]),{27:[1,69]},e(c,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(c,[2,15]),e(c,[2,26]),e(c,[2,27]),{11:59,32:72,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},e(c,[2,33]),e(c,[2,19]),{25:73,27:Y},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,A){if(A.recoverable)this.trace(h);else{var x=Error(h);throw x.hash=A,x}},"parseError"),parse:n(function(h){var A=this,x=[0],u=[],k=[null],o=[],at=this.table,d="",rt=0,vt=0,Et=0,ri=2,Mt=1,li=o.slice.call(arguments,1),R=Object.create(this.lexer),X={yy:{}};for(var xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xt)&&(X.yy[xt]=this.yy[xt]);R.setInput(h,X.yy),X.yy.lexer=R,X.yy.parser=this,R.yylloc===void 0&&(R.yylloc={});var dt=R.yylloc;o.push(dt);var ci=R.options&&R.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gi(B){x.length-=2*B,k.length-=B,o.length-=B}n(gi,"popStack");function It(){var B=u.pop()||R.lex()||Mt;return typeof B!="number"&&(B instanceof Array&&(u=B,B=u.pop()),B=A.symbols_[B]||B),B}n(It,"lex");for(var I,pt,N,$,ft,H={},lt,W,$t,ct;;){if(N=x[x.length-1],this.defaultActions[N]?$=this.defaultActions[N]:(I??(I=It()),$=at[N]&&at[N][I]),$===void 0||!$.length||!$[0]){var Bt="";for(lt in ct=[],at[N])this.terminals_[lt]&&lt>ri&&ct.push("'"+this.terminals_[lt]+"'");Bt=R.showPosition?"Parse error on line "+(rt+1)+`:
`+R.showPosition()+`
Expecting `+ct.join(", ")+", got '"+(this.terminals_[I]||I)+"'":"Parse error on line "+(rt+1)+": Unexpected "+(I==Mt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Bt,{text:R.match,token:this.terminals_[I]||I,line:R.yylineno,loc:dt,expected:ct})}if($[0]instanceof Array&&$.length>1)throw Error("Parse Error: multiple actions possible at state: "+N+", token: "+I);switch($[0]){case 1:x.push(I),k.push(R.yytext),o.push(R.yylloc),x.push($[1]),I=null,pt?(I=pt,pt=null):(vt=R.yyleng,d=R.yytext,rt=R.yylineno,dt=R.yylloc,Et>0&&Et--);break;case 2:if(W=this.productions_[$[1]][1],H.$=k[k.length-W],H._$={first_line:o[o.length-(W||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(W||1)].first_column,last_column:o[o.length-1].last_column},ci&&(H._$.range=[o[o.length-(W||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(H,[d,vt,rt,X.yy,$[1],k,o].concat(li)),ft!==void 0)return ft;W&&(x=x.slice(0,-1*W*2),k=k.slice(0,-1*W),o=o.slice(0,-1*W)),x.push(this.productions_[$[1]][0]),k.push(H.$),o.push(H._$),$t=at[x[x.length-2]][x[x.length-1]],x.push($t);break;case 3:return!0}}return!0},"parse")};U.lexer=(function(){return{EOF:1,parseError:n(function(h,A){if(this.yy.parser)this.yy.parser.parseError(h,A);else throw Error(h)},"parseError"),setInput:n(function(h,A){return this.yy=A||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:n(function(){var h=this._input[0];return this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h,h.match(/(?:\r\n?|\n).*/g)?(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:n(function(h){var A=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var u=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),x.length-1&&(this.yylineno-=x.length-1);var k=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:x?(x.length===u.length?this.yylloc.first_column:0)+u[u.length-x.length].length-x[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(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:n(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:n(function(){var h=this.pastInput(),A=Array(h.length+1).join("-");return h+this.upcomingInput()+`
`+A+"^"},"showPosition"),test_match:n(function(h,A){var x,u,k;if(this.options.backtrack_lexer&&(k={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&&(k.yylloc.range=this.yylloc.range.slice(0))),u=h[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.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],x=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var o in k)this[o]=k[o];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,A,x,u;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),o=0;o<k.length;o++)if(x=this._input.match(this.rules[k[o]]),x&&(!A||x[0].length>A[0].length)){if(A=x,u=o,this.options.backtrack_lexer){if(h=this.test_match(x,k[o]),h!==!1)return h;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(h=this.test_match(A,k[u]),h===!1?!1:h):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:n(function(){return this.next()||this.lex()},"lex"),begin:n(function(h){this.conditionStack.push(h)},"begin"),popState:n(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(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:n(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:n(function(h){this.begin(h)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(h,A,x,u){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function F(){this.yy={}}return n(F,"Parser"),F.prototype=U,U.Parser=F,new F})();bt.parser=bt;var Ri=bt;function At(e){return e.type==="bar"}n(At,"isBarPlot");function Ct(e){return e.type==="band"}n(Ct,"isBandAxisData");function G(e){return e.type==="linear"}n(G,"isLinearAxisData");var Nt=(j=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((l,g)=>Math.max(g.length,l),0)*i,height:i};let s={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let l of t){let g=Ti(a,1,l),f=g?g.width:l.length*i,p=g?g.height:i;s.width=Math.max(s.width,f),s.height=Math.max(s.height,p)}return a.remove(),s}},n(j,"TextDimensionCalculatorWithFont"),j),Vt=.7,Yt=.2,Ut=(Q=class{constructor(t,i,s,a){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Vt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Vt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let s=this.getLabelDimension(),a=Yt*t.width;this.outerPadding=Math.min(s.width/2,a);let l=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,l<=i&&(i-=l,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let s=this.getLabelDimension(),a=Yt*t.height;this.outerPadding=Math.min(s.height/2,a);let l=s.width+this.axisConfig.labelPadding*2;l<=i&&(i-=l,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},n(Q,"BaseAxis"),Q),Di=(K=class extends Ut{constructor(t,i,s,a,l){super(t,a,l,i),this.categories=s,this.scale=yt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=yt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Ft.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},n(K,"BandAxis"),K),Li=(Z=class extends Ut{constructor(t,i,s,a,l){super(t,a,l,i),this.domain=s,this.scale=zt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=zt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},n(Z,"LinearAxis"),Z);function wt(e,t,i,s){let a=new Nt(s);return Ct(e)?new Di(t,i,e.categories,e.title,a):new Li(t,i,[e.min,e.max],e.title,a)}n(wt,"getAxis");var Pi=(q=class{constructor(t,i,s,a){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),a=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},n(q,"ChartTitle"),q);function Ht(e,t,i,s){return new Pi(new Nt(s),e,t,i)}n(Ht,"getChartTitleComponent");var vi=(J=class{constructor(t,i,s,a,l){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=a,this.plotIndex=l}getDrawableElement(){let t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]),i;return i=this.orientation==="horizontal"?Ot().y(s=>s[0]).x(s=>s[1])(t):Ot().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},n(J,"LinePlot"),J),Ei=(tt=class{constructor(t,i,s,a,l,g){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=a,this.orientation=l,this.plotIndex=g}getDrawableElement(){let t=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,s=i/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(a=>({x:this.boundingRect.x,y:a[0]-s,height:i,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(a=>({x:a[0]-s,y:a[1],width:i,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},n(tt,"BarPlot"),tt),Mi=(it=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let a=new vi(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break;case"bar":{let a=new Ei(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break}return t}},n(it,"BasePlot"),it);function Gt(e,t,i){return new Mi(e,t,i)}n(Gt,"getPlotComponent");var Ii=(et=class{constructor(t,i,s,a){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ht(t,i,s,a),plot:Gt(t,i,s),xAxis:wt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},a),yAxis:wt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,a=0,l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:l,height:g});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),a=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,t>0&&(l+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:l,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.xAxis.setRange([s,s+l]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:a+g}),this.componentStore.yAxis.setRange([a,a+g]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(p=>At(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,a=0,l=0,g=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:g,height:f});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("left"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=p.width,a=p.width,this.componentStore.yAxis.setAxisPosition("top"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=p.height,l=s+p.height,t>0&&(g+=t,t=0),i>0&&(f+=i,i=0),this.componentStore.plot.calculateSpace({width:g,height:f}),this.componentStore.plot.setBoundingBoxXY({x:a,y:l}),this.componentStore.yAxis.setRange([a,a+g]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:s}),this.componentStore.xAxis.setRange([l,l+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:l}),this.chartData.plots.some(_=>At(_))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},n(et,"Orchestrator"),et),$i=(st=class{static build(t,i,s,a){return new Ii(t,i,s,a).getDrawableElement()}},n(st,"XYChartBuilder"),st),nt=0,jt,ht=Tt(),ot=_t(),C=Rt(),St=ot.plotColorPalette.split(",").map(e=>e.trim()),gt=!1,kt=!1;function _t(){let e=mi(),t=mt();return Wt(e.xyChart,t.themeVariables.xyChart)}n(_t,"getChartDefaultThemeConfig");function Tt(){let e=mt();return Wt(wi.xyChart,e.xyChart)}n(Tt,"getChartDefaultConfig");function Rt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n(Rt,"getChartDefaultData");function ut(e){let t=mt();return fi(e.trim(),t)}n(ut,"textSanitizer");function Qt(e){jt=e}n(Qt,"setTmpSVGG");function Kt(e){e==="horizontal"?ht.chartOrientation="horizontal":ht.chartOrientation="vertical"}n(Kt,"setOrientation");function Zt(e){C.xAxis.title=ut(e.text)}n(Zt,"setXAxisTitle");function Dt(e,t){C.xAxis={type:"linear",title:C.xAxis.title,min:e,max:t},gt=!0}n(Dt,"setXAxisRangeData");function qt(e){C.xAxis={type:"band",title:C.xAxis.title,categories:e.map(t=>ut(t.text))},gt=!0}n(qt,"setXAxisBand");function Jt(e){C.yAxis.title=ut(e.text)}n(Jt,"setYAxisTitle");function ti(e,t){C.yAxis={type:"linear",title:C.yAxis.title,min:e,max:t},kt=!0}n(ti,"setYAxisRangeData");function ii(e){let t=Math.min(...e),i=Math.max(...e),s=G(C.yAxis)?C.yAxis.min:1/0,a=G(C.yAxis)?C.yAxis.max:-1/0;C.yAxis={type:"linear",title:C.yAxis.title,min:Math.min(s,t),max:Math.max(a,i)}}n(ii,"setYAxisRangeFromPlotData");function Lt(e){let t=[];if(e.length===0)return t;if(!gt){let i=G(C.xAxis)?C.xAxis.min:1/0,s=G(C.xAxis)?C.xAxis.max:-1/0;Dt(Math.min(i,1),Math.max(s,e.length))}if(kt||ii(e),Ct(C.xAxis)&&(t=C.xAxis.categories.map((i,s)=>[i,e[s]])),G(C.xAxis)){let i=C.xAxis.min,s=C.xAxis.max,a=(s-i)/(e.length-1),l=[];for(let g=i;g<=s;g+=a)l.push(`${g}`);t=l.map((g,f)=>[g,e[f]])}return t}n(Lt,"transformDataWithoutCategory");function Pt(e){return St[e===0?0:e%St.length]}n(Pt,"getPlotColorFromPalette");function ei(e,t){let i=Lt(t);C.plots.push({type:"line",strokeFill:Pt(nt),strokeWidth:2,data:i}),nt++}n(ei,"setLineData");function si(e,t){let i=Lt(t);C.plots.push({type:"bar",fill:Pt(nt),data:i}),nt++}n(si,"setBarData");function ai(){if(C.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return C.title=Xt(),$i.build(ht,C,ot,jt)}n(ai,"getDrawableElem");function ni(){return ot}n(ni,"getChartThemeConfig");function hi(){return ht}n(hi,"getChartConfig");function oi(){return C}n(oi,"getXYChartData");var Bi={parser:Ri,db:{getDrawableElem:ai,clear:n(function(){Ai(),nt=0,ht=Tt(),C=Rt(),ot=_t(),St=ot.plotColorPalette.split(",").map(e=>e.trim()),gt=!1,kt=!1},"clear"),setAccTitle:pi,getAccTitle:Si,setDiagramTitle:yi,getDiagramTitle:Xt,getAccDescription:bi,setAccDescription:ki,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Dt,setXAxisBand:qt,setYAxisTitle:Jt,setYAxisRangeData:ti,setLineData:ei,setBarData:si,setTmpSVGG:Qt,getChartThemeConfig:ni,getChartConfig:hi,getXYChartData:oi},renderer:{draw:n((e,t,i,s)=>{let a=s.db,l=a.getChartThemeConfig(),g=a.getChartConfig(),f=a.getXYChartData().plots[0].data.map(m=>m[1]);function p(m){return m==="top"?"text-before-edge":"middle"}n(p,"getDominantBaseLine");function _(m){return m==="left"?"start":m==="right"?"end":"middle"}n(_,"getTextAnchor");function L(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}n(L,"getTextTransformation"),Ft.debug(`Rendering xychart chart
`+e);let w=_i(t),b=w.append("g").attr("class","main"),v=b.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");Ci(w,g.height,g.width,!0),w.attr("viewBox",`0 0 ${g.width} ${g.height}`),v.attr("fill",l.backgroundColor),a.setTmpSVGG(w.append("g").attr("class","mermaid-tmp-group"));let D=a.getDrawableElem(),P={};function E(m){let T=b,r="";for(let[z]of m.entries()){let O=b;z>0&&P[r]&&(O=P[r]),r+=m[z],T=P[r],T||(T=P[r]=O.append("g").attr("class",m[z]))}return T}n(E,"getGroup");for(let m of D){if(m.data.length===0)continue;let T=E(m.groupTexts);switch(m.type){case"rect":if(T.selectAll("rect").data(m.data).enter().append("rect").attr("x",r=>r.x).attr("y",r=>r.y).attr("width",r=>r.width).attr("height",r=>r.height).attr("fill",r=>r.fill).attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth),g.showDataLabel)if(g.chartOrientation==="horizontal"){let r=function(c,M){let{data:y,label:Y}=c;return M*Y.length*z<=y.width-10};n(r,"fitsHorizontally");let z=.7,O=m.data.map((c,M)=>({data:c,label:f[M].toString()})).filter(c=>c.data.width>0&&c.data.height>0),V=O.map(c=>{let{data:M}=c,y=M.height*.7;for(;!r(c,y)&&y>0;)--y;return y}),S=Math.floor(Math.min(...V));T.selectAll("text").data(O).enter().append("text").attr("x",c=>c.data.x+c.data.width-10).attr("y",c=>c.data.y+c.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${S}px`).text(c=>c.label)}else{let r=function(S,c,M){let{data:y,label:Y}=S,U=c*Y.length*.7,F=y.x+y.width/2,h=F-U/2,A=F+U/2,x=h>=y.x&&A<=y.x+y.width,u=y.y+M+c<=y.y+y.height;return x&&u};n(r,"fitsInBar");let z=m.data.map((S,c)=>({data:S,label:f[c].toString()})).filter(S=>S.data.width>0&&S.data.height>0),O=z.map(S=>{let{data:c,label:M}=S,y=c.width/(M.length*.7);for(;!r(S,y,10)&&y>0;)--y;return y}),V=Math.floor(Math.min(...O));T.selectAll("text").data(z).enter().append("text").attr("x",S=>S.data.x+S.data.width/2).attr("y",S=>S.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${V}px`).text(S=>S.label)}break;case"text":T.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",r=>r.fill).attr("font-size",r=>r.fontSize).attr("dominant-baseline",r=>p(r.verticalPos)).attr("text-anchor",r=>_(r.horizontalPos)).attr("transform",r=>L(r)).text(r=>r.text);break;case"path":T.selectAll("path").data(m.data).enter().append("path").attr("d",r=>r.path).attr("fill",r=>r.fill?r.fill:"none").attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break}}},"draw")}};export{Bi as diagram};
import{t as a}from"./yacas-uRzw7z7m.js";export{a as yacas};
function u(e){for(var t={},r=e.split(" "),o=0;o<r.length;++o)t[r[o]]=!0;return t}var l=u("Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While"),s="(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)",a="(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)",p=new RegExp(s),f=new RegExp(a),m=RegExp(a+"?_"+a),k=RegExp(a+"\\s*\\(");function i(e,t){var r=e.next();if(r==='"')return t.tokenize=h,t.tokenize(e,t);if(r==="/"){if(e.eat("*"))return t.tokenize=d,t.tokenize(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}e.backUp(1);var o=e.match(/^(\w+)\s*\(/,!1);o!==null&&l.hasOwnProperty(o[1])&&t.scopes.push("bodied");var n=c(t);if(n==="bodied"&&r==="["&&t.scopes.pop(),(r==="["||r==="{"||r==="(")&&t.scopes.push(r),n=c(t),(n==="["&&r==="]"||n==="{"&&r==="}"||n==="("&&r===")")&&t.scopes.pop(),r===";")for(;n==="bodied";)t.scopes.pop(),n=c(t);return e.match(/\d+ *#/,!0,!1)?"qualifier":e.match(p,!0,!1)?"number":e.match(m,!0,!1)?"variableName.special":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(k,!0,!1)?(e.backUp(1),"variableName.function"):e.match(f,!0,!1)?"variable":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?"operator":"error"}function h(e,t){for(var r,o=!1,n=!1;(r=e.next())!=null;){if(r==='"'&&!n){o=!0;break}n=!n&&r==="\\"}return o&&!n&&(t.tokenize=i),"string"}function d(e,t){for(var r,o;(o=e.next())!=null;){if(r==="*"&&o==="/"){t.tokenize=i;break}r=o}return"comment"}function c(e){var t=null;return e.scopes.length>0&&(t=e.scopes[e.scopes.length-1]),t}const b={name:"yacas",startState:function(){return{tokenize:i,scopes:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},indent:function(e,t,r){if(e.tokenize!==i&&e.tokenize!==null)return null;var o=0;return(t==="]"||t==="];"||t==="}"||t==="};"||t===");")&&(o=-1),(e.scopes.length+o)*r.unit},languageData:{electricInput:/[{}\[\]()\;]/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{b as t};
import{t as a}from"./createLucideIcon-BCdY6lG5.js";var t=a("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),e=a("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),h=a("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]),p=a("youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);export{t as i,h as n,e as r,p as t};
function o(l){var i,n;l?(i=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,n=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(i=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,n=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var u=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,c=/^(n?[zc]|p[oe]?|m)\b/i,d=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,a=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{name:"z80",startState:function(){return{context:0}},token:function(e,t){if(e.column()||(t.context=0),e.eatSpace())return null;var r;if(e.eatWhile(/\w/))if(l&&e.eat(".")&&e.eatWhile(/\w/),r=e.current(),e.indentation()){if((t.context==1||t.context==4)&&u.test(r))return t.context=4,"variable";if(t.context==2&&c.test(r))return t.context=4,"variableName.special";if(i.test(r))return t.context=1,"keyword";if(n.test(r))return t.context=2,"keyword";if(t.context==4&&a.test(r))return"number";if(d.test(r))return"error"}else return e.match(a)?"number":null;else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(r=e.next())&&r!='"';)r=="\\"&&e.next();return"string"}else if(e.eat("'")){if(e.match(/\\?.'/))return"number"}else if(e.eat(".")||e.sol()&&e.eat("#")){if(t.context=5,e.eatWhile(/\w/))return"def"}else if(e.eat("$")){if(e.eatWhile(/[\da-f]/i))return"number"}else if(e.eat("%")){if(e.eatWhile(/[01]/))return"number"}else e.next()}return null}}}const f=o(!1),s=o(!0);export{f as n,s as t};
import{n as a,t as e}from"./z80-CBK8t-9T.js";export{e as ez80,a as z80};

Sorry, the diff of this file is too big to display

+28
-10

@@ -5,2 +5,3 @@ # Copyright 2026 Marimo. All rights reserved.

import dataclasses
import json
import os

@@ -12,2 +13,3 @@ import re

from marimo._ai._pydantic_ai_utils import generate_id
from marimo._plugins.ui._impl.chat.chat import AI_SDK_VERSION, DONE_CHUNK
from marimo._plugins.utils import remove_none_values

@@ -794,17 +796,33 @@

Serialize vercel ai chunk to a dictionary. Skip "done" chunks - not part of Vercel AI SDK schema.
by_alias=True: Use camelCase keys expected by Vercel AI SDK.
exclude_none=True: Remove null values which cause validation errors.
We use encode as it uses Pydantic-AI's method of serializing dataclasses to JSON.
"""
try:
serialized = chunk.model_dump(
mode="json", by_alias=True, exclude_none=True
)
encoded = chunk.encode(sdk_version=AI_SDK_VERSION)
if encoded == DONE_CHUNK:
return None
result = json.loads(encoded)
if not isinstance(result, dict):
LOGGER.debug(
"Serialized vercel ai chunk is not a dictionary: %s",
result,
)
return result # type: ignore[no-any-return]
except TypeError:
# Fallback for pydantic-ai < 1.52.0 which doesn't have sdk_version param
try:
# by_alias=True: Use camelCase keys expected by Vercel AI SDK.
# exclude_none=True: Remove null values which cause validation errors.
serialized = chunk.model_dump(
mode="json", by_alias=True, exclude_none=True
)
except Exception as e:
LOGGER.error("Error serializing vercel ai chunk: %s", e)
return None
else:
if serialized.get("type") == "done":
return None
return serialized
except Exception as e:
LOGGER.error("Error serializing vercel ai chunk: %s", e)
return None
else:
if serialized.get("type") == "done":
return None
return serialized

@@ -811,0 +829,0 @@ async def _stream_response(

@@ -125,2 +125,29 @@ # Copyright 2026 Marimo. All rights reserved.

def _needs_trailing_blank_line(mod: ast.Module, code: str) -> bool:
"""Check if AST ends with a statement requiring a blank line after.
Ruff formatter adds a blank line after imports, function defs, and class defs.
Only adds blank line if the statement is truly the last content (no trailing
comments).
"""
if not mod.body:
return False
last_stmt = mod.body[-1]
if not isinstance(
last_stmt,
(
ast.Import,
ast.ImportFrom,
ast.FunctionDef,
ast.AsyncFunctionDef,
ast.ClassDef,
),
):
return False
# Check if there's trailing content (like comments) after the last statement
# If so, don't add a blank line - the existing formatting should be preserved
code_lines = code.rstrip().count("\n") + 1
return last_stmt.end_lineno == code_lines
def to_decorator(

@@ -339,2 +366,6 @@ config: Optional[CellConfig],

)
# Add blank line before return for ruff compatibility when last statement
# is an import, function def, or class def
if _needs_trailing_blank_line(cell.mod, cell.code):
definition_body.append("")
definition_body.append(returns)

@@ -341,0 +372,0 @@ return "\n".join(definition_body)

# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
import importlib.util
import sys
from dataclasses import dataclass

@@ -60,29 +58,2 @@ from pathlib import Path

# Used in tests and current fallback
def _dynamic_load(filename: str | Path) -> Optional[App]:
"""Create and execute a module with the provided filename."""
contents = _maybe_contents(filename)
if not contents:
return None
spec = importlib.util.spec_from_file_location("marimo_app", filename)
if spec is None:
raise RuntimeError("Failed to load module spec")
marimo_app = importlib.util.module_from_spec(spec)
if spec.loader is None:
raise RuntimeError("Failed to load module spec's loader")
try:
sys.modules["marimo_app"] = marimo_app
spec.loader.exec_module(marimo_app) # This may throw a SyntaxError
finally:
sys.modules.pop("marimo_app", None)
if not hasattr(marimo_app, "app"):
return None
if not isinstance(marimo_app.app, App):
raise MarimoFileError("`app` attribute must be of type `marimo.App`.")
app = marimo_app.app
return app
def find_cell(filename: str, lineno: int) -> CellDef | None:

@@ -165,4 +136,4 @@ """Find the cell at the given line number in the notebook.

FAILED_LOAD_NOTEBOOK_MESSAGE = (
"Static loading of notebook failed; falling back to dynamic loading. "
"If you can, please report this issue to the marimo team and include your notebook if possible — "
"Static loading of notebook failed. "
"Please report this issue to the marimo team and include your notebook if possible — "
"https://github.com/marimo-team/marimo/issues/new?template=bug_report.yaml"

@@ -214,7 +185,4 @@ )

return app
except MarimoFileError:
# Security advantages of static load are lost here, but reasonable
# fallback for now.
_app = _dynamic_load(filename)
LOGGER.warning(FAILED_LOAD_NOTEBOOK_MESSAGE)
return _app
except MarimoFileError as e:
LOGGER.error(FAILED_LOAD_NOTEBOOK_MESSAGE)
raise MarimoFileError(FAILED_LOAD_NOTEBOOK_MESSAGE) from e

@@ -6,3 +6,2 @@ # Copyright 2026 Marimo. All rights reserved.

import io
import sys
import token as token_types

@@ -1004,5 +1003,5 @@ import warnings

return False
if sys.version_info < (3, 14):
return isinstance(node, ast.Ellipsis)
return isinstance(node, ast.Constant) and node.value == ...
# ast.Ellipsis is deprecated in 3.12+ and removed in 3.14
# Use ast.Constant check which works across all Python versions
return isinstance(node, ast.Constant) and node.value is ...

@@ -1009,0 +1008,0 @@

@@ -227,21 +227,41 @@ # Copyright 2026 Marimo. All rights reserved.

use_wrapped: bool = False,
is_async: bool = False,
) -> Callable[..., Any]:
"""Single hook factory - handles both fixtures and tests."""
def _hook(*args: Any, **kwargs: Any) -> Any:
res = run()
if isinstance(res, Awaitable):
import asyncio
if is_async:
loop = asyncio.new_event_loop()
_, cell_defs = loop.run_until_complete(res)
else:
_, cell_defs = res
async def _async_hook(*args: Any, **kwargs: Any) -> Any:
res = run()
if isinstance(res, Awaitable):
_, cell_defs = await res
else:
_, cell_defs = res
target = cell_defs[var].__wrapped__ if use_wrapped else cell_defs[var]
return target(*args, **kwargs)
target = (
cell_defs[var].__wrapped__ if use_wrapped else cell_defs[var]
)
return await target(*args, **kwargs)
return _hook
return _async_hook
else:
def _hook(*args: Any, **kwargs: Any) -> Any:
res = run()
if isinstance(res, Awaitable):
import asyncio
loop = asyncio.new_event_loop()
_, cell_defs = loop.run_until_complete(res)
else:
_, cell_defs = res
target = (
cell_defs[var].__wrapped__ if use_wrapped else cell_defs[var]
)
return target(*args, **kwargs)
return _hook
def _build_hook(

@@ -256,3 +276,4 @@ test: ast.FunctionDef | ast.AsyncFunctionDef,

"""Build hook for test or fixture function."""
hook = _make_hook(var, run, use_wrapped=is_fixture)
is_async = isinstance(test, ast.AsyncFunctionDef)
hook = _make_hook(var, run, use_wrapped=is_fixture, is_async=is_async)

@@ -259,0 +280,0 @@ stub_fn = build_stub_fn(test, file)

@@ -507,2 +507,3 @@ # Copyright 2026 Marimo. All rights reserved.

from sqlglot import exp, parse
from sqlglot.errors import OptimizeError
from sqlglot.optimizer.scope import build_scope

@@ -557,10 +558,23 @@

# build_scope only works for select statements
if root := build_scope(expression):
for scope in root.traverse(): # type: ignore
for _node, source in scope.selected_sources.values():
if isinstance(source, exp.Table):
if ref := get_ref_from_table(source):
refs.add(ref)
# build_scope only works for select statements.
# It may raise OptimizeError for valid SQL with duplicate aliases
# (e.g., "SELECT * FROM (SELECT 1 as x), (SELECT 2 as x)")
# In that case, fall back to extracting table references directly.
try:
if root := build_scope(expression):
for scope in root.traverse(): # type: ignore
for _node, source in scope.selected_sources.values():
if isinstance(source, exp.Table):
if ref := get_ref_from_table(source):
refs.add(ref)
except OptimizeError:
# Fall back to extracting table references without scope analysis.
# This can happen with valid SQL that has duplicate aliases
# (e.g., cross-joined subqueries with the same column alias).
# We prefer build_scope when possible because it correctly handles
# CTEs - find_all would incorrectly report CTE names as table refs.
for table in expression.find_all(exp.Table):
if ref := get_ref_from_table(table):
refs.add(ref)
return refs

@@ -9,2 +9,3 @@ # Copyright 2026 Marimo. All rights reserved.

import tempfile
from dataclasses import dataclass
from pathlib import Path

@@ -14,2 +15,3 @@ from typing import Any, Optional

import click
from click.core import ParameterSource

@@ -38,3 +40,5 @@ import marimo._cli.cli_validators as validators

from marimo._lint import run_check
from marimo._server.file_router import AppFileRouter
from marimo._server.file_router import AppFileRouter, flatten_files
from marimo._server.files.directory_scanner import DirectoryScanner
from marimo._server.models.home import MarimoFile
from marimo._server.start import start

@@ -47,2 +51,3 @@ from marimo._session.model import SessionMode

) # type: ignore
from marimo._utils.http import HTTPException, HTTPStatus
from marimo._utils.marimo_path import MarimoPath, create_temp_notebook_file

@@ -532,2 +537,6 @@ from marimo._utils.platform import is_windows

# Enable script metadata management for sandboxed notebooks
os.environ["MARIMO_MANAGE_SCRIPT_METADATA"] = "true"
GLOBAL_SETTINGS.MANAGE_SCRIPT_METADATA = True
# Check shared memory availability early (required for edit mode to

@@ -791,2 +800,87 @@ # communicate between the server process and kernel subprocess)

@dataclass(frozen=True)
class _CollectedRunFiles:
files: list[MarimoFile]
root_dir: str | None
def _split_run_paths_and_args(
name: str, args: tuple[str, ...]
) -> tuple[list[str], tuple[str, ...]]:
paths = [name]
for index, arg in enumerate(args):
if arg == "--":
return paths, args[index + 1 :]
if arg.startswith("-"):
return paths, args[index:]
paths.append(arg)
return paths, ()
def _resolve_root_dir(
directories: list[str], files: list[MarimoFile]
) -> str | None:
# Choose a "root" directory for gallery links when there is an obvious
# shared base directory. This lets us use relative `?file=` keys (and
# avoids leaking absolute paths) when possible.
if len(directories) == 1:
directory = Path(directories[0]).absolute()
if not files:
return str(directory)
# Only use this directory root if it contains all selected files.
if all(
Path(file.path).absolute().is_relative_to(directory)
for file in files
):
return str(directory)
return None
if not directories:
if not files:
return None
parent = Path(files[0].path).absolute().parent
# Only use a parent root when all files are siblings.
if all(Path(file.path).absolute().parent == parent for file in files):
return str(parent)
return None
def _collect_marimo_files(paths: list[str]) -> _CollectedRunFiles:
directories: list[str] = []
files_by_path: dict[str, MarimoFile] = {}
for path in paths:
if Path(path).is_dir():
directories.append(path)
directory = Path(path).absolute()
scanner = DirectoryScanner(path, include_markdown=True)
try:
file_infos = scanner.scan()
except HTTPException as exc:
if exc.status_code != HTTPStatus.REQUEST_TIMEOUT:
raise
file_infos = scanner.partial_results
for file_info in flatten_files(file_infos):
if not file_info.is_marimo_file:
continue
absolute_path = str(directory / file_info.path)
files_by_path[absolute_path] = MarimoFile(
name=file_info.name,
path=absolute_path,
last_modified=file_info.last_modified,
)
else:
marimo_path = MarimoPath(path)
files_by_path[marimo_path.absolute_name] = MarimoFile(
name=marimo_path.relative_name,
path=marimo_path.absolute_name,
last_modified=marimo_path.last_modified,
)
files = sorted(files_by_path.values(), key=lambda file: file.path)
root_dir = _resolve_root_dir(directories, files)
return _CollectedRunFiles(files=files, root_dir=root_dir)
@main.command(

@@ -800,2 +894,4 @@ help="""Run a notebook as an app in read-only mode.

marimo run notebook.py
marimo run folder another_folder
marimo run app.py -- --arg value
"""

@@ -948,2 +1044,3 @@ )

)
@click.pass_context
@click.argument(

@@ -956,2 +1053,3 @@ "name",

def run(
ctx: click.Context,
port: Optional[int],

@@ -985,7 +1083,11 @@ host: str,

if prompt_run_in_docker_container(name, trusted=trusted):
paths, notebook_args = _split_run_paths_and_args(name, args)
if len(paths) == 1 and prompt_run_in_docker_container(
paths[0], trusted=trusted
):
from marimo._cli.run_docker import run_in_docker
run_in_docker(
name,
paths[0],
"run",

@@ -1001,27 +1103,82 @@ port=port,

# of the Python object
name, _ = validate_name(name, allow_new_file=False, allow_directory=False)
validated_paths: list[str] = []
temp_dirs: list[tempfile.TemporaryDirectory[str]] = []
for path in paths:
validated_path, temp_dir = validate_name(
path, allow_new_file=False, allow_directory=True
)
if temp_dir is not None:
temp_dirs.append(temp_dir)
validated_paths.append(validated_path)
has_directory = any(Path(path).is_dir() for path in validated_paths)
is_multi = has_directory or len(validated_paths) > 1
check_source = ctx.get_parameter_source("check")
check_explicit = check_source not in (
ParameterSource.DEFAULT,
ParameterSource.DEFAULT_MAP,
)
if is_multi and check and check_explicit:
raise click.UsageError(
"--check is only supported when running a single notebook file."
)
# correctness check - don't start the server if we can't import the module
check_app_correctness(name)
file = MarimoPath(name)
if check:
from marimo._lint import collect_messages
for path in validated_paths:
if Path(path).is_file():
check_app_correctness(path)
if check and not has_directory:
from marimo._lint import collect_messages
linter, message = collect_messages(file.absolute_name)
if linter.errored:
raise click.ClickException(
red("Failure")
+ ": The notebook has errors, fix them before running.\n"
+ message.strip()
)
file = MarimoPath(path)
linter, message = collect_messages(file.absolute_name)
if linter.errored:
raise click.ClickException(
red("Failure")
+ ": The notebook has errors, fix them before running.\n"
+ message.strip()
)
# We check this after name validation, because this will convert
# URLs into local file paths
# For run command, only single-file sandbox is possible (no directory support)
if resolve_sandbox_mode(sandbox=sandbox, name=name) is SandboxMode.SINGLE:
run_in_sandbox(sys.argv[1:], name=name)
return
if is_multi:
# Gallery mode: use MULTI sandbox (IPC kernels) or None
sandbox_mode = SandboxMode.MULTI if sandbox else None
else:
sandbox_mode = resolve_sandbox_mode(
sandbox=sandbox, name=validated_paths[0]
)
if sandbox_mode is SandboxMode.SINGLE:
run_in_sandbox(sys.argv[1:], name=validated_paths[0])
return
# Multi-file sandbox: use IPC kernels with per-notebook sandboxed venvs
if sandbox_mode is SandboxMode.MULTI:
# Check for pyzmq dependency
from marimo._dependencies.dependencies import DependencyManager
if not DependencyManager.zmq.has():
raise click.UsageError(
"pyzmq is required when running a gallery with --sandbox.\n"
"Install it with: pip install 'marimo[sandbox]'\n"
"Or: pip install pyzmq"
)
if is_multi:
marimo_files = _collect_marimo_files(validated_paths)
file_router = AppFileRouter.from_files(
marimo_files.files,
directory=marimo_files.root_dir,
allow_single_file_key=False,
allow_dynamic=False,
)
else:
file_router = AppFileRouter.from_filename(
MarimoPath(validated_paths[0])
)
start(
file_router=AppFileRouter.from_filename(file),
file_router=file_router,
development_mode=GLOBAL_SETTINGS.DEVELOPMENT_MODE,

@@ -1040,4 +1197,4 @@ quiet=GLOBAL_SETTINGS.QUIET,

allow_origins=allow_origins,
cli_args=parse_args(args),
argv=list(args),
cli_args=parse_args(notebook_args),
argv=list(notebook_args),
auth_token=resolve_token(

@@ -1051,2 +1208,3 @@ token,

asset_url=asset_url,
sandbox_mode=sandbox_mode,
)

@@ -1053,0 +1211,0 @@

@@ -31,2 +31,3 @@ # Copyright 2026 Marimo. All rights reserved.

import marimo._messaging.notification as notifications
import marimo._metadata.opengraph as opengraph
import marimo._runtime.commands as commands

@@ -136,2 +137,3 @@ import marimo._secrets.models as secrets_models

home.MarimoFile,
opengraph.OpenGraphMetadata,
files.FileInfo,

@@ -212,3 +214,3 @@ commands.ExecuteCellCommand,

commands.UpdateUserConfigCommand,
commands.UpdateWidgetModelCommand,
commands.ModelCommand,
commands.ValidateSQLCommand,

@@ -251,3 +253,3 @@ models.BaseResponse,

models.UpdateUserConfigRequest,
models.UpdateWidgetModelRequest,
models.ModelRequest,
models.ValidateSQLRequest,

@@ -254,0 +256,0 @@ ]

@@ -53,4 +53,23 @@ # Copyright 2026 Marimo. All rights reserved.

default_locale, _ = locale.getdefaultlocale()
return default_locale or "--"
# getdefaultlocale is deprecated in 3.13+ and removed in 3.15
# Use getlocale() with LC_ALL as a fallback chain
loc = locale.getlocale(locale.LC_ALL)
if loc[0]:
return loc[0]
# Try LC_MESSAGES on Unix-like systems
try:
loc = locale.getlocale(locale.LC_MESSAGES)
if loc[0]:
return loc[0]
except AttributeError:
pass
# Fall back to environment variable check
import os
for env_var in ("LC_ALL", "LC_MESSAGES", "LANG", "LANGUAGE"):
val = os.environ.get(env_var)
if val:
# Extract locale name (e.g., "en_US" from "en_US.UTF-8")
return val.split(".")[0]
return "--"
except Exception:

@@ -57,0 +76,0 @@ return "--"

@@ -13,2 +13,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._cli.print import echo, green
from marimo._cli.tools.thumbnails import thumbnail
from marimo._cli.utils import prompt_to_overwrite

@@ -833,1 +834,2 @@ from marimo._dependencies.dependencies import DependencyManager

export.add_command(html_wasm)
export.add_command(thumbnail)

@@ -394,2 +394,6 @@ # Copyright 2026 Marimo. All rights reserved.

text=True,
# stdin=DEVNULL prevents hanging on Windows when uv might
# wait for input
stdin=subprocess.DEVNULL,
timeout=30,
)

@@ -399,2 +403,4 @@ LOGGER.info(f"Added marimo to script metadata: {result.stdout}")

LOGGER.warning(f"Failed to add marimo to script metadata: {e.stderr}")
except subprocess.TimeoutExpired:
LOGGER.warning("Timed out adding marimo to script metadata")
except Exception as e:

@@ -401,0 +407,0 @@ LOGGER.warning(f"Failed to add marimo to script metadata: {e}")

@@ -553,4 +553,2 @@ # Copyright 2026 Marimo. All rights reserved.

rtc_v2: bool
performant_table_charts: bool
chat_modes: bool

@@ -557,0 +555,0 @@ # Internal features

@@ -157,2 +157,5 @@ # Copyright 2026 Marimo. All rights reserved.

if markdown_string is not None:
markdown_string = _convert_latex_delimiters_for_jupyter(
markdown_string
)
node = cast(

@@ -273,7 +276,9 @@ nbformat.NotebookNode,

def _convert_rich_output_to_ipynb(
def _convert_output_to_ipynb(
output: CellOutput,
) -> Optional[NotebookNode]:
"""Convert a rich output (OUTPUT/MEDIA channel) to IPython notebook format.
"""Convert certain outputs (OUTPUT/MEDIA channel) to IPython notebook format.
Outputs like rich elements and LaTeX are converted to ensure they are compatible with IPython notebook format.
Returns None if the output should be skipped or produces no data.

@@ -294,3 +299,2 @@ """

# Handle rich output
data: dict[str, Any] = {}

@@ -319,2 +323,4 @@ metadata: dict[str, Any] = {}

data[mime] = _maybe_extract_dataurl(content)
elif output.mimetype == "text/markdown" and isinstance(output.data, str):
data[output.mimetype] = _convert_marimo_tex_to_latex(output.data)
else:

@@ -391,6 +397,5 @@ data[output.mimetype] = _maybe_extract_dataurl(output.data)

elif console_out.channel in (CellChannel.OUTPUT, CellChannel.MEDIA):
# Handle rich outputs in console area (e.g., plt.show())
rich_output = _convert_rich_output_to_ipynb(console_out)
if rich_output is not None:
ipynb_outputs.append(rich_output)
ipynb_compatible_output = _convert_output_to_ipynb(console_out)
if ipynb_compatible_output is not None:
ipynb_outputs.append(ipynb_compatible_output)

@@ -423,7 +428,68 @@ if not cell_output:

# Handle rich output from cell
rich_output = _convert_rich_output_to_ipynb(cell_output)
if rich_output is not None:
ipynb_outputs.append(rich_output)
ipynb_compatible_output = _convert_output_to_ipynb(cell_output)
if ipynb_compatible_output is not None:
ipynb_outputs.append(ipynb_compatible_output)
return ipynb_outputs
def _convert_latex_delimiters_for_jupyter(markdown_string: str) -> str:
"""Convert LaTeX delimiters that nbconvert can't handle. See https://github.com/jupyter/nbconvert/issues/477"""
# Convert display math \[...\] to $$...$$
# Preserve internal whitespace but trim the delimiter boundaries
def replace_display(match: re.Match[str]) -> str:
content = match.group(1)
return f"$${content.strip()}$$"
markdown_string = re.sub(
r"\\\[(.*?)\\\]", replace_display, markdown_string, flags=re.DOTALL
)
# Convert inline math \(...\) to $...$
# Remove spaces adjacent to delimiters
def replace_inline(match: re.Match[str]) -> str:
content = match.group(1)
return f"${content.strip()}$"
markdown_string = re.sub(
r"\\\((.*?)\\\)", replace_inline, markdown_string, flags=re.DOTALL
)
return markdown_string
def _convert_marimo_tex_to_latex(html_string: str) -> str:
"""Convert marimo-tex elements back to standard LaTeX delimiters.
Keep in sync with TexPlugin.tsx
Converts:
- <marimo-tex ...>||(content||)</marimo-tex> → $content$ (inline)
- <marimo-tex ...>||[content||]</marimo-tex> → $$content$$ (block)
- <marimo-tex ...>||(||(content||)||)</marimo-tex> → $$content$$ (nested display)
"""
def replace_tex(match: re.Match[str]) -> str:
content = match.group(1)
# Handle nested display math: ||(||(content||)||)
# Must check this FIRST and be more specific
if content.startswith("||(||(") and content.endswith("||)||)"):
inner = content[6:-6] # Strip ||(||( and ||)||)
return f"$${inner}$$"
# Handle block math: ||[content||]
elif content.startswith("||[") and content.endswith("||]"):
inner = content[3:-3]
return f"$${inner}$$"
# Handle inline math: ||(content||)
elif content.startswith("||(") and content.endswith("||)"):
inner = content[3:-3]
return f"${inner}$" # Single $ for inline!
else:
return content
# Match <marimo-tex ...>content</marimo-tex>
# Use non-greedy matching and handle potential attributes
pattern = r"<marimo-tex[^>]*>(.*?)</marimo-tex>"
return re.sub(pattern, replace_tex, html_string, flags=re.DOTALL)

@@ -406,2 +406,8 @@ # Copyright 2026 Marimo. All rights reserved.

def _pass_if_indented(indent_level: int) -> str:
if indent_level > 0:
return "pass "
return ""
def _normalize_git_url_package(package: str) -> str:

@@ -460,19 +466,36 @@ """

def _extract_pip_install(
command_line: str, command_tokens: list[str]
command_line: str, command_tokens: list[str], indent_level: int = 0
) -> ExclamationCommandResult:
pip_packages: list[str] = []
if "install" not in command_tokens:
return _shlex_to_subprocess_call(command_line, command_tokens)
return _shlex_to_subprocess_call(
command_line, command_tokens, indent_level
)
install_idx = command_tokens.index("install")
packages = [
p for p in command_tokens[install_idx + 1 :] if not p.startswith("-")
]
# Collect packages and items for display, skipping flags
packages = [] # Actual packages (no templates)
templates = [] # Template placeholders
for token in command_tokens[install_idx + 1 :]:
# Skip flags (starting with -)
if token.startswith("-"):
continue
# Template placeholders stop package collection
if token.startswith("{") and token.endswith("}"):
templates.append(token)
break
packages.append(token)
# Normalize git URLs to PEP 508 format
pip_packages = [_normalize_git_url_package(p) for p in packages]
# Comment out the pip command
# For display: show templates only if there are no real packages
display_items = packages if packages else templates
# Comment out the pip command, showing items in comment
# Add pass for indented commands to prevent empty blocks
replacement = (
"# packages added via marimo's package management: "
f"{' '.join(packages)} !{command_line}"
f"{_pass_if_indented(indent_level)}# packages added via marimo's "
f"package management: {' '.join(display_items)} !{command_line}"
)

@@ -482,8 +505,59 @@ return ExclamationCommandResult(replacement, pip_packages, False)

def _is_compilable_expression(expr: str) -> bool:
"""Check if expression is valid Python that can be compiled.
Args:
expr: The expression to check (without surrounding braces)
Returns:
True if the expression can be compiled as valid Python, False otherwise
"""
try:
compile(expr, "<string>", "eval")
return True
except (SyntaxError, ValueError):
return False
def _shlex_to_subprocess_call(
command_line: str, command_tokens: list[str]
command_line: str, command_tokens: list[str], indent_level: int = 0
) -> ExclamationCommandResult:
"""Convert a shell command to subprocess.call([...])"""
"""Convert a shell command to subprocess.call([...])
Template placeholders {expr} are converted to str(expr) if expr is valid Python.
If any template contains invalid Python, the entire command is commented out.
Args:
command_line: The command string
command_tokens: Tokenized command
indent_level: Number of indents for the examined line.
"""
# First pass: check if any template is invalid
for token in command_tokens:
if token.startswith("{") and token.endswith("}"):
expr = token[1:-1]
if not _is_compilable_expression(expr):
# Comment out entire command if any template is invalid
# Always add pass to prevent empty blocks
return ExclamationCommandResult(
f"# Note: Command contains invalid template expression\n"
f"{_pass_if_indented(indent_level)}# !{command_line}",
[],
False, # No subprocess needed
)
# Second pass: convert templates to str() calls
processed_tokens = []
for token in command_tokens:
if token.startswith("{") and token.endswith("}"):
expr = token[1:-1]
# Convert to str() call
processed_tokens.append(f"str({expr})")
else:
processed_tokens.append(repr(token))
# Build the subprocess call with processed tokens
tokens_str = "[" + ", ".join(processed_tokens) + "]"
command = "\n".join(
[f"#! {command_line}", f"subprocess.call({command_tokens!r})"]
[f"#! {command_line}", f"subprocess.call({tokens_str})"]
)

@@ -494,3 +568,3 @@ return ExclamationCommandResult(command, [], True)

def _handle_exclamation_command(
command_line: str,
command_line: str, indent_level: int = 0
) -> ExclamationCommandResult:

@@ -500,2 +574,6 @@ """

Args:
command_line: The command to process (without the leading !)
indent_level: Column position of the ! (0 = top-level, >0 = indented)
Returns: (replacement_text, pip_packages, needs_subprocess)

@@ -518,8 +596,133 @@ """

if token.startswith("pip"):
return _extract_pip_install(command_line, command_tokens[i:])
# Pip installs always use marimo's package management (never subprocess)
return _extract_pip_install(
command_line, command_tokens[i:], indent_level
)
# Replace with subprocess.call()
return _shlex_to_subprocess_call(command_line, command_tokens)
return _shlex_to_subprocess_call(
command_line, command_tokens, indent_level
)
def _normalize_package_name(name: str) -> str:
"""Normalize a package name per PEP 503.
PEP 503 specifies that package names should be normalized by:
- Converting to lowercase
- Replacing underscores, periods, and consecutive dashes with single dashes
Args:
name: Package name to normalize
Returns:
Normalized package name
"""
return re.sub(r"[-_.]+", "-", name.lower())
def _extract_package_name(pkg: str) -> str:
"""Extract and normalize the base package name from a package specification.
Handles version specifiers, extras, and VCS URLs.
Returns normalized names per PEP 503.
Args:
pkg: Package specification (e.g., "numpy>=1.0", "package[extra]", "name @ git+...")
Returns:
Normalized base package name (e.g., "numpy", "package", "name")
"""
# Handle PEP 508 URL format: "name @ git+..."
if " @ " in pkg:
name = pkg.split(" @ ")[0].strip()
return _normalize_package_name(name)
# Strip version specifiers and extras
name = re.split(r"[=<>~\[]+", pkg)[0].strip()
return _normalize_package_name(name)
def _resolve_pip_packages(packages: list[str]) -> list[str]:
"""Resolve pip packages using uv for validation, returning only direct packages.
Uses uv pip compile to validate packages and resolve conflicts, but filters
the output to only include packages that were originally requested (not
transitive dependencies).
For git URLs, preserves the full PEP 508 format (e.g., "name @ git+...").
Args:
packages: List of package specifications (may have duplicates/conflicts)
Returns:
Resolved and sorted list of direct packages only
"""
if not packages:
return []
import subprocess
import tempfile
from pathlib import Path
# Build a mapping from normalized name to original package spec
# For git URLs, we want to preserve the full URL format
original_specs: dict[str, str] = {}
for pkg in packages:
name = _extract_package_name(pkg)
# For git URLs (PEP 508 format), preserve the full spec
if " @ " in pkg:
original_specs[name] = pkg
else:
# For regular packages, just use the normalized name
original_specs[name] = name
original_names = set(original_specs.keys())
# Try using uv pip compile to validate/resolve conflicts
try:
with tempfile.TemporaryDirectory() as tmpdir:
req_file = Path(tmpdir) / "requirements.in"
out_file = Path(tmpdir) / "requirements.txt"
# Write packages to temp file
req_file.write_text("\n".join(packages))
# Run uv pip compile
result = subprocess.run(
[
"uv",
"pip",
"compile",
str(req_file),
"--output-file",
str(out_file),
],
capture_output=True,
text=True,
timeout=10,
)
if result.returncode == 0 and out_file.exists():
# Parse resolved requirements, filtering to only direct packages
resolved = []
for line in out_file.read_text().splitlines():
line = line.strip()
# Skip comments and empty lines
if line and not line.startswith("#"):
# Extract package name
pkg_name = _extract_package_name(line)
# Only include if it was in the original request
if pkg_name in original_names:
# Use the original spec (preserves git URLs)
resolved.append(original_specs[pkg_name])
return sorted(set(resolved))
except (FileNotFoundError, subprocess.TimeoutExpired, Exception):
# uv not available or failed, fall through to unpinning
pass
# Fallback: deduplicate and return original specs
return sorted(original_specs.values())
def transform_exclamation_mark(sources: list[str]) -> ExclamationMarkResult:

@@ -562,2 +765,3 @@ """

exclaim_line_num = None
exclaim_indent_level = 0

@@ -578,2 +782,5 @@ for i, token in enumerate(tokens):

exclaim_line_num = token.start[0]
exclaim_indent_level = token.start[
1
] # Column position = indentation
continue # Skip the ! token

@@ -588,16 +795,54 @@

# Extract command from collected tokens by joining their strings
# Extract command from collected tokens by reconstructing from source
if exclaim_tokens:
# Reconstruct command from tokens
# Reconstruct command from original source using token positions
# This properly handles multi-line commands with backslash continuations
first_token = exclaim_tokens[0]
last_token = exclaim_tokens[-1]
# Get the source line and extract the command portion
line_text = first_token.line
# Get line numbers (1-indexed)
start_line_num = first_token.start[0]
end_line_num = last_token.end[0]
start_col = first_token.start[1]
end_col = last_token.end[1]
command_line = line_text[start_col:end_col].strip()
# Split cell into lines for extraction
cell_lines = cell.split("\n")
if start_line_num == end_line_num:
# Single line command
command_line = cell_lines[start_line_num - 1][
start_col:end_col
].strip()
else:
# Multi-line command - extract across lines
parts = []
# First line
parts.append(
cell_lines[start_line_num - 1][start_col:]
)
# Middle lines
for line_idx in range(
start_line_num, end_line_num - 1
):
parts.append(cell_lines[line_idx])
# Last line
parts.append(
cell_lines[end_line_num - 1][:end_col]
)
# Join and remove backslash continuations
full_text = "\n".join(parts)
# Remove backslash line continuations
command_line = full_text.replace(
"\\\n", " "
).strip()
# Normalize whitespace
command_line = " ".join(command_line.split())
else:
command_line = ""
result = _handle_exclamation_command(command_line)
result = _handle_exclamation_command(
command_line, indent_level=exclaim_indent_level
)

@@ -617,2 +862,12 @@ all_pip_packages.extend(result.pip_packages)

# For multi-line commands, mark continuation lines for removal
if exclaim_tokens:
last_token = exclaim_tokens[-1]
end_line_num = last_token.end[0]
# Mark all continuation lines (after the first) as removed
for line_num in range(
exclaim_line_num + 1, end_line_num + 1
):
line_replacements[line_num] = None # type: ignore
in_exclaim = False

@@ -629,5 +884,9 @@ else:

if line_num in line_replacements:
replacement = line_replacements[line_num]
# None means skip this line (multi-line continuation)
if replacement is None:
continue
# Preserve indentation from original line
indent = (len(line) - len(line.lstrip())) * " "
replacements = line_replacements[line_num].split("\n")
replacements = replacement.split("\n")
# Add indentation to replacement

@@ -644,5 +903,8 @@ indented_replacement = [

# Resolve packages using uv (or unpin if unavailable)
resolved_packages = _resolve_pip_packages(all_pip_packages)
return ExclamationMarkResult(
transformed_sources=transformed_sources,
pip_packages=all_pip_packages,
pip_packages=resolved_packages,
needs_subprocess=any_needs_subprocess,

@@ -649,0 +911,0 @@ )

@@ -255,2 +255,3 @@ # Copyright 2026 Marimo. All rights reserved.

zmq = Dependency("zmq") # pyzmq for sandbox IPC kernels
weave = Dependency("weave")

@@ -257,0 +258,0 @@ # Version requirements to properly support the new superfences introduced in

@@ -25,2 +25,3 @@ # Copyright 2026 Marimo. All rights reserved.

ListSQLTablesCommand,
ModelCommand,
ModelMessage,

@@ -39,3 +40,2 @@ PreviewDatasetColumnCommand,

UpdateUserConfigCommand,
UpdateWidgetModelCommand,
ValidateSQLCommand,

@@ -79,5 +79,5 @@ kebab_case,

"UpdateUserConfigCommand",
"UpdateWidgetModelCommand",
"ModelCommand",
"ValidateSQLCommand",
"kebab_case",
]

@@ -48,11 +48,9 @@ # Copyright 2026 Marimo. All rights reserved.

virtual_files_supported=False,
# NB: Unique parameter combination required for ZeroMQ. The `stream_queue`
# and `socket_addr` are mutually exclusive. Normally RUN mode doesn't
# redirect console, while EDIT mode does. Our ZeroMQ proxy needs both
# `stream_queue` AND console redirection, but also other behavior of
# EDIT, so we require this combination.
# NB: IPC kernels are always subprocesses (is_ipc=True) but may be
# edit or run mode based on is_edit_mode.
stream_queue=queue_manager.stream_queue,
socket_addr=None,
is_edit_mode=True,
redirect_console_to_browser=True,
is_edit_mode=not args.is_run_mode,
is_ipc=True,
redirect_console_to_browser=args.redirect_console_to_browser,
)

@@ -59,0 +57,0 @@

@@ -37,2 +37,4 @@ # Copyright 2026 Marimo. All rights reserved.

connection_info: ConnectionInfo
# Whether to use run-mode config (autorun) vs edit-mode config (lazy)
is_run_mode: bool = False
# Runtime behavior flags

@@ -39,0 +41,0 @@ virtual_files_supported: bool = True

@@ -14,4 +14,10 @@ {

"showAsChatMode": false
},
{
"name": "Debugger",
"description": "An expert debugging assistant that helps solve complex issues by actively using Java debugging capabilities",
"path": "./assets/agents/Debugger.agent.md",
"showAsChatMode": true
}
]
}

@@ -15,10 +15,13 @@ #!/usr/bin/env node

if (!argv.includes('--node-ipc')) {
const path = require('node:path');
const root = path.join(__dirname, '..', '..', `copilot-language-server-${process.platform}-${process.arch}`);
const exe = path.join(root, `copilot-language-server${process.platform === 'win32' ? '.exe' : ''}`);
const cp = require('node:child_process');
const result = cp.spawnSync(exe, argv, {stdio: 'inherit'});
if (typeof result.status === 'number') {
process.exit(result.status);
}
const path = require('path');
const root = path.join(__dirname, '..');
const bin = path.join(
`copilot-language-server-${process.platform}-${process.arch}`,
`copilot-language-server${process.platform === 'win32' ? '.exe' : ''}`
);
const cp = require('child_process');
const result1 = cp.spawnSync(path.join(root, 'node_modules', '@github', bin), argv, {stdio: 'inherit'});
if (typeof result1.status === 'number') process.exit(result1.status);
const result2 = cp.spawnSync(path.join(root, '..', bin), argv, {stdio: 'inherit'});
if (typeof result2.status === 'number') process.exit(result2.status);
}

@@ -25,0 +28,0 @@ console.error(`Node.js ${minMajor}.${minMinor} is required to run GitHub Copilot but found ${version}`);

@@ -21,2 +21,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._plugins.core.media import io_to_data_url
from marimo._utils.methods import getcallable

@@ -29,7 +30,7 @@ LOGGER = _loggers.marimo_logger()

if hasattr(obj, "_marimo_serialize_"):
return obj._marimo_serialize_()
if serialize := getcallable(obj, "_marimo_serialize_"):
return serialize()
if hasattr(obj, "_mime_"):
mimetype, data = obj._mime_()
if mime := getcallable(obj, "_mime_"):
mimetype, data = mime()
return {"mimetype": mimetype, "data": data}

@@ -186,3 +187,5 @@

# Handle objects with __slots__
slots = getattr(obj, "__slots__", None)
# Check on type(obj) to avoid triggering __getattr__ on objects that
# implement it
slots = getattr(type(obj), "__slots__", None)
if slots is not None:

@@ -189,0 +192,0 @@ try:

@@ -34,3 +34,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._sql.parse import SqlCatalogCheckResult, SqlParseResult
from marimo._types.ids import CellId_t, RequestId, WidgetModelId
from marimo._types.ids import CellId_t, RequestId, UIElementId, WidgetModelId
from marimo._utils.msgspec_basestruct import BaseStruct

@@ -148,4 +148,3 @@ from marimo._utils.platform import is_pyodide, is_windows

Attributes:
ui_element: UI element identifier (legacy).
model_id: Widget model ID (newer architecture).
ui_element: UI element identifier.
message: Message payload as dictionary.

@@ -156,4 +155,3 @@ buffers: Optional binary buffers for large data.

name: ClassVar[str] = "send-ui-element-message"
ui_element: Optional[str]
model_id: Optional[WidgetModelId]
ui_element: UIElementId
message: dict[str, Any]

@@ -163,2 +161,49 @@ buffers: Optional[list[bytes]] = None

class ModelOpen(msgspec.Struct, tag="open", tag_field="method"):
"""Initial widget state on creation."""
state: dict[str, Any]
buffer_paths: list[list[Union[str, int]]]
buffers: list[bytes]
class ModelUpdate(msgspec.Struct, tag="update", tag_field="method"):
"""State sync - changed traits only."""
state: dict[str, Any]
buffer_paths: list[list[Union[str, int]]]
buffers: list[bytes]
class ModelCustom(msgspec.Struct, tag="custom", tag_field="method"):
"""Custom application message."""
content: Any
buffers: list[bytes]
class ModelClose(msgspec.Struct, tag="close", tag_field="method"):
"""Widget destruction."""
pass
ModelMessage = Union[ModelOpen, ModelUpdate, ModelCustom, ModelClose]
class ModelLifecycleNotification(Notification, tag="model-lifecycle"):
"""Widget model lifecycle message.
Mirrors the Jupyter widget comm protocol with open/update/custom/close.
Attributes:
model_id: Widget model identifier.
message: The lifecycle message (open/update/custom/close).
"""
name: ClassVar[str] = "model-lifecycle"
model_id: WidgetModelId
message: ModelMessage
class InterruptedNotification(Notification, tag="interrupted"):

@@ -665,2 +710,3 @@ """Kernel was interrupted by user (SIGINT/Ctrl+C)."""

UIElementMessageNotification,
ModelLifecycleNotification,
RemoveUIElementsNotification,

@@ -667,0 +713,0 @@ # Notebook lifecycle

@@ -9,2 +9,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._output.rich_help import mddoc
from marimo._utils.methods import getcallable

@@ -26,9 +27,8 @@

"""
if hasattr(obj, "_rich_help_"):
msg = obj._rich_help_()
if rich_help := getcallable(obj, "_rich_help_"):
msg = rich_help()
return (
md(msg) if msg is not None else md("No documentation available.")
)
else:
help(obj)
return None
help(obj)
return None

@@ -14,2 +14,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._output.utils import flatten_string
from marimo._utils.methods import getcallable

@@ -145,4 +146,4 @@ if TYPE_CHECKING:

# Try PNG representation first (for objects with _repr_png_)
repr_png = getattr(self, "_repr_png_", None)
if repr_png is not None and callable(repr_png):
repr_png = getcallable(self, "_repr_png_")
if repr_png is not None:
png_bytes = cast(bytes, repr_png())

@@ -152,4 +153,4 @@ return ("image/png", png_bytes.decode())

# Try markdown representation (for objects with _repr_markdown_)
repr_markdown = getattr(self, "_repr_markdown_", None)
if repr_markdown is not None and callable(repr_markdown):
repr_markdown = getcallable(self, "_repr_markdown_")
if repr_markdown is not None:
markdown_text = cast(str, repr_markdown())

@@ -156,0 +157,0 @@ return ("text/markdown", markdown_text)

@@ -444,3 +444,2 @@ # Copyright 2026 Marimo. All rights reserved.

ui_element=self._id,
model_id=None,
message=message,

@@ -447,0 +446,0 @@ buffers=list(buffers or []),

@@ -40,5 +40,3 @@ # Copyright 2026 Marimo. All rights reserved.

buffers=cast(BufferType, buffers),
# TODO: should this be hard-coded?
metadata={"version": __protocol_version__},
# html_deps=session._process_ui(TagList(widget_dep))["deps"],
)

@@ -45,0 +43,0 @@

# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
from typing import Any, Literal, NewType, TypedDict, Union
from typing import Any, NewType, Union

@@ -17,45 +17,1 @@ # AnyWidget model id

WidgetModelStateWithoutBuffers = dict[str, Any]
# AnyWidget model message
class TypedModelMessage(TypedDict):
"""
A typed message for AnyWidget models.
Args:
state: The state of the model.
buffer_paths: The buffer paths to update.
"""
state: WidgetModelStateWithoutBuffers
buffer_paths: BufferPaths
class TypedModelAction(TypedModelMessage):
"""
A typed message for AnyWidget models.
Args:
method: The method to call on the model.
state: The state of the model.
buffer_paths: The buffer paths to update.
"""
method: Literal["open", "update", "custom", "echo_update"]
class TypedModelMessageContent(TypedDict):
"""A typed payload for AnyWidget models."""
data: TypedModelAction
class TypedModelMessagePayload(TypedDict):
"""
A typed payload for AnyWidget models.
This interface is what AnyWidget's comm.handle_msg expects
"""
content: TypedModelMessageContent
buffers: list[bytes]
# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
from typing import TYPE_CHECKING
from marimo._dependencies.dependencies import DependencyManager
from marimo._plugins.ui._impl.anywidget.types import (
BufferPaths,
TypedModelMessage,
WidgetModelState,

@@ -14,6 +11,3 @@ WidgetModelStateWithoutBuffers,

if TYPE_CHECKING:
from typing_extensions import TypeIs
def extract_buffer_paths(

@@ -34,29 +28,1 @@ message: WidgetModelState,

return state, buffer_paths, buffers # type: ignore
def insert_buffer_paths(
state: WidgetModelStateWithoutBuffers,
buffer_paths: BufferPaths,
buffers: list[bytes],
) -> WidgetModelState:
"""
Insert buffer paths into a message.
"""
DependencyManager.ipywidgets.require("for anywidget support.")
import ipywidgets # type: ignore
_put_buffers = ipywidgets.widgets.widget._put_buffers # type: ignore
_put_buffers(state, buffer_paths, buffers)
return state
def is_model_message(message: object) -> TypeIs[TypedModelMessage]:
"""
Check if a message is a model message.
"""
if not isinstance(message, dict):
return False
keys = ("method", "state", "buffer_paths")
if not all(key in message for key in keys):
return False
return True

@@ -5,5 +5,6 @@ # Copyright 2026 Marimo. All rights reserved.

import inspect
import json
import uuid
from dataclasses import dataclass
from typing import Any, Callable, Final, Optional, Union, cast
from typing import Any, Callable, Final, Literal, Optional, Union, cast

@@ -38,2 +39,4 @@ from marimo import _loggers

# The version of the Vercel AI SDK we use
AI_SDK_VERSION: Final[Literal[5, 6]] = 5
DONE_CHUNK: Final[str] = "[DONE]"

@@ -469,9 +472,12 @@

if isinstance(chunk, BaseChunk):
# by_alias=True: Use camelCase keys expected by Vercel AI SDK.
# exclude_none=True: Remove null values which cause validation errors.
self.on_send_chunk(
chunk.model_dump(
try:
serialized = json.loads(
chunk.encode(sdk_version=AI_SDK_VERSION)
)
except TypeError:
# Fallback for pydantic-ai < 1.52.0 which doesn't have sdk_version param
serialized = chunk.model_dump(
mode="json", by_alias=True, exclude_none=True
)
)
self.on_send_chunk(serialized)
return

@@ -481,2 +487,4 @@

if isinstance(chunk, str):
# Coerce str subclasses (like weave's BoxedStr) to plain str
chunk = str(chunk)
if self._text_id is None:

@@ -483,0 +491,0 @@ self._text_id = f"text_{uuid.uuid4().hex}"

# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, Optional, cast
from typing import Any, Callable, Optional
from marimo._loggers import marimo_logger
from marimo._messaging.notification import (
ModelClose,
ModelCustom,
ModelLifecycleNotification,
ModelMessage,
ModelOpen,
ModelUpdate,
)
from marimo._messaging.notification_utils import broadcast_notification
from marimo._runtime.commands import (
ModelCommand,
ModelUpdateMessage,
)
from marimo._types.ids import WidgetModelId
if TYPE_CHECKING:
from marimo._plugins.ui._impl.anywidget.types import (
TypedModelMessagePayload,
)
from marimo._runtime.commands import ModelMessage
LOGGER = marimo_logger()

@@ -32,26 +38,28 @@

self,
comm_id: WidgetModelId,
message: ModelMessage,
buffers: Optional[list[bytes]],
) -> None:
if comm_id not in self.comms:
LOGGER.warning("Received message for unknown comm", comm_id)
return
command: ModelCommand,
) -> tuple[Optional[str], Optional[dict[str, Any]]]:
"""Receive a message from the frontend and forward to the comm.
comm = self.comms[comm_id]
Returns:
A tuple of (ui_element_id, state) if this is an "update" message
and there's a ui_element_id, otherwise (None, None).
The caller can use this to trigger a cell re-run.
"""
if command.model_id not in self.comms:
LOGGER.warning(
"Received message for unknown comm: %s", command.model_id
)
return (None, None)
msg: TypedModelMessagePayload = {
"content": {
"data": {
"state": message.state,
"method": "update",
"buffer_paths": message.buffer_paths,
}
},
"buffers": buffers or [],
}
comm = self.comms[command.model_id]
comm.handle_msg(command.into_comm_payload())
comm.handle_msg(cast(Msg, msg))
# For update messages, return ui_element_id and state for cell re-run
message = command.message
if isinstance(message, ModelUpdateMessage) and comm.ui_element_id:
return (comm.ui_element_id, message.state)
return (None, None)
Msg = dict[str, Any]

@@ -63,15 +71,40 @@ MsgCallback = Callable[[Msg], None]

COMM_MESSAGE_NAME = "marimo_comm_msg"
COMM_OPEN_NAME = "marimo_comm_open"
COMM_CLOSE_NAME = "marimo_comm_close"
def _create_model_message(
data: dict[str, Any],
buffers: list[bytes],
) -> Optional[ModelMessage]:
"""Create the appropriate ModelMessage based on the method field.
@dataclass
class MessageBufferData:
data: dict[str, Any]
metadata: dict[str, Any]
buffers: list[bytes]
model_id: WidgetModelId
Returns None for methods that should be skipped (e.g., echo_update).
"""
method = data.get("method", "update")
state = data.get("state", {})
buffer_paths = data.get("buffer_paths", [])
if method == "open":
return ModelOpen(
state=state,
buffer_paths=buffer_paths,
buffers=buffers,
)
elif method == "update":
return ModelUpdate(
state=state,
buffer_paths=buffer_paths,
buffers=buffers,
)
elif method == "custom":
return ModelCustom(
content=data.get("content"),
buffers=buffers,
)
elif method == "echo_update":
# echo_update is for multi-client sync acknowledgment, skip it
return None
else:
LOGGER.warning("Unknown method: %s, skipping", method)
return None
# Compare to `ipykernel.comm.Comm`

@@ -96,2 +129,4 @@ # (uses the marimo context instead of a Kernel to send/receive messages).

) -> None:
del keys # unused
del metadata # unused
self._msg_callback: Optional[MsgCallback] = None

@@ -106,23 +141,14 @@ self._close_callback: Optional[MsgCallback] = None

self.ui_element_id: Optional[str] = None
self._publish_message_buffer: list[MessageBufferData] = []
self.open(data=data, metadata=metadata, buffers=buffers, **keys)
self._open(data=data, buffers=buffers)
def open(
def _open(
self,
data: DataType = None,
metadata: MetadataType = None,
buffers: BufferType = None,
**keys: object,
) -> None:
"""Open the comm and send initial state."""
LOGGER.debug("Opening comm %s", self.comm_id)
self.comm_manager.register_comm(self)
try:
self._publish_msg(
COMM_OPEN_NAME,
data=data,
metadata=metadata,
buffers=buffers,
target_name=self.target_name,
target_module=None,
**keys,
)
self._broadcast(data or {}, buffers or [])
self._closed = False

@@ -133,4 +159,13 @@ except Exception:

# Inform client of any mutation(s) to the model
# (e.g., add a marker to a map, without a full redraw)
# Legacy method for ipywidgets compatibility
def open(
self,
data: DataType = None,
metadata: MetadataType = None,
buffers: BufferType = None,
**keys: object,
) -> None:
del metadata, keys # unused
self._open(data=data, buffers=buffers)
def send(

@@ -142,8 +177,6 @@ self,

) -> None:
self._publish_msg(
COMM_MESSAGE_NAME,
data=data,
metadata=metadata,
buffers=buffers,
)
"""Send a message to the frontend (state update or custom message)."""
del metadata # unused
LOGGER.debug("Sending comm message %s", self.comm_id)
self._broadcast(data or {}, buffers or [])

@@ -157,91 +190,34 @@ def close(

) -> None:
"""Close the comm."""
del data, metadata, buffers # unused for close
LOGGER.debug("Closing comm %s", self.comm_id)
if self._closed:
return
self._closed = True
data = self._closed_data if data is None else data
self._publish_msg(
COMM_CLOSE_NAME,
data=data,
metadata=metadata,
buffers=buffers,
broadcast_notification(
ModelLifecycleNotification(
model_id=self.comm_id,
message=ModelClose(),
)
)
if not deleting:
# If deleting, the comm can't be unregistered
self.comm_manager.unregister_comm(self)
# trigger close on gc
def __del__(self) -> None:
self.close(deleting=True)
# Compare to `ipykernel.comm.Comm._publish_msg`, but...
# https://github.com/jupyter/jupyter_client/blob/c5c0b80/jupyter_client/session.py#L749
# ...the real meat of the implement
# is in `jupyter_client.session.Session.send`
# https://github.com/jupyter/jupyter_client/blob/c5c0b8/jupyter_client/session.py#L749-L862
def _publish_msg(
self,
msg_type: str,
data: DataType = None,
metadata: MetadataType = None,
buffers: BufferType = None,
**keys: object,
) -> None:
del keys
data = {} if data is None else data
metadata = {} if metadata is None else metadata
buffers = [] if buffers is None else buffers
if msg_type == COMM_OPEN_NAME:
self._publish_message_buffer.append(
MessageBufferData(
data, metadata, buffers, model_id=self.comm_id
)
)
self.flush()
def _broadcast(self, data: dict[str, Any], buffers: list[bytes]) -> None:
"""Broadcast a model lifecycle notification."""
message = _create_model_message(data, buffers)
if message is None:
return
if msg_type == COMM_MESSAGE_NAME:
self._publish_message_buffer.append(
MessageBufferData(
data, metadata, buffers, model_id=self.comm_id
)
broadcast_notification(
ModelLifecycleNotification(
model_id=self.comm_id,
message=message,
)
self.flush()
return
if msg_type == COMM_CLOSE_NAME:
self._publish_message_buffer.append(
MessageBufferData(
data, metadata, buffers, model_id=self.comm_id
)
)
self.flush()
return
LOGGER.warning(
"Unknown message type",
msg_type,
data,
)
def flush(self) -> None:
from marimo._messaging.notification import (
UIElementMessageNotification,
)
from marimo._messaging.notification_utils import broadcast_notification
while self._publish_message_buffer:
item = self._publish_message_buffer.pop(0)
broadcast_notification(
UIElementMessageNotification(
# ui_element_id can be None. In this case, we are creating a model
# not tied to a specific UI element
ui_element=self.ui_element_id,
model_id=item.model_id,
message=item.data,
buffers=item.buffers,
),
)
# This is the method that ipywidgets.widgets.Widget uses to respond to

@@ -256,2 +232,3 @@ # client-side changes

def handle_msg(self, msg: Msg) -> None:
LOGGER.debug("Handling message for comm %s", self.comm_id)
if self._msg_callback is not None:

@@ -261,5 +238,4 @@ self._msg_callback(msg)

LOGGER.warning(
"Received message for comm but no callback registered",
"Received message for comm %s but no callback registered",
self.comm_id,
msg,
)

@@ -271,6 +247,5 @@

else:
LOGGER.warning(
"Received close for comm but no callback registered",
LOGGER.debug(
"Received close for comm %s but no callback registered",
self.comm_id,
msg,
)

@@ -51,2 +51,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._utils.memoize import memoize_last_value
from marimo._utils.methods import getcallable
from marimo._utils.narwhals_utils import is_narwhals_lazyframe, make_lazy

@@ -238,4 +239,4 @@ from marimo._utils.parse_dataclass import parse_raw

# useful for rendering in the GitHub viewer.
repr_html = getattr(self._data, "_repr_html_", None)
if repr_html is not None and callable(repr_html):
repr_html = getcallable(self._data, "_repr_html_")
if repr_html is not None:
return ("text/html", cast(str, repr_html()))

@@ -242,0 +243,0 @@ return ("text/html", str(self._data))

@@ -390,4 +390,6 @@ # Copyright 2026 Marimo. All rights reserved.

filter(
lambda col: col not in transform.column_ids
and col not in transform.value_column_ids,
lambda col: (
col not in transform.column_ids
and col not in transform.value_column_ids
),
columns,

@@ -402,4 +404,6 @@ )

filter(
lambda col: col not in transform.column_ids
and col not in transform.index_column_ids,
lambda col: (
col not in transform.column_ids
and col not in transform.index_column_ids
),
columns,

@@ -406,0 +410,0 @@ )

@@ -225,4 +225,6 @@ # Copyright 2026 Marimo. All rights reserved.

filter(
lambda col: col not in transform.column_ids
and col not in transform.value_column_ids,
lambda col: (
col not in transform.column_ids
and col not in transform.value_column_ids
),
all_columns,

@@ -239,4 +241,6 @@ )

filter(
lambda col: col not in transform.column_ids
and col not in transform.index_column_ids,
lambda col: (
col not in transform.column_ids
and col not in transform.index_column_ids
),
all_columns,

@@ -445,4 +449,6 @@ )

filter(
lambda col: col not in transform.column_ids
and col not in transform.value_column_ids,
lambda col: (
col not in transform.column_ids
and col not in transform.value_column_ids
),
all_columns,

@@ -459,4 +465,6 @@ )

filter(
lambda col: col not in transform.column_ids
and col not in transform.index_column_ids,
lambda col: (
col not in transform.column_ids
and col not in transform.index_column_ids
),
all_columns,

@@ -630,4 +638,6 @@ )

filter(
lambda col: col not in transform.column_ids
and col not in transform.value_column_ids,
lambda col: (
col not in transform.column_ids
and col not in transform.value_column_ids
),
all_columns,

@@ -644,4 +654,6 @@ )

filter(
lambda col: col not in transform.column_ids
and col not in transform.index_column_ids,
lambda col: (
col not in transform.column_ids
and col not in transform.index_column_ids
),
all_columns,

@@ -648,0 +660,0 @@ )

# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
import base64
import hashlib
import weakref
from copy import deepcopy
from dataclasses import dataclass
from typing import (

@@ -13,3 +10,3 @@ TYPE_CHECKING,

Generic,
Optional,
TypeAlias,
TypedDict,

@@ -24,12 +21,13 @@ TypeVar,

from marimo._plugins.ui._core.ui_element import InitializationArgs, UIElement
from marimo._plugins.ui._impl.anywidget.utils import (
extract_buffer_paths,
insert_buffer_paths,
)
from marimo._plugins.ui._impl.comm import MarimoComm
from marimo._runtime.functions import Function
from marimo._types.ids import WidgetModelId
from marimo._utils.code import hash_code
AnyWidgetState: TypeAlias = dict[str, Any]
class WireFormat(TypedDict):
state: dict[str, Any]
"""Wire format for anywidget state with binary buffers."""
state: AnyWidgetState
bufferPaths: list[list[str | int]]

@@ -39,42 +37,8 @@ buffers: list[str]

def decode_from_wire(
wire: WireFormat | dict[str, Any],
) -> dict[str, Any]:
"""Decode wire format { state, bufferPaths, buffers } to plain state with bytes."""
if "state" not in wire or "bufferPaths" not in wire:
return wire # Not wire format, return as-is
class ModelIdRef(TypedDict):
"""Reference to a model by its ID. The frontend retrieves state from the open message."""
state = wire.get("state", {})
buffer_paths = wire.get("bufferPaths", [])
buffers_base64: list[str] = wire.get("buffers", [])
model_id: WidgetModelId
if buffer_paths and buffers_base64:
decoded_buffers = [base64.b64decode(b) for b in buffers_base64]
return insert_buffer_paths(state, buffer_paths, decoded_buffers)
if buffer_paths or buffers_base64:
LOGGER.warning(
"Expected wire format to have buffers, but got %s", wire
)
return state
return state
def encode_to_wire(
state: dict[str, Any],
) -> WireFormat:
"""Encode plain state with bytes to wire format { state, bufferPaths, buffers }."""
state_no_buffers, buffer_paths, buffers = extract_buffer_paths(state)
# Convert bytes to base64
buffers_base64 = [base64.b64encode(b).decode("utf-8") for b in buffers]
return WireFormat(
state=state_no_buffers,
bufferPaths=buffer_paths,
buffers=buffers_base64,
)
if TYPE_CHECKING:

@@ -122,3 +86,4 @@ from anywidget import ( # type: ignore [import-not-found,unused-ignore] # noqa: E501

"""Create a UIElement from an AnyWidget."""
if not (el := _cache.get(widget)):
el = _cache.get(widget)
if el is None:
el = anywidget(widget)

@@ -129,13 +94,46 @@ _cache.add(widget, el) # type: ignore[no-untyped-call, unused-ignore, assignment] # noqa: E501

T = dict[str, Any]
def get_anywidget_state(widget: AnyWidget) -> AnyWidgetState:
"""Get the state of an AnyWidget."""
# Remove widget-specific system traits not needed for the frontend
ignored_traits = {
"comm",
"layout",
"log",
"tabbable",
"tooltip",
"keys",
"_esm",
"_css",
"_anywidget_id",
"_msg_callbacks",
"_dom_classes",
"_model_module",
"_model_module_version",
"_model_name",
"_property_lock",
"_states_to_send",
"_view_count",
"_view_module",
"_view_module_version",
"_view_name",
}
state: dict[str, Any] = widget.get_state()
@dataclass
class SendToWidgetArgs:
content: Any
buffers: Optional[Any] = None
# Filter out system traits from the serialized state
# This should include the binary data,
# see marimo/_smoke_tests/issues/2366-anywidget-binary.py
return {k: v for k, v in state.items() if k not in ignored_traits}
def get_anywidget_model_id(widget: AnyWidget) -> WidgetModelId:
"""Get the model_id of an AnyWidget."""
model_id = getattr(widget, "_model_id", None)
if not model_id:
raise RuntimeError("Widget model_id is not set")
return WidgetModelId(model_id)
@mddoc
class anywidget(UIElement[WireFormat, T]):
class anywidget(UIElement[ModelIdRef, AnyWidgetState]):
"""Create a UIElement from an AnyWidget.

@@ -176,71 +174,19 @@

# Get state with custom serializers properly applied
state: dict[str, Any] = widget.get_state()
_state_no_buffers, buffer_paths, buffers = extract_buffer_paths(state)
js: str = getattr(widget, "_esm", "") # type: ignore [unused-ignore]
css: str = getattr(widget, "_css", "") # type: ignore [unused-ignore]
# Remove widget-specific system traits not needed for the frontend
ignored_traits = [
"comm",
"layout",
"log",
"tabbable",
"tooltip",
"keys",
"_esm",
"_css",
"_anywidget_id",
"_msg_callbacks",
"_dom_classes",
"_model_module",
"_model_module_version",
"_model_name",
"_property_lock",
"_states_to_send",
"_view_count",
"_view_module",
"_view_module_version",
"_view_name",
]
js_hash = hash_code(js)
# Filter out system traits from the serialized state
# This should include the binary data,
# see marimo/_smoke_tests/issues/2366-anywidget-binary.py
json_args: T = {
k: v for k, v in state.items() if k not in ignored_traits
}
# Trigger comm initialization early to ensure _model_id is set
_ = widget.comm
js: str = widget._esm if hasattr(widget, "_esm") else "" # type: ignore [unused-ignore] # noqa: E501
css: str = widget._css if hasattr(widget, "_css") else "" # type: ignore [unused-ignore] # noqa: E501
# Get the model_id from the widget (should always be set after comm init)
model_id = get_anywidget_model_id(widget)
def on_change(change: dict[str, Any]) -> None:
# Decode wire format to plain state with bytes
state = decode_from_wire(change)
# Only update traits that have actually changed
current_state: dict[str, Any] = widget.get_state()
changed_state: dict[str, Any] = {}
for k, v in state.items():
if k not in current_state:
changed_state[k] = v
elif current_state[k] != v:
changed_state[k] = v
if changed_state:
widget.set_state(changed_state)
js_hash: str = hashlib.md5(
js.encode("utf-8"), usedforsecurity=False
).hexdigest()
# Store plain state with bytes for merging
self._prev_state = json_args
# Initial value is wire format: { state, bufferPaths, buffers }
initial_wire = encode_to_wire(json_args)
# Initial value is just the model_id reference
# The frontend retrieves the actual state from the 'open' message
super().__init__(
component_name="marimo-anywidget",
initial_value=initial_wire,
label="",
initial_value=ModelIdRef(model_id=model_id),
label=None,
args={

@@ -251,10 +197,3 @@ "js-url": mo_data.js(js).url if js else "", # type: ignore [unused-ignore] # noqa: E501

},
on_change=on_change,
functions=(
Function(
name="send_to_widget",
arg_cls=SendToWidgetArgs,
function=self._receive_from_frontend,
),
),
on_change=None,
)

@@ -264,3 +203,3 @@

self,
initialization_args: InitializationArgs[WireFormat, dict[str, Any]],
initialization_args: InitializationArgs[ModelIdRef, AnyWidgetState],
) -> None:

@@ -273,43 +212,26 @@ super()._initialize(initialization_args)

def _receive_from_frontend(self, args: SendToWidgetArgs) -> None:
state = decode_from_wire(
WireFormat(
state=args.content.get("state", {}),
bufferPaths=args.content.get("bufferPaths", []),
buffers=args.buffers or [],
)
)
self.widget._handle_custom_msg(state, args.buffers)
def _convert_value(
self, value: ModelIdRef | AnyWidgetState
) -> AnyWidgetState:
if not isinstance(value, dict):
raise ValueError(f"Expected dict, got {type(value)}")
def _convert_value(self, value: WireFormat) -> T:
if isinstance(value, dict) and isinstance(self._prev_state, dict):
# Decode wire format to plain state with bytes
decoded_state = decode_from_wire(value)
# Check if this is a ModelIdRef (initial value from frontend)
model_id = value.get("model_id")
if model_id and len(value) == 1:
# Initial value - just return empty, the widget manages its own state
return {}
# Merge with previous state
merged = {**self._prev_state, **decoded_state}
self._prev_state = merged
# Otherwise, it's a state update from the frontend
# Update the widget's state
self.widget.set_state(value)
return cast(AnyWidgetState, value)
# Encode back to wire format for frontend
# NB: This needs to be the wire format to work
# although the types say it should be the plain state,
# otherwise the frontend loses some information
return cast(T, encode_to_wire(merged))
LOGGER.warning(
f"Expected anywidget value to be a dict, got {type(value)}"
)
self._prev_state = value
return cast(T, value)
@property
def value(self) -> T:
def value(self) -> AnyWidgetState:
"""The element's current value as a plain dictionary (wire format decoded)."""
# Get the internal value (which is in wire format)
internal_value = super().value
# Decode it to plain state for user-facing code
return decode_from_wire(internal_value) # type: ignore[return-value]
return get_anywidget_state(self.widget)
@value.setter
def value(self, value: T) -> None:
def value(self, value: AnyWidgetState) -> None:
del value

@@ -316,0 +238,0 @@ raise RuntimeError("Setting the value of a UIElement is not allowed.")

@@ -69,2 +69,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._utils.hashable import is_hashable
from marimo._utils.methods import getcallable
from marimo._utils.narwhals_utils import (

@@ -1488,4 +1489,4 @@ can_narwhalify_lazyframe,

# useful for rendering in the GitHub viewer.
repr_html = getattr(df, "_repr_html_", None)
if repr_html is not None and callable(repr_html):
repr_html = getcallable(df, "_repr_html_")
if repr_html is not None:
return ("text/html", cast(str, repr_html()))

@@ -1492,0 +1493,0 @@ return ("text/html", str(df))

@@ -38,2 +38,37 @@ # Copyright 2026 Marimo. All rights reserved.

def _trivial_range_index(index: pd.Index) -> bool:
import pandas as pd
# A trivial index is an unnamed RangeIndex (0, 1, 2, ...)
return isinstance(index, pd.RangeIndex) and index.name is None
def _resolve_index_column_conflicts(df: pd.DataFrame) -> pd.DataFrame:
"""Rename index names that conflict with column names by appending '_index'.
Avoids 'ValueError: cannot insert x, already exists' on reset_index().
Modifies the DataFrame in-place and returns it.
"""
import pandas as pd
index_names = df.index.names
conflicting_names = set(index_names) & set(df.columns)
if not conflicting_names:
return df
new_names: list[str] = []
for name in index_names:
if name in conflicting_names:
new_names.append(f"{name}_index")
else:
new_names.append(str(name))
if isinstance(df.index, pd.MultiIndex):
df.index = df.index.set_names(new_names)
else:
df.index = df.index.rename(new_names[0])
return df
def _maybe_convert_geopandas_to_pandas(data: pd.DataFrame) -> pd.DataFrame:

@@ -160,8 +195,4 @@ # Convert to pandas dataframe since geopandas will fail on

isinstance(result.index, pd.Index)
and not (
isinstance(result.index, pd.RangeIndex)
and result.index.name is None
)
and not _trivial_range_index(result.index)
):
index_names = result.index.names
unnamed_indexes = any(

@@ -173,23 +204,5 @@ idx is None for idx in result.index.names

# Check for name conflicts between index names and column names
# to avoid "cannot insert x, already exists" error
conflicting_names = set(index_names) & set(result.columns)
if conflicting_names:
# Create new names, handling None values
new_names: list[str] = []
for name in result.index.names:
if name in conflicting_names:
new_names.append(f"{name}_index")
else:
new_names.append(str(name))
_resolve_index_column_conflicts(result)
index_names = result.index.names
# Rename the index to avoid conflict
if isinstance(result.index, pd.MultiIndex):
result.index = result.index.set_names(new_names)
else:
result.index = result.index.rename(new_names[0])
# Update index_names to reflect the rename
index_names = result.index.names
result = result.reset_index()

@@ -302,2 +315,38 @@

def _has_non_trivial_index(self) -> bool:
"""Check if the DataFrame has a non-trivial index that should be searched."""
index = self._original_data.index
return not _trivial_range_index(index)
def search(self, query: str) -> PandasTableManager:
# If there's a non-trivial index, include it in the search
# by resetting the index first
if self._has_non_trivial_index():
index = self._original_data.index
num_levels = index.nlevels
original_names = list(index.names)
working = self._original_data.copy()
_resolve_index_column_conflicts(working)
df_with_index = working.reset_index()
manager = PandasTableManager(df_with_index)
# Get index column names AFTER manager init, since
# _handle_non_string_column_names may have converted
# non-string column names to strings
index_columns = list(
manager._original_data.columns[:num_levels]
)
result = super(PandasTableManager, manager).search(query)
native_df: pd.DataFrame = nw.to_native(result.data)
# Restore the original index structure
native_df = native_df.set_index(index_columns)
native_df.index.names = original_names
return PandasTableManager(native_df)
result = super().search(query)
native_df = nw.to_native(result.data)
return PandasTableManager(native_df)
@staticmethod

@@ -311,3 +360,3 @@ def is_type(value: Any) -> bool:

# Ignore if it's the default index with no name
if index.name is None and isinstance(index, pd.RangeIndex):
if _trivial_range_index(index):
return []

@@ -372,3 +421,3 @@

return ("string", dtype)
if lower_dtype == "string":
if lower_dtype == "string" or lower_dtype == "str":
return ("string", dtype)

@@ -375,0 +424,0 @@ if lower_dtype.startswith("complex"):

@@ -38,2 +38,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._runtime.marimo_pdb import MarimoPdb
from marimo._runtime.runner.hooks_post_execution import render_toplevel_defs
from marimo._runtime.runtime import Kernel

@@ -449,2 +450,5 @@ from marimo._runtime.utils.set_ui_element_request_manager import (

# Run mode kernels do not need additional rendering for toplevel defs
render_hook = render_toplevel_defs if is_edit_mode else None
def _enqueue_control_request(req: CommandMessage) -> None:

@@ -470,2 +474,3 @@ control_queue.put_nowait(req)

user_config=user_config,
render_hook=render_hook,
)

@@ -472,0 +477,0 @@ ctx = initialize_kernel_context(

@@ -683,7 +683,7 @@ # Copyright 2026 Marimo. All rights reserved.

class ModelMessage(msgspec.Struct, rename="camel"):
class ModelUpdateMessage(
msgspec.Struct, tag="update", tag_field="method", rename="camel"
):
"""Widget model state update message.
State changes for anywidget models, including state dict and binary buffer paths.
Attributes:

@@ -697,12 +697,44 @@ state: Model state updates.

def into_comm_payload_content(self) -> dict[str, Any]:
return {
"data": {
"method": "update",
"state": self.state,
"buffer_paths": self.buffer_paths,
}
}
class UpdateWidgetModelCommand(Command):
"""Update anywidget model state.
Updates widget model state for bidirectional Python-JavaScript communication.
class ModelCustomMessage(
msgspec.Struct, tag="custom", tag_field="method", rename="camel"
):
"""Custom widget message.
Attributes:
content: Arbitrary content for the custom message.
"""
content: Any
def into_comm_payload_content(self) -> dict[str, Any]:
return {
"data": {
"method": "custom",
"content": self.content,
}
}
ModelMessage = Union[ModelUpdateMessage, ModelCustomMessage]
class ModelCommand(Command):
"""Widget model message command.
Handles widget model communication between frontend and backend.
Attributes:
model_id: Widget model identifier.
message: Model message with state updates and buffer paths.
buffers: Base64-encoded binary buffers referenced by buffer_paths.
message: Model message (update or custom).
buffers: Base64-encoded binary buffers.
"""

@@ -712,5 +744,11 @@

message: ModelMessage
buffers: Optional[list[str]] = None
buffers: list[bytes]
def into_comm_payload(self) -> dict[str, Any]:
return {
"content": self.message.into_comm_payload_content(),
"buffers": self.buffers,
}
class RefreshSecretsCommand(Command):

@@ -761,3 +799,3 @@ """Refresh secrets from the secrets store.

UpdateUIElementCommand,
UpdateWidgetModelCommand,
ModelCommand,
InvokeFunctionCommand,

@@ -764,0 +802,0 @@ # User/configuration operations

# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
from typing import Optional
from marimo._runtime.packages.module_name_to_conda_name import (

@@ -26,6 +28,6 @@ module_name_to_conda_name,

def install_command(
self, package: str, *, upgrade: bool, dev: bool
self, package: str, *, upgrade: bool, group: Optional[str] = None
) -> list[str]:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
return [

@@ -37,5 +39,7 @@ "pixi",

async def uninstall(self, package: str, dev: bool = False) -> bool:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
async def uninstall(
self, package: str, group: Optional[str] = None
) -> bool:
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
return await self.run(

@@ -42,0 +46,0 @@ ["pixi", "remove", *split_packages(package)], log_callback=None

@@ -22,2 +22,5 @@ # Copyright 2026 Marimo. All rights reserved.

# Default Python executable
PY_EXE = sys.executable
# Type alias for log callback function

@@ -62,3 +65,3 @@ LogCallback = Callable[[str], None]

def install_command(
self, package: str, *, upgrade: bool, dev: bool
self, package: str, *, upgrade: bool, group: Optional[str] = None
) -> list[str]:

@@ -79,3 +82,3 @@ """

upgrade: bool,
dev: bool,
group: Optional[str] = None,
log_callback: Optional[LogCallback] = None,

@@ -85,3 +88,3 @@ ) -> bool:

return await self.run(
self.install_command(package, upgrade=upgrade, dev=dev),
self.install_command(package, upgrade=upgrade, group=group),
log_callback=log_callback,

@@ -95,3 +98,3 @@ )

upgrade: bool = False,
dev: bool = False,
group: Optional[str] = None,
log_callback: Optional[LogCallback] = None,

@@ -105,3 +108,3 @@ ) -> bool:

upgrade: Whether to upgrade the package if already installed
dev: Whether to install as a dev dependency (for uv projects)
group: Dependency group (for uv projects)
log_callback: Optional callback to receive log output during installation

@@ -115,3 +118,3 @@

upgrade=upgrade,
dev=dev,
group=group,
log_callback=log_callback,

@@ -121,3 +124,5 @@ )

@abc.abstractmethod
async def uninstall(self, package: str, dev: bool) -> bool:
async def uninstall(
self, package: str, group: Optional[str] = None
) -> bool:
"""Attempt to uninstall a package

@@ -127,3 +132,3 @@

package: The package to uninstall
dev: Whether this is a dev dependency
group: dependency group

@@ -254,6 +259,9 @@ Returns True if the package was uninstalled, else False.

def __init__(self) -> None:
def __init__(self, python_exe: str | None = None) -> None:
# Initialized lazily
self._module_name_to_repo_name: dict[str, str] | None = None
self._repo_name_to_module_name: dict[str, str] | None = None
# Python executable for targeting a specific venv (used by pip/uv)
# Defaults to sys.executable if not provided
self._python_exe = python_exe or PY_EXE
super().__init__()

@@ -260,0 +268,0 @@

@@ -25,3 +25,5 @@ # Copyright 2026 Marimo. All rights reserved.

def create_package_manager(name: str) -> PackageManager:
def create_package_manager(
name: str, python_exe: str | None = None
) -> PackageManager:
if is_pyodide():

@@ -32,3 +34,3 @@ # user config has name "pip", but micropip's name is "micropip" ...

if name in PACKAGE_MANAGERS:
return PACKAGE_MANAGERS[name]() # type:ignore[abstract]
return PACKAGE_MANAGERS[name](python_exe=python_exe) # type:ignore[abstract]
raise RuntimeError(

@@ -35,0 +37,0 @@ f"Unknown package manager {name}. "

@@ -124,10 +124,10 @@ # Copyright 2026 Marimo. All rights reserved.

def install_command(
self, package: str, *, upgrade: bool, dev: bool
self, package: str, *, upgrade: bool, group: Optional[str] = None
) -> list[str]:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
return [
"pip",
"--python",
PY_EXE,
self._python_exe,
"install",

@@ -138,5 +138,7 @@ *(["--upgrade"] if upgrade else []),

async def uninstall(self, package: str, dev: bool) -> bool:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
async def uninstall(
self, package: str, group: Optional[str] = None
) -> bool:
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
LOGGER.info(f"Uninstalling {package} with pip")

@@ -147,3 +149,3 @@ return await self.run(

"--python",
PY_EXE,
self._python_exe,
"uninstall",

@@ -157,3 +159,9 @@ "-y",

def list_packages(self) -> list[PackageDescription]:
cmd = ["pip", "--python", PY_EXE, "list", "--format=json"]
cmd = [
"pip",
"--python",
self._python_exe,
"list",
"--format=json",
]
return self._list_packages_from_cmd(cmd)

@@ -179,7 +187,7 @@

upgrade: bool,
dev: bool,
group: Optional[str] = None,
log_callback: Optional[LogCallback] = None,
) -> bool:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
assert is_pyodide()

@@ -208,5 +216,7 @@ import micropip # type: ignore

async def uninstall(self, package: str, dev: bool) -> bool:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
async def uninstall(
self, package: str, group: Optional[str] = None
) -> bool:
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
assert is_pyodide()

@@ -262,3 +272,3 @@ import micropip # type: ignore

def install_command(
self, package: str, *, upgrade: bool, dev: bool = False
self, package: str, *, upgrade: bool, group: Optional[str] = None
) -> list[str]:

@@ -268,4 +278,4 @@ install_cmd: list[str]

install_cmd = [self._uv_bin, "add"]
if dev:
install_cmd.append("--dev")
if group:
install_cmd.extend(["--group", group])
else:

@@ -287,3 +297,3 @@ install_cmd = [self._uv_bin, "pip", "install"]

"-p",
PY_EXE,
self._python_exe,
]

@@ -296,3 +306,3 @@

upgrade: bool,
dev: bool,
group: Optional[str] = None,
log_callback: Optional[LogCallback] = None,

@@ -310,3 +320,3 @@ ) -> bool:

upgrade=upgrade,
dev=dev,
group=group,
log_callback=log_callback,

@@ -316,3 +326,3 @@ )

# For uv pip install, try with output capture to enable fallback
cmd = self.install_command(package, upgrade=upgrade, dev=dev)
cmd = self.install_command(package, upgrade=upgrade, group=group)

@@ -587,3 +597,5 @@ LOGGER.info(f"Running command: {cmd}")

async def uninstall(self, package: str, dev: bool = False) -> bool:
async def uninstall(
self, package: str, group: Optional[str] = None
) -> bool:
uninstall_cmd: list[str]

@@ -593,4 +605,4 @@ if self.is_in_uv_project:

uninstall_cmd = [self._uv_bin, "remove"]
if dev:
uninstall_cmd.append("--dev")
if group:
uninstall_cmd.extend(["--group", group])
else:

@@ -601,3 +613,3 @@ LOGGER.info(f"Uninstalling {package} with 'uv pip uninstall'")

return await self.run(
uninstall_cmd + [*split_packages(package), "-p", PY_EXE],
uninstall_cmd + [*split_packages(package), "-p", self._python_exe],
log_callback=None,

@@ -628,3 +640,10 @@ )

LOGGER.info("Listing packages with 'uv pip list'")
cmd = [self._uv_bin, "pip", "list", "--format=json", "-p", PY_EXE]
cmd = [
self._uv_bin,
"pip",
"list",
"--format=json",
"-p",
self._python_exe,
]
return self._list_packages_from_cmd(cmd)

@@ -684,6 +703,6 @@

def install_command(
self, package: str, *, upgrade: bool, dev: bool
self, package: str, *, upgrade: bool, group: Optional[str] = None
) -> list[str]:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
return [

@@ -695,5 +714,7 @@ "rye",

async def uninstall(self, package: str, dev: bool) -> bool:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
async def uninstall(
self, package: str, group: Optional[str] = None
) -> bool:
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
return await self.run(

@@ -723,6 +744,6 @@ ["rye", "remove", *split_packages(package)], log_callback=None

def install_command(
self, package: str, *, upgrade: bool, dev: bool
self, package: str, *, upgrade: bool, group: Optional[str] = None
) -> list[str]:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
return [

@@ -735,5 +756,7 @@ "poetry",

async def uninstall(self, package: str, dev: bool) -> bool:
# The `dev` parameter is accepted for interface compatibility, but is ignored.
del dev
async def uninstall(
self, package: str, group: Optional[str] = None
) -> bool:
# The `group` parameter is accepted for interface compatibility, but is ignored.
del group
return await self.run(

@@ -740,0 +763,0 @@ ["poetry", "remove", "--no-interaction", *split_packages(package)],

@@ -355,2 +355,6 @@ # Copyright 2026 Marimo. All rights reserved.

"--code-highlight=no",
"-p",
"no:codecov", # Disable codecov plugin to avoid duplicate reports
"-p",
"no:sugar", # Disable sugar plugin to avoid duplicate reports
notebook_path,

@@ -357,0 +361,0 @@ ],

@@ -5,6 +5,9 @@ # Copyright 2026 Marimo. All rights reserved.

import sys
from typing import Protocol
from typing import TYPE_CHECKING, Protocol
from marimo._utils.platform import is_pyodide
if TYPE_CHECKING:
from collections.abc import Iterable
if not is_pyodide():

@@ -34,4 +37,9 @@ # the shared_memory module is not supported in the Pyodide distribution

def shutdown(self) -> None:
"""Clean up all storage resources."""
def shutdown(self, keys: Iterable[str] | None = None) -> None:
"""Clean up storage resources.
Args:
keys: If provided, only remove these keys. If None, clear all.
Implementations may ignore this if storage is not shared.
"""
...

@@ -43,3 +51,8 @@

@property
def stale(self) -> bool:
"""Whether storage has been fully shut down and is no longer usable."""
...
class SharedMemoryStorage(VirtualFileStorage):

@@ -54,3 +67,8 @@ """Storage backend using multiprocessing shared memory.

self._shutting_down = False
self._stale = False
@property
def stale(self) -> bool:
return self._stale
def store(self, key: str, buffer: bytes) -> None:

@@ -114,3 +132,4 @@ if key in self._storage:

def shutdown(self) -> None:
def shutdown(self, keys: Iterable[str] | None = None) -> None:
del keys # Always clear all - not shared
if self._shutting_down:

@@ -126,2 +145,3 @@ return

finally:
self._stale = True
self._shutting_down = False

@@ -142,2 +162,6 @@

@property
def stale(self) -> bool:
return False # Never stale - can be shared
def store(self, key: str, buffer: bytes) -> None:

@@ -155,4 +179,8 @@ self._storage[key] = buffer

def shutdown(self) -> None:
self._storage.clear()
def shutdown(self, keys: Iterable[str] | None = None) -> None:
if keys is not None:
for key in keys:
self.remove(key)
else:
self._storage.clear()

@@ -176,2 +204,4 @@ def has(self, key: str) -> bool:

def storage(self) -> VirtualFileStorage | None:
if self._storage is not None and self._storage.stale:
self._storage = None
return self._storage

@@ -178,0 +208,0 @@

@@ -185,3 +185,12 @@ # Copyright 2026 Marimo. All rights reserved.

# Set singleton reference for read_virtual_file()
VirtualFileStorageManager().storage = self.storage
manager = VirtualFileStorageManager()
if manager.storage is None:
# Not set yet, _or_ was stale
manager.storage = self.storage
elif self.storage is not manager.storage:
LOGGER.warning(
"Expected shared global storage but VirtualFileRegistry was initialized "
"with new storage instance. Overriding with global storage.",
)
self.storage = manager.storage

@@ -247,3 +256,3 @@ def __del__(self) -> None:

self.shutting_down = True
self.storage.shutdown()
self.storage.shutdown(keys=self.registry.keys())
self.registry.clear()

@@ -250,0 +259,0 @@ finally:

@@ -83,2 +83,4 @@ # Copyright 2026 Marimo. All rights reserved.

"_args",
"_kwonly_args",
"_defaults",
"_var_arg",

@@ -102,2 +104,4 @@ "_var_kwarg",

_args: list[str]
_kwonly_args: list[str]
_defaults: dict[str, Any]
_var_arg: Optional[str]

@@ -132,2 +136,5 @@ _var_kwarg: Optional[str]

self._last_hash = None
self._args: list[str] = []
self._kwonly_args: list[str] = []
self._defaults: dict[str, Any] = {}
self._var_arg = None

@@ -167,28 +174,25 @@ self._var_kwarg = None

sig = inspect.signature(fn)
self._args = [
param.name
for param in sig.parameters.values()
if param.kind
in (
self._args = []
self._kwonly_args = []
self._defaults = {}
self._var_arg = None
self._var_kwarg = None
for param in sig.parameters.values():
if param.kind in (
inspect.Parameter.POSITIONAL_OR_KEYWORD,
inspect.Parameter.POSITIONAL_ONLY,
)
]
self._var_arg = next(
(
param.name
for param in sig.parameters.values()
if param.kind == inspect.Parameter.VAR_POSITIONAL
),
None,
)
self._var_kwarg = next(
(
param.name
for param in sig.parameters.values()
if param.kind == inspect.Parameter.VAR_KEYWORD
),
None,
)
):
self._args.append(param.name)
elif param.kind == inspect.Parameter.KEYWORD_ONLY:
self._kwonly_args.append(param.name)
elif param.kind == inspect.Parameter.VAR_POSITIONAL:
self._var_arg = param.name
elif param.kind == inspect.Parameter.VAR_KEYWORD:
self._var_kwarg = param.name
if param.default is not inspect.Parameter.empty:
self._defaults[param.name] = param.default
# Retrieving frame from the stack: frame is

@@ -214,4 +218,6 @@ #

# For instance, the args of the invoked function are restricted to the
# block.
self.scoped_refs = set([f"{ARG_PREFIX}{k}" for k in self._args])
# block. Include both positional and keyword-only args.
self.scoped_refs = {
f"{ARG_PREFIX}{k}" for k in self._args + self._kwonly_args
}
# As are the "locals" not in globals

@@ -281,2 +287,11 @@ self.scoped_refs |= set(f_locals.keys()) - set(glbls.keys())

kwargs_copy = {f"{ARG_PREFIX}{k}": v for (k, v) in kwargs.items()}
# Fill in default values for arguments not explicitly provided
# This ensures cache hashes are based on resolved argument values
for arg_name, default_value in self._defaults.items():
prefixed_name = f"{ARG_PREFIX}{arg_name}"
if (
prefixed_name not in arg_dict
and prefixed_name not in kwargs_copy
):
arg_dict[prefixed_name] = default_value
# If the function has varargs, we need to capture them as well.

@@ -287,3 +302,7 @@ if self._var_arg is not None:

# NB: kwargs are always a dict, so we can just copy them.
arg_dict[f"{ARG_PREFIX}{self._var_kwarg}"] = kwargs.copy()
# Filter out keyword-only args since they're handled separately
filtered_kwargs = {
k: v for k, v in kwargs.items() if k not in self._kwonly_args
}
arg_dict[f"{ARG_PREFIX}{self._var_kwarg}"] = filtered_kwargs

@@ -319,3 +338,5 @@ # Capture the call case

scoped_refs=self.scoped_refs,
required_refs=set([f"{ARG_PREFIX}{k}" for k in self._args]),
required_refs={
f"{ARG_PREFIX}{k}" for k in self._args + self._kwonly_args
},
as_fn=True,

@@ -322,0 +343,0 @@ )

@@ -28,2 +28,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._dependencies.dependencies import Dependency, DependencyManager
from marimo._plugins.ui._impl.chat.chat import AI_SDK_VERSION
from marimo._server.ai.config import AnyProviderConfig

@@ -170,5 +171,13 @@ from marimo._server.ai.ids import AiModelId

vercel_adapter = self.get_vercel_adapter()
adapter = vercel_adapter(
agent=agent, run_input=run_input, accept=stream_options.accept
)
if DependencyManager.pydantic_ai.has_at_version(min_version="1.52.0"):
adapter = vercel_adapter(
agent=agent,
run_input=run_input,
accept=stream_options.accept,
sdk_version=AI_SDK_VERSION,
)
else:
adapter = vercel_adapter(
agent=agent, run_input=run_input, accept=stream_options.accept
)
event_stream = adapter.run_stream()

@@ -175,0 +184,0 @@ return adapter.streaming_response(event_stream)

# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
from marimo._utils.uv_tree import DependencyTreeNode
from marimo._utils.uv_tree import DependencyTag, DependencyTreeNode

@@ -53,3 +53,3 @@

# tags (extras/groups)
tags: list[dict[str, str]] = []
tags: list[DependencyTag] = []
while "(extra:" in content or "(group:" in content:

@@ -69,3 +69,3 @@ start = (

assert kind == "extra" or kind == "group"
tags.append({"kind": kind, "value": value.strip()})
tags.append(DependencyTag(kind=kind, value=value.strip()))
content = content[:start].strip()

@@ -77,3 +77,3 @@

if is_cycle:
tags.append({"kind": "cycle", "value": "true"})
tags.append(DependencyTag(kind="cycle", value="true"))

@@ -80,0 +80,0 @@ node = DependencyTreeNode(

@@ -11,3 +11,8 @@ # Copyright 2026 Marimo. All rights reserved.

from starlette.exceptions import HTTPException
from starlette.responses import FileResponse, HTMLResponse, Response
from starlette.responses import (
FileResponse,
HTMLResponse,
RedirectResponse,
Response,
)
from starlette.staticfiles import StaticFiles

@@ -28,2 +33,3 @@

)
from marimo._session.model import SessionMode
from marimo._utils.async_path import AsyncPath

@@ -79,2 +85,85 @@ from marimo._utils.paths import marimo_package_path, normalize_path

@router.get("/og/thumbnail", include_in_schema=False)
@requires("read")
def og_thumbnail(*, request: Request) -> Response:
"""Serve a notebook thumbnail for gallery/OpenGraph use."""
from pathlib import Path
from marimo._metadata.opengraph import (
DEFAULT_OPENGRAPH_PLACEHOLDER_IMAGE_GENERATOR,
OpenGraphContext,
is_https_url,
resolve_opengraph_metadata,
)
from marimo._utils.http import HTTPException, HTTPStatus
from marimo._utils.paths import normalize_path
app_state = AppState(request)
file_key = (
app_state.query_params(FILE_QUERY_PARAM_KEY)
or app_state.session_manager.file_router.get_unique_file_key()
)
if not file_key:
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="File not found"
)
notebook_path = app_state.session_manager.file_router.resolve_file_path(
file_key
)
if notebook_path is None:
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="File not found"
)
notebook_dir = normalize_path(Path(notebook_path)).parent
marimo_dir = notebook_dir / "__marimo__"
# User-defined OpenGraph generators receive this context (file key, base URL, mode)
# so they can compute metadata dynamically for gallery cards, social previews, and other modes.
opengraph = resolve_opengraph_metadata(
notebook_path,
context=OpenGraphContext(
filepath=notebook_path,
file_key=file_key,
base_url=app_state.base_url,
mode=app_state.mode.value,
),
)
title = opengraph.title or "marimo"
image = opengraph.image
validator = PathValidator()
if image:
if is_https_url(image):
return RedirectResponse(
url=image,
status_code=307,
headers={"Cache-Control": "max-age=3600"},
)
rel_path = Path(image)
if not rel_path.is_absolute():
file_path = normalize_path(notebook_dir / rel_path)
# Only allow serving from the notebook's __marimo__ directory.
try:
if file_path.is_file():
validator.validate_inside_directory(marimo_dir, file_path)
return FileResponse(
file_path,
headers={"Cache-Control": "max-age=3600"},
)
except HTTPException:
# Treat invalid paths as a miss; fall back to placeholder.
pass
placeholder = DEFAULT_OPENGRAPH_PLACEHOLDER_IMAGE_GENERATOR(title)
return Response(
content=placeholder.content,
media_type=placeholder.media_type,
# Avoid caching placeholders so newly-generated screenshots show up immediately on refresh.
headers={"Cache-Control": "no-store"},
)
async def _fetch_index_html_from_url(asset_url: str) -> str:

@@ -113,4 +202,5 @@ """Fetch index.html from the given asset URL."""

file_key_from_query = app_state.query_params(FILE_QUERY_PARAM_KEY)
file_key = (
app_state.query_params(FILE_QUERY_PARAM_KEY)
file_key_from_query
or app_state.session_manager.file_router.get_unique_file_key()

@@ -143,2 +233,3 @@ )

server_token=app_state.skew_protection_token,
mode=app_state.mode,
asset_url=app_state.asset_url,

@@ -153,8 +244,11 @@ )

app_config = app_manager.app.config
absolute_filepath = app_manager.filename
# Pre-compute notebook snapshot for faster initial render
# Only in SandboxMode.MULTI where each notebook gets its own IPC kernel
# Only in EDIT + SandboxMode.MULTI where each notebook gets its own IPC
# kernel.
notebook_snapshot = None
if (
app_state.session_manager.sandbox_mode is SandboxMode.MULTI
and app_state.mode == SessionMode.EDIT
and app_manager.filename

@@ -191,2 +285,3 @@ ):

filename=filename,
filepath=absolute_filepath,
mode=app_state.mode,

@@ -193,0 +288,0 @@ notebook_snapshot=notebook_snapshot,

@@ -28,5 +28,5 @@ # Copyright 2026 Marimo. All rights reserved.

InvokeFunctionRequest,
ModelRequest,
SuccessResponse,
UpdateUIElementValuesRequest,
UpdateWidgetModelRequest,
)

@@ -102,3 +102,3 @@ from marimo._server.router import APIRouter

schema:
$ref: "#/components/schemas/UpdateWidgetModelRequest"
$ref: "#/components/schemas/ModelRequest"
responses:

@@ -112,3 +112,3 @@ 200:

"""
return await dispatch_control_request(request, UpdateWidgetModelRequest)
return await dispatch_control_request(request, ModelRequest)

@@ -115,0 +115,0 @@

@@ -18,3 +18,5 @@ # Copyright 2026 Marimo. All rights reserved.

LazyListOfFilesAppFileRouter,
ListOfFilesAppFileRouter,
count_files,
flatten_files,
)

@@ -32,3 +34,3 @@ from marimo._server.files.directory_scanner import DirectoryScanner

from marimo._server.router import APIRouter
from marimo._session.model import ConnectionState
from marimo._session.model import ConnectionState, SessionMode
from marimo._tutorials import create_temp_tutorial_file # type: ignore

@@ -74,3 +76,3 @@ from marimo._utils.paths import pretty_path

@router.post("/workspace_files")
@requires("edit")
@requires("read")
async def workspace_files(

@@ -95,4 +97,61 @@ *,

body = await parse_request(request, cls=WorkspaceFilesRequest)
session_manager = AppState(request).session_manager
app_state = AppState(request)
session_manager = app_state.session_manager
if session_manager.mode == SessionMode.RUN:
from marimo._metadata.opengraph import (
OpenGraphContext,
resolve_opengraph_metadata,
)
from marimo._server.models.files import FileInfo
base_url = app_state.base_url
mode = session_manager.mode.value
def get_files_with_metadata() -> list[FileInfo]:
files = session_manager.file_router.files
marimo_files = [
file for file in flatten_files(files) if file.is_marimo_file
]
result: list[FileInfo] = []
for file in marimo_files:
resolved_path = session_manager.file_router.resolve_file_path(
file.path
)
opengraph = None
if resolved_path is not None:
# User-defined OpenGraph generators receive this context for dynamic metadata
opengraph = resolve_opengraph_metadata(
resolved_path,
context=OpenGraphContext(
filepath=resolved_path,
file_key=file.path,
base_url=base_url,
mode=mode,
),
)
result.append(
FileInfo(
id=file.id,
path=file.path,
name=file.name,
is_directory=file.is_directory,
is_marimo_file=file.is_marimo_file,
last_modified=file.last_modified,
children=file.children,
opengraph=opengraph,
)
)
return result
marimo_files = await asyncio.to_thread(get_files_with_metadata)
file_count = len(marimo_files)
has_more = file_count >= MAX_FILES
return WorkspaceFilesResponse(
files=marimo_files,
root=session_manager.file_router.directory or "",
has_more=has_more,
file_count=file_count,
)
# Maybe enable markdown

@@ -235,2 +294,8 @@ root = ""

app_state.session_manager.file_router.register_temp_dir(temp_dir.name)
elif isinstance(
app_state.session_manager.file_router, ListOfFilesAppFileRouter
):
app_state.session_manager.file_router.register_allowed_file(
path.absolute_name
)

@@ -237,0 +302,0 @@ return MarimoFile(

@@ -59,5 +59,5 @@ # Copyright 2026 Marimo. All rights reserved.

upgrade = body.upgrade or False
dev = body.dev or False
group = body.group or None
success = await package_manager.install(
body.package, version=None, upgrade=upgrade, dev=dev
body.package, version=None, upgrade=upgrade, group=group
)

@@ -111,4 +111,4 @@

dev = body.dev or False
success = await package_manager.uninstall(body.package, dev=dev)
group = body.group or None
success = await package_manager.uninstall(body.package, group=group)

@@ -185,3 +185,4 @@ # Update the script metadata

def _get_package_manager(request: Request) -> PackageManager:
if not AppState(request).get_current_session():
session = AppState(request).get_current_session()
if not session:
return create_package_manager(

@@ -192,5 +193,18 @@ AppState(request).config_manager.package_manager

config_manager = AppState(request).app_config_manager
return create_package_manager(config_manager.package_manager)
# Check if IPC mode - use kernel's venv Python
python_exe: str | None = None
from marimo._session.managers.ipc import IPCKernelManagerImpl
from marimo._session.session import SessionImpl
if isinstance(session, SessionImpl):
kernel_manager = session._kernel_manager
if isinstance(kernel_manager, IPCKernelManagerImpl):
python_exe = kernel_manager.venv_python
return create_package_manager(
config_manager.package_manager, python_exe=python_exe
)
def _get_filename(request: Request) -> Optional[str]:

@@ -197,0 +211,0 @@ session = AppState(request).get_current_session()

@@ -16,3 +16,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._cli.print import echo
from marimo._config.config import RuntimeConfig
from marimo._config.config import DisplayConfig, RuntimeConfig
from marimo._config.manager import (

@@ -249,2 +249,4 @@ get_default_config_manager,

argv: list[str],
*,
asset_url: str | None = None,
) -> ExportResult:

@@ -261,2 +263,3 @@ # Create a file router and file manager

config = get_default_config_manager(current_path=file_manager.path)
display_config = cast(DisplayConfig, config.get_config()["display"])
session_view, did_error = await run_app_until_completion(

@@ -272,3 +275,3 @@ file_manager,

session_view=session_view,
display_config=config.get_config()["display"],
display_config=display_config,
request=ExportAsHTMLRequest(

@@ -278,2 +281,3 @@ include_code=include_code,

files=[],
asset_url=asset_url,
),

@@ -288,2 +292,49 @@ )

async def export_as_html_without_execution(
path: MarimoPath,
include_code: bool,
*,
asset_url: str | None = None,
) -> ExportResult:
"""Export a notebook to HTML without executing its cells."""
from marimo._session.state.session_view import SessionView
file_router = AppFileRouter.from_filename(path)
file_key = file_router.get_unique_file_key()
if file_key is None:
raise RuntimeError(
"Expected a unique file key when exporting a single notebook: "
f"{path.absolute_name}"
)
file_manager = file_router.get_file_manager(file_key)
# Inline the layout file, if it exists.
file_manager.app.inline_layout_file()
view = SessionView()
for cell_data in file_manager.app.cell_manager.cell_data():
view.last_executed_code[cell_data.cell_id] = cell_data.code
config = get_default_config_manager(current_path=file_manager.path)
display_config = cast(DisplayConfig, config.get_config()["display"])
html, filename = Exporter().export_as_html(
filename=file_manager.filename,
app=file_manager.app,
session_view=view,
display_config=display_config,
request=ExportAsHTMLRequest(
include_code=include_code,
download=False,
files=[],
asset_url=asset_url,
),
)
return ExportResult(
contents=html,
download_filename=filename,
did_error=False,
)
async def run_app_then_export_as_reactive_html(

@@ -290,0 +341,0 @@ path: MarimoPath,

@@ -322,3 +322,3 @@ # Copyright 2026 Marimo. All rights reserved.

webpdf: If False, tries standard PDF export (pandoc + TeX) first,
falling back to webpdf if deps are not installed. If True, uses webpdf
falling back to webpdf on failure. If True, uses webpdf
directly.

@@ -329,2 +329,6 @@

"""
# We check for all dependencies upfront since standard export failing
# falls back to webpdf (which requires playwright).
# We don't want users to reinstall again after the first failure.
# Webpdf is generally more resilient to errors than standard export.
DependencyManager.require_many(

@@ -334,2 +338,3 @@ "for PDF export",

DependencyManager.nbconvert,
DependencyManager.playwright,
)

@@ -365,3 +370,2 @@

DependencyManager.playwright.require("for webpdf export")
from nbconvert import WebPDFExporter # type: ignore[import-not-found]

@@ -368,0 +372,0 @@

@@ -7,3 +7,3 @@ # Copyright 2026 Marimo. All rights reserved.

from pathlib import Path
from typing import Optional
from typing import TYPE_CHECKING, Optional

@@ -19,3 +19,7 @@ from marimo import _loggers

from marimo._utils.marimo_path import MarimoPath
from marimo._utils.paths import normalize_path
if TYPE_CHECKING:
from collections.abc import Iterator
LOGGER = _loggers.marimo_logger()

@@ -58,3 +62,3 @@

]
return ListOfFilesAppFileRouter(files)
return ListOfFilesAppFileRouter(files, allow_dynamic=True)

@@ -66,4 +70,15 @@ @staticmethod

@staticmethod
def from_files(files: list[MarimoFile]) -> AppFileRouter:
return ListOfFilesAppFileRouter(files)
def from_files(
files: list[MarimoFile],
*,
directory: str | None = None,
allow_single_file_key: bool = True,
allow_dynamic: bool = False,
) -> AppFileRouter:
return ListOfFilesAppFileRouter(
files,
directory=directory,
allow_single_file_key=allow_single_file_key,
allow_dynamic=allow_dynamic,
)

@@ -103,2 +118,20 @@ @staticmethod

def resolve_file_path(self, key: MarimoFileKey) -> str | None:
"""Resolve a file key to an absolute file path, without loading the app.
This is useful for endpoints that need file-backed resources (e.g. thumbnails)
without the overhead of parsing/loading a notebook.
Returns:
Absolute file path if resolvable, otherwise None (e.g. new file).
"""
if key.startswith(AppFileRouter.NEW_FILE):
return None
if os.path.exists(key):
return key
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND,
detail=f"File {key} not found",
)
@abc.abstractmethod

@@ -140,6 +173,22 @@ def get_unique_file_key(self) -> Optional[MarimoFileKey]:

class ListOfFilesAppFileRouter(AppFileRouter):
def __init__(self, files: list[MarimoFile]) -> None:
def __init__(
self,
files: list[MarimoFile],
directory: str | None = None,
allow_single_file_key: bool = True,
allow_dynamic: bool = False,
) -> None:
self._files = files
self._directory = directory
self._allow_single_file_key = allow_single_file_key
self._allow_dynamic = allow_dynamic
self._allowed_paths = {
MarimoPath(file.path).absolute_name for file in files
}
@property
def directory(self) -> str | None:
return self._directory
@property
def files(self) -> list[FileInfo]:

@@ -158,18 +207,64 @@ return [

def get_file_manager(
self,
key: MarimoFileKey,
defaults: Optional[AppDefaults] = None,
) -> AppFileManager:
defaults = defaults or AppDefaults()
resolved_path = self.resolve_file_path(key)
if resolved_path is None:
return AppFileManager(None, defaults=defaults)
return AppFileManager(resolved_path, defaults=defaults)
def resolve_file_path(self, key: MarimoFileKey) -> str | None:
if key.startswith(AppFileRouter.NEW_FILE):
if self._allow_single_file_key:
return None
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND,
detail=f"File {key} not found",
)
filepath = Path(key)
if not filepath.is_absolute() and self._directory:
filepath = Path(self._directory) / filepath
normalized_path = normalize_path(filepath)
absolute_path = str(normalized_path)
if absolute_path not in self._allowed_paths:
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND,
detail=f"File {key} not found",
)
if normalized_path.exists():
return absolute_path
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND,
detail=f"File {key} not found",
)
def get_unique_file_key(self) -> Optional[MarimoFileKey]:
if len(self.files) == 1:
return self.files[0].path
if self._allow_single_file_key and len(self._files) == 1:
return self._files[0].path
return None
def maybe_get_single_file(self) -> Optional[MarimoFile]:
if len(self.files) == 1:
file = self.files[0]
return MarimoFile(
name=file.name,
path=file.path,
last_modified=file.last_modified,
)
if self._allow_single_file_key and len(self._files) == 1:
return self._files[0]
return None
def register_allowed_file(self, filepath: str) -> None:
"""Allow a file path in this router.
This extends the allowlist for files that were not part of the original
collection and may live outside the router's base directory (for
example, files created at runtime in a separate location).
"""
if not self._allow_dynamic:
return
self._allowed_paths.add(MarimoPath(filepath).absolute_name)
class LazyListOfFilesAppFileRouter(AppFileRouter):

@@ -237,5 +332,10 @@ def __init__(self, directory: str, include_markdown: bool) -> None:

defaults = defaults or AppDefaults()
resolved_path = self.resolve_file_path(key)
if resolved_path is None:
return AppFileManager(None, defaults=defaults)
return AppFileManager(resolved_path, defaults=defaults)
def resolve_file_path(self, key: MarimoFileKey) -> str | None:
if key.startswith(AppFileRouter.NEW_FILE):
return AppFileManager(None, defaults=defaults)
return None

@@ -262,3 +362,3 @@ directory = Path(self._directory)

if filepath.exists():
return AppFileManager(str(filepath), defaults=defaults)
return str(filepath)

@@ -303,1 +403,12 @@ raise HTTPException(

return count
def flatten_files(files: list[FileInfo]) -> Iterator[FileInfo]:
"""Iterate over files, skipping directories."""
stack = files.copy()
while stack:
file = stack.pop()
if file.is_directory:
stack.extend(file.children)
else:
yield file

@@ -8,2 +8,3 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._metadata.opengraph import OpenGraphMetadata
from marimo._server.models.models import BaseResponse

@@ -20,2 +21,3 @@

children: list[FileInfo] = msgspec.field(default_factory=list)
opengraph: OpenGraphMetadata | None = None

@@ -22,0 +24,0 @@

@@ -23,2 +23,3 @@ # Copyright 2026 Marimo. All rights reserved.

ListSQLTablesCommand,
ModelCommand,
PreviewDatasetColumnCommand,

@@ -29,3 +30,2 @@ PreviewSQLTableCommand,

UpdateUserConfigCommand,
UpdateWidgetModelCommand,
ValidateSQLCommand,

@@ -81,5 +81,5 @@ )

class UpdateWidgetModelRequest(UpdateWidgetModelCommand, tag=False):
def as_command(self) -> UpdateWidgetModelCommand:
return UpdateWidgetModelCommand(
class ModelRequest(ModelCommand, tag=False):
def as_command(self) -> ModelCommand:
return ModelCommand(
model_id=self.model_id,

@@ -86,0 +86,0 @@ message=self.message,

@@ -28,3 +28,3 @@ # Copyright 2026 Marimo. All rights reserved.

upgrade: Optional[bool] = False
dev: Optional[bool] = False
group: Optional[str] = None

@@ -34,3 +34,3 @@

package: str
dev: Optional[bool] = False
group: Optional[str] = None

@@ -37,0 +37,0 @@

@@ -153,2 +153,4 @@ # Copyright 2026 Marimo. All rights reserved.

"sql_mode",
"performant_table_charts",
"chat_modes",
}

@@ -155,0 +157,0 @@ keys = keys - finished_experiments

@@ -23,3 +23,8 @@ # Copyright 2026 Marimo. All rights reserved.

from marimo._server.app_defaults import AppDefaults
from marimo._server.file_router import AppFileRouter, MarimoFileKey
from marimo._server.file_router import (
AppFileRouter,
ListOfFilesAppFileRouter,
MarimoFileKey,
flatten_files,
)
from marimo._server.lsp import LspServer

@@ -100,5 +105,14 @@ from marimo._server.recents import RecentFilesManager

defaults = AppDefaults.from_config_manager(config_manager)
app = file_router.get_single_app_file_manager(defaults).app
return "".join(code for code in app.cell_manager.codes())
if file_router.get_unique_file_key() is not None:
app = file_router.get_single_app_file_manager(defaults).app
return "".join(code for code in app.cell_manager.codes())
files = list(flatten_files(file_router.files))
entries = [
f"{file.path}:{file.last_modified or 0.0}"
for file in files
if file.is_marimo_file
]
return "\n".join(sorted(entries))
source_code = None if mode == SessionMode.EDIT else _get_code()

@@ -142,2 +156,8 @@ self._token_manager = TokenManager(

defaults = AppDefaults.from_config_manager(self._config_manager)
if (
self.mode is SessionMode.EDIT
and isinstance(self.file_router, ListOfFilesAppFileRouter)
and not key.startswith(AppFileRouter.NEW_FILE)
):
self.file_router.register_allowed_file(key)
return self.file_router.get_file_manager(key, defaults)

@@ -163,2 +183,8 @@

defaults = AppDefaults.from_config_manager(self._config_manager)
if (
self.mode is SessionMode.EDIT
and isinstance(self.file_router, ListOfFilesAppFileRouter)
and not file_key.startswith(AppFileRouter.NEW_FILE)
):
self.file_router.register_allowed_file(file_key)
app_file_manager = self.file_router.get_file_manager(

@@ -165,0 +191,0 @@ file_key, defaults

@@ -48,3 +48,3 @@ # Copyright 2026 Marimo. All rights reserved.

filename: Optional[str],
mode: Literal["edit", "home", "read"],
mode: Literal["edit", "home", "read", "gallery"],
server_token: SkewProtectionToken,

@@ -104,2 +104,3 @@ user_config: MarimoConfig,

server_token: SkewProtectionToken,
mode: SessionMode,
asset_url: Optional[str] = None,

@@ -120,2 +121,5 @@ ) -> str:

app_mode: Literal["home", "gallery"] = (
"home" if mode == SessionMode.EDIT else "gallery"
)
html = html.replace(

@@ -125,3 +129,3 @@ MOUNT_CONFIG_TEMPLATE,

filename=None,
mode="home",
mode=app_mode,
server_token=server_token,

@@ -140,2 +144,72 @@ user_config=user_config,

def opengraph_metadata_template(
*,
base_url: str,
mode: SessionMode,
app_config: _AppConfig,
filename: Optional[str],
filepath: Optional[str],
) -> str:
"""Return OpenGraph `<meta>` tags for a notebook, or an empty string."""
if not filepath:
return ""
try:
from marimo._metadata.opengraph import (
OpenGraphContext,
is_https_url,
resolve_opengraph_metadata,
)
file_key = (
filename if filename and not Path(filename).is_absolute() else None
)
opengraph = resolve_opengraph_metadata(
filepath,
app_title=app_config.app_title,
context=OpenGraphContext(
filepath=filepath,
file_key=file_key,
base_url=base_url,
mode=mode.value,
),
)
except Exception:
return ""
if not opengraph.title and not opengraph.description:
return ""
if opengraph.image and is_https_url(opengraph.image):
thumbnail_url = opengraph.image
else:
# Server-resolvable thumbnail URL, falling back to a placeholder when
# no screenshot exists.
thumbnail_url = f"{base_url}/og/thumbnail"
if filename and not Path(filename).is_absolute():
thumbnail_url = (
f"{thumbnail_url}?file={uri_encode_component(filename)}"
)
meta_tags: list[str] = []
if opengraph.title:
meta_tags.append(
f'<meta property="og:title" content="{_html_escape(opengraph.title)}" />'
)
if opengraph.description:
meta_tags.append(
f'<meta property="og:description" content="{_html_escape(opengraph.description)}" />'
)
meta_tags.append(
f'<meta name="description" content="{_html_escape(opengraph.description)}" />'
)
meta_tags.append(
f'<meta property="og:image" content="{_html_escape(thumbnail_url)}" />'
)
meta_tags.append(
'<meta name="twitter:card" content="summary_large_image" />'
)
return "\n".join(meta_tags)
def notebook_page_template(

@@ -150,2 +224,3 @@ *,

filename: Optional[str],
filepath: Optional[str] = None,
mode: SessionMode,

@@ -161,8 +236,12 @@ session_snapshot: Optional[NotebookSessionV1] = None,

# with a view of the notebook.
if runtime_config and filename and notebook_snapshot is None:
filepath = Path(filename)
if filepath.exists():
notebook_snapshot = MarimoConvert.from_py(
filepath.read_text(encoding="utf-8")
).to_notebook_v1()
if runtime_config and notebook_snapshot is None:
# Prefer the absolute path for IO, since `filename` can be a display
# path (workspace-relative) in gallery mode.
path = filepath or filename
if path:
path_obj = Path(path)
if path_obj.exists():
notebook_snapshot = MarimoConvert.from_py(
path_obj.read_text(encoding="utf-8")
).to_notebook_v1()

@@ -204,2 +283,12 @@ html = html.replace("{{ filename }}", _html_escape(filename or ""))

opengraph_tags = opengraph_metadata_template(
base_url=base_url,
mode=mode,
app_config=app_config,
filename=filename,
filepath=filepath,
)
if opengraph_tags:
html = html.replace("</head>", f"{opengraph_tags}\n</head>")
# If has custom css, inline the css and add to the head

@@ -206,0 +295,0 @@ if app_config.css_file:

@@ -23,3 +23,18 @@ # Copyright 2026 Marimo. All rights reserved.

# Office document formats
# Ensures these mimetypes are available across all platforms
mimetypes.add_type(
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
".xlsx",
)
mimetypes.add_type(
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
".docx",
)
mimetypes.add_type(
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
".pptx",
)
def initialize_asyncio() -> None:

@@ -26,0 +41,0 @@ """Platform-specific initialization of asyncio.

@@ -162,2 +162,3 @@ # Copyright 2026 Marimo. All rights reserved.

self._sandbox_dir: str | None = None
self._venv_python: str | None = None

@@ -175,2 +176,3 @@ def start_kernel(self) -> None:

connection_info=self.connection_info,
is_run_mode=self.mode == SessionMode.RUN,
virtual_files_supported=self.virtual_files_supported,

@@ -264,2 +266,5 @@ redirect_console_to_browser=self.redirect_console_to_browser,

# Store the venv python for package manager targeting
self._venv_python = venv_python
cmd = [venv_python, "-m", "marimo._ipc.launch_kernel"]

@@ -327,2 +332,7 @@ if writable:

@property
def venv_python(self) -> str | None:
"""Python executable path for the kernel's venv."""
return self._venv_python
def is_alive(self) -> bool:

@@ -329,0 +339,0 @@ if self._process is None:

@@ -18,2 +18,3 @@ # Copyright 2026 Marimo. All rights reserved.

InterruptedNotification,
ModelLifecycleNotification,
NotificationMessage,

@@ -45,3 +46,3 @@ SQLTableListPreviewNotification,

from marimo._sql.engines.duckdb import INTERNAL_DUCKDB_ENGINE
from marimo._types.ids import CellId_t, WidgetModelId
from marimo._types.ids import CellId_t, UIElementId, WidgetModelId
from marimo._utils.lists import as_list

@@ -116,4 +117,8 @@

self.model_messages: dict[
WidgetModelId, list[UIElementMessageNotification]
WidgetModelId, list[ModelLifecycleNotification]
] = {}
# UI element messages
self.ui_element_messages: dict[
UIElementId, list[UIElementMessageNotification]
] = {}

@@ -305,9 +310,21 @@ # Startup logs for startup command - only one at a time

elif isinstance(notification, UIElementMessageNotification):
if notification.model_id is None:
return
messages = self.model_messages.get(notification.model_id, [])
messages.append(notification)
# TODO: cleanup/merge previous 'update' messages
self.model_messages[notification.model_id] = messages
# TODO(perf): Consider merging consecutive 'update' messages
# to reduce replay size. Could keep only the latest state for
# each model_id instead of the full message history.
# TODO: cleanup old UI messages
ui_element_id = notification.ui_element
if ui_element_id not in self.ui_element_messages:
self.ui_element_messages[ui_element_id] = []
self.ui_element_messages[ui_element_id].append(notification)
elif isinstance(notification, ModelLifecycleNotification):
model_id = notification.model_id
if model_id not in self.model_messages:
self.model_messages[model_id] = []
# TODO(perf): Consider merging consecutive 'update' messages
# to reduce replay size. Could keep only the latest state for
# each model_id instead of the full message history.
# TODO: cleanup old UI messages
self.model_messages[model_id].append(notification)
elif isinstance(notification, StartupLogsNotification):

@@ -447,8 +464,16 @@ prev = self.startup_logs.content if self.startup_logs else ""

all_notifications.append(self.data_connectors)
# Model messages must come before cell notifications to ensure
# the model exists before the view tries to use it.
if self.model_messages:
for model_messages in self.model_messages.values():
all_notifications.extend(model_messages)
if self.ui_element_messages:
for ui_messages in self.ui_element_messages.values():
all_notifications.extend(ui_messages)
all_notifications.extend(self.cell_notifications.values())
if self.stale_code:
all_notifications.append(self.stale_code)
if self.model_messages:
for messages in self.model_messages.values():
all_notifications.extend(messages)
# Only include startup logs if they are in progress (not done)

@@ -455,0 +480,0 @@ if self.startup_logs and self.startup_logs.status != "done":

@@ -12,3 +12,3 @@ # /// script

__generated_with = "0.15.5"
__generated_with = "0.19.7"
app = marimo.App(width="medium")

@@ -75,3 +75,15 @@

@app.cell
def _(widget):
widget.count
return
@app.cell
def _(widget):
widget.value
return
if __name__ == "__main__":
app.run()

@@ -17,3 +17,3 @@ # /// script

__generated_with = "0.15.5"
__generated_with = "0.19.7"
app = marimo.App(width="medium")

@@ -79,3 +79,3 @@

)
mo.vstack([min_bound, max_bound, Map(layer, _height=600)])
mo.vstack([min_bound, max_bound, Map(layer)])
return layer, max_bound, min_bound

@@ -82,0 +82,0 @@

@@ -11,3 +11,3 @@ # /// script

__generated_with = "0.18.3"
__generated_with = "0.19.7"
app = marimo.App(width="medium")

@@ -22,4 +22,4 @@

x = np.random.rand(500)
y = np.random.rand(500)
x = np.random.rand(50000)
y = np.random.rand(50000)

@@ -26,0 +26,0 @@ scatter = jscatter.Scatter(x=x, y=y)

@@ -16,3 +16,3 @@ # /// script

__generated_with = "0.16.2"
__generated_with = "0.19.7"
app = marimo.App(width="medium")

@@ -44,3 +44,3 @@

w = mo.ui.anywidget(MosaicWidget(spec, data={"weather": weather}))
return (w,)
return mo, w

@@ -55,4 +55,4 @@

@app.cell
def _(w):
w.value
def _():
# w.value
return

@@ -68,8 +68,11 @@

@app.cell
def _(quak):
def _(mo, quak):
import polars as pl
_df = pl.read_parquet("https://github.com/uwdata/mosaic/raw/main/data/athletes.parquet")
quak.Widget(_df)
return
_df = pl.read_parquet(
"https://github.com/uwdata/mosaic/raw/main/data/athletes.parquet"
)
q = mo.ui.anywidget(quak.Widget(_df))
q
return (q,)

@@ -79,2 +82,13 @@

def _():
thing = {"a": 0}
return (thing,)
@app.cell
def _(q, thing):
# Check gets update only once
thing["a"] += 1
print(thing["a"])
q.data()
return

@@ -81,0 +95,0 @@

import marimo
__generated_with = "0.15.5"
__generated_with = "0.19.7"
app = marimo.App(width="medium")

@@ -17,3 +17,3 @@

class ModelOnlyWidget(ipywidgets.Widget):
value = traitlets.Int(1).tag(sync=True)
value = traitlets.Int(42).tag(sync=True)

@@ -63,8 +63,3 @@

@app.cell
def _():
return
if __name__ == "__main__":
app.run()

@@ -14,3 +14,3 @@ # /// script

__generated_with = "0.16.2"
__generated_with = "0.19.7"
app = marimo.App(width="medium")

@@ -24,2 +24,3 @@

class Widget(anywidget.AnyWidget):

@@ -38,2 +39,3 @@ _esm = """

# Should display "hello"

@@ -51,2 +53,3 @@ Widget(data=b"hello")

# Step 1: Generate random structure, returns a 2D numpy array:

@@ -64,2 +67,3 @@ def make_random_3D_chromatin_structure(n):

random_structure = make_random_3D_chromatin_structure(BINS_NUM)

@@ -66,0 +70,0 @@

import marimo
__generated_with = "0.15.5"
__generated_with = "0.19.7"
app = marimo.App()

@@ -13,3 +13,2 @@

class Widget(anywidget.AnyWidget):

@@ -25,3 +24,5 @@ _esm = """

import numpy as np
arr = np.array([1, 2, 3])

@@ -28,0 +29,0 @@ Widget(

@@ -5,3 +5,3 @@ # Copyright 2026 Marimo. All rights reserved.

__generated_with = "0.15.5"
__generated_with = "0.19.6"
app = marimo.App()

@@ -16,28 +16,373 @@

@app.cell(hide_code=True)
def _(mo):
mo.md("""
# LaTeX Smoke Test
This notebook tests various LaTeX writing styles and configurations.
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md("""
## 1. Inline Math Delimiters
Different ways to write inline math:
""")
return
@app.cell
def _(mo):
mo.md(
"""
# Incrementing functions
Bug from [#704](https://github.com/marimo-team/marimo/discussions/704)
"""
)
mo.md(r"""
- Dollar signs: The equation $E = mc^2$ is famous.
- Backslash parens: The equation \(E = mc^2\) also works.
- With spaces: $ a + b = c $ (spaces around content).
- Complex inline: $\frac{x^2}{y^2} + \sqrt{z}$ in a sentence.
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md("""
## 2. Display Math Delimiters
Different ways to write display/block math:
""")
return
@app.cell
def _(mo):
mo.md(
r"""
\begin{align}
B' &=-\nabla \times E,\\
E' &=\nabla \times B - 4\pi j\\
e^{\pi i} + 1 = 0
\end{align}
"""
)
mo.md(r"""
Double dollar signs:
$$
f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
Backslash brackets:
\[
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
\]
""")
return
@app.cell
def _(mo):
mo.md(r"""
Inline display (no newlines): \[ x^2 + y^2 = z^2 \]
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md("""
## 3. LaTeX Environments
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Align environment (multi-line equations):
\begin{align}
B' &= -\nabla \times E \\
E' &= \nabla \times B - 4\pi j \\
e^{\pi i} + 1 &= 0
\end{align}
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Equation environment:
\begin{equation}
\mathcal{L} = \int_\Omega \left( \frac{1}{2} |\nabla u|^2 - f u \right) dx
\end{equation}
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Matrix environments:
Regular matrix: $\begin{matrix} a & b \\ c & d \end{matrix}$
Parentheses: $\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$
Brackets: $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$
Determinant: $\begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Cases environment:
$$
|x| = \begin{cases}
x & \text{if } x \geq 0 \\
-x & \text{if } x < 0
\end{cases}
$$
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md("""
## 4. Greek Letters and Symbols
""")
return
@app.cell
def _(mo):
mo.md(r"""
- Lowercase: $\alpha, \beta, \gamma, \delta, \epsilon, \zeta, \eta, \theta$
- More: $\iota, \kappa, \lambda, \mu, \nu, \xi, \pi, \rho, \sigma, \tau$
- And: $\upsilon, \phi, \chi, \psi, \omega$
- Uppercase: $\Gamma, \Delta, \Theta, \Lambda, \Xi, \Pi, \Sigma, \Phi, \Psi, \Omega$
- Operators: $\partial, \nabla, \infty, \forall, \exists, \emptyset$
- Relations: $\leq, \geq, \neq, \approx, \equiv, \sim, \propto$
- Arrows: $\leftarrow, \rightarrow, \leftrightarrow, \Rightarrow, \Leftrightarrow$
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md("""
## 5. Common Mathematical Expressions
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Fractions and roots:
$$\frac{a}{b}, \quad \frac{x+1}{x-1}, \quad \dfrac{\partial f}{\partial x}$$
$$\sqrt{x}, \quad \sqrt[3]{x}, \quad \sqrt{x^2 + y^2}$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Subscripts and superscripts:
$$x_i, \quad x^2, \quad x_i^2, \quad x_{i,j}^{(n)}, \quad e^{i\pi}$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Sums, products, integrals, limits:
$$\sum_{i=1}^{n} x_i, \quad \prod_{i=1}^{n} x_i, \quad \int_a^b f(x)\,dx, \quad \lim_{x \to \infty} f(x)$$
$$\iint_D f(x,y)\,dx\,dy, \quad \oint_C \vec{F} \cdot d\vec{r}$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Brackets and delimiters:
$$\left( \frac{a}{b} \right), \quad \left[ \frac{a}{b} \right], \quad \left\{ \frac{a}{b} \right\}$$
$$\left\langle \psi | \phi \right\rangle, \quad \left\| \vec{v} \right\|, \quad \left\lfloor x \right\rfloor, \quad \left\lceil x \right\rceil$$
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md("""
## 6. Chemistry (mhchem)
Using the mhchem extension for chemical equations:
""")
return
@app.cell
def _(mo):
mo.md(r"""
- Water: $\ce{H2O}$
- Sulfuric acid: $\ce{H2SO4}$
- Chemical reaction: $\ce{2H2 + O2 -> 2H2O}$
- Equilibrium: $\ce{N2 + 3H2 <=> 2NH3}$
- Isotopes: $\ce{^{14}C}$, $\ce{^{238}U}$
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md("""
## 7. Edge Cases
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Math in lists:
1. First item: $a^2 + b^2 = c^2$
2. Second item: $\sin^2\theta + \cos^2\theta = 1$
3. Third item: $e^{i\theta} = \cos\theta + i\sin\theta$
- Bullet with math: $\vec{F} = m\vec{a}$
- Another: $\nabla \cdot \vec{E} = \frac{\rho}{\epsilon_0}$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Multiple inline math in one paragraph:
The function $f(x) = x^2$ has derivative $f'(x) = 2x$ and second derivative $f''(x) = 2$.
At $x = 0$, we have $f(0) = 0$, $f'(0) = 0$, and $f''(0) = 2 > 0$, so $x = 0$ is a local minimum.
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Special characters that need escaping:
- Percent: $100\%$ confidence
- Ampersand in align: handled by environment
- Backslash: $\backslash$
- Tilde: $\tilde{x}$, $\widetilde{xyz}$
- Hat: $\hat{x}$, $\widehat{xyz}$
- Bar: $\bar{x}$, $\overline{xyz}$
""")
return
@app.cell(hide_code=True)
def _(mo):
mo.md("""
## 8. Real-World Examples
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Euler's identity (the most beautiful equation):
$$e^{i\pi} + 1 = 0$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Quadratic formula:
The solutions to $ax^2 + bx + c = 0$ are:
$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Gaussian integral:
$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Maxwell's equations:
\begin{align}
\nabla \cdot \vec{E} &= \frac{\rho}{\epsilon_0} \\
\nabla \cdot \vec{B} &= 0 \\
\nabla \times \vec{E} &= -\frac{\partial \vec{B}}{\partial t} \\
\nabla \times \vec{B} &= \mu_0 \vec{J} + \mu_0 \epsilon_0 \frac{\partial \vec{E}}{\partial t}
\end{align}
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Schrödinger equation:
$$i\hbar\frac{\partial}{\partial t}\Psi(\vec{r},t) = \hat{H}\Psi(\vec{r},t) = \left[-\frac{\hbar^2}{2m}\nabla^2 + V(\vec{r},t)\right]\Psi(\vec{r},t)$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Bayes' theorem:
$$P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}$$
""")
return
@app.cell
def _(mo):
mo.md(r"""
### Taylor series:
$$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots$$
""")
return
if __name__ == "__main__":
app.run()

@@ -69,37 +69,39 @@ <!DOCTYPE html>

<title>{{ title }}</title>
<script type="module" crossorigin src="./assets/index-DGasP9Lh.js"></script>
<link rel="modulepreload" crossorigin href="./assets/preload-helper-DItdS47A.js">
<script type="module" crossorigin src="./assets/index-DFrkvKWf.js"></script>
<link rel="modulepreload" crossorigin href="./assets/preload-helper-D2MJg03u.js">
<link rel="modulepreload" crossorigin href="./assets/clsx-D8GwTfvk.js">
<link rel="modulepreload" crossorigin href="./assets/cn-BKtXLv3a.js">
<link rel="modulepreload" crossorigin href="./assets/chunk-LvLJmgfZ.js">
<link rel="modulepreload" crossorigin href="./assets/react-BGmjiNul.js">
<link rel="modulepreload" crossorigin href="./assets/compiler-runtime-DeeZ7FnK.js">
<link rel="modulepreload" crossorigin href="./assets/react-Bj1aDYRI.js">
<link rel="modulepreload" crossorigin href="./assets/compiler-runtime-B3qBwwSJ.js">
<link rel="modulepreload" crossorigin href="./assets/jsx-runtime-ZmTK25f3.js">
<link rel="modulepreload" crossorigin href="./assets/badge-Ce8wRjuQ.js">
<link rel="modulepreload" crossorigin href="./assets/badge-DX6CQ6PA.js">
<link rel="modulepreload" crossorigin href="./assets/hotkeys-BHHWjLlp.js">
<link rel="modulepreload" crossorigin href="./assets/useEventListener-DIUKKfEy.js">
<link rel="modulepreload" crossorigin href="./assets/button-YC1gW_kJ.js">
<link rel="modulepreload" crossorigin href="./assets/react-dom-C9fstfnp.js">
<link rel="modulepreload" crossorigin href="./assets/Combination-CMPwuAmi.js">
<link rel="modulepreload" crossorigin href="./assets/menu-items-CJhvWPOk.js">
<link rel="modulepreload" crossorigin href="./assets/dist-uzvC4uAK.js">
<link rel="modulepreload" crossorigin href="./assets/createLucideIcon-CnW3RofX.js">
<link rel="modulepreload" crossorigin href="./assets/check-DdfN0k2d.js">
<link rel="modulepreload" crossorigin href="./assets/select-V5IdpNiR.js">
<link rel="modulepreload" crossorigin href="./assets/tooltip-CEc2ajau.js">
<link rel="modulepreload" crossorigin href="./assets/use-toast-rmUWldD_.js">
<link rel="modulepreload" crossorigin href="./assets/useEventListener-Cb-RVVEn.js">
<link rel="modulepreload" crossorigin href="./assets/button-CZ3Cs4qb.js">
<link rel="modulepreload" crossorigin href="./assets/react-dom-CSu739Rf.js">
<link rel="modulepreload" crossorigin href="./assets/Combination-BAEdC-rz.js">
<link rel="modulepreload" crossorigin href="./assets/menu-items-BMjcEb2j.js">
<link rel="modulepreload" crossorigin href="./assets/dist-DwV58Fb1.js">
<link rel="modulepreload" crossorigin href="./assets/createLucideIcon-BCdY6lG5.js">
<link rel="modulepreload" crossorigin href="./assets/check-Dr3SxUsb.js">
<link rel="modulepreload" crossorigin href="./assets/x-ZP5cObgf.js">
<link rel="modulepreload" crossorigin href="./assets/select-BVdzZKAh.js">
<link rel="modulepreload" crossorigin href="./assets/tooltip-CMQz28hC.js">
<link rel="modulepreload" crossorigin href="./assets/use-toast-BDYuj3zG.js">
<link rel="modulepreload" crossorigin href="./assets/_Uint8Array-BGESiCQL.js">
<link rel="modulepreload" crossorigin href="./assets/_baseIsEqual-B9N9Mw_N.js">
<link rel="modulepreload" crossorigin href="./assets/useEvent-DO6uJBas.js">
<link rel="modulepreload" crossorigin href="./assets/useEvent-BhXAndur.js">
<link rel="modulepreload" crossorigin href="./assets/invariant-CAG_dYON.js">
<link rel="modulepreload" crossorigin href="./assets/_baseFor-Duhs3RiJ.js">
<link rel="modulepreload" crossorigin href="./assets/merge-BBX6ug-N.js">
<link rel="modulepreload" crossorigin href="./assets/zod-Cg4WLWh2.js">
<link rel="modulepreload" crossorigin href="./assets/utils-DXvhzCGS.js">
<link rel="modulepreload" crossorigin href="./assets/zod-H_cgTO0M.js">
<link rel="modulepreload" crossorigin href="./assets/utils-YqBXNpsM.js">
<link rel="modulepreload" crossorigin href="./assets/Deferred-DxQeE5uh.js">
<link rel="modulepreload" crossorigin href="./assets/uuid-DXdzqzcr.js">
<link rel="modulepreload" crossorigin href="./assets/DeferredRequestRegistry-CMf25YiV.js">
<link rel="modulepreload" crossorigin href="./assets/constants-B6Cb__3x.js">
<link rel="modulepreload" crossorigin href="./assets/Deferred-CrO5-0RA.js">
<link rel="modulepreload" crossorigin href="./assets/config-CIrPQIbt.js">
<link rel="modulepreload" crossorigin href="./assets/uuid-DercMavo.js">
<link rel="modulepreload" crossorigin href="./assets/DeferredRequestRegistry-CO2AyNfd.js">
<link rel="modulepreload" crossorigin href="./assets/requests-BsVD4CdD.js">
<link rel="modulepreload" crossorigin href="./assets/session-BOFn9QrD.js">
<link rel="modulepreload" crossorigin href="./assets/config-Q0O7_stz.js">
<link rel="modulepreload" crossorigin href="./assets/requests-B4FYHTZl.js">
<link rel="modulepreload" crossorigin href="./assets/isSymbol-BGkTcW3U.js">

@@ -110,19 +112,20 @@ <link rel="modulepreload" crossorigin href="./assets/toString-DlRqgfqz.js">

<link rel="modulepreload" crossorigin href="./assets/_arrayReduce-TT0iOGKY.js">
<link rel="modulepreload" crossorigin href="./assets/useLifecycle-D35CBukS.js">
<link rel="modulepreload" crossorigin href="./assets/useNonce-_Aax6sXd.js">
<link rel="modulepreload" crossorigin href="./assets/useTheme-DUdVAZI8.js">
<link rel="modulepreload" crossorigin href="./assets/useLifecycle-ClI_npeg.js">
<link rel="modulepreload" crossorigin href="./assets/useNonce-CS26E0hA.js">
<link rel="modulepreload" crossorigin href="./assets/useTheme-DQozhcp1.js">
<link rel="modulepreload" crossorigin href="./assets/once-Bul8mtFs.js">
<link rel="modulepreload" crossorigin href="./assets/capabilities-MM7JYRxj.js">
<link rel="modulepreload" crossorigin href="./assets/createReducer-Dnna-AUO.js">
<link rel="modulepreload" crossorigin href="./assets/createReducer-B3rBsy4P.js">
<link rel="modulepreload" crossorigin href="./assets/paths-BzSgteR-.js">
<link rel="modulepreload" crossorigin href="./assets/dist-DBwNzi3C.js">
<link rel="modulepreload" crossorigin href="./assets/dist-ChS0Dc_R.js">
<link rel="modulepreload" crossorigin href="./assets/dist-CtsanegT.js">
<link rel="modulepreload" crossorigin href="./assets/dist-BIKFl48f.js">
<link rel="modulepreload" crossorigin href="./assets/dist-B0VqT_4z.js">
<link rel="modulepreload" crossorigin href="./assets/dist-TiFCI16_.js">
<link rel="modulepreload" crossorigin href="./assets/dist-Cayq-K1c.js">
<link rel="modulepreload" crossorigin href="./assets/dist-BYyu59D8.js">
<link rel="modulepreload" crossorigin href="./assets/dist-Dcqqg9UU.js">
<link rel="modulepreload" crossorigin href="./assets/dist-sMh6mJ2d.js">
<link rel="modulepreload" crossorigin href="./assets/dist-Btv5Rh1v.js">
<link rel="modulepreload" crossorigin href="./assets/dist-bBwmhqty.js">
<link rel="modulepreload" crossorigin href="./assets/dist-CoCQUAeM.js">
<link rel="modulepreload" crossorigin href="./assets/dist-Gqv0jSNr.js">
<link rel="modulepreload" crossorigin href="./assets/stex-CtmkcLz7.js">
<link rel="modulepreload" crossorigin href="./assets/toDate-CgbKQM5E.js">
<link rel="modulepreload" crossorigin href="./assets/stex-jWatZkll.js">
<link rel="modulepreload" crossorigin href="./assets/toDate-DETS9bBd.js">
<link rel="modulepreload" crossorigin href="./assets/cjs-CH5Rj0g8.js">

@@ -133,114 +136,115 @@ <link rel="modulepreload" crossorigin href="./assets/_baseProperty-NKyJO2oh.js">

<link rel="modulepreload" crossorigin href="./assets/toInteger-CDcO32Gx.js">
<link rel="modulepreload" crossorigin href="./assets/database-zap-B9y7063w.js">
<link rel="modulepreload" crossorigin href="./assets/database-zap-k4ePIFAU.js">
<link rel="modulepreload" crossorigin href="./assets/main-U5Goe76G.js">
<link rel="modulepreload" crossorigin href="./assets/cells-BpZ7g6ok.js">
<link rel="modulepreload" crossorigin href="./assets/spinner-DaIKav-i.js">
<link rel="modulepreload" crossorigin href="./assets/chevron-right-DwagBitu.js">
<link rel="modulepreload" crossorigin href="./assets/dropdown-menu-B-6unW-7.js">
<link rel="modulepreload" crossorigin href="./assets/kbd-C3JY7O_u.js">
<link rel="modulepreload" crossorigin href="./assets/renderShortcut-DEwfrKeS.js">
<link rel="modulepreload" crossorigin href="./assets/multi-map-C8GlnP-4.js">
<link rel="modulepreload" crossorigin href="./assets/alert-BrGyZf9c.js">
<link rel="modulepreload" crossorigin href="./assets/alert-dialog-DwQffb13.js">
<link rel="modulepreload" crossorigin href="./assets/dialog-CxGKN4C_.js">
<link rel="modulepreload" crossorigin href="./assets/dist-CdxIjAOP.js">
<link rel="modulepreload" crossorigin href="./assets/label-Be1daUcS.js">
<link rel="modulepreload" crossorigin href="./assets/useDebounce-D5NcotGm.js">
<link rel="modulepreload" crossorigin href="./assets/textarea-DBO30D7K.js">
<link rel="modulepreload" crossorigin href="./assets/numbers-iQunIAXf.js">
<link rel="modulepreload" crossorigin href="./assets/SSRProvider-CEHRCdjA.js">
<link rel="modulepreload" crossorigin href="./assets/context-JwD-oSsl.js">
<link rel="modulepreload" crossorigin href="./assets/useNumberFormatter-c6GXymzg.js">
<link rel="modulepreload" crossorigin href="./assets/usePress-Bup4EGrp.js">
<link rel="modulepreload" crossorigin href="./assets/input-pAun1m1X.js">
<link rel="modulepreload" crossorigin href="./assets/links-DHZUhGz-.js">
<link rel="modulepreload" crossorigin href="./assets/popover-Gz-GJzym.js">
<link rel="modulepreload" crossorigin href="./assets/switch-8sn_4qbh.js">
<link rel="modulepreload" crossorigin href="./assets/table-C8uQmBAN.js">
<link rel="modulepreload" crossorigin href="./assets/mode-DX8pdI-l.js">
<link rel="modulepreload" crossorigin href="./assets/useAsyncData-C4XRy1BE.js">
<link rel="modulepreload" crossorigin href="./assets/errors-2SszdW9t.js">
<link rel="modulepreload" crossorigin href="./assets/error-banner-DUzsIXtq.js">
<link rel="modulepreload" crossorigin href="./assets/copy-Bv2DBpIS.js">
<link rel="modulepreload" crossorigin href="./assets/cells-DPp5cDaO.js">
<link rel="modulepreload" crossorigin href="./assets/spinner-DA8-7wQv.js">
<link rel="modulepreload" crossorigin href="./assets/chevron-right--18M_6o9.js">
<link rel="modulepreload" crossorigin href="./assets/dropdown-menu-ldcmQvIV.js">
<link rel="modulepreload" crossorigin href="./assets/kbd-Cm6Ba9qg.js">
<link rel="modulepreload" crossorigin href="./assets/renderShortcut-BckyRbYt.js">
<link rel="modulepreload" crossorigin href="./assets/multi-map-DxdLNTBd.js">
<link rel="modulepreload" crossorigin href="./assets/alert-BOoN6gJ1.js">
<link rel="modulepreload" crossorigin href="./assets/card-OlSjYhmd.js">
<link rel="modulepreload" crossorigin href="./assets/alert-dialog-BW4srmS0.js">
<link rel="modulepreload" crossorigin href="./assets/dialog-eb-NieZw.js">
<link rel="modulepreload" crossorigin href="./assets/dist-CDXJRSCj.js">
<link rel="modulepreload" crossorigin href="./assets/label-E64zk6_7.js">
<link rel="modulepreload" crossorigin href="./assets/useDebounce-7iEVSqwM.js">
<link rel="modulepreload" crossorigin href="./assets/textarea-CRI7xDBj.js">
<link rel="modulepreload" crossorigin href="./assets/numbers-D7O23mOZ.js">
<link rel="modulepreload" crossorigin href="./assets/SSRProvider-BIDQNg9Q.js">
<link rel="modulepreload" crossorigin href="./assets/context-BfYAMNLF.js">
<link rel="modulepreload" crossorigin href="./assets/useNumberFormatter-Db6Vjve5.js">
<link rel="modulepreload" crossorigin href="./assets/usePress-C__vuri5.js">
<link rel="modulepreload" crossorigin href="./assets/input-DUrq2DiR.js">
<link rel="modulepreload" crossorigin href="./assets/links-7AQBmdyV.js">
<link rel="modulepreload" crossorigin href="./assets/popover-CH1FzjxU.js">
<link rel="modulepreload" crossorigin href="./assets/switch-dWLWbbtg.js">
<link rel="modulepreload" crossorigin href="./assets/table-DScsXgJW.js">
<link rel="modulepreload" crossorigin href="./assets/mode-Bn7pdJvO.js">
<link rel="modulepreload" crossorigin href="./assets/useAsyncData-BMGLSTg8.js">
<link rel="modulepreload" crossorigin href="./assets/errors-TZBmrJmc.js">
<link rel="modulepreload" crossorigin href="./assets/error-banner-B9ts0mNl.js">
<link rel="modulepreload" crossorigin href="./assets/copy-DHrHayPa.js">
<link rel="modulepreload" crossorigin href="./assets/memoize-BCOZVFBt.js">
<link rel="modulepreload" crossorigin href="./assets/get-6uJrSKbw.js">
<link rel="modulepreload" crossorigin href="./assets/capitalize-CmNnkG9y.js">
<link rel="modulepreload" crossorigin href="./assets/copy-CQ15EONK.js">
<link rel="modulepreload" crossorigin href="./assets/plus-BD5o34_i.js">
<link rel="modulepreload" crossorigin href="./assets/refresh-cw-CQd-1kjx.js">
<link rel="modulepreload" crossorigin href="./assets/trash-2-CyqGun26.js">
<link rel="modulepreload" crossorigin href="./assets/triangle-alert-B65rDESJ.js">
<link rel="modulepreload" crossorigin href="./assets/ai-model-dropdown-71lgLrLy.js">
<link rel="modulepreload" crossorigin href="./assets/defaultLocale-D_rSvXvJ.js">
<link rel="modulepreload" crossorigin href="./assets/precisionRound-BMPhtTJQ.js">
<link rel="modulepreload" crossorigin href="./assets/defaultLocale-C92Rrpmf.js">
<link rel="modulepreload" crossorigin href="./assets/vega-loader.browser-CRZ52CKf.js">
<link rel="modulepreload" crossorigin href="./assets/tooltip-BGrCWNss.js">
<link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-ChCiwl15.js">
<link rel="modulepreload" crossorigin href="./assets/useInstallPackage-Bdnnp5fe.js">
<link rel="modulepreload" crossorigin href="./assets/ImperativeModal-CUbWEBci.js">
<link rel="modulepreload" crossorigin href="./assets/cell-link-Bw5bzt4a.js">
<link rel="modulepreload" crossorigin href="./assets/datasource-B0OJBphG.js">
<link rel="modulepreload" crossorigin href="./assets/state-BfXVTTtD.js">
<link rel="modulepreload" crossorigin href="./assets/MarimoErrorOutput-5rudBbo3.js">
<link rel="modulepreload" crossorigin href="./assets/copy-icon-BhONVREY.js">
<link rel="modulepreload" crossorigin href="./assets/html-to-image-DjukyIj4.js">
<link rel="modulepreload" crossorigin href="./assets/focus-D51fcwZX.js">
<link rel="modulepreload" crossorigin href="./assets/LazyAnyLanguageCodeMirror-yzHjsVJt.js">
<link rel="modulepreload" crossorigin href="./assets/chunk-5FQGJX7Z-CVUXBqX6.js">
<link rel="modulepreload" crossorigin href="./assets/katex-Dc8yG8NU.js">
<link rel="modulepreload" crossorigin href="./assets/markdown-renderer-DhMlG2dP.js">
<link rel="modulepreload" crossorigin href="./assets/command-DhzFN2CJ.js">
<link rel="modulepreload" crossorigin href="./assets/download-BhCZMKuQ.js">
<link rel="modulepreload" crossorigin href="./assets/useRunCells-24p6hn99.js">
<link rel="modulepreload" crossorigin href="./assets/purify.es-DNVQZNFu.js">
<link rel="modulepreload" crossorigin href="./assets/RenderHTML-CQZqVk1Z.js">
<link rel="modulepreload" crossorigin href="./assets/useIframeCapabilities-DuIDx9mD.js">
<link rel="modulepreload" crossorigin href="./assets/formats-W1SWxSE3.js">
<link rel="modulepreload" crossorigin href="./assets/en-US-pRRbZZHE.js">
<link rel="modulepreload" crossorigin href="./assets/isValid-DcYggVWP.js">
<link rel="modulepreload" crossorigin href="./assets/dates-Dhn1r-h6.js">
<link rel="modulepreload" crossorigin href="./assets/maps-t9yNKYA8.js">
<link rel="modulepreload" crossorigin href="./assets/extends-B2LJnKU3.js">
<link rel="modulepreload" crossorigin href="./assets/emotion-is-prop-valid.esm-DD4AwVTU.js">
<link rel="modulepreload" crossorigin href="./assets/useDateFormatter-CS4kbWl2.js">
<link rel="modulepreload" crossorigin href="./assets/copy-D-8y6iMN.js">
<link rel="modulepreload" crossorigin href="./assets/plus-B7DF33lD.js">
<link rel="modulepreload" crossorigin href="./assets/refresh-cw-Dx8TEWFP.js">
<link rel="modulepreload" crossorigin href="./assets/trash-2-DDsWrxuJ.js">
<link rel="modulepreload" crossorigin href="./assets/triangle-alert-CebQ7XwA.js">
<link rel="modulepreload" crossorigin href="./assets/ai-model-dropdown-Dk2SdB3C.js">
<link rel="modulepreload" crossorigin href="./assets/defaultLocale-JieDVWC_.js">
<link rel="modulepreload" crossorigin href="./assets/precisionRound-CU2C3Vxx.js">
<link rel="modulepreload" crossorigin href="./assets/defaultLocale-BLne0bXb.js">
<link rel="modulepreload" crossorigin href="./assets/vega-loader.browser-DXARUlxo.js">
<link rel="modulepreload" crossorigin href="./assets/tooltip-DxKBXCGp.js">
<link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-B9Ifj8Jf.js">
<link rel="modulepreload" crossorigin href="./assets/useInstallPackage-D4fX0Ee_.js">
<link rel="modulepreload" crossorigin href="./assets/ImperativeModal-BNN1HA7x.js">
<link rel="modulepreload" crossorigin href="./assets/cell-link-B9b7J8QK.js">
<link rel="modulepreload" crossorigin href="./assets/datasource-CtyqtITR.js">
<link rel="modulepreload" crossorigin href="./assets/state-D4T75eZb.js">
<link rel="modulepreload" crossorigin href="./assets/MarimoErrorOutput-Lf9P8Fhl.js">
<link rel="modulepreload" crossorigin href="./assets/copy-icon-v8ME_JKB.js">
<link rel="modulepreload" crossorigin href="./assets/html-to-image-CIQqSu-S.js">
<link rel="modulepreload" crossorigin href="./assets/focus-C1YokgL7.js">
<link rel="modulepreload" crossorigin href="./assets/LazyAnyLanguageCodeMirror-DgZ8iknE.js">
<link rel="modulepreload" crossorigin href="./assets/chunk-5FQGJX7Z-DPlx2kjA.js">
<link rel="modulepreload" crossorigin href="./assets/katex-CDLTCvjQ.js">
<link rel="modulepreload" crossorigin href="./assets/markdown-renderer-DJy8ww5d.js">
<link rel="modulepreload" crossorigin href="./assets/command-2ElA5IkO.js">
<link rel="modulepreload" crossorigin href="./assets/download-os8QlW6l.js">
<link rel="modulepreload" crossorigin href="./assets/useRunCells-D2HBb4DB.js">
<link rel="modulepreload" crossorigin href="./assets/purify.es-DZrAQFIu.js">
<link rel="modulepreload" crossorigin href="./assets/RenderHTML-D-of_-s7.js">
<link rel="modulepreload" crossorigin href="./assets/useIframeCapabilities-B_pQb20b.js">
<link rel="modulepreload" crossorigin href="./assets/formats-CobRswjh.js">
<link rel="modulepreload" crossorigin href="./assets/en-US-CCVfmA-q.js">
<link rel="modulepreload" crossorigin href="./assets/isValid-DDt9wNjK.js">
<link rel="modulepreload" crossorigin href="./assets/dates-CrvjILe3.js">
<link rel="modulepreload" crossorigin href="./assets/maps-D2_Mq1pZ.js">
<link rel="modulepreload" crossorigin href="./assets/extends-BiFDv3jB.js">
<link rel="modulepreload" crossorigin href="./assets/emotion-is-prop-valid.esm-C59xfSYt.js">
<link rel="modulepreload" crossorigin href="./assets/useDateFormatter-CqhdUl2n.js">
<link rel="modulepreload" crossorigin href="./assets/range-D2UKkEg-.js">
<link rel="modulepreload" crossorigin href="./assets/table-DZR6ewbN.js">
<link rel="modulepreload" crossorigin href="./assets/JsonOutput-CknFTI_u.js">
<link rel="modulepreload" crossorigin href="./assets/file-Cs1JbsV6.js">
<link rel="modulepreload" crossorigin href="./assets/play-BPIh-ZEU.js">
<link rel="modulepreload" crossorigin href="./assets/chat-components-CGlO4yUw.js">
<link rel="modulepreload" crossorigin href="./assets/table-CfDbAm78.js">
<link rel="modulepreload" crossorigin href="./assets/JsonOutput-PE5ko4gi.js">
<link rel="modulepreload" crossorigin href="./assets/useDeleteCell-DdRX94yC.js">
<link rel="modulepreload" crossorigin href="./assets/icons-CCHmxi8d.js">
<link rel="modulepreload" crossorigin href="./assets/process-output-ByfLnk6j.js">
<link rel="modulepreload" crossorigin href="./assets/blob-D-eV0cU3.js">
<link rel="modulepreload" crossorigin href="./assets/objectWithoutPropertiesLoose-DfWeGRFv.js">
<link rel="modulepreload" crossorigin href="./assets/esm-Bmu2DhPy.js">
<link rel="modulepreload" crossorigin href="./assets/file-Ch78NKWp.js">
<link rel="modulepreload" crossorigin href="./assets/play-GLWQQs7F.js">
<link rel="modulepreload" crossorigin href="./assets/add-cell-with-ai-e_HMl7UU.js">
<link rel="modulepreload" crossorigin href="./assets/isEmpty-CgX_-6Mt.js">
<link rel="modulepreload" crossorigin href="./assets/chat-display-B4mGvJ0X.js">
<link rel="modulepreload" crossorigin href="./assets/useDeleteCell-5uYlTcQZ.js">
<link rel="modulepreload" crossorigin href="./assets/icons-BhEXrzsb.js">
<link rel="modulepreload" crossorigin href="./assets/process-output-CagdHMzs.js">
<link rel="modulepreload" crossorigin href="./assets/blob-CuXvdYPX.js">
<link rel="modulepreload" crossorigin href="./assets/objectWithoutPropertiesLoose-DaPAPabU.js">
<link rel="modulepreload" crossorigin href="./assets/esm-DpMp6qko.js">
<link rel="modulepreload" crossorigin href="./assets/add-cell-with-ai-pVFp5LZG.js">
<link rel="modulepreload" crossorigin href="./assets/chart-no-axes-column-W42b2ZIs.js">
<link rel="modulepreload" crossorigin href="./assets/square-function-CqXXKtIq.js">
<link rel="modulepreload" crossorigin href="./assets/spec-D1kBp3jX.js">
<link rel="modulepreload" crossorigin href="./assets/column-preview-CxMrs0B_.js">
<link rel="modulepreload" crossorigin href="./assets/toggle-jWKnIArU.js">
<link rel="modulepreload" crossorigin href="./assets/globals-DKH14XH0.js">
<link rel="modulepreload" crossorigin href="./assets/share-CbPtIlnM.js">
<link rel="modulepreload" crossorigin href="./assets/bot-message-square-B2ThzDUZ.js">
<link rel="modulepreload" crossorigin href="./assets/chat-display--jAB7huF.js">
<link rel="modulepreload" crossorigin href="./assets/chart-no-axes-column-qvVRjhv1.js">
<link rel="modulepreload" crossorigin href="./assets/square-function-B6mgCeFJ.js">
<link rel="modulepreload" crossorigin href="./assets/spec-Ch0xnJY4.js">
<link rel="modulepreload" crossorigin href="./assets/column-preview-CXjSXUhP.js">
<link rel="modulepreload" crossorigin href="./assets/toggle-zVW4FXNz.js">
<link rel="modulepreload" crossorigin href="./assets/globals-BgACvYmr.js">
<link rel="modulepreload" crossorigin href="./assets/share-ipf2hrOh.js">
<link rel="modulepreload" crossorigin href="./assets/_baseSet-5Rdwpmr3.js">
<link rel="modulepreload" crossorigin href="./assets/react-resizable-panels.browser.esm-Ctj_10o2.js">
<link rel="modulepreload" crossorigin href="./assets/utilities.esm-CIPARd6-.js">
<link rel="modulepreload" crossorigin href="./assets/floating-outline-DcxjrFFt.js">
<link rel="modulepreload" crossorigin href="./assets/useAddCell-BmeZUK02.js">
<link rel="modulepreload" crossorigin href="./assets/eye-off-BhExYOph.js">
<link rel="modulepreload" crossorigin href="./assets/readonly-python-code-DyP9LVLc.js">
<link rel="modulepreload" crossorigin href="./assets/file-video-camera-DW3v07j2.js">
<link rel="modulepreload" crossorigin href="./assets/types-DuQOSW7G.js">
<link rel="modulepreload" crossorigin href="./assets/refresh-ccw-DLEiQDS3.js">
<link rel="modulepreload" crossorigin href="./assets/form-DUA_Rz_a.js">
<link rel="modulepreload" crossorigin href="./assets/field-BEg1eC0P.js">
<link rel="modulepreload" crossorigin href="./assets/useBoolean-B1Xeh6vA.js">
<link rel="modulepreload" crossorigin href="./assets/useDeepCompareMemoize-ZPd9PxYl.js">
<link rel="modulepreload" crossorigin href="./assets/types-CS34eOZi.js">
<link rel="modulepreload" crossorigin href="./assets/prop-types-BiQYf0aU.js">
<link rel="modulepreload" crossorigin href="./assets/es-D8BOePqo.js">
<link rel="modulepreload" crossorigin href="./assets/react-resizable-panels.browser.esm-Da3ksQXL.js">
<link rel="modulepreload" crossorigin href="./assets/utilities.esm-MA1QpjVT.js">
<link rel="modulepreload" crossorigin href="./assets/floating-outline-BtdqbkUq.js">
<link rel="modulepreload" crossorigin href="./assets/useAddCell-CmuX2hOk.js">
<link rel="modulepreload" crossorigin href="./assets/eye-off-AK_9uodG.js">
<link rel="modulepreload" crossorigin href="./assets/readonly-python-code-WjTf6Pdd.js">
<link rel="modulepreload" crossorigin href="./assets/file-video-camera-C3wGzBnE.js">
<link rel="modulepreload" crossorigin href="./assets/types-BRfQN3HL.js">
<link rel="modulepreload" crossorigin href="./assets/refresh-ccw-DN_xCV6A.js">
<link rel="modulepreload" crossorigin href="./assets/form-BidPUZUn.js">
<link rel="modulepreload" crossorigin href="./assets/field-CySaBlkz.js">
<link rel="modulepreload" crossorigin href="./assets/useBoolean-Ck_unDZw.js">
<link rel="modulepreload" crossorigin href="./assets/useDeepCompareMemoize-5OUgerQ3.js">
<link rel="modulepreload" crossorigin href="./assets/types-C1UhS3qM.js">
<link rel="modulepreload" crossorigin href="./assets/prop-types-DaaA-ptl.js">
<link rel="modulepreload" crossorigin href="./assets/es-BYgU_srD.js">
<link rel="modulepreload" crossorigin href="./assets/hasIn-CycJImp8.js">

@@ -250,12 +254,11 @@ <link rel="modulepreload" crossorigin href="./assets/_baseFlatten-CUZNxU8H.js">

<link rel="modulepreload" crossorigin href="./assets/pick-B_6Qi5aM.js">
<link rel="modulepreload" crossorigin href="./assets/code-xml-XLwHyDBr.js">
<link rel="modulepreload" crossorigin href="./assets/download-B9SUL40m.js">
<link rel="modulepreload" crossorigin href="./assets/house-DhFkiXz7.js">
<link rel="modulepreload" crossorigin href="./assets/settings-DOXWMfVd.js">
<link rel="modulepreload" crossorigin href="./assets/square-C8Tw_XXG.js">
<link rel="modulepreload" crossorigin href="./assets/bundle.esm-2AjO7UK5.js">
<link rel="modulepreload" crossorigin href="./assets/code-xml-CgN_Yig7.js">
<link rel="modulepreload" crossorigin href="./assets/download-Dg7clfkc.js">
<link rel="modulepreload" crossorigin href="./assets/square-CuJ72M8f.js">
<link rel="modulepreload" crossorigin href="./assets/settings-OBbrbhij.js">
<link rel="modulepreload" crossorigin href="./assets/bundle.esm-i_UbZC0w.js">
<link rel="stylesheet" crossorigin href="./assets/cells-jmgGt1lS.css">
<link rel="stylesheet" crossorigin href="./assets/markdown-renderer-DdDKmWlR.css">
<link rel="stylesheet" crossorigin href="./assets/JsonOutput-B7vuddcd.css">
<link rel="stylesheet" crossorigin href="./assets/index-CikhHYAB.css">
<link rel="stylesheet" crossorigin href="./assets/index-CeUwN_0i.css">
</head>

@@ -262,0 +265,0 @@ <body>

@@ -13,3 +13,3 @@ # Copyright 2026 Marimo. All rights reserved.

__generated_with = "0.17.2"
__generated_with = "0.19.7"
app = marimo.App()

@@ -498,2 +498,3 @@

import numpy as np
return np, plt

@@ -607,2 +608,3 @@

import marimo as mo
return (mo,)

@@ -609,0 +611,0 @@

@@ -5,3 +5,3 @@ # Copyright 2026 Marimo. All rights reserved

__generated_with = "0.17.4"
__generated_with = "0.19.7"
app = marimo.App()

@@ -17,2 +17,3 @@

import marimo as mo
return (mo,)

@@ -398,2 +399,3 @@

return variable
return

@@ -400,0 +402,0 @@

@@ -5,3 +5,3 @@ # Copyright 2026 Marimo. All rights reserved.

__generated_with = "0.17.2"
__generated_with = "0.19.7"
app = marimo.App(app_title="marimo for Jupyter users")

@@ -92,2 +92,3 @@

import marimo as mo
return (mo,)

@@ -221,3 +222,11 @@

marimo only has Python cells, but you can still write Markdown: `import marimo as mo` and use `mo.md` to write Markdown.
marimo notebooks are stored as pure Python, but you can still write Markdown:
`import marimo as mo` and use `mo.md`.
/// details | What about markdown & SQL "cells"?
You may notice marimo UI has markdown and SQL cells in the editor. These are
conveniences that use `mo.md` and `mo.sql` under the hood, with nicer
ergonomics for authoring.
///
""")

@@ -224,0 +233,0 @@ return

@@ -5,3 +5,3 @@ # Copyright 2026 Marimo. All rights reserved.

__generated_with = "0.17.4"
__generated_with = "0.19.7"
app = marimo.App()

@@ -341,2 +341,3 @@

import marimo as mo
return (mo,)

@@ -343,0 +344,0 @@

@@ -14,3 +14,3 @@ # Copyright 2026 Marimo. All rights reserved.

__generated_with = "0.17.2"
__generated_with = "0.19.7"
app = marimo.App()

@@ -288,2 +288,3 @@

return plt.gca()
return (plotsin,)

@@ -326,2 +327,3 @@

import numpy as np
return np, plt

@@ -335,2 +337,3 @@

import marimo as mo
return math, mo

@@ -337,0 +340,0 @@

@@ -13,3 +13,3 @@ # Copyright 2026 Marimo. All rights reserved.

__generated_with = "0.17.4"
__generated_with = "0.19.7"
app = marimo.App()

@@ -186,2 +186,3 @@

return plt.gca()
return (plot_power,)

@@ -258,2 +259,3 @@

return module_not_found_explainer
return (check_dependencies,)

@@ -292,2 +294,3 @@

import marimo as mo
return (mo,)

@@ -294,0 +297,0 @@

@@ -16,3 +16,3 @@ # Copyright 2026 Marimo. All rights reserved.

__generated_with = "0.18.4"
__generated_with = "0.19.7"
app = marimo.App(width="medium")

@@ -347,2 +347,3 @@

return go.Figure(data=[go.Histogram(x=result["count"])])
return (render_chart,)

@@ -443,2 +444,3 @@

import random
return (mo,)

@@ -450,2 +452,3 @@

import string
return (string,)

@@ -452,0 +455,0 @@

@@ -5,3 +5,3 @@ # Copyright 2026 Marimo. All rights reserved.

__generated_with = "0.17.4"
__generated_with = "0.19.7"
app = marimo.App()

@@ -244,3 +244,3 @@

Composite elements are advanced elements
Composite elements are advanced elements that
let you build UI elements out of other UI elements.

@@ -484,2 +484,3 @@

return None
return (construct_element,)

@@ -493,2 +494,3 @@

return mo.hstack([element], justify="center")
return (show_element,)

@@ -511,2 +513,3 @@

)
return (value,)

@@ -526,2 +529,3 @@

)
return (documentation,)

@@ -533,2 +537,3 @@

import marimo as mo
return (mo,)

@@ -535,0 +540,0 @@

@@ -6,6 +6,7 @@ # Copyright 2026 Marimo. All rights reserved.

import types
from typing import Any
from typing import Any, Callable, cast
def is_callable_method(obj: Any, attr: str) -> bool:
"""Check if an attribute is callable on an object."""
if not hasattr(obj, attr):

@@ -18,1 +19,13 @@ return False

return callable(method)
def getcallable(obj: object, name: str) -> Callable[..., Any] | None:
"""Get a callable attribute from an object, or None if not callable.
This safely handles objects that implement __getattr__ and return
non-callable values for any attribute name.
"""
if (attr := getattr(obj, name, None)) is not None:
if callable(attr):
return cast(Callable[..., Any], attr)
return None

@@ -12,2 +12,5 @@ # Copyright 2026 Marimo. All rights reserved.

from docutils.core import publish_parts # type: ignore[import-untyped]
from docutils.writers.html4css1 import (
Writer, # type: ignore[import-untyped]
)

@@ -18,3 +21,3 @@ # redirect stderr and ignore it to silence error messages

rst_content,
writer_name="html",
writer=Writer(),
settings_overrides={

@@ -21,0 +24,0 @@ "warning_stream": None,

@@ -9,2 +9,7 @@ # Copyright 2026 Marimo. All rights reserved.

class DependencyTag(msgspec.Struct, rename="camel"):
kind: str
value: str
class DependencyTreeNode(msgspec.Struct, rename="camel"):

@@ -14,3 +19,3 @@ name: str

# List of {"kind": "extra"|"group", "value": str}
tags: list[dict[str, str]]
tags: list[DependencyTag]
dependencies: list[DependencyTreeNode]

@@ -66,3 +71,4 @@

# tags (extras/groups)
tags: list[dict[str, str]] = []
tags: list[DependencyTag] = []
while "(extra:" in content or "(group:" in content:

@@ -82,3 +88,3 @@ start = (

assert kind == "extra" or kind == "group"
tags.append({"kind": kind, "value": value.strip()})
tags.append(DependencyTag(kind=kind, value=value.strip()))
content = content[:start].strip()

@@ -90,3 +96,3 @@

if is_cycle:
tags.append({"kind": "cycle", "value": "true"})
tags.append(DependencyTag(kind="cycle", value="true"))

@@ -93,0 +99,0 @@ node = DependencyTreeNode(

Metadata-Version: 2.3
Name: marimo
Version: 0.19.7
Version: 0.19.8
Summary: A library for making reactive notebooks and apps

@@ -253,3 +253,3 @@ License:

Requires-Dist: polars[pyarrow]>=1.9.0 ; extra == 'sql'
Requires-Dist: sqlglot[rs]>=26.2.0 ; extra == 'sql'
Requires-Dist: sqlglot[rs]>=26.2.0,<28.7.0 ; extra == 'sql'
Requires-Python: >=3.10

@@ -256,0 +256,0 @@ Project-URL: homepage, https://github.com/marimo-team/marimo

@@ -7,3 +7,3 @@ [build-system]

name = "marimo"
version = "0.19.7"
version = "0.19.8"
description = "A library for making reactive notebooks and apps"

@@ -88,3 +88,3 @@ # We try to keep dependencies to a minimum, to avoid conflicts with

"polars[pyarrow]>=1.9.0", # SQL output back in Python
"sqlglot[rs]>=26.2.0" # SQL cells parsing
"sqlglot[rs]>=26.2.0,<28.7.0" # SQL cells parsing; <28.7.0 due to ibis compatibility issue
]

@@ -134,3 +134,3 @@

# For AI
"pydantic-ai-slim[openai]>=1.47.0",
"pydantic-ai-slim[openai]>=1.52.0",
]

@@ -143,9 +143,9 @@

# Pytest and plugins
"pytest~=8.3.4",
"pytest-timeout~=2.3.1",
"pytest~=9.0.2",
"pytest-timeout~=2.4.0",
"pytest-codecov~=0.7.0",
"pytest-rerunfailures~=15.1",
"pytest-asyncio~=0.26.0",
"pytest-rerunfailures~=16.1",
"pytest-asyncio~=1.3.0",
"pytest-picked>=0.5.1",
"pytest-sugar~=1.0.0",
"pytest-sugar~=1.1.1",
# Comparison testing

@@ -175,3 +175,3 @@ "inline-snapshot~=0.29.0",

"polars>=1.32.2",
"sqlglot[rs]>=26.2.0",
"sqlglot[rs]>=26.2.0,<28.7.0", # <28.7.0 due to ibis compatibility issue
"sqlalchemy>=2.0.40",

@@ -194,3 +194,3 @@ "pyiceberg>=0.9.0",

# testing gen ai
"pydantic-ai-slim[google,anthropic,bedrock,openai]>=1.47.0",
"pydantic-ai-slim[google,anthropic,bedrock,openai]>=1.52.0",
# - google-auth uses cachetools, and cachetools<5.0.0 uses collections.MutableMapping (removed in Python 3.10)

@@ -212,2 +212,4 @@ "cachetools>=5.0.0",

"pyzmq>=27.1.0",
# weave tracing integration
"weave>=0.51.0",
]

@@ -254,3 +256,3 @@

"sqlalchemy>=2.0.40",
"pydantic-ai-slim[google,anthropic,bedrock,openai]>=1.47.0",
"pydantic-ai-slim[google,anthropic,bedrock,openai]>=1.52.0",
"loro>=1.5.0",

@@ -561,2 +563,3 @@ "pandas-stubs>=1.5.3.230321",

"patches/*", # Patches may contain typos from source code
"tests/_sql/test_sql_parse.py", # Contains intentional invalid SQL for testing
]

@@ -577,3 +580,2 @@

multi_column = true
chat_modes = true
cache_panel = true

@@ -602,3 +604,3 @@

channels = ["conda-forge"]
platforms = ["osx-arm64", "linux-64"]
platforms = ["osx-arm64", "linux-64", "linux-aarch64"]

@@ -617,1 +619,2 @@ [tool.pixi.dependencies]

marimo = {path = ".", editable = true}
import{t as e}from"./worker-CUL1lW-N.js";var t=e(((e,t)=>{t.exports={}}));export default t();
import{t as e}from"./save-worker-DtF6B3PS.js";var t=e(((e,t)=>{t.exports={}}));export default t();

Sorry, the diff of this file is too big to display

var Ue=Object.defineProperty;var Ke=(t,e,s)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var ne=(t,e,s)=>Ke(t,typeof e!="symbol"?e+"":e,s);import{s as me}from"./chunk-LvLJmgfZ.js";import{t as We}from"./react-BGmjiNul.js";import{ft as He,w as Me,wn as h}from"./cells-BpZ7g6ok.js";import{D as oe,P as p,R as d,T as v,_ as ue,i as Qe,k as m,m as Ge}from"./zod-Cg4WLWh2.js";import{t as be}from"./compiler-runtime-DeeZ7FnK.js";import{S as Ve}from"./_Uint8Array-BGESiCQL.js";import{t as re}from"./assertNever-CBU83Y6o.js";import{r as ze,t as Je}from"./_baseEach-BhAgFun2.js";import{f as Ye}from"./hotkeys-BHHWjLlp.js";import{t as Xe}from"./jsx-runtime-ZmTK25f3.js";import{t as ie}from"./button-YC1gW_kJ.js";import{t as fe}from"./cn-BKtXLv3a.js";import{c as Ze,i as et,n as tt,r as st,s as nt,t as ot}from"./select-V5IdpNiR.js";import{t as rt}from"./circle-plus-CnWl9uZo.js";import{a as ae,c as ge,o as it,p as at,r as ct,t as lt}from"./dropdown-menu-B-6unW-7.js";import{n as dt}from"./DeferredRequestRegistry-CO2AyNfd.js";import{o as ht,r as pt}from"./input-pAun1m1X.js";import{a as mt,c as ut,d as bt,g as ft,l as gt,o as yt,p as St,s as _t,u as wt}from"./textarea-DBO30D7K.js";import{a as xt,c as $t,l as kt,n as Ct,r as At,t as jt}from"./dialog-CxGKN4C_.js";import{n as vt}from"./ImperativeModal-CUbWEBci.js";import{t as Rt}from"./links-DHZUhGz-.js";import{n as It}from"./useAsyncData-C4XRy1BE.js";import{o as Tt}from"./focus-D51fcwZX.js";import{o as Dt,t as qt,u as i}from"./form-DUA_Rz_a.js";import{t as Lt}from"./request-registry-CB8fU98Q.js";import{n as Pt,t as Nt}from"./write-secret-modal-CpmU5gbF.js";function Ft(t,e,s,o){for(var n=-1,a=t==null?0:t.length;++n<a;){var c=t[n];e(o,c,s(c),t)}return o}var Et=Ft;function Bt(t,e,s,o){return Je(t,function(n,a,c){e(o,n,s(n),c)}),o}var Ot=Bt;function Ut(t,e){return function(s,o){var n=Ve(s)?Et:Ot,a=e?e():{};return n(s,t,ze(o,2),a)}}var Kt=Ut(function(t,e,s){t[s?0:1].push(e)},function(){return[[],[]]});function $(){return d().optional().describe(i.of({label:"Password",inputType:"password",placeholder:"password",optionRegex:".*password.*"}))}function ce(t,e){let s=d();return s=e?s.nonempty():s.optional(),s=s.describe(i.of({label:t||"Token",inputType:"password",placeholder:"token",optionRegex:".*token.*"})),s}function G(){return d().optional().describe(i.of({label:"Warehouse Name",placeholder:"warehouse",optionRegex:".*warehouse.*"}))}function le(t,e){let s=d();return s=e?s.nonempty():s.optional(),s.describe(i.of({label:t||"URI",optionRegex:".*uri.*"}))}function x(t){return d().nonempty().describe(i.of({label:t||"Host",placeholder:"localhost",optionRegex:".*host.*"}))}function w(){return d().describe(i.of({label:"Database",placeholder:"db name",optionRegex:".*database.*"}))}function Wt(){return d().describe(i.of({label:"Schema",placeholder:"schema name",optionRegex:".*schema.*"}))}function k(){return d().nonempty().describe(i.of({label:"Username",placeholder:"username",optionRegex:".*username.*"}))}function C(t){let e=Qe().describe(i.of({label:"Port",inputType:"number",placeholder:t==null?void 0:t.toString()})).transform(Number).refine(s=>s>=0&&s<=65535,{message:"Port must be between 0 and 65535"});return t===void 0?e:e.default(t)}function ye(){return v().default(!1).describe(i.of({label:"Read Only"}))}const Se=p({type:m("postgres"),host:x(),port:C(5432).optional(),database:w(),username:k(),password:$(),ssl:v().default(!1).describe(i.of({label:"Use SSL"}))}).describe(i.of({direction:"two-columns"})),_e=p({type:m("mysql"),host:x(),port:C(3306),database:w(),username:k(),password:$(),ssl:v().default(!1).describe(i.of({label:"Use SSL"}))}).describe(i.of({direction:"two-columns"})),we=p({type:m("sqlite"),database:w().describe(i.of({label:"Database Path"}))}).describe(i.of({direction:"two-columns"})),xe=p({type:m("duckdb"),database:w().describe(i.of({label:"Database Path"})),read_only:ye()}).describe(i.of({direction:"two-columns"})),$e=p({type:m("motherduck"),database:w().default("my_db").describe(i.of({label:"Database Name"})),token:ce()}).describe(i.of({direction:"two-columns"})),ke=p({type:m("snowflake"),account:d().nonempty().describe(i.of({label:"Account",optionRegex:".*snowflake.*"})),warehouse:d().optional().describe(i.of({label:"Warehouse",optionRegex:".*snowflake.*"})),database:w(),schema:d().optional().describe(i.of({label:"Schema",optionRegex:".*snowflake.*"})),username:k(),password:$(),role:d().optional().describe(i.of({label:"Role"}))}).describe(i.of({direction:"two-columns"})),Ce=p({type:m("bigquery"),project:d().nonempty().describe(i.of({label:"Project ID",optionRegex:".*bigquery.*"})),dataset:d().nonempty().describe(i.of({label:"Dataset",optionRegex:".*bigquery.*"})),credentials_json:d().describe(i.of({label:"Credentials JSON",inputType:"textarea"}))}).describe(i.of({direction:"two-columns"})),Ae=p({type:m("clickhouse_connect"),host:x(),port:C(8123).optional(),username:k(),password:$(),secure:v().default(!1).describe(i.of({label:"Use HTTPs"}))}).describe(i.of({direction:"two-columns"})),je=p({type:m("timeplus"),host:x().default("localhost"),port:C(8123).optional(),username:k().default("default"),password:$().default("")}).describe(i.of({direction:"two-columns"})),ve=p({type:m("chdb"),database:w().describe(i.of({label:"Database Path"})),read_only:ye()}).describe(i.of({direction:"two-columns"})),Re=p({type:m("trino"),host:x(),port:C(8080),database:w(),schema:Wt().optional(),username:k(),password:$(),async_support:v().default(!1).describe(i.of({label:"Async Support"}))}).describe(i.of({direction:"two-columns"})),Ie=p({type:m("iceberg"),name:d().describe(i.of({label:"Catalog Name"})),catalog:oe("type",[p({type:m("REST"),warehouse:G(),uri:d().optional().describe(i.of({label:"URI",placeholder:"https://",optionRegex:".*uri.*"})),token:ce()}),p({type:m("SQL"),warehouse:G(),uri:d().optional().describe(i.of({label:"URI",placeholder:"jdbc:iceberg://host:port/database",optionRegex:".*uri.*"}))}),p({type:m("Hive"),warehouse:G(),uri:le()}),p({type:m("Glue"),warehouse:G(),uri:le()}),p({type:m("DynamoDB"),"dynamodb.profile-name":d().optional().describe(i.of({label:"Profile Name"})),"dynamodb.region":d().optional().describe(i.of({label:"Region"})),"dynamodb.access-key-id":d().optional().describe(i.of({label:"Access Key ID"})),"dynamodb.secret-access-key":d().optional().describe(i.of({label:"Secret Access Key",inputType:"password"})),"dynamodb.session-token":d().optional().describe(i.of({label:"Session Token",inputType:"password"}))})]).default({type:"REST",token:void 0}).describe(i.of({special:"tabs"}))}),Te=p({type:m("datafusion"),sessionContext:v().optional().describe(i.of({label:"Use Session Context"}))}),De=p({type:m("pyspark"),host:x().optional(),port:C().optional()}),qe=p({type:m("redshift"),host:x(),port:C(5439),connectionType:oe("type",[p({type:m("IAM credentials"),region:d().describe(i.of({label:"Region"})),aws_access_key_id:d().nonempty().describe(i.of({label:"AWS Access Key ID",inputType:"password",optionRegex:".*aws_access_key_id.*"})),aws_secret_access_key:d().nonempty().describe(i.of({label:"AWS Secret Access Key",inputType:"password",optionRegex:".*aws_secret_access_key.*"})),aws_session_token:d().optional().describe(i.of({label:"AWS Session Token",inputType:"password",optionRegex:".*aws_session_token.*"}))}),p({type:m("DB credentials"),user:k(),password:$()})]).default({type:"IAM credentials",aws_access_key_id:"",aws_secret_access_key:"",region:""}),database:w()}).describe(i.of({direction:"two-columns"})),Le=p({type:m("databricks"),access_token:ce("Access Token",!0),server_hostname:x("Server Hostname"),http_path:le("HTTP Path",!0),catalog:d().optional().describe(i.of({label:"Catalog"})),schema:d().optional().describe(i.of({label:"Schema"}))}).describe(i.of({direction:"two-columns"})),Pe=p({type:m("supabase"),host:x(),port:C(5432).optional(),database:w(),username:k(),password:$(),disable_client_pooling:v().default(!1).describe(i.of({label:"Disable Client-Side Pooling"}))}).describe(i.of({direction:"two-columns"})),Ht=oe("type",[Se,_e,we,xe,$e,ke,Ce,Ae,je,ve,Re,Ie,Te,De,qe,Le,Pe]);var de="env:";function tn(t){return t}function V(t){return typeof t=="string"?t.startsWith(de):!1}function he(t){return`${de}${t}`}function Mt(t){return t.replace(de,"")}const Ne={sqlmodel:"SQLModel",sqlalchemy:"SQLAlchemy",duckdb:"DuckDB",clickhouse_connect:"ClickHouse Connect",chdb:"chDB",pyiceberg:"PyIceberg",ibis:"Ibis",motherduck:"MotherDuck",redshift:"Redshift",databricks:"Databricks"};var y=class{constructor(t,e,s){this.connection=t,this.orm=e,this.secrets=s}get imports(){let t=new Set(this.generateImports());switch(this.orm){case"sqlalchemy":t.add("import sqlalchemy");break;case"sqlmodel":t.add("import sqlmodel");break;case"duckdb":t.add("import duckdb");break;case"ibis":t.add("import ibis");break}return t}},Qt=t=>`_${t}`,Gt=class{constructor(){ne(this,"secrets",{})}get imports(){return Object.keys(this.secrets).length===0?new Set:new Set(["import os"])}print(t,e,s){if(t=Qt(t),V(e)){let o=Mt(e),n=s?`os.environ.get("${o}", "${s}")`:`os.environ.get("${o}")`;return this.secrets[t]=n,t}if(s!=null){let o=`os.environ.get("${e}", "${s}")`;return this.secrets[t]=o,t}return typeof e=="number"||typeof e=="number"?`${e}`:typeof e=="boolean"?U(e):e?`"${e}"`:""}printInFString(t,e,s){if(e===void 0)return"";if(typeof e=="number")return`${e}`;if(typeof e=="boolean")return U(e);let o=this.print(t,e,s);return o.startsWith('"')&&o.endsWith('"')?o.slice(1,-1):`{${o}}`}printPassword(t,e,s,o){let n=s?this.printInFString.bind(this):this.print.bind(this);return V(t)?n(o||"password",t):n(o||"password",e,t)}getSecrets(){return this.secrets}formatSecrets(){return Object.keys(this.secrets).length===0?"":Object.entries(this.secrets).map(([t,e])=>`${t} = ${e}`).join(`
`)}},Vt=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.connection.ssl?", connect_args={'sslmode': 'require'}":"",e=this.secrets.printPassword(this.connection.password,"POSTGRES_PASSWORD",!0);return h(`
DATABASE_URL = f"postgresql://${this.secrets.printInFString("username",this.connection.username)}:${e}@${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}/${this.secrets.printInFString("database",this.connection.database)}"
engine = ${this.orm}.create_engine(DATABASE_URL${t})
`)}},zt=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.connection.ssl?", connect_args={'ssl': {'ssl-mode': 'preferred'}}":"",e=this.secrets.printPassword(this.connection.password,"MYSQL_PASSWORD",!0),s=this.secrets.printInFString("database",this.connection.database);return h(`
DATABASE_URL = f"mysql+pymysql://${this.secrets.printInFString("username",this.connection.username)}:${e}@${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}/${s}"
engine = ${this.orm}.create_engine(DATABASE_URL${t})
`)}},Jt=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.connection.database?this.secrets.printInFString("database",this.connection.database):"";return h(`
${t.startsWith("{")&&t.endsWith("}")?`DATABASE_URL = f"sqlite:///${t}"`:`DATABASE_URL = "sqlite:///${t}"`}
engine = ${this.orm}.create_engine(DATABASE_URL)
`)}},Yt=class extends y{generateImports(){return["from snowflake.sqlalchemy import URL"]}generateConnectionCode(){let t=this.secrets.printPassword(this.connection.password,"SNOWFLAKE_PASSWORD",!1),e={account:this.secrets.print("account",this.connection.account),user:this.secrets.print("user",this.connection.username),database:this.secrets.print("database",this.connection.database),warehouse:this.connection.warehouse?this.secrets.print("warehouse",this.connection.warehouse):void 0,schema:this.connection.schema?this.secrets.print("schema",this.connection.schema):void 0,role:this.connection.role?this.secrets.print("role",this.connection.role):void 0,password:t};return h(`
engine = ${this.orm}.create_engine(
URL(
${z(e,s=>` ${s}`)},
)
)
`)}},Xt=class extends y{generateImports(){return["import json"]}generateConnectionCode(){let t=this.secrets.printInFString("project",this.connection.project),e=this.secrets.printInFString("dataset",this.connection.dataset);return h(`
credentials = json.loads("""${this.connection.credentials_json}""")
engine = ${this.orm}.create_engine(f"bigquery://${t}/${e}", credentials_info=credentials)
`)}},Zt=class extends y{generateImports(){return[]}generateConnectionCode(){return h(`
DATABASE_URL = "${this.secrets.printInFString("database",this.connection.database||":memory:")}"
engine = ${this.orm}.connect(DATABASE_URL, read_only=${U(this.connection.read_only)})
`)}},es=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.secrets.printInFString("database",this.connection.database);return this.connection.token?h(`
conn = duckdb.connect("md:${t}", config={"motherduck_token": ${this.secrets.printPassword(this.connection.token,"MOTHERDUCK_TOKEN",!1)}})
`):h(`
conn = duckdb.connect("md:${t}")
`)}},ts=class extends y{generateImports(){return["import clickhouse_connect"]}generateConnectionCode(){let t=this.secrets.printPassword(this.connection.password,"CLICKHOUSE_PASSWORD",!1),e={host:this.secrets.print("host",this.connection.host),user:this.secrets.print("user",this.connection.username),secure:this.secrets.print("secure",this.connection.secure),port:this.connection.port?this.secrets.print("port",this.connection.port):void 0,password:this.connection.password?t:void 0};return h(`
engine = ${this.orm}.get_client(
${z(e,s=>` ${s}`)},
)
`)}},ss=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.secrets.printPassword(this.connection.password,"TIMEPLUS_PASSWORD",!0);return h(`
DATABASE_URL = f"timeplus://${this.secrets.printInFString("username",this.connection.username)}:${t}@${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}"
engine = ${this.orm}.create_engine(DATABASE_URL)
`)}},ns=class extends y{generateImports(){return["import chdb"]}generateConnectionCode(){let t=this.secrets.print("database",this.connection.database)||'""';return h(`
engine = ${this.orm}.connect(${t}, read_only=${U(this.connection.read_only)})
`)}},os=class extends y{generateImports(){return this.connection.async_support?["import aiotrino"]:["import trino.sqlalchemy"]}generateConnectionCode(){let t=this.connection.async_support?"aiotrino":"trino",e=this.connection.schema?`/${this.connection.schema}`:"",s=this.secrets.printInFString("username",this.connection.username),o=this.secrets.printInFString("host",this.connection.host),n=this.secrets.printInFString("port",this.connection.port),a=this.secrets.printInFString("database",this.connection.database),c=this.secrets.printPassword(this.connection.password,"TRINO_PASSWORD",!0);return h(`
engine = ${this.orm}.create_engine(f"${t}://${s}:${c}@${o}:${n}/${a}${e}")
`)}},rs=class extends y{generateImports(){switch(this.connection.catalog.type){case"REST":return["from pyiceberg.catalog.rest import RestCatalog"];case"SQL":return["from pyiceberg.catalog.sql import SqlCatalog"];case"Hive":return["from pyiceberg.catalog.hive import HiveCatalog"];case"Glue":return["from pyiceberg.catalog.glue import GlueCatalog"];case"DynamoDB":return["from pyiceberg.catalog.dynamodb import DynamoDBCatalog"];default:re(this.connection.catalog)}}generateConnectionCode(){let t={...this.connection.catalog};t=Object.fromEntries(Object.entries(t).filter(([o,n])=>n!=null&&n!==""&&o!=="type"));for(let[o,n]of Object.entries(t))V(n)?t[o]=this.secrets.print(o,n):typeof n=="string"&&(t[o]=`"${n}"`);let e=ms(t,o=>` ${o}`),s=`"${this.connection.name}"`;switch(this.connection.catalog.type){case"REST":return h(`
catalog = RestCatalog(
${s},
**{
${e}
},
)
`);case"SQL":return h(`
catalog = SqlCatalog(
${s},
**{
${e}
},
)
`);case"Hive":return h(`
catalog = HiveCatalog(
${s},
**{
${e}
},
)
`);case"Glue":return h(`
catalog = GlueCatalog(
${s},
**{
${e}
},
)
`);case"DynamoDB":return h(`
catalog = DynamoDBCatalog(
${s},
**{
${e}
},
)
`);default:re(this.connection.catalog)}}},is=class extends y{generateImports(){return["from datafusion import SessionContext"]}generateConnectionCode(){return this.connection.sessionContext?h(`
ctx = SessionContext()
# Sample table
_ = ctx.from_pydict({"a": [1, 2, 3]}, "my_table")
con = ibis.datafusion.connect(ctx)
`):h(`
con = ibis.datafusion.connect()
`)}},as=class extends y{generateImports(){return["from pyspark.sql import SparkSession"]}generateConnectionCode(){return this.connection.host||this.connection.port?h(`
session = SparkSession.builder.remote(f"sc://${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}").getOrCreate()
con = ibis.pyspark.connect(session)
`):h(`
con = ibis.pyspark.connect()
`)}},cs=class extends y{generateImports(){return["import redshift_connector"]}generateConnectionCode(){let t=this.secrets.print("host",this.connection.host),e=this.secrets.print("port",this.connection.port),s=this.secrets.print("database",this.connection.database);if(this.connection.connectionType.type==="IAM credentials"){let a=this.secrets.print("aws_access_key_id",this.connection.connectionType.aws_access_key_id),c=this.secrets.print("aws_secret_access_key",this.connection.connectionType.aws_secret_access_key),l=this.connection.connectionType.aws_session_token?this.secrets.print("aws_session_token",this.connection.connectionType.aws_session_token):void 0;return h(`
con = redshift_connector.connect(
${z({iam:!0,host:t,port:e,region:`"${this.connection.connectionType.region}"`,database:s,access_key_id:a,secret_access_key:c,...l&&{session_token:l}},b=>` ${b}`)},
)
`)}let o=this.connection.connectionType.user?this.secrets.print("user",this.connection.connectionType.user):void 0,n=this.connection.connectionType.password?this.secrets.printPassword(this.connection.connectionType.password,"REDSHIFT_PASSWORD",!1):void 0;return h(`
con = redshift_connector.connect(
${z({host:t,port:e,database:s,...o&&{user:o},...n&&{password:n}},a=>` ${a}`)},
)
`)}},ls=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.orm!=="ibis",e=this.secrets.printPassword(this.connection.access_token,"DATABRICKS_ACCESS_TOKEN",t,"access_token"),s=this.secrets.printPassword(this.connection.server_hostname,"DATABRICKS_SERVER_HOSTNAME",t,"server_hostname"),o=this.secrets.printPassword(this.connection.http_path,"DATABRICKS_HTTP_PATH",t,"http_path"),n=this.connection.catalog?this.secrets.printInFString("catalog",this.connection.catalog):void 0,a=this.connection.schema?this.secrets.printInFString("schema",this.connection.schema):void 0,c=`databricks://token:${e}@${s}?http_path=${o}`;return n&&(c+=`&catalog=${n}`),a&&(c+=`&schema=${a}`),this.orm==="ibis"?h(`
engine = ibis.databricks.connect(
server_hostname=${s},
http_path=${o},${n?`
catalog=${n},`:""}${a?`
schema=${a},`:""}
access_token=${e}
)
`):h(`
DATABASE_URL = f"${c}"
engine = ${this.orm}.create_engine(DATABASE_URL)
`)}},ds=class extends y{generateImports(){return this.connection.disable_client_pooling?["from sqlalchemy.pool import NullPool"]:[]}generateConnectionCode(){let t=this.secrets.printPassword(this.connection.password,"SUPABASE_PASSWORD",!0),e=this.secrets.printInFString("username",this.connection.username),s=this.secrets.printInFString("host",this.connection.host),o=this.secrets.printInFString("port",this.connection.port),n=this.secrets.printInFString("database",this.connection.database),a=this.connection.disable_client_pooling?", poolclass=NullPool":"";return h(`
DATABASE_URL = f"postgresql+psycopg2://${e}:${t}@${s}:${o}/${n}?sslmode=require"
engine = ${this.orm}.create_engine(DATABASE_URL${a})
`)}},hs=class{constructor(){ne(this,"secrets",new Gt)}createGenerator(t,e){switch(t.type){case"postgres":return new Vt(t,e,this.secrets);case"mysql":return new zt(t,e,this.secrets);case"sqlite":return new Jt(t,e,this.secrets);case"snowflake":return new Yt(t,e,this.secrets);case"bigquery":return new Xt(t,e,this.secrets);case"duckdb":return new Zt(t,e,this.secrets);case"motherduck":return new es(t,e,this.secrets);case"clickhouse_connect":return new ts(t,e,this.secrets);case"timeplus":return new ss(t,e,this.secrets);case"chdb":return new ns(t,e,this.secrets);case"trino":return new os(t,e,this.secrets);case"iceberg":return new rs(t,e,this.secrets);case"datafusion":return new is(t,e,this.secrets);case"pyspark":return new as(t,e,this.secrets);case"redshift":return new cs(t,e,this.secrets);case"databricks":return new ls(t,e,this.secrets);case"supabase":return new ds(t,e,this.secrets);default:re(t)}}};function ps(t,e){if(!(e in Ne))throw Error(`Unsupported library: ${e}`);Ht.parse(t);let s=new hs,o=s.createGenerator(t,e),n=o.generateConnectionCode(),a=s.secrets,c=[...new Set([...a.imports,...o.imports])].sort();c.push("");let l=a.formatSecrets();return l&&c.push(l),c.push(n.trim()),c.join(`
`)}function U(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function z(t,e){return Object.entries(t).filter(([,s])=>s!=null&&s!=="").map(([s,o])=>e(typeof o=="boolean"?`${s}=${U(o)}`:`${s}=${o}`)).join(`,
`)}function ms(t,e){return Object.entries(t).filter(([,s])=>s!=null&&s!=="").map(([s,o])=>{let n=`"${s}"`;return e(typeof o=="boolean"?`${n}: ${U(o)}`:`${n}: ${o}`)}).join(`,
`)}var us=be(),K=me(We(),1),r=me(Xe(),1),Fe=(0,K.createContext)({providerNames:[],secretKeys:[],loading:!1,error:void 0,refreshSecrets:Ye.NOOP});const bs=()=>(0,K.use)(Fe),fs=t=>{let e=(0,us.c)(14),{children:s}=t,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0];let{data:n,isPending:a,error:c,refetch:l}=It(ws,o),b;e[1]===(n==null?void 0:n.secretKeys)?b=e[2]:(b=(n==null?void 0:n.secretKeys)||[],e[1]=n==null?void 0:n.secretKeys,e[2]=b);let u;e[3]===(n==null?void 0:n.providerNames)?u=e[4]:(u=(n==null?void 0:n.providerNames)||[],e[3]=n==null?void 0:n.providerNames,e[4]=u);let f;e[5]!==c||e[6]!==a||e[7]!==l||e[8]!==b||e[9]!==u?(f={secretKeys:b,providerNames:u,loading:a,error:c,refreshSecrets:l},e[5]=c,e[6]=a,e[7]=l,e[8]=b,e[9]=u,e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==f?(S=(0,r.jsx)(Fe,{value:f,children:s}),e[11]=s,e[12]=f,e[13]=S):S=e[13],S},gs={isMatch:t=>{if(t instanceof ue||t instanceof Ge){let{optionRegex:e}=i.parse(t.description||"");return!!e}return!1},Component:({schema:t,form:e,path:s})=>{let{secretKeys:o,providerNames:n,refreshSecrets:a}=bs(),{openModal:c,closeModal:l}=vt(),{label:b,description:u,optionRegex:f=""}=i.parse(t.description||""),[S,A]=Kt(o,g=>new RegExp(f,"i").test(g));return(0,r.jsx)(ut,{control:e.control,name:s,render:({field:g})=>(0,r.jsxs)(gt,{children:[(0,r.jsx)(wt,{children:b}),(0,r.jsx)(yt,{children:u}),(0,r.jsx)(mt,{children:(0,r.jsxs)("div",{className:"flex gap-2",children:[t instanceof ue?(0,r.jsx)(pt,{...g,value:g.value,onChange:g.onChange,className:fe("flex-1")}):(0,r.jsx)(ht,{...g,value:g.value,onChange:g.onChange,className:"flex-1"}),(0,r.jsxs)(lt,{children:[(0,r.jsx)(at,{asChild:!0,children:(0,r.jsx)(ie,{variant:"outline",size:"icon",className:fe(V(g.value)&&"bg-accent"),children:(0,r.jsx)(dt,{className:"h-3 w-3"})})}),(0,r.jsxs)(ct,{align:"end",className:"max-h-60 overflow-y-auto",children:[(0,r.jsxs)(ae,{onSelect:()=>{c((0,r.jsx)(Nt,{providerNames:n,onSuccess:_=>{a(),g.onChange(he(_)),l()},onClose:l}))},children:[(0,r.jsx)(rt,{className:"mr-2 h-3.5 w-3.5"}),"Create a new secret"]}),S.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ge,{}),(0,r.jsx)(it,{children:"Recommended"})]}),S.map(_=>(0,r.jsx)(ae,{onSelect:()=>g.onChange(he(_)),children:_},_)),A.length>0&&(0,r.jsx)(ge,{}),A.map(_=>(0,r.jsx)(ae,{onSelect:()=>g.onChange(he(_)),children:_},_))]})]})]})}),(0,r.jsx)(bt,{})]})})}};function ys(t){return t.provider!=="env"}function Ss(t){return t.name}function _s(t){return t.keys}async function ws(){let t=await Lt.request({}),e=Pt(t.secrets).filter(ys).map(Ss);return{secretKeys:t.secrets.flatMap(_s).sort(),providerNames:e}}var W=be(),Ee=[{name:"PostgreSQL",schema:Se,color:"#336791",logo:"postgres",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"MySQL",schema:_e,color:"#00758F",logo:"mysql",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"SQLite",schema:we,color:"#003B57",logo:"sqlite",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"DuckDB",schema:xe,color:"#FFD700",logo:"duckdb",connectionLibraries:{libraries:["duckdb"],preferred:"duckdb"}},{name:"MotherDuck",schema:$e,color:"#ff9538",logo:"motherduck",connectionLibraries:{libraries:["duckdb"],preferred:"duckdb"}},{name:"Snowflake",schema:ke,color:"#29B5E8",logo:"snowflake",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"ClickHouse",schema:Ae,color:"#2C2C1D",logo:"clickhouse",connectionLibraries:{libraries:["clickhouse_connect"],preferred:"clickhouse_connect"}},{name:"Timeplus",schema:je,color:"#B83280",logo:"timeplus",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"BigQuery",schema:Ce,color:"#4285F4",logo:"bigquery",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"ClickHouse Embedded",schema:ve,color:"#f2b611",logo:"clickhouse",connectionLibraries:{libraries:["chdb"],preferred:"chdb"}},{name:"Trino",schema:Re,color:"#d466b6",logo:"trino",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}},{name:"DataFusion",schema:Te,color:"#202A37",logo:"datafusion",connectionLibraries:{libraries:["ibis"],preferred:"ibis"}},{name:"PySpark",schema:De,color:"#1C5162",logo:"pyspark",connectionLibraries:{libraries:["ibis"],preferred:"ibis"}},{name:"Redshift",schema:qe,color:"#522BAE",logo:"redshift",connectionLibraries:{libraries:["redshift"],preferred:"redshift"}},{name:"Databricks",schema:Le,color:"#c41e0c",logo:"databricks",connectionLibraries:{libraries:["sqlalchemy","sqlmodel","ibis"],preferred:"sqlalchemy"}},{name:"Supabase",schema:Pe,color:"#238F5F",logo:"supabase",connectionLibraries:{libraries:["sqlalchemy","sqlmodel"],preferred:"sqlalchemy"}}],Be=[{name:"Iceberg",schema:Ie,color:"#000000",logo:"iceberg",connectionLibraries:{libraries:["pyiceberg"],preferred:"pyiceberg"}}],xs=t=>{let e=(0,W.c)(14),{onSelect:s}=t,o;e[0]===s?o=e[1]:(o=S=>{let{name:A,schema:g,color:_,logo:R}=S;return(0,r.jsxs)("button",{type:"button",className:"py-3 flex flex-col items-center justify-center gap-1 transition-all hover:scale-105 hover:brightness-110 rounded shadow-sm-solid hover:shadow-md-solid",style:{backgroundColor:_},onClick:()=>s(g),children:[(0,r.jsx)(He,{name:R,className:"w-8 h-8 text-white brightness-0 invert dark:invert"}),(0,r.jsx)("span",{className:"text-white font-medium text-lg",children:A})]},A)},e[0]=s,e[1]=o);let n=o,a;e[2]===n?a=e[3]:(a=Ee.map(n),e[2]=n,e[3]=a);let c;e[4]===a?c=e[5]:(c=(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:a}),e[4]=a,e[5]=c);let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,r.jsxs)("h4",{className:"font-semibold text-muted-foreground text-lg flex items-center gap-4",children:["Data Catalogs",(0,r.jsx)("hr",{className:"flex-1"})]}),e[6]=l):l=e[6];let b;e[7]===n?b=e[8]:(b=Be.map(n),e[7]=n,e[8]=b);let u;e[9]===b?u=e[10]:(u=(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:b}),e[9]=b,e[10]=u);let f;return e[11]!==c||e[12]!==u?(f=(0,r.jsxs)(r.Fragment,{children:[c,l,u]}),e[11]=c,e[12]=u,e[13]=f):f=e[13],f},$s=[gs],ks=t=>{var pe;let e=(0,W.c)(49),{schema:s,onSubmit:o,onBack:n}=t,a;e[0]===s?a=e[1]:(a=Dt(s),e[0]=s,e[1]=a);let c=s,l;e[2]===c?l=e[3]:(l=St(c),e[2]=c,e[3]=l);let b;e[4]!==a||e[5]!==l?(b={defaultValues:a,resolver:l,reValidateMode:"onChange"},e[4]=a,e[5]=l,e[6]=b):b=e[6];let u=ft(b),f=(pe=[...Ee,...Be].find(j=>j.schema===s))==null?void 0:pe.connectionLibraries,[S,A]=(0,K.useState)((f==null?void 0:f.preferred)??"sqlalchemy"),{createNewCell:g}=Me(),_=Tt(),R;e[7]!==g||e[8]!==_?(R=j=>{g({code:j,before:!1,cellId:_??"__end__",skipIfCodeExists:!0})},e[7]=g,e[8]=_,e[9]=R):R=e[9];let J=R,H;e[10]!==J||e[11]!==o||e[12]!==S?(H=j=>{J(ps(j,S)),o()},e[10]=J,e[11]=o,e[12]=S,e[13]=H):H=e[13];let Y=H,I;e[14]!==u||e[15]!==Y?(I=u.handleSubmit(Y),e[14]=u,e[15]=Y,e[16]=I):I=e[16];let M;e[17]===Symbol.for("react.memo_cache_sentinel")?(M=(0,r.jsx)(_t,{}),e[17]=M):M=e[17];let T;e[18]!==u||e[19]!==s?(T=(0,r.jsx)(fs,{children:(0,r.jsx)(qt,{schema:s,form:u,renderers:$s,children:M})}),e[18]=u,e[19]=s,e[20]=T):T=e[20];let D;e[21]===n?D=e[22]:(D=(0,r.jsx)(ie,{type:"button",variant:"outline",onClick:n,children:"Back"}),e[21]=n,e[22]=D);let X=!u.formState.isValid,q;e[23]===X?q=e[24]:(q=(0,r.jsx)(ie,{type:"submit",disabled:X,children:"Add"}),e[23]=X,e[24]=q);let L;e[25]!==D||e[26]!==q?(L=(0,r.jsxs)("div",{className:"flex gap-2",children:[D,q]}),e[25]=D,e[26]=q,e[27]=L):L=e[27];let Z=ot,P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=j=>A(j),e[28]=P):P=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=(0,r.jsxs)("div",{className:"flex flex-col gap-1 items-end",children:[(0,r.jsx)(nt,{children:(0,r.jsx)(Ze,{placeholder:"Select a library"})}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:"Preferred connection library"})]}),e[29]=N):N=e[29];let ee=tt,te=st,se=f==null?void 0:f.libraries.map(js),F;e[30]!==te||e[31]!==se?(F=(0,r.jsx)(te,{children:se}),e[30]=te,e[31]=se,e[32]=F):F=e[32];let E;e[33]!==ee||e[34]!==F?(E=(0,r.jsx)(ee,{children:F}),e[33]=ee,e[34]=F,e[35]=E):E=e[35];let B;e[36]!==Z||e[37]!==S||e[38]!==P||e[39]!==N||e[40]!==E?(B=(0,r.jsx)("div",{children:(0,r.jsxs)(Z,{value:S,onValueChange:P,children:[N,E]})}),e[36]=Z,e[37]=S,e[38]=P,e[39]=N,e[40]=E,e[41]=B):B=e[41];let O;e[42]!==L||e[43]!==B?(O=(0,r.jsxs)("div",{className:"flex gap-2 justify-between",children:[L,B]}),e[42]=L,e[43]=B,e[44]=O):O=e[44];let Q;return e[45]!==T||e[46]!==O||e[47]!==I?(Q=(0,r.jsxs)("form",{onSubmit:I,className:"space-y-4",children:[T,O]}),e[45]=T,e[46]=O,e[47]=I,e[48]=Q):Q=e[48],Q},Cs=t=>{let e=(0,W.c)(5),{onSubmit:s}=t,[o,n]=(0,K.useState)(null);if(!o){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,r.jsx)(xs,{onSelect:n}),e[0]=l):l=e[0],l}let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=()=>n(null),e[1]=a):a=e[1];let c;return e[2]!==s||e[3]!==o?(c=(0,r.jsx)(ks,{schema:o,onSubmit:s,onBack:a}),e[2]=s,e[3]=o,e[4]=c):c=e[4],c};const As=t=>{let e=(0,W.c)(6),{children:s}=t,[o,n]=(0,K.useState)(!1),a;e[0]===s?a=e[1]:(a=(0,r.jsx)(kt,{asChild:!0,children:s}),e[0]=s,e[1]=a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)(Oe,{onClose:()=>n(!1)}),e[2]=c):c=e[2];let l;return e[3]!==o||e[4]!==a?(l=(0,r.jsxs)(jt,{open:o,onOpenChange:n,children:[a,c]}),e[3]=o,e[4]=a,e[5]=l):l=e[5],l},Oe=t=>{let e=(0,W.c)(4),{onClose:s}=t,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)($t,{children:"Add Connection"}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsxs)(xt,{className:"mb-4",children:[o,(0,r.jsxs)(At,{children:["Connect to your database or data catalog to query data directly from your notebook. Learn more about how to connect to your database in our"," ",(0,r.jsx)(Rt,{href:"https://docs.marimo.io/guides/working_with_data/sql/#connecting-to-a-custom-database",children:"docs."})]})]}),e[1]=n):n=e[1];let a;return e[2]===s?a=e[3]:(a=(0,r.jsxs)(Ct,{className:"max-h-[75vh] overflow-y-auto",children:[n,(0,r.jsx)(Cs,{onSubmit:()=>s()})]}),e[2]=s,e[3]=a),a};function js(t){return(0,r.jsx)(et,{value:t,children:Ne[t]},t)}export{Oe as n,As as t};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import{s as m}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-BGmjiNul.js";import{t as x}from"./compiler-runtime-DeeZ7FnK.js";import{t as b}from"./jsx-runtime-ZmTK25f3.js";import{n as y,t as o}from"./cn-BKtXLv3a.js";var n=x(),v=m(p(),1),f=m(b(),1),w=y("relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11",{variants:{variant:{default:"bg-background text-foreground",destructive:"text-destructive border-destructive/50 dark:border-destructive [&>svg]:text-destructive text-destructive",info:"bg-(--sky-2) border-(--sky-7) text-(--sky-11)",warning:"bg-(--yellow-2) border-(--yellow-7) text-(--yellow-11) [&>svg]:text-(--yellow-11)"}},defaultVariants:{variant:"default"}}),u=v.forwardRef((l,i)=>{let e=(0,n.c)(11),r,t,a;e[0]===l?(r=e[1],t=e[2],a=e[3]):({className:r,variant:a,...t}=l,e[0]=l,e[1]=r,e[2]=t,e[3]=a);let s;e[4]!==r||e[5]!==a?(s=o(w({variant:a}),r),e[4]=r,e[5]=a,e[6]=s):s=e[6];let d;return e[7]!==t||e[8]!==i||e[9]!==s?(d=(0,f.jsx)("div",{ref:i,role:"alert",className:s,...t}),e[7]=t,e[8]=i,e[9]=s,e[10]=d):d=e[10],d});u.displayName="Alert";var c=v.forwardRef((l,i)=>{let e=(0,n.c)(11),r,t,a;e[0]===l?(r=e[1],t=e[2],a=e[3]):({className:t,children:r,...a}=l,e[0]=l,e[1]=r,e[2]=t,e[3]=a);let s;e[4]===t?s=e[5]:(s=o("mb-1 font-medium leading-none tracking-tight",t),e[4]=t,e[5]=s);let d;return e[6]!==r||e[7]!==a||e[8]!==i||e[9]!==s?(d=(0,f.jsx)("h5",{ref:i,className:s,...a,children:r}),e[6]=r,e[7]=a,e[8]=i,e[9]=s,e[10]=d):d=e[10],d});c.displayName="AlertTitle";var g=v.forwardRef((l,i)=>{let e=(0,n.c)(9),r,t;e[0]===l?(r=e[1],t=e[2]):({className:r,...t}=l,e[0]=l,e[1]=r,e[2]=t);let a;e[3]===r?a=e[4]:(a=o("text-sm [&_p]:leading-relaxed",r),e[3]=r,e[4]=a);let s;return e[5]!==t||e[6]!==i||e[7]!==a?(s=(0,f.jsx)("div",{ref:i,className:a,...t}),e[5]=t,e[6]=i,e[7]=a,e[8]=s):s=e[8],s});g.displayName="AlertDescription";export{g as n,c as r,u as t};
import{s as E}from"./chunk-LvLJmgfZ.js";import{t as Te}from"./react-BGmjiNul.js";import{t as P}from"./compiler-runtime-DeeZ7FnK.js";import{r as N}from"./useEventListener-DIUKKfEy.js";import{t as $e}from"./jsx-runtime-ZmTK25f3.js";import{n as R}from"./button-YC1gW_kJ.js";import{t as p}from"./cn-BKtXLv3a.js";import{E as M,S as ke,T as ze,_ as h,a as Be,b as He,d as We,f as b,i as qe,m as Ke,r as Le,s as Ue,t as Ve,u as Ye,w as v,x as w,y as Ze}from"./Combination-CMPwuAmi.js";var i=E(Te(),1),l=E($e(),1),j="Dialog",[S,T]=M(j),[Ge,f]=S(j),$=t=>{let{__scopeDialog:r,children:e,open:a,defaultOpen:o,onOpenChange:n,modal:s=!0}=t,c=i.useRef(null),d=i.useRef(null),[u,x]=ke({prop:a,defaultProp:o??!1,onChange:n,caller:j});return(0,l.jsx)(Ge,{scope:r,triggerRef:c,contentRef:d,contentId:b(),titleId:b(),descriptionId:b(),open:u,onOpenChange:x,onOpenToggle:i.useCallback(()=>x(Se=>!Se),[x]),modal:s,children:e})};$.displayName=j;var k="DialogTrigger",z=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(k,e),n=N(r,o.triggerRef);return(0,l.jsx)(h.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":O(o.open),...a,ref:n,onClick:v(t.onClick,o.onOpenToggle)})});z.displayName=k;var A="DialogPortal",[Je,B]=S(A,{forceMount:void 0}),H=t=>{let{__scopeDialog:r,forceMount:e,children:a,container:o}=t,n=f(A,r);return(0,l.jsx)(Je,{scope:r,forceMount:e,children:i.Children.map(a,s=>(0,l.jsx)(w,{present:e||n.open,children:(0,l.jsx)(We,{asChild:!0,container:o,children:s})}))})};H.displayName=A;var _="DialogOverlay",W=i.forwardRef((t,r)=>{let e=B(_,t.__scopeDialog),{forceMount:a=e.forceMount,...o}=t,n=f(_,t.__scopeDialog);return n.modal?(0,l.jsx)(w,{present:a||n.open,children:(0,l.jsx)(Xe,{...o,ref:r})}):null});W.displayName=_;var Qe=Ze("DialogOverlay.RemoveScroll"),Xe=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(_,e);return(0,l.jsx)(Ve,{as:Qe,allowPinchZoom:!0,shards:[o.contentRef],children:(0,l.jsx)(h.div,{"data-state":O(o.open),...a,ref:r,style:{pointerEvents:"auto",...a.style}})})}),y="DialogContent",q=i.forwardRef((t,r)=>{let e=B(y,t.__scopeDialog),{forceMount:a=e.forceMount,...o}=t,n=f(y,t.__scopeDialog);return(0,l.jsx)(w,{present:a||n.open,children:n.modal?(0,l.jsx)(er,{...o,ref:r}):(0,l.jsx)(rr,{...o,ref:r})})});q.displayName=y;var er=i.forwardRef((t,r)=>{let e=f(y,t.__scopeDialog),a=i.useRef(null),o=N(r,e.contentRef,a);return i.useEffect(()=>{let n=a.current;if(n)return Le(n)},[]),(0,l.jsx)(K,{...t,ref:o,trapFocus:e.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:v(t.onCloseAutoFocus,n=>{var s;n.preventDefault(),(s=e.triggerRef.current)==null||s.focus()}),onPointerDownOutside:v(t.onPointerDownOutside,n=>{let s=n.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&n.preventDefault()}),onFocusOutside:v(t.onFocusOutside,n=>n.preventDefault())})}),rr=i.forwardRef((t,r)=>{let e=f(y,t.__scopeDialog),a=i.useRef(!1),o=i.useRef(!1);return(0,l.jsx)(K,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var s,c;(s=t.onCloseAutoFocus)==null||s.call(t,n),n.defaultPrevented||(a.current||((c=e.triggerRef.current)==null||c.focus()),n.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:n=>{var c,d;(c=t.onInteractOutside)==null||c.call(t,n),n.defaultPrevented||(a.current=!0,n.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let s=n.target;(d=e.triggerRef.current)!=null&&d.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&o.current&&n.preventDefault()}})}),K=i.forwardRef((t,r)=>{let{__scopeDialog:e,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:n,...s}=t,c=f(y,e),d=i.useRef(null),u=N(r,d);return Be(),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qe,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:n,children:(0,l.jsx)(Ke,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":O(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ar,{titleId:c.titleId}),(0,l.jsx)(nr,{contentRef:d,descriptionId:c.descriptionId})]})]})}),C="DialogTitle",L=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(C,e);return(0,l.jsx)(h.h2,{id:o.titleId,...a,ref:r})});L.displayName=C;var U="DialogDescription",V=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(U,e);return(0,l.jsx)(h.p,{id:o.descriptionId,...a,ref:r})});V.displayName=U;var Y="DialogClose",Z=i.forwardRef((t,r)=>{let{__scopeDialog:e,...a}=t,o=f(Y,e);return(0,l.jsx)(h.button,{type:"button",...a,ref:r,onClick:v(t.onClick,()=>o.onOpenChange(!1))})});Z.displayName=Y;function O(t){return t?"open":"closed"}var G="DialogTitleWarning",[tr,J]=ze(G,{contentName:y,titleName:C,docsSlug:"dialog"}),ar=({titleId:t})=>{let r=J(G),e=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return i.useEffect(()=>{t&&(document.getElementById(t)||console.error(e))},[e,t]),null},or="DialogDescriptionWarning",nr=({contentRef:t,descriptionId:r})=>{let e=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${J(or).contentName}}.`;return i.useEffect(()=>{var o;let a=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");r&&a&&(document.getElementById(r)||console.warn(e))},[e,t,r]),null},Q=$,X=z,ee=H,re=W,te=q,ae=L,oe=V,I=Z,ne="AlertDialog",[sr,Cr]=M(ne,[T]),m=T(),se=t=>{let{__scopeAlertDialog:r,...e}=t,a=m(r);return(0,l.jsx)(Q,{...a,...e,modal:!0})};se.displayName=ne;var lr="AlertDialogTrigger",le=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(X,{...o,...a,ref:r})});le.displayName=lr;var ir="AlertDialogPortal",ie=t=>{let{__scopeAlertDialog:r,...e}=t,a=m(r);return(0,l.jsx)(ee,{...a,...e})};ie.displayName=ir;var cr="AlertDialogOverlay",ce=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(re,{...o,...a,ref:r})});ce.displayName=cr;var D="AlertDialogContent",[dr,ur]=sr(D),fr=He("AlertDialogContent"),de=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,children:a,...o}=t,n=m(e),s=i.useRef(null),c=N(r,s),d=i.useRef(null);return(0,l.jsx)(tr,{contentName:D,titleName:ue,docsSlug:"alert-dialog",children:(0,l.jsx)(dr,{scope:e,cancelRef:d,children:(0,l.jsxs)(te,{role:"alertdialog",...n,...o,ref:c,onOpenAutoFocus:v(o.onOpenAutoFocus,u=>{var x;u.preventDefault(),(x=d.current)==null||x.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[(0,l.jsx)(fr,{children:a}),(0,l.jsx)(mr,{contentRef:s})]})})})});de.displayName=D;var ue="AlertDialogTitle",fe=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(ae,{...o,...a,ref:r})});fe.displayName=ue;var pe="AlertDialogDescription",me=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(oe,{...o,...a,ref:r})});me.displayName=pe;var pr="AlertDialogAction",ge=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,o=m(e);return(0,l.jsx)(I,{...o,...a,ref:r})});ge.displayName=pr;var ye="AlertDialogCancel",xe=i.forwardRef((t,r)=>{let{__scopeAlertDialog:e,...a}=t,{cancelRef:o}=ur(ye,e),n=m(e),s=N(r,o);return(0,l.jsx)(I,{...n,...a,ref:s})});xe.displayName=ye;var mr=({contentRef:t})=>{let r=`\`${D}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${D}\` by passing a \`${pe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${D}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{var e;document.getElementById((e=t.current)==null?void 0:e.getAttribute("aria-describedby"))||console.warn(r)},[r,t]),null},gr=se,yr=le,ve=ie,De=ce,Ne=de,F=ge,he=xe,je=fe,_e=me,xr=P();function Re(){let t=(0,xr.c)(3),[r,e]=(0,i.useState)(null),a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{e(document.activeElement)},t[0]=a):a=t[0];let o=a,n;return t[1]===r?n=t[2]:(n={onOpenAutoFocus:o,onCloseAutoFocus:s=>{document.activeElement===document.body&&(r instanceof HTMLElement&&r.focus(),s.preventDefault())}},t[1]=r,t[2]=n),n}var g=P(),vr=gr,Dr=yr,be=Ue(({children:t,...r})=>(0,l.jsx)(ve,{...r,children:(0,l.jsx)(Ye,{children:(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-start sm:top-[15%]",children:t})})}));be.displayName=ve.displayName;var we=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;if(e[0]!==t){let{className:c,children:d,...u}=t;a=c,o=u,e[0]=t,e[1]=a,e[2]=o}else a=e[1],o=e[2];let n;e[3]===a?n=e[4]:(n=p("fixed inset-0 z-50 bg-background/80 backdrop-blur-xs transition-opacity animate-in fade-in",a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(De,{className:n,...o,ref:r}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});we.displayName=De.displayName;var Ae=i.forwardRef((t,r)=>{let e=(0,g.c)(11),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n=Re(),s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.jsx)(we,{}),e[3]=s):s=e[3];let c;e[4]===a?c=e[5]:(c=p("fixed z-50 grid w-full max-w-2xl scale-100 gap-4 border bg-background p-6 opacity-100 shadow-sm animate-in fade-in-90 slide-in-from-bottom-10 sm:rounded-lg sm:zoom-in-90 sm:slide-in-from-bottom-0 md:w-full",a),e[4]=a,e[5]=c);let d;return e[6]!==o||e[7]!==r||e[8]!==n||e[9]!==c?(d=(0,l.jsxs)(be,{children:[s,(0,l.jsx)(Ne,{ref:r,className:c,...n,...o})]}),e[6]=o,e[7]=r,e[8]=n,e[9]=c,e[10]=d):d=e[10],d});Ae.displayName=Ne.displayName;var Ce=t=>{let r=(0,g.c)(8),e,a;r[0]===t?(e=r[1],a=r[2]):({className:e,...a}=t,r[0]=t,r[1]=e,r[2]=a);let o;r[3]===e?o=r[4]:(o=p("flex flex-col space-y-2 text-center sm:text-left",e),r[3]=e,r[4]=o);let n;return r[5]!==a||r[6]!==o?(n=(0,l.jsx)("div",{className:o,...a}),r[5]=a,r[6]=o,r[7]=n):n=r[7],n};Ce.displayName="AlertDialogHeader";var Oe=t=>{let r=(0,g.c)(8),e,a;r[0]===t?(e=r[1],a=r[2]):({className:e,...a}=t,r[0]=t,r[1]=e,r[2]=a);let o;r[3]===e?o=r[4]:(o=p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),r[3]=e,r[4]=o);let n;return r[5]!==a||r[6]!==o?(n=(0,l.jsx)("div",{className:o,...a}),r[5]=a,r[6]=o,r[7]=n):n=r[7],n};Oe.displayName="AlertDialogFooter";var Ie=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p("text-lg font-semibold",a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(je,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Ie.displayName=je.displayName;var Fe=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p("text-muted-foreground",a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(_e,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Fe.displayName=_e.displayName;var Ee=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p(R(),a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(F,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Ee.displayName=F.displayName;var Pe=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p(R({variant:"destructive"}),a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(F,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Pe.displayName="AlertDialogDestructiveAction";var Me=i.forwardRef((t,r)=>{let e=(0,g.c)(9),a,o;e[0]===t?(a=e[1],o=e[2]):({className:a,...o}=t,e[0]=t,e[1]=a,e[2]=o);let n;e[3]===a?n=e[4]:(n=p(R({variant:"secondary"}),"mt-2 sm:mt-0",a),e[3]=a,e[4]=n);let s;return e[5]!==o||e[6]!==r||e[7]!==n?(s=(0,l.jsx)(he,{ref:r,className:n,...o}),e[5]=o,e[6]=r,e[7]=n,e[8]=s):s=e[8],s});Me.displayName=he.displayName;export{Q as _,Fe as a,Ce as c,Re as d,I as f,ee as g,re as h,Ae as i,Ie as l,oe as m,Ee as n,Pe as o,te as p,Me as r,Oe as s,vr as t,Dr as u,ae as v,X as y};
import{s as a}from"./chunk-LvLJmgfZ.js";import{t as u}from"./react-BGmjiNul.js";import"./react-dom-C9fstfnp.js";import"./compiler-runtime-DeeZ7FnK.js";import{d}from"./hotkeys-BHHWjLlp.js";import{t as f}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import"./Combination-CMPwuAmi.js";import{t as c}from"./copy-icon-BhONVREY.js";import{n as h}from"./error-banner-DUzsIXtq.js";import{t as g}from"./esm-DpMp6qko.js";import"./dist-C9XNJlLJ.js";import"./dist-fsvXrTzp.js";import"./dist-6cIjG-FS.js";import"./dist-CldbmzwA.js";import"./dist-OM63llNV.js";import"./dist-BmvOPdv_.js";import"./dist-DDGPBuw4.js";import"./dist-C4h-1T2Q.js";import"./dist-D_XLVesh.js";import{n as v,t as m}from"./esm-l4kcybiY.js";var j=a(u(),1),t=a(f(),1);const p={python:"py",javascript:"js",typescript:"ts",shell:"sh",bash:"sh"};function e(o){return o?o in m:!1}var x=({language:o,showCopyButton:n,extensions:r=[],...s})=>{o=p[o||""]||o;let i=e(o);i||d.warn(`Language ${o} not found in CodeMirror.`);let l=(0,j.useMemo)(()=>e(o)?[v(o),...r].filter(Boolean):r,[o,r]);return(0,t.jsxs)("div",{className:"relative w-full group hover-actions-parent",children:[!i&&(0,t.jsx)(h,{className:"mb-1 rounded-sm",error:`Language ${o} not supported.
Supported languages are: ${Object.keys(m).join(", ")}`}),n&&i&&(0,t.jsx)(c,{tooltip:!1,buttonClassName:"absolute top-2 right-2 z-10 hover-action",className:"h-4 w-4 text-muted-foreground",value:s.value||"",toastTitle:"Copied to clipboard"}),(0,t.jsx)(g,{...s,extensions:l})]})};export{p as LANGUAGE_MAP,x as default};
import{t as a}from"./apl-DVWF09P_.js";export{a as apl};
var l={"+":["conjugate","add"],"\u2212":["negate","subtract"],"\xD7":["signOf","multiply"],"\xF7":["reciprocal","divide"],"\u2308":["ceiling","greaterOf"],"\u230A":["floor","lesserOf"],"\u2223":["absolute","residue"],"\u2373":["indexGenerate","indexOf"],"?":["roll","deal"],"\u22C6":["exponentiate","toThePowerOf"],"\u235F":["naturalLog","logToTheBase"],"\u25CB":["piTimes","circularFuncs"],"!":["factorial","binomial"],"\u2339":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"\u2264":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"\u2265":[null,"greaterThanOrEqual"],"\u2260":[null,"notEqual"],"\u2261":["depth","match"],"\u2262":[null,"notMatch"],"\u2208":["enlist","membership"],"\u2377":[null,"find"],"\u222A":["unique","union"],"\u2229":[null,"intersection"],"\u223C":["not","without"],"\u2228":[null,"or"],"\u2227":[null,"and"],"\u2371":[null,"nor"],"\u2372":[null,"nand"],"\u2374":["shapeOf","reshape"],",":["ravel","catenate"],"\u236A":[null,"firstAxisCatenate"],"\u233D":["reverse","rotate"],"\u2296":["axis1Reverse","axis1Rotate"],"\u2349":["transpose",null],"\u2191":["first","take"],"\u2193":[null,"drop"],"\u2282":["enclose","partitionWithAxis"],"\u2283":["diclose","pick"],"\u2337":[null,"index"],"\u234B":["gradeUp",null],"\u2352":["gradeDown",null],"\u22A4":["encode",null],"\u22A5":["decode",null],"\u2355":["format","formatByExample"],"\u234E":["execute",null],"\u22A3":["stop","left"],"\u22A2":["pass","right"]},a=/[\.\/⌿⍀¨⍣]/,r=/⍬/,i=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,u=/←/,o=/[⍝#].*$/,s=function(n){var t=!1;return function(e){return t=e,e===n?t==="\\":!0}};const p={name:"apl",startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(n,t){var e;return n.eatSpace()?null:(e=n.next(),e==='"'||e==="'"?(n.eatWhile(s(e)),n.next(),t.prev=!0,"string"):/[\[{\(]/.test(e)?(t.prev=!1,null):/[\]}\)]/.test(e)?(t.prev=!0,null):r.test(e)?(t.prev=!1,"atom"):/[¯\d]/.test(e)?(t.func?(t.func=!1,t.prev=!1):t.prev=!0,n.eatWhile(/[\w\.]/),"number"):a.test(e)||u.test(e)?"operator":i.test(e)?(t.func=!0,t.prev=!1,l[e]?"variableName.function.standard":"variableName.function"):o.test(e)?(n.skipToEnd(),"comment"):e==="\u2218"&&n.peek()==="."?(n.next(),"variableName.function"):(n.eatWhile(/[\w\$_]/),t.prev=!0,"keyword"))}};export{p as t};
import{s as D}from"./chunk-LvLJmgfZ.js";import{l as X}from"./useEvent-DO6uJBas.js";import{t as Z}from"./react-BGmjiNul.js";import{St as z}from"./cells-BpZ7g6ok.js";import{t as E}from"./compiler-runtime-DeeZ7FnK.js";import{G as $,S as ee,c as te,i as se,l as le,n as ae,u as ne}from"./ai-model-dropdown-71lgLrLy.js";import{C as oe,v as re,w as Q}from"./utils-DXvhzCGS.js";import{j as ie}from"./config-CIrPQIbt.js";import{t as ce}from"./jsx-runtime-ZmTK25f3.js";import{t as de}from"./button-YC1gW_kJ.js";import{l as R}from"./once-Bul8mtFs.js";import{r as U}from"./requests-BsVD4CdD.js";import{t as he}from"./createLucideIcon-CnW3RofX.js";import{h as me,l as B}from"./select-V5IdpNiR.js";import{r as I}from"./input-pAun1m1X.js";import{t as Y}from"./settings-DOXWMfVd.js";import{a as L,c as M,d as A,g as xe,i as pe,l as F,o as P,p as fe,u as S}from"./textarea-DBO30D7K.js";import{t as ue}from"./use-toast-rmUWldD_.js";import{t as G}from"./tooltip-CEc2ajau.js";import{o as je}from"./alert-dialog-DwQffb13.js";import{c as ve,l as ge,n as be,t as K}from"./dialog-CxGKN4C_.js";import{i as we,r as ye,t as Ne}from"./popover-Gz-GJzym.js";import{n as Ce}from"./useDebounce-D5NcotGm.js";import{n as ke}from"./ImperativeModal-CUbWEBci.js";import{t as O}from"./kbd-C3JY7O_u.js";import{t as _e}from"./links-DHZUhGz-.js";import{t as V}from"./Inputs-D2Xn4HON.js";var Se=he("power-off",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Te=E(),s=D(ce(),1);const Le=t=>{let e=(0,Te.c)(15),{description:a,disabled:f,tooltip:r}=t,i=f===void 0?!1:f,u=r===void 0?"Shutdown":r,{openConfirm:b,closeModal:l}=ke(),{sendShutdown:n}=U(),w;e[0]===n?w=e[1]:(w=()=>{n(),setTimeout(Me,200)},e[0]=n,e[1]=w);let j=w;if(ie())return null;let m=i?"disabled":"red",c;e[2]!==l||e[3]!==a||e[4]!==j||e[5]!==b?(c=h=>{h.stopPropagation(),b({title:"Shutdown",description:a,variant:"destructive",confirmAction:(0,s.jsx)(je,{onClick:()=>{j(),l()},"aria-label":"Confirm Shutdown",children:"Shutdown"})})},e[2]=l,e[3]=a,e[4]=j,e[5]=b,e[6]=c):c=e[6];let o;e[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)(me,{strokeWidth:1}),e[7]=o):o=e[7];let d;e[8]!==i||e[9]!==m||e[10]!==c?(d=(0,s.jsx)(V,{"aria-label":"Shutdown","data-testid":"shutdown-button",shape:"circle",size:"small",color:m,className:"h-[27px] w-[27px]",disabled:i,onClick:c,children:o}),e[8]=i,e[9]=m,e[10]=c,e[11]=d):d=e[11];let x;return e[12]!==d||e[13]!==u?(x=(0,s.jsx)(G,{content:u,children:d}),e[12]=d,e[13]=u,e[14]=x):x=e[14],x};function Me(){window.close()}var J=E(),W=D(Z(),1),Ae=100;const Fe=()=>{let t=(0,J.c)(37),[e,a]=re(),{saveAppConfig:f}=U(),r=(0,W.useId)(),i=(0,W.useId)(),u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=fe(oe),t[0]=u):u=t[0];let b;t[1]===e?b=t[2]:(b={resolver:u,defaultValues:e},t[1]=e,t[2]=b);let l=xe(b),n;t[3]!==f||t[4]!==a?(n=async p=>{await f({config:p}).then(()=>{a(p)}).catch(()=>{a(p)})},t[3]=f,t[4]=a,t[5]=n):n=t[5];let w=n,j;t[6]===w?j=t[7]:(j=p=>{w(p)},t[6]=w,t[7]=j);let m=Ce(j,Ae),c;t[8]===e.width?c=t[9]:(c=[e.width],t[8]=e.width,t[9]=c),(0,W.useEffect)(Pe,c);let o;t[10]!==m||t[11]!==l?(o=l.handleSubmit(m),t[10]=m,t[11]=l,t[12]=o):o=t[12];let d;t[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsxs)("div",{children:[(0,s.jsx)(ne,{children:"Notebook Settings"}),(0,s.jsx)(le,{children:"Configure how your notebook or application looks and behaves."})]}),t[13]=d):d=t[13];let x;t[14]===l.control?x=t[15]:(x=(0,s.jsxs)(H,{title:"Display",children:[(0,s.jsx)(M,{control:l.control,name:"width",render:He}),(0,s.jsx)(M,{control:l.control,name:"app_title",render:Ee})]}),t[14]=l.control,t[15]=x);let h;t[16]===l.control?h=t[17]:(h=(0,s.jsxs)(H,{title:"Custom Files",children:[(0,s.jsx)(M,{control:l.control,name:"css_file",render:Ie}),(0,s.jsx)(M,{control:l.control,name:"html_head_file",render:Oe})]}),t[16]=l.control,t[17]=h);let y;t[18]===l.control?y=t[19]:(y=(0,s.jsx)(H,{title:"Data",children:(0,s.jsx)(M,{control:l.control,name:"sql_output",render:De})}),t[18]=l.control,t[19]=y);let N;t[20]!==r||t[21]!==i?(N=p=>{let{field:_}=p;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-col gap-2",children:[(0,s.jsx)(L,{children:(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(z,{id:r,"data-testid":"html-checkbox",checked:_.value.includes("html"),onCheckedChange:()=>{_.onChange(R(_.value,"html"))}}),(0,s.jsx)(S,{htmlFor:r,children:"HTML"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(z,{id:i,"data-testid":"ipynb-checkbox",checked:_.value.includes("ipynb"),onCheckedChange:()=>{_.onChange(R(_.value,"ipynb"))}}),(0,s.jsx)(S,{htmlFor:i,children:"IPYNB"})]})]})}),(0,s.jsx)(A,{})]}),(0,s.jsxs)(P,{children:["When enabled, marimo will periodically save this notebook in your selected formats (HTML, IPYNB) to a folder named"," ",(0,s.jsx)(O,{className:"inline",children:"__marimo__"})," next to your notebook file."]})]})},t[20]=r,t[21]=i,t[22]=N):N=t[22];let v;t[23]!==l.control||t[24]!==N?(v=(0,s.jsx)(H,{title:"Exporting outputs",children:(0,s.jsx)(M,{control:l.control,name:"auto_download",render:N})}),t[23]=l.control,t[24]=N,t[25]=v):v=t[25];let C;t[26]!==v||t[27]!==x||t[28]!==h||t[29]!==y?(C=(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-4",children:[x,h,y,v]}),t[26]=v,t[27]=x,t[28]=h,t[29]=y,t[30]=C):C=t[30];let g;t[31]!==C||t[32]!==o?(g=(0,s.jsxs)("form",{onChange:o,className:"flex flex-col gap-6",children:[d,C]}),t[31]=C,t[32]=o,t[33]=g):g=t[33];let k;return t[34]!==l||t[35]!==g?(k=(0,s.jsx)(pe,{...l,children:g}),t[34]=l,t[35]=g,t[36]=k):k=t[36],k};var H=t=>{let e=(0,J.c)(5),{title:a,children:f}=t,r;e[0]===a?r=e[1]:(r=(0,s.jsx)("h3",{className:"text-base font-semibold mb-1",children:a}),e[0]=a,e[1]=r);let i;return e[2]!==f||e[3]!==r?(i=(0,s.jsxs)("div",{className:"flex flex-col gap-y-2",children:[r,f]}),e[2]=f,e[3]=r,e[4]=i):i=e[4],i};function Pe(){window.dispatchEvent(new Event("resize"))}function qe(t){return(0,s.jsx)("option",{value:t,children:t},t)}function He(t){let{field:e}=t;return(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"Width"}),(0,s.jsx)(L,{children:(0,s.jsx)(B,{"data-testid":"app-width-select",onChange:a=>e.onChange(a.target.value),value:e.value,disabled:e.disabled,className:"inline-flex mr-2",children:ee().map(qe)})}),(0,s.jsx)(A,{})]})}function Ee(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"App title"}),(0,s.jsx)(L,{children:(0,s.jsx)(I,{...e,value:e.value??"",onChange:a=>{e.onChange(a.target.value),Q.safeParse(a.target.value).success&&(document.title=a.target.value)}})}),(0,s.jsx)(A,{})]}),(0,s.jsx)(P,{children:"The application title is put in the title tag in the HTML code and typically displayed in the title bar of the browser window."})]})}function Ie(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{className:"shrink-0",children:"Custom CSS"}),(0,s.jsx)(L,{children:(0,s.jsx)(I,{...e,value:e.value??"",placeholder:"custom.css",onChange:a=>{e.onChange(a.target.value),Q.safeParse(a.target.value).success&&(document.title=a.target.value)}})}),(0,s.jsx)(A,{})]}),(0,s.jsx)(P,{children:"A filepath to a custom css file to be injected into the notebook."})]})}function Oe(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{className:"shrink-0",children:"HTML Head"}),(0,s.jsx)(L,{children:(0,s.jsx)(I,{...e,value:e.value??"",placeholder:"head.html",onChange:a=>{e.onChange(a.target.value)}})}),(0,s.jsx)(A,{})]}),(0,s.jsxs)(P,{children:["A filepath to an HTML file to be injected into the"," ",(0,s.jsx)(O,{className:"inline",children:"<head/>"})," section of the notebook. Use this to add analytics, custom fonts, meta tags, or external scripts."]})]})}function We(t){return(0,s.jsx)("option",{value:t.value,children:t.label},t.value)}function De(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"SQL Output Type"}),(0,s.jsx)(L,{children:(0,s.jsx)(B,{"data-testid":"sql-output-select",onChange:a=>{e.onChange(a.target.value),ue({title:"Kernel Restart Required",description:"This change requires a kernel restart to take effect."})},value:e.value,disabled:e.disabled,className:"inline-flex mr-2",children:te.map(We)})}),(0,s.jsx)(A,{})]}),(0,s.jsxs)(P,{children:["The Python type returned by a SQL cell. For best performance with large datasets, we recommend using"," ",(0,s.jsx)(O,{className:"inline",children:"native"}),". See the"," ",(0,s.jsx)(_e,{href:"https://docs.marimo.io/guides/working_with_data/sql",children:"SQL guide"})," ","for more information."]})]})}var ze=E();const Qe=t=>{let e=(0,ze.c)(32),{showAppConfig:a,disabled:f,tooltip:r}=t,i=a===void 0?!0:a,u=f===void 0?!1:f,b=r===void 0?"Settings":r,[l,n]=X(ae),w=u?"disabled":"hint-green",j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=(0,s.jsx)(Y,{strokeWidth:1.8}),e[0]=j):j=e[0];let m;e[1]===b?m=e[2]:(m=(0,s.jsx)(G,{content:b,children:j}),e[1]=b,e[2]=m);let c;e[3]!==u||e[4]!==w||e[5]!==m?(c=(0,s.jsx)(V,{"aria-label":"Config","data-testid":"app-config-button",shape:"circle",size:"small",className:"h-[27px] w-[27px]",disabled:u,color:w,children:m}),e[3]=u,e[4]=w,e[5]=m,e[6]=c):c=e[6];let o=c,d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsxs)(be,{className:"w-[90vw] h-[90vh] overflow-hidden sm:max-w-5xl top-[5vh] p-0",children:[(0,s.jsx)($,{children:(0,s.jsx)(ve,{children:"User settings"})}),(0,s.jsx)(se,{})]}),e[7]=d):d=e[7];let x=d;if(!i){let T;e[8]===o?T=e[9]:(T=(0,s.jsx)(ge,{children:o}),e[8]=o,e[9]=T);let q;return e[10]!==n||e[11]!==l||e[12]!==T?(q=(0,s.jsxs)(K,{open:l,onOpenChange:n,children:[T,x]}),e[10]=n,e[11]=l,e[12]=T,e[13]=q):q=e[13],q}let h;e[14]===o?h=e[15]:(h=(0,s.jsx)(we,{asChild:!0,children:o}),e[14]=o,e[15]=h);let y,N;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=(0,s.jsx)(Fe,{}),N=(0,s.jsx)("div",{className:"h-px bg-border my-2"}),e[16]=y,e[17]=N):(y=e[16],N=e[17]);let v;e[18]===n?v=e[19]:(v=()=>n(!0),e[18]=n,e[19]=v);let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=(0,s.jsx)(Y,{strokeWidth:1.8,className:"w-4 h-4 mr-2"}),e[20]=C):C=e[20];let g;e[21]===v?g=e[22]:(g=(0,s.jsxs)(ye,{className:"w-[650px] overflow-auto max-h-[80vh] max-w-[80vw]",align:"end",side:"bottom",onFocusOutside:Re,children:[y,N,(0,s.jsxs)(de,{onClick:v,variant:"link",className:"px-0",children:[C,"User settings"]})]}),e[21]=v,e[22]=g);let k;e[23]!==g||e[24]!==h?(k=(0,s.jsxs)(Ne,{children:[h,g]}),e[23]=g,e[24]=h,e[25]=k):k=e[25];let p;e[26]!==n||e[27]!==l?(p=(0,s.jsx)(K,{open:l,onOpenChange:n,children:x}),e[26]=n,e[27]=l,e[28]=p):p=e[28];let _;return e[29]!==k||e[30]!==p?(_=(0,s.jsxs)(s.Fragment,{children:[k,p]}),e[29]=k,e[30]=p,e[31]=_):_=e[31],_};function Re(t){return t.preventDefault()}export{Le as n,Se as r,Qe as t};
import{r as P,t as an}from"./path-BMloFSsK.js";import{a as Q,c as cn,d as _,f as q,i,l as H,n as on,p as sn,r as rn,s as tn,t as en,u as un}from"./math-BIeW4iGV.js";function yn(o){return o.innerRadius}function ln(o){return o.outerRadius}function fn(o){return o.startAngle}function pn(o){return o.endAngle}function xn(o){return o&&o.padAngle}function gn(o,h,C,b,v,d,F,e){var D=C-o,a=b-h,n=F-v,p=e-d,t=p*D-n*a;if(!(t*t<1e-12))return t=(n*(h-d)-p*(o-v))/t,[o+t*D,h+t*a]}function X(o,h,C,b,v,d,F){var e=o-C,D=h-b,a=(F?d:-d)/q(e*e+D*D),n=a*D,p=-a*e,t=o+n,c=h+p,y=C+n,l=b+p,I=(t+y)/2,s=(c+l)/2,x=y-t,f=l-c,T=x*x+f*f,k=v-d,A=t*l-y*c,E=(f<0?-1:1)*q(cn(0,k*k*T-A*A)),O=(A*f-x*E)/T,R=(-A*x-f*E)/T,S=(A*f+x*E)/T,g=(-A*x+f*E)/T,m=O-I,r=R-s,u=S-I,L=g-s;return m*m+r*r>u*u+L*L&&(O=S,R=g),{cx:O,cy:R,x01:-n,y01:-p,x11:O*(v/k-1),y11:R*(v/k-1)}}function mn(){var o=yn,h=ln,C=P(0),b=null,v=fn,d=pn,F=xn,e=null,D=an(a);function a(){var n,p,t=+o.apply(this,arguments),c=+h.apply(this,arguments),y=v.apply(this,arguments)-tn,l=d.apply(this,arguments)-tn,I=en(l-y),s=l>y;if(e||(e=n=D()),c<t&&(p=c,c=t,t=p),!(c>1e-12))e.moveTo(0,0);else if(I>sn-1e-12)e.moveTo(c*Q(y),c*_(y)),e.arc(0,0,c,y,l,!s),t>1e-12&&(e.moveTo(t*Q(l),t*_(l)),e.arc(0,0,t,l,y,s));else{var x=y,f=l,T=y,k=l,A=I,E=I,O=F.apply(this,arguments)/2,R=O>1e-12&&(b?+b.apply(this,arguments):q(t*t+c*c)),S=H(en(c-t)/2,+C.apply(this,arguments)),g=S,m=S,r,u;if(R>1e-12){var L=rn(R/t*_(O)),J=rn(R/c*_(O));(A-=L*2)>1e-12?(L*=s?1:-1,T+=L,k-=L):(A=0,T=k=(y+l)/2),(E-=J*2)>1e-12?(J*=s?1:-1,x+=J,f-=J):(E=0,x=f=(y+l)/2)}var Z=c*Q(x),j=c*_(x),M=t*Q(k),N=t*_(k);if(S>1e-12){var U=c*Q(f),W=c*_(f),Y=t*Q(T),G=t*_(T),w;if(I<un)if(w=gn(Z,j,Y,G,U,W,M,N)){var K=Z-w[0],z=j-w[1],B=U-w[0],$=W-w[1],V=1/_(on((K*B+z*$)/(q(K*K+z*z)*q(B*B+$*$)))/2),nn=q(w[0]*w[0]+w[1]*w[1]);g=H(S,(t-nn)/(V-1)),m=H(S,(c-nn)/(V+1))}else g=m=0}E>1e-12?m>1e-12?(r=X(Y,G,Z,j,c,m,s),u=X(U,W,M,N,c,m,s),e.moveTo(r.cx+r.x01,r.cy+r.y01),m<S?e.arc(r.cx,r.cy,m,i(r.y01,r.x01),i(u.y01,u.x01),!s):(e.arc(r.cx,r.cy,m,i(r.y01,r.x01),i(r.y11,r.x11),!s),e.arc(0,0,c,i(r.cy+r.y11,r.cx+r.x11),i(u.cy+u.y11,u.cx+u.x11),!s),e.arc(u.cx,u.cy,m,i(u.y11,u.x11),i(u.y01,u.x01),!s))):(e.moveTo(Z,j),e.arc(0,0,c,x,f,!s)):e.moveTo(Z,j),!(t>1e-12)||!(A>1e-12)?e.lineTo(M,N):g>1e-12?(r=X(M,N,U,W,t,-g,s),u=X(Z,j,Y,G,t,-g,s),e.lineTo(r.cx+r.x01,r.cy+r.y01),g<S?e.arc(r.cx,r.cy,g,i(r.y01,r.x01),i(u.y01,u.x01),!s):(e.arc(r.cx,r.cy,g,i(r.y01,r.x01),i(r.y11,r.x11),!s),e.arc(0,0,t,i(r.cy+r.y11,r.cx+r.x11),i(u.cy+u.y11,u.cx+u.x11),s),e.arc(u.cx,u.cy,g,i(u.y11,u.x11),i(u.y01,u.x01),!s))):e.arc(0,0,t,k,T,s)}if(e.closePath(),n)return e=null,n+""||null}return a.centroid=function(){var n=(+o.apply(this,arguments)+ +h.apply(this,arguments))/2,p=(+v.apply(this,arguments)+ +d.apply(this,arguments))/2-un/2;return[Q(p)*n,_(p)*n]},a.innerRadius=function(n){return arguments.length?(o=typeof n=="function"?n:P(+n),a):o},a.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:P(+n),a):h},a.cornerRadius=function(n){return arguments.length?(C=typeof n=="function"?n:P(+n),a):C},a.padRadius=function(n){return arguments.length?(b=n==null?null:typeof n=="function"?n:P(+n),a):b},a.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:P(+n),a):v},a.endAngle=function(n){return arguments.length?(d=typeof n=="function"?n:P(+n),a):d},a.padAngle=function(n){return arguments.length?(F=typeof n=="function"?n:P(+n),a):F},a.context=function(n){return arguments.length?(e=n??null,a):e},a}export{mn as t};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as r}from"./chunk-O7ZBX7Z2-CsMGWxKA.js";export{r as createArchitectureServices};

Sorry, the diff of this file is too big to display

Array.prototype.slice;function t(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}export{t};
import{t}from"./createLucideIcon-CnW3RofX.js";var r=t("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);export{r as t};
import{t as r}from"./asciiarmor-l0ikukqg.js";export{r as asciiArmor};
function a(e){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?"error":null}const o={name:"asciiarmor",token:function(e,t){var r;if(t.state=="top")return e.sol()&&(r=e.match(/^-----BEGIN (.*)?-----\s*$/))?(t.state="headers",t.type=r[1],"tag"):a(e);if(t.state=="headers"){if(e.sol()&&e.match(/^\w+:/))return t.state="header","atom";var s=a(e);return s&&(t.state="body"),s}else{if(t.state=="header")return e.skipToEnd(),t.state="headers","string";if(t.state=="body")return e.sol()&&(r=e.match(/^-----END (.*)?-----\s*$/))?r[1]==t.type?(t.state="end","tag"):"error":e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error");if(t.state=="end")return a(e)}},blankLine:function(e){e.state=="headers"&&(e.state="body")},startState:function(){return{state:"top",type:null}}};export{o as t};
function s(i){for(var u={},A=i.split(" "),T=0;T<A.length;++T)u[A[T]]=!0;return u}var a={keywords:s("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS"),cmipVerbs:s("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),compareTypes:s("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION"),status:s("current deprecated mandatory obsolete"),tags:s("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL"),storage:s("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminString TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64"),modifier:s("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED"),accessTypes:s("not-accessible accessible-for-notify read-only read-create read-write"),multiLineStrings:!0};function L(i){var u=i.keywords||a.keywords,A=i.cmipVerbs||a.cmipVerbs,T=i.compareTypes||a.compareTypes,c=i.status||a.status,O=i.tags||a.tags,d=i.storage||a.storage,C=i.modifier||a.modifier,R=i.accessTypes||a.accessTypes,f=i.multiLineStrings||a.multiLineStrings,g=i.indentStatements!==!1,p=/[\|\^]/,E;function D(e,n){var t=e.next();if(t=='"'||t=="'")return n.tokenize=y(t),n.tokenize(e,n);if(/[\[\]\(\){}:=,;]/.test(t))return E=t,"punctuation";if(t=="-"&&e.eat("-"))return e.skipToEnd(),"comment";if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(p.test(t))return e.eatWhile(p),"operator";e.eatWhile(/[\w\-]/);var r=e.current();return u.propertyIsEnumerable(r)?"keyword":A.propertyIsEnumerable(r)?"variableName":T.propertyIsEnumerable(r)?"atom":c.propertyIsEnumerable(r)?"comment":O.propertyIsEnumerable(r)?"typeName":d.propertyIsEnumerable(r)||C.propertyIsEnumerable(r)||R.propertyIsEnumerable(r)?"modifier":"variableName"}function y(e){return function(n,t){for(var r=!1,S,m=!1;(S=n.next())!=null;){if(S==e&&!r){var I=n.peek();I&&(I=I.toLowerCase(),(I=="b"||I=="h"||I=="o")&&n.next()),m=!0;break}r=!r&&S=="\\"}return(m||!(r||f))&&(t.tokenize=null),"string"}}function l(e,n,t,r,S){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=S}function N(e,n,t){var r=e.indented;return e.context&&e.context.type=="statement"&&(r=e.context.indented),e.context=new l(r,n,t,null,e.context)}function o(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}return{name:"asn1",startState:function(){return{tokenize:null,context:new l(-2,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align??(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;E=null;var r=(n.tokenize||D)(e,n);if(r=="comment")return r;if(t.align??(t.align=!0),(E==";"||E==":"||E==",")&&t.type=="statement")o(n);else if(E=="{")N(n,e.column(),"}");else if(E=="[")N(n,e.column(),"]");else if(E=="(")N(n,e.column(),")");else if(E=="}"){for(;t.type=="statement";)t=o(n);for(t.type=="}"&&(t=o(n));t.type=="statement";)t=o(n)}else E==t.type?o(n):g&&((t.type=="}"||t.type=="top")&&E!=";"||t.type=="statement"&&E=="newstatement")&&N(n,e.column(),"statement");return n.startOfLine=!1,r},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"--"}}}}export{L as t};
import{t as a}from"./asn1-CsdiW8T7.js";export{a as asn1};
var n=["exten","same","include","ignorepat","switch"],r=["#include","#exec"],o="addqueuemember.adsiprog.aelsub.agentlogin.agentmonitoroutgoing.agi.alarmreceiver.amd.answer.authenticate.background.backgrounddetect.bridge.busy.callcompletioncancel.callcompletionrequest.celgenuserevent.changemonitor.chanisavail.channelredirect.chanspy.clearhash.confbridge.congestion.continuewhile.controlplayback.dahdiacceptr2call.dahdibarge.dahdiras.dahdiscan.dahdisendcallreroutingfacility.dahdisendkeypadfacility.datetime.dbdel.dbdeltree.deadagi.dial.dictate.directory.disa.dumpchan.eagi.echo.endwhile.exec.execif.execiftime.exitwhile.extenspy.externalivr.festival.flash.followme.forkcdr.getcpeid.gosub.gosubif.goto.gotoif.gotoiftime.hangup.iax2provision.ices.importvar.incomplete.ivrdemo.jabberjoin.jabberleave.jabbersend.jabbersendgroup.jabberstatus.jack.log.macro.macroexclusive.macroexit.macroif.mailboxexists.meetme.meetmeadmin.meetmechanneladmin.meetmecount.milliwatt.minivmaccmess.minivmdelete.minivmgreet.minivmmwi.minivmnotify.minivmrecord.mixmonitor.monitor.morsecode.mp3player.mset.musiconhold.nbscat.nocdr.noop.odbc.odbc.odbcfinish.originate.ospauth.ospfinish.osplookup.ospnext.page.park.parkandannounce.parkedcall.pausemonitor.pausequeuemember.pickup.pickupchan.playback.playtones.privacymanager.proceeding.progress.queue.queuelog.raiseexception.read.readexten.readfile.receivefax.receivefax.receivefax.record.removequeuemember.resetcdr.retrydial.return.ringing.sayalpha.saycountedadj.saycountednoun.saycountpl.saydigits.saynumber.sayphonetic.sayunixtime.senddtmf.sendfax.sendfax.sendfax.sendimage.sendtext.sendurl.set.setamaflags.setcallerpres.setmusiconhold.sipaddheader.sipdtmfmode.sipremoveheader.skel.slastation.slatrunk.sms.softhangup.speechactivategrammar.speechbackground.speechcreate.speechdeactivategrammar.speechdestroy.speechloadgrammar.speechprocessingsound.speechstart.speechunloadgrammar.stackpop.startmusiconhold.stopmixmonitor.stopmonitor.stopmusiconhold.stopplaytones.system.testclient.testserver.transfer.tryexec.trysystem.unpausemonitor.unpausequeuemember.userevent.verbose.vmauthenticate.vmsayname.voicemail.voicemailmain.wait.waitexten.waitfornoise.waitforring.waitforsilence.waitmusiconhold.waituntil.while.zapateller".split(".");function s(e,t){var a="",i=e.next();if(t.blockComment)return i=="-"&&e.match("-;",!0)?t.blockComment=!1:e.skipTo("--;")?(e.next(),e.next(),e.next(),t.blockComment=!1):e.skipToEnd(),"comment";if(i==";")return e.match("--",!0)&&!e.match("-",!1)?(t.blockComment=!0,"comment"):(e.skipToEnd(),"comment");if(i=="[")return e.skipTo("]"),e.eat("]"),"header";if(i=='"')return e.skipTo('"'),"string";if(i=="'")return e.skipTo("'"),"string.special";if(i=="#"&&(e.eatWhile(/\w/),a=e.current(),r.indexOf(a)!==-1))return e.skipToEnd(),"strong";if(i=="$"&&e.peek()=="{")return e.skipTo("}"),e.eat("}"),"variableName.special";if(e.eatWhile(/\w/),a=e.current(),n.indexOf(a)!==-1){switch(t.extenStart=!0,a){case"same":t.extenSame=!0;break;case"include":case"switch":case"ignorepat":t.extenInclude=!0;break;default:break}return"atom"}}const c={name:"asterisk",startState:function(){return{blockComment:!1,extenStart:!1,extenSame:!1,extenInclude:!1,extenExten:!1,extenPriority:!1,extenApplication:!1}},token:function(e,t){var a="";if(e.eatSpace())return null;if(t.extenStart)return e.eatWhile(/[^\s]/),a=e.current(),/^=>?$/.test(a)?(t.extenExten=!0,t.extenStart=!1,"strong"):(t.extenStart=!1,e.skipToEnd(),"error");if(t.extenExten)return t.extenExten=!1,t.extenPriority=!0,e.eatWhile(/[^,]/),t.extenInclude&&(t.extenInclude=(e.skipToEnd(),t.extenPriority=!1,!1)),t.extenSame&&(t.extenPriority=!1,t.extenSame=!1,t.extenApplication=!0),"tag";if(t.extenPriority)return t.extenPriority=!1,t.extenApplication=!0,e.next(),t.extenSame?null:(e.eatWhile(/[^,]/),"number");if(t.extenApplication){if(e.eatWhile(/,/),a=e.current(),a===",")return null;if(e.eatWhile(/\w/),a=e.current().toLowerCase(),t.extenApplication=!1,o.indexOf(a)!==-1)return"def"}else return s(e,t);return null},languageData:{commentTokens:{line:";",block:{open:";--",close:"--;"}}}};export{c as asterisk};
import{s as i}from"./chunk-LvLJmgfZ.js";import{t as d}from"./react-BGmjiNul.js";import{t as l}from"./compiler-runtime-DeeZ7FnK.js";import{t as u}from"./jsx-runtime-ZmTK25f3.js";import{n as f,t as g}from"./cn-BKtXLv3a.js";var b=l();d();var c=i(u(),1),m=f("inline-flex items-center border rounded-full px-2 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary hover:bg-primary/60 border-transparent text-primary-foreground",defaultOutline:"bg-(--blue-2) border-(--blue-8) text-(--blue-11)",secondary:"bg-secondary hover:bg-secondary/80 border-transparent text-secondary-foreground",destructive:"bg-(--red-2) border-(--red-6) text-(--red-9) hover:bg-(--red-3)",success:"bg-(--grass-2) border-(--grass-5) text-(--grass-9) hover:bg-(--grass-3)",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),p=n=>{let r=(0,b.c)(10),e,t,a;r[0]===n?(e=r[1],t=r[2],a=r[3]):({className:e,variant:a,...t}=n,r[0]=n,r[1]=e,r[2]=t,r[3]=a);let o;r[4]!==e||r[5]!==a?(o=g(m({variant:a}),e),r[4]=e,r[5]=a,r[6]=o):o=r[6];let s;return r[7]!==t||r[8]!==o?(s=(0,c.jsx)("div",{className:o,...t}),r[7]=t,r[8]=o,r[9]=s):s=r[9],s};export{p as t};
function u(r){return new Promise((a,i)=>{let t=new FileReader;t.onload=e=>{var n;a((n=e.target)==null?void 0:n.result)},t.onerror=e=>{i(Error(`Failed to read blob: ${e.type}`))},t.readAsDataURL(r)})}function b(r){return new Promise((a,i)=>{var t;try{let[e,n]=r.split(",",2),d=(t=/^data:(.+);base64$/.exec(e))==null?void 0:t[1],l=atob(n),s=l.length,c=new Uint8Array(s);for(let o=0;o<s;o++)c[o]=l.charCodeAt(o);a(new Blob([c],{type:d}))}catch(e){i(f(e))}})}function f(r){return r instanceof Error?r:Error(`${r}`)}export{u as n,b as t};

Sorry, the diff of this file is too big to display

import{t as r}from"./brainfuck-C66TQVgP.js";export{r as brainfuck};
var r="><+-.,[]".split("");const o={name:"brainfuck",startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(n,t){if(n.eatSpace())return null;n.sol()&&(t.commentLine=!1);var e=n.next().toString();if(r.indexOf(e)!==-1){if(t.commentLine===!0)return n.eol()&&(t.commentLine=!1),"comment";if(e==="]"||e==="[")return e==="["?t.left++:t.right++,"bracket";if(e==="+"||e==="-")return"keyword";if(e==="<"||e===">")return"atom";if(e==="."||e===",")return"def"}else return t.commentLine=!0,n.eol()&&(t.commentLine=!1),"comment";n.eol()&&(t.commentLine=!1)}};export{o as t};
import{s as S}from"./chunk-LvLJmgfZ.js";import{t as m}from"./react-BGmjiNul.js";var n=S(m());function k(e,u){var r=(0,n.useRef)(null),c=(0,n.useRef)(null);c.current=u;var t=(0,n.useRef)(null);(0,n.useEffect)(function(){f()});var f=(0,n.useCallback)(function(){var i=t.current,s=c.current,o=i||(s?s instanceof Element?s:s.current:null);r.current&&r.current.element===o&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:o,subscriber:e,cleanup:o?e(o):void 0})},[e]);return(0,n.useEffect)(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),(0,n.useCallback)(function(i){t.current=i,f()},[f])}function g(e,u,r){return e[u]?e[u][0]?e[u][0][r]:e[u][r]:u==="contentBoxSize"?e.contentRect[r==="inlineSize"?"width":"height"]:void 0}function B(e){e===void 0&&(e={});var u=e.onResize,r=(0,n.useRef)(void 0);r.current=u;var c=e.round||Math.round,t=(0,n.useRef)(),f=(0,n.useState)({width:void 0,height:void 0}),i=f[0],s=f[1],o=(0,n.useRef)(!1);(0,n.useEffect)(function(){return o.current=!1,function(){o.current=!0}},[]);var a=(0,n.useRef)({width:void 0,height:void 0}),h=k((0,n.useCallback)(function(v){return(!t.current||t.current.box!==e.box||t.current.round!==c)&&(t.current={box:e.box,round:c,instance:new ResizeObserver(function(z){var b=z[0],x=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",p=g(b,x,"inlineSize"),w=g(b,x,"blockSize"),l=p?c(p):void 0,d=w?c(w):void 0;if(a.current.width!==l||a.current.height!==d){var R={width:l,height:d};a.current.width=l,a.current.height=d,r.current?r.current(R):o.current||s(R)}})}),t.current.instance.observe(v,{box:e.box}),function(){t.current&&t.current.instance.unobserve(v)}},[e.box,c]),e.ref);return(0,n.useMemo)(function(){return{ref:h,width:i.width,height:i.height}},[h,i.width,i.height])}export{B as t};
import{s as k}from"./chunk-LvLJmgfZ.js";import{t as R}from"./react-BGmjiNul.js";import{t as j}from"./compiler-runtime-DeeZ7FnK.js";import{l as I}from"./hotkeys-BHHWjLlp.js";import{n as S,t as K}from"./useEventListener-DIUKKfEy.js";import{t as O}from"./jsx-runtime-ZmTK25f3.js";import{n as A,t as d}from"./cn-BKtXLv3a.js";var a=k(R(),1),w=k(O(),1),D=Symbol.for("react.lazy"),h=a.use;function P(e){return typeof e=="object"&&!!e&&"then"in e}function C(e){return typeof e=="object"&&!!e&&"$$typeof"in e&&e.$$typeof===D&&"_payload"in e&&P(e._payload)}function N(e){let r=$(e),t=a.forwardRef((n,o)=>{let{children:i,...l}=n;C(i)&&typeof h=="function"&&(i=h(i._payload));let s=a.Children.toArray(i),u=s.find(H);if(u){let p=u.props.children,c=s.map(g=>g===u?a.Children.count(p)>1?a.Children.only(null):a.isValidElement(p)?p.props.children:null:g);return(0,w.jsx)(r,{...l,ref:o,children:a.isValidElement(p)?a.cloneElement(p,void 0,c):null})}return(0,w.jsx)(r,{...l,ref:o,children:i})});return t.displayName=`${e}.Slot`,t}var _=N("Slot");function $(e){let r=a.forwardRef((t,n)=>{let{children:o,...i}=t;if(C(o)&&typeof h=="function"&&(o=h(o._payload)),a.isValidElement(o)){let l=W(o),s=V(i,o.props);return o.type!==a.Fragment&&(s.ref=n?S(n,l):l),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var z=Symbol("radix.slottable");function H(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z}function V(e,r){let t={...r};for(let n in r){let o=e[n],i=r[n];/^on[A-Z]/.test(n)?o&&i?t[n]=(...l)=>{let s=i(...l);return o(...l),s}:o&&(t[n]=o):n==="style"?t[n]={...o,...i}:n==="className"&&(t[n]=[o,i].filter(Boolean).join(" "))}return{...e,...t}}function W(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const E={stopPropagation:e=>r=>{r.stopPropagation(),e&&e(r)},onEnter:e=>r=>{r.key==="Enter"&&e&&e(r)},preventFocus:e=>{e.preventDefault()},fromInput:e=>{let r=e.target;return r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.tagName.startsWith("MARIMO")||r.isContentEditable||E.fromCodeMirror(e)},fromCodeMirror:e=>e.target.closest(".cm-editor")!==null,shouldIgnoreKeyboardEvent(e){return e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement||e.target instanceof HTMLElement&&(e.target.isContentEditable||e.target.tagName==="BUTTON"||e.target.closest("[role='textbox']")!==null||e.target.closest("[contenteditable='true']")!==null||e.target.closest(".cm-editor")!==null)},hasModifier:e=>e.ctrlKey||e.metaKey||e.altKey||e.shiftKey,isMetaOrCtrl:e=>e.metaKey||e.ctrlKey};var L=j(),f="active:shadow-none",T=A(d("disabled:opacity-50 disabled:pointer-events-none","inline-flex items-center justify-center rounded-md text-sm font-medium focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background"),{variants:{variant:{default:d("bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs border border-primary",f),destructive:d("border shadow-xs","bg-(--red-9) hover:bg-(--red-10) dark:bg-(--red-6) dark:hover:bg-(--red-7)","text-(--red-1) dark:text-(--red-12)","border-(--red-11)",f),success:d("border shadow-xs","bg-(--grass-9) hover:bg-(--grass-10) dark:bg-(--grass-6) dark:hover:bg-(--grass-7)","text-(--grass-1) dark:text-(--grass-12)","border-(--grass-11)",f),warn:d("border shadow-xs","bg-(--yellow-9) hover:bg-(--yellow-10) dark:bg-(--yellow-6) dark:hover:bg-(--yellow-7)","text-(--yellow-12)","border-(--yellow-11)",f),action:d("bg-action text-action-foreground shadow-xs","hover:bg-action-hover border border-action",f),outline:d("border border-slate-300 shadow-xs","hover:bg-accent hover:text-accent-foreground","hover:border-primary","aria-selected:text-accent-foreground aria-selected:border-primary",f),secondary:d("bg-secondary text-secondary-foreground hover:bg-secondary/80","border border-input shadow-xs",f),text:d("opacity-80 hover:opacity-100","active:opacity-100"),ghost:d("border border-transparent","hover:bg-accent hover:text-accent-foreground hover:shadow-xs",f,"active:text-accent-foreground"),link:"underline-offset-4 hover:underline text-link",linkDestructive:"underline-offset-4 hover:underline text-destructive underline-destructive",outlineDestructive:"border border-destructive text-destructive hover:bg-destructive/10"},size:{default:"h-10 py-2 px-4",xs:"h-7 px-2 rounded-md text-xs",sm:"h-9 px-3 rounded-md",lg:"h-11 px-8 rounded-md",icon:"h-6 w-6 mb-0"},disabled:{true:"opacity-50 pointer-events-none"}},defaultVariants:{variant:"default",size:"sm"}}),M=a.forwardRef((e,r)=>{let t=(0,L.c)(7),{className:n,variant:o,size:i,asChild:l,keyboardShortcut:s,...u}=e,p=l===void 0?!1:l,c=a.useRef(null),g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>c.current,t[0]=g):g=t[0],a.useImperativeHandle(r,g);let b;t[1]===s?b=t[2]:(b=y=>{s&&(E.shouldIgnoreKeyboardEvent(y)||I(s)(y)&&(y.preventDefault(),y.stopPropagation(),c!=null&&c.current&&!c.current.disabled&&c.current.click()))},t[1]=s,t[2]=b),K(document,"keydown",b);let v=p?_:"button",x=d(T({variant:o,size:i,className:n,disabled:u.disabled}),n),m;return t[3]!==v||t[4]!==u||t[5]!==x?(m=(0,w.jsx)(v,{className:x,ref:c,...u}),t[3]=v,t[4]=u,t[5]=x,t[6]=m):m=t[6],m});M.displayName="Button";export{N as a,_ as i,T as n,E as r,M as t};

Sorry, the diff of this file is too big to display

import{s as z}from"./chunk-LvLJmgfZ.js";import{u as O}from"./useEvent-DO6uJBas.js";import{t as A}from"./react-BGmjiNul.js";import"./react-dom-C9fstfnp.js";import{t as B}from"./compiler-runtime-DeeZ7FnK.js";import{t as R}from"./jsx-runtime-ZmTK25f3.js";import{t as P}from"./button-YC1gW_kJ.js";import{t as G}from"./cn-BKtXLv3a.js";import{r as H}from"./requests-BsVD4CdD.js";import{t as _}from"./database-zap-B9y7063w.js";import{t as S}from"./spinner-DaIKav-i.js";import{t as F}from"./refresh-cw-CQd-1kjx.js";import{t as K}from"./trash-2-CyqGun26.js";import{t as D}from"./use-toast-rmUWldD_.js";import"./Combination-CMPwuAmi.js";import{a as q,c as J,i as Q,l as U,n as V,o as W,r as X,s as Y,t as Z,u as ee}from"./alert-dialog-DwQffb13.js";import{t as se}from"./context-JwD-oSsl.js";import{r as m}from"./numbers-iQunIAXf.js";import{n as te}from"./useAsyncData-C4XRy1BE.js";import{t as E}from"./empty-state-h8C2C6hZ.js";import{t as ae}from"./requests-BEWfBENt.js";var ie=B(),I=z(A(),1),s=z(R(),1);const re=i=>{let e=(0,ie.c)(27),{children:t,title:l,description:r,onConfirm:a,confirmText:c,cancelText:o,destructive:n}=i,y=c===void 0?"Continue":c,u=o===void 0?"Cancel":o,p=n===void 0?!1:n,[j,k]=I.useState(!1),f;e[0]===a?f=e[1]:(f=()=>{a(),k(!1)},e[0]=a,e[1]=f);let v=f,h=p?W:V,x;e[2]===t?x=e[3]:(x=(0,s.jsx)(ee,{asChild:!0,children:t}),e[2]=t,e[3]=x);let d;e[4]===l?d=e[5]:(d=(0,s.jsx)(U,{children:l}),e[4]=l,e[5]=d);let g;e[6]===r?g=e[7]:(g=(0,s.jsx)(q,{children:r}),e[6]=r,e[7]=g);let N;e[8]!==d||e[9]!==g?(N=(0,s.jsxs)(J,{children:[d,g]}),e[8]=d,e[9]=g,e[10]=N):N=e[10];let b;e[11]===u?b=e[12]:(b=(0,s.jsx)(X,{children:u}),e[11]=u,e[12]=b);let C;e[13]!==h||e[14]!==y||e[15]!==v?(C=(0,s.jsx)(h,{onClick:v,children:y}),e[13]=h,e[14]=y,e[15]=v,e[16]=C):C=e[16];let w;e[17]!==C||e[18]!==b?(w=(0,s.jsxs)(Y,{children:[b,C]}),e[17]=C,e[18]=b,e[19]=w):w=e[19];let $;e[20]!==w||e[21]!==N?($=(0,s.jsxs)(Q,{children:[N,w]}),e[20]=w,e[21]=N,e[22]=$):$=e[22];let M;return e[23]!==j||e[24]!==$||e[25]!==x?(M=(0,s.jsxs)(Z,{open:j,onOpenChange:k,children:[x,$]}),e[23]=j,e[24]=$,e[25]=x,e[26]=M):M=e[26],M};function L(i,e){if(i===0||i===-1)return"0 B";let t=1024,l=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(i)/Math.log(t));return`${m(i/t**r,e)} ${l[r]}`}function le(i,e){if(i===0)return"0s";if(i<.001)return`${m(i*1e6,e)}\xB5s`;if(i<1)return`${m(i*1e3,e)}ms`;if(i<60)return`${m(i,e)}s`;let t=Math.floor(i/60),l=i%60;if(t<60)return l>0?`${t}m ${m(l,e)}s`:`${t}m`;let r=Math.floor(t/60),a=t%60;return a>0?`${r}h ${a}m`:`${r}h`}var oe=B(),ce=()=>{let{clearCache:i,getCacheInfo:e}=H(),t=O(ae),[l,r]=(0,I.useState)(!1),{locale:a}=se(),{isPending:c,isFetching:o,refetch:n}=te(async()=>{await e(),await new Promise(d=>setTimeout(d,500))},[]),y=async()=>{try{r(!0),await i(),D({title:"Cache purged",description:"All cached data has been cleared"}),n()}catch(d){D({title:"Error",description:d instanceof Error?d.message:"Failed to purge cache",variant:"danger"})}finally{r(!1)}};if(c&&!t)return(0,s.jsx)(S,{size:"medium",centered:!0});let u=(0,s.jsxs)(P,{variant:"outline",size:"sm",onClick:n,disabled:o,children:[o?(0,s.jsx)(S,{size:"small",className:"w-4 h-4 mr-2"}):(0,s.jsx)(F,{className:"w-4 h-4 mr-2"}),"Refresh"]});if(!t)return(0,s.jsx)(E,{title:"No cache data",description:"Cache information is not available.",icon:(0,s.jsx)(_,{}),action:u});let p=t.hits,j=t.misses,k=t.time,f=t.disk_total,v=t.disk_to_free,h=p+j,x=h>0?p/h*100:0;return h===0?(0,s.jsx)(E,{title:"No cache activity",description:"The cache has not been used yet. Cached functions will appear here once they are executed.",icon:(0,s.jsx)(_,{}),action:u}):(0,s.jsx)("div",{className:"flex flex-col h-full overflow-auto",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4 p-4 h-full",children:[(0,s.jsx)("div",{className:"flex items-center justify-end",children:(0,s.jsx)(P,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:n,disabled:o,children:(0,s.jsx)(F,{className:G("h-4 w-4 text-muted-foreground hover:text-foreground",o&&"animate-[spin_0.5s]")})})}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Statistics"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(T,{label:"Time saved",value:le(k,a),description:"Total execution time saved"}),(0,s.jsx)(T,{label:"Hit rate",value:h>0?`${m(x,a)}%`:"\u2014",description:`${m(p,a)} hits / ${m(h,a)} total`}),(0,s.jsx)(T,{label:"Cache hits",value:m(p,a),description:"Successful cache retrievals"}),(0,s.jsx)(T,{label:"Cache misses",value:m(j,a),description:"Cache not found"})]})]}),f>0&&(0,s.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Storage"}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3",children:(0,s.jsx)(T,{label:"Disk usage",value:L(f,a),description:v>0?`${L(v,a)} can be freed`:"Cache storage on disk"})})]}),(0,s.jsx)("div",{className:"my-auto"}),(0,s.jsx)("div",{className:"pt-2 border-t",children:(0,s.jsx)(re,{title:"Purge cache?",description:"This will permanently delete all cached data. This action cannot be undone.",confirmText:"Purge",destructive:!0,onConfirm:y,children:(0,s.jsxs)(P,{variant:"outlineDestructive",size:"xs",disabled:l,className:"w-full",children:[l?(0,s.jsx)(S,{size:"small",className:"w-3 h-3 mr-2"}):(0,s.jsx)(K,{className:"w-3 h-3 mr-2"}),"Purge Cache"]})})})]})})},T=i=>{let e=(0,oe.c)(10),{label:t,value:l,description:r}=i,a;e[0]===t?a=e[1]:(a=(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t}),e[0]=t,e[1]=a);let c;e[2]===l?c=e[3]:(c=(0,s.jsx)("span",{className:"text-lg font-semibold",children:l}),e[2]=l,e[3]=c);let o;e[4]===r?o=e[5]:(o=r&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:r}),e[4]=r,e[5]=o);let n;return e[6]!==a||e[7]!==c||e[8]!==o?(n=(0,s.jsxs)("div",{className:"flex flex-col gap-1 p-3 rounded-lg border bg-card",children:[a,c,o]}),e[6]=a,e[7]=c,e[8]=o,e[9]=n):n=e[9],n},ne=ce;export{ne as default};

Sorry, the diff of this file is too big to display

import{s as j}from"./chunk-LvLJmgfZ.js";import{d as w,l as P,n as y,u as A}from"./useEvent-DO6uJBas.js";import{Jr as _,Xt as L,ai as O,j as E,k as S,vt as T,w as $,zt as D}from"./cells-BpZ7g6ok.js";import{t as b}from"./compiler-runtime-DeeZ7FnK.js";import{d as F}from"./hotkeys-BHHWjLlp.js";import{d as q}from"./utils-DXvhzCGS.js";import{r as I}from"./constants-B6Cb__3x.js";import{A as z,p as B,w as H}from"./config-CIrPQIbt.js";import{t as J}from"./jsx-runtime-ZmTK25f3.js";import{t as M}from"./cn-BKtXLv3a.js";import{r as R}from"./requests-BsVD4CdD.js";import{n as U}from"./ImperativeModal-CUbWEBci.js";var V=b();function N(){return A(_)}function X(){let r=(0,V.c)(5),[t]=P(H),e=w(_),{openAlert:a}=U(),{sendRename:o}=R(),s;return r[0]!==t.state||r[1]!==a||r[2]!==o||r[3]!==e?(s=async l=>{let n=q();return t.state===z.OPEN?(B(i=>{l===null?i.delete(I.filePath):i.set(I.filePath,l)}),o({filename:l}).then(()=>(e(l),document.title=n.app_title||D.basename(l)||"Untitled Notebook",l)).catch(i=>(a(i.message),null))):(a("Failed to save notebook: not connected to a kernel."),null)},r[0]=t.state,r[1]=a,r[2]=o,r[3]=e,r[4]=s):s=r[4],y(s)}var p=b(),v=j(J(),1);const k=r=>{let t=(0,p.c)(12),{className:e,cellId:a,variant:o,onClick:s,formatCellName:l,skipScroll:n}=r,i=E()[a]??"",C=S().inOrderIds.indexOf(a),{showCellIfHidden:d}=$(),g=l??Q,c;t[0]===e?c=t[1]:(c=M("inline-block cursor-pointer text-link hover:underline",e),t[0]=e,t[1]=c);let m;t[2]!==a||t[3]!==s||t[4]!==d||t[5]!==n||t[6]!==o?(m=h=>{if(a==="__scratch__")return!1;d({cellId:a}),h.stopPropagation(),h.preventDefault(),requestAnimationFrame(()=>{x(a,o,n)&&(s==null||s())})},t[2]=a,t[3]=s,t[4]=d,t[5]=n,t[6]=o,t[7]=m):m=t[7];let f=g(T(i,C)),u;return t[8]!==c||t[9]!==m||t[10]!==f?(u=(0,v.jsx)("div",{className:c,role:"link",tabIndex:-1,onClick:m,children:f}),t[8]=c,t[9]=m,t[10]=f,t[11]=u):u=t[11],u},G=r=>{let t=(0,p.c)(2),e;return t[0]===r?e=t[1]:(e=(0,v.jsx)(k,{...r,variant:"destructive"}),t[0]=r,t[1]=e),e},K=r=>{let t=(0,p.c)(10),{cellId:e,lineNumber:a}=r,o=N(),s;t[0]!==e||t[1]!==a?(s=()=>L(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];let l;t[3]!==e||t[4]!==o?(l=i=>e==="__scratch__"?"scratch":`marimo://${o||"untitled"}#cell=${i}`,t[3]=e,t[4]=o,t[5]=l):l=t[5];let n;return t[6]!==e||t[7]!==s||t[8]!==l?(n=(0,v.jsx)(k,{cellId:e,onClick:s,skipScroll:!0,variant:"destructive",className:"traceback-cell-link",formatCellName:l}),t[6]=e,t[7]=s,t[8]=l,t[9]=n):n=t[9],n};function x(r,t,e){let a=O.create(r),o=document.getElementById(a);return o===null?(F.error(`Cell ${a} not found on page.`),!1):(e||o.scrollIntoView({behavior:"smooth",block:"center"}),t==="destructive"&&(o.classList.add("error-outline"),setTimeout(()=>{o.classList.remove("error-outline")},2e3)),t==="focus"&&(o.classList.add("focus-outline"),setTimeout(()=>{o.classList.remove("focus-outline")},2e3)),!0)}function Q(r){return r}export{N as a,x as i,G as n,X as o,K as r,k as t};

Sorry, the diff of this file is too big to display

import{s as $}from"./chunk-LvLJmgfZ.js";import{t as z}from"./react-BGmjiNul.js";import{Z as F}from"./cells-BpZ7g6ok.js";import{t as O}from"./compiler-runtime-DeeZ7FnK.js";import{d as B}from"./hotkeys-BHHWjLlp.js";import{t as L}from"./jsx-runtime-ZmTK25f3.js";import{t as V}from"./createLucideIcon-CnW3RofX.js";import{c as Z,l as A,n as G,t as _}from"./toDate-CgbKQM5E.js";import{t as J}from"./ellipsis-5ip-qDfN.js";import{t as R}from"./refresh-cw-CQd-1kjx.js";import{t as K}from"./workflow-CMjI9cxl.js";import{t as D}from"./tooltip-CEc2ajau.js";import{i as Q,n as Y,r as C,t as U}from"./en-US-pRRbZZHE.js";import{t as E}from"./useDateFormatter-CS4kbWl2.js";import{t as H}from"./multi-icon-DZsiUPo5.js";var k=V("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function X(n,e){let t=_(n)-+_(e);return t<0?-1:t>0?1:t}function ee(n){return G(n,Date.now())}function te(n,e,t){let[d,l]=Y(t==null?void 0:t.in,n,e),h=d.getFullYear()-l.getFullYear(),o=d.getMonth()-l.getMonth();return h*12+o}function se(n){return e=>{let t=(n?Math[n]:Math.trunc)(e);return t===0?0:t}}function ae(n,e){return _(n)-+_(e)}function le(n,e){let t=_(n,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}function ne(n,e){let t=_(n,e==null?void 0:e.in),d=t.getMonth();return t.setFullYear(t.getFullYear(),d+1,0),t.setHours(23,59,59,999),t}function re(n,e){let t=_(n,e==null?void 0:e.in);return+le(t,e)==+ne(t,e)}function ie(n,e,t){let[d,l,h]=Y(t==null?void 0:t.in,n,n,e),o=X(l,h),b=Math.abs(te(l,h));if(b<1)return 0;l.getMonth()===1&&l.getDate()>27&&l.setDate(30),l.setMonth(l.getMonth()-o*b);let m=X(l,h)===-o;re(d)&&b===1&&X(d,h)===1&&(m=!1);let x=o*(b-+m);return x===0?0:x}function ce(n,e,t){let d=ae(n,e)/1e3;return se(t==null?void 0:t.roundingMethod)(d)}function oe(n,e,t){let d=Q(),l=(t==null?void 0:t.locale)??d.locale??U,h=X(n,e);if(isNaN(h))throw RangeError("Invalid time value");let o=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:h}),[b,m]=Y(t==null?void 0:t.in,...h>0?[e,n]:[n,e]),x=ce(m,b),M=(C(m)-C(b))/1e3,p=Math.round((x-M)/60),T;if(p<2)return t!=null&&t.includeSeconds?x<5?l.formatDistance("lessThanXSeconds",5,o):x<10?l.formatDistance("lessThanXSeconds",10,o):x<20?l.formatDistance("lessThanXSeconds",20,o):x<40?l.formatDistance("halfAMinute",0,o):x<60?l.formatDistance("lessThanXMinutes",1,o):l.formatDistance("xMinutes",1,o):p===0?l.formatDistance("lessThanXMinutes",1,o):l.formatDistance("xMinutes",p,o);if(p<45)return l.formatDistance("xMinutes",p,o);if(p<90)return l.formatDistance("aboutXHours",1,o);if(p<1440){let g=Math.round(p/60);return l.formatDistance("aboutXHours",g,o)}else{if(p<2520)return l.formatDistance("xDays",1,o);if(p<43200){let g=Math.round(p/Z);return l.formatDistance("xDays",g,o)}else if(p<43200*2)return T=Math.round(p/A),l.formatDistance("aboutXMonths",T,o)}if(T=ie(m,b),T<12){let g=Math.round(p/A);return l.formatDistance("xMonths",g,o)}else{let g=T%12,u=Math.trunc(T/12);return g<3?l.formatDistance("aboutXYears",u,o):g<9?l.formatDistance("overXYears",u,o):l.formatDistance("almostXYears",u+1,o)}}function ue(n,e){return oe(n,ee(n),e)}var I=$(z(),1);function de(n){let e=(0,I.useRef)(n),[t,d]=(0,I.useState)(n);return(0,I.useEffect)(()=>{let l=setInterval(()=>{d(F.now().toMilliseconds())},17);return()=>clearInterval(l)},[]),t-e.current}var P=O(),s=$(L(),1);const me=n=>{let e=(0,P.c)(79),{editing:t,status:d,disabled:l,staleInputs:h,edited:o,interrupted:b,elapsedTime:m,runStartTimestamp:x,lastRunStartTimestamp:M,uninstantiated:p}=n;if(!t)return null;let T=x??M,g;e[0]===T?g=e[1]:(g=T?(0,s.jsx)(he,{lastRanTime:T}):null,e[0]=T,e[1]=g);let u=g;if(l&&d==="running")return B.error("CellStatusComponent: disabled and running"),null;if(l&&h){let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is stale, but it's disabled and can't be run"}),e[2]=c):c=e[2];let a;e[3]===u?a=e[4]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[3]=u,e[4]=a);let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-stale","data-testid":"cell-status","data-status":"stale",children:(0,s.jsxs)(H,{children:[(0,s.jsx)(k,{className:"h-5 w-5",strokeWidth:1.5}),(0,s.jsx)(R,{className:"h-3 w-3",strokeWidth:2.5})]})}),e[5]=i):i=e[5];let r;return e[6]===a?r=e[7]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[6]=a,e[7]=r),r}if(l){let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is disabled"}),e[8]=c):c=e[8];let a;e[9]===u?a=e[10]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[9]=u,e[10]=a);let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-disabled","data-testid":"cell-status","data-status":"disabled",children:(0,s.jsx)(k,{className:"h-5 w-5",strokeWidth:1.5})}),e[11]=i):i=e[11];let r;return e[12]===a?r=e[13]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[12]=a,e[13]=r),r}if(!h&&d==="disabled-transitively"){let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"An ancestor of this cell is disabled, so it can't be run"}),e[14]=c):c=e[14];let a;e[15]===u?a=e[16]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[15]=u,e[16]=a);let i;e[17]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-stale","data-testid":"cell-status","data-status":"disabled-transitively",children:(0,s.jsxs)(H,{layerTop:!0,children:[(0,s.jsx)(K,{className:"h-5 w-5",strokeWidth:1.5}),(0,s.jsx)(k,{className:"h-3 w-3",strokeWidth:2.5})]})}),e[17]=i):i=e[17];let r;return e[18]===a?r=e[19]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[18]=a,e[19]=r),r}if(h&&d==="disabled-transitively"){let c;e[20]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is stale, but an ancestor is disabled so it can't be run"}),e[20]=c):c=e[20];let a;e[21]===u?a=e[22]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[21]=u,e[22]=a);let i;e[23]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-stale","data-testid":"cell-status","data-status":"stale",children:(0,s.jsxs)(H,{children:[(0,s.jsx)(R,{className:"h-5 w-5",strokeWidth:1}),(0,s.jsx)(k,{className:"h-3 w-3",strokeWidth:2.5})]})}),e[23]=i):i=e[23];let r;return e[24]===a?r=e[25]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[24]=a,e[25]=r),r}if(d==="running"){let c;e[26]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is running"}),e[26]=c):c=e[26];let a;e[27]===u?a=e[28]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[27]=u,e[28]=a);let i;e[29]===x?i=e[30]:(i=F.fromSeconds(x)||F.now(),e[29]=x,e[30]=i);let r;e[31]===i?r=e[32]:(r=(0,s.jsx)("div",{className:"cell-status-icon elapsed-time running","data-testid":"cell-status","data-status":"running",children:(0,s.jsx)(fe,{startTime:i})}),e[31]=i,e[32]=r);let f;return e[33]!==a||e[34]!==r?(f=(0,s.jsx)(D,{content:a,usePortal:!0,children:r}),e[33]=a,e[34]=r,e[35]=f):f=e[35],f}if(d==="queued"){let c;e[36]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("span",{children:"This cell is queued to run"}),e[36]=c):c=e[36];let a;e[37]===u?a=e[38]:(a=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[c,u]}),e[37]=u,e[38]=a);let i;e[39]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"cell-status-icon cell-status-queued","data-testid":"cell-status","data-status":"queued",children:(0,s.jsx)(J,{className:"h-5 w-5",strokeWidth:1.5})}),e[39]=i):i=e[39];let r;return e[40]===a?r=e[41]:(r=(0,s.jsx)(D,{content:a,usePortal:!0,children:i}),e[40]=a,e[41]=r),r}if(o||b||h||p){let c;e[42]===m?c=e[43]:(c=W(m),e[42]=m,e[43]=c);let a=c,i;e[44]!==m||e[45]!==a?(i=m?(0,s.jsx)(q,{elapsedTime:a}):null,e[44]=m,e[45]=a,e[46]=i):i=e[46];let r=i,f,v="";if(p)f="This cell has not yet been run";else if(b){f="This cell was interrupted when it was last run";let j;e[47]===r?j=e[48]:(j=(0,s.jsxs)("span",{children:["This cell ran for ",r," before being interrupted"]}),e[47]=r,e[48]=j),v=j}else if(o){f="This cell has been modified since it was last run";let j;e[49]===r?j=e[50]:(j=(0,s.jsxs)("span",{children:["This cell took ",r," to run"]}),e[49]=r,e[50]=j),v=j}else{f="This cell has not been run with the latest inputs";let j;e[51]===r?j=e[52]:(j=(0,s.jsxs)("span",{children:["This cell took ",r," to run"]}),e[51]=r,e[52]=j),v=j}let N;e[53]===Symbol.for("react.memo_cache_sentinel")?(N=(0,s.jsx)("div",{className:"cell-status-stale","data-testid":"cell-status","data-status":"outdated",children:(0,s.jsx)(R,{className:"h-5 w-5",strokeWidth:1.5})}),e[53]=N):N=e[53];let S;e[54]===f?S=e[55]:(S=(0,s.jsx)(D,{content:f,usePortal:!0,children:N}),e[54]=f,e[55]=S);let y;e[56]!==m||e[57]!==a||e[58]!==u||e[59]!==v?(y=m&&(0,s.jsx)(D,{content:(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[v,u]}),usePortal:!0,children:(0,s.jsx)("div",{className:"elapsed-time hover-action","data-testid":"cell-status","data-status":"outdated",children:(0,s.jsx)("span",{children:a})})}),e[56]=m,e[57]=a,e[58]=u,e[59]=v,e[60]=y):y=e[60];let w;return e[61]!==S||e[62]!==y?(w=(0,s.jsxs)("div",{className:"cell-status-icon flex items-center gap-2",children:[S,y]}),e[61]=S,e[62]=y,e[63]=w):w=e[63],w}if(m!==null){let c;e[64]===m?c=e[65]:(c=W(m),e[64]=m,e[65]=c);let a=c,i;e[66]!==m||e[67]!==a?(i=m?(0,s.jsx)(q,{elapsedTime:a}):null,e[66]=m,e[67]=a,e[68]=i):i=e[68];let r=i,f;e[69]===r?f=e[70]:(f=(0,s.jsxs)("span",{children:["This cell took ",r," to run"]}),e[69]=r,e[70]=f);let v;e[71]!==u||e[72]!==f?(v=(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[f,u]}),e[71]=u,e[72]=f,e[73]=v):v=e[73];let N;e[74]===a?N=e[75]:(N=(0,s.jsx)("div",{className:"cell-status-icon elapsed-time hover-action","data-testid":"cell-status","data-status":"idle",children:(0,s.jsx)("span",{children:a})}),e[74]=a,e[75]=N);let S;return e[76]!==v||e[77]!==N?(S=(0,s.jsx)(D,{content:v,usePortal:!0,children:N}),e[76]=v,e[77]=N,e[78]=S):S=e[78],S}return null},q=n=>{let e=(0,P.c)(2),t;return e[0]===n.elapsedTime?t=e[1]:(t=(0,s.jsx)("span",{className:"tracking-wide font-semibold",children:n.elapsedTime}),e[0]=n.elapsedTime,e[1]=t),t};var he=n=>{let e=(0,P.c)(4),t=new Date(n.lastRanTime*1e3),d=new Date,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,hour12:!0},e[0]=l):l=e[0];let h=E(l),o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,hour12:!0},e[1]=o):o=e[1];let b=E(o),m=t.toDateString()===d.toDateString()?h:b,x=ue(t),M;return e[2]===x?M=e[3]:(M=(0,s.jsxs)("span",{className:"text-muted-foreground",children:["(",x," ago)"]}),e[2]=x,e[3]=M),(0,s.jsxs)("span",{children:["Ran at"," ",(0,s.jsx)("strong",{className:"tracking-wide font-semibold",children:m.format(t)})," ",M]})};function W(n){if(n===null)return"";let e=n,t=e/1e3;return t>=60?`${Math.floor(t/60)}m${Math.floor(t%60)}s`:t>=1?`${t.toFixed(2).toString()}s`:`${e.toFixed(0).toString()}ms`}var fe=n=>{let e=(0,P.c)(6),t;e[0]===n.startTime?t=e[1]:(t=n.startTime.toMilliseconds(),e[0]=n.startTime,e[1]=t);let d=de(t),l;e[2]===d?l=e[3]:(l=W(d),e[2]=d,e[3]=l);let h;return e[4]===l?h=e[5]:(h=(0,s.jsx)("span",{children:l}),e[4]=l,e[5]=h),h};export{q as n,W as r,me as t};
import{et as r,tt as e}from"./chunk-ABZYJK2D-t8l6Viza.js";var o=(t,a)=>e.lang.round(r.parse(t)[a]);export{o as t};
import{t}from"./createLucideIcon-CnW3RofX.js";var a=t("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]]);export{a as t};
import{s as f}from"./chunk-LvLJmgfZ.js";import{t as y}from"./react-BGmjiNul.js";import{Un as g}from"./cells-BpZ7g6ok.js";import{t as j}from"./compiler-runtime-DeeZ7FnK.js";import{t as N}from"./jsx-runtime-ZmTK25f3.js";import{t as k}from"./cn-BKtXLv3a.js";import{t as x}from"./createLucideIcon-CnW3RofX.js";import{h as w}from"./select-V5IdpNiR.js";import{t as u}from"./file-Cs1JbsV6.js";import{n as M}from"./play-BPIh-ZEU.js";var b=x("bot-message-square",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z",key:"11gyqh"}],["path",{d:"M9 11v2",key:"1ueba0"}]]),v=x("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]),d=j(),_=f(y(),1),o=f(N(),1);const q=i=>{var c;let e=(0,d.c)(6),{attachment:t}=i;if((c=t.mediaType)!=null&&c.startsWith("image/")){let a=t.filename||"Attachment",m;return e[0]!==t.url||e[1]!==a?(m=(0,o.jsx)("img",{src:t.url,alt:a,className:"max-h-[100px] max-w-[100px] object-contain mb-1.5"}),e[0]=t.url,e[1]=a,e[2]=m):m=e[2],m}let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)(u,{className:"h-3 w-3 mt-0.5"}),e[3]=s):s=e[3];let l=t.filename||"Attachment",r;return e[4]===l?r=e[5]:(r=(0,o.jsxs)("div",{className:"flex flex-row gap-1 items-center text-xs",children:[s,l]}),e[4]=l,e[5]=r),r},A=i=>{let e=(0,d.c)(12),{file:t,className:s,onRemove:l}=i,[r,c]=(0,_.useState)(!1),a;e[0]===s?a=e[1]:(a=k("py-1 px-1.5 bg-muted rounded-md cursor-pointer flex flex-row gap-1 items-center text-xs",s),e[0]=s,e[1]=a);let m,p;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>c(!0),p=()=>c(!1),e[2]=m,e[3]=p):(m=e[2],p=e[3]);let n;e[4]!==t||e[5]!==r||e[6]!==l?(n=r?(0,o.jsx)(w,{className:"h-3 w-3 mt-0.5",onClick:l}):S(t),e[4]=t,e[5]=r,e[6]=l,e[7]=n):n=e[7];let h;return e[8]!==t.name||e[9]!==a||e[10]!==n?(h=(0,o.jsxs)("div",{className:a,onMouseEnter:m,onMouseLeave:p,children:[n,t.name]}),e[8]=t.name,e[9]=a,e[10]=n,e[11]=h):h=e[11],h};function S(i){let e="h-3 w-3 mt-0.5";return i.type.startsWith("image/")?(0,o.jsx)(M,{className:e}):i.type.startsWith("text/")?(0,o.jsx)(g,{className:e}):(0,o.jsx)(u,{className:e})}export{b as i,A as n,v as r,q as t};
import{s as B}from"./chunk-LvLJmgfZ.js";import{t as U}from"./react-BGmjiNul.js";import{Hn as $,Jn as G}from"./cells-BpZ7g6ok.js";import{C as P,P as K,R as z,T as Q}from"./zod-Cg4WLWh2.js";import{t as E}from"./compiler-runtime-DeeZ7FnK.js";import{n as X}from"./assertNever-CBU83Y6o.js";import{t as L}from"./isEmpty-CgX_-6Mt.js";import{ut as Y}from"./ai-model-dropdown-71lgLrLy.js";import{d as W}from"./hotkeys-BHHWjLlp.js";import{t as Z}from"./jsx-runtime-ZmTK25f3.js";import{t as A}from"./cn-BKtXLv3a.js";import{i as ee,t as te}from"./chat-components-CGlO4yUw.js";import{t as C}from"./markdown-renderer-DhMlG2dP.js";import{n as se}from"./spinner-DaIKav-i.js";import{c as ae}from"./datasource-B0OJBphG.js";import{a as D,i as H,n as I,r as M}from"./multi-map-C8GlnP-4.js";var re=E();U();var t=B(Z(),1);const le=n=>{let e=(0,re.c)(13),{reasoning:a,index:l,isStreaming:s}=n,r=l===void 0?0:l,m=s===void 0?!1:s,o=m?"reasoning":void 0,x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(ee,{className:"h-3 w-3"}),e[0]=x):x=e[0];let p=m?"Thinking":"View reasoning",c;e[1]!==a.length||e[2]!==p?(c=(0,t.jsx)(D,{className:"text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[x,p," (",a.length," ","chars)"]})}),e[1]=a.length,e[2]=p,e[3]=c):c=e[3];let i;e[4]===a?i=e[5]:(i=(0,t.jsx)(M,{className:"pb-2 px-2",children:(0,t.jsx)("div",{className:"bg-muted/30 border border-muted/50 rounded-md p-3 italic text-muted-foreground/90 relative",children:(0,t.jsx)("div",{className:"pr-6",children:(0,t.jsx)(C,{content:a})})})}),e[4]=a,e[5]=i);let d;e[6]!==c||e[7]!==i?(d=(0,t.jsxs)(H,{value:"reasoning",className:"border-0",children:[c,i]}),e[6]=c,e[7]=i,e[8]=d):d=e[8];let u;return e[9]!==r||e[10]!==o||e[11]!==d?(u=(0,t.jsx)(I,{type:"single",collapsible:!0,className:"w-full mb-2",value:o,children:d},r),e[9]=r,e[10]=o,e[11]=d,e[12]=u):u=e[12],u};var F=E(),ne=K({status:z().default("success"),auth_required:Q().default(!1),action_url:P(),next_steps:P(),meta:P(),message:z().nullish()}).passthrough(),oe=n=>{let e=(0,F.c)(12),{data:a}=n,l;if(e[0]!==a){let{status:s,auth_required:r,action_url:m,meta:o,next_steps:x,message:p,...c}=a,i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("h3",{className:"text-xs font-semibold text-muted-foreground",children:"Tool Result"}),e[2]=i):i=e[2];let d;e[3]===s?d=e[4]:(d=(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 bg-[var(--grass-2)] text-[var(--grass-11)] rounded-full font-medium capitalize",children:s}),e[3]=s,e[4]=d);let u;e[5]===r?u=e[6]:(u=r&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 bg-[var(--amber-2)] text-[var(--amber-11)] rounded-full",children:"Auth Required"}),e[5]=r,e[6]=u);let h;e[7]!==d||e[8]!==u?(h=(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[i,(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[d,u]})]}),e[7]=d,e[8]=u,e[9]=h):h=e[9];let f;e[10]===p?f=e[11]:(f=p&&(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)($,{className:"h-3 w-3 text-[var(--blue-11)] mt-0.5 flex-shrink-0"}),(0,t.jsx)("div",{className:"text-xs text-foreground",children:p})]}),e[10]=p,e[11]=f),l=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[h,f,c&&(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(c).map(me)})]}),e[0]=a,e[1]=l}else l=e[1];return l},ie=n=>{let e=(0,F.c)(8),{result:a}=n,l;e[0]===a?l=e[1]:(l=ne.safeParse(a),e[0]=a,e[1]=l);let s=l;if(s.success){let o;return e[2]===s.data?o=e[3]:(o=(0,t.jsx)(oe,{data:s.data}),e[2]=s.data,e[3]=o),o}let r;e[4]===a?r=e[5]:(r=typeof a=="string"?a:JSON.stringify(a,null,2),e[4]=a,e[5]=r);let m;return e[6]===r?m=e[7]:(m=(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground mb-1 max-h-64 overflow-y-auto scrollbar-thin",children:r}),e[6]=r,e[7]=m),m},de=n=>{let e=(0,F.c)(9),{input:a}=n;if(!(a&&a!==null))return null;let l;e[0]===a?l=e[1]:(l=L(a),e[0]=a,e[1]=l);let s=l,r=typeof a=="object"&&Object.keys(a).length>0,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("h3",{className:"text-xs font-semibold text-muted-foreground",children:"Tool Request"}),e[2]=m):m=e[2];let o;e[3]!==a||e[4]!==s||e[5]!==r?(o=s?"{}":r?JSON.stringify(a,null,2):String(a),e[3]=a,e[4]=s,e[5]=r,e[6]=o):o=e[6];let x;return e[7]===o?x=e[8]:(x=(0,t.jsxs)("div",{className:"space-y-2",children:[m,(0,t.jsx)("pre",{className:"bg-[var(--slate-2)] p-2 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64",children:o})]}),e[7]=o,e[8]=x),x};const V=n=>{let e=(0,F.c)(38),{toolName:a,result:l,error:s,index:r,state:m,className:o,input:x}=n,p=r===void 0?0:r,c=m==="output-available"&&(l||s),i=s?"error":c?"success":"loading",d;e[0]===i?d=e[1]:(d=()=>{switch(i){case"loading":return(0,t.jsx)(se,{className:"h-3 w-3 animate-spin"});case"error":return(0,t.jsx)(G,{className:"h-3 w-3 text-[var(--red-11)]"});case"success":return(0,t.jsx)(Y,{className:"h-3 w-3 text-[var(--grass-11)]"});default:return(0,t.jsx)(ae,{className:"h-3 w-3"})}},e[0]=i,e[1]=d);let u=d,h;e[2]!==s||e[3]!==c||e[4]!==i?(h=()=>i==="loading"?"Running":s?"Failed":c?"Done":"Tool call",e[2]=s,e[3]=c,e[4]=i,e[5]=h):h=e[5];let f=h,T=`tool-${p}`,g;e[6]===o?g=e[7]:(g=A("w-full",o),e[6]=o,e[7]=g);let k=i==="error"&&"text-[var(--red-11)]/80",q=i==="success"&&"text-[var(--grass-11)]/80",v;e[8]!==k||e[9]!==q?(v=A("h-6 text-xs border-border shadow-none! ring-0! bg-muted/60 hover:bg-muted py-0 px-2 gap-1 rounded-sm [&[data-state=open]>svg]:rotate-180 hover:no-underline",k,q),e[8]=k,e[9]=q,e[10]=v):v=e[10];let j;e[11]===u?j=e[12]:(j=u(),e[11]=u,e[12]=j);let J=f(),b;e[13]===a?b=e[14]:(b=ce(a),e[13]=a,e[14]=b);let N;e[15]===b?N=e[16]:(N=(0,t.jsx)("code",{className:"font-mono text-xs",children:b}),e[15]=b,e[16]=N);let y;e[17]!==J||e[18]!==N||e[19]!==j?(y=(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[j,J,":",N]}),e[17]=J,e[18]=N,e[19]=j,e[20]=y):y=e[20];let w;e[21]!==y||e[22]!==v?(w=(0,t.jsx)(D,{className:v,children:y}),e[21]=y,e[22]=v,e[23]=w):w=e[23];let _;e[24]!==s||e[25]!==c||e[26]!==x||e[27]!==l?(_=c&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(de,{input:x}),l!=null&&(0,t.jsx)(ie,{result:l}),s&&(0,t.jsxs)("div",{className:"bg-[var(--red-2)] border border-[var(--red-6)] rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"text-xs font-semibold text-[var(--red-11)] mb-2 flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-[var(--red-9)] rounded-full"}),"Error"]}),(0,t.jsx)("div",{className:"text-sm text-[var(--red-11)] leading-relaxed",children:s})]})]}),e[24]=s,e[25]=c,e[26]=x,e[27]=l,e[28]=_):_=e[28];let S;e[29]===_?S=e[30]:(S=(0,t.jsx)(M,{className:"py-2 px-2",children:_}),e[29]=_,e[30]=S);let O;e[31]!==w||e[32]!==S?(O=(0,t.jsxs)(H,{value:"tool-call",className:"border-0",children:[w,S]}),e[31]=w,e[32]=S,e[33]=O):O=e[33];let R;return e[34]!==O||e[35]!==T||e[36]!==g?(R=(0,t.jsx)(I,{type:"single",collapsible:!0,className:g,children:O},T),e[34]=O,e[35]=T,e[36]=g,e[37]=R):R=e[37],R};function ce(n){return n.replace("tool-","")}function me(n){let[e,a]=n;return L(a)?null:(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"text-xs font-medium text-muted-foreground capitalize flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-[var(--blue-9)] rounded-full"}),e]}),(0,t.jsx)("pre",{className:"bg-[var(--slate-2)] p-2 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64",children:JSON.stringify(a,null,2)})]},e)}const ue=({message:n,isStreamingReasoning:e,isLast:a})=>{return(0,t.jsx)(t.Fragment,{children:n.parts.map((s,r)=>l(s,r))});function l(s,r){if(xe(s))return(0,t.jsx)(V,{index:r,toolName:s.type,result:s.output,className:"my-2",state:s.state,input:s.input},r);if(pe(s))return W.debug("Found data part",s),null;switch(s.type){case"text":return(0,t.jsx)(C,{content:s.text},r);case"reasoning":return(0,t.jsx)(le,{reasoning:s.text,index:r,isStreaming:e&&a&&r===(n.parts.length||0)-1},r);case"file":return(0,t.jsx)(te,{attachment:s},r);case"dynamic-tool":return(0,t.jsx)(V,{toolName:s.toolName,result:s.output,state:s.state,input:s.input},r);case"source-document":case"source-url":case"step-start":return W.debug("Found non-renderable part",s),null;default:return X(s),null}}};function xe(n){return n.type.startsWith("tool-")}function pe(n){return n.type.startsWith("data-")}export{ue as t};
import{s as et}from"./chunk-LvLJmgfZ.js";import{d as It,f as zt,l as kt,n as V,u as Ve}from"./useEvent-DO6uJBas.js";import{t as Dt}from"./react-BGmjiNul.js";import{mn as Mt,qn as Ft,w as Ht}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as tt}from"./compiler-runtime-DeeZ7FnK.js";import{T as Ot,o as Wt,r as rt,t as Yt,w as Ut}from"./ai-model-dropdown-71lgLrLy.js";import{d as Ie}from"./hotkeys-BHHWjLlp.js";import{n as lt,r as Xt}from"./utils-DXvhzCGS.js";import{o as Bt}from"./config-CIrPQIbt.js";import{r as ae}from"./useEventListener-DIUKKfEy.js";import{t as Vt}from"./jsx-runtime-ZmTK25f3.js";import{t as B}from"./button-YC1gW_kJ.js";import{t as se}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{r as qt}from"./requests-BsVD4CdD.js";import{E as $t,O as Gt,c as Jt,d as Kt,f as Qt,g as Zt,k as er,l as ot,n as nt,p as tr,s as at,u as rr,v as lr,w as or,x as nr}from"./add-cell-with-ai-pVFp5LZG.js";import{i as st,n as ar,r as sr,t as ir}from"./chat-components-CGlO4yUw.js";import{a as cr,i as dr,n as ur,p as mr,r as pr,s as hr,t as fr}from"./select-V5IdpNiR.js";import"./markdown-renderer-DhMlG2dP.js";import{n as xr}from"./spinner-DaIKav-i.js";import{t as vr}from"./plus-BD5o34_i.js";import{lt as gr,r as it}from"./input-pAun1m1X.js";import{t as wr}from"./settings-DOXWMfVd.js";import{r as ct,t as br}from"./state-BfXVTTtD.js";import{t as yr}from"./square-C8Tw_XXG.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{t as jr}from"./use-toast-rmUWldD_.js";import{C as Sr,E as Cr,_ as he,g as q,w as $,x as ze}from"./Combination-CMPwuAmi.js";import{i as dt,t as ie}from"./tooltip-CEc2ajau.js";import{u as Nr}from"./menu-items-CJhvWPOk.js";import{i as _r}from"./dates-Dhn1r-h6.js";import{t as Rr}from"./context-JwD-oSsl.js";import{i as Ar,r as Tr,t as Er}from"./popover-Gz-GJzym.js";import{t as Lr}from"./copy-icon-BhONVREY.js";import{n as Pr}from"./error-banner-DUzsIXtq.js";import"./chunk-5FQGJX7Z-CVUXBqX6.js";import"./katex-Dc8yG8NU.js";import"./html-to-image-DjukyIj4.js";import{t as Ir}from"./chat-display-B4mGvJ0X.js";import"./esm-DpMp6qko.js";import{t as qe}from"./empty-state-h8C2C6hZ.js";var ut=tt(),m=et(Dt(),1);const zr=({chatState:e,chatId:t,messages:r})=>{if(!t)return Ie.warn("No active chat"),e;let a=e.chats.get(t);if(!a)return Ie.warn("No active chat"),e;let o=new Map(e.chats),n=Date.now();return o.set(a.id,{...a,messages:r,updatedAt:n}),{...e,chats:o}};var l=et(Vt(),1);function kr(e,t){return m.useReducer((r,a)=>t[r][a]??r,e)}var $e="ScrollArea",[mt,ho]=Cr($e),[Dr,F]=mt($e),pt=m.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:a="hover",dir:o,scrollHideDelay:n=600,...s}=e,[c,i]=m.useState(null),[d,u]=m.useState(null),[p,h]=m.useState(null),[f,g]=m.useState(null),[y,L]=m.useState(null),[b,C]=m.useState(0),[j,S]=m.useState(0),[_,N]=m.useState(!1),[P,I]=m.useState(!1),w=ae(t,k=>i(k)),T=Nr(o);return(0,l.jsx)(Dr,{scope:r,type:a,dir:T,scrollHideDelay:n,scrollArea:c,viewport:d,onViewportChange:u,content:p,onContentChange:h,scrollbarX:f,onScrollbarXChange:g,scrollbarXEnabled:_,onScrollbarXEnabledChange:N,scrollbarY:y,onScrollbarYChange:L,scrollbarYEnabled:P,onScrollbarYEnabledChange:I,onCornerWidthChange:C,onCornerHeightChange:S,children:(0,l.jsx)(he.div,{dir:T,...s,ref:w,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":j+"px",...e.style}})})});pt.displayName=$e;var ht="ScrollAreaViewport",ft=m.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:a,nonce:o,...n}=e,s=F(ht,r),c=ae(t,m.useRef(null),s.onViewportChange);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,l.jsx)(he.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,l.jsx)("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})});ft.displayName=ht;var Y="ScrollAreaScrollbar",Ge=m.forwardRef((e,t)=>{let{forceMount:r,...a}=e,o=F(Y,e.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=o,c=e.orientation==="horizontal";return m.useEffect(()=>(c?n(!0):s(!0),()=>{c?n(!1):s(!1)}),[c,n,s]),o.type==="hover"?(0,l.jsx)(Mr,{...a,ref:t,forceMount:r}):o.type==="scroll"?(0,l.jsx)(Fr,{...a,ref:t,forceMount:r}):o.type==="auto"?(0,l.jsx)(xt,{...a,ref:t,forceMount:r}):o.type==="always"?(0,l.jsx)(Je,{...a,ref:t}):null});Ge.displayName=Y;var Mr=m.forwardRef((e,t)=>{let{forceMount:r,...a}=e,o=F(Y,e.__scopeScrollArea),[n,s]=m.useState(!1);return m.useEffect(()=>{let c=o.scrollArea,i=0;if(c){let d=()=>{window.clearTimeout(i),s(!0)},u=()=>{i=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",u),()=>{window.clearTimeout(i),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),(0,l.jsx)(ze,{present:r||n,children:(0,l.jsx)(xt,{"data-state":n?"visible":"hidden",...a,ref:t})})}),Fr=m.forwardRef((e,t)=>{let{forceMount:r,...a}=e,o=F(Y,e.__scopeScrollArea),n=e.orientation==="horizontal",s=Fe(()=>i("SCROLL_END"),100),[c,i]=kr("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return m.useEffect(()=>{if(c==="idle"){let d=window.setTimeout(()=>i("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,i]),m.useEffect(()=>{let d=o.viewport,u=n?"scrollLeft":"scrollTop";if(d){let p=d[u],h=()=>{let f=d[u];p!==f&&(i("SCROLL"),s()),p=f};return d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,n,i,s]),(0,l.jsx)(ze,{present:r||c!=="hidden",children:(0,l.jsx)(Je,{"data-state":c==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:$(e.onPointerEnter,()=>i("POINTER_ENTER")),onPointerLeave:$(e.onPointerLeave,()=>i("POINTER_LEAVE"))})})}),xt=m.forwardRef((e,t)=>{let r=F(Y,e.__scopeScrollArea),{forceMount:a,...o}=e,[n,s]=m.useState(!1),c=e.orientation==="horizontal",i=Fe(()=>{if(r.viewport){let d=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;s(c?d:u)}},10);return ce(r.viewport,i),ce(r.content,i),(0,l.jsx)(ze,{present:a||n,children:(0,l.jsx)(Je,{"data-state":n?"visible":"hidden",...o,ref:t})})}),Je=m.forwardRef((e,t)=>{let{orientation:r="vertical",...a}=e,o=F(Y,e.__scopeScrollArea),n=m.useRef(null),s=m.useRef(0),[c,i]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=yt(c.viewport,c.content),u={...a,sizes:c,onSizesChange:i,hasThumb:d>0&&d<1,onThumbChange:h=>n.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function p(h,f){return Xr(h,s.current,c,f)}return r==="horizontal"?(0,l.jsx)(Hr,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&n.current){let h=o.viewport.scrollLeft,f=jt(h,c,o.dir);n.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=p(h,o.dir))}}):r==="vertical"?(0,l.jsx)(Or,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&n.current){let h=o.viewport.scrollTop,f=jt(h,c);n.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=p(h))}}):null}),Hr=m.forwardRef((e,t)=>{let{sizes:r,onSizesChange:a,...o}=e,n=F(Y,e.__scopeScrollArea),[s,c]=m.useState(),i=m.useRef(null),d=ae(t,i,n.onScrollbarXChange);return m.useEffect(()=>{i.current&&c(getComputedStyle(i.current))},[i]),(0,l.jsx)(gt,{"data-orientation":"horizontal",...o,ref:d,sizes:r,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Me(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,p)=>{if(n.viewport){let h=n.viewport.scrollLeft+u.deltaX;e.onWheelScroll(h),Ct(h,p)&&u.preventDefault()}},onResize:()=>{i.current&&n.viewport&&s&&a({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:i.current.clientWidth,paddingStart:De(s.paddingLeft),paddingEnd:De(s.paddingRight)}})}})}),Or=m.forwardRef((e,t)=>{let{sizes:r,onSizesChange:a,...o}=e,n=F(Y,e.__scopeScrollArea),[s,c]=m.useState(),i=m.useRef(null),d=ae(t,i,n.onScrollbarYChange);return m.useEffect(()=>{i.current&&c(getComputedStyle(i.current))},[i]),(0,l.jsx)(gt,{"data-orientation":"vertical",...o,ref:d,sizes:r,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Me(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,p)=>{if(n.viewport){let h=n.viewport.scrollTop+u.deltaY;e.onWheelScroll(h),Ct(h,p)&&u.preventDefault()}},onResize:()=>{i.current&&n.viewport&&s&&a({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:i.current.clientHeight,paddingStart:De(s.paddingTop),paddingEnd:De(s.paddingBottom)}})}})}),[Wr,vt]=mt(Y),gt=m.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:a,hasThumb:o,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:i,onDragScroll:d,onWheelScroll:u,onResize:p,...h}=e,f=F(Y,r),[g,y]=m.useState(null),L=ae(t,w=>y(w)),b=m.useRef(null),C=m.useRef(""),j=f.viewport,S=a.content-a.viewport,_=q(u),N=q(i),P=Fe(p,10);function I(w){b.current&&d({x:w.clientX-b.current.left,y:w.clientY-b.current.top})}return m.useEffect(()=>{let w=T=>{let k=T.target;g!=null&&g.contains(k)&&_(T,S)};return document.addEventListener("wheel",w,{passive:!1}),()=>document.removeEventListener("wheel",w,{passive:!1})},[j,g,S,_]),m.useEffect(N,[a,N]),ce(g,P),ce(f.content,P),(0,l.jsx)(Wr,{scope:r,scrollbar:g,hasThumb:o,onThumbChange:q(n),onThumbPointerUp:q(s),onThumbPositionChange:N,onThumbPointerDown:q(c),children:(0,l.jsx)(he.div,{...h,ref:L,style:{position:"absolute",...h.style},onPointerDown:$(e.onPointerDown,w=>{w.button===0&&(w.target.setPointerCapture(w.pointerId),b.current=g.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),I(w))}),onPointerMove:$(e.onPointerMove,I),onPointerUp:$(e.onPointerUp,w=>{let T=w.target;T.hasPointerCapture(w.pointerId)&&T.releasePointerCapture(w.pointerId),document.body.style.webkitUserSelect=C.current,f.viewport&&(f.viewport.style.scrollBehavior=""),b.current=null})})})}),ke="ScrollAreaThumb",wt=m.forwardRef((e,t)=>{let{forceMount:r,...a}=e,o=vt(ke,e.__scopeScrollArea);return(0,l.jsx)(ze,{present:r||o.hasThumb,children:(0,l.jsx)(Yr,{ref:t,...a})})}),Yr=m.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:a,...o}=e,n=F(ke,r),s=vt(ke,r),{onThumbPositionChange:c}=s,i=ae(t,p=>s.onThumbChange(p)),d=m.useRef(void 0),u=Fe(()=>{d.current&&(d.current=(d.current(),void 0))},100);return m.useEffect(()=>{let p=n.viewport;if(p){let h=()=>{u(),d.current||(d.current=Br(p,c),c())};return c(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[n.viewport,u,c]),(0,l.jsx)(he.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:i,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:$(e.onPointerDownCapture,p=>{let h=p.target.getBoundingClientRect(),f=p.clientX-h.left,g=p.clientY-h.top;s.onThumbPointerDown({x:f,y:g})}),onPointerUp:$(e.onPointerUp,s.onThumbPointerUp)})});wt.displayName=ke;var Ke="ScrollAreaCorner",bt=m.forwardRef((e,t)=>{let r=F(Ke,e.__scopeScrollArea),a=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&a?(0,l.jsx)(Ur,{...e,ref:t}):null});bt.displayName=Ke;var Ur=m.forwardRef((e,t)=>{let{__scopeScrollArea:r,...a}=e,o=F(Ke,r),[n,s]=m.useState(0),[c,i]=m.useState(0),d=!!(n&&c);return ce(o.scrollbarX,()=>{var p;let u=((p=o.scrollbarX)==null?void 0:p.offsetHeight)||0;o.onCornerHeightChange(u),i(u)}),ce(o.scrollbarY,()=>{var p;let u=((p=o.scrollbarY)==null?void 0:p.offsetWidth)||0;o.onCornerWidthChange(u),s(u)}),d?(0,l.jsx)(he.div,{...a,ref:t,style:{width:n,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function De(e){return e?parseInt(e,10):0}function yt(e,t){let r=e/t;return isNaN(r)?0:r}function Me(e){let t=yt(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-r)*t;return Math.max(a,18)}function Xr(e,t,r,a="ltr"){let o=Me(r),n=o/2,s=t||n,c=o-s,i=r.scrollbar.paddingStart+s,d=r.scrollbar.size-r.scrollbar.paddingEnd-c,u=r.content-r.viewport,p=a==="ltr"?[0,u]:[u*-1,0];return St([i,d],p)(e)}function jt(e,t,r="ltr"){let a=Me(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,n=t.scrollbar.size-o,s=t.content-t.viewport,c=n-a,i=mr(e,r==="ltr"?[0,s]:[s*-1,0]);return St([0,s],[0,c])(i)}function St(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(r-e[0])}}function Ct(e,t){return e>0&&e<t}var Br=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},a=0;return(function o(){let n={left:e.scrollLeft,top:e.scrollTop},s=r.left!==n.left,c=r.top!==n.top;(s||c)&&t(),r=n,a=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(a)};function Fe(e,t){let r=q(e),a=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(a.current),[]),m.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(r,t)},[r,t])}function ce(e,t){let r=q(t);Sr(()=>{let a=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(a),o.unobserve(e)}}},[e,r])}var Nt=pt,Vr=ft,qr=bt,_t=m.forwardRef((e,t)=>{let r=(0,ut.c)(15),a,o,n;r[0]===e?(a=r[1],o=r[2],n=r[3]):({className:o,children:a,...n}=e,r[0]=e,r[1]=a,r[2]=o,r[3]=n);let s;r[4]===o?s=r[5]:(s=se("relative overflow-hidden",o),r[4]=o,r[5]=s);let c;r[6]===a?c=r[7]:(c=(0,l.jsx)(Vr,{className:"h-full w-full rounded-[inherit]",children:a}),r[6]=a,r[7]=c);let i,d;r[8]===Symbol.for("react.memo_cache_sentinel")?(i=(0,l.jsx)(Rt,{}),d=(0,l.jsx)(qr,{}),r[8]=i,r[9]=d):(i=r[8],d=r[9]);let u;return r[10]!==n||r[11]!==t||r[12]!==s||r[13]!==c?(u=(0,l.jsxs)(Nt,{ref:t,className:s,...n,children:[c,i,d]}),r[10]=n,r[11]=t,r[12]=s,r[13]=c,r[14]=u):u=r[14],u});_t.displayName=Nt.displayName;var Rt=m.forwardRef((e,t)=>{let r=(0,ut.c)(14),a,o,n;r[0]===e?(a=r[1],o=r[2],n=r[3]):({className:a,orientation:n,...o}=e,r[0]=e,r[1]=a,r[2]=o,r[3]=n);let s=n===void 0?"vertical":n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",i=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",d;r[4]!==a||r[5]!==c||r[6]!==i?(d=se("flex touch-none select-none transition-colors",c,i,a),r[4]=a,r[5]=c,r[6]=i,r[7]=d):d=r[7];let u;r[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)(wt,{className:"relative flex-1 rounded-full bg-border"}),r[8]=u):u=r[8];let p;return r[9]!==s||r[10]!==o||r[11]!==t||r[12]!==d?(p=(0,l.jsx)(Ge,{ref:t,orientation:s,className:d,...o,children:u}),r[9]=s,r[10]=o,r[11]=t,r[12]=d,r[13]=p):p=r[13],p});Rt.displayName=Ge.displayName;var $r=[{label:"Today",days:0},{label:"Yesterday",days:1},{label:"2d ago",days:2},{label:"3d ago",days:3},{label:"This week",days:7},{label:"This month",days:30}];const Gr=e=>{let t=Date.now(),r=$r.map(n=>({...n,chats:[]})),a={label:"Older",days:1/0,chats:[]},o=n=>{switch(n){case 0:return r[0];case 1:return r[1];case 2:return r[2];case 3:return r[3];default:return n>=4&&n<=7?r[4]:n>=8&&n<=30?r[5]:a}};for(let n of e)o(Math.floor((t-n.updatedAt)/864e5)).chats.push(n);return[...r,a].filter(n=>n.chats.length>0)},Jr=({activeChatId:e,setActiveChat:t})=>{let r=Ve(ct),{locale:a}=Rr(),[o,n]=(0,m.useState)(""),s=(0,m.useMemo)(()=>[...r.chats.values()].sort((d,u)=>u.updatedAt-d.updatedAt),[r.chats]),c=(0,m.useMemo)(()=>o.trim()?s.filter(d=>d.title.toLowerCase().includes(o.toLowerCase())):s,[s,o]),i=(0,m.useMemo)(()=>Gr(c),[c]);return(0,l.jsxs)(Er,{children:[(0,l.jsx)(ie,{content:"Previous chats",children:(0,l.jsx)(Ar,{asChild:!0,children:(0,l.jsx)(B,{variant:"text",size:"icon",children:(0,l.jsx)(Ft,{className:"h-4 w-4"})})})}),(0,l.jsxs)(Tr,{className:"w-[480px] p-0",align:"start",side:"right",children:[(0,l.jsx)("div",{className:"pt-3 px-3 w-full",children:(0,l.jsx)(it,{placeholder:"Search chat history...",value:o,onChange:d=>n(d.target.value),className:"text-xs"})}),(0,l.jsx)(_t,{className:"h-[450px] p-2",children:(0,l.jsxs)("div",{className:"space-y-3",children:[s.length===0&&(0,l.jsx)(qe,{title:"No chats yet",description:"Start a new chat to get started",icon:(0,l.jsx)(st,{})}),c.length===0&&o&&s.length>0&&(0,l.jsx)(qe,{title:"No chats found",description:`No chats match "${o}"`,icon:(0,l.jsx)(gr,{})}),i.map((d,u)=>(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("div",{className:"text-xs px-1 text-muted-foreground/60",children:d.label}),(0,l.jsx)("div",{children:d.chats.map(p=>(0,l.jsxs)("button",{className:se("w-full p-1 rounded-md cursor-pointer text-left flex items-center justify-between",p.id===e&&"bg-accent",p.id!==e&&"hover:bg-muted/20"),onClick:()=>{t(p.id)},type:"button",children:[(0,l.jsx)("div",{className:"flex-1 min-w-0",children:(0,l.jsx)("div",{className:"text-sm truncate",children:p.title})}),(0,l.jsx)("div",{className:"text-xs text-muted-foreground/60 ml-2 flex-shrink-0",children:_r(p.updatedAt,a)})]},p.id))}),u!==i.length-1&&(0,l.jsx)("hr",{})]},d.label))]})})]})]})};var de=tt(),At="manual",Kr=new Set(["openai","google","anthropic"]),Qr=["image/*","text/*"],Zr=1024*1024*50,el=e=>{let t=(0,de.c)(18),{onNewChat:r,activeChatId:a,setActiveChat:o}=e,{handleClick:n}=rt(),s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.jsx)(vr,{className:"h-4 w-4"}),t[0]=s):s=t[0];let c;t[1]===r?c=t[2]:(c=(0,l.jsx)(ie,{content:"New chat",children:(0,l.jsx)(B,{variant:"text",size:"icon",onClick:r,children:s})}),t[1]=r,t[2]=c);let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,l.jsx)(Wt,{}),t[3]=i):i=t[3];let d;t[4]===n?d=t[5]:(d=()=>n("ai"),t[4]=n,t[5]=d);let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)(wr,{className:"h-4 w-4"}),t[6]=u):u=t[6];let p;t[7]===d?p=t[8]:(p=(0,l.jsx)(ie,{content:"AI Settings",children:(0,l.jsx)(B,{variant:"text",size:"xs",className:"hover:bg-foreground/10 py-2",onClick:d,children:u})}),t[7]=d,t[8]=p);let h;t[9]!==a||t[10]!==o?(h=(0,l.jsx)(Jr,{activeChatId:a,setActiveChat:o}),t[9]=a,t[10]=o,t[11]=h):h=t[11];let f;t[12]!==p||t[13]!==h?(f=(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[i,p,h]}),t[12]=p,t[13]=h,t[14]=f):f=t[14];let g;return t[15]!==c||t[16]!==f?(g=(0,l.jsxs)("div",{className:"flex border-b px-2 py-1 justify-between shrink-0 items-center",children:[c,f]}),t[15]=c,t[16]=f,t[17]=g):g=t[17],g},Tt=(0,m.memo)(e=>{let t=(0,de.c)(15),{message:r,index:a,onEdit:o,isStreamingReasoning:n,isLast:s}=e,c;t[0]!==a||t[1]!==o?(c=y=>{var C,j,S;let L=(j=(C=y.parts)==null?void 0:C.filter(ol))==null?void 0:j.map(nl).join(`
`),b=(S=y.parts)==null?void 0:S.filter(al);return(0,l.jsxs)("div",{className:"w-[95%] bg-background border p-1 rounded-sm",children:[b==null?void 0:b.map(sl),(0,l.jsx)(nt,{value:L,placeholder:"Type your message...",onChange:il,onSubmit:(_,N)=>{N.trim()&&o(a,N)},onClose:cl},y.id)]})},t[0]=a,t[1]=o,t[2]=c):c=t[2];let i=c,d;t[3]!==s||t[4]!==n?(d=y=>(0,l.jsxs)("div",{className:"w-[95%] wrap-break-word",children:[(0,l.jsx)("div",{className:"absolute right-1 top-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,l.jsx)(Lr,{className:"h-3 w-3",value:y.parts.filter(dl).map(ul).join(`
`)||""})}),Ir({message:y,isStreamingReasoning:n,isLast:s})]}),t[3]=s,t[4]=n,t[5]=d):d=t[5];let u=d,p=r.role==="user"?"justify-end":"justify-start",h;t[6]===p?h=t[7]:(h=se("flex group relative",p),t[6]=p,t[7]=h);let f;t[8]!==r||t[9]!==u||t[10]!==i?(f=r.role==="user"?i(r):u(r),t[8]=r,t[9]=u,t[10]=i,t[11]=f):f=t[11];let g;return t[12]!==h||t[13]!==f?(g=(0,l.jsx)("div",{className:h,children:f}),t[12]=h,t[13]=f,t[14]=g):g=t[14],g});Tt.displayName="ChatMessage";var Et=(0,m.memo)(e=>{var fe;let t=(0,de.c)(39),{isEmpty:r,onSendClick:a,isLoading:o,onStop:n,fileInputRef:s,onAddFiles:c,onAddContext:i}=e,d=Ve(lt),u=(d==null?void 0:d.mode)||At,p=((fe=d==null?void 0:d.models)==null?void 0:fe.chat_model)||"openai/gpt-4o",h=Ut.parse(p).providerId,{saveModeChange:f}=Ot(),g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g=[{value:"ask",label:"Ask",subtitle:"Use AI with access to read-only tools like documentation search"},{value:"manual",label:"Manual",subtitle:"Pure chat, no tool usage"},{value:"agent",label:"Agent (beta)",subtitle:"Use AI with access to read and write tools"}],t[0]=g):g=t[0];let y=g,L=Kr.has(h),b;t[1]===u?b=t[2]:(b=(0,l.jsx)(hr,{className:"h-6 text-xs border-border shadow-none! ring-0! bg-muted hover:bg-muted/30 py-0 px-2 gap-1 capitalize",children:u}),t[1]=u,t[2]=b);let C;t[3]===Symbol.for("react.memo_cache_sentinel")?(C=(0,l.jsx)(cr,{children:"AI Mode"}),t[3]=C):C=t[3];let j;t[4]===y?j=t[5]:(j=(0,l.jsx)(ur,{children:(0,l.jsxs)(pr,{children:[C,y.map(ml)]})}),t[4]=y,t[5]=j);let S;t[6]!==u||t[7]!==f||t[8]!==b||t[9]!==j?(S=(0,l.jsx)(Mt,{feature:"chat_modes",children:(0,l.jsxs)(fr,{value:u,onValueChange:f,children:[b,j]})}),t[6]=u,t[7]=f,t[8]=b,t[9]=j,t[10]=S):S=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_=(0,l.jsx)(Yt,{placeholder:"Model",triggerClassName:"h-6 text-xs shadow-none! ring-0! bg-muted hover:bg-muted/30 rounded-sm",iconSize:"small",showAddCustomModelDocs:!0,forRole:"chat"}),t[11]=_):_=t[11];let N;t[12]===S?N=t[13]:(N=(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[S,_]}),t[12]=S,t[13]=N);let P;t[14]===Symbol.for("react.memo_cache_sentinel")?(P=(0,l.jsx)(er,{className:"h-3.5 w-3.5"}),t[14]=P):P=t[14];let I;t[15]!==o||t[16]!==i?(I=(0,l.jsx)(ie,{content:"Add context",children:(0,l.jsx)(B,{variant:"text",size:"icon",onClick:i,disabled:o,children:P})}),t[15]=o,t[16]=i,t[17]=I):I=t[17];let w;t[18]!==s||t[19]!==L||t[20]!==o||t[21]!==c?(w=L&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ie,{content:"Attach a file",children:(0,l.jsx)(B,{variant:"text",size:"icon",className:"cursor-pointer",onClick:()=>{var X;return(X=s.current)==null?void 0:X.click()},title:"Attach a file",disabled:o,children:(0,l.jsx)(sr,{className:"h-3.5 w-3.5"})})}),(0,l.jsx)(it,{ref:s,type:"file",multiple:!0,hidden:!0,onChange:X=>{X.target.files&&c([...X.target.files])},accept:Qr.join(",")})]}),t[18]=s,t[19]=L,t[20]=o,t[21]=c,t[22]=w):w=t[22];let T=o?"Stop":"Submit",k=o?n:a,A=o?!1:r,E;t[23]===o?E=t[24]:(E=o?(0,l.jsx)(yr,{className:"h-3 w-3 fill-current"}):(0,l.jsx)(Gt,{className:"h-3 w-3"}),t[23]=o,t[24]=E);let H;t[25]!==k||t[26]!==A||t[27]!==E?(H=(0,l.jsx)(B,{variant:"text",size:"sm",className:"h-6 w-6 p-0 hover:bg-muted/30 cursor-pointer",onClick:k,disabled:A,children:E}),t[25]=k,t[26]=A,t[27]=E,t[28]=H):H=t[28];let U;t[29]!==T||t[30]!==H?(U=(0,l.jsx)(ie,{content:T,children:H}),t[29]=T,t[30]=H,t[31]=U):U=t[31];let O;t[32]!==w||t[33]!==U||t[34]!==I?(O=(0,l.jsxs)("div",{className:"flex flex-row",children:[I,w,U]}),t[32]=w,t[33]=U,t[34]=I,t[35]=O):O=t[35];let D;return t[36]!==O||t[37]!==N?(D=(0,l.jsx)(dt,{children:(0,l.jsxs)("div",{className:"px-3 py-2 border-t border-border/20 flex flex-row flex-wrap items-center justify-between gap-1",children:[N,O]})}),t[36]=O,t[37]=N,t[38]=D):D=t[38],D});Et.displayName="ChatInputFooter";var Qe=(0,m.memo)(e=>{let t=(0,de.c)(29),{placeholder:r,input:a,inputClassName:o,setInput:n,onSubmit:s,inputRef:c,isLoading:i,onStop:d,fileInputRef:u,onAddFiles:p,onClose:h}=e,f;t[0]!==a||t[1]!==s?(f=()=>{a.trim()&&s(void 0,a)},t[0]=a,t[1]=s,t[2]=f):f=t[2];let g=V(f),y;t[3]===o?y=t[4]:(y=se("px-2 py-3 flex-1",o),t[3]=o,t[4]=y);let L=r||"Type your message...",b;t[5]!==a||t[6]!==c||t[7]!==p||t[8]!==h||t[9]!==s||t[10]!==n||t[11]!==L?(b=(0,l.jsx)(nt,{inputRef:c,value:a,onChange:n,onSubmit:s,onClose:h,onAddFiles:p,placeholder:L}),t[5]=a,t[6]=c,t[7]=p,t[8]=h,t[9]=s,t[10]=n,t[11]=L,t[12]=b):b=t[12];let C;t[13]!==y||t[14]!==b?(C=(0,l.jsx)("div",{className:y,children:b}),t[13]=y,t[14]=b,t[15]=C):C=t[15];let j=!a.trim(),S;t[16]===c?S=t[17]:(S=()=>nr(c),t[16]=c,t[17]=S);let _;t[18]!==u||t[19]!==g||t[20]!==i||t[21]!==p||t[22]!==d||t[23]!==j||t[24]!==S?(_=(0,l.jsx)(Et,{isEmpty:j,onAddContext:S,onSendClick:g,isLoading:i,onStop:d,fileInputRef:u,onAddFiles:p}),t[18]=u,t[19]=g,t[20]=i,t[21]=p,t[22]=d,t[23]=j,t[24]=S,t[25]=_):_=t[25];let N;return t[26]!==C||t[27]!==_?(N=(0,l.jsxs)("div",{className:"relative shrink-0 min-h-[80px] flex flex-col border-t",children:[C,_]}),t[26]=C,t[27]=_,t[28]=N):N=t[28],N});Qe.displayName="ChatInput";var tl=()=>{let e=(0,de.c)(6),t=Ve(Xt),{handleClick:r}=rt();if(!t){let o;e[0]===r?o=e[1]:(o=(0,l.jsx)(B,{variant:"outline",size:"sm",onClick:()=>r("ai","ai-providers"),children:"Edit AI settings"}),e[0]=r,e[1]=o);let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,l.jsx)(st,{}),e[2]=n):n=e[2];let s;return e[3]===o?s=e[4]:(s=(0,l.jsx)(qe,{title:"Chat with AI",description:"No AI provider configured or Chat model not selected",action:o,icon:n}),e[3]=o,e[4]=s),s}let a;return e[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.jsx)(rl,{}),e[5]=a):a=e[5],a},rl=()=>{let e=(0,de.c)(95),t=It(ct),[r,a]=kt(br),[o,n]=(0,m.useState)(""),[s,c]=(0,m.useState)(""),[i,d]=(0,m.useState)(),u=(0,m.useRef)(null),p=(0,m.useRef)(null),h=(0,m.useRef)(null),f=(0,m.useRef)(null),g=(0,m.useRef)(null),y=Bt(),{invokeAiTool:L,sendRun:b}=qt(),C=r==null?void 0:r.id,j=zt(),{addStagedCell:S}=lr(),{createNewCell:_,prepareForRun:N}=Ht(),P;e[0]!==S||e[1]!==_||e[2]!==N||e[3]!==b||e[4]!==j?(P={addStagedCell:S,createNewCell:_,prepareForRun:N,sendRun:b,store:j},e[0]=S,e[1]=_,e[2]=N,e[3]=b,e[4]=j,e[5]=P):P=e[5];let I=P,w;e[6]===(r==null?void 0:r.messages)?w=e[7]:(w=(r==null?void 0:r.messages)||[],e[6]=r==null?void 0:r.messages,e[7]=w);let T;if(e[8]!==y||e[9]!==j){let x;e[11]===j?x=e[12]:(x=async v=>{var ne;let R=await Jt(v.messages),W=((ne=j.get(lt))==null?void 0:ne.mode)||At;return{body:{tools:Zt.getToolSchemas(W),...v,...R}}},e[11]=j,e[12]=x),T=new $t({api:y.getAiURL("chat").toString(),headers:y.headers(),prepareSendMessagesRequest:x}),e[8]=y,e[9]=j,e[10]=T}else T=e[10];let k;e[13]===t?k=e[14]:(k=x=>{let{messages:v}=x;t(R=>zr({chatState:R,chatId:R.activeChatId,messages:v}))},e[13]=t,e[14]=k);let{messages:A,sendMessage:E,error:H,status:U,regenerate:O,stop:D,addToolOutput:fe,id:X}=or({id:C,sendAutomaticallyWhen:pl,messages:w,transport:T,onFinish:k,onToolCall:async x=>{let{toolCall:v}=x;if(v.dynamic){Ie.debug("Skipping dynamic tool call",v);return}await Kt({invokeAiTool:L,addToolOutput:Lt,toolCall:{toolName:v.toolName,toolCallId:v.toolCallId,input:v.input},toolContext:I})},onError:hl}),Lt=fe,xe;e[15]===Symbol.for("react.memo_cache_sentinel")?(xe=x=>{if(x.length===0)return;let v=0;for(let R of x)v+=R.size;if(v>Zr){jr({title:"File size exceeds 50MB limit",description:"Please remove some files and try again."});return}d(R=>[...R??[],...x])},e[15]=xe):xe=e[15];let ve=V(xe),ge;e[16]===i?ge=e[17]:(ge=x=>{i&&d(i.filter(v=>v!==x))},e[16]=i,e[17]=ge);let He=V(ge),z=U==="submitted"||U==="streaming",we;e[18]!==z||e[19]!==A?(we=z&&A.length>0&&tr(A),e[18]=z,e[19]=A,e[20]=we):we=e[20];let ue=we,be;e[21]===Symbol.for("react.memo_cache_sentinel")?(be=()=>{requestAnimationFrame(()=>{if(h.current){let x=h.current;x.scrollTop=x.scrollHeight}})},e[21]=be):be=e[21];let ye;e[22]===C?ye=e[23]:(ye=[C],e[22]=C,e[23]=ye),(0,m.useEffect)(be,ye);let je;e[24]!==X||e[25]!==E||e[26]!==t?(je=async(x,v)=>{let R=Date.now(),W={id:X,title:rr(x),messages:[],createdAt:R,updatedAt:R};t(pe=>{let Ze=new Map(pe.chats);return Ze.set(W.id,W),{...pe,chats:Ze,activeChatId:W.id}});let ne=v&&v.length>0?await ot(v):void 0;E({role:"user",parts:[{type:"text",text:x},...ne??[]]}),d(void 0),n("")},e[24]=X,e[25]=E,e[26]=t,e[27]=je):je=e[27];let Oe=je,Se;e[28]===a?Se=e[29]:(Se=()=>{a(null),n(""),c(""),d(void 0)},e[28]=a,e[29]=Se);let We=V(Se),Ce;e[30]!==A||e[31]!==E?(Ce=(x,v)=>{var pe;let R=A[x],W=(pe=R.parts)==null?void 0:pe.filter(fl),ne=R.id;E({messageId:ne,role:"user",parts:[{type:"text",text:v},...W]})},e[30]=A,e[31]=E,e[32]=Ce):Ce=e[32];let me=V(Ce),Ne;e[33]!==i||e[34]!==E?(Ne=async(x,v)=>{var W;if(!v.trim())return;(W=p.current)!=null&&W.view&&at(p.current.view);let R=i?await ot(i):void 0;x==null||x.preventDefault(),E({text:v,files:R}),n(""),d(void 0)},e[33]=i,e[34]=E,e[35]=Ne):Ne=e[35];let Ye=V(Ne),_e;e[36]===O?_e=e[37]:(_e=()=>{O()},e[36]=O,e[37]=_e);let Ue=_e,Re;e[38]!==Oe||e[39]!==i||e[40]!==s?(Re=()=>{var x;s.trim()&&((x=u.current)!=null&&x.view&&at(u.current.view),Oe(s.trim(),i))},e[38]=Oe,e[39]=i,e[40]=s,e[41]=Re):Re=e[41];let Xe=V(Re),Ae;e[42]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>{var x,v;return(v=(x=u.current)==null?void 0:x.editor)==null?void 0:v.blur()},e[42]=Ae):Ae=e[42];let Pt=Ae,M=A.length===0,Te;e[43]!==Ye||e[44]!==Xe||e[45]!==o||e[46]!==z||e[47]!==M||e[48]!==s||e[49]!==ve||e[50]!==D?(Te=M?(0,l.jsx)(Qe,{placeholder:"Ask anything, @ to include context about tables or dataframes",input:s,inputRef:u,inputClassName:"px-1 py-0",setInput:c,onSubmit:Xe,isLoading:z,onStop:D,fileInputRef:f,onAddFiles:ve,onClose:Pt},"new-thread-input"):(0,l.jsx)(Qe,{input:o,setInput:n,onSubmit:Ye,inputRef:p,isLoading:z,onStop:D,onClose:()=>{var x,v;return(v=(x=p.current)==null?void 0:x.editor)==null?void 0:v.blur()},fileInputRef:f,onAddFiles:ve}),e[43]=Ye,e[44]=Xe,e[45]=o,e[46]=z,e[47]=M,e[48]=s,e[49]=ve,e[50]=D,e[51]=Te):Te=e[51];let G=Te,Ee;e[52]!==i||e[53]!==M||e[54]!==He?(Ee=i&&i.length>0&&(0,l.jsx)("div",{className:se("flex flex-row gap-1 flex-wrap p-1",M&&"py-2 px-1"),children:i==null?void 0:i.map(x=>(0,l.jsx)(ar,{file:x,onRemove:()=>He(x)},x.name))}),e[52]=i,e[53]=M,e[54]=He,e[55]=Ee):Ee=e[55];let J=Ee,Be=r==null?void 0:r.id,K;e[56]!==We||e[57]!==a||e[58]!==Be?(K=(0,l.jsx)(dt,{children:(0,l.jsx)(el,{onNewChat:We,activeChatId:Be,setActiveChat:a})}),e[56]=We,e[57]=a,e[58]=Be,e[59]=K):K=e[59];let Q;e[60]!==G||e[61]!==J||e[62]!==M?(Q=M&&(0,l.jsxs)("div",{className:"rounded-md border bg-background",children:[J,G]}),e[60]=G,e[61]=J,e[62]=M,e[63]=Q):Q=e[63];let Z;if(e[64]!==me||e[65]!==ue||e[66]!==A){let x;e[68]!==me||e[69]!==ue||e[70]!==A.length?(x=(v,R)=>(0,l.jsx)(Tt,{message:v,index:R,onEdit:me,isStreamingReasoning:ue,isLast:R===A.length-1},v.id),e[68]=me,e[69]=ue,e[70]=A.length,e[71]=x):x=e[71],Z=A.map(x),e[64]=me,e[65]=ue,e[66]=A,e[67]=Z}else Z=e[67];let ee;e[72]===z?ee=e[73]:(ee=z&&(0,l.jsx)("div",{className:"flex justify-center py-4",children:(0,l.jsx)(xr,{className:"h-4 w-4 animate-spin"})}),e[72]=z,e[73]=ee);let te;e[74]!==H||e[75]!==Ue?(te=H&&(0,l.jsxs)("div",{className:"flex items-center justify-center space-x-2 mb-4",children:[(0,l.jsx)(Pr,{error:H}),(0,l.jsx)(B,{variant:"outline",size:"sm",onClick:Ue,children:"Retry"})]}),e[74]=H,e[75]=Ue,e[76]=te):te=e[76];let Le;e[77]===Symbol.for("react.memo_cache_sentinel")?(Le=(0,l.jsx)("div",{ref:g}),e[77]=Le):Le=e[77];let re;e[78]!==Q||e[79]!==Z||e[80]!==ee||e[81]!==te?(re=(0,l.jsxs)("div",{className:"flex-1 px-3 bg-(--slate-1) gap-4 py-3 flex flex-col overflow-y-auto",ref:h,children:[Q,Z,ee,te,Le]}),e[78]=Q,e[79]=Z,e[80]=ee,e[81]=te,e[82]=re):re=e[82];let le;e[83]!==z||e[84]!==D?(le=z&&(0,l.jsx)("div",{className:"w-full flex justify-center items-center z-20 border-t",children:(0,l.jsx)(B,{variant:"linkDestructive",size:"sm",onClick:D,children:"Stop"})}),e[83]=z,e[84]=D,e[85]=le):le=e[85];let oe;e[86]!==G||e[87]!==J||e[88]!==M?(oe=!M&&(0,l.jsxs)(l.Fragment,{children:[J,G]}),e[86]=G,e[87]=J,e[88]=M,e[89]=oe):oe=e[89];let Pe;return e[90]!==K||e[91]!==re||e[92]!==le||e[93]!==oe?(Pe=(0,l.jsxs)("div",{className:"flex flex-col h-[calc(100%-53px)]",children:[K,re,le,oe]}),e[90]=K,e[91]=re,e[92]=le,e[93]=oe,e[94]=Pe):Pe=e[94],Pe},ll=tl;function ol(e){return e.type==="text"}function nl(e){return e.text}function al(e){return e.type==="file"}function sl(e,t){return(0,l.jsx)(ir,{attachment:e},t)}function il(){}function cl(){}function dl(e){return e.type==="text"}function ul(e){return e.text}function ml(e){return(0,l.jsx)(dr,{value:e.value,className:"text-xs",children:(0,l.jsxs)("div",{className:"flex flex-col",children:[e.label,(0,l.jsx)("div",{className:"text-muted-foreground text-xs pt-1 block",children:e.subtitle})]})},e.value)}function pl(e){let{messages:t}=e;return Qt(t)}function hl(e){Ie.error("An error occurred:",e)}function fl(e){return e.type==="file"}export{ll as default};
import{t}from"./createLucideIcon-CnW3RofX.js";var e=t("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);export{e as t};
import{t}from"./createLucideIcon-CnW3RofX.js";var r=t("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);export{r as t};
import{n as r}from"./src-BKLwm2RN.js";function l(i,c){var e,a,o;i.accDescr&&((e=c.setAccDescription)==null||e.call(c,i.accDescr)),i.accTitle&&((a=c.setAccTitle)==null||a.call(c,i.accTitle)),i.title&&((o=c.setDiagramTitle)==null||o.call(c,i.title))}r(l,"populateCommonDb");export{l as t};
import{u as r}from"./src-Cf4NnJCp.js";import{n}from"./src-BKLwm2RN.js";var a=n((e,o)=>{let t;return o==="sandbox"&&(t=r("#i"+e)),r(o==="sandbox"?t.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement");export{a as t};

Sorry, the diff of this file is too big to display

var e;import{c as o,f as r,g as u,h as l,i as d,m as t,p as k,s as p,t as v}from"./chunk-FPAJGGOC-DOBSZjU2.js";var h=(e=class extends v{constructor(){super(["packet"])}},r(e,"PacketTokenBuilder"),e),c={parser:{TokenBuilder:r(()=>new h,"TokenBuilder"),ValueConverter:r(()=>new d,"ValueConverter")}};function n(i=k){let a=t(u(i),p),s=t(l({shared:a}),o,c);return a.ServiceRegistry.register(s),{shared:a,Packet:s}}r(n,"createPacketServices");export{n,c as t};

Sorry, the diff of this file is too big to display

import{n as a}from"./src-BKLwm2RN.js";import{b as p}from"./chunk-ABZYJK2D-t8l6Viza.js";var d=a(t=>{let{handDrawnSeed:e}=p();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),h=a(t=>{let e=f([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),f=a(t=>{let e=new Map;return t.forEach(s=>{let[i,l]=s.split(":");e.set(i.trim(),l==null?void 0:l.trim())}),e},"styles2Map"),y=a(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),u=a(t=>{let{stylesArray:e}=h(t),s=[],i=[],l=[],n=[];return e.forEach(r=>{let o=r[0];y(o)?s.push(r.join(":")+" !important"):(i.push(r.join(":")+" !important"),o.includes("stroke")&&l.push(r.join(":")+" !important"),o==="fill"&&n.push(r.join(":")+" !important"))}),{labelStyles:s.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:l,backgroundStyles:n}},"styles2String"),g=a((t,e)=>{var o;let{themeVariables:s,handDrawnSeed:i}=p(),{nodeBorder:l,mainBkg:n}=s,{stylesMap:r}=h(t);return Object.assign({roughness:.7,fill:r.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:r.get("stroke")||l,seed:i,strokeWidth:((o=r.get("stroke-width"))==null?void 0:o.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:c(r.get("stroke-dasharray"))},e)},"userNodeOverrides"),c=a(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let s=isNaN(e[0])?0:e[0];return[s,s]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray");export{g as a,u as i,y as n,d as r,h as t};
var P,M;import{u as J}from"./src-Cf4NnJCp.js";import{c as te,g as It}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as A,r as Ot}from"./src-BKLwm2RN.js";import{A as w,B as ee,C as se,I as ie,U as ne,_ as re,a as ae,b as F,s as L,v as ue,z as le}from"./chunk-ABZYJK2D-t8l6Viza.js";import{r as oe,t as ce}from"./chunk-N4CR4FBY-eo9CRI73.js";import{t as he}from"./chunk-FMBD7UC4-Cn7KHL11.js";import{t as pe}from"./chunk-55IACEB6-SrR0J56d.js";import{t as de}from"./chunk-QN33PNHL-C_hHv997.js";var vt=(function(){var s=A(function(o,y,p,a){for(p||(p={}),a=o.length;a--;p[o[a]]=y);return p},"o"),i=[1,18],n=[1,19],r=[1,20],l=[1,41],u=[1,42],h=[1,26],d=[1,24],m=[1,25],B=[1,32],pt=[1,33],dt=[1,34],b=[1,45],At=[1,35],yt=[1,36],mt=[1,37],Ct=[1,38],bt=[1,27],gt=[1,28],Et=[1,29],kt=[1,30],ft=[1,31],g=[1,44],E=[1,46],k=[1,43],f=[1,47],Tt=[1,9],c=[1,8,9],Z=[1,58],tt=[1,59],et=[1,60],st=[1,61],it=[1,62],Ft=[1,63],Dt=[1,64],G=[1,8,9,41],Rt=[1,76],v=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],nt=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],rt=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],wt=[13,60,68,69,70,71,72,86,100,102,103],Bt=[1,100],z=[1,117],K=[1,113],Y=[1,109],W=[1,115],Q=[1,110],X=[1,111],j=[1,112],H=[1,114],q=[1,116],Pt=[22,48,60,61,82,86,87,88,89,90],_t=[1,8,9,39,41,44],at=[1,8,9,22],Mt=[1,145],Gt=[1,8,9,61],N=[1,8,9,22,48,60,61,82,86,87,88,89,90],St={trace:A(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,classLiteralName:17,DOT:18,className: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,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"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",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,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,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[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],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,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],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:A(function(o,y,p,a,C,t,V){var e=t.length-1;switch(C){case 8:this.$=t[e-1];break;case 9:case 10:case 13:case 15:this.$=t[e];break;case 11:case 14:this.$=t[e-2]+"."+t[e];break;case 12:case 16:this.$=t[e-1]+t[e];break;case 17:case 18:this.$=t[e-1]+"~"+t[e]+"~";break;case 19:a.addRelation(t[e]);break;case 20:t[e-1].title=a.cleanupLabel(t[e]),a.addRelation(t[e-1]);break;case 31:this.$=t[e].trim(),a.setAccTitle(this.$);break;case 32:case 33:this.$=t[e].trim(),a.setAccDescription(this.$);break;case 34:a.addClassesToNamespace(t[e-3],t[e-1]);break;case 35:a.addClassesToNamespace(t[e-4],t[e-1]);break;case 36:this.$=t[e],a.addNamespace(t[e]);break;case 37:this.$=[t[e]];break;case 38:this.$=[t[e-1]];break;case 39:t[e].unshift(t[e-2]),this.$=t[e];break;case 41:a.setCssClass(t[e-2],t[e]);break;case 42:a.addMembers(t[e-3],t[e-1]);break;case 44:a.setCssClass(t[e-5],t[e-3]),a.addMembers(t[e-5],t[e-1]);break;case 45:this.$=t[e],a.addClass(t[e]);break;case 46:this.$=t[e-1],a.addClass(t[e-1]),a.setClassLabel(t[e-1],t[e]);break;case 50:a.addAnnotation(t[e],t[e-2]);break;case 51:case 64:this.$=[t[e]];break;case 52:t[e].push(t[e-1]),this.$=t[e];break;case 53:break;case 54:a.addMember(t[e-1],a.cleanupLabel(t[e]));break;case 55:break;case 56:break;case 57:this.$={id1:t[e-2],id2:t[e],relation:t[e-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:t[e-3],id2:t[e],relation:t[e-1],relationTitle1:t[e-2],relationTitle2:"none"};break;case 59:this.$={id1:t[e-3],id2:t[e],relation:t[e-2],relationTitle1:"none",relationTitle2:t[e-1]};break;case 60:this.$={id1:t[e-4],id2:t[e],relation:t[e-2],relationTitle1:t[e-3],relationTitle2:t[e-1]};break;case 61:a.addNote(t[e],t[e-1]);break;case 62:a.addNote(t[e]);break;case 63:this.$=t[e-2],a.defineClass(t[e-1],t[e]);break;case 65:this.$=t[e-2].concat([t[e]]);break;case 66:a.setDirection("TB");break;case 67:a.setDirection("BT");break;case 68:a.setDirection("RL");break;case 69:a.setDirection("LR");break;case 70:this.$={type1:t[e-2],type2:t[e],lineType:t[e-1]};break;case 71:this.$={type1:"none",type2:t[e],lineType:t[e-1]};break;case 72:this.$={type1:t[e-1],type2:"none",lineType:t[e]};break;case 73:this.$={type1:"none",type2:"none",lineType:t[e]};break;case 74:this.$=a.relationType.AGGREGATION;break;case 75:this.$=a.relationType.EXTENSION;break;case 76:this.$=a.relationType.COMPOSITION;break;case 77:this.$=a.relationType.DEPENDENCY;break;case 78:this.$=a.relationType.LOLLIPOP;break;case 79:this.$=a.lineType.LINE;break;case 80:this.$=a.lineType.DOTTED_LINE;break;case 81:case 87:this.$=t[e-2],a.setClickEvent(t[e-1],t[e]);break;case 82:case 88:this.$=t[e-3],a.setClickEvent(t[e-2],t[e-1]),a.setTooltip(t[e-2],t[e]);break;case 83:this.$=t[e-2],a.setLink(t[e-1],t[e]);break;case 84:this.$=t[e-3],a.setLink(t[e-2],t[e-1],t[e]);break;case 85:this.$=t[e-3],a.setLink(t[e-2],t[e-1]),a.setTooltip(t[e-2],t[e]);break;case 86:this.$=t[e-4],a.setLink(t[e-3],t[e-2],t[e]),a.setTooltip(t[e-3],t[e-1]);break;case 89:this.$=t[e-3],a.setClickEvent(t[e-2],t[e-1],t[e]);break;case 90:this.$=t[e-4],a.setClickEvent(t[e-3],t[e-2],t[e-1]),a.setTooltip(t[e-3],t[e]);break;case 91:this.$=t[e-3],a.setLink(t[e-2],t[e]);break;case 92:this.$=t[e-4],a.setLink(t[e-3],t[e-1],t[e]);break;case 93:this.$=t[e-4],a.setLink(t[e-3],t[e-1]),a.setTooltip(t[e-3],t[e]);break;case 94:this.$=t[e-5],a.setLink(t[e-4],t[e-2],t[e]),a.setTooltip(t[e-4],t[e-1]);break;case 95:this.$=t[e-2],a.setCssStyle(t[e-1],t[e]);break;case 96:a.setCssClass(t[e-1],t[e]);break;case 97:this.$=[t[e]];break;case 98:t[e-2].push(t[e]),this.$=t[e-2];break;case 100:this.$=t[e-1]+t[e];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,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:n,37:r,38:22,42:l,43:23,46:u,49:h,51:d,52:m,54:B,56:pt,57:dt,60:b,62:At,63:yt,64:mt,65:Ct,75:bt,76:gt,78:Et,82:kt,83:ft,86:g,100:E,102:k,103:f},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(Tt,[2,5],{8:[1,48]}),{8:[1,49]},s(c,[2,19],{22:[1,50]}),s(c,[2,21]),s(c,[2,22]),s(c,[2,23]),s(c,[2,24]),s(c,[2,25]),s(c,[2,26]),s(c,[2,27]),s(c,[2,28]),s(c,[2,29]),s(c,[2,30]),{34:[1,51]},{36:[1,52]},s(c,[2,33]),s(c,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:tt,70:et,71:st,72:it,73:Ft,74:Dt}),{39:[1,65]},s(G,[2,40],{39:[1,67],44:[1,66]}),s(c,[2,55]),s(c,[2,56]),{16:68,60:b,86:g,100:E,102:k},{16:39,17:40,19:69,60:b,86:g,100:E,102:k,103:f},{16:39,17:40,19:70,60:b,86:g,100:E,102:k,103:f},{16:39,17:40,19:71,60:b,86:g,100:E,102:k,103:f},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:b,86:g,100:E,102:k,103:f},{13:Rt,55:75},{58:77,60:[1,78]},s(c,[2,66]),s(c,[2,67]),s(c,[2,68]),s(c,[2,69]),s(v,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:b,86:g,100:E,102:k,103:f}),s(v,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:b,86:g,100:E,102:k,103:f},{16:39,17:40,19:86,60:b,86:g,100:E,102:k,103:f},s(nt,[2,123]),s(nt,[2,124]),s(nt,[2,125]),s(nt,[2,126]),s([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),s(Tt,[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,19:21,38:22,43:23,16:39,17:40,5:87,33:i,35:n,37:r,42:l,46:u,49:h,51:d,52:m,54:B,56:pt,57:dt,60:b,62:At,63:yt,64:mt,65:Ct,75:bt,76:gt,78:Et,82:kt,83:ft,86:g,100:E,102:k,103:f}),{5:88,10:5,16:39,17:40,19:21,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:n,37:r,38:22,42:l,43:23,46:u,49:h,51:d,52:m,54:B,56:pt,57:dt,60:b,62:At,63:yt,64:mt,65:Ct,75:bt,76:gt,78:Et,82:kt,83:ft,86:g,100:E,102:k,103:f},s(c,[2,20]),s(c,[2,31]),s(c,[2,32]),{13:[1,90],16:39,17:40,19:89,60:b,86:g,100:E,102:k,103:f},{53:91,66:56,67:57,68:Z,69:tt,70:et,71:st,72:it,73:Ft,74:Dt},s(c,[2,54]),{67:92,73:Ft,74:Dt},s(rt,[2,73],{66:93,68:Z,69:tt,70:et,71:st,72:it}),s(U,[2,74]),s(U,[2,75]),s(U,[2,76]),s(U,[2,77]),s(U,[2,78]),s(wt,[2,79]),s(wt,[2,80]),{8:[1,95],24:96,40:94,43:23,46:u},{16:97,60:b,86:g,100:E,102:k},{41:[1,99],45:98,51:Bt},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:z,48:K,59:106,60:Y,82:W,84:107,85:108,86:Q,87:X,88:j,89:H,90:q},{60:[1,118]},{13:Rt,55:119},s(c,[2,62]),s(c,[2,128]),{22:z,48:K,59:120,60:Y,61:[1,121],82:W,84:107,85:108,86:Q,87:X,88:j,89:H,90:q},s(Pt,[2,64]),{16:39,17:40,19:122,60:b,86:g,100:E,102:k,103:f},s(v,[2,16]),s(v,[2,17]),s(v,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:b,86:g,100:E,102:k,103:f},{39:[2,10]},s(_t,[2,45],{11:125,12:[1,126]}),s(Tt,[2,7]),{9:[1,127]},s(at,[2,57]),{16:39,17:40,19:128,60:b,86:g,100:E,102:k,103:f},{13:[1,130],16:39,17:40,19:129,60:b,86:g,100:E,102:k,103:f},s(rt,[2,72],{66:131,68:Z,69:tt,70:et,71:st,72:it}),s(rt,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:u},{8:[1,134],41:[2,37]},s(G,[2,41],{39:[1,135]}),{41:[1,136]},s(G,[2,43]),{41:[2,51],45:137,51:Bt},{16:39,17:40,19:138,60:b,86:g,100:E,102:k,103:f},s(c,[2,81],{13:[1,139]}),s(c,[2,83],{13:[1,141],77:[1,140]}),s(c,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},s(c,[2,95],{61:Mt}),s(Gt,[2,97],{85:146,22:z,48:K,60:Y,82:W,86:Q,87:X,88:j,89:H,90:q}),s(N,[2,99]),s(N,[2,101]),s(N,[2,102]),s(N,[2,103]),s(N,[2,104]),s(N,[2,105]),s(N,[2,106]),s(N,[2,107]),s(N,[2,108]),s(N,[2,109]),s(c,[2,96]),s(c,[2,61]),s(c,[2,63],{61:Mt}),{60:[1,147]},s(v,[2,14]),{15:148,16:84,17:85,60:b,86:g,100:E,102:k,103:f},{39:[2,12]},s(_t,[2,46]),{13:[1,149]},{1:[2,4]},s(at,[2,59]),s(at,[2,58]),{16:39,17:40,19:150,60:b,86:g,100:E,102:k,103:f},s(rt,[2,70]),s(c,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:u},{45:153,51:Bt},s(G,[2,42]),{41:[2,52]},s(c,[2,50]),s(c,[2,82]),s(c,[2,84]),s(c,[2,85],{77:[1,154]}),s(c,[2,88]),s(c,[2,89],{13:[1,155]}),s(c,[2,91],{13:[1,157],77:[1,156]}),{22:z,48:K,60:Y,82:W,84:158,85:108,86:Q,87:X,88:j,89:H,90:q},s(N,[2,100]),s(Pt,[2,65]),{39:[2,11]},{14:[1,159]},s(at,[2,60]),s(c,[2,35]),{41:[2,39]},{41:[1,160]},s(c,[2,86]),s(c,[2,90]),s(c,[2,92]),s(c,[2,93],{77:[1,161]}),s(Gt,[2,98],{85:146,22:z,48:K,60:Y,82:W,86:Q,87:X,88:j,89:H,90:q}),s(_t,[2,8]),s(G,[2,44]),s(c,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:A(function(o,y){if(y.recoverable)this.trace(o);else{var p=Error(o);throw p.hash=y,p}},"parseError"),parse:A(function(o){var y=this,p=[0],a=[],C=[null],t=[],V=this.table,e="",lt=0,Ut=0,zt=0,qt=2,Kt=1,Vt=t.slice.call(arguments,1),T=Object.create(this.lexer),x={yy:{}};for(var Nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Nt)&&(x.yy[Nt]=this.yy[Nt]);T.setInput(o,x.yy),x.yy.lexer=T,x.yy.parser=this,T.yylloc===void 0&&(T.yylloc={});var $t=T.yylloc;t.push($t);var Jt=T.options&&T.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(S){p.length-=2*S,C.length-=S,t.length-=S}A(Zt,"popStack");function Yt(){var S=a.pop()||T.lex()||Kt;return typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=y.symbols_[S]||S),S}A(Yt,"lex");for(var D,Lt,I,_,xt,R={},ot,$,Wt,ct;;){if(I=p[p.length-1],this.defaultActions[I]?_=this.defaultActions[I]:(D??(D=Yt()),_=V[I]&&V[I][D]),_===void 0||!_.length||!_[0]){var Qt="";for(ot in ct=[],V[I])this.terminals_[ot]&&ot>qt&&ct.push("'"+this.terminals_[ot]+"'");Qt=T.showPosition?"Parse error on line "+(lt+1)+`:
`+T.showPosition()+`
Expecting `+ct.join(", ")+", got '"+(this.terminals_[D]||D)+"'":"Parse error on line "+(lt+1)+": Unexpected "+(D==Kt?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(Qt,{text:T.match,token:this.terminals_[D]||D,line:T.yylineno,loc:$t,expected:ct})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+I+", token: "+D);switch(_[0]){case 1:p.push(D),C.push(T.yytext),t.push(T.yylloc),p.push(_[1]),D=null,Lt?(D=Lt,Lt=null):(Ut=T.yyleng,e=T.yytext,lt=T.yylineno,$t=T.yylloc,zt>0&&zt--);break;case 2:if($=this.productions_[_[1]][1],R.$=C[C.length-$],R._$={first_line:t[t.length-($||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-($||1)].first_column,last_column:t[t.length-1].last_column},Jt&&(R._$.range=[t[t.length-($||1)].range[0],t[t.length-1].range[1]]),xt=this.performAction.apply(R,[e,Ut,lt,x.yy,_[1],C,t].concat(Vt)),xt!==void 0)return xt;$&&(p=p.slice(0,-1*$*2),C=C.slice(0,-1*$),t=t.slice(0,-1*$)),p.push(this.productions_[_[1]][0]),C.push(R.$),t.push(R._$),Wt=V[p[p.length-2]][p[p.length-1]],p.push(Wt);break;case 3:return!0}}return!0},"parse")};St.lexer=(function(){return{EOF:1,parseError:A(function(o,y){if(this.yy.parser)this.yy.parser.parseError(o,y);else throw Error(o)},"parseError"),setInput:A(function(o,y){return this.yy=y||this.yy||{},this._input=o,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:A(function(){var o=this._input[0];return this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o,o.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:A(function(o){var y=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y),this.offset-=y;var a=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===a.length?this.yylloc.first_column:0)+a[a.length-p.length].length-p[0].length:this.yylloc.first_column-y},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-y]),this.yyleng=this.yytext.length,this},"unput"),more:A(function(){return this._more=!0,this},"more"),reject:A(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:A(function(o){this.unput(this.match.slice(o))},"less"),pastInput:A(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:A(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:A(function(){var o=this.pastInput(),y=Array(o.length+1).join("-");return o+this.upcomingInput()+`
`+y+"^"},"showPosition"),test_match:A(function(o,y){var p,a,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))),a=o[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],p=this.performAction.call(this,this.yy,this,y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var t in C)this[t]=C[t];return!1}return!1},"test_match"),next:A(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,y,p,a;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),t=0;t<C.length;t++)if(p=this._input.match(this.rules[C[t]]),p&&(!y||p[0].length>y[0].length)){if(y=p,a=t,this.options.backtrack_lexer){if(o=this.test_match(p,C[t]),o!==!1)return o;if(this._backtrack){y=!1;continue}else return!1}else if(!this.options.flex)break}return y?(o=this.test_match(y,C[a]),o===!1?!1:o):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:A(function(){return this.next()||this.lex()},"lex"),begin:A(function(o){this.conditionStack.push(o)},"begin"),popState:A(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:A(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:A(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:A(function(o){this.begin(o)},"pushState"),stateStackSize:A(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:A(function(o,y,p,a){switch(p){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;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 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;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 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;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 77;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 69;case 69:return 69;case 70:return 71;case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:return 89;case 85:return 89;case 86:return 90;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:return 48;case 96:return 48;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}}}})();function ut(){this.yy={}}return A(ut,"Parser"),ut.prototype=St,St.Parser=ut,new ut})();vt.parser=vt;var Ae=vt,Xt=["#","+","~","-",""],jt=(P=class{constructor(i,n){this.memberType=n,this.visibility="",this.classifier="",this.text="";let r=ie(i,F());this.parseMember(r)}getDisplayDetails(){let i=this.visibility+w(this.id);this.memberType==="method"&&(i+=`(${w(this.parameters.trim())})`,this.returnType&&(i+=" : "+w(this.returnType))),i=i.trim();let n=this.parseClassifier();return{displayText:i,cssStyle:n}}parseMember(i){let n="";if(this.memberType==="method"){let r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(r){let l=r[1]?r[1].trim():"";if(Xt.includes(l)&&(this.visibility=l),this.id=r[2],this.parameters=r[3]?r[3].trim():"",n=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",n===""){let u=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(u)&&(n=u,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let r=i.length,l=i.substring(0,1),u=i.substring(r-1);Xt.includes(l)&&(this.visibility=l),/[$*]/.exec(u)&&(n=u),this.id=i.substring(this.visibility===""?0:1,n===""?r:r-1)}this.classifier=n,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim(),this.text=`${this.visibility?"\\"+this.visibility:""}${w(this.id)}${this.memberType==="method"?`(${w(this.parameters)})${this.returnType?" : "+w(this.returnType):""}`:""}`.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},A(P,"ClassMember"),P),ht="classId-",Ht=0,O=A(s=>L.sanitizeText(s,F()),"sanitizeText"),ye=(M=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=A(i=>{let n=J(".mermaidTooltip");(n._groups||n)[0][0]===null&&(n=J("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),J(i).select("svg").selectAll("g.node").on("mouseover",r=>{let l=J(r.currentTarget);if(l.attr("title")===null)return;let u=this.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(l.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.top-14+document.body.scrollTop+"px"),n.html(n.html().replace(/&lt;br\/&gt;/g,"<br/>")),l.classed("hover",!0)}).on("mouseout",r=>{n.transition().duration(500).style("opacity",0),J(r.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=ee,this.getAccTitle=ue,this.setAccDescription=le,this.getAccDescription=re,this.setDiagramTitle=ne,this.getDiagramTitle=se,this.getConfig=A(()=>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){let n=L.sanitizeText(i,F()),r="",l=n;if(n.indexOf("~")>0){let u=n.split("~");l=O(u[0]),r=O(u[1])}return{className:l,type:r}}setClassLabel(i,n){let r=L.sanitizeText(i,F());n&&(n=O(n));let{className:l}=this.splitClassNameAndType(r);this.classes.get(l).label=n,this.classes.get(l).text=`${n}${this.classes.get(l).type?`<${this.classes.get(l).type}>`:""}`}addClass(i){let n=L.sanitizeText(i,F()),{className:r,type:l}=this.splitClassNameAndType(n);if(this.classes.has(r))return;let u=L.sanitizeText(r,F());this.classes.set(u,{id:u,type:l,label:u,text:`${u}${l?`&lt;${l}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:ht+u+"-"+Ht}),Ht++}addInterface(i,n){let r={id:`interface${this.interfaces.length}`,label:i,classId:n};this.interfaces.push(r)}lookUpDomId(i){let n=L.sanitizeText(i,F());if(this.classes.has(n))return this.classes.get(n).domId;throw Error("Class not found: "+n)}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",ae()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(i){Ot.debug("Adding relation: "+JSON.stringify(i));let n=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!n.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&&!n.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=L.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=L.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,n){let r=this.splitClassNameAndType(i).className;this.classes.get(r).annotations.push(n)}addMember(i,n){this.addClass(i);let r=this.splitClassNameAndType(i).className,l=this.classes.get(r);if(typeof n=="string"){let u=n.trim();u.startsWith("<<")&&u.endsWith(">>")?l.annotations.push(O(u.substring(2,u.length-2))):u.indexOf(")")>0?l.methods.push(new jt(u,"method")):u&&l.members.push(new jt(u,"attribute"))}}addMembers(i,n){Array.isArray(n)&&(n.reverse(),n.forEach(r=>this.addMember(i,r)))}addNote(i,n){let r={id:`note${this.notes.length}`,class:n,text:i};this.notes.push(r)}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),O(i.trim())}setCssClass(i,n){i.split(",").forEach(r=>{let l=r;/\d/.exec(r[0])&&(l=ht+l);let u=this.classes.get(l);u&&(u.cssClasses+=" "+n)})}defineClass(i,n){for(let r of i){let l=this.styleClasses.get(r);l===void 0&&(l={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,l)),n&&n.forEach(u=>{if(/color/.exec(u)){let h=u.replace("fill","bgFill");l.textStyles.push(h)}l.styles.push(u)}),this.classes.forEach(u=>{u.cssClasses.includes(r)&&u.styles.push(...n.flatMap(h=>h.split(",")))})}}setTooltip(i,n){i.split(",").forEach(r=>{n!==void 0&&(this.classes.get(r).tooltip=O(n))})}getTooltip(i,n){return n&&this.namespaces.has(n)?this.namespaces.get(n).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,n,r){let l=F();i.split(",").forEach(u=>{let h=u;/\d/.exec(u[0])&&(h=ht+h);let d=this.classes.get(h);d&&(d.link=It.formatUrl(n,l),l.securityLevel==="sandbox"?d.linkTarget="_top":typeof r=="string"?d.linkTarget=O(r):d.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,n,r){i.split(",").forEach(l=>{this.setClickFunc(l,n,r),this.classes.get(l).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,n,r){let l=L.sanitizeText(i,F());if(F().securityLevel!=="loose"||n===void 0)return;let u=l;if(this.classes.has(u)){let h=this.lookUpDomId(u),d=[];if(typeof r=="string"){d=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let m=0;m<d.length;m++){let B=d[m].trim();B.startsWith('"')&&B.endsWith('"')&&(B=B.substr(1,B.length-2)),d[m]=B}}d.length===0&&d.push(h),this.functions.push(()=>{let m=document.querySelector(`[id="${h}"]`);m!==null&&m.addEventListener("click",()=>{It.runFunc(n,...d)},!1)})}}bindFunctions(i){this.functions.forEach(n=>{n(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:ht+i+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,n){if(this.namespaces.has(i))for(let r of n){let{className:l}=this.splitClassNameAndType(r);this.classes.get(l).parent=i,this.namespaces.get(i).classes.set(l,this.classes.get(l))}}setCssStyle(i,n){let r=this.classes.get(i);if(!(!n||!r))for(let l of n)l.includes(",")?r.styles.push(...l.split(",")):r.styles.push(l)}getArrowMarker(i){let n;switch(i){case 0:n="aggregation";break;case 1:n="extension";break;case 2:n="composition";break;case 3:n="dependency";break;case 4:n="lollipop";break;default:n="none"}return n}getData(){var u;let i=[],n=[],r=F();for(let h of this.namespaces.keys()){let d=this.namespaces.get(h);if(d){let m={id:d.id,label:d.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:r.look};i.push(m)}}for(let h of this.classes.keys()){let d=this.classes.get(h);if(d){let m=d;m.parentId=d.parent,m.look=r.look,i.push(m)}}let l=0;for(let h of this.notes){l++;let d={id:h.id,label:h.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look};i.push(d);let m=((u=this.classes.get(h.class))==null?void 0:u.id)??"";if(m){let B={id:`edgeNote${l}`,start:h.id,end:m,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};n.push(B)}}for(let h of this.interfaces){let d={id:h.id,label:h.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};i.push(d)}l=0;for(let h of this.relations){l++;let d={id:te(h.id1,h.id2,{prefix:"id",counter:l}),start:h.id1,end:h.id2,type:"normal",label:h.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(h.relation.type1),arrowTypeEnd:this.getArrowMarker(h.relation.type2),startLabelRight:h.relationTitle1==="none"?"":h.relationTitle1,endLabelLeft:h.relationTitle2==="none"?"":h.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:h.style||"",pattern:h.relation.lineType==1?"dashed":"solid",look:r.look};n.push(d)}return{nodes:i,edges:n,other:{},config:r,direction:this.getDirection()}}},A(M,"ClassDB"),M),me=A(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};
}
${he()}
`,"getStyles"),Ce={getClasses:A(function(s,i){return i.db.getClasses()},"getClasses"),draw:A(async function(s,i,n,r){Ot.info("REF0:"),Ot.info("Drawing class diagram (v3)",i);let{securityLevel:l,state:u,layout:h}=F(),d=r.db.getData(),m=pe(i,l);d.type=r.type,d.layoutAlgorithm=ce(h),d.nodeSpacing=(u==null?void 0:u.nodeSpacing)||50,d.rankSpacing=(u==null?void 0:u.rankSpacing)||50,d.markers=["aggregation","extension","composition","dependency","lollipop"],d.diagramId=i,await oe(d,m),It.insertTitle(m,"classDiagramTitleText",(u==null?void 0:u.titleTopMargin)??25,r.db.getDiagramTitle()),de(m,8,"classDiagram",(u==null?void 0:u.useMaxWidth)??!0)},"draw"),getDir:A((s,i="TB")=>{if(!s.doc)return i;let n=i;for(let r of s.doc)r.stmt==="dir"&&(n=r.value);return n},"getDir")};export{me as i,Ae as n,Ce as r,ye as t};
import{n as p}from"./src-BKLwm2RN.js";var l=p(({flowchart:t})=>{var i,o;let r=((i=t==null?void 0:t.subGraphTitleMargin)==null?void 0:i.top)??0,a=((o=t==null?void 0:t.subGraphTitleMargin)==null?void 0:o.bottom)??0;return{subGraphTitleTopMargin:r,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:r+a}},"getSubGraphTitleMargins");export{l as t};
var K;import{g as te,s as ee}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as u,r as T}from"./src-BKLwm2RN.js";import{B as se,C as ie,U as re,_ as ne,a as ae,b as w,s as U,v as oe,z as le}from"./chunk-ABZYJK2D-t8l6Viza.js";import{r as ce}from"./chunk-N4CR4FBY-eo9CRI73.js";import{t as he}from"./chunk-55IACEB6-SrR0J56d.js";import{t as de}from"./chunk-QN33PNHL-C_hHv997.js";var kt=(function(){var e=u(function(a,h,g,S){for(g||(g={}),S=a.length;S--;g[a[S]]=h);return g},"o"),t=[1,2],s=[1,3],n=[1,4],i=[2,4],o=[1,9],c=[1,11],y=[1,16],p=[1,17],_=[1,18],m=[1,19],D=[1,33],A=[1,20],x=[1,21],R=[1,22],$=[1,23],O=[1,24],d=[1,26],E=[1,27],v=[1,28],G=[1,29],j=[1,30],Y=[1,31],F=[1,32],rt=[1,35],nt=[1,36],at=[1,37],ot=[1,38],H=[1,34],f=[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],lt=[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],$t=[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],mt={trace:u(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:u(function(a,h,g,S,b,r,Q){var l=r.length-1;switch(b){case 3:return S.setRootDoc(r[l]),r[l];case 4:this.$=[];break;case 5:r[l]!="nl"&&(r[l-1].push(r[l]),this.$=r[l-1]);break;case 6:case 7:this.$=r[l];break;case 8:this.$="nl";break;case 12:this.$=r[l];break;case 13:let ht=r[l-1];ht.description=S.trimColon(r[l]),this.$=ht;break;case 14:this.$={stmt:"relation",state1:r[l-2],state2:r[l]};break;case 15:let dt=S.trimColon(r[l]);this.$={stmt:"relation",state1:r[l-3],state2:r[l-1],description:dt};break;case 19:this.$={stmt:"state",id:r[l-3],type:"default",description:"",doc:r[l-1]};break;case 20:var z=r[l],X=r[l-2].trim();if(r[l].match(":")){var Z=r[l].split(":");z=Z[0],X=[X,Z[1]]}this.$={stmt:"state",id:z,type:"default",description:X};break;case 21:this.$={stmt:"state",id:r[l-3],type:"default",description:r[l-5],doc:r[l-1]};break;case 22:this.$={stmt:"state",id:r[l],type:"fork"};break;case 23:this.$={stmt:"state",id:r[l],type:"join"};break;case 24:this.$={stmt:"state",id:r[l],type:"choice"};break;case 25:this.$={stmt:"state",id:S.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[l-1].trim(),note:{position:r[l-2].trim(),text:r[l].trim()}};break;case 29:this.$=r[l].trim(),S.setAccTitle(this.$);break;case 30:case 31:this.$=r[l].trim(),S.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[l-3],url:r[l-2],tooltip:r[l-1]};break;case 33:this.$={stmt:"click",id:r[l-3],url:r[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[l-1].trim(),classes:r[l].trim()};break;case 36:this.$={stmt:"style",id:r[l-1].trim(),styleClass:r[l].trim()};break;case 37:this.$={stmt:"applyClass",id:r[l-1].trim(),styleClass:r[l].trim()};break;case 38:S.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:S.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:S.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:S.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[l-2].trim(),classes:[r[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[l-2].trim(),classes:[r[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:s,6:n},{1:[3]},{3:5,4:t,5:s,6:n},{3:6,4:t,5:s,6:n},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:c,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:p,19:_,22:m,24:D,25:A,26:x,27:R,28:$,29:O,32:25,33:d,35:E,37:v,38:G,41:j,45:Y,48:F,51:rt,52:nt,53:at,54:ot,57:H},e(f,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:p,19:_,22:m,24:D,25:A,26:x,27:R,28:$,29:O,32:25,33:d,35:E,37:v,38:G,41:j,45:Y,48:F,51:rt,52:nt,53:at,54:ot,57:H},e(f,[2,7]),e(f,[2,8]),e(f,[2,9]),e(f,[2,10]),e(f,[2,11]),e(f,[2,12],{14:[1,40],15:[1,41]}),e(f,[2,16]),{18:[1,42]},e(f,[2,18],{20:[1,43]}),{23:[1,44]},e(f,[2,22]),e(f,[2,23]),e(f,[2,24]),e(f,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(f,[2,28]),{34:[1,49]},{36:[1,50]},e(f,[2,31]),{13:51,24:D,57:H},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(lt,[2,44],{58:[1,56]}),e(lt,[2,45],{58:[1,57]}),e(f,[2,38]),e(f,[2,39]),e(f,[2,40]),e(f,[2,41]),e(f,[2,6]),e(f,[2,13]),{13:58,24:D,57:H},e(f,[2,17]),e($t,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(f,[2,29]),e(f,[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(f,[2,14],{14:[1,71]}),{4:o,5:c,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:p,19:_,21:[1,72],22:m,24:D,25:A,26:x,27:R,28:$,29:O,32:25,33:d,35:E,37:v,38:G,41:j,45:Y,48:F,51:rt,52:nt,53:at,54:ot,57:H},e(f,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(f,[2,34]),e(f,[2,35]),e(f,[2,36]),e(f,[2,37]),e(lt,[2,46]),e(lt,[2,47]),e(f,[2,15]),e(f,[2,19]),e($t,i,{7:78}),e(f,[2,26]),e(f,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:c,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:p,19:_,21:[1,81],22:m,24:D,25:A,26:x,27:R,28:$,29:O,32:25,33:d,35:E,37:v,38:G,41:j,45:Y,48:F,51:rt,52:nt,53:at,54:ot,57:H},e(f,[2,32]),e(f,[2,33]),e(f,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:u(function(a,h){if(h.recoverable)this.trace(a);else{var g=Error(a);throw g.hash=h,g}},"parseError"),parse:u(function(a){var h=this,g=[0],S=[],b=[null],r=[],Q=this.table,l="",z=0,X=0,Z=0,ht=2,dt=1,qt=r.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var St in this.yy)Object.prototype.hasOwnProperty.call(this.yy,St)&&(W.yy[St]=this.yy[St]);k.setInput(a,W.yy),W.yy.lexer=k,W.yy.parser=this,k.yylloc===void 0&&(k.yylloc={});var _t=k.yylloc;r.push(_t);var Qt=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){g.length-=2*N,b.length-=N,r.length-=N}u(Zt,"popStack");function Lt(){var N=S.pop()||k.lex()||dt;return typeof N!="number"&&(N instanceof Array&&(S=N,N=S.pop()),N=h.symbols_[N]||N),N}u(Lt,"lex");for(var L,bt,M,I,Tt,V={},ut,B,At,pt;;){if(M=g[g.length-1],this.defaultActions[M]?I=this.defaultActions[M]:(L??(L=Lt()),I=Q[M]&&Q[M][L]),I===void 0||!I.length||!I[0]){var vt="";for(ut in pt=[],Q[M])this.terminals_[ut]&&ut>ht&&pt.push("'"+this.terminals_[ut]+"'");vt=k.showPosition?"Parse error on line "+(z+1)+`:
`+k.showPosition()+`
Expecting `+pt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":"Parse error on line "+(z+1)+": Unexpected "+(L==dt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(vt,{text:k.match,token:this.terminals_[L]||L,line:k.yylineno,loc:_t,expected:pt})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+M+", token: "+L);switch(I[0]){case 1:g.push(L),b.push(k.yytext),r.push(k.yylloc),g.push(I[1]),L=null,bt?(L=bt,bt=null):(X=k.yyleng,l=k.yytext,z=k.yylineno,_t=k.yylloc,Z>0&&Z--);break;case 2:if(B=this.productions_[I[1]][1],V.$=b[b.length-B],V._$={first_line:r[r.length-(B||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(B||1)].first_column,last_column:r[r.length-1].last_column},Qt&&(V._$.range=[r[r.length-(B||1)].range[0],r[r.length-1].range[1]]),Tt=this.performAction.apply(V,[l,X,z,W.yy,I[1],b,r].concat(qt)),Tt!==void 0)return Tt;B&&(g=g.slice(0,-1*B*2),b=b.slice(0,-1*B),r=r.slice(0,-1*B)),g.push(this.productions_[I[1]][0]),b.push(V.$),r.push(V._$),At=Q[g[g.length-2]][g[g.length-1]],g.push(At);break;case 3:return!0}}return!0},"parse")};mt.lexer=(function(){return{EOF:1,parseError:u(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw Error(a)},"parseError"),setInput:u(function(a,h){return this.yy=h||this.yy||{},this._input=a,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 a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:u(function(a){var h=a.length,g=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var S=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 b=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===S.length?this.yylloc.first_column:0)+S[S.length-g.length].length-g[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-h]),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(a){this.unput(this.match.slice(a))},"less"),pastInput:u(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var a=this.pastInput(),h=Array(a.length+1).join("-");return a+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:u(function(a,h){var g,S,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),S=a[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],g=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in b)this[r]=b[r];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,h,g,S;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),r=0;r<b.length;r++)if(g=this._input.match(this.rules[b[r]]),g&&(!h||g[0].length>h[0].length)){if(h=g,S=r,this.options.backtrack_lexer){if(a=this.test_match(g,b[r]),a!==!1)return a;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(a=this.test_match(h,b[S]),a===!1?!1:a):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(){return this.next()||this.lex()},"lex"),begin:u(function(a){this.conditionStack.push(a)},"begin"),popState:u(function(){return this.conditionStack.length-1>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,h,g,S){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(),h.yytext=h.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),h.yytext=h.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),h.yytext=h.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),h.yytext=h.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),h.yytext=h.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),h.yytext=h.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(),h.yytext=h.yytext.substr(2).trim(),31;case 70:return this.popState(),h.yytext=h.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 h.yytext=h.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,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/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}}}})();function ct(){this.yy={}}return u(ct,"Parser"),ct.prototype=mt,mt.Parser=ct,new ct})();kt.parser=kt;var ue=kt,pe="TB",It="TB",Nt="dir",J="state",q="root",Et="relation",ye="classDef",ge="style",fe="applyClass",tt="default",Ot="divider",Rt="fill:none",wt="fill: #333",Bt="c",Yt="text",Ft="normal",Dt="rect",Ct="rectWithTitle",me="stateStart",Se="stateEnd",Pt="divider",Gt="roundedWithTitle",_e="note",be="noteGroup",et="statediagram",Te=`${et}-state`,jt="transition",ke="note",Ee=`${jt} note-edge`,De=`${et}-${ke}`,Ce=`${et}-cluster`,xe=`${et}-cluster-alt`,zt="parent",Wt="note",$e="state",xt="----",Le=`${xt}${Wt}`,Mt=`${xt}${zt}`,Ut=u((e,t=It)=>{if(!e.doc)return t;let s=t;for(let n of e.doc)n.stmt==="dir"&&(s=n.value);return s},"getDir"),Ae={getClasses:u(function(e,t){return t.db.getClasses()},"getClasses"),draw:u(async function(e,t,s,n){T.info("REF0:"),T.info("Drawing state diagram (v2)",t);let{securityLevel:i,state:o,layout:c}=w();n.db.extract(n.db.getRootDocV2());let y=n.db.getData(),p=he(t,i);y.type=n.type,y.layoutAlgorithm=c,y.nodeSpacing=(o==null?void 0:o.nodeSpacing)||50,y.rankSpacing=(o==null?void 0:o.rankSpacing)||50,y.markers=["barb"],y.diagramId=t,await ce(y,p);try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map).forEach((_,m)=>{var d;let D=typeof m=="string"?m:typeof(m==null?void 0:m.id)=="string"?m.id:"";if(!D){T.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(m));return}let A=(d=p.node())==null?void 0:d.querySelectorAll("g"),x;if(A==null||A.forEach(E=>{var v;((v=E.textContent)==null?void 0:v.trim())===D&&(x=E)}),!x){T.warn("\u26A0\uFE0F Could not find node matching text:",D);return}let R=x.parentNode;if(!R){T.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",D);return}let $=document.createElementNS("http://www.w3.org/2000/svg","a"),O=_.url.replace(/^"+|"+$/g,"");if($.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",O),$.setAttribute("target","_blank"),_.tooltip){let E=_.tooltip.replace(/^"+|"+$/g,"");$.setAttribute("title",E)}R.replaceChild($,x),$.appendChild(x),T.info("\u{1F517} Wrapped node in <a> tag for:",D,_.url)})}catch(_){T.error("\u274C Error injecting clickable links:",_)}te.insertTitle(p,"statediagramTitleText",(o==null?void 0:o.titleTopMargin)??25,n.db.getDiagramTitle()),de(p,8,et,(o==null?void 0:o.useMaxWidth)??!0)},"draw"),getDir:Ut},yt=new Map,P=0;function gt(e="",t=0,s="",n=xt){return`${$e}-${e}${s!==null&&s.length>0?`${n}${s}`:""}-${t}`}u(gt,"stateDomId");var ve=u((e,t,s,n,i,o,c,y)=>{T.trace("items",t),t.forEach(p=>{switch(p.stmt){case J:it(e,p,s,n,i,o,c,y);break;case tt:it(e,p,s,n,i,o,c,y);break;case Et:{it(e,p.state1,s,n,i,o,c,y),it(e,p.state2,s,n,i,o,c,y);let _={id:"edge"+P,start:p.state1.id,end:p.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Rt,labelStyle:"",label:U.sanitizeText(p.description??"",w()),arrowheadStyle:wt,labelpos:Bt,labelType:Yt,thickness:Ft,classes:jt,look:c};i.push(_),P++}break}})},"setupDoc"),Kt=u((e,t=It)=>{let s=t;if(e.doc)for(let n of e.doc)n.stmt==="dir"&&(s=n.value);return s},"getDir");function st(e,t,s){if(!t.id||t.id==="</join></fork>"||t.id==="</choice>")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(i=>{let o=s.get(i);o&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...o.styles])}));let n=e.find(i=>i.id===t.id);n?Object.assign(n,t):e.push(t)}u(st,"insertOrUpdateNode");function Ht(e){var t;return((t=e==null?void 0:e.classes)==null?void 0:t.join(" "))??""}u(Ht,"getClassesFromDbInfo");function Xt(e){return(e==null?void 0:e.styles)??[]}u(Xt,"getStylesFromDbInfo");var it=u((e,t,s,n,i,o,c,y)=>{var x,R,$;let p=t.id,_=s.get(p),m=Ht(_),D=Xt(_),A=w();if(T.info("dataFetcher parsedItem",t,_,D),p!=="root"){let O=Dt;t.start===!0?O=me:t.start===!1&&(O=Se),t.type!==tt&&(O=t.type),yt.get(p)||yt.set(p,{id:p,shape:O,description:U.sanitizeText(p,A),cssClasses:`${m} ${Te}`,cssStyles:D});let d=yt.get(p);t.description&&(Array.isArray(d.description)?(d.shape=Ct,d.description.push(t.description)):(x=d.description)!=null&&x.length&&d.description.length>0?(d.shape=Ct,d.description===p?d.description=[t.description]:d.description=[d.description,t.description]):(d.shape=Dt,d.description=t.description),d.description=U.sanitizeTextOrArray(d.description,A)),((R=d.description)==null?void 0:R.length)===1&&d.shape===Ct&&(d.type==="group"?d.shape=Gt:d.shape=Dt),!d.type&&t.doc&&(T.info("Setting cluster for XCX",p,Kt(t)),d.type="group",d.isGroup=!0,d.dir=Kt(t),d.shape=t.type===Ot?Pt:Gt,d.cssClasses=`${d.cssClasses} ${Ce} ${o?xe:""}`);let E={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:p,dir:d.dir,domId:gt(p,P),type:d.type,isGroup:d.type==="group",padding:8,rx:10,ry:10,look:c};if(E.shape===Pt&&(E.label=""),e&&e.id!=="root"&&(T.trace("Setting node ",p," to be child of its parent ",e.id),E.parentId=e.id),E.centerLabel=!0,t.note){let v={labelStyle:"",shape:_e,label:t.note.text,cssClasses:De,cssStyles:[],cssCompiledStyles:[],id:p+Le+"-"+P,domId:gt(p,P,Wt),type:d.type,isGroup:d.type==="group",padding:($=A.flowchart)==null?void 0:$.padding,look:c,position:t.note.position},G=p+Mt,j={labelStyle:"",shape:be,label:t.note.text,cssClasses:d.cssClasses,cssStyles:[],id:p+Mt,domId:gt(p,P,zt),type:"group",isGroup:!0,padding:16,look:c,position:t.note.position};P++,j.id=G,v.parentId=G,st(n,j,y),st(n,v,y),st(n,E,y);let Y=p,F=v.id;t.note.position==="left of"&&(Y=v.id,F=p),i.push({id:Y+"-"+F,start:Y,end:F,arrowhead:"none",arrowTypeEnd:"",style:Rt,labelStyle:"",classes:Ee,arrowheadStyle:wt,labelpos:Bt,labelType:Yt,thickness:Ft,look:c})}else st(n,E,y)}t.doc&&(T.trace("Adding nodes children "),ve(t,t.doc,s,n,i,!o,c,y))},"dataFetcher"),Ie=u(()=>{yt.clear(),P=0},"reset"),C={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Vt=u(()=>new Map,"newClassesList"),Jt=u(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),ft=u(e=>JSON.parse(JSON.stringify(e)),"clone"),Ne=(K=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Vt(),this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=oe,this.setAccTitle=se,this.getAccDescription=ne,this.setAccDescription=le,this.setDiagramTitle=re,this.getDiagramTitle=ie,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(let i of Array.isArray(t)?t:t.doc)switch(i.stmt){case J:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case Et:this.addRelation(i.state1,i.state2,i.description);break;case ye:this.addStyleClass(i.id.trim(),i.classes);break;case ge:this.handleStyleDef(i);break;case fe:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}let s=this.getStates(),n=w();Ie(),it(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,n.look,this.classes);for(let i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){let s=t.id.trim().split(","),n=t.styleClass.split(",");for(let i of s){let o=this.getState(i);if(!o){let c=i.trim();this.addState(c),o=this.getState(c)}o&&(o.styles=n.map(c=>{var y;return(y=c.replace(/;/g,""))==null?void 0:y.trim()}))}}setRootDoc(t){T.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,s,n){if(s.stmt===Et){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===J&&(s.id===C.START_NODE?(s.id=t.id+(n?"_start":"_end"),s.start=n):s.id=s.id.trim()),s.stmt!==q&&s.stmt!==J||!s.doc)return;let i=[],o=[];for(let c of s.doc)if(c.type===Ot){let y=ft(c);y.doc=ft(o),i.push(y),o=[]}else o.push(c);if(i.length>0&&o.length>0){let c={stmt:J,id:ee(),type:"divider",doc:ft(o)};i.push(ft(c)),s.doc=i}s.doc.forEach(c=>this.docTranslator(s,c,!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=tt,n=void 0,i=void 0,o=void 0,c=void 0,y=void 0,p=void 0){let _=t==null?void 0:t.trim();if(!this.currentDocument.states.has(_))T.info("Adding state ",_,i),this.currentDocument.states.set(_,{stmt:J,id:_,descriptions:[],type:s,doc:n,note:o,classes:[],styles:[],textStyles:[]});else{let m=this.currentDocument.states.get(_);if(!m)throw Error(`State not found: ${_}`);m.doc||(m.doc=n),m.type||(m.type=s)}if(i&&(T.info("Setting state description",_,i),(Array.isArray(i)?i:[i]).forEach(m=>this.addDescription(_,m.trim()))),o){let m=this.currentDocument.states.get(_);if(!m)throw Error(`State not found: ${_}`);m.note=o,m.note.text=U.sanitizeText(m.note.text,w())}c&&(T.info("Setting state classes",_,c),(Array.isArray(c)?c:[c]).forEach(m=>this.setCssClass(_,m.trim()))),y&&(T.info("Setting state styles",_,y),(Array.isArray(y)?y:[y]).forEach(m=>this.setStyle(_,m.trim()))),p&&(T.info("Setting state styles",_,y),(Array.isArray(p)?p:[p]).forEach(m=>this.setTextStyle(_,m.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Vt(),t||(this.links=new Map,ae())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){T.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,s,n){this.links.set(t,{url:s,tooltip:n}),T.warn("Adding link",t,s,n)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===C.START_NODE?(this.startEndCount++,`${C.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",s=tt){return t===C.START_NODE?C.START_TYPE:s}endIdIfNeeded(t=""){return t===C.END_NODE?(this.startEndCount++,`${C.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",s=tt){return t===C.END_NODE?C.END_TYPE:s}addRelationObjs(t,s,n=""){let i=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type),c=this.startIdIfNeeded(s.id.trim()),y=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(c,y,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:i,id2:c,relationTitle:U.sanitizeText(n,w())})}addRelation(t,s,n){if(typeof t=="object"&&typeof s=="object")this.addRelationObjs(t,s,n);else if(typeof t=="string"&&typeof s=="string"){let i=this.startIdIfNeeded(t.trim()),o=this.startTypeIfNeeded(t),c=this.endIdIfNeeded(s.trim()),y=this.endTypeIfNeeded(s);this.addState(i,o),this.addState(c,y),this.currentDocument.relations.push({id1:i,id2:c,relationTitle:n?U.sanitizeText(n,w()):void 0})}}addDescription(t,s){var o;let n=this.currentDocument.states.get(t),i=s.startsWith(":")?s.replace(":","").trim():s;(o=n==null?void 0:n.descriptions)==null||o.push(U.sanitizeText(i,w()))}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:[]});let n=this.classes.get(t);s&&n&&s.split(C.STYLECLASS_SEP).forEach(i=>{let o=i.replace(/([^;]*);/,"$1").trim();if(RegExp(C.COLOR_KEYWORD).exec(i)){let c=o.replace(C.FILL_KEYWORD,C.BG_FILL).replace(C.COLOR_KEYWORD,C.FILL_KEYWORD);n.textStyles.push(c)}n.styles.push(o)})}getClasses(){return this.classes}setCssClass(t,s){t.split(",").forEach(n=>{var o;let i=this.getState(n);if(!i){let c=n.trim();this.addState(c),i=this.getState(c)}(o=i==null?void 0:i.classes)==null||o.push(s)})}setStyle(t,s){var n,i;(i=(n=this.getState(t))==null?void 0:n.styles)==null||i.push(s)}setTextStyle(t,s){var n,i;(i=(n=this.getState(t))==null?void 0:n.textStyles)==null||i.push(s)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Nt)}getDirection(){var t;return((t=this.getDirectionStatement())==null?void 0:t.value)??pe}setDirection(t){let s=this.getDirectionStatement();s?s.value=t:this.rootDoc.unshift({stmt:Nt,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=w();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Ut(this.getRootDocV2())}}getConfig(){return w().state}},u(K,"StateDB"),K.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},K),Oe=u(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");export{Oe as i,ue as n,Ae as r,Ne as t};
import{u as e}from"./src-Cf4NnJCp.js";import{n as m}from"./src-BKLwm2RN.js";import{b as s}from"./chunk-ABZYJK2D-t8l6Viza.js";var a=m(t=>{var r;let{securityLevel:n}=s(),o=e("body");return n==="sandbox"&&(o=e((((r=e(`#i${t}`).node())==null?void 0:r.contentDocument)??document).body)),o.select(`#${t}`)},"selectSvgElement");export{a as t};
import{n as e}from"./src-BKLwm2RN.js";var o=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{o as t};
var i,s,o;import{d as u,f as t,g as f,h as T,m as d,n as v,p as g,s as h,t as R}from"./chunk-FPAJGGOC-DOBSZjU2.js";var V=(i=class extends R{constructor(){super(["treemap"])}},t(i,"TreemapTokenBuilder"),i),C=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,S=(s=class extends v{runCustomConverter(r,e,n){if(r.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(r.name==="SEPARATOR"||r.name==="STRING2")return e.substring(1,e.length-1);if(r.name==="INDENTATION")return e.length;if(r.name==="ClassDef"){if(typeof e!="string")return e;let a=C.exec(e);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}},t(s,"TreemapValueConverter"),s);function m(l){let r=l.validation.TreemapValidator,e=l.validation.ValidationRegistry;if(e){let n={Treemap:r.checkSingleRoot.bind(r)};e.register(n,r)}}t(m,"registerValidationChecks");var k=(o=class{checkSingleRoot(r,e){let n;for(let a of r.TreemapRows)a.item&&(n===void 0&&a.indent===void 0?n=0:(a.indent===void 0||n!==void 0&&n>=parseInt(a.indent,10))&&e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},t(o,"TreemapValidator"),o),p={parser:{TokenBuilder:t(()=>new V,"TokenBuilder"),ValueConverter:t(()=>new S,"ValueConverter")},validation:{TreemapValidator:t(()=>new k,"TreemapValidator")}};function c(l=g){let r=d(f(l),h),e=d(T({shared:r}),u,p);return r.ServiceRegistry.register(e),m(e),{shared:r,Treemap:e}}t(c,"createTreemapServices");export{c as n,p as t};
import{n as f}from"./src-BKLwm2RN.js";var i={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},b={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function x(e,l){if(e===void 0||l===void 0)return{angle:0,deltaX:0,deltaY:0};e=a(e),l=a(l);let[s,t]=[e.x,e.y],[n,y]=[l.x,l.y],h=n-s,c=y-t;return{angle:Math.atan(c/h),deltaX:h,deltaY:c}}f(x,"calculateDeltaAndAngle");var a=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),u=f(e=>({x:f(function(l,s,t){let n=0,y=a(t[0]).x<a(t[t.length-1]).x?"left":"right";if(s===0&&Object.hasOwn(i,e.arrowTypeStart)){let{angle:r,deltaX:w}=x(t[0],t[1]);n=i[e.arrowTypeStart]*Math.cos(r)*(w>=0?1:-1)}else if(s===t.length-1&&Object.hasOwn(i,e.arrowTypeEnd)){let{angle:r,deltaX:w}=x(t[t.length-1],t[t.length-2]);n=i[e.arrowTypeEnd]*Math.cos(r)*(w>=0?1:-1)}let h=Math.abs(a(l).x-a(t[t.length-1]).x),c=Math.abs(a(l).y-a(t[t.length-1]).y),g=Math.abs(a(l).x-a(t[0]).x),M=Math.abs(a(l).y-a(t[0]).y),p=i[e.arrowTypeStart],d=i[e.arrowTypeEnd];if(h<d&&h>0&&c<d){let r=d+1-h;r*=y==="right"?-1:1,n-=r}if(g<p&&g>0&&M<p){let r=p+1-g;r*=y==="right"?-1:1,n+=r}return a(l).x+n},"x"),y:f(function(l,s,t){let n=0,y=a(t[0]).y<a(t[t.length-1]).y?"down":"up";if(s===0&&Object.hasOwn(i,e.arrowTypeStart)){let{angle:r,deltaY:w}=x(t[0],t[1]);n=i[e.arrowTypeStart]*Math.abs(Math.sin(r))*(w>=0?1:-1)}else if(s===t.length-1&&Object.hasOwn(i,e.arrowTypeEnd)){let{angle:r,deltaY:w}=x(t[t.length-1],t[t.length-2]);n=i[e.arrowTypeEnd]*Math.abs(Math.sin(r))*(w>=0?1:-1)}let h=Math.abs(a(l).y-a(t[t.length-1]).y),c=Math.abs(a(l).x-a(t[t.length-1]).x),g=Math.abs(a(l).y-a(t[0]).y),M=Math.abs(a(l).x-a(t[0]).x),p=i[e.arrowTypeStart],d=i[e.arrowTypeEnd];if(h<d&&h>0&&c<d){let r=d+1-h;r*=y==="up"?-1:1,n-=r}if(g<p&&g>0&&M<p){let r=p+1-g;r*=y==="up"?-1:1,n+=r}return a(l).y+n},"y")}),"getLineFunctionsWithOffset");export{i as n,b as r,u as t};
var Ke=Object.defineProperty;var et=(t,e,n)=>e in t?Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var k=(t,e,n)=>et(t,typeof e!="symbol"?e+"":e,n);var ue;import{u as U}from"./src-Cf4NnJCp.js";import{a as tt}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as x,r as I}from"./src-BKLwm2RN.js";import{I as V,N as nt,O as de,s as rt,y as ke}from"./chunk-ABZYJK2D-t8l6Viza.js";var it=Object.freeze({left:0,top:0,width:16,height:16}),q=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xe=Object.freeze({...it,...q}),st=Object.freeze({...xe,body:"",hidden:!1}),lt=Object.freeze({width:null,height:null}),at=Object.freeze({...lt,...q}),ot=(t,e,n,i="")=>{let r=t.split(":");if(t.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;i=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){let s=r.pop(),c=r.pop(),o={provider:r.length>0?r[0]:i,prefix:c,name:s};return e&&!Y(o)?null:o}let l=r[0],a=l.split("-");if(a.length>1){let s={provider:i,prefix:a.shift(),name:a.join("-")};return e&&!Y(s)?null:s}if(n&&i===""){let s={provider:i,prefix:"",name:l};return e&&!Y(s,n)?null:s}return null},Y=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function ct(t,e){let n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);let i=((t.rotate||0)+(e.rotate||0))%4;return i&&(n.rotate=i),n}function be(t,e){let n=ct(t,e);for(let i in st)i in q?i in t&&!(i in n)&&(n[i]=q[i]):i in e?n[i]=e[i]:i in t&&(n[i]=t[i]);return n}function ht(t,e){let n=t.icons,i=t.aliases||Object.create(null),r=Object.create(null);function l(a){if(n[a])return r[a]=[];if(!(a in r)){r[a]=null;let s=i[a]&&i[a].parent,c=s&&l(s);c&&(r[a]=[s].concat(c))}return r[a]}return(e||Object.keys(n).concat(Object.keys(i))).forEach(l),r}function me(t,e,n){let i=t.icons,r=t.aliases||Object.create(null),l={};function a(s){l=be(i[s]||r[s],l)}return a(e),n.forEach(a),be(t,l)}function pt(t,e){if(t.icons[e])return me(t,e,[]);let n=ht(t,[e])[e];return n?me(t,e,n):null}var ut=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function we(t,e,n){if(e===1)return t;if(n||(n=100),typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;let i=t.split(ut);if(i===null||!i.length)return t;let r=[],l=i.shift(),a=gt.test(l);for(;;){if(a){let s=parseFloat(l);isNaN(s)?r.push(l):r.push(Math.ceil(s*e*n)/n)}else r.push(l);if(l=i.shift(),l===void 0)return r.join("");a=!a}}function ft(t,e="defs"){let n="",i=t.indexOf("<"+e);for(;i>=0;){let r=t.indexOf(">",i),l=t.indexOf("</"+e);if(r===-1||l===-1)break;let a=t.indexOf(">",l);if(a===-1)break;n+=t.slice(r+1,l).trim(),t=t.slice(0,i).trim()+t.slice(a+1)}return{defs:n,content:t}}function dt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function kt(t,e,n){let i=ft(t);return dt(i.defs,e+i.content+n)}var xt=t=>t==="unset"||t==="undefined"||t==="none";function bt(t,e){let n={...xe,...t},i={...at,...e},r={left:n.left,top:n.top,width:n.width,height:n.height},l=n.body;[n,i].forEach(m=>{let w=[],E=m.hFlip,_=m.vFlip,S=m.rotate;E?_?S+=2:(w.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),w.push("scale(-1 1)"),r.top=r.left=0):_&&(w.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),w.push("scale(1 -1)"),r.top=r.left=0);let $;switch(S<0&&(S-=Math.floor(S/4)*4),S%=4,S){case 1:$=r.height/2+r.top,w.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:w.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:$=r.width/2+r.left,w.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}S%2==1&&(r.left!==r.top&&($=r.left,r.left=r.top,r.top=$),r.width!==r.height&&($=r.width,r.width=r.height,r.height=$)),w.length&&(l=kt(l,'<g transform="'+w.join(" ")+'">',"</g>"))});let a=i.width,s=i.height,c=r.width,o=r.height,h,u;a===null?(u=s===null?"1em":s==="auto"?o:s,h=we(u,c/o)):(h=a==="auto"?c:a,u=s===null?we(h,o/c):s==="auto"?o:s);let p={},b=(m,w)=>{xt(w)||(p[m]=w.toString())};b("width",h),b("height",u);let d=[r.left,r.top,c,o];return p.viewBox=d.join(" "),{attributes:p,viewBox:d,body:l}}var mt=/\sid="(\S+)"/g,wt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),yt=0;function $t(t,e=wt){let n=[],i;for(;i=mt.exec(t);)n.push(i[1]);if(!n.length)return t;let r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(l=>{let a=typeof e=="function"?e(l):e+(yt++).toString(),s=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+r+"$3")}),t=t.replace(new RegExp(r,"g"),""),t}function St(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let i in e)n+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function J(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A=J();function ye(t){A=t}var B={exec:()=>null};function g(t,e=""){let n=typeof t=="string"?t:t.source,i={replace:(r,l)=>{let a=typeof l=="string"?l:l.source;return a=a.replace(y.caret,"$1"),n=n.replace(r,a),i},getRegex:()=>new RegExp(n,e)};return i}var y={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Rt=/^(?:[ \t]*(?:\n|$))+/,Tt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,At=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,K=/(?:[*+-]|\d{1,9}[.)])/,$e=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Se=g($e).replace(/bull/g,K).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),vt=g($e).replace(/bull/g,K).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ee=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,It=/^[^\n]+/,te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Et=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_t=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,K).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ne=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pt=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ne).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Re=g(ee).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),re={blockquote:g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Re).getRegex(),code:Tt,def:Et,fences:zt,heading:At,hr:L,html:Pt,lheading:Se,list:_t,newline:Rt,paragraph:Re,table:B,text:It},Te=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Bt={...re,lheading:vt,table:Te,paragraph:g(ee).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Te).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()},Lt={...re,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ne).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:B,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(ee).replace("hr",L).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Se).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ct=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ze=/^( {2,}|\\)\n(?!\s*$)/,qt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,M=/[\p{P}\p{S}]/u,ie=/[\s\p{P}\p{S}]/u,Ae=/[^\s\p{P}\p{S}]/u,Ot=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ie).getRegex(),ve=/(?!~)[\p{P}\p{S}]/u,Mt=/(?!~)[\s\p{P}\p{S}]/u,Zt=/(?:[^\s\p{P}\p{S}]|~)/u,Ft=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Ie=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Dt=g(Ie,"u").replace(/punct/g,M).getRegex(),Nt=g(Ie,"u").replace(/punct/g,ve).getRegex(),Ee="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Wt=g(Ee,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ie).replace(/punct/g,M).getRegex(),Qt=g(Ee,"gu").replace(/notPunctSpace/g,Zt).replace(/punctSpace/g,Mt).replace(/punct/g,ve).getRegex(),Ht=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,ie).replace(/punct/g,M).getRegex(),Gt=g(/\\(punct)/,"gu").replace(/punct/g,M).getRegex(),Xt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ut=g(ne).replace("(?:-->|$)","-->").getRegex(),Vt=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ut).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Yt=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_e=g(/^!?\[(label)\]\[(ref)\]/).replace("label",Z).replace("ref",te).getRegex(),Pe=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",te).getRegex(),se={_backpedal:B,anyPunctuation:Gt,autolink:Xt,blockSkip:Ft,br:ze,code:jt,del:B,emStrongLDelim:Dt,emStrongRDelimAst:Wt,emStrongRDelimUnd:Ht,escape:Ct,link:Yt,nolink:Pe,punctuation:Ot,reflink:_e,reflinkSearch:g("reflink|nolink(?!\\()","g").replace("reflink",_e).replace("nolink",Pe).getRegex(),tag:Vt,text:qt,url:B},Jt={...se,link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",Z).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z).getRegex()},le={...se,emStrongRDelimAst:Qt,emStrongLDelim:Nt,url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Kt={...le,br:g(ze).replace("{2,}","*").getRegex(),text:g(le.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},F={normal:re,gfm:Bt,pedantic:Lt},C={normal:se,gfm:le,breaks:Kt,pedantic:Jt},en={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Be=t=>en[t];function R(t,e){if(e){if(y.escapeTest.test(t))return t.replace(y.escapeReplace,Be)}else if(y.escapeTestNoEncode.test(t))return t.replace(y.escapeReplaceNoEncode,Be);return t}function Le(t){try{t=encodeURI(t).replace(y.percentDecode,"%")}catch{return null}return t}function Ce(t,e){var r;let n=t.replace(y.findPipe,(l,a,s)=>{let c=!1,o=a;for(;--o>=0&&s[o]==="\\";)c=!c;return c?"|":" |"}).split(y.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((r=n.at(-1))!=null&&r.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(y.slashPipe,"|");return n}function j(t,e,n){let i=t.length;if(i===0)return"";let r=0;for(;r<i;){let l=t.charAt(i-r-1);if(l===e&&!n)r++;else if(l!==e&&n)r++;else break}return t.slice(0,i-r)}function tn(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])n++;else if(t[i]===e[1]&&(n--,n<0))return i;return n>0?-2:-1}function je(t,e,n,i,r){let l=e.href,a=e.title||null,s=t[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function nn(t,e,n){let i=t.match(n.other.indentCodeCompensation);if(i===null)return e;let r=i[1];return e.split(`
`).map(l=>{let a=l.match(n.other.beginningSpace);if(a===null)return l;let[s]=a;return s.length>=r.length?l.slice(r.length):l}).join(`
`)}var D=class{constructor(t){k(this,"options");k(this,"rules");k(this,"lexer");this.options=t||A}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:j(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],i=nn(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let i=j(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:j(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=j(e[0],`
`).split(`
`),i="",r="",l=[];for(;n.length>0;){let a=!1,s=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))s.push(n[c]),a=!0;else if(!a)s.push(n[c]);else break;n=n.slice(c);let o=s.join(`
`),h=o.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
${o}`:o,r=r?`${r}
${h}`:h;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=u,n.length===0)break;let p=l.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let b=p,d=b.raw+`
`+n.join(`
`),m=this.blockquote(d);l[l.length-1]=m,i=i.substring(0,i.length-b.raw.length)+m.raw,r=r.substring(0,r.length-b.text.length)+m.text;break}else if((p==null?void 0:p.type)==="list"){let b=p,d=b.raw+`
`+n.join(`
`),m=this.list(d);l[l.length-1]=m,i=i.substring(0,i.length-p.raw.length)+m.raw,r=r.substring(0,r.length-b.raw.length)+m.raw,n=d.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:i,tokens:l,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let l=this.rules.other.listItemRegex(n),a=!1;for(;t;){let c=!1,o="",h="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;o=e[0],t=t.substring(o.length);let u=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,E=>" ".repeat(3*E.length)),p=t.split(`
`,1)[0],b=!u.trim(),d=0;if(this.options.pedantic?(d=2,h=u.trimStart()):b?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,h=u.slice(d),d+=e[1].length),b&&this.rules.other.blankLine.test(p)&&(o+=p+`
`,t=t.substring(p.length+1),c=!0),!c){let E=this.rules.other.nextBulletRegex(d),_=this.rules.other.hrRegex(d),S=this.rules.other.fencesBeginRegex(d),$=this.rules.other.headingBeginRegex(d),Je=this.rules.other.htmlBeginRegex(d);for(;t;){let X=t.split(`
`,1)[0],P;if(p=X,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),P=p):P=p.replace(this.rules.other.tabCharGlobal," "),S.test(p)||$.test(p)||Je.test(p)||E.test(p)||_.test(p))break;if(P.search(this.rules.other.nonSpaceChar)>=d||!p.trim())h+=`
`+P.slice(d);else{if(b||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(u)||$.test(u)||_.test(u))break;h+=`
`+p}!b&&!p.trim()&&(b=!0),o+=X+`
`,t=t.substring(X.length+1),u=P.slice(d)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(a=!0));let m=null,w;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(w=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:o,task:!!m,checked:w,loose:!1,text:h,tokens:[]}),r.raw+=o}let s=r.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){let o=r.items[c].tokens.filter(h=>h.type==="space");r.loose=o.length>0&&o.some(h=>this.rules.other.anyLine.test(h.raw))}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){var a;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Ce(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let s of i)this.rules.other.tableAlignRight.test(s)?l.align.push("right"):this.rules.other.tableAlignCenter.test(s)?l.align.push("center"):this.rules.other.tableAlignLeft.test(s)?l.align.push("left"):l.align.push(null);for(let s=0;s<n.length;s++)l.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:l.align[s]});for(let s of r)l.rows.push(Ce(s,l.header.length).map((c,o)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:l.align[o]})));return l}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=j(n.slice(0,-1),"\\");if((n.length-l.length)%2==0)return}else{let l=tn(e[2],"()");if(l===-2)return;if(l>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(i);l&&(i=l[1],r=l[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i.slice(1):i.slice(1,-1)),je(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!i){let r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return je(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let r=[...i[0]].length-1,l,a,s=r,c=0,o=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*t.length+r);(i=o.exec(e))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(a=[...l].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&r%3&&!((r+a)%3)){c+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+c);let h=[...i[0]][0].length,u=t.slice(0,r+i.index+h+a);if(Math.min(r,a)%2){let b=u.slice(1,-1);return{type:"em",raw:u,text:b,tokens:this.lexer.inlineTokens(b)}}let p=u.slice(2,-2);return{type:"strong",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=e[1],i="mailto:"+n):(n=e[1],i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let i,r;if(e[2]==="@")i=e[0],r="mailto:"+i;else{let l;do l=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(l!==e[0]);i=e[0],r=e[1]==="www."?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},T=class ge{constructor(e){k(this,"tokens");k(this,"options");k(this,"state");k(this,"tokenizer");k(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||A,this.options.tokenizer=this.options.tokenizer||new D,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:y,block:F.normal,inline:C.normal};this.options.pedantic?(n.block=F.pedantic,n.inline=C.pedantic):this.options.gfm&&(n.block=F.gfm,this.options.breaks?n.inline=C.breaks:n.inline=C.gfm),this.tokenizer.rules=n}static get rules(){return{block:F,inline:C}}static lex(e,n){return new ge(n).lex(e)}static lexInline(e,n){return new ge(n).inlineTokens(e)}lex(e){e=e.replace(y.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],i=!1){var r,l,a;for(this.options.pedantic&&(e=e.replace(y.tabCharGlobal," ").replace(y.spaceLine,""));e;){let s;if((l=(r=this.options.extensions)==null?void 0:r.block)!=null&&l.some(o=>(s=o.call({lexer:this},e,n))?(e=e.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let o=n.at(-1);s.raw.length===1&&o!==void 0?o.raw+=`
`:n.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let o=n.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+s.raw,o.text+=`
`+s.text,this.inlineQueue.at(-1).src=o.text):n.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let o=n.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+s.raw,o.text+=`
`+s.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),n.push(s);continue}let c=e;if((a=this.options.extensions)!=null&&a.startBlock){let o=1/0,h=e.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},h),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(c=e.substring(0,o+1))}if(this.state.top&&(s=this.tokenizer.paragraph(c))){let o=n.at(-1);i&&(o==null?void 0:o.type)==="paragraph"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+s.raw,o.text+=`
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(s),i=c.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let o=n.at(-1);(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+s.raw,o.text+=`
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(s);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw Error(o)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var s,c,o;let i=e,r=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,a="";for(;e;){l||(a=""),l=!1;let h;if((c=(s=this.options.extensions)==null?void 0:s.inline)!=null&&c.some(p=>(h=p.call({lexer:this},e,n))?(e=e.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let p=n.at(-1);h.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(e,i,a)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),n.push(h);continue}let u=e;if((o=this.options.extensions)!=null&&o.startInline){let p=1/0,b=e.slice(1),d;this.options.extensions.startInline.forEach(m=>{d=m.call({lexer:this},b),typeof d=="number"&&d>=0&&(p=Math.min(p,d))}),p<1/0&&p>=0&&(u=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(u)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(a=h.raw.slice(-1)),l=!0;let p=n.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):n.push(h);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw Error(p)}}return n}},N=class{constructor(t){k(this,"options");k(this,"parser");this.options=t||A}space(t){return""}code({text:t,lang:e,escaped:n}){var l;let i=(l=(e||"").match(y.notSpaceStart))==null?void 0:l[0],r=t.replace(y.endingNewline,"")+`
`;return i?'<pre><code class="language-'+R(i)+'">'+(n?r:R(r,!0))+`</code></pre>
`:"<pre><code>"+(n?r:R(r,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,n=t.start,i="";for(let a=0;a<t.items.length;a++){let s=t.items[a];i+=this.listitem(s)}let r=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+r+l+`>
`+i+"</"+r+`>
`}listitem(t){var n;let e="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?((n=t.tokens[0])==null?void 0:n.type)==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+R(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let i="";for(let r=0;r<t.rows.length;r++){let l=t.rows[r];n="";for(let a=0;a<l.length;a++)n+=this.tablecell(l[a]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+i+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${R(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let i=this.parser.parseInline(n),r=Le(t);if(r===null)return i;t=r;let l='<a href="'+t+'"';return e&&(l+=' title="'+R(e)+'"'),l+=">"+i+"</a>",l}image({href:t,title:e,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let r=Le(t);if(r===null)return R(n);t=r;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${R(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:R(t.text)}},ae=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},z=class fe{constructor(e){k(this,"options");k(this,"renderer");k(this,"textRenderer");this.options=e||A,this.options.renderer=this.options.renderer||new N,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ae}static parse(e,n){return new fe(n).parse(e)}static parseInline(e,n){return new fe(n).parseInline(e)}parse(e,n=!0){var r,l;let i="";for(let a=0;a<e.length;a++){let s=e[a];if((l=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&l[s.type]){let o=s,h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=h||"";continue}}let c=s;switch(c.type){case"space":i+=this.renderer.space(c);continue;case"hr":i+=this.renderer.hr(c);continue;case"heading":i+=this.renderer.heading(c);continue;case"code":i+=this.renderer.code(c);continue;case"table":i+=this.renderer.table(c);continue;case"blockquote":i+=this.renderer.blockquote(c);continue;case"list":i+=this.renderer.list(c);continue;case"html":i+=this.renderer.html(c);continue;case"def":i+=this.renderer.def(c);continue;case"paragraph":i+=this.renderer.paragraph(c);continue;case"text":{let o=c,h=this.renderer.text(o);for(;a+1<e.length&&e[a+1].type==="text";)o=e[++a],h+=`
`+this.renderer.text(o);n?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let o='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw Error(o)}}}return i}parseInline(e,n=this.renderer){var r,l;let i="";for(let a=0;a<e.length;a++){let s=e[a];if((l=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&l[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=o||"";continue}}let c=s;switch(c.type){case"escape":i+=n.text(c);break;case"html":i+=n.html(c);break;case"link":i+=n.link(c);break;case"image":i+=n.image(c);break;case"strong":i+=n.strong(c);break;case"em":i+=n.em(c);break;case"codespan":i+=n.codespan(c);break;case"br":i+=n.br(c);break;case"del":i+=n.del(c);break;case"text":i+=n.text(c);break;default:{let o='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw Error(o)}}}return i}},W=(ue=class{constructor(t){k(this,"options");k(this,"block");this.options=t||A}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?T.lex:T.lexInline}provideParser(){return this.block?z.parse:z.parseInline}},k(ue,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),ue),v=new class{constructor(...t){k(this,"defaults",J());k(this,"options",this.setOptions);k(this,"parse",this.parseMarkdown(!0));k(this,"parseInline",this.parseMarkdown(!1));k(this,"Parser",z);k(this,"Renderer",N);k(this,"TextRenderer",ae);k(this,"Lexer",T);k(this,"Tokenizer",D);k(this,"Hooks",W);this.use(...t)}walkTokens(t,e){var i,r;let n=[];for(let l of t)switch(n=n.concat(e.call(this,l)),l.type){case"table":{let a=l;for(let s of a.header)n=n.concat(this.walkTokens(s.tokens,e));for(let s of a.rows)for(let c of s)n=n.concat(this.walkTokens(c.tokens,e));break}case"list":{let a=l;n=n.concat(this.walkTokens(a.items,e));break}default:{let a=l;(r=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&r[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let c=a[s].flat(1/0);n=n.concat(this.walkTokens(c,e))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw Error("extension name required");if("renderer"in r){let l=e.renderers[r.name];l?e.renderers[r.name]=function(...a){let s=r.renderer.apply(this,a);return s===!1&&(s=l.apply(this,a)),s}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let l=e[r.level];l?l.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),n.renderer){let r=this.defaults.renderer||new N(this.defaults);for(let l in n.renderer){if(!(l in r))throw Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let a=l,s=n.renderer[a],c=r[a];r[a]=(...o)=>{let h=s.apply(r,o);return h===!1&&(h=c.apply(r,o)),h||""}}i.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new D(this.defaults);for(let l in n.tokenizer){if(!(l in r))throw Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let a=l,s=n.tokenizer[a],c=r[a];r[a]=(...o)=>{let h=s.apply(r,o);return h===!1&&(h=c.apply(r,o)),h}}i.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new W;for(let l in n.hooks){if(!(l in r))throw Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let a=l,s=n.hooks[a],c=r[a];W.passThroughHooks.has(l)?r[a]=o=>{if(this.defaults.async)return Promise.resolve(s.call(r,o)).then(u=>c.call(r,u));let h=s.call(r,o);return c.call(r,h)}:r[a]=(...o)=>{let h=s.apply(r,o);return h===!1&&(h=c.apply(r,o)),h}}i.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,l=n.walkTokens;i.walkTokens=function(a){let s=[];return s.push(l.call(this,a)),r&&(s=s.concat(r.call(this,a))),s}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return T.lex(t,e??this.defaults)}parser(t,e){return z.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let i={...n},r={...this.defaults,...i},l=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.async===!1)return l(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=t);let a=r.hooks?r.hooks.provideLexer():t?T.lex:T.lexInline,s=r.hooks?r.hooks.provideParser():t?z.parse:z.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(e):e).then(c=>a(c,r)).then(c=>r.hooks?r.hooks.processAllTokens(c):c).then(c=>r.walkTokens?Promise.all(this.walkTokens(c,r.walkTokens)).then(()=>c):c).then(c=>s(c,r)).then(c=>r.hooks?r.hooks.postprocess(c):c).catch(l);try{r.hooks&&(e=r.hooks.preprocess(e));let c=a(e,r);r.hooks&&(c=r.hooks.processAllTokens(c)),r.walkTokens&&this.walkTokens(c,r.walkTokens);let o=s(c,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(c){return l(c)}}}onError(t,e){return n=>{if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+R(n.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}}};function f(t,e){return v.parse(t,e)}f.options=f.setOptions=function(t){return v.setOptions(t),f.defaults=v.defaults,ye(f.defaults),f},f.getDefaults=J,f.defaults=A,f.use=function(...t){return v.use(...t),f.defaults=v.defaults,ye(f.defaults),f},f.walkTokens=function(t,e){return v.walkTokens(t,e)},f.parseInline=v.parseInline,f.Parser=z,f.parser=z.parse,f.Renderer=N,f.TextRenderer=ae,f.Lexer=T,f.lexer=T.lex,f.Tokenizer=D,f.Hooks=W,f.parse=f,f.options,f.setOptions,f.use,f.walkTokens,f.parseInline,z.parse,T.lex;function qe(t){var e=[...arguments].slice(1),n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(a,s){var c=s.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(o){var h;return((h=o.match(/[\t ]/g))==null?void 0:h.length)??0})):a},[]);if(i.length){var r=RegExp(`
[ ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(a){return a.replace(r,`
`)})}n[0]=n[0].replace(/^\r?\n/,"");var l=n[0];return e.forEach(function(a,s){var c=l.match(/(?:^|\n)( *)$/),o=c?c[1]:"",h=a;typeof a=="string"&&a.includes(`
`)&&(h=String(a).split(`
`).map(function(u,p){return p===0?u:""+o+u}).join(`
`)),l+=h+n[s+1]}),l}var Oe={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},oe=new Map,Me=new Map,rn=x(t=>{for(let e of t){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(I.debug("Registering icon pack:",e.name),"loader"in e)Me.set(e.name,e.loader);else if("icons"in e)oe.set(e.name,e.icons);else throw I.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Ze=x(async(t,e)=>{let n=ot(t,!0,e!==void 0);if(!n)throw Error(`Invalid icon name: ${t}`);let i=n.prefix||e;if(!i)throw Error(`Icon name must contain a prefix: ${t}`);let r=oe.get(i);if(!r){let a=Me.get(i);if(!a)throw Error(`Icon set not found: ${n.prefix}`);try{r={...await a(),prefix:i},oe.set(i,r)}catch(s){throw I.error(s),Error(`Failed to load icon set: ${n.prefix}`)}}let l=pt(r,n.name);if(!l)throw Error(`Icon not found: ${t}`);return l},"getRegisteredIconData"),sn=x(async t=>{try{return await Ze(t),!0}catch{return!1}},"isIconAvailable"),Fe=x(async(t,e,n)=>{let i;try{i=await Ze(t,e==null?void 0:e.fallbackPrefix)}catch(l){I.error(l),i=Oe}let r=bt(i,e);return V(St($t(r.body),{...r.attributes,...n}),ke())},"getIconSVG");function De(t,{markdownAutoWrap:e}){let n=qe(t.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`));return e===!1?n.replace(/ /g,"&nbsp;"):n}x(De,"preprocessMarkdown");function Ne(t,e={}){let n=De(t,e),i=f.lexer(n),r=[[]],l=0;function a(s,c="normal"){s.type==="text"?s.text.split(`
`).forEach((o,h)=>{h!==0&&(l++,r.push([])),o.split(" ").forEach(u=>{u=u.replace(/&#39;/g,"'"),u&&r[l].push({content:u,type:c})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(o=>{a(o,s.type)}):s.type==="html"&&r[l].push({content:s.text,type:"normal"})}return x(a,"processNode"),i.forEach(s=>{var c;s.type==="paragraph"?(c=s.tokens)==null||c.forEach(o=>{a(o)}):s.type==="html"?r[l].push({content:s.text,type:"normal"}):r[l].push({content:s.raw,type:"normal"})}),r}x(Ne,"markdownToLines");function We(t,{markdownAutoWrap:e}={}){let n=f.lexer(t);function i(r){var l,a,s;return r.type==="text"?e===!1?r.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):r.text.replace(/\n */g,"<br/>"):r.type==="strong"?`<strong>${(l=r.tokens)==null?void 0:l.map(i).join("")}</strong>`:r.type==="em"?`<em>${(a=r.tokens)==null?void 0:a.map(i).join("")}</em>`:r.type==="paragraph"?`<p>${(s=r.tokens)==null?void 0:s.map(i).join("")}</p>`:r.type==="space"?"":r.type==="html"?`${r.text}`:r.type==="escape"?r.text:(I.warn(`Unsupported markdown: ${r.type}`),r.raw)}return x(i,"output"),n.map(i).join("")}x(We,"markdownToHTML");function Qe(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}x(Qe,"splitTextToChars");function He(t,e){return ce(t,[],Qe(e.content),e.type)}x(He,"splitWordToFitWidth");function ce(t,e,n,i){if(n.length===0)return[{content:e.join(""),type:i},{content:"",type:i}];let[r,...l]=n,a=[...e,r];return t([{content:a.join(""),type:i}])?ce(t,a,l,i):(e.length===0&&r&&(e.push(r),n.shift()),[{content:e.join(""),type:i},{content:n.join(""),type:i}])}x(ce,"splitWordToFitWidthRecursion");function Ge(t,e){if(t.some(({content:n})=>n.includes(`
`)))throw Error("splitLineToFitWidth does not support newlines in the line");return Q(t,e)}x(Ge,"splitLineToFitWidth");function Q(t,e,n=[],i=[]){if(t.length===0)return i.length>0&&n.push(i),n.length>0?n:[];let r="";t[0].content===" "&&(r=" ",t.shift());let l=t.shift()??{content:" ",type:"normal"},a=[...i];if(r!==""&&a.push({content:r,type:"normal"}),a.push(l),e(a))return Q(t,e,n,a);if(i.length>0)n.push(i),t.unshift(l);else if(l.content){let[s,c]=He(e,l);n.push([s]),c.content&&t.unshift(c)}return Q(t,e,n)}x(Q,"splitLineToFitWidthRecursion");function he(t,e){e&&t.attr("style",e)}x(he,"applyStyle");async function Xe(t,e,n,i,r=!1,l=ke()){let a=t.append("foreignObject");a.attr("width",`${10*n}px`),a.attr("height",`${10*n}px`);let s=a.append("xhtml:div"),c=de(e.label)?await nt(e.label.replace(rt.lineBreakRegex,`
`),l):V(e.label,l),o=e.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(c),he(h,e.labelStyle),h.attr("class",`${o} ${i}`),he(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",n+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),r&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===n&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",n+"px"),u=s.node().getBoundingClientRect()),a.node()}x(Xe,"addHtmlSpan");function H(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}x(H,"createTspan");function Ue(t,e,n){let i=t.append("text"),r=H(i,1,e);G(r,n);let l=r.node().getComputedTextLength();return i.remove(),l}x(Ue,"computeWidthOfText");function Ve(t,e,n){var a;let i=t.append("text"),r=H(i,1,e);G(r,[{content:n,type:"normal"}]);let l=(a=r.node())==null?void 0:a.getBoundingClientRect();return l&&i.remove(),l}x(Ve,"computeDimensionOfText");function Ye(t,e,n,i=!1){let r=1.1,l=e.append("g"),a=l.insert("rect").attr("class","background").attr("style","stroke: none"),s=l.append("text").attr("y","-10.1"),c=0;for(let o of n){let h=x(p=>Ue(l,r,p)<=t,"checkWidth"),u=h(o)?[o]:Ge(o,h);for(let p of u)G(H(s,c,r),p),c++}if(i){let o=s.node().getBBox();return a.attr("x",o.x-2).attr("y",o.y-2).attr("width",o.width+4).attr("height",o.height+4),l.node()}else return s.node()}x(Ye,"createFormattedText");function G(t,e){t.text(""),e.forEach((n,i)=>{let r=t.append("tspan").attr("font-style",n.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",n.type==="strong"?"bold":"normal");i===0?r.text(n.content):r.text(" "+n.content)})}x(G,"updateTextContentAndStyles");async function pe(t,e={}){let n=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(r,l,a)=>(n.push((async()=>{let s=`${l}:${a}`;return await sn(s)?await Fe(s,void 0,{class:"label-icon"}):`<i class='${V(r,e).replace(":"," ")}'></i>`})()),r));let i=await Promise.all(n);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}x(pe,"replaceIconSubstring");var ln=x(async(t,e="",{style:n="",isTitle:i=!1,classes:r="",useHtmlLabels:l=!0,isNode:a=!0,width:s=200,addSvgBackground:c=!1}={},o)=>{if(I.debug("XYZ createText",e,n,i,r,l,a,"addSvgBackground: ",c),l){let h=await pe(tt(We(e,o)),o),u=e.replace(/\\\\/g,"\\");return await Xe(t,{isNode:a,label:de(e)?u:h,labelStyle:n.replace("fill:","color:")},s,r,c,o)}else{let h=Ye(s,t,Ne(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),o),e?c:!1);if(a){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));let u=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");U(h).attr("style",u)}else{let u=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");U(h).select("rect").attr("style",u.replace(/background:/g,"fill:"));let p=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");U(h).select("text").attr("style",p)}return h}},"createText");export{pe as a,rn as i,ln as n,Oe as o,Fe as r,qe as s,Ve as t};

Sorry, the diff of this file is too big to display

var e;import{f as r,g as c,h as u,i as f,m as n,o as l,p as d,s as h,t as p}from"./chunk-FPAJGGOC-DOBSZjU2.js";var v=(e=class extends p{constructor(){super(["info","showInfo"])}},r(e,"InfoTokenBuilder"),e),o={parser:{TokenBuilder:r(()=>new v,"TokenBuilder"),ValueConverter:r(()=>new f,"ValueConverter")}};function t(i=d){let s=n(c(i),h),a=n(u({shared:s}),l,o);return s.ServiceRegistry.register(a),{shared:s,Info:a}}r(t,"createInfoServices");export{t as n,o as t};
var e;import{f as r,g as d,h as u,i as c,m as t,p as l,s as p,t as v,u as h}from"./chunk-FPAJGGOC-DOBSZjU2.js";var R=(e=class extends v{constructor(){super(["radar-beta"])}},r(e,"RadarTokenBuilder"),e),n={parser:{TokenBuilder:r(()=>new R,"TokenBuilder"),ValueConverter:r(()=>new c,"ValueConverter")}};function i(o=l){let a=t(d(o),p),s=t(u({shared:a}),h,n);return a.ServiceRegistry.register(s),{shared:a,Radar:s}}r(i,"createRadarServices");export{i as n,n as t};
import{n as c}from"./src-BKLwm2RN.js";function nt(t){return t==null}c(nt,"isNothing");function Ct(t){return typeof t=="object"&&!!t}c(Ct,"isObject");function St(t){return Array.isArray(t)?t:nt(t)?[]:[t]}c(St,"toArray");function Ot(t,n){var i,o,r,a;if(n)for(a=Object.keys(n),i=0,o=a.length;i<o;i+=1)r=a[i],t[r]=n[r];return t}c(Ot,"extend");function It(t,n){var i="",o;for(o=0;o<n;o+=1)i+=t;return i}c(It,"repeat");function jt(t){return t===0&&1/t==-1/0}c(jt,"isNegativeZero");var k={isNothing:nt,isObject:Ct,toArray:St,repeat:It,isNegativeZero:jt,extend:Ot};function it(t,n){var i="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(i+=`
`+t.mark.snippet),o+" "+i):o}c(it,"formatError");function Y(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=it(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||""}c(Y,"YAMLException$1"),Y.prototype=Object.create(Error.prototype),Y.prototype.constructor=Y,Y.prototype.toString=c(function(t){return this.name+": "+it(this,t)},"toString");var S=Y;function K(t,n,i,o,r){var a="",e="",l=Math.floor(r/2)-1;return o-n>l&&(a=" ... ",n=o-l+a.length),i-o>l&&(e=" ...",i=o+l-e.length),{str:a+t.slice(n,i).replace(/\t/g,"\u2192")+e,pos:o-n+a.length}}c(K,"getLine");function H(t,n){return k.repeat(" ",n-t.length)+t}c(H,"padStart");function Tt(t,n){if(n=Object.create(n||null),!t.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,o=[0],r=[],a,e=-1;a=i.exec(t.buffer);)r.push(a.index),o.push(a.index+a[0].length),t.position<=a.index&&e<0&&(e=o.length-2);e<0&&(e=o.length-1);var l="",s,u,d=Math.min(t.line+n.linesAfter,r.length).toString().length,p=n.maxLength-(n.indent+d+3);for(s=1;s<=n.linesBefore&&!(e-s<0);s++)u=K(t.buffer,o[e-s],r[e-s],t.position-(o[e]-o[e-s]),p),l=k.repeat(" ",n.indent)+H((t.line-s+1).toString(),d)+" | "+u.str+`
`+l;for(u=K(t.buffer,o[e],r[e],t.position,p),l+=k.repeat(" ",n.indent)+H((t.line+1).toString(),d)+" | "+u.str+`
`,l+=k.repeat("-",n.indent+d+3+u.pos)+`^
`,s=1;s<=n.linesAfter&&!(e+s>=r.length);s++)u=K(t.buffer,o[e+s],r[e+s],t.position-(o[e]-o[e+s]),p),l+=k.repeat(" ",n.indent)+H((t.line+s+1).toString(),d)+" | "+u.str+`
`;return l.replace(/\n$/,"")}c(Tt,"makeSnippet");var pi=Tt,fi=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],di=["scalar","sequence","mapping"];function Ft(t){var n={};return t!==null&&Object.keys(t).forEach(function(i){t[i].forEach(function(o){n[String(o)]=i})}),n}c(Ft,"compileStyleAliases");function Mt(t,n){if(n||(n={}),Object.keys(n).forEach(function(i){if(fi.indexOf(i)===-1)throw new S('Unknown option "'+i+'" is met in definition of "'+t+'" YAML type.')}),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Ft(n.styleAliases||null),di.indexOf(this.kind)===-1)throw new S('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}c(Mt,"Type$1");var w=Mt;function rt(t,n){var i=[];return t[n].forEach(function(o){var r=i.length;i.forEach(function(a,e){a.tag===o.tag&&a.kind===o.kind&&a.multi===o.multi&&(r=e)}),i[r]=o}),i}c(rt,"compileList");function Lt(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function o(r){r.multi?(t.multi[r.kind].push(r),t.multi.fallback.push(r)):t[r.kind][r.tag]=t.fallback[r.tag]=r}for(c(o,"collectType"),n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(o);return t}c(Lt,"compileMap");function Z(t){return this.extend(t)}c(Z,"Schema$1"),Z.prototype.extend=c(function(t){var n=[],i=[];if(t instanceof w)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new S("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(r){if(!(r instanceof w))throw new S("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&r.loadKind!=="scalar")throw new S("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new S("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(r){if(!(r instanceof w))throw new S("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(Z.prototype);return o.implicit=(this.implicit||[]).concat(n),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=rt(o,"implicit"),o.compiledExplicit=rt(o,"explicit"),o.compiledTypeMap=Lt(o.compiledImplicit,o.compiledExplicit),o},"extend");var hi=new Z({explicit:[new w("tag:yaml.org,2002:str",{kind:"scalar",construct:c(function(t){return t===null?"":t},"construct")}),new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:c(function(t){return t===null?[]:t},"construct")}),new w("tag:yaml.org,2002:map",{kind:"mapping",construct:c(function(t){return t===null?{}:t},"construct")})]});function Nt(t){if(t===null)return!0;var n=t.length;return n===1&&t==="~"||n===4&&(t==="null"||t==="Null"||t==="NULL")}c(Nt,"resolveYamlNull");function Et(){return null}c(Et,"constructYamlNull");function _t(t){return t===null}c(_t,"isNull");var mi=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:Nt,construct:Et,predicate:_t,represent:{canonical:c(function(){return"~"},"canonical"),lowercase:c(function(){return"null"},"lowercase"),uppercase:c(function(){return"NULL"},"uppercase"),camelcase:c(function(){return"Null"},"camelcase"),empty:c(function(){return""},"empty")},defaultStyle:"lowercase"});function Yt(t){if(t===null)return!1;var n=t.length;return n===4&&(t==="true"||t==="True"||t==="TRUE")||n===5&&(t==="false"||t==="False"||t==="FALSE")}c(Yt,"resolveYamlBoolean");function Dt(t){return t==="true"||t==="True"||t==="TRUE"}c(Dt,"constructYamlBoolean");function qt(t){return Object.prototype.toString.call(t)==="[object Boolean]"}c(qt,"isBoolean");var gi=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Yt,construct:Dt,predicate:qt,represent:{lowercase:c(function(t){return t?"true":"false"},"lowercase"),uppercase:c(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:c(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Bt(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}c(Bt,"isHexCode");function Ut(t){return 48<=t&&t<=55}c(Ut,"isOctCode");function Pt(t){return 48<=t&&t<=57}c(Pt,"isDecCode");function Rt(t){if(t===null)return!1;var n=t.length,i=0,o=!1,r;if(!n)return!1;if(r=t[i],(r==="-"||r==="+")&&(r=t[++i]),r==="0"){if(i+1===n)return!0;if(r=t[++i],r==="b"){for(i++;i<n;i++)if(r=t[i],r!=="_"){if(r!=="0"&&r!=="1")return!1;o=!0}return o&&r!=="_"}if(r==="x"){for(i++;i<n;i++)if(r=t[i],r!=="_"){if(!Bt(t.charCodeAt(i)))return!1;o=!0}return o&&r!=="_"}if(r==="o"){for(i++;i<n;i++)if(r=t[i],r!=="_"){if(!Ut(t.charCodeAt(i)))return!1;o=!0}return o&&r!=="_"}}if(r==="_")return!1;for(;i<n;i++)if(r=t[i],r!=="_"){if(!Pt(t.charCodeAt(i)))return!1;o=!0}return!(!o||r==="_")}c(Rt,"resolveYamlInteger");function Wt(t){var n=t,i=1,o;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),o=n[0],(o==="-"||o==="+")&&(o==="-"&&(i=-1),n=n.slice(1),o=n[0]),n==="0")return 0;if(o==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]==="x")return i*parseInt(n.slice(2),16);if(n[1]==="o")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}c(Wt,"constructYamlInteger");function $t(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1==0&&!k.isNegativeZero(t)}c($t,"isInteger");var yi=new w("tag:yaml.org,2002:int",{kind:"scalar",resolve:Rt,construct:Wt,predicate:$t,represent:{binary:c(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:c(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:c(function(t){return t.toString(10)},"decimal"),hexadecimal:c(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vi=RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Kt(t){return!(t===null||!vi.test(t)||t[t.length-1]==="_")}c(Kt,"resolveYamlFloat");function Ht(t){var n=t.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1;return"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?1/0:-1/0:n===".nan"?NaN:i*parseFloat(n,10)}c(Ht,"constructYamlFloat");var bi=/^[-+]?[0-9]+e/;function Zt(t,n){var i;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(t===1/0)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(t===-1/0)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(k.isNegativeZero(t))return"-0.0";return i=t.toString(10),bi.test(i)?i.replace("e",".e"):i}c(Zt,"representYamlFloat");function Qt(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!=0||k.isNegativeZero(t))}c(Qt,"isFloat");var Ai=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:Kt,construct:Ht,predicate:Qt,represent:Zt,defaultStyle:"lowercase"}),Gt=hi.extend({implicit:[mi,gi,yi,Ai]}),ki=Gt,zt=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Jt=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Vt(t){return t===null?!1:zt.exec(t)!==null||Jt.exec(t)!==null}c(Vt,"resolveYamlTimestamp");function Xt(t){var n,i,o,r,a,e,l,s=0,u=null,d,p,m;if(n=zt.exec(t),n===null&&(n=Jt.exec(t)),n===null)throw Error("Date resolve error");if(i=+n[1],o=n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(i,o,r));if(a=+n[4],e=+n[5],l=+n[6],n[7]){for(s=n[7].slice(0,3);s.length<3;)s+="0";s=+s}return n[9]&&(d=+n[10],p=+(n[11]||0),u=(d*60+p)*6e4,n[9]==="-"&&(u=-u)),m=new Date(Date.UTC(i,o,r,a,e,l,s)),u&&m.setTime(m.getTime()-u),m}c(Xt,"constructYamlTimestamp");function tn(t){return t.toISOString()}c(tn,"representYamlTimestamp");var wi=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Vt,construct:Xt,instanceOf:Date,represent:tn});function nn(t){return t==="<<"||t===null}c(nn,"resolveYamlMerge");var xi=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nn}),ot=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function rn(t){if(t===null)return!1;var n,i,o=0,r=t.length,a=ot;for(i=0;i<r;i++)if(n=a.indexOf(t.charAt(i)),!(n>64)){if(n<0)return!1;o+=6}return o%8==0}c(rn,"resolveYamlBinary");function on(t){var n,i,o=t.replace(/[\r\n=]/g,""),r=o.length,a=ot,e=0,l=[];for(n=0;n<r;n++)n%4==0&&n&&(l.push(e>>16&255),l.push(e>>8&255),l.push(e&255)),e=e<<6|a.indexOf(o.charAt(n));return i=r%4*6,i===0?(l.push(e>>16&255),l.push(e>>8&255),l.push(e&255)):i===18?(l.push(e>>10&255),l.push(e>>2&255)):i===12&&l.push(e>>4&255),new Uint8Array(l)}c(on,"constructYamlBinary");function en(t){var n="",i=0,o,r,a=t.length,e=ot;for(o=0;o<a;o++)o%3==0&&o&&(n+=e[i>>18&63],n+=e[i>>12&63],n+=e[i>>6&63],n+=e[i&63]),i=(i<<8)+t[o];return r=a%3,r===0?(n+=e[i>>18&63],n+=e[i>>12&63],n+=e[i>>6&63],n+=e[i&63]):r===2?(n+=e[i>>10&63],n+=e[i>>4&63],n+=e[i<<2&63],n+=e[64]):r===1&&(n+=e[i>>2&63],n+=e[i<<4&63],n+=e[64],n+=e[64]),n}c(en,"representYamlBinary");function an(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}c(an,"isBinary");var Ci=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:rn,construct:on,predicate:an,represent:en}),Si=Object.prototype.hasOwnProperty,Oi=Object.prototype.toString;function ln(t){if(t===null)return!0;var n=[],i,o,r,a,e,l=t;for(i=0,o=l.length;i<o;i+=1){if(r=l[i],e=!1,Oi.call(r)!=="[object Object]")return!1;for(a in r)if(Si.call(r,a))if(!e)e=!0;else return!1;if(!e)return!1;if(n.indexOf(a)===-1)n.push(a);else return!1}return!0}c(ln,"resolveYamlOmap");function cn(t){return t===null?[]:t}c(cn,"constructYamlOmap");var Ii=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ln,construct:cn}),ji=Object.prototype.toString;function sn(t){if(t===null)return!0;var n,i,o,r,a,e=t;for(a=Array(e.length),n=0,i=e.length;n<i;n+=1){if(o=e[n],ji.call(o)!=="[object Object]"||(r=Object.keys(o),r.length!==1))return!1;a[n]=[r[0],o[r[0]]]}return!0}c(sn,"resolveYamlPairs");function un(t){if(t===null)return[];var n,i,o,r,a,e=t;for(a=Array(e.length),n=0,i=e.length;n<i;n+=1)o=e[n],r=Object.keys(o),a[n]=[r[0],o[r[0]]];return a}c(un,"constructYamlPairs");var Ti=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:sn,construct:un}),Fi=Object.prototype.hasOwnProperty;function pn(t){if(t===null)return!0;var n,i=t;for(n in i)if(Fi.call(i,n)&&i[n]!==null)return!1;return!0}c(pn,"resolveYamlSet");function fn(t){return t===null?{}:t}c(fn,"constructYamlSet");var Mi=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:pn,construct:fn}),dn=ki.extend({implicit:[wi,xi],explicit:[Ci,Ii,Ti,Mi]}),F=Object.prototype.hasOwnProperty,Q=1,hn=2,mn=3,G=4,et=1,Li=2,gn=3,Ni=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ei=/[\x85\u2028\u2029]/,_i=/[,\[\]\{\}]/,yn=/^(?:!|!!|![a-z\-]+!)$/i,vn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function at(t){return Object.prototype.toString.call(t)}c(at,"_class");function I(t){return t===10||t===13}c(I,"is_EOL");function M(t){return t===9||t===32}c(M,"is_WHITE_SPACE");function C(t){return t===9||t===32||t===10||t===13}c(C,"is_WS_OR_EOL");function L(t){return t===44||t===91||t===93||t===123||t===125}c(L,"is_FLOW_INDICATOR");function bn(t){var n;return 48<=t&&t<=57?t-48:(n=t|32,97<=n&&n<=102?n-97+10:-1)}c(bn,"fromHexCode");function An(t){return t===120?2:t===117?4:t===85?8:0}c(An,"escapedHexLen");function kn(t){return 48<=t&&t<=57?t-48:-1}c(kn,"fromDecimalCode");function lt(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}c(lt,"simpleEscapeSequence");function wn(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}c(wn,"charFromCodepoint");var xn=Array(256),Cn=Array(256);for(N=0;N<256;N++)xn[N]=lt(N)?1:0,Cn[N]=lt(N);var N;function Sn(t,n){this.input=t,this.filename=n.filename||null,this.schema=n.schema||dn,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}c(Sn,"State$1");function ct(t,n){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=pi(i),new S(n,i)}c(ct,"generateError");function f(t,n){throw ct(t,n)}c(f,"throwError");function U(t,n){t.onWarning&&t.onWarning.call(null,ct(t,n))}c(U,"throwWarning");var On={YAML:c(function(t,n,i){var o,r,a;t.version!==null&&f(t,"duplication of %YAML directive"),i.length!==1&&f(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&f(t,"ill-formed argument of the YAML directive"),r=parseInt(o[1],10),a=parseInt(o[2],10),r!==1&&f(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&U(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:c(function(t,n,i){var o,r;i.length!==2&&f(t,"TAG directive accepts exactly two arguments"),o=i[0],r=i[1],yn.test(o)||f(t,"ill-formed tag handle (first argument) of the TAG directive"),F.call(t.tagMap,o)&&f(t,'there is a previously declared suffix for "'+o+'" tag handle'),vn.test(r)||f(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch{f(t,"tag prefix is malformed: "+r)}t.tagMap[o]=r},"handleTagDirective")};function T(t,n,i,o){var r,a,e,l;if(n<i){if(l=t.input.slice(n,i),o)for(r=0,a=l.length;r<a;r+=1)e=l.charCodeAt(r),e===9||32<=e&&e<=1114111||f(t,"expected valid JSON character");else Ni.test(l)&&f(t,"the stream contains non-printable characters");t.result+=l}}c(T,"captureSegment");function st(t,n,i,o){var r,a,e,l;for(k.isObject(i)||f(t,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),e=0,l=r.length;e<l;e+=1)a=r[e],F.call(n,a)||(n[a]=i[a],o[a]=!0)}c(st,"mergeMappings");function E(t,n,i,o,r,a,e,l,s){var u,d;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),u=0,d=r.length;u<d;u+=1)Array.isArray(r[u])&&f(t,"nested arrays are not supported inside keys"),typeof r=="object"&&at(r[u])==="[object Object]"&&(r[u]="[object Object]");if(typeof r=="object"&&at(r)==="[object Object]"&&(r="[object Object]"),r=String(r),n===null&&(n={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(u=0,d=a.length;u<d;u+=1)st(t,n,a[u],i);else st(t,n,a,i);else!t.json&&!F.call(i,r)&&F.call(n,r)&&(t.line=e||t.line,t.lineStart=l||t.lineStart,t.position=s||t.position,f(t,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(n,r,{configurable:!0,enumerable:!0,writable:!0,value:a}):n[r]=a,delete i[r];return n}c(E,"storeMappingPair");function z(t){var n=t.input.charCodeAt(t.position);n===10?t.position++:n===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):f(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}c(z,"readLineBreak");function A(t,n,i){for(var o=0,r=t.input.charCodeAt(t.position);r!==0;){for(;M(r);)r===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),r=t.input.charCodeAt(++t.position);if(n&&r===35)do r=t.input.charCodeAt(++t.position);while(r!==10&&r!==13&&r!==0);if(I(r))for(z(t),r=t.input.charCodeAt(t.position),o++,t.lineIndent=0;r===32;)t.lineIndent++,r=t.input.charCodeAt(++t.position);else break}return i!==-1&&o!==0&&t.lineIndent<i&&U(t,"deficient indentation"),o}c(A,"skipSeparationSpace");function P(t){var n=t.position,i=t.input.charCodeAt(n);return!!((i===45||i===46)&&i===t.input.charCodeAt(n+1)&&i===t.input.charCodeAt(n+2)&&(n+=3,i=t.input.charCodeAt(n),i===0||C(i)))}c(P,"testDocumentSeparator");function J(t,n){n===1?t.result+=" ":n>1&&(t.result+=k.repeat(`
`,n-1))}c(J,"writeFoldedLines");function In(t,n,i){var o,r,a,e,l,s,u,d,p=t.kind,m=t.result,h=t.input.charCodeAt(t.position);if(C(h)||L(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(r=t.input.charCodeAt(t.position+1),C(r)||i&&L(r)))return!1;for(t.kind="scalar",t.result="",a=e=t.position,l=!1;h!==0;){if(h===58){if(r=t.input.charCodeAt(t.position+1),C(r)||i&&L(r))break}else if(h===35){if(o=t.input.charCodeAt(t.position-1),C(o))break}else{if(t.position===t.lineStart&&P(t)||i&&L(h))break;if(I(h))if(s=t.line,u=t.lineStart,d=t.lineIndent,A(t,!1,-1),t.lineIndent>=n){l=!0,h=t.input.charCodeAt(t.position);continue}else{t.position=e,t.line=s,t.lineStart=u,t.lineIndent=d;break}}l&&(l=(T(t,a,e,!1),J(t,t.line-s),a=e=t.position,!1)),M(h)||(e=t.position+1),h=t.input.charCodeAt(++t.position)}return T(t,a,e,!1),t.result?!0:(t.kind=p,t.result=m,!1)}c(In,"readPlainScalar");function jn(t,n){var i=t.input.charCodeAt(t.position),o,r;if(i!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=r=t.position;(i=t.input.charCodeAt(t.position))!==0;)if(i===39)if(T(t,o,t.position,!0),i=t.input.charCodeAt(++t.position),i===39)o=t.position,t.position++,r=t.position;else return!0;else I(i)?(T(t,o,r,!0),J(t,A(t,!1,n)),o=r=t.position):t.position===t.lineStart&&P(t)?f(t,"unexpected end of the document within a single quoted scalar"):(t.position++,r=t.position);f(t,"unexpected end of the stream within a single quoted scalar")}c(jn,"readSingleQuotedScalar");function Tn(t,n){var i,o,r,a,e,l=t.input.charCodeAt(t.position);if(l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return T(t,i,t.position,!0),t.position++,!0;if(l===92){if(T(t,i,t.position,!0),l=t.input.charCodeAt(++t.position),I(l))A(t,!1,n);else if(l<256&&xn[l])t.result+=Cn[l],t.position++;else if((e=An(l))>0){for(r=e,a=0;r>0;r--)l=t.input.charCodeAt(++t.position),(e=bn(l))>=0?a=(a<<4)+e:f(t,"expected hexadecimal character");t.result+=wn(a),t.position++}else f(t,"unknown escape sequence");i=o=t.position}else I(l)?(T(t,i,o,!0),J(t,A(t,!1,n)),i=o=t.position):t.position===t.lineStart&&P(t)?f(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}f(t,"unexpected end of the stream within a double quoted scalar")}c(Tn,"readDoubleQuotedScalar");function Fn(t,n){var i=!0,o,r,a,e=t.tag,l,s=t.anchor,u,d,p,m,h,g=Object.create(null),v,b,O,y=t.input.charCodeAt(t.position);if(y===91)d=93,h=!1,l=[];else if(y===123)d=125,h=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),y=t.input.charCodeAt(++t.position);y!==0;){if(A(t,!0,n),y=t.input.charCodeAt(t.position),y===d)return t.position++,t.tag=e,t.anchor=s,t.kind=h?"mapping":"sequence",t.result=l,!0;i?y===44&&f(t,"expected the node content, but found ','"):f(t,"missed comma between flow collection entries"),b=v=O=null,p=m=!1,y===63&&(u=t.input.charCodeAt(t.position+1),C(u)&&(p=m=!0,t.position++,A(t,!0,n))),o=t.line,r=t.lineStart,a=t.position,_(t,n,Q,!1,!0),b=t.tag,v=t.result,A(t,!0,n),y=t.input.charCodeAt(t.position),(m||t.line===o)&&y===58&&(p=!0,y=t.input.charCodeAt(++t.position),A(t,!0,n),_(t,n,Q,!1,!0),O=t.result),h?E(t,l,g,b,v,O,o,r,a):p?l.push(E(t,null,g,b,v,O,o,r,a)):l.push(v),A(t,!0,n),y=t.input.charCodeAt(t.position),y===44?(i=!0,y=t.input.charCodeAt(++t.position)):i=!1}f(t,"unexpected end of the stream within a flow collection")}c(Fn,"readFlowCollection");function Mn(t,n){var i,o,r=et,a=!1,e=!1,l=n,s=0,u=!1,d,p=t.input.charCodeAt(t.position);if(p===124)o=!1;else if(p===62)o=!0;else return!1;for(t.kind="scalar",t.result="";p!==0;)if(p=t.input.charCodeAt(++t.position),p===43||p===45)et===r?r=p===43?gn:Li:f(t,"repeat of a chomping mode identifier");else if((d=kn(p))>=0)d===0?f(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):e?f(t,"repeat of an indentation width identifier"):(l=n+d-1,e=!0);else break;if(M(p)){do p=t.input.charCodeAt(++t.position);while(M(p));if(p===35)do p=t.input.charCodeAt(++t.position);while(!I(p)&&p!==0)}for(;p!==0;){for(z(t),t.lineIndent=0,p=t.input.charCodeAt(t.position);(!e||t.lineIndent<l)&&p===32;)t.lineIndent++,p=t.input.charCodeAt(++t.position);if(!e&&t.lineIndent>l&&(l=t.lineIndent),I(p)){s++;continue}if(t.lineIndent<l){r===gn?t.result+=k.repeat(`
`,a?1+s:s):r===et&&a&&(t.result+=`
`);break}for(o?M(p)?(u=!0,t.result+=k.repeat(`
`,a?1+s:s)):u?(u=!1,t.result+=k.repeat(`
`,s+1)):s===0?a&&(t.result+=" "):t.result+=k.repeat(`
`,s):t.result+=k.repeat(`
`,a?1+s:s),a=!0,e=!0,s=0,i=t.position;!I(p)&&p!==0;)p=t.input.charCodeAt(++t.position);T(t,i,t.position,!1)}return!0}c(Mn,"readBlockScalar");function ut(t,n){var i,o=t.tag,r=t.anchor,a=[],e,l=!1,s;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),s=t.input.charCodeAt(t.position);s!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,f(t,"tab characters must not be used in indentation")),!(s!==45||(e=t.input.charCodeAt(t.position+1),!C(e))));){if(l=!0,t.position++,A(t,!0,-1)&&t.lineIndent<=n){a.push(null),s=t.input.charCodeAt(t.position);continue}if(i=t.line,_(t,n,mn,!1,!0),a.push(t.result),A(t,!0,-1),s=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>n)&&s!==0)f(t,"bad indentation of a sequence entry");else if(t.lineIndent<n)break}return l?(t.tag=o,t.anchor=r,t.kind="sequence",t.result=a,!0):!1}c(ut,"readBlockSequence");function Ln(t,n,i){var o,r,a,e,l,s,u=t.tag,d=t.anchor,p={},m=Object.create(null),h=null,g=null,v=null,b=!1,O=!1,y;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=p),y=t.input.charCodeAt(t.position);y!==0;){if(!b&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,f(t,"tab characters must not be used in indentation")),o=t.input.charCodeAt(t.position+1),a=t.line,(y===63||y===58)&&C(o))y===63?(b&&(E(t,p,m,h,g,null,e,l,s),h=g=v=null),O=!0,b=!0,r=!0):b?(b=!1,r=!0):f(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,y=o;else{if(e=t.line,l=t.lineStart,s=t.position,!_(t,i,hn,!1,!0))break;if(t.line===a){for(y=t.input.charCodeAt(t.position);M(y);)y=t.input.charCodeAt(++t.position);if(y===58)y=t.input.charCodeAt(++t.position),C(y)||f(t,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(E(t,p,m,h,g,null,e,l,s),h=g=v=null),O=!0,b=!1,r=!1,h=t.tag,g=t.result;else if(O)f(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=d,!0}else if(O)f(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=d,!0}if((t.line===a||t.lineIndent>n)&&(b&&(e=t.line,l=t.lineStart,s=t.position),_(t,n,G,!0,r)&&(b?g=t.result:v=t.result),b||(E(t,p,m,h,g,v,e,l,s),h=g=v=null),A(t,!0,-1),y=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>n)&&y!==0)f(t,"bad indentation of a mapping entry");else if(t.lineIndent<n)break}return b&&E(t,p,m,h,g,null,e,l,s),O&&(t.tag=u,t.anchor=d,t.kind="mapping",t.result=p),O}c(Ln,"readBlockMapping");function Nn(t){var n,i=!1,o=!1,r,a,e=t.input.charCodeAt(t.position);if(e!==33)return!1;if(t.tag!==null&&f(t,"duplication of a tag property"),e=t.input.charCodeAt(++t.position),e===60?(i=!0,e=t.input.charCodeAt(++t.position)):e===33?(o=!0,r="!!",e=t.input.charCodeAt(++t.position)):r="!",n=t.position,i){do e=t.input.charCodeAt(++t.position);while(e!==0&&e!==62);t.position<t.length?(a=t.input.slice(n,t.position),e=t.input.charCodeAt(++t.position)):f(t,"unexpected end of the stream within a verbatim tag")}else{for(;e!==0&&!C(e);)e===33&&(o?f(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(n-1,t.position+1),yn.test(r)||f(t,"named tag handle cannot contain such characters"),o=!0,n=t.position+1)),e=t.input.charCodeAt(++t.position);a=t.input.slice(n,t.position),_i.test(a)&&f(t,"tag suffix cannot contain flow indicator characters")}a&&!vn.test(a)&&f(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{f(t,"tag name is malformed: "+a)}return i?t.tag=a:F.call(t.tagMap,r)?t.tag=t.tagMap[r]+a:r==="!"?t.tag="!"+a:r==="!!"?t.tag="tag:yaml.org,2002:"+a:f(t,'undeclared tag handle "'+r+'"'),!0}c(Nn,"readTagProperty");function En(t){var n,i=t.input.charCodeAt(t.position);if(i!==38)return!1;for(t.anchor!==null&&f(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),n=t.position;i!==0&&!C(i)&&!L(i);)i=t.input.charCodeAt(++t.position);return t.position===n&&f(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(n,t.position),!0}c(En,"readAnchorProperty");function _n(t){var n,i,o=t.input.charCodeAt(t.position);if(o!==42)return!1;for(o=t.input.charCodeAt(++t.position),n=t.position;o!==0&&!C(o)&&!L(o);)o=t.input.charCodeAt(++t.position);return t.position===n&&f(t,"name of an alias node must contain at least one character"),i=t.input.slice(n,t.position),F.call(t.anchorMap,i)||f(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],A(t,!0,-1),!0}c(_n,"readAlias");function _(t,n,i,o,r){var a,e,l,s=1,u=!1,d=!1,p,m,h,g,v,b;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=e=l=G===i||mn===i,o&&A(t,!0,-1)&&(u=!0,t.lineIndent>n?s=1:t.lineIndent===n?s=0:t.lineIndent<n&&(s=-1)),s===1)for(;Nn(t)||En(t);)A(t,!0,-1)?(u=!0,l=a,t.lineIndent>n?s=1:t.lineIndent===n?s=0:t.lineIndent<n&&(s=-1)):l=!1;if(l&&(l=u||r),(s===1||G===i)&&(v=Q===i||hn===i?n:n+1,b=t.position-t.lineStart,s===1?l&&(ut(t,b)||Ln(t,b,v))||Fn(t,v)?d=!0:(e&&Mn(t,v)||jn(t,v)||Tn(t,v)?d=!0:_n(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&f(t,"alias node should not have any properties")):In(t,v,Q===i)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):s===0&&(d=l&&ut(t,b))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&f(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),p=0,m=t.implicitTypes.length;p<m;p+=1)if(g=t.implicitTypes[p],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(F.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,h=t.typeMap.multi[t.kind||"fallback"],p=0,m=h.length;p<m;p+=1)if(t.tag.slice(0,h[p].tag.length)===h[p].tag){g=h[p];break}g||f(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&f(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):f(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}c(_,"composeNode");function Yn(t){var n=t.position,i,o,r,a=!1,e;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(e=t.input.charCodeAt(t.position))!==0&&(A(t,!0,-1),e=t.input.charCodeAt(t.position),!(t.lineIndent>0||e!==37));){for(a=!0,e=t.input.charCodeAt(++t.position),i=t.position;e!==0&&!C(e);)e=t.input.charCodeAt(++t.position);for(o=t.input.slice(i,t.position),r=[],o.length<1&&f(t,"directive name must not be less than one character in length");e!==0;){for(;M(e);)e=t.input.charCodeAt(++t.position);if(e===35){do e=t.input.charCodeAt(++t.position);while(e!==0&&!I(e));break}if(I(e))break;for(i=t.position;e!==0&&!C(e);)e=t.input.charCodeAt(++t.position);r.push(t.input.slice(i,t.position))}e!==0&&z(t),F.call(On,o)?On[o](t,o,r):U(t,'unknown document directive "'+o+'"')}if(A(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,A(t,!0,-1)):a&&f(t,"directives end mark is expected"),_(t,t.lineIndent-1,G,!1,!0),A(t,!0,-1),t.checkLineBreaks&&Ei.test(t.input.slice(n,t.position))&&U(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&P(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,A(t,!0,-1));return}if(t.position<t.length-1)f(t,"end of the stream or a document separator is expected");else return}c(Yn,"readDocument");function pt(t,n){t=String(t),n||(n={}),t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new Sn(t,n),o=t.indexOf("\0");for(o!==-1&&(i.position=o,f(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Yn(i);return i.documents}c(pt,"loadDocuments");function Dn(t,n,i){typeof n=="object"&&n&&i===void 0&&(i=n,n=null);var o=pt(t,i);if(typeof n!="function")return o;for(var r=0,a=o.length;r<a;r+=1)n(o[r])}c(Dn,"loadAll$1");function qn(t,n){var i=pt(t,n);if(i.length!==0){if(i.length===1)return i[0];throw new S("expected a single document in the stream, but found more")}}c(qn,"load$1");var Bn={loadAll:Dn,load:qn},Un=Object.prototype.toString,Pn=Object.prototype.hasOwnProperty,ft=65279,Yi=9,R=10,Di=13,qi=32,Bi=33,Ui=34,dt=35,Pi=37,Ri=38,Wi=39,$i=42,Rn=44,Ki=45,V=58,Hi=61,Zi=62,Qi=63,Gi=64,Wn=91,$n=93,zi=96,Kn=123,Ji=124,Hn=125,x={};x[0]="\\0",x[7]="\\a",x[8]="\\b",x[9]="\\t",x[10]="\\n",x[11]="\\v",x[12]="\\f",x[13]="\\r",x[27]="\\e",x[34]='\\"',x[92]="\\\\",x[133]="\\N",x[160]="\\_",x[8232]="\\L",x[8233]="\\P";var Vi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Xi=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Zn(t,n){var i,o,r,a,e,l,s;if(n===null)return{};for(i={},o=Object.keys(n),r=0,a=o.length;r<a;r+=1)e=o[r],l=String(n[e]),e.slice(0,2)==="!!"&&(e="tag:yaml.org,2002:"+e.slice(2)),s=t.compiledTypeMap.fallback[e],s&&Pn.call(s.styleAliases,l)&&(l=s.styleAliases[l]),i[e]=l;return i}c(Zn,"compileStyleMap");function Qn(t){var n=t.toString(16).toUpperCase(),i,o;if(t<=255)i="x",o=2;else if(t<=65535)i="u",o=4;else if(t<=4294967295)i="U",o=8;else throw new S("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+k.repeat("0",o-n.length)+n}c(Qn,"encodeHex");var tr=1,W=2;function Gn(t){this.schema=t.schema||dn,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=k.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Zn(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?W:tr,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}c(Gn,"State");function ht(t,n){for(var i=k.repeat(" ",n),o=0,r=-1,a="",e,l=t.length;o<l;)r=t.indexOf(`
`,o),r===-1?(e=t.slice(o),o=l):(e=t.slice(o,r+1),o=r+1),e.length&&e!==`
`&&(a+=i),a+=e;return a}c(ht,"indentString");function X(t,n){return`
`+k.repeat(" ",t.indent*n)}c(X,"generateNextLine");function zn(t,n){var i,o,r;for(i=0,o=t.implicitTypes.length;i<o;i+=1)if(r=t.implicitTypes[i],r.resolve(n))return!0;return!1}c(zn,"testImplicitResolving");function $(t){return t===qi||t===Yi}c($,"isWhitespace");function D(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==ft||65536<=t&&t<=1114111}c(D,"isPrintable");function mt(t){return D(t)&&t!==ft&&t!==Di&&t!==R}c(mt,"isNsCharOrWhitespace");function gt(t,n,i){var o=mt(t),r=o&&!$(t);return(i?o:o&&t!==Rn&&t!==Wn&&t!==$n&&t!==Kn&&t!==Hn)&&t!==dt&&!(n===V&&!r)||mt(n)&&!$(n)&&t===dt||n===V&&r}c(gt,"isPlainSafe");function Jn(t){return D(t)&&t!==ft&&!$(t)&&t!==Ki&&t!==Qi&&t!==V&&t!==Rn&&t!==Wn&&t!==$n&&t!==Kn&&t!==Hn&&t!==dt&&t!==Ri&&t!==$i&&t!==Bi&&t!==Ji&&t!==Hi&&t!==Zi&&t!==Wi&&t!==Ui&&t!==Pi&&t!==Gi&&t!==zi}c(Jn,"isPlainSafeFirst");function Vn(t){return!$(t)&&t!==V}c(Vn,"isPlainSafeLast");function q(t,n){var i=t.charCodeAt(n),o;return i>=55296&&i<=56319&&n+1<t.length&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)?(i-55296)*1024+o-56320+65536:i}c(q,"codePointAt");function yt(t){return/^\n* /.test(t)}c(yt,"needIndentIndicator");var Xn=1,vt=2,ti=3,ni=4,B=5;function ii(t,n,i,o,r,a,e,l){var s,u=0,d=null,p=!1,m=!1,h=o!==-1,g=-1,v=Jn(q(t,0))&&Vn(q(t,t.length-1));if(n||e)for(s=0;s<t.length;u>=65536?s+=2:s++){if(u=q(t,s),!D(u))return B;v&&(v=gt(u,d,l)),d=u}else{for(s=0;s<t.length;u>=65536?s+=2:s++){if(u=q(t,s),u===R)p=!0,h&&(m||(m=s-g-1>o&&t[g+1]!==" "),g=s);else if(!D(u))return B;v&&(v=gt(u,d,l)),d=u}m||(m=h&&s-g-1>o&&t[g+1]!==" ")}return!p&&!m?v&&!e&&!r(t)?Xn:a===W?B:vt:i>9&&yt(t)?B:e?a===W?B:vt:m?ni:ti}c(ii,"chooseScalarStyle");function ri(t,n,i,o,r){t.dump=(function(){if(n.length===0)return t.quotingType===W?'""':"''";if(!t.noCompatMode&&(Vi.indexOf(n)!==-1||Xi.test(n)))return t.quotingType===W?'"'+n+'"':"'"+n+"'";var a=t.indent*Math.max(1,i),e=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=o||t.flowLevel>-1&&i>=t.flowLevel;function s(u){return zn(t,u)}switch(c(s,"testAmbiguity"),ii(n,l,t.indent,e,s,t.quotingType,t.forceQuotes&&!o,r)){case Xn:return n;case vt:return"'"+n.replace(/'/g,"''")+"'";case ti:return"|"+bt(n,t.indent)+At(ht(n,a));case ni:return">"+bt(n,t.indent)+At(ht(oi(n,e),a));case B:return'"'+ei(n)+'"';default:throw new S("impossible error: invalid scalar style")}})()}c(ri,"writeScalar");function bt(t,n){var i=yt(t)?String(n):"",o=t[t.length-1]===`
`;return i+(o&&(t[t.length-2]===`
`||t===`
`)?"+":o?"":"-")+`
`}c(bt,"blockHeader");function At(t){return t[t.length-1]===`
`?t.slice(0,-1):t}c(At,"dropEndingNewline");function oi(t,n){for(var i=/(\n+)([^\n]*)/g,o=(function(){var u=t.indexOf(`
`);return u=u===-1?t.length:u,i.lastIndex=u,kt(t.slice(0,u),n)})(),r=t[0]===`
`||t[0]===" ",a,e;e=i.exec(t);){var l=e[1],s=e[2];a=s[0]===" ",o+=l+(!r&&!a&&s!==""?`
`:"")+kt(s,n),r=a}return o}c(oi,"foldString");function kt(t,n){if(t===""||t[0]===" ")return t;for(var i=/ [^ ]/g,o,r=0,a,e=0,l=0,s="";o=i.exec(t);)l=o.index,l-r>n&&(a=e>r?e:l,s+=`
`+t.slice(r,a),r=a+1),e=l;return s+=`
`,t.length-r>n&&e>r?s+=t.slice(r,e)+`
`+t.slice(e+1):s+=t.slice(r),s.slice(1)}c(kt,"foldLine");function ei(t){for(var n="",i=0,o,r=0;r<t.length;i>=65536?r+=2:r++)i=q(t,r),o=x[i],!o&&D(i)?(n+=t[r],i>=65536&&(n+=t[r+1])):n+=o||Qn(i);return n}c(ei,"escapeString");function ai(t,n,i){var o="",r=t.tag,a,e,l;for(a=0,e=i.length;a<e;a+=1)l=i[a],t.replacer&&(l=t.replacer.call(i,String(a),l)),(j(t,n,l,!1,!1)||l===void 0&&j(t,n,null,!1,!1))&&(o!==""&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=r,t.dump="["+o+"]"}c(ai,"writeFlowSequence");function wt(t,n,i,o){var r="",a=t.tag,e,l,s;for(e=0,l=i.length;e<l;e+=1)s=i[e],t.replacer&&(s=t.replacer.call(i,String(e),s)),(j(t,n+1,s,!0,!0,!1,!0)||s===void 0&&j(t,n+1,null,!0,!0,!1,!0))&&((!o||r!=="")&&(r+=X(t,n)),t.dump&&R===t.dump.charCodeAt(0)?r+="-":r+="- ",r+=t.dump);t.tag=a,t.dump=r||"[]"}c(wt,"writeBlockSequence");function li(t,n,i){var o="",r=t.tag,a=Object.keys(i),e,l,s,u,d;for(e=0,l=a.length;e<l;e+=1)d="",o!==""&&(d+=", "),t.condenseFlow&&(d+='"'),s=a[e],u=i[s],t.replacer&&(u=t.replacer.call(i,s,u)),j(t,n,s,!1,!1)&&(t.dump.length>1024&&(d+="? "),d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),j(t,n,u,!1,!1)&&(d+=t.dump,o+=d));t.tag=r,t.dump="{"+o+"}"}c(li,"writeFlowMapping");function ci(t,n,i,o){var r="",a=t.tag,e=Object.keys(i),l,s,u,d,p,m;if(t.sortKeys===!0)e.sort();else if(typeof t.sortKeys=="function")e.sort(t.sortKeys);else if(t.sortKeys)throw new S("sortKeys must be a boolean or a function");for(l=0,s=e.length;l<s;l+=1)m="",(!o||r!=="")&&(m+=X(t,n)),u=e[l],d=i[u],t.replacer&&(d=t.replacer.call(i,u,d)),j(t,n+1,u,!0,!0,!0)&&(p=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,p&&(t.dump&&R===t.dump.charCodeAt(0)?m+="?":m+="? "),m+=t.dump,p&&(m+=X(t,n)),j(t,n+1,d,!0,p)&&(t.dump&&R===t.dump.charCodeAt(0)?m+=":":m+=": ",m+=t.dump,r+=m));t.tag=a,t.dump=r||"{}"}c(ci,"writeBlockMapping");function xt(t,n,i){var o,r=i?t.explicitTypes:t.implicitTypes,a,e,l,s;for(a=0,e=r.length;a<e;a+=1)if(l=r[a],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof n=="object"&&n instanceof l.instanceOf)&&(!l.predicate||l.predicate(n))){if(i?l.multi&&l.representName?t.tag=l.representName(n):t.tag=l.tag:t.tag="?",l.represent){if(s=t.styleMap[l.tag]||l.defaultStyle,Un.call(l.represent)==="[object Function]")o=l.represent(n,s);else if(Pn.call(l.represent,s))o=l.represent[s](n,s);else throw new S("!<"+l.tag+'> tag resolver accepts not "'+s+'" style');t.dump=o}return!0}return!1}c(xt,"detectType");function j(t,n,i,o,r,a,e){t.tag=null,t.dump=i,xt(t,i,!1)||xt(t,i,!0);var l=Un.call(t.dump),s=o,u;o&&(o=t.flowLevel<0||t.flowLevel>n);var d=l==="[object Object]"||l==="[object Array]",p,m;if(d&&(p=t.duplicates.indexOf(i),m=p!==-1),(t.tag!==null&&t.tag!=="?"||m||t.indent!==2&&n>0)&&(r=!1),m&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(d&&m&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),l==="[object Object]")o&&Object.keys(t.dump).length!==0?(ci(t,n,t.dump,r),m&&(t.dump="&ref_"+p+t.dump)):(li(t,n,t.dump),m&&(t.dump="&ref_"+p+" "+t.dump));else if(l==="[object Array]")o&&t.dump.length!==0?(t.noArrayIndent&&!e&&n>0?wt(t,n-1,t.dump,r):wt(t,n,t.dump,r),m&&(t.dump="&ref_"+p+t.dump)):(ai(t,n,t.dump),m&&(t.dump="&ref_"+p+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&ri(t,t.dump,n,a,s);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new S("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),u=t.tag[0]==="!"?"!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?"!!"+u.slice(18):"!<"+u+">",t.dump=u+" "+t.dump)}return!0}c(j,"writeNode");function si(t,n){var i=[],o=[],r,a;for(tt(t,i,o),r=0,a=o.length;r<a;r+=1)n.duplicates.push(i[o[r]]);n.usedDuplicates=Array(a)}c(si,"getDuplicateReferences");function tt(t,n,i){var o,r,a;if(typeof t=="object"&&t)if(r=n.indexOf(t),r!==-1)i.indexOf(r)===-1&&i.push(r);else if(n.push(t),Array.isArray(t))for(r=0,a=t.length;r<a;r+=1)tt(t[r],n,i);else for(o=Object.keys(t),r=0,a=o.length;r<a;r+=1)tt(t[o[r]],n,i)}c(tt,"inspectNode");function ui(t,n){n||(n={});var i=new Gn(n);i.noRefs||si(t,i);var o=t;return i.replacer&&(o=i.replacer.call({"":o},"",o)),j(i,0,o,!0,!0)?i.dump+`
`:""}c(ui,"dump$1");var nr={dump:ui};function ir(t,n){return function(){throw Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}c(ir,"renamed");var rr=Gt,or=Bn.load;Bn.loadAll,nr.dump;export{or as n,rr as t};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-6UL2VRFP-gcBtYL2X.js","./dist-C04_12Dz.js","./chunk-LvLJmgfZ.js","./chunk-JA3XYJ7Z-CaauVIYw.js","./src-BKLwm2RN.js","./src-Cf4NnJCp.js","./timer-ffBO1paY.js","./chunk-S3R3BYOJ-DgPGJLrA.js","./step-COhf-b0R.js","./math-BIeW4iGV.js","./chunk-ABZYJK2D-t8l6Viza.js","./preload-helper-DItdS47A.js","./purify.es-DNVQZNFu.js","./merge-BBX6ug-N.js","./_Uint8Array-BGESiCQL.js","./_baseFor-Duhs3RiJ.js","./memoize-BCOZVFBt.js","./dagre-DFula7I5.js","./graphlib-B4SLw_H3.js","./_baseIsEqual-B9N9Mw_N.js","./reduce-CaioMeUx.js","./_arrayReduce-TT0iOGKY.js","./_baseEach-BhAgFun2.js","./get-6uJrSKbw.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./hasIn-CycJImp8.js","./_baseProperty-NKyJO2oh.js","./_baseUniq-BP3iN0f3.js","./_baseFlatten-CUZNxU8H.js","./isEmpty-CgX_-6Mt.js","./min-Ci3LzCQg.js","./_baseMap-D3aN2j3O.js","./sortBy-CGfmqUg5.js","./pick-B_6Qi5aM.js","./_baseSet-5Rdwpmr3.js","./flatten-D-7VEN0q.js","./range-D2UKkEg-.js","./toInteger-CDcO32Gx.js","./now-6sUe0ZdD.js","./_hasUnicode-CWqKLxBC.js","./isString-DtNk7ov1.js","./clone-bEECh4rs.js","./chunk-ATLVNIR6-VxibvAOV.js","./chunk-CVBHYZKI-CsebuiSO.js","./chunk-HN2XXSSU-Bw_9WyjM.js","./chunk-JZLCHNYA-cYgsW1_e.js","./chunk-QXUST7PY-CUUVFKsm.js","./line-BCZzhM6G.js","./path-BMloFSsK.js","./array-BF0shS9G.js","./cose-bilkent-S5V4N54A-BJlSv6jX.js","./cytoscape.esm-DRpjbKu_.js"])))=>i.map(i=>d[i]);
import{t as n}from"./preload-helper-DItdS47A.js";import{d as _}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as e,r as s}from"./src-BKLwm2RN.js";import{s as d,y as u,__tla as h}from"./chunk-ABZYJK2D-t8l6Viza.js";import{a as y,i as f,s as p}from"./chunk-JZLCHNYA-cYgsW1_e.js";import{a as c,i as L,n as w,r as E}from"./chunk-QXUST7PY-CUUVFKsm.js";let o,m,g,b=Promise.all([(()=>{try{return h}catch{}})()]).then(async()=>{let i,t;i={common:d,getConfig:u,insertCluster:f,insertEdge:w,insertEdgeLabel:E,insertMarkers:L,insertNode:y,interpolateToCurve:_,labelHelper:p,log:s,positionEdgeLabel:c},t={},o=e(r=>{for(let a of r)t[a.name]=a},"registerLayoutLoaders"),e(()=>{o([{name:"dagre",loader:e(async()=>await n(()=>import("./dagre-6UL2VRFP-gcBtYL2X.js").then(async r=>(await r.__tla,r)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,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]),import.meta.url),"loader")},{name:"cose-bilkent",loader:e(async()=>await n(()=>import("./cose-bilkent-S5V4N54A-BJlSv6jX.js").then(async r=>(await r.__tla,r)),__vite__mapDeps([51,52,4,2,5,6]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders")(),m=e(async(r,a)=>{if(!(r.layoutAlgorithm in t))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);let l=t[r.layoutAlgorithm];return(await l.loader()).render(r,a,i,{algorithm:l.algorithm})},"render"),g=e((r="",{fallback:a="dagre"}={})=>{if(r in t)return r;if(a in t)return s.warn(`Layout algorithm ${r} is not registered. Using ${a} as fallback.`),a;throw Error(`Both layout algorithms ${r} and ${a} are not registered.`)},"getRegisteredLayoutAlgorithm")});export{b as __tla,o as n,m as r,g as t};
var t,a;import{f as s,g as o,h as l,m as n,n as h,p as C,r as m,s as d,t as p}from"./chunk-FPAJGGOC-DOBSZjU2.js";var f=(t=class extends p{constructor(){super(["architecture"])}},s(t,"ArchitectureTokenBuilder"),t),v=(a=class extends h{runCustomConverter(e,r,A){if(e.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return r.replace(/[[\]]/g,"").trim()}},s(a,"ArchitectureValueConverter"),a),c={parser:{TokenBuilder:s(()=>new f,"TokenBuilder"),ValueConverter:s(()=>new v,"ValueConverter")}};function i(u=C){let e=n(o(u),d),r=n(l({shared:e}),m,c);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}s(i,"createArchitectureServices");export{i as n,c as t};
import{n as o,r as s}from"./src-BKLwm2RN.js";import{c as w}from"./chunk-ABZYJK2D-t8l6Viza.js";var x=o((t,i,e,a)=>{t.attr("class",e);let{width:h,height:r,x:n,y:g}=c(t,i);w(t,r,h,a);let d=l(n,g,h,r,i);t.attr("viewBox",d),s.debug(`viewBox configured: ${d} with padding: ${i}`)},"setupViewPortForSVG"),c=o((t,i)=>{var a;let e=((a=t.node())==null?void 0:a.getBBox())||{width:0,height:0,x:0,y:0};return{width:e.width+i*2,height:e.height+i*2,x:e.x,y:e.y}},"calculateDimensionsWithPadding"),l=o((t,i,e,a,h)=>`${t-h} ${i-h} ${e} ${a}`,"createViewBox");export{x as t};
import{u as G}from"./src-Cf4NnJCp.js";import{_ as J,a as lt,i as dt,n as pt,o as ct,p as ht,r as ft,t as mt,u as yt,v as K}from"./step-COhf-b0R.js";import{t as gt}from"./line-BCZzhM6G.js";import{g as S,v as kt,y as ut}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as f,r as m}from"./src-BKLwm2RN.js";import{b as O,h as xt}from"./chunk-ABZYJK2D-t8l6Viza.js";import{n as R,r as v,t as bt}from"./chunk-HN2XXSSU-Bw_9WyjM.js";import{t as wt}from"./chunk-CVBHYZKI-CsebuiSO.js";import{i as Mt,n as Lt}from"./chunk-ATLVNIR6-VxibvAOV.js";import{n as _t}from"./chunk-JA3XYJ7Z-CaauVIYw.js";import{d as $t,r as A}from"./chunk-JZLCHNYA-cYgsW1_e.js";var St=f((r,t,a,s,n,i)=>{t.arrowTypeStart&&tt(r,"start",t.arrowTypeStart,a,s,n,i),t.arrowTypeEnd&&tt(r,"end",t.arrowTypeEnd,a,s,n,i)},"addEdgeMarkers"),Ot={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},tt=f((r,t,a,s,n,i,e)=>{var l;let o=Ot[a];if(!o){m.warn(`Unknown arrow type: ${a}`);return}let h=`${n}_${i}-${o.type}${t==="start"?"Start":"End"}`;if(e&&e.trim()!==""){let d=`${h}_${e.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(d)){let p=document.getElementById(h);if(p){let c=p.cloneNode(!0);c.id=d,c.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",e),o.fill&&x.setAttribute("fill",e)}),(l=p.parentNode)==null||l.appendChild(c)}}r.attr(`marker-${t}`,`url(${s}#${d})`)}else r.attr(`marker-${t}`,`url(${s}#${h})`)},"addEdgeMarker"),U=new Map,u=new Map,Et=f(()=>{U.clear(),u.clear()},"clear"),q=f(r=>r?r.reduce((t,a)=>t+";"+a,""):"","getLabelStyles"),Pt=f(async(r,t)=>{let a=xt(O().flowchart.htmlLabels),{labelStyles:s}=Mt(t);t.labelStyle=s;let n=await _t(r,t.label,{style:t.labelStyle,useHtmlLabels:a,addSvgBackground:!0,isNode:!1});m.info("abc82",t,t.labelType);let i=r.insert("g").attr("class","edgeLabel"),e=i.insert("g").attr("class","label").attr("data-id",t.id);e.node().appendChild(n);let o=n.getBBox();if(a){let l=n.children[0],d=G(n);o=l.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}e.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),U.set(t.id,i),t.width=o.width,t.height=o.height;let h;if(t.startLabelLeft){let l=await A(t.startLabelLeft,q(t.labelStyle)),d=r.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner");h=p.node().appendChild(l);let c=l.getBBox();p.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),u.get(t.id)||u.set(t.id,{}),u.get(t.id).startLeft=d,T(h,t.startLabelLeft)}if(t.startLabelRight){let l=await A(t.startLabelRight,q(t.labelStyle)),d=r.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner");h=d.node().appendChild(l),p.node().appendChild(l);let c=l.getBBox();p.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),u.get(t.id)||u.set(t.id,{}),u.get(t.id).startRight=d,T(h,t.startLabelRight)}if(t.endLabelLeft){let l=await A(t.endLabelLeft,q(t.labelStyle)),d=r.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner");h=p.node().appendChild(l);let c=l.getBBox();p.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),d.node().appendChild(l),u.get(t.id)||u.set(t.id,{}),u.get(t.id).endLeft=d,T(h,t.endLabelLeft)}if(t.endLabelRight){let l=await A(t.endLabelRight,q(t.labelStyle)),d=r.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner");h=p.node().appendChild(l);let c=l.getBBox();p.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),d.node().appendChild(l),u.get(t.id)||u.set(t.id,{}),u.get(t.id).endRight=d,T(h,t.endLabelRight)}return n},"insertEdgeLabel");function T(r,t){O().flowchart.htmlLabels&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}f(T,"setTerminalWidth");var Tt=f((r,t)=>{m.debug("Moving label abc88 ",r.id,r.label,U.get(r.id),t);let a=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:s}=wt(O());if(r.label){let n=U.get(r.id),i=r.x,e=r.y;if(a){let o=S.calcLabelPosition(a);m.debug("Moving label "+r.label+" from (",i,",",e,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(i=o.x,e=o.y)}n.attr("transform",`translate(${i}, ${e+s/2})`)}if(r.startLabelLeft){let n=u.get(r.id).startLeft,i=r.x,e=r.y;if(a){let o=S.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",a);i=o.x,e=o.y}n.attr("transform",`translate(${i}, ${e})`)}if(r.startLabelRight){let n=u.get(r.id).startRight,i=r.x,e=r.y;if(a){let o=S.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",a);i=o.x,e=o.y}n.attr("transform",`translate(${i}, ${e})`)}if(r.endLabelLeft){let n=u.get(r.id).endLeft,i=r.x,e=r.y;if(a){let o=S.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",a);i=o.x,e=o.y}n.attr("transform",`translate(${i}, ${e})`)}if(r.endLabelRight){let n=u.get(r.id).endRight,i=r.x,e=r.y;if(a){let o=S.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",a);i=o.x,e=o.y}n.attr("transform",`translate(${i}, ${e})`)}},"positionEdgeLabel"),Xt=f((r,t)=>{let a=r.x,s=r.y,n=Math.abs(t.x-a),i=Math.abs(t.y-s),e=r.width/2,o=r.height/2;return n>=e||i>=o},"outsideNode"),Yt=f((r,t,a)=>{m.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(a)}
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let s=r.x,n=r.y,i=Math.abs(s-a.x),e=r.width/2,o=a.x<t.x?e-i:e+i,h=r.height/2,l=Math.abs(t.y-a.y),d=Math.abs(t.x-a.x);if(Math.abs(n-t.y)*e>Math.abs(s-t.x)*h){let p=a.y<t.y?t.y-h-n:n-h-t.y;o=d*p/l;let c={x:a.x<t.x?a.x+o:a.x-d+o,y:a.y<t.y?a.y+l-p:a.y-l+p};return o===0&&(c.x=t.x,c.y=t.y),d===0&&(c.x=t.x),l===0&&(c.y=t.y),m.debug(`abc89 top/bottom calc, Q ${l}, q ${p}, R ${d}, r ${o}`,c),c}else{o=a.x<t.x?t.x-e-s:s-e-t.x;let p=l*o/d,c=a.x<t.x?a.x+d-o:a.x-d+o,x=a.y<t.y?a.y+p:a.y-p;return m.debug(`sides calc abc89, Q ${l}, q ${p}, R ${d}, r ${o}`,{_x:c,_y:x}),o===0&&(c=t.x,x=t.y),d===0&&(c=t.x),l===0&&(x=t.y),{x:c,y:x}}},"intersection"),rt=f((r,t)=>{m.warn("abc88 cutPathAtIntersect",r,t);let a=[],s=r[0],n=!1;return r.forEach(i=>{if(m.info("abc88 checking point",i,t),!Xt(t,i)&&!n){let e=Yt(t,s,i);m.debug("abc88 inside",i,s,e),m.debug("abc88 intersection",e,t);let o=!1;a.forEach(h=>{o||(o=h.x===e.x&&h.y===e.y)}),a.some(h=>h.x===e.x&&h.y===e.y)?m.warn("abc88 no intersect",e,a):a.push(e),n=!0}else m.warn("abc88 outside",i,s),s=i,n||a.push(i)}),m.debug("returning points",a),a},"cutPathAtIntersect");function at(r){let t=[],a=[];for(let s=1;s<r.length-1;s++){let n=r[s-1],i=r[s],e=r[s+1];(n.x===i.x&&i.y===e.y&&Math.abs(i.x-e.x)>5&&Math.abs(i.y-n.y)>5||n.y===i.y&&i.x===e.x&&Math.abs(i.x-n.x)>5&&Math.abs(i.y-e.y)>5)&&(t.push(i),a.push(s))}return{cornerPoints:t,cornerPointPositions:a}}f(at,"extractCornerPoints");var et=f(function(r,t,a){let s=t.x-r.x,n=t.y-r.y,i=a/Math.sqrt(s*s+n*n);return{x:t.x-i*s,y:t.y-i*n}},"findAdjacentPoint"),Wt=f(function(r){let{cornerPointPositions:t}=at(r),a=[];for(let s=0;s<r.length;s++)if(t.includes(s)){let n=r[s-1],i=r[s+1],e=r[s],o=et(n,e,5),h=et(i,e,5),l=h.x-o.x,d=h.y-o.y;a.push(o);let p=Math.sqrt(2)*2,c={x:e.x,y:e.y};Math.abs(i.x-n.x)>10&&Math.abs(i.y-n.y)>=10?(m.debug("Corner point fixing",Math.abs(i.x-n.x),Math.abs(i.y-n.y)),c=e.x===o.x?{x:l<0?o.x-5+p:o.x+5-p,y:d<0?o.y-p:o.y+p}:{x:l<0?o.x-p:o.x+p,y:d<0?o.y-5+p:o.y+5-p}):m.debug("Corner point skipping fixing",Math.abs(i.x-n.x),Math.abs(i.y-n.y)),a.push(c,h)}else a.push(r[s]);return a},"fixCorners"),Ht=f((r,t,a)=>{let s=r-t-a,n=Math.floor(s/4);return`0 ${t} ${Array(n).fill("2 2").join(" ")} ${a}`},"generateDashArray"),Ct=f(function(r,t,a,s,n,i,e,o=!1){var V;let{handDrawnSeed:h}=O(),l=t.points,d=!1,p=n;var c=i;let x=[];for(let k in t.cssCompiledStyles)Lt(k)||x.push(t.cssCompiledStyles[k]);m.debug("UIO intersect check",t.points,c.x,p.x),c.intersect&&p.intersect&&!o&&(l=l.slice(1,t.points.length-1),l.unshift(p.intersect(l[0])),m.debug("Last point UIO",t.start,"-->",t.end,l[l.length-1],c,c.intersect(l[l.length-1])),l.push(c.intersect(l[l.length-1])));let _=btoa(JSON.stringify(l));t.toCluster&&(m.info("to cluster abc88",a.get(t.toCluster)),l=rt(t.points,a.get(t.toCluster).node),d=!0),t.fromCluster&&(m.debug("from cluster abc88",a.get(t.fromCluster),JSON.stringify(l,null,2)),l=rt(l.reverse(),a.get(t.fromCluster).node).reverse(),d=!0);let w=l.filter(k=>!Number.isNaN(k.y));w=Wt(w);let y=J;switch(y=K,t.curve){case"linear":y=K;break;case"basis":y=J;break;case"cardinal":y=ht;break;case"bumpX":y=kt;break;case"bumpY":y=ut;break;case"catmullRom":y=yt;break;case"monotoneX":y=lt;break;case"monotoneY":y=ct;break;case"natural":y=dt;break;case"step":y=ft;break;case"stepAfter":y=mt;break;case"stepBefore":y=pt;break;default:y=J}let{x:X,y:Y}=bt(t),N=gt().x(X).y(Y).curve(y),b;switch(t.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(t.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let g,L=t.curve==="rounded"?it(nt(w,t),5):N(w),M=Array.isArray(t.style)?t.style:[t.style],W=M.find(k=>k==null?void 0:k.startsWith("stroke:")),H=!1;if(t.look==="handDrawn"){let k=$t.svg(r);Object.assign([],w);let C=k.path(L,{roughness:.3,seed:h});b+=" transition",g=G(C).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",M?M.reduce((B,z)=>B+";"+z,""):"");let E=g.attr("d");g.attr("d",E),r.node().appendChild(g.node())}else{let k=x.join(";"),C=M?M.reduce((P,j)=>P+j+";",""):"",E="";t.animate&&(E=" edge-animation-fast"),t.animation&&(E=" edge-animation-"+t.animation);let B=(k?k+";"+C+";":C)+";"+(M?M.reduce((P,j)=>P+";"+j,""):"");g=r.append("path").attr("d",L).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(E??"")).attr("style",B),W=(V=B.match(/stroke:([^;]+)/))==null?void 0:V[1],H=t.animate===!0||!!t.animation||k.includes("animation");let z=g.node(),F=typeof z.getTotalLength=="function"?z.getTotalLength():0,Z=v[t.arrowTypeStart]||0,I=v[t.arrowTypeEnd]||0;if(t.look==="neo"&&!H){let P=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Ht(F,Z,I):`0 ${Z} ${F-Z-I} ${I}`}; stroke-dashoffset: 0;`;g.attr("style",P+g.attr("style"))}}g.attr("data-edge",!0),g.attr("data-et","edge"),g.attr("data-id",t.id),g.attr("data-points",_),t.showPoints&&w.forEach(k=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",k.x).attr("cy",k.y)});let $="";(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&($=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,$=$.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),m.info("arrowTypeStart",t.arrowTypeStart),m.info("arrowTypeEnd",t.arrowTypeEnd),St(g,t,$,e,s,W);let st=Math.floor(l.length/2),ot=l[st];S.isLabelCoordinateInPath(ot,g.attr("d"))||(d=!0);let Q={};return d&&(Q.updatedPath=l),Q.originalPath=t.points,Q},"insertEdge");function it(r,t){if(r.length<2)return"";let a="",s=r.length,n=1e-5;for(let i=0;i<s;i++){let e=r[i],o=r[i-1],h=r[i+1];if(i===0)a+=`M${e.x},${e.y}`;else if(i===s-1)a+=`L${e.x},${e.y}`;else{let l=e.x-o.x,d=e.y-o.y,p=h.x-e.x,c=h.y-e.y,x=Math.hypot(l,d),_=Math.hypot(p,c);if(x<n||_<n){a+=`L${e.x},${e.y}`;continue}let w=l/x,y=d/x,X=p/_,Y=c/_,N=w*X+y*Y,b=Math.max(-1,Math.min(1,N)),g=Math.acos(b);if(g<n||Math.abs(Math.PI-g)<n){a+=`L${e.x},${e.y}`;continue}let L=Math.min(t/Math.sin(g/2),x/2,_/2),M=e.x-w*L,W=e.y-y*L,H=e.x+X*L,$=e.y+Y*L;a+=`L${M},${W}`,a+=`Q${e.x},${e.y} ${H},${$}`}}return a}f(it,"generateRoundedPath");function D(r,t){if(!r||!t)return{angle:0,deltaX:0,deltaY:0};let a=t.x-r.x,s=t.y-r.y;return{angle:Math.atan2(s,a),deltaX:a,deltaY:s}}f(D,"calculateDeltaAndAngle");function nt(r,t){let a=r.map(n=>({...n}));if(r.length>=2&&R[t.arrowTypeStart]){let n=R[t.arrowTypeStart],i=r[0],e=r[1],{angle:o}=D(i,e),h=n*Math.cos(o),l=n*Math.sin(o);a[0].x=i.x+h,a[0].y=i.y+l}let s=r.length;if(s>=2&&R[t.arrowTypeEnd]){let n=R[t.arrowTypeEnd],i=r[s-1],e=r[s-2],{angle:o}=D(e,i),h=n*Math.cos(o),l=n*Math.sin(o);a[s-1].x=i.x-h,a[s-1].y=i.y-l}return a}f(nt,"applyMarkerOffsetsToPoints");var Bt=f((r,t,a,s)=>{t.forEach(n=>{zt[n](r,a,s)})},"insertMarkers"),zt={extension:f((r,t,a)=>{m.trace("Making markers for ",a),r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),composition:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),aggregation:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),dependency:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),lollipop:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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),r.append("defs").append("marker").attr("id",a+"_"+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"),point:f((r,t,a)=>{r.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).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"),r.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).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"),circle:f((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),cross:f((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),barb:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:f((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let n=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:f((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let n=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:f((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
L20,10
M20,10
L0,20`)},"requirement_arrow"),requirement_contains:f((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},Rt=Bt;export{Tt as a,Rt as i,Ct as n,Pt as r,Et as t};
var t;import{n as s}from"./src-BKLwm2RN.js";var r=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{r as t};
var g;import{t as V}from"./merge-BBX6ug-N.js";import{t as $}from"./memoize-BCOZVFBt.js";import{u as Z}from"./src-Cf4NnJCp.js";import{_ as tt,a as et,c as rt,d as it,f as nt,g as at,h as ot,i as st,l as lt,m as ct,n as ht,o as ut,p as ft,r as dt,s as gt,t as xt,u as pt,v as yt}from"./step-COhf-b0R.js";import{n as s,r as y}from"./src-BKLwm2RN.js";import{F as mt,f as vt,m as v,r as A,s as M}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as _t}from"./dist-C04_12Dz.js";var E=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function N(e){return new E(e,!0)}function P(e){return new E(e,!1)}var $t=_t(),Mt="\u200B",bt={curveBasis:tt,curveBasisClosed:at,curveBasisOpen:ot,curveBumpX:N,curveBumpY:P,curveBundle:ct,curveCardinalClosed:nt,curveCardinalOpen:it,curveCardinal:ft,curveCatmullRomClosed:lt,curveCatmullRomOpen:rt,curveCatmullRom:pt,curveLinear:yt,curveLinearClosed:gt,curveMonotoneX:et,curveMonotoneY:ut,curveNatural:st,curveStep:dt,curveStepAfter:xt,curveStepBefore:ht},wt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,St=s(function(e,t){let r=D(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let o=r.map(l=>l.args);mt(o),i=A(i,[...o])}else i=r.args;if(!i)return;let a=vt(e,t),n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),D=s(function(e,t=null){var r,i;try{let a=RegExp(`[%]{2}(?![{]${wt.source})(?=[}][%]{2}).*
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),y.debug(`Detecting diagram directive${t===null?"":" type:"+t} based on the text:${e}`);let n,o=[];for(;(n=v.exec(e))!==null;)if(n.index===v.lastIndex&&v.lastIndex++,n&&!t||t&&((r=n[1])==null?void 0:r.match(t))||t&&((i=n[2])==null?void 0:i.match(t))){let l=n[1]?n[1]:n[2],c=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:l,args:c})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return y.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Ct=s(function(e){return e.replace(v,"")},"removeDirectives"),It=s(function(e,t){for(let[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function b(e,t){return e?bt[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}s(b,"interpolateToCurve");function H(e,t){let r=e.trim();if(r)return t.securityLevel==="loose"?r:(0,$t.sanitizeUrl)(r)}s(H,"formatUrl");var Tt=s((e,...t)=>{let r=e.split("."),i=r.length-1,a=r[i],n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n){y.error(`Function name: ${e} not found in window`);return}n[a](...t)},"runFunc");function w(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}s(w,"distance");function L(e){let t,r=0;return e.forEach(i=>{r+=w(i,t),t=i}),S(e,r/2)}s(L,"traverseEdge");function R(e){return e.length===1?e[0]:L(e)}s(R,"calcLabelPosition");var O=s((e,t=2)=>{let r=10**t;return Math.round(e*r)/r},"roundNumber"),S=s((e,t)=>{let r,i=t;for(let a of e){if(r){let n=w(a,r);if(n===0)return r;if(n<i)i-=n;else{let o=i/n;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:O((1-o)*r.x+o*a.x,5),y:O((1-o)*r.y+o*a.y,5)}}}r=a}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Bt=s((e,t,r)=>{y.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=S(t,25),a=e?10:5,n=Math.atan2(t[0].y-i.y,t[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+i.x)/2,o.y=-Math.cos(n)*a+(t[0].y+i.y)/2,o},"calcCardinalityPosition");function j(e,t,r){let i=structuredClone(r);y.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();let a=S(i,25+e),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2),l}s(j,"calcTerminalLabelPosition");function C(e){let t="",r="";for(let i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}s(C,"getStylesFromArray");var k=0,U=s(()=>(k++,"id-"+Math.random().toString(36).substr(2,12)+"-"+k),"generateId");function G(e){let t="";for(let r=0;r<e;r++)t+="0123456789abcdef".charAt(Math.floor(Math.random()*16));return t}s(G,"makeRandomHex");var J=s(e=>G(e.length),"random"),Wt=s(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Ft=s(function(e,t){let r=t.text.replace(M.lineBreakRegex," "),[,i]=_(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);let n=a.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.attr("fill",t.fill),n.text(r),a},"drawSimpleText"),X=$((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),M.lineBreakRegex.test(e)))return e;let i=e.split(" ").filter(Boolean),a=[],n="";return i.forEach((o,l)=>{let c=d(`${o} `,r),h=d(n,r);if(c>t){let{hyphenatedStrings:u,remainingWord:x}=zt(o,t,"-",r);a.push(n,...u),n=x}else h+c>=t?(a.push(n),n=o):n=[n,o].filter(Boolean).join(" ");l+1===i.length&&a.push(n)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),zt=$((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let a=[...e],n=[],o="";return a.forEach((l,c)=>{let h=`${o}${l}`;if(d(h,i)>=t){let u=c+1,x=a.length===u,p=`${h}${r}`;n.push(x?h:p),o=""}else o=h}),{hyphenatedStrings:n,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function I(e,t){return T(e,t).height}s(I,"calculateTextHeight");function d(e,t){return T(e,t).width}s(d,"calculateTextWidth");var T=$((e,t)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,n]=_(r),o=["sans-serif",i],l=e.split(M.lineBreakRegex),c=[],h=Z("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let u=h.append("svg");for(let x of o){let p=0,f={width:0,height:0,lineHeight:0};for(let Q of l){let F=Wt();F.text=Q||"\u200B";let z=Ft(u,F).style("font-size",n).style("font-weight",a).style("font-family",x),m=(z._groups||z)[0][0].getBBox();if(m.width===0&&m.height===0)throw Error("svg element not in render tree");f.width=Math.round(Math.max(f.width,m.width)),p=Math.round(m.height),f.height+=p,f.lineHeight=Math.round(Math.max(f.lineHeight,p))}c.push(f)}return u.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),At=(g=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},s(g,"InitIDGenerator"),g),B,Et=s(function(e){return B||(B=document.createElement("div")),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),B.innerHTML=e,unescape(B.textContent)},"entityDecode");function Y(e){return"str"in e}s(Y,"isDetailedError");var Nt=s((e,t,r,i)=>{var n;if(!i)return;let a=(n=e.node())==null?void 0:n.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),_=s(e=>{if(typeof e=="number")return[e,e+"px"];let t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function W(e,t){return V({},e,t)}s(W,"cleanAndMerge");var Pt={assignWithDepth:A,wrapLabel:X,calculateTextHeight:I,calculateTextWidth:d,calculateTextDimensions:T,cleanAndMerge:W,detectInit:St,detectDirective:D,isSubstringInArray:It,interpolateToCurve:b,calcLabelPosition:R,calcCardinalityPosition:Bt,calcTerminalLabelPosition:j,formatUrl:H,getStylesFromArray:C,generateId:U,random:J,runFunc:Tt,entityDecode:Et,insertTitle:Nt,isLabelCoordinateInPath:K,parseFontSize:_,InitIDGenerator:At},Dt=s(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){let i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),Ht=s(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Lt=s((e,t,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function q(e){return e??null}s(q,"handleUndefinedAttr");function K(e,t){let r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,n=>Math.round(parseFloat(n)).toString());return a.includes(r.toString())||a.includes(i.toString())}s(K,"isLabelCoordinateInPath");export{X as _,Ht as a,Lt as c,b as d,Y as f,Pt as g,Ct as h,W as i,C as l,J as m,I as n,Dt as o,_ as p,d as r,U as s,Mt as t,q as u,N as v,P as y};
var e;import{a as c,f as r,g as u,h as p,i as h,m as t,p as l,s as d,t as G}from"./chunk-FPAJGGOC-DOBSZjU2.js";var v=(e=class extends G{constructor(){super(["gitGraph"])}},r(e,"GitGraphTokenBuilder"),e),i={parser:{TokenBuilder:r(()=>new v,"TokenBuilder"),ValueConverter:r(()=>new h,"ValueConverter")}};function n(o=l){let a=t(u(o),d),s=t(p({shared:a}),c,i);return a.ServiceRegistry.register(s),{shared:a,GitGraph:s}}r(n,"createGitGraphServices");export{n,i as t};
var e,r;import{f as t,g as c,h as l,l as d,m as n,n as p,p as v,s as h,t as m}from"./chunk-FPAJGGOC-DOBSZjU2.js";var C=(e=class extends m{constructor(){super(["pie","showData"])}},t(e,"PieTokenBuilder"),e),f=(r=class extends p{runCustomConverter(s,a,P){if(s.name==="PIE_SECTION_LABEL")return a.replace(/"/g,"").trim()}},t(r,"PieValueConverter"),r),i={parser:{TokenBuilder:t(()=>new C,"TokenBuilder"),ValueConverter:t(()=>new f,"ValueConverter")}};function o(u=v){let s=n(c(u),h),a=n(l({shared:s}),d,i);return s.ServiceRegistry.register(a),{shared:s,Pie:a}}t(o,"createPieServices");export{o as n,i as t};
import{n as l}from"./src-BKLwm2RN.js";import{k as n}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as d}from"./dist-C04_12Dz.js";var x=d(),o=l((s,t)=>{let a=s.append("rect");if(a.attr("x",t.x),a.attr("y",t.y),a.attr("fill",t.fill),a.attr("stroke",t.stroke),a.attr("width",t.width),a.attr("height",t.height),t.name&&a.attr("name",t.name),t.rx&&a.attr("rx",t.rx),t.ry&&a.attr("ry",t.ry),t.attrs!==void 0)for(let r in t.attrs)a.attr(r,t.attrs[r]);return t.class&&a.attr("class",t.class),a},"drawRect"),h=l((s,t)=>{o(s,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=l((s,t)=>{let a=t.text.replace(n," "),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);let e=r.append("tspan");return e.attr("x",t.x+t.textMargin*2),e.text(a),r},"drawText"),p=l((s,t,a,r)=>{let e=s.append("image");e.attr("x",t),e.attr("y",a);let i=(0,x.sanitizeUrl)(r);e.attr("xlink:href",i)},"drawImage"),y=l((s,t,a,r)=>{let e=s.append("use");e.attr("x",t),e.attr("y",a);let i=(0,x.sanitizeUrl)(r);e.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),g=l(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),m=l(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{c as a,o as i,y as n,g as o,p as r,m as s,h as t};
var s={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}};export{s as t};
import{t as c}from"./createLucideIcon-CnW3RofX.js";var e=c("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);export{e as t};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var r=a("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);export{r as t};
import{t as e}from"./createLucideIcon-CnW3RofX.js";var c=e("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);export{c as t};
import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as t}from"./src-BKLwm2RN.js";import"./chunk-ABZYJK2D-t8l6Viza.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import"./chunk-N4CR4FBY-eo9CRI73.js";import"./chunk-FMBD7UC4-Cn7KHL11.js";import"./chunk-55IACEB6-SrR0J56d.js";import"./chunk-QN33PNHL-C_hHv997.js";import{i,n as o,r as m,t as p}from"./chunk-B4BG7PRW-Dm0tRCOk.js";var a={parser:o,get db(){return new p},renderer:m,styles:i,init:t(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{a as diagram};
import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as t}from"./src-BKLwm2RN.js";import"./chunk-ABZYJK2D-t8l6Viza.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import"./chunk-N4CR4FBY-eo9CRI73.js";import"./chunk-FMBD7UC4-Cn7KHL11.js";import"./chunk-55IACEB6-SrR0J56d.js";import"./chunk-QN33PNHL-C_hHv997.js";import{i,n as o,r as m,t as p}from"./chunk-B4BG7PRW-Dm0tRCOk.js";var a={parser:o,get db(){return new p},renderer:m,styles:i,init:t(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{a as diagram};
import{s as n}from"./chunk-LvLJmgfZ.js";import{t as c}from"./compiler-runtime-DeeZ7FnK.js";import{t as e}from"./jsx-runtime-ZmTK25f3.js";import{t as l}from"./cn-BKtXLv3a.js";var m=c(),i=n(e(),1);const d=a=>{let t=(0,m.c)(6),r=a.dataTestId,o;t[0]===a.className?o=t[1]:(o=l("text-xs font-semibold text-accent-foreground",a.className),t[0]=a.className,t[1]=o);let s;return t[2]!==a.dataTestId||t[3]!==a.onClick||t[4]!==o?(s=(0,i.jsx)("button",{type:"button","data-testid":r,className:o,onClick:a.onClick,children:"Clear"}),t[2]=a.dataTestId,t[3]=a.onClick,t[4]=o,t[5]=s):s=t[5],s};export{d as t};
var se=Object.defineProperty;var le=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var y=(e,t,r)=>le(e,typeof t!="symbol"?t+"":t,r);var h;import{s as A,t as l}from"./chunk-LvLJmgfZ.js";import{t as ue}from"./react-BGmjiNul.js";function D(e="This should not happen"){throw Error(e)}function de(e,t="Assertion failed"){if(!e)return D(t)}function L(e,t){return D(t??"Hell froze over")}function ce(e,t){try{return e()}catch{return t}}var M=Object.prototype.hasOwnProperty;function B(e,t){let r,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&B(e[n],t[n]););return n===-1}if(!r||typeof e=="object"){for(r in n=0,e)if(M.call(e,r)&&++n&&!M.call(t,r)||!(r in t)||!B(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}var pe=l(((e,t)=>{var r=Object.prototype.hasOwnProperty;function n(o,i){return o!=null&&r.call(o,i)}t.exports=n})),x=l(((e,t)=>{t.exports=Array.isArray})),N=l(((e,t)=>{t.exports=typeof global=="object"&&global&&global.Object===Object&&global})),F=l(((e,t)=>{var r=N(),n=typeof self=="object"&&self&&self.Object===Object&&self;t.exports=r||n||Function("return this")()})),_=l(((e,t)=>{t.exports=F().Symbol})),fe=l(((e,t)=>{var r=_(),n=Object.prototype,o=n.hasOwnProperty,i=n.toString,a=r?r.toStringTag:void 0;function s(d){var u=o.call(d,a),c=d[a];try{d[a]=void 0;var p=!0}catch{}var b=i.call(d);return p&&(u?d[a]=c:delete d[a]),b}t.exports=s})),he=l(((e,t)=>{var r=Object.prototype.toString;function n(o){return r.call(o)}t.exports=n})),w=l(((e,t)=>{var r=_(),n=fe(),o=he(),i="[object Null]",a="[object Undefined]",s=r?r.toStringTag:void 0;function d(u){return u==null?u===void 0?a:i:s&&s in Object(u)?n(u):o(u)}t.exports=d})),k=l(((e,t)=>{function r(n){return typeof n=="object"&&!!n}t.exports=r})),S=l(((e,t)=>{var r=w(),n=k(),o="[object Symbol]";function i(a){return typeof a=="symbol"||n(a)&&r(a)==o}t.exports=i})),U=l(((e,t)=>{var r=x(),n=S(),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function a(s,d){if(r(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||n(s)?!0:i.test(s)||!o.test(s)||d!=null&&s in Object(d)}t.exports=a})),z=l(((e,t)=>{function r(n){var o=typeof n;return n!=null&&(o=="object"||o=="function")}t.exports=r})),V=l(((e,t)=>{var r=w(),n=z(),o="[object AsyncFunction]",i="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function d(u){if(!n(u))return!1;var c=r(u);return c==i||c==a||c==o||c==s}t.exports=d})),ge=l(((e,t)=>{t.exports=F()["__core-js_shared__"]})),ve=l(((e,t)=>{var r=ge(),n=(function(){var i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function o(i){return!!n&&n in i}t.exports=o})),G=l(((e,t)=>{var r=Function.prototype.toString;function n(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=n})),be=l(((e,t)=>{var r=V(),n=ve(),o=z(),i=G(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,d=Function.prototype,u=Object.prototype,c=d.toString,p=u.hasOwnProperty,b=RegExp("^"+c.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(v){return!o(v)||n(v)?!1:(r(v)?b:s).test(i(v))}t.exports=g})),me=l(((e,t)=>{function r(n,o){return n==null?void 0:n[o]}t.exports=r})),R=l(((e,t)=>{var r=be(),n=me();function o(i,a){var s=n(i,a);return r(s)?s:void 0}t.exports=o})),H=l(((e,t)=>{t.exports=R()(Object,"create")})),ye=l(((e,t)=>{var r=H();function n(){this.__data__=r?r(null):{},this.size=0}t.exports=n})),xe=l(((e,t)=>{function r(n){var o=this.has(n)&&delete this.__data__[n];return this.size-=o?1:0,o}t.exports=r})),Fe=l(((e,t)=>{var r=H(),n="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;function i(a){var s=this.__data__;if(r){var d=s[a];return d===n?void 0:d}return o.call(s,a)?s[a]:void 0}t.exports=i})),_e=l(((e,t)=>{var r=H(),n=Object.prototype.hasOwnProperty;function o(i){var a=this.__data__;return r?a[i]!==void 0:n.call(a,i)}t.exports=o})),we=l(((e,t)=>{var r=H(),n="__lodash_hash_undefined__";function o(i,a){var s=this.__data__;return this.size+=this.has(i)?0:1,s[i]=r&&a===void 0?n:a,this}t.exports=o})),ke=l(((e,t)=>{var r=ye(),n=xe(),o=Fe(),i=_e(),a=we();function s(d){var u=-1,c=d==null?0:d.length;for(this.clear();++u<c;){var p=d[u];this.set(p[0],p[1])}}s.prototype.clear=r,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),Se=l(((e,t)=>{function r(){this.__data__=[],this.size=0}t.exports=r})),J=l(((e,t)=>{function r(n,o){return n===o||n!==n&&o!==o}t.exports=r})),O=l(((e,t)=>{var r=J();function n(o,i){for(var a=o.length;a--;)if(r(o[a][0],i))return a;return-1}t.exports=n})),He=l(((e,t)=>{var r=O(),n=Array.prototype.splice;function o(i){var a=this.__data__,s=r(a,i);return s<0?!1:(s==a.length-1?a.pop():n.call(a,s,1),--this.size,!0)}t.exports=o})),Oe=l(((e,t)=>{var r=O();function n(o){var i=this.__data__,a=r(i,o);return a<0?void 0:i[a][1]}t.exports=n})),Ce=l(((e,t)=>{var r=O();function n(o){return r(this.__data__,o)>-1}t.exports=n})),je=l(((e,t)=>{var r=O();function n(o,i){var a=this.__data__,s=r(a,o);return s<0?(++this.size,a.push([o,i])):a[s][1]=i,this}t.exports=n})),q=l(((e,t)=>{var r=Se(),n=He(),o=Oe(),i=Ce(),a=je();function s(d){var u=-1,c=d==null?0:d.length;for(this.clear();++u<c;){var p=d[u];this.set(p[0],p[1])}}s.prototype.clear=r,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),W=l(((e,t)=>{t.exports=R()(F(),"Map")})),Ee=l(((e,t)=>{var r=ke(),n=q(),o=W();function i(){this.size=0,this.__data__={hash:new r,map:new(o||n),string:new r}}t.exports=i})),$e=l(((e,t)=>{function r(n){var o=typeof n;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?n!=="__proto__":n===null}t.exports=r})),C=l(((e,t)=>{var r=$e();function n(o,i){var a=o.__data__;return r(i)?a[typeof i=="string"?"string":"hash"]:a.map}t.exports=n})),Be=l(((e,t)=>{var r=C();function n(o){var i=r(this,o).delete(o);return this.size-=i?1:0,i}t.exports=n})),ze=l(((e,t)=>{var r=C();function n(o){return r(this,o).get(o)}t.exports=n})),Re=l(((e,t)=>{var r=C();function n(o){return r(this,o).has(o)}t.exports=n})),Ie=l(((e,t)=>{var r=C();function n(o,i){var a=r(this,o),s=a.size;return a.set(o,i),this.size+=a.size==s?0:1,this}t.exports=n})),K=l(((e,t)=>{var r=Ee(),n=Be(),o=ze(),i=Re(),a=Ie();function s(d){var u=-1,c=d==null?0:d.length;for(this.clear();++u<c;){var p=d[u];this.set(p[0],p[1])}}s.prototype.clear=r,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),Pe=l(((e,t)=>{var r=K(),n="Expected a function";function o(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw TypeError(n);var s=function(){var d=arguments,u=a?a.apply(this,d):d[0],c=s.cache;if(c.has(u))return c.get(u);var p=i.apply(this,d);return s.cache=c.set(u,p)||c,p};return s.cache=new(o.Cache||r),s}o.Cache=r,t.exports=o})),Te=l(((e,t)=>{var r=Pe(),n=500;function o(i){var a=r(i,function(d){return s.size===n&&s.clear(),d}),s=a.cache;return a}t.exports=o})),Ae=l(((e,t)=>{var r=Te(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;t.exports=r(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(n,function(s,d,u,c){a.push(u?c.replace(o,"$1"):d||s)}),a})})),De=l(((e,t)=>{function r(n,o){for(var i=-1,a=n==null?0:n.length,s=Array(a);++i<a;)s[i]=o(n[i],i,n);return s}t.exports=r})),Le=l(((e,t)=>{var r=_(),n=De(),o=x(),i=S(),a=1/0,s=r?r.prototype:void 0,d=s?s.toString:void 0;function u(c){if(typeof c=="string")return c;if(o(c))return n(c,u)+"";if(i(c))return d?d.call(c):"";var p=c+"";return p=="0"&&1/c==-a?"-0":p}t.exports=u})),Me=l(((e,t)=>{var r=Le();function n(o){return o==null?"":r(o)}t.exports=n})),Q=l(((e,t)=>{var r=x(),n=U(),o=Ae(),i=Me();function a(s,d){return r(s)?s:n(s,d)?[s]:o(i(s))}t.exports=a})),Ne=l(((e,t)=>{var r=w(),n=k(),o="[object Arguments]";function i(a){return n(a)&&r(a)==o}t.exports=i})),X=l(((e,t)=>{var r=Ne(),n=k(),o=Object.prototype,i=o.hasOwnProperty,a=o.propertyIsEnumerable;t.exports=r((function(){return arguments})())?r:function(s){return n(s)&&i.call(s,"callee")&&!a.call(s,"callee")}})),Y=l(((e,t)=>{var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function o(i,a){var s=typeof i;return a??(a=r),!!a&&(s=="number"||s!="symbol"&&n.test(i))&&i>-1&&i%1==0&&i<a}t.exports=o})),Z=l(((e,t)=>{var r=9007199254740991;function n(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=r}t.exports=n})),ee=l(((e,t)=>{var r=S(),n=1/0;function o(i){if(typeof i=="string"||r(i))return i;var a=i+"";return a=="0"&&1/i==-n?"-0":a}t.exports=o})),te=l(((e,t)=>{var r=Q(),n=X(),o=x(),i=Y(),a=Z(),s=ee();function d(u,c,p){c=r(c,u);for(var b=-1,g=c.length,v=!1;++b<g;){var $=s(c[b]);if(!(v=u!=null&&p(u,$)))break;u=u[$]}return v||++b!=g?v:(g=u==null?0:u.length,!!g&&a(g)&&i($,g)&&(o(u)||n(u)))}t.exports=d})),Ue=A(l(((e,t)=>{var r=pe(),n=te();function o(i,a){return i!=null&&n(i,a,r)}t.exports=o}))(),1);const Ve=null,Ge=void 0;var f;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(f||(f={}));var re;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(re||(re={}));var ne;(function(e){e.Triangle="triangle",e.Dots="dots"})(ne||(ne={}));function Je(e){return"width"in e&&typeof e.width=="number"}async function qe(e){return typeof e=="object"?e:await e()}function oe(e){return!(e.kind===f.Loading||e.kind===f.Bubble||e.kind===f.RowID||e.kind===f.Protected||e.kind===f.Drilldown)}function We(e){return e.kind===j.Marker||e.kind===j.NewRow}function Ke(e){if(!oe(e)||e.kind===f.Image)return!1;if(e.kind===f.Text||e.kind===f.Number||e.kind===f.Markdown||e.kind===f.Uri||e.kind===f.Custom||e.kind===f.Boolean)return e.readonly!==!0;L(e,"A cell was passed with an invalid kind")}function Qe(e){return(0,Ue.default)(e,"editor")}function Xe(e){return!(e.readonly??!1)}var j;(function(e){e.NewRow="new-row",e.Marker="marker"})(j||(j={}));function Ye(e){if(e.length===0)return[];let t=[...e],r=[];t.sort(function(n,o){return n[0]-o[0]}),r.push([...t[0]]);for(let n of t.slice(1)){let o=r[r.length-1];o[1]<n[0]?r.push([...n]):o[1]<n[1]&&(o[1]=n[1])}return r}var Ze,et=(h=class{constructor(t){y(this,"items");this.items=t}offset(t){return t===0?this:new h(this.items.map(r=>[r[0]+t,r[1]+t]))}add(t){let r=typeof t=="number"?[t,t+1]:t;return new h(Ye([...this.items,r]))}remove(t){let r=[...this.items],n=typeof t=="number"?t:t[0],o=typeof t=="number"?t+1:t[1];for(let[i,a]of r.entries()){let[s,d]=a;if(s<=o&&n<=d){let u=[];s<n&&u.push([s,n]),o<d&&u.push([o,d]),r.splice(i,1,...u)}}return new h(r)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(t){for(let r=0;r<this.items.length;r++){let[n,o]=this.items[r];if(t>=n&&t<o)return!0}return!1}hasAll(t){for(let r=t[0];r<t[1];r++)if(!this.hasIndex(r))return!1;return!0}some(t){for(let r of this)if(t(r))return!0;return!1}equals(t){if(t===this)return!0;if(t.items.length!==this.items.length)return!1;for(let r=0;r<this.items.length;r++){let n=t.items[r],o=this.items[r];if(n[0]!==o[0]||n[1]!==o[1])return!1}return!0}toArray(){let t=[];for(let[r,n]of this.items)for(let o=r;o<n;o++)t.push(o);return t}get length(){let t=0;for(let[r,n]of this.items)t+=n-r;return t}*[Symbol.iterator](){for(let[t,r]of this.items)for(let n=t;n<r;n++)yield n}},y(h,"empty",()=>Ze??(Ze=new h([]))),y(h,"fromSingleSelection",t=>h.empty().add(t)),h),I={},m=null;function tt(){let e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function P(e){let t=e.toLowerCase().trim();if(I[t]!==void 0)return I[t];m||(m=tt()),m.style.color="#000",m.style.color=t;let r=getComputedStyle(m).color;m.style.color="#fff",m.style.color=t;let n=getComputedStyle(m).color;if(n!==r)return[0,0,0,1];let o=n.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return o.length<4&&o.push(1),o=o.map(i=>Number.isNaN(i)?0:i),I[t]=o,o}function rt(e,t){let[r,n,o]=P(e);return`rgba(${r}, ${n}, ${o}, ${t})`}var ie=new Map;function nt(e,t){let r=`${e}-${t}`,n=ie.get(r);if(n!==void 0)return n;let o=T(e,t);return ie.set(r,o),o}function T(e,t){if(t===void 0)return e;let[r,n,o,i]=P(e);if(i===1)return e;let[a,s,d,u]=P(t),c=i+u*(1-i);return`rgba(${(i*r+u*a*(1-i))/c}, ${(i*n+u*s*(1-i))/c}, ${(i*o+u*d*(1-i))/c}, ${c})`}var E=A(ue(),1);function ot(e){return{"--gdg-accent-color":e.accentColor,"--gdg-accent-fg":e.accentFg,"--gdg-accent-light":e.accentLight,"--gdg-text-dark":e.textDark,"--gdg-text-medium":e.textMedium,"--gdg-text-light":e.textLight,"--gdg-text-bubble":e.textBubble,"--gdg-bg-icon-header":e.bgIconHeader,"--gdg-fg-icon-header":e.fgIconHeader,"--gdg-text-header":e.textHeader,"--gdg-text-group-header":e.textGroupHeader??e.textHeader,"--gdg-text-header-selected":e.textHeaderSelected,"--gdg-bg-cell":e.bgCell,"--gdg-bg-cell-medium":e.bgCellMedium,"--gdg-bg-header":e.bgHeader,"--gdg-bg-header-has-focus":e.bgHeaderHasFocus,"--gdg-bg-header-hovered":e.bgHeaderHovered,"--gdg-bg-bubble":e.bgBubble,"--gdg-bg-bubble-selected":e.bgBubbleSelected,"--gdg-bg-search-result":e.bgSearchResult,"--gdg-border-color":e.borderColor,"--gdg-horizontal-border-color":e.horizontalBorderColor??e.borderColor,"--gdg-drilldown-border":e.drilldownBorder,"--gdg-link-color":e.linkColor,"--gdg-cell-horizontal-padding":`${e.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${e.cellVerticalPadding}px`,"--gdg-header-font-style":e.headerFontStyle,"--gdg-base-font-style":e.baseFontStyle,"--gdg-marker-font-style":e.markerFontStyle,"--gdg-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize,...e.resizeIndicatorColor===void 0?{}:{"--gdg-resize-indicator-color":e.resizeIndicatorColor},...e.headerBottomBorderColor===void 0?{}:{"--gdg-header-bottom-border-color":e.headerBottomBorderColor},...e.roundingRadius===void 0?{}:{"--gdg-rounding-radius":`${e.roundingRadius}px`}}}var ae={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#353fb5",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};function it(){return ae}const at=E.createContext(ae);function st(e,...t){let r={...e};for(let n of t)if(n!==void 0)for(let o in n)n.hasOwnProperty(o)&&(o==="bgCell"?r[o]=T(n[o],r[o]):r[o]=n[o]);return(r.headerFontFull===void 0||e.fontFamily!==r.fontFamily||e.headerFontStyle!==r.headerFontStyle)&&(r.headerFontFull=`${r.headerFontStyle} ${r.fontFamily}`),(r.baseFontFull===void 0||e.fontFamily!==r.fontFamily||e.baseFontStyle!==r.baseFontStyle)&&(r.baseFontFull=`${r.baseFontStyle} ${r.fontFamily}`),(r.markerFontFull===void 0||e.fontFamily!==r.fontFamily||e.markerFontStyle!==r.markerFontStyle)&&(r.markerFontFull=`${r.markerFontStyle} ${r.fontFamily}`),r}var lt=class extends E.PureComponent{constructor(){super(...arguments);y(this,"wrapperRef",E.createRef());y(this,"clickOutside",t=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(t))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(t.target)){let r=t.target;for(;r!==null;){if(r.classList.contains("click-outside-ignore"))return;r=r.parentElement}this.props.onClickOutside()}})}componentDidMount(){let t=this.props.customEventTarget??document;t.addEventListener("touchend",this.clickOutside,!0),t.addEventListener("mousedown",this.clickOutside,!0),t.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){let t=this.props.customEventTarget??document;t.removeEventListener("touchend",this.clickOutside,!0),t.removeEventListener("mousedown",this.clickOutside,!0),t.removeEventListener("contextmenu",this.clickOutside,!0)}render(){let{onClickOutside:t,isOutsideClick:r,customEventTarget:n,...o}=this.props;return E.createElement("div",{...o,ref:this.wrapperRef},this.props.children)}};export{W as A,w as B,te as C,X as D,Y as E,V as F,de as G,F as H,z as I,ce as J,L as K,U as L,J as M,R as N,Q as O,G as P,S as R,qe as S,Z as T,N as U,_ as V,x as W,oe as _,st as a,Ke as b,rt as c,et as d,f,Xe as g,j as h,ot as i,q as j,K as k,Ve as l,ne as m,at as n,T as o,re as p,B as q,it as r,nt as s,lt as t,Ge as u,We as v,ee as w,Je as x,Qe as y,k as z};
function F(e,t,n,s,c,f){this.indented=e,this.column=t,this.type=n,this.info=s,this.align=c,this.prev=f}function I(e,t,n,s){var c=e.indented;return e.context&&e.context.type=="statement"&&n!="statement"&&(c=e.context.indented),e.context=new F(c,t,n,s,null,e.context)}function x(e){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}function V(e,t,n){if(t.prevToken=="variable"||t.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||t.typeAtEndOfLine&&e.column()==e.indentation())return!0}function P(e){for(;;){if(!e||e.type=="top")return!0;if(e.type=="}"&&e.prev.info!="namespace")return!1;e=e.prev}}function m(e){var t=e.statementIndentUnit,n=e.dontAlignCalls,s=e.keywords||{},c=e.types||{},f=e.builtin||{},b=e.blockKeywords||{},_=e.defKeywords||{},v=e.atoms||{},h=e.hooks||{},ne=e.multiLineStrings,re=e.indentStatements!==!1,ae=e.indentSwitch!==!1,R=e.namespaceSeparator,ie=e.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,oe=e.numberStart||/[\d\.]/,le=e.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,A=e.isOperatorChar||/[+\-*&%=<>!?|\/]/,j=e.isIdentifierChar||/[\w\$_\xa1-\uffff]/,U=e.isReservedIdentifier||!1,p,E;function B(a,o){var l=a.next();if(h[l]){var i=h[l](a,o);if(i!==!1)return i}if(l=='"'||l=="'")return o.tokenize=se(l),o.tokenize(a,o);if(oe.test(l)){if(a.backUp(1),a.match(le))return"number";a.next()}if(ie.test(l))return p=l,null;if(l=="/"){if(a.eat("*"))return o.tokenize=$,$(a,o);if(a.eat("/"))return a.skipToEnd(),"comment"}if(A.test(l)){for(;!a.match(/^\/[\/*]/,!1)&&a.eat(A););return"operator"}if(a.eatWhile(j),R)for(;a.match(R);)a.eatWhile(j);var u=a.current();return y(s,u)?(y(b,u)&&(p="newstatement"),y(_,u)&&(E=!0),"keyword"):y(c,u)?"type":y(f,u)||U&&U(u)?(y(b,u)&&(p="newstatement"),"builtin"):y(v,u)?"atom":"variable"}function se(a){return function(o,l){for(var i=!1,u,w=!1;(u=o.next())!=null;){if(u==a&&!i){w=!0;break}i=!i&&u=="\\"}return(w||!(i||ne))&&(l.tokenize=null),"string"}}function $(a,o){for(var l=!1,i;i=a.next();){if(i=="/"&&l){o.tokenize=null;break}l=i=="*"}return"comment"}function K(a,o){e.typeFirstDefinitions&&a.eol()&&P(o.context)&&(o.typeAtEndOfLine=V(a,o,a.pos))}return{name:e.name,startState:function(a){return{tokenize:null,context:new F(-a,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(a,o){var l=o.context;if(a.sol()&&(l.align??(l.align=!1),o.indented=a.indentation(),o.startOfLine=!0),a.eatSpace())return K(a,o),null;p=E=null;var i=(o.tokenize||B)(a,o);if(i=="comment"||i=="meta")return i;if(l.align??(l.align=!0),p==";"||p==":"||p==","&&a.match(/^\s*(?:\/\/.*)?$/,!1))for(;o.context.type=="statement";)x(o);else if(p=="{")I(o,a.column(),"}");else if(p=="[")I(o,a.column(),"]");else if(p=="(")I(o,a.column(),")");else if(p=="}"){for(;l.type=="statement";)l=x(o);for(l.type=="}"&&(l=x(o));l.type=="statement";)l=x(o)}else p==l.type?x(o):re&&((l.type=="}"||l.type=="top")&&p!=";"||l.type=="statement"&&p=="newstatement")&&I(o,a.column(),"statement",a.current());if(i=="variable"&&(o.prevToken=="def"||e.typeFirstDefinitions&&V(a,o,a.start)&&P(o.context)&&a.match(/^\s*\(/,!1))&&(i="def"),h.token){var u=h.token(a,o,i);u!==void 0&&(i=u)}return i=="def"&&e.styleDefs===!1&&(i="variable"),o.startOfLine=!1,o.prevToken=E?"def":i||p,K(a,o),i},indent:function(a,o,l){if(a.tokenize!=B&&a.tokenize!=null||a.typeAtEndOfLine&&P(a.context))return null;var i=a.context,u=o&&o.charAt(0),w=u==i.type;if(i.type=="statement"&&u=="}"&&(i=i.prev),e.dontIndentStatements)for(;i.type=="statement"&&e.dontIndentStatements.test(i.info);)i=i.prev;if(h.indent){var q=h.indent(a,i,o,l.unit);if(typeof q=="number")return q}var ce=i.prev&&i.prev.info=="switch";if(e.allmanIndentation&&/[{(]/.test(u)){for(;i.type!="top"&&i.type!="}";)i=i.prev;return i.indented}return i.type=="statement"?i.indented+(u=="{"?0:t||l.unit):i.align&&(!n||i.type!=")")?i.column+(w?0:1):i.type==")"&&!w?i.indented+(t||l.unit):i.indented+(w?0:l.unit)+(!w&&ce&&!/^(?:case|default)\b/.test(o)?l.unit:0)},languageData:{indentOnInput:ae?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:Object.keys(s).concat(Object.keys(c)).concat(Object.keys(f)).concat(Object.keys(v)),...e.languageData}}}function r(e){for(var t={},n=e.split(" "),s=0;s<n.length;++s)t[n[s]]=!0;return t}function y(e,t){return typeof e=="function"?e(t):e.propertyIsEnumerable(t)}var S="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",W="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",G="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",Y="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",ue=r("int long char short double float unsigned signed void bool"),de=r("SEL instancetype id Class Protocol BOOL");function T(e){return y(ue,e)||/.+_t$/.test(e)}function Z(e){return T(e)||y(de,e)}var N="case do else for if switch while struct enum union",C="struct enum union";function g(e,t){if(!t.startOfLine)return!1;for(var n,s=null;n=e.peek();){if(n=="\\"&&e.match(/^.$/)){s=g;break}else if(n=="/"&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=s,"meta"}function z(e,t){return t.prevToken=="type"?"type":!1}function L(e){return!e||e.length<2||e[0]!="_"?!1:e[1]=="_"||e[1]!==e[1].toLowerCase()}function d(e){return e.eatWhile(/[\w\.']/),"number"}function k(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return n?(t.cpp11RawStringDelim=n[1],t.tokenize=H,H(e,t)):!1}return e.match(/^(?:u8|u|U|L)/)?e.match(/^["']/,!1)?"string":!1:(e.next(),!1)}function Q(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function X(e,t){for(var n;(n=e.next())!=null;)if(n=='"'&&!e.eat('"')){t.tokenize=null;break}return"string"}function H(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}const fe=m({name:"c",keywords:r(S),types:T,blockKeywords:r(N),defKeywords:r(C),typeFirstDefinitions:!0,atoms:r("NULL true false"),isReservedIdentifier:L,hooks:{"#":g,"*":z}}),pe=m({name:"cpp",keywords:r(S+" "+W),types:T,blockKeywords:r(N+" class try catch"),defKeywords:r(C+" class namespace"),typeFirstDefinitions:!0,atoms:r("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:L,hooks:{"#":g,"*":z,u:k,U:k,L:k,R:k,0:d,1:d,2:d,3:d,4:d,5:d,6:d,7:d,8:d,9:d,token:function(e,t,n){if(n=="variable"&&e.peek()=="("&&(t.prevToken==";"||t.prevToken==null||t.prevToken=="}")&&Q(e.current()))return"def"}},namespaceSeparator:"::"}),me=m({name:"java",keywords:r("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:r("var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:r("catch class do else finally for if switch try while"),defKeywords:r("class interface enum @interface"),typeFirstDefinitions:!0,atoms:r("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return e.match("interface",!1)?!1:(e.eatWhile(/[\w\$_]/),"meta")},'"':function(e,t){return e.match(/""$/)?(t.tokenize=J,t.tokenize(e,t)):!1}}}),he=m({name:"csharp",keywords:r("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in init interface internal is lock namespace new operator out override params private protected public readonly record ref required return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:r("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:r("catch class do else finally for foreach if struct switch try while"),defKeywords:r("class interface namespace record struct var"),typeFirstDefinitions:!0,atoms:r("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=X,X(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}});function J(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n=e.next()=="\\"&&!n}return"string"}function D(e){return function(t,n){for(var s;s=t.next();)if(s=="*"&&t.eat("/"))if(e==1){n.tokenize=null;break}else return n.tokenize=D(e-1),n.tokenize(t,n);else if(s=="/"&&t.eat("*"))return n.tokenize=D(e+1),n.tokenize(t,n);return"comment"}}const ye=m({name:"scala",keywords:r("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:r("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:r("catch class enum do else finally for forSome if match switch try while"),defKeywords:r("class enum def object package trait type val var"),atoms:r("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return e.match('""')?(t.tokenize=J,t.tokenize(e,t)):!1},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"character":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(e,t){var n=t.context;return n.type=="}"&&n.align&&e.eat(">")?(t.context=new F(n.indented,n.column,n.type,n.info,null,n.prev),"operator"):!1},"/":function(e,t){return e.eat("*")?(t.tokenize=D(1),t.tokenize(e,t)):!1}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}});function ge(e){return function(t,n){for(var s=!1,c,f=!1;!t.eol();){if(!e&&!s&&t.match('"')){f=!0;break}if(e&&t.match('"""')){f=!0;break}c=t.next(),!s&&c=="$"&&t.match("{")&&t.skipTo("}"),s=!s&&c=="\\"&&!e}return(f||!e)&&(n.tokenize=null),"string"}}const ke=m({name:"kotlin",keywords:r("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:r("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(ul?|l|f)?/i,blockKeywords:r("catch class do else finally for if where try while enum"),defKeywords:r("class val var object interface fun"),atoms:r("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return t.prevToken=="."?"variable":"operator"},'"':function(e,t){return t.tokenize=ge(e.match('""')),t.tokenize(e,t)},"/":function(e,t){return e.eat("*")?(t.tokenize=D(1),t.tokenize(e,t)):!1},indent:function(e,t,n,s){var c=n&&n.charAt(0);if((e.prevToken=="}"||e.prevToken==")")&&n=="")return e.indented;if(e.prevToken=="operator"&&n!="}"&&e.context.type!="}"||e.prevToken=="variable"&&c=="."||(e.prevToken=="}"||e.prevToken==")")&&c==".")return s*2+t.indented;if(t.align&&t.type=="}")return t.indented+(e.context.type==(n||"").charAt(0)?0:s)}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}}),be=m({name:"shader",keywords:r("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:r("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:r("for while do if else struct"),builtin:r("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:r("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":g}}),ve=m({name:"nesc",keywords:r(S+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:T,blockKeywords:r(N),atoms:r("null true false"),hooks:{"#":g}}),we=m({name:"objectivec",keywords:r(S+" "+G),types:Z,builtin:r(Y),blockKeywords:r(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:r(C+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:r("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:L,hooks:{"#":g,"*":z}}),_e=m({name:"objectivecpp",keywords:r(S+" "+G+" "+W),types:Z,builtin:r(Y),blockKeywords:r(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:r(C+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:r("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:L,hooks:{"#":g,"*":z,u:k,U:k,L:k,R:k,0:d,1:d,2:d,3:d,4:d,5:d,6:d,7:d,8:d,9:d,token:function(e,t,n){if(n=="variable"&&e.peek()=="("&&(t.prevToken==";"||t.prevToken==null||t.prevToken=="}")&&Q(e.current()))return"def"}},namespaceSeparator:"::"}),xe=m({name:"squirrel",keywords:r("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:T,blockKeywords:r("case catch class else for foreach if switch try while"),defKeywords:r("function local class"),typeFirstDefinitions:!0,atoms:r("true false null"),hooks:{"#":g}});var M=null;function ee(e){return function(t,n){for(var s=!1,c,f=!1;!t.eol();){if(!s&&t.match('"')&&(e=="single"||t.match('""'))){f=!0;break}if(!s&&t.match("``")){M=ee(e),f=!0;break}c=t.next(),s=e=="single"&&!s&&c=="\\"}return f&&(n.tokenize=null),"string"}}const Se=m({name:"ceylon",keywords:r("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:r("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:r("class dynamic function interface module object package value"),builtin:r("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:r("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=ee(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!M||!e.match("`")?!1:(t.tokenize=M,M=null,t.tokenize(e,t))},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"string.special":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},token:function(e,t,n){if((n=="variable"||n=="type")&&t.prevToken==".")return"variableName.special"}},languageData:{closeBrackets:{brackets:["(","[","{","'",'"','"""']}}});function Te(e){(e.interpolationStack||(e.interpolationStack=[])).push(e.tokenize)}function te(e){return(e.interpolationStack||(e.interpolationStack=[])).pop()}function Ne(e){return e.interpolationStack?e.interpolationStack.length:0}function O(e,t,n,s){var c=!1;if(t.eat(e))if(t.eat(e))c=!0;else return"string";function f(b,_){for(var v=!1;!b.eol();){if(!s&&!v&&b.peek()=="$")return Te(_),_.tokenize=De,"string";var h=b.next();if(h==e&&!v&&(!c||b.match(e+e))){_.tokenize=null;break}v=!s&&!v&&h=="\\"}return"string"}return n.tokenize=f,f(t,n)}function De(e,t){return e.eat("$"),e.eat("{")?t.tokenize=null:t.tokenize=Ie,null}function Ie(e,t){return e.eatWhile(/[\w_]/),t.tokenize=te(t),"variable"}const Ce=m({name:"dart",keywords:r("this super static final const abstract class extends external factory implements mixin get native set typedef with enum throw rethrow assert break case continue default in return new deferred async await covariant try catch finally do else for if switch while import library export part of show hide is as extension on yield late required sealed base interface when inline"),blockKeywords:r("try catch finally do else for if switch while"),builtin:r("void bool num int double dynamic var String Null Never"),atoms:r("true false null"),number:/^(?:0x[a-f\d_]+|(?:[\d_]+\.?[\d_]*|\.[\d_]+)(?:e[-+]?[\d_]+)?)/i,hooks:{"@":function(e){return e.eatWhile(/[\w\$_\.]/),"meta"},"'":function(e,t){return O("'",e,t,!1)},'"':function(e,t){return O('"',e,t,!1)},r:function(e,t){var n=e.peek();return n=="'"||n=='"'?O(e.next(),e,t,!0):!1},"}":function(e,t){return Ne(t)>0?(t.tokenize=te(t),null):!1},"/":function(e,t){return e.eat("*")?(t.tokenize=D(1),t.tokenize(e,t)):!1},token:function(e,t,n){if(n=="variable"&&RegExp("^[_$]*[A-Z][a-zA-Z0-9_$]*$","g").test(e.current()))return"type"}}});export{he as a,ke as c,_e as d,ye as f,pe as i,ve as l,xe as m,Se as n,Ce as o,be as p,m as r,me as s,fe as t,we as u};
import{a,c as s,d as e,f as c,i as r,l as o,m as p,n as t,o as i,p as l,r as n,s as d,t as f,u as j}from"./clike-Cc3gZvM_.js";export{f as c,t as ceylon,n as clike,r as cpp,a as csharp,i as dart,d as java,s as kotlin,o as nesC,j as objectiveC,e as objectiveCpp,c as scala,l as shader,p as squirrel};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var e=a("clipboard-paste",[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]);export{e as t};
import{t as o}from"./clojure-kT8c8jnq.js";export{o as clojure};
var d=["false","nil","true"],l=[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],u="*,*',*1,*2,*3,*agent*,*allow-unresolved-vars*,*assert*,*clojure-version*,*command-line-args*,*compile-files*,*compile-path*,*compiler-options*,*data-readers*,*default-data-reader-fn*,*e,*err*,*file*,*flush-on-newline*,*fn-loader*,*in*,*math-context*,*ns*,*out*,*print-dup*,*print-length*,*print-level*,*print-meta*,*print-namespace-maps*,*print-readably*,*read-eval*,*reader-resolver*,*source-path*,*suppress-read*,*unchecked-math*,*use-context-classloader*,*verbose-defrecords*,*warn-on-reflection*,+,+',-,-',->,->>,->ArrayChunk,->Eduction,->Vec,->VecNode,->VecSeq,-cache-protocol-fn,-reset-methods,..,/,<,<=,=,==,>,>=,EMPTY-NODE,Inst,StackTraceElement->vec,Throwable->map,accessor,aclone,add-classpath,add-watch,agent,agent-error,agent-errors,aget,alength,alias,all-ns,alter,alter-meta!,alter-var-root,amap,ancestors,and,any?,apply,areduce,array-map,as->,aset,aset-boolean,aset-byte,aset-char,aset-double,aset-float,aset-int,aset-long,aset-short,assert,assoc,assoc!,assoc-in,associative?,atom,await,await-for,await1,bases,bean,bigdec,bigint,biginteger,binding,bit-and,bit-and-not,bit-clear,bit-flip,bit-not,bit-or,bit-set,bit-shift-left,bit-shift-right,bit-test,bit-xor,boolean,boolean-array,boolean?,booleans,bound-fn,bound-fn*,bound?,bounded-count,butlast,byte,byte-array,bytes,bytes?,case,cast,cat,char,char-array,char-escape-string,char-name-string,char?,chars,chunk,chunk-append,chunk-buffer,chunk-cons,chunk-first,chunk-next,chunk-rest,chunked-seq?,class,class?,clear-agent-errors,clojure-version,coll?,comment,commute,comp,comparator,compare,compare-and-set!,compile,complement,completing,concat,cond,cond->,cond->>,condp,conj,conj!,cons,constantly,construct-proxy,contains?,count,counted?,create-ns,create-struct,cycle,dec,dec',decimal?,declare,dedupe,default-data-readers,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftype,delay,delay?,deliver,denominator,deref,derive,descendants,destructure,disj,disj!,dissoc,dissoc!,distinct,distinct?,doall,dorun,doseq,dosync,dotimes,doto,double,double-array,double?,doubles,drop,drop-last,drop-while,eduction,empty,empty?,ensure,ensure-reduced,enumeration-seq,error-handler,error-mode,eval,even?,every-pred,every?,ex-data,ex-info,extend,extend-protocol,extend-type,extenders,extends?,false?,ffirst,file-seq,filter,filterv,find,find-keyword,find-ns,find-protocol-impl,find-protocol-method,find-var,first,flatten,float,float-array,float?,floats,flush,fn,fn?,fnext,fnil,for,force,format,frequencies,future,future-call,future-cancel,future-cancelled?,future-done?,future?,gen-class,gen-interface,gensym,get,get-in,get-method,get-proxy-class,get-thread-bindings,get-validator,group-by,halt-when,hash,hash-combine,hash-map,hash-ordered-coll,hash-set,hash-unordered-coll,ident?,identical?,identity,if-let,if-not,if-some,ifn?,import,in-ns,inc,inc',indexed?,init-proxy,inst-ms,inst-ms*,inst?,instance?,int,int-array,int?,integer?,interleave,intern,interpose,into,into-array,ints,io!,isa?,iterate,iterator-seq,juxt,keep,keep-indexed,key,keys,keyword,keyword?,last,lazy-cat,lazy-seq,let,letfn,line-seq,list,list*,list?,load,load-file,load-reader,load-string,loaded-libs,locking,long,long-array,longs,loop,macroexpand,macroexpand-1,make-array,make-hierarchy,map,map-entry?,map-indexed,map?,mapcat,mapv,max,max-key,memfn,memoize,merge,merge-with,meta,method-sig,methods,min,min-key,mix-collection-hash,mod,munge,name,namespace,namespace-munge,nat-int?,neg-int?,neg?,newline,next,nfirst,nil?,nnext,not,not-any?,not-empty,not-every?,not=,ns,ns-aliases,ns-imports,ns-interns,ns-map,ns-name,ns-publics,ns-refers,ns-resolve,ns-unalias,ns-unmap,nth,nthnext,nthrest,num,number?,numerator,object-array,odd?,or,parents,partial,partition,partition-all,partition-by,pcalls,peek,persistent!,pmap,pop,pop!,pop-thread-bindings,pos-int?,pos?,pr,pr-str,prefer-method,prefers,primitives-classnames,print,print-ctor,print-dup,print-method,print-simple,print-str,printf,println,println-str,prn,prn-str,promise,proxy,proxy-call-with-super,proxy-mappings,proxy-name,proxy-super,push-thread-bindings,pvalues,qualified-ident?,qualified-keyword?,qualified-symbol?,quot,rand,rand-int,rand-nth,random-sample,range,ratio?,rational?,rationalize,re-find,re-groups,re-matcher,re-matches,re-pattern,re-seq,read,read-line,read-string,reader-conditional,reader-conditional?,realized?,record?,reduce,reduce-kv,reduced,reduced?,reductions,ref,ref-history-count,ref-max-history,ref-min-history,ref-set,refer,refer-clojure,reify,release-pending-sends,rem,remove,remove-all-methods,remove-method,remove-ns,remove-watch,repeat,repeatedly,replace,replicate,require,reset!,reset-meta!,reset-vals!,resolve,rest,restart-agent,resultset-seq,reverse,reversible?,rseq,rsubseq,run!,satisfies?,second,select-keys,send,send-off,send-via,seq,seq?,seqable?,seque,sequence,sequential?,set,set-agent-send-executor!,set-agent-send-off-executor!,set-error-handler!,set-error-mode!,set-validator!,set?,short,short-array,shorts,shuffle,shutdown-agents,simple-ident?,simple-keyword?,simple-symbol?,slurp,some,some->,some->>,some-fn,some?,sort,sort-by,sorted-map,sorted-map-by,sorted-set,sorted-set-by,sorted?,special-symbol?,spit,split-at,split-with,str,string?,struct,struct-map,subs,subseq,subvec,supers,swap!,swap-vals!,symbol,symbol?,sync,tagged-literal,tagged-literal?,take,take-last,take-nth,take-while,test,the-ns,thread-bound?,time,to-array,to-array-2d,trampoline,transduce,transient,tree-seq,true?,type,unchecked-add,unchecked-add-int,unchecked-byte,unchecked-char,unchecked-dec,unchecked-dec-int,unchecked-divide-int,unchecked-double,unchecked-float,unchecked-inc,unchecked-inc-int,unchecked-int,unchecked-long,unchecked-multiply,unchecked-multiply-int,unchecked-negate,unchecked-negate-int,unchecked-remainder-int,unchecked-short,unchecked-subtract,unchecked-subtract-int,underive,unquote,unquote-splicing,unreduced,unsigned-bit-shift-right,update,update-in,update-proxy,uri?,use,uuid?,val,vals,var-get,var-set,var?,vary-meta,vec,vector,vector-of,vector?,volatile!,volatile?,vreset!,vswap!,when,when-first,when-let,when-not,when-some,while,with-bindings,with-bindings*,with-in-str,with-loading-context,with-local-vars,with-meta,with-open,with-out-str,with-precision,with-redefs,with-redefs-fn,xml-seq,zero?,zipmap".split(","),p="->.->>.as->.binding.bound-fn.case.catch.comment.cond.cond->.cond->>.condp.def.definterface.defmethod.defn.defmacro.defprotocol.defrecord.defstruct.deftype.do.doseq.dotimes.doto.extend.extend-protocol.extend-type.fn.for.future.if.if-let.if-not.if-some.let.letfn.locking.loop.ns.proxy.reify.struct-map.some->.some->>.try.when.when-first.when-let.when-not.when-some.while.with-bindings.with-bindings*.with-in-str.with-loading-context.with-local-vars.with-meta.with-open.with-out-str.with-precision.with-redefs.with-redefs-fn".split("."),m=s(d),f=s(l),h=s(u),y=s(p),b=/^(?:[\\\[\]\s"(),;@^`{}~]|$)/,g=/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,k=/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,v=/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/;function i(t,e){if(t.eatSpace()||t.eat(","))return["space",null];if(t.match(g))return[null,"number"];if(t.match(k))return[null,"string.special"];if(t.eat(/^"/))return(e.tokenize=x)(t,e);if(t.eat(/^[(\[{]/))return["open","bracket"];if(t.eat(/^[)\]}]/))return["close","bracket"];if(t.eat(/^;/))return t.skipToEnd(),["space","comment"];if(t.eat(/^[#'@^`~]/))return[null,"meta"];var r=t.match(v),n=r&&r[0];return n?n==="comment"&&e.lastToken==="("?(e.tokenize=w)(t,e):a(n,m)||n.charAt(0)===":"?["symbol","atom"]:a(n,f)||a(n,h)?["symbol","keyword"]:e.lastToken==="("?["symbol","builtin"]:["symbol","variable"]:(t.next(),t.eatWhile(function(o){return!a(o,b)}),[null,"error"])}function x(t,e){for(var r=!1,n;n=t.next();){if(n==='"'&&!r){e.tokenize=i;break}r=!r&&n==="\\"}return[null,"string"]}function w(t,e){for(var r=1,n;n=t.next();)if(n===")"&&r--,n==="("&&r++,r===0){t.backUp(1),e.tokenize=i;break}return["space","comment"]}function s(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=!0;return e}function a(t,e){if(e instanceof RegExp)return e.test(t);if(e instanceof Object)return e.propertyIsEnumerable(t)}const q={name:"clojure",startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastToken:null,tokenize:i}},token:function(t,e){t.sol()&&typeof e.ctx.indentTo!="number"&&(e.ctx.indentTo=e.ctx.start+1);var r=e.tokenize(t,e),n=r[0],o=r[1],c=t.current();return n!=="space"&&(e.lastToken==="("&&e.ctx.indentTo===null?n==="symbol"&&a(c,y)?e.ctx.indentTo=e.ctx.start+t.indentUnit:e.ctx.indentTo="next":e.ctx.indentTo==="next"&&(e.ctx.indentTo=t.column()),e.lastToken=c),n==="open"?e.ctx={prev:e.ctx,start:t.column(),indentTo:null}:n==="close"&&(e.ctx=e.ctx.prev||e.ctx),o},indent:function(t){var e=t.ctx.indentTo;return typeof e=="number"?e:t.ctx.start+1},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:";;"},autocomplete:[].concat(d,l,u)}};export{q as t};
var r=/({)?[a-zA-Z0-9_]+(})?/;function c(n,t){for(var e,i,a=!1;!n.eol()&&(e=n.next())!=t.pending;){if(e==="$"&&i!="\\"&&t.pending=='"'){a=!0;break}i=e}return a&&n.backUp(1),e==t.pending?t.continueString=!1:t.continueString=!0,"string"}function o(n,t){var e=n.next();return e==="$"?n.match(r)?"variableName.special":"variable":t.continueString?(n.backUp(1),c(n,t)):n.match(/(\s+)?\w+\(/)||n.match(/(\s+)?\w+\ \(/)?(n.backUp(1),"def"):e=="#"?(n.skipToEnd(),"comment"):e=="'"||e=='"'?(t.pending=e,c(n,t)):e=="("||e==")"?"bracket":e.match(/[0-9]/)?"number":(n.eatWhile(/[\w-]/),null)}const u={name:"cmake",startState:function(){var n={};return n.inDefinition=!1,n.inInclude=!1,n.continueString=!1,n.pending=!1,n},token:function(n,t){return n.eatSpace()?null:o(n,t)}};export{u as t};
import{t as a}from"./cmake-B3S-FpMv.js";export{a as cmake};
var M="builtin",e="comment",L="string",D="atom",G="number",n="keyword",t="header",B="def",i="link";function C(E){for(var T={},I=E.split(" "),R=0;R<I.length;++R)T[I[R]]=!0;return T}var S=C("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "),U=C("ACCEPT ACCESS ACQUIRE ADD ADDRESS ADVANCING AFTER ALIAS ALL ALPHABET ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALSO ALTER ALTERNATE AND ANY ARE AREA AREAS ARITHMETIC ASCENDING ASSIGN AT ATTRIBUTE AUTHOR AUTO AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP BEFORE BELL BINARY BIT BITS BLANK BLINK BLOCK BOOLEAN BOTTOM BY CALL CANCEL CD CF CH CHARACTER CHARACTERS CLASS CLOCK-UNITS CLOSE COBOL CODE CODE-SET COL COLLATING COLUMN COMMA COMMIT COMMITMENT COMMON COMMUNICATION COMP COMP-0 COMP-1 COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS CONVERTING COPY CORR CORRESPONDING COUNT CRT CRT-UNDER CURRENCY CURRENT CURSOR DATA DATE DATE-COMPILED DATE-WRITTEN DAY DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION DOWN DROP DUPLICATE DUPLICATES DYNAMIC EBCDIC EGI EJECT ELSE EMI EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING END-WRITE END-XML ENTER ENTRY ENVIRONMENT EOP EQUAL EQUALS ERASE ERROR ESI EVALUATE EVERY EXCEEDS EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL FILE-STREAM FILES FILLER FINAL FIND FINISH FIRST FOOTING FOR FOREGROUND-COLOR FOREGROUND-COLOUR FORMAT FREE FROM FULL FUNCTION GENERATE GET GIVING GLOBAL GO GOBACK GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL ID IDENTIFICATION IF IN INDEX INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED INDIC INDICATE INDICATOR INDICATORS INITIAL INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO INVALID INVOKE IS JUST JUSTIFIED KANJI KEEP KEY LABEL LAST LD LEADING LEFT LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE LOCALE LOCALLY LOCK MEMBER MEMORY MERGE MESSAGE METACLASS MODE MODIFIED MODIFY MODULES MOVE MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE NEXT NO NO-ECHO NONE NOT NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS OF OFF OMITTED ON ONLY OPEN OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL PADDING PAGE PAGE-COUNTER PARSE PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE PREFIX PRESENT PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID PROMPT PROTECTED PURGE QUEUE QUOTE QUOTES RANDOM RD READ READY REALM RECEIVE RECONNECT RECORD RECORD-NAME RECORDS RECURSIVE REDEFINES REEL REFERENCE REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE REMAINDER REMOVAL RENAMES REPEATED REPLACE REPLACING REPORT REPORTING REPORTS REPOSITORY REQUIRED RERUN RESERVE RESET RETAINING RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO REVERSED REWIND REWRITE RF RH RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED RUN SAME SCREEN SD SEARCH SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SHARED SIGN SIZE SKIP1 SKIP2 SKIP3 SORT SORT-MERGE SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 START STARTING STATUS STOP STORE STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT TABLE TALLYING TAPE TENANT TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TITLE TO TOP TRAILING TRAILING-SIGN TRANSACTION TYPE TYPEDEF UNDERLINE UNEQUAL UNIT UNSTRING UNTIL UP UPDATE UPON USAGE USAGE-MODE USE USING VALID VALIDATE VALUE VALUES VARYING VLR WAIT WHEN WHEN-COMPILED WITH WITHIN WORDS WORKING-STORAGE WRITE XML XML-CODE XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL "),P=C("- * ** / + < <= = > >= "),N={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,symbol:/[\w*+\-]/};function F(E,T){return E==="0"&&T.eat(/x/i)?(T.eatWhile(N.hex),!0):((E=="+"||E=="-")&&N.digit.test(T.peek())&&(T.eat(N.sign),E=T.next()),N.digit.test(E)?(T.eat(E),T.eatWhile(N.digit),T.peek()=="."&&(T.eat("."),T.eatWhile(N.digit)),T.eat(N.exponent)&&(T.eat(N.sign),T.eatWhile(N.digit)),!0):!1)}const r={name:"cobol",startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(E,T){if(T.indentStack==null&&E.sol()&&(T.indentation=6),E.eatSpace())return null;var I=null;switch(T.mode){case"string":for(var R=!1;(R=E.next())!=null;)if((R=='"'||R=="'")&&!E.match(/['"]/,!1)){T.mode=!1;break}I=L;break;default:var O=E.next(),A=E.column();if(A>=0&&A<=5)I=B;else if(A>=72&&A<=79)E.skipToEnd(),I=t;else if(O=="*"&&A==6)E.skipToEnd(),I=e;else if(O=='"'||O=="'")T.mode="string",I=L;else if(O=="'"&&!N.digit_or_colon.test(E.peek()))I=D;else if(O==".")I=i;else if(F(O,E))I=G;else{if(E.current().match(N.symbol))for(;A<71&&E.eat(N.symbol)!==void 0;)A++;I=U&&U.propertyIsEnumerable(E.current().toUpperCase())?n:P&&P.propertyIsEnumerable(E.current().toUpperCase())?M:S&&S.propertyIsEnumerable(E.current().toUpperCase())?D:null}}return I},indent:function(E){return E.indentStack==null?E.indentation:E.indentStack.indent}};export{r as t};
import{t as o}from"./cobol-BrIP6mPV.js";export{o as cobol};
import{s as b}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-BGmjiNul.js";import{t as x}from"./jsx-runtime-ZmTK25f3.js";import"./cjs-CH5Rj0g8.js";import{i as p,n as k,r as u,t as N}from"./chunk-5FQGJX7Z-CVUXBqX6.js";var l=b(h(),1),r=b(x(),1),j=u("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),y=(0,l.memo)(({children:a,result:e,language:n,className:c,...g})=>{let d=(0,l.useMemo)(()=>({backgroundColor:e.bg,color:e.fg}),[e.bg,e.fg]);return(0,r.jsx)("pre",{className:u(c,"p-4 text-sm dark:bg-(--shiki-dark-bg)!"),"data-language":n,"data-streamdown":"code-block-body",style:d,...g,children:(0,r.jsx)("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:e.tokens.map((i,t)=>(0,r.jsx)("span",{className:j,children:i.map((o,s)=>(0,r.jsx)("span",{className:"dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!",style:{color:o.color,backgroundColor:o.bgColor,...o.htmlStyle},...o.htmlAttrs,children:o.content},s))},t))})})},(a,e)=>a.result===e.result&&a.language===e.language&&a.className===e.className),w=({className:a,language:e,style:n,...c})=>(0,r.jsx)("div",{className:u("my-4 w-full overflow-hidden rounded-xl border border-border",a),"data-language":e,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...c}),v=({language:a,children:e})=>(0,r.jsxs)("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-language":a,"data-streamdown":"code-block-header",children:[(0,r.jsx)("span",{className:"ml-1 font-mono lowercase",children:a}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:e})]}),C=({code:a,language:e,className:n,children:c,...g})=>{let{shikiTheme:d}=(0,l.useContext)(N),i=p(),t=(0,l.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:a.split(`
`).map(m=>[{content:m,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[a]),[o,s]=(0,l.useState)(t);return(0,l.useEffect)(()=>{if(!i){s(t);return}let m=i.highlight({code:a,language:e,themes:d},f=>{s(f)});if(m){s(m);return}s(t)},[a,e,d,i,t]),(0,r.jsx)(k.Provider,{value:{code:a},children:(0,r.jsxs)(w,{language:e,children:[(0,r.jsx)(v,{language:e,children:c}),(0,r.jsx)(y,{className:n,language:e,result:o,...g})]})})};export{C as CodeBlock};
import{t as e}from"./createLucideIcon-CnW3RofX.js";var m=e("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);export{m as t};
var s="error";function f(e){return RegExp("^(("+e.join(")|(")+"))\\b")}var h=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,v=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,d=/^[_A-Za-z$][_A-Za-z$0-9]*/,k=/^@[_A-Za-z$][_A-Za-z$0-9]*/,g=f(["and","or","not","is","isnt","in","instanceof","typeof"]),p=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],y=f(p.concat(["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"]));p=f(p);var z=/^('{3}|\"{3}|['\"])/,b=/^(\/{3}|\/)/,x=f(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);function a(e,n){if(e.sol()){n.scope.align===null&&(n.scope.align=!1);var r=n.scope.offset;if(e.eatSpace()){var o=e.indentation();return o>r&&n.scope.type=="coffee"?"indent":o<r?"dedent":null}else r>0&&l(e,n)}if(e.eatSpace())return null;var c=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return n.tokenize=w,n.tokenize(e,n);if(c==="#")return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var i=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^-?\d+\.\d*/)&&(i=!0),e.match(/^-?\.\d+/)&&(i=!0),i)return e.peek()=="."&&e.backUp(1),"number";var t=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(t=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(t=!0),e.match(/^-?0(?![\dx])/i)&&(t=!0),t)return"number"}if(e.match(z))return n.tokenize=m(e.current(),!1,"string"),n.tokenize(e,n);if(e.match(b)){if(e.current()!="/"||e.match(/^.*\//,!1))return n.tokenize=m(e.current(),!0,"string.special"),n.tokenize(e,n);e.backUp(1)}return e.match(h)||e.match(g)?"operator":e.match(v)?"punctuation":e.match(x)?"atom":e.match(k)||n.prop&&e.match(d)?"property":e.match(y)?"keyword":e.match(d)?"variable":(e.next(),s)}function m(e,n,r){return function(o,c){for(;!o.eol();)if(o.eatWhile(/[^'"\/\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return c.tokenize=a,r;o.eat(/['"\/]/)}return n&&(c.tokenize=a),r}}function w(e,n){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){n.tokenize=a;break}e.eatWhile("#")}return"comment"}function u(e,n,r="coffee"){for(var o=0,c=!1,i=null,t=n.scope;t;t=t.prev)if(t.type==="coffee"||t.type=="}"){o=t.offset+e.indentUnit;break}r==="coffee"?n.scope.align&&(n.scope.align=!1):(c=null,i=e.column()+e.current().length),n.scope={offset:o,type:r,prev:n.scope,align:c,alignOffset:i}}function l(e,n){if(n.scope.prev)if(n.scope.type==="coffee"){for(var r=e.indentation(),o=!1,c=n.scope;c;c=c.prev)if(r===c.offset){o=!0;break}if(!o)return!0;for(;n.scope.prev&&n.scope.offset!==r;)n.scope=n.scope.prev;return!1}else return n.scope=n.scope.prev,!1}function A(e,n){var r=n.tokenize(e,n),o=e.current();o==="return"&&(n.dedent=!0),((o==="->"||o==="=>")&&e.eol()||r==="indent")&&u(e,n);var c="[({".indexOf(o);if(c!==-1&&u(e,n,"])}".slice(c,c+1)),p.exec(o)&&u(e,n),o=="then"&&l(e,n),r==="dedent"&&l(e,n))return s;if(c="])}".indexOf(o),c!==-1){for(;n.scope.type=="coffee"&&n.scope.prev;)n.scope=n.scope.prev;n.scope.type==o&&(n.scope=n.scope.prev)}return n.dedent&&e.eol()&&(n.scope.type=="coffee"&&n.scope.prev&&(n.scope=n.scope.prev),n.dedent=!1),r=="indent"||r=="dedent"?null:r}const _={name:"coffeescript",startState:function(){return{tokenize:a,scope:{offset:0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,n){var r=n.scope.align===null&&n.scope;r&&e.sol()&&(r.align=!1);var o=A(e,n);return o&&o!="comment"&&(r&&(r.align=!0),n.prop=o=="punctuation"&&e.current()=="."),o},indent:function(e,n){if(e.tokenize!=a)return 0;var r=e.scope,o=n&&"])}".indexOf(n.charAt(0))>-1;if(o)for(;r.type=="coffee"&&r.prev;)r=r.prev;var c=o&&r.type===n.charAt(0);return r.align?r.alignOffset-(c?1:0):(c?r.prev:r).offset},languageData:{commentTokens:{line:"#"}}};export{_ as t};
import{t as e}from"./coffeescript-ByxLkrBT.js";export{e as coffeeScript};
function n(r){for(var t=r.length/6|0,a=Array(t),e=0;e<t;)a[e]="#"+r.slice(e*6,++e*6);return a}export{n as t};
import{s as L}from"./chunk-LvLJmgfZ.js";import{u as K}from"./useEvent-DO6uJBas.js";import{t as R}from"./react-BGmjiNul.js";import{An as U,dr as V,jn as W,pr as O,w as Y}from"./cells-BpZ7g6ok.js";import{t as D}from"./compiler-runtime-DeeZ7FnK.js";import{t as X}from"./useLifecycle-D35CBukS.js";import{o as Z}from"./utils-DXvhzCGS.js";import{t as ee}from"./jsx-runtime-ZmTK25f3.js";import{r as M,t as z}from"./button-YC1gW_kJ.js";import{t as x}from"./cn-BKtXLv3a.js";import{G as te}from"./JsonOutput-CknFTI_u.js";import{r as ae}from"./requests-BsVD4CdD.js";import{t as se}from"./createLucideIcon-CnW3RofX.js";import{h as re}from"./select-V5IdpNiR.js";import{t as ne}from"./chevron-right-DwagBitu.js";import{n as le,t as oe}from"./spinner-DaIKav-i.js";import{r as ce}from"./useTheme-DUdVAZI8.js";import{t as $}from"./tooltip-CEc2ajau.js";import{t as ie}from"./context-JwD-oSsl.js";import{r as me}from"./numbers-iQunIAXf.js";import{t as de}from"./copy-icon-BhONVREY.js";import{t as pe}from"./useInstallPackage-Bdnnp5fe.js";import{n as ue}from"./html-to-image-DjukyIj4.js";import{o as xe}from"./focus-D51fcwZX.js";var I=se("square-plus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]),h=D(),l=L(ee(),1);const he=o=>{let e=(0,h.c)(4),{isExpanded:a}=o,s=a&&"rotate-90",t;e[0]===s?t=e[1]:(t=x("h-3 w-3 transition-transform",s),e[0]=s,e[1]=t);let r;return e[2]===t?r=e[3]:(r=(0,l.jsx)(ne,{className:t}),e[2]=t,e[3]=r),r},fe=o=>{let e=(0,h.c)(5),{children:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("flex gap-1.5 items-center font-bold py-1.5 text-muted-foreground bg-(--slate-2) text-sm",s),e[0]=s,e[1]=t);let r;return e[2]!==a||e[3]!==t?(r=(0,l.jsx)("div",{className:t,children:a}),e[2]=a,e[3]=t,e[4]=r):r=e[4],r},ge=o=>{let e=(0,h.c)(5),{content:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("text-sm text-muted-foreground py-1",s),e[0]=s,e[1]=t);let r;return e[2]!==a||e[3]!==t?(r=(0,l.jsx)("div",{className:t,children:a}),e[2]=a,e[3]=t,e[4]=r):r=e[4],r},ye=o=>{let e=(0,h.c)(6),{error:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("text-sm bg-red-50 dark:bg-red-900 text-red-600 dark:text-red-50 flex items-center gap-2 p-2 h-8",s),e[0]=s,e[1]=t);let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,l.jsx)(re,{className:"h-4 w-4 mt-0.5"}),e[2]=r):r=e[2];let n;return e[3]!==a.message||e[4]!==t?(n=(0,l.jsxs)("div",{className:t,children:[r,a.message]}),e[3]=a.message,e[4]=t,e[5]=n):n=e[5],n},be=o=>{let e=(0,h.c)(6),{message:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("text-sm bg-blue-50 dark:bg-(--accent) text-blue-500 dark:text-blue-50 flex items-center gap-2 p-2 h-8",s),e[0]=s,e[1]=t);let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,l.jsx)(le,{className:"h-4 w-4 animate-spin"}),e[2]=r):r=e[2];let n;return e[3]!==a||e[4]!==t?(n=(0,l.jsxs)("div",{className:t,children:[r,a]}),e[3]=a,e[4]=t,e[5]=n):n=e[5],n},E=o=>{let e=(0,h.c)(5),{children:a,className:s}=o,t;e[0]===s?t=e[1]:(t=x("flex flex-col gap-2 relative",s),e[0]=s,e[1]=t);let r;return e[2]!==a||e[3]!==t?(r=(0,l.jsx)("div",{className:t,children:a}),e[2]=a,e[3]=t,e[4]=r):r=e[4],r},_e=o=>{let e=(0,h.c)(6),{columnName:a,dataType:s}=o,t=U[s],r=`w-4 h-4 p-0.5 rounded-sm stroke-card-foreground ${W(s)}`,n;e[0]!==t||e[1]!==r?(n=(0,l.jsx)(t,{className:r}),e[0]=t,e[1]=r,e[2]=n):n=e[2];let c;return e[3]!==a||e[4]!==n?(c=(0,l.jsxs)("div",{className:"flex flex-row items-center gap-1.5",children:[n,a]}),e[3]=a,e[4]=n,e[5]=c):c=e[5],c};var je=D(),Ne=L(R(),1);const ke=o=>{let e=(0,je.c)(13),{packages:a,showMaxPackages:s,className:t,onInstall:r}=o,{handleInstallPackages:n}=pe();if(!a||a.length===0)return null;let c;e[0]!==n||e[1]!==r||e[2]!==a?(c=()=>{n(a,r)},e[0]=n,e[1]=r,e[2]=a,e[3]=c):c=e[3];let i;e[4]===t?i=e[5]:(i=x("ml-2",t),e[4]=t,e[5]=i);let d;e[6]!==a||e[7]!==s?(d=s?a.slice(0,s).join(", "):a.join(", "),e[6]=a,e[7]=s,e[8]=d):d=e[8];let p;return e[9]!==c||e[10]!==i||e[11]!==d?(p=(0,l.jsxs)(z,{variant:"outline",size:"xs",onClick:c,className:i,children:["Install"," ",d]}),e[9]=c,e[10]=i,e[11]=d,e[12]=p):p=e[12],p};var Q=D();const ve=o=>{let e=(0,Q.c)(53),{table:a,column:s,preview:t,onAddColumnChart:r,sqlTableContext:n}=o,{theme:c}=ce(),{previewDatasetColumn:i}=ae(),{locale:d}=ie(),p;e[0]!==s.name||e[1]!==i||e[2]!==n||e[3]!==a.name||e[4]!==a.source||e[5]!==a.source_type?(p=()=>{i({source:a.source,tableName:a.name,columnName:s.name,sourceType:a.source_type,fullyQualifiedTableName:n?`${n.database}.${n.schema}.${a.name}`:a.name})},e[0]=s.name,e[1]=i,e[2]=n,e[3]=a.name,e[4]=a.source,e[5]=a.source_type,e[6]=p):p=e[6];let u=p,y;if(e[7]!==t||e[8]!==u||e[9]!==a.source_type?(y=()=>{t||a.source_type==="connection"||a.source_type==="catalog"||u()},e[7]=t,e[8]=u,e[9]=a.source_type,e[10]=y):y=e[10],X(y),a.source_type==="connection"){let m=s.name,H=s.external_type,f;e[11]!==s.name||e[12]!==r||e[13]!==n||e[14]!==a?(f=M.stopPropagation(()=>{r(O({table:a,columnName:s.name,sqlTableContext:n}))}),e[11]=s.name,e[12]=r,e[13]=n,e[14]=a,e[15]=f):f=e[15];let P;e[16]===Symbol.for("react.memo_cache_sentinel")?(P=(0,l.jsx)(I,{className:"h-3 w-3 mr-1"}),e[16]=P):P=e[16];let g;e[17]===f?g=e[18]:(g=(0,l.jsxs)(z,{variant:"outline",size:"xs",onClick:f,children:[P," Add SQL cell"]}),e[17]=f,e[18]=g);let T;return e[19]!==s.external_type||e[20]!==s.name||e[21]!==g?(T=(0,l.jsxs)("span",{className:"text-xs text-muted-foreground gap-2 flex items-center justify-between pl-7",children:[m," (",H,")",g]}),e[19]=s.external_type,e[20]=s.name,e[21]=g,e[22]=T):T=e[22],T}if(a.source_type==="catalog"){let m;return e[23]!==s.external_type||e[24]!==s.name?(m=(0,l.jsxs)("span",{className:"text-xs text-muted-foreground gap-2 flex items-center justify-between pl-7",children:[s.name," (",s.external_type,")"]}),e[23]=s.external_type,e[24]=s.name,e[25]=m):m=e[25],m}if(!t){let m;return e[26]===Symbol.for("react.memo_cache_sentinel")?(m=(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:"Loading..."}),e[26]=m):m=e[26],m}let b;e[27]!==t.error||e[28]!==t.missing_packages||e[29]!==u?(b=t.error&&G({error:t.error,missingPackages:t.missing_packages,refetchPreview:u}),e[27]=t.error,e[28]=t.missing_packages,e[29]=u,e[30]=b):b=e[30];let _=b,j;e[31]!==s.type||e[32]!==d||e[33]!==t.stats?(j=t.stats&&J({stats:t.stats,dataType:s.type,locale:d}),e[31]=s.type,e[32]=d,e[33]=t.stats,e[34]=j):j=e[34];let N=j,k;e[35]!==t.chart_spec||e[36]!==c?(k=t.chart_spec&&B(t.chart_spec,c),e[35]=t.chart_spec,e[36]=c,e[37]=k):k=e[37];let v=k,w;e[38]!==t.chart_code||e[39]!==a.source_type?(w=t.chart_code&&a.source_type==="local"&&(0,l.jsx)(F,{chartCode:t.chart_code}),e[38]=t.chart_code,e[39]=a.source_type,e[40]=w):w=e[40];let A=w,C;e[41]!==s.name||e[42]!==r||e[43]!==n||e[44]!==a?(C=a.source_type==="duckdb"&&(0,l.jsx)($,{content:"Add SQL cell",delayDuration:400,children:(0,l.jsx)(z,{variant:"outline",size:"icon",className:"z-10 bg-background absolute right-1 -top-1",onClick:M.stopPropagation(()=>{r(O({table:a,columnName:s.name,sqlTableContext:n}))}),children:(0,l.jsx)(I,{className:"h-3 w-3"})})}),e[41]=s.name,e[42]=r,e[43]=n,e[44]=a,e[45]=C):C=e[45];let q=C;if(!_&&!N&&!v){let m;return e[46]===Symbol.for("react.memo_cache_sentinel")?(m=(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:"No data"}),e[46]=m):m=e[46],m}let S;return e[47]!==A||e[48]!==q||e[49]!==v||e[50]!==_||e[51]!==N?(S=(0,l.jsxs)(E,{children:[_,A,q,v,N]}),e[47]=A,e[48]=q,e[49]=v,e[50]=_,e[51]=N,e[52]=S):S=e[52],S};function G({error:o,missingPackages:e,refetchPreview:a}){return(0,l.jsxs)("div",{className:"text-xs text-muted-foreground p-2 border border-border rounded flex items-center justify-between",children:[(0,l.jsx)("span",{children:o}),e&&(0,l.jsx)(ke,{packages:e,showMaxPackages:1,className:"w-32",onInstall:a})]})}function J({stats:o,dataType:e,locale:a}){return(0,l.jsx)("div",{className:"gap-x-16 gap-y-1 grid grid-cols-2-fit border rounded p-2 empty:hidden",children:Object.entries(o).map(([s,t])=>t==null?null:(0,l.jsxs)("div",{className:"flex items-center gap-1 group",children:[(0,l.jsx)("span",{className:"text-xs min-w-[60px] capitalize",children:V(s,e)}),(0,l.jsx)("span",{className:"text-xs font-bold text-muted-foreground tracking-wide",children:me(t,a)}),(0,l.jsx)(de,{className:"h-3 w-3 invisible group-hover:visible",value:String(t)})]},s))})}var we=(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(oe,{className:"size-4"})});function B(o,e){return(0,l.jsx)(Ne.Suspense,{fallback:we,children:(0,l.jsx)(te,{spec:(a=>({...a,background:"transparent",config:{...a.config,background:"transparent"}}))(JSON.parse(o)),options:{theme:e==="dark"?"dark":"vox",height:100,width:"container",actions:!1,renderer:"canvas"}})})}const F=o=>{let e=(0,Q.c)(10),{chartCode:a}=o,s=K(Z),t=xe(),{createNewCell:r}=Y(),n;e[0]!==s||e[1]!==r||e[2]!==t?(n=u=>{u.includes("alt")&&ue({autoInstantiate:s,createNewCell:r,fromCellId:t}),r({code:u,before:!1,cellId:t??"__end__"})},e[0]=s,e[1]=r,e[2]=t,e[3]=n):n=e[3];let c=n,i;e[4]!==a||e[5]!==c?(i=M.stopPropagation(()=>c(a)),e[4]=a,e[5]=c,e[6]=i):i=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(I,{className:"h-3 w-3"}),e[7]=d):d=e[7];let p;return e[8]===i?p=e[9]:(p=(0,l.jsx)($,{content:"Add chart to notebook",delayDuration:400,children:(0,l.jsx)(z,{variant:"outline",size:"icon",className:"z-10 bg-background absolute right-1 -top-0.5",onClick:i,children:d})}),e[8]=i,e[9]=p),p};export{J as a,fe as c,be as d,he as f,G as i,ge as l,ve as n,_e as o,I as p,B as r,E as s,F as t,ye as u};
import{s as I}from"./chunk-LvLJmgfZ.js";import{t as Ye}from"./react-BGmjiNul.js";import{t as ae}from"./react-dom-C9fstfnp.js";import{t as ue}from"./compiler-runtime-DeeZ7FnK.js";import{n as ze,r as W,t as Ve}from"./useEventListener-DIUKKfEy.js";import{t as Ze}from"./jsx-runtime-ZmTK25f3.js";var u=I(Ye(),1),E=I(Ze(),1);function qe(e,t){let r=u.createContext(t),n=a=>{let{children:l,...i}=a,m=u.useMemo(()=>i,Object.values(i));return(0,E.jsx)(r.Provider,{value:m,children:l})};n.displayName=e+"Provider";function o(a){let l=u.useContext(r);if(l)return l;if(t!==void 0)return t;throw Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function He(e,t=[]){let r=[];function n(a,l){let i=u.createContext(l),m=r.length;r=[...r,l];let c=f=>{var b;let{scope:p,children:h,...N}=f,s=((b=p==null?void 0:p[e])==null?void 0:b[m])||i,v=u.useMemo(()=>N,Object.values(N));return(0,E.jsx)(s.Provider,{value:v,children:h})};c.displayName=a+"Provider";function d(f,p){var s;let h=((s=p==null?void 0:p[e])==null?void 0:s[m])||i,N=u.useContext(h);if(N)return N;if(l!==void 0)return l;throw Error(`\`${f}\` must be used within \`${a}\``)}return[c,d]}let o=()=>{let a=r.map(l=>u.createContext(l));return function(l){let i=(l==null?void 0:l[e])||a;return u.useMemo(()=>({[`__scope${e}`]:{...l,[e]:i}}),[l,i])}};return o.scopeName=e,[n,Xe(o,...t)]}function Xe(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){let a=n.reduce((l,{useScope:i,scopeName:m})=>{let c=i(o)[`__scope${m}`];return{...l,...c}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}typeof window<"u"&&window.document&&window.document.createElement;function F(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e==null||e(n),r===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}var L=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Ge=u.useInsertionEffect||L;function Je({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,l]=Qe({defaultProp:t,onChange:r}),i=e!==void 0,m=i?e:o;{let c=u.useRef(e!==void 0);u.useEffect(()=>{let d=c.current;d!==i&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=i},[i,n])}return[m,u.useCallback(c=>{var d;if(i){let f=et(c)?c(e):c;f!==e&&((d=l.current)==null||d.call(l,f))}else a(c)},[i,e,a,l])]}function Qe({defaultProp:e,onChange:t}){let[r,n]=u.useState(e),o=u.useRef(r),a=u.useRef(t);return Ge(()=>{a.current=t},[t]),u.useEffect(()=>{var l;o.current!==r&&((l=a.current)==null||l.call(a,r),o.current=r)},[r,o]),[r,n,a]}function et(e){return typeof e=="function"}function tt(e,t){return u.useReducer((r,n)=>t[r][n]??r,e)}var le=e=>{let{present:t,children:r}=e,n=nt(t),o=typeof r=="function"?r({present:n.isPresent}):u.Children.only(r),a=W(n.ref,rt(o));return typeof r=="function"||n.isPresent?u.cloneElement(o,{ref:a}):null};le.displayName="Presence";function nt(e){let[t,r]=u.useState(),n=u.useRef(null),o=u.useRef(e),a=u.useRef("none"),[l,i]=tt(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{let m=B(n.current);a.current=l==="mounted"?m:"none"},[l]),L(()=>{let m=n.current,c=o.current;if(c!==e){let d=a.current,f=B(m);e?i("MOUNT"):f==="none"||(m==null?void 0:m.display)==="none"?i("UNMOUNT"):i(c&&d!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,i]),L(()=>{if(t){let m,c=t.ownerDocument.defaultView??window,d=p=>{let h=B(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(i("ANIMATION_END"),!o.current)){let N=t.style.animationFillMode;t.style.animationFillMode="forwards",m=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},f=p=>{p.target===t&&(a.current=B(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(m),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else i("ANIMATION_END")},[t,i]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:u.useCallback(m=>{n.current=m?getComputedStyle(m):null,r(m)},[])}}function B(e){return(e==null?void 0:e.animationName)||"none"}function rt(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ce(e){let t=ot(e),r=u.forwardRef((n,o)=>{let{children:a,...l}=n,i=u.Children.toArray(a),m=i.find(at);if(m){let c=m.props.children,d=i.map(f=>f===m?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return(0,E.jsx)(t,{...l,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return(0,E.jsx)(t,{...l,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function ot(e){let t=u.forwardRef((r,n)=>{let{children:o,...a}=r;if(u.isValidElement(o)){let l=lt(o),i=ut(a,o.props);return o.type!==u.Fragment&&(i.ref=n?ze(n,l):l),u.cloneElement(o,i)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function it(e){let t=({children:r})=>(0,E.jsx)(E.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=se,t}function at(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function ut(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{let i=a(...l);return o(...l),i}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function lt(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ct=I(ae(),1),k=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=ce(`Primitive.${t}`),n=u.forwardRef((o,a)=>{let{asChild:l,...i}=o,m=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,E.jsx)(m,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function de(e,t){e&&ct.flushSync(()=>e.dispatchEvent(t))}function M(e){let t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function st(e,t=globalThis==null?void 0:globalThis.document){let r=M(e);u.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var dt="DismissableLayer",X="dismissableLayer.update",ft="dismissableLayer.pointerDownOutside",mt="dismissableLayer.focusOutside",fe,me=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),G=u.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:i,...m}=e,c=u.useContext(me),[d,f]=u.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=u.useState({}),N=W(t,g=>f(g)),s=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=s.indexOf(v),S=d?s.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,y=S>=b,x=vt(g=>{let P=g.target,T=[...c.branches].some(Ke=>Ke.contains(P));!y||T||(o==null||o(g),l==null||l(g),g.defaultPrevented||(i==null||i()))},p),R=ht(g=>{let P=g.target;[...c.branches].some(T=>T.contains(P))||(a==null||a(g),l==null||l(g),g.defaultPrevented||(i==null||i()))},p);return st(g=>{S===c.layers.size-1&&(n==null||n(g),!g.defaultPrevented&&i&&(g.preventDefault(),i()))},p),u.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(fe=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ve(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=fe)}},[d,p,r,c]),u.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ve())},[d,c]),u.useEffect(()=>{let g=()=>h({});return document.addEventListener(X,g),()=>document.removeEventListener(X,g)},[]),(0,E.jsx)(k.div,{...m,ref:N,style:{pointerEvents:w?y?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,R.onFocusCapture),onBlurCapture:F(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,x.onPointerDownCapture)})});G.displayName=dt;var pt="DismissableLayerBranch",pe=u.forwardRef((e,t)=>{let r=u.useContext(me),n=u.useRef(null),o=W(t,n);return u.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,E.jsx)(k.div,{...e,ref:o})});pe.displayName=pt;function vt(e,t=globalThis==null?void 0:globalThis.document){let r=M(e),n=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{let a=i=>{if(i.target&&!n.current){let m=function(){he(ft,r,c,{discrete:!0})},c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=m,t.addEventListener("click",o.current,{once:!0})):m()}else t.removeEventListener("click",o.current);n.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ht(e,t=globalThis==null?void 0:globalThis.document){let r=M(e),n=u.useRef(!1);return u.useEffect(()=>{let o=a=>{a.target&&!n.current&&he(mt,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ve(){let e=new CustomEvent(X);document.dispatchEvent(e)}function he(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?de(o,a):o.dispatchEvent(a)}var yt=G,gt=pe,Et=u.useId||(()=>{}),bt=0;function wt(e){let[t,r]=u.useState(Et());return L(()=>{e||r(n=>n??String(bt++))},[e]),e||(t?`radix-${t}`:"")}var Nt=I(ae(),1),St="Portal",ye=u.forwardRef((e,t)=>{var i;let{container:r,...n}=e,[o,a]=u.useState(!1);L(()=>a(!0),[]);let l=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?Nt.createPortal((0,E.jsx)(k.div,{...n,ref:t}),l):null});ye.displayName=St;var Ct=ue(),xt={display:"contents"};const ge=u.forwardRef((e,t)=>{let r=(0,Ct.c)(3),{children:n}=e,o;return r[0]!==n||r[1]!==t?(o=(0,E.jsx)("div",{ref:t,className:"marimo",style:xt,children:n}),r[0]=n,r[1]=t,r[2]=o):o=r[2],o});ge.displayName="StyleNamespace";function U(){return document.querySelector("[data-vscode-theme-kind]")!==null}var D=ue(),Ee="[data-vscode-output-container]";const Rt=U()?0:30;function Pt(){let e=(0,D.c)(1),[t,r]=(0,u.useState)(document.fullscreenElement),n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{r(document.fullscreenElement)},e[0]=n):n=e[0],Ve(document,"fullscreenchange",n),t}function Ot(e){let t=n=>{let o=(0,D.c)(6),[a,l]=u.useState(null),i=u.useRef(null),m,c;o[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{i.current&&l(be(i.current,Ee))},c=[],o[0]=m,o[1]=c):(m=o[0],c=o[1]),u.useLayoutEffect(m,c);let d;o[2]===Symbol.for("react.memo_cache_sentinel")?(d=(0,E.jsx)("div",{ref:i,className:"contents invisible"}),o[2]=d):d=o[2];let f;return o[3]!==a||o[4]!==n?(f=(0,E.jsxs)(E.Fragment,{children:[d,(0,E.jsx)(e,{...n,container:a})]}),o[3]=a,o[4]=n,o[5]=f):f=o[5],f},r=n=>{let o=(0,D.c)(7),a=Pt();if(U()){let i;return o[0]===n?i=o[1]:(i=(0,E.jsx)(t,{...n}),o[0]=n,o[1]=i),i}if(!a){let i;return o[2]===n?i=o[3]:(i=(0,E.jsx)(e,{...n}),o[2]=n,o[3]=i),i}let l;return o[4]!==a||o[5]!==n?(l=(0,E.jsx)(e,{...n,container:a}),o[4]=a,o[5]=n,o[6]=l):l=o[6],l};return r.displayName=e.displayName,r}function Tt(e){let t=n=>{let o=(0,D.c)(6),[a,l]=u.useState(null),i=u.useRef(null),m,c;o[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{i.current&&l(be(i.current,Ee))},c=[],o[0]=m,o[1]=c):(m=o[0],c=o[1]),u.useLayoutEffect(m,c);let d;o[2]===Symbol.for("react.memo_cache_sentinel")?(d=(0,E.jsx)("div",{ref:i,className:"contents invisible"}),o[2]=d):d=o[2];let f;return o[3]!==a||o[4]!==n?(f=(0,E.jsxs)(E.Fragment,{children:[d,(0,E.jsx)(e,{...n,collisionBoundary:a})]}),o[3]=a,o[4]=n,o[5]=f):f=o[5],f},r=n=>{let o=(0,D.c)(4);if(U()){let l;return o[0]===n?l=o[1]:(l=(0,E.jsx)(t,{...n}),o[0]=n,o[1]=l),l}let a;return o[2]===n?a=o[3]:(a=(0,E.jsx)(e,{...n}),o[2]=n,o[3]=a),a};return r.displayName=e.displayName,r}function be(e,t){let r=e;for(;r;){let n=r.closest(t);if(n)return n;let o=r.getRootNode();if(r=o instanceof ShadowRoot?o.host:r.parentElement,r===o)break}return null}var J=0;function Lt(){u.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??we()),document.body.insertAdjacentElement("beforeend",e[1]??we()),J++,()=>{J===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J--}},[])}function we(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Q="focusScope.autoFocusOnMount",ee="focusScope.autoFocusOnUnmount",Ne={bubbles:!1,cancelable:!0},Mt="FocusScope",Se=u.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[i,m]=u.useState(null),c=M(o),d=M(a),f=u.useRef(null),p=W(t,s=>m(s)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(n){let s=function(w){if(h.paused||!i)return;let y=w.target;i.contains(y)?f.current=y:O(f.current,{select:!0})},v=function(w){if(h.paused||!i)return;let y=w.relatedTarget;y!==null&&(i.contains(y)||O(f.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(let y of w)y.removedNodes.length>0&&O(i)};document.addEventListener("focusin",s),document.addEventListener("focusout",v);let S=new MutationObserver(b);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",v),S.disconnect()}}},[n,i,h.paused]),u.useEffect(()=>{if(i){Re.add(h);let s=document.activeElement;if(!i.contains(s)){let v=new CustomEvent(Q,Ne);i.addEventListener(Q,c),i.dispatchEvent(v),v.defaultPrevented||($t(jt(Ce(i)),{select:!0}),document.activeElement===s&&O(i))}return()=>{i.removeEventListener(Q,c),setTimeout(()=>{let v=new CustomEvent(ee,Ne);i.addEventListener(ee,d),i.dispatchEvent(v),v.defaultPrevented||O(s??document.body,{select:!0}),i.removeEventListener(ee,d),Re.remove(h)},0)}}},[i,c,d,h]);let N=u.useCallback(s=>{if(!r&&!n||h.paused)return;let v=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,b=document.activeElement;if(v&&b){let S=s.currentTarget,[w,y]=At(S);w&&y?!s.shiftKey&&b===y?(s.preventDefault(),r&&O(w,{select:!0})):s.shiftKey&&b===w&&(s.preventDefault(),r&&O(y,{select:!0})):b===S&&s.preventDefault()}},[r,n,h.paused]);return(0,E.jsx)(k.div,{tabIndex:-1,...l,ref:p,onKeyDown:N})});Se.displayName=Mt;function $t(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(O(n,{select:t}),document.activeElement!==r)return}function At(e){let t=Ce(e);return[xe(t,e),xe(t.reverse(),e)]}function Ce(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xe(e,t){for(let r of e)if(!_t(r,{upTo:t}))return r}function _t(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function kt(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&kt(e)&&t&&e.select()}}var Re=Dt();function Dt(){let e=[];return{add(t){let r=e[0];t!==r&&(r==null||r.pause()),e=Pe(e,t),e.unshift(t)},remove(t){var r;e=Pe(e,t),(r=e[0])==null||r.resume()}}}function Pe(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function jt(e){return e.filter(t=>t.tagName!=="A")}var It=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},$=new WeakMap,K=new WeakMap,Y={},te=0,Oe=function(e){return e&&(e.host||Oe(e.parentNode))},Wt=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Oe(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ft=function(e,t,r,n){var o=Wt(t,Array.isArray(e)?e:[e]);Y[r]||(Y[r]=new WeakMap);var a=Y[r],l=[],i=new Set,m=new Set(o),c=function(f){!f||i.has(f)||(i.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||m.has(f)||Array.prototype.forEach.call(f.children,function(p){if(i.has(p))d(p);else try{var h=p.getAttribute(n),N=h!==null&&h!=="false",s=($.get(p)||0)+1,v=(a.get(p)||0)+1;$.set(p,s),a.set(p,v),l.push(p),s===1&&N&&K.set(p,!0),v===1&&p.setAttribute(r,"true"),N||p.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return d(t),i.clear(),te++,function(){l.forEach(function(f){var p=$.get(f)-1,h=a.get(f)-1;$.set(f,p),a.set(f,h),p||(K.has(f)||f.removeAttribute(n),K.delete(f)),h||f.removeAttribute(r)}),te--,te||($=new WeakMap,$=new WeakMap,K=new WeakMap,Y={})}},Bt=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||It(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Ft(n,o,r,"aria-hidden")):function(){return null}},C=function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C.apply(this,arguments)};function Te(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ut(e,t,r,n){function o(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function i(d){try{c(n.next(d))}catch(f){l(f)}}function m(d){try{c(n.throw(d))}catch(f){l(f)}}function c(d){d.done?a(d.value):o(d.value).then(i,m)}c((n=n.apply(e,t||[])).next())})}function Kt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var z="right-scroll-bar-position",V="width-before-scroll-bar",Yt="with-scroll-bars-hidden",zt="--removed-body-scroll-bar-size";function ne(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Vt(e,t){var r=(0,u.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Zt=typeof window<"u"?u.useLayoutEffect:u.useEffect,Le=new WeakMap;function qt(e,t){var r=Vt(t||null,function(n){return e.forEach(function(o){return ne(o,n)})});return Zt(function(){var n=Le.get(r);if(n){var o=new Set(n),a=new Set(e),l=r.current;o.forEach(function(i){a.has(i)||ne(i,null)}),a.forEach(function(i){o.has(i)||ne(i,l)})}Le.set(r,e)},[e]),r}function Ht(e){return e}function Xt(e,t){t===void 0&&(t=Ht);var r=[],n=!1;return{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(o),a=r}var i=function(){var c=a;a=[],c.forEach(o)},m=function(){return Promise.resolve().then(i)};m(),r={push:function(c){a.push(c),m()},filter:function(c){return a=a.filter(c),r}}}}}function Gt(e){e===void 0&&(e={});var t=Xt(null);return t.options=C({async:!0,ssr:!1},e),t}var Me=function(e){var t=e.sideCar,r=Te(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return u.createElement(n,C({},r))};Me.isSideCarExport=!0;function Jt(e,t){return e.useMedium(t),Me}var $e=Gt(),re=function(){},Z=u.forwardRef(function(e,t){var r=u.useRef(null),n=u.useState({onScrollCapture:re,onWheelCapture:re,onTouchMoveCapture:re}),o=n[0],a=n[1],l=e.forwardProps,i=e.children,m=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,N=e.noIsolation,s=e.inert,v=e.allowPinchZoom,b=e.as,S=b===void 0?"div":b,w=e.gapMode,y=Te(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,R=qt([r,t]),g=C(C({},y),o);return u.createElement(u.Fragment,null,d&&u.createElement(x,{sideCar:$e,removeScrollBar:c,shards:f,noRelative:h,noIsolation:N,inert:s,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:w}),l?u.cloneElement(u.Children.only(i),C(C({},g),{ref:R})):u.createElement(S,C({},g,{className:m,ref:R}),i))});Z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Z.classNames={fullWidth:V,zeroRight:z};var Ae,Qt=function(){if(Ae)return Ae;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function en(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qt();return t&&e.setAttribute("nonce",t),e}function tn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nn(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var rn=function(){var e=0,t=null;return{add:function(r){e==0&&(t=en())&&(tn(t,r),nn(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},on=function(){var e=rn();return function(t,r){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},_e=function(){var e=on();return function(t){var r=t.styles,n=t.dynamic;return e(r,n),null}},an={left:0,top:0,right:0,gap:0},oe=function(e){return parseInt(e||"",10)||0},un=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[oe(r),oe(n),oe(o)]},ln=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return an;var t=un(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},cn=_e(),j="data-scroll-locked",sn=function(e,t,r,n){var o=e.left,a=e.top,l=e.right,i=e.gap;return r===void 0&&(r="margin"),`
.${Yt} {
overflow: hidden ${n};
padding-right: ${i}px ${n};
}
body[${j}] {
overflow: hidden ${n};
overscroll-behavior: contain;
${[t&&`position: relative ${n};`,r==="margin"&&`
padding-left: ${o}px;
padding-top: ${a}px;
padding-right: ${l}px;
margin-left:0;
margin-top:0;
margin-right: ${i}px ${n};
`,r==="padding"&&`padding-right: ${i}px ${n};`].filter(Boolean).join("")}
}
.${z} {
right: ${i}px ${n};
}
.${V} {
margin-right: ${i}px ${n};
}
.${z} .${z} {
right: 0 ${n};
}
.${V} .${V} {
margin-right: 0 ${n};
}
body[${j}] {
${zt}: ${i}px;
}
`},ke=function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},dn=function(){u.useEffect(function(){return document.body.setAttribute(j,(ke()+1).toString()),function(){var e=ke()-1;e<=0?document.body.removeAttribute(j):document.body.setAttribute(j,e.toString())}},[])},fn=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;dn();var a=u.useMemo(function(){return ln(o)},[o]);return u.createElement(cn,{styles:sn(a,!t,o,r?"":"!important")})},ie=!1;if(typeof window<"u")try{var q=Object.defineProperty({},"passive",{get:function(){return ie=!0,!0}});window.addEventListener("test",q,q),window.removeEventListener("test",q,q)}catch{ie=!1}var A=ie?{passive:!1}:!1,mn=function(e){return e.tagName==="TEXTAREA"},De=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!mn(e)&&r[t]==="visible")},pn=function(e){return De(e,"overflowY")},vn=function(e){return De(e,"overflowX")},je=function(e,t){var r=t.ownerDocument,n=t;do{if(typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host),Ie(e,n)){var o=We(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},hn=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},yn=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ie=function(e,t){return e==="v"?pn(t):vn(t)},We=function(e,t){return e==="v"?hn(t):yn(t)},gn=function(e,t){return e==="h"&&t==="rtl"?-1:1},En=function(e,t,r,n,o){var a=gn(e,window.getComputedStyle(t).direction),l=a*n,i=r.target,m=t.contains(i),c=!1,d=l>0,f=0,p=0;do{if(!i)break;var h=We(e,i),N=h[0],s=h[1]-h[2]-a*N;(N||s)&&Ie(e,i)&&(f+=s,p+=N);var v=i.parentNode;i=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!m&&i!==document.body||m&&(t.contains(i)||t===i));return(d&&(o&&Math.abs(f)<1||!o&&l>f)||!d&&(o&&Math.abs(p)<1||!o&&-l>p))&&(c=!0),c},H=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fe=function(e){return[e.deltaX,e.deltaY]},Be=function(e){return e&&"current"in e?e.current:e},bn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wn=function(e){return`
.block-interactivity-${e} {pointer-events: none;}
.allow-interactivity-${e} {pointer-events: all;}
`},Nn=0,_=[];function Sn(e){var t=u.useRef([]),r=u.useRef([0,0]),n=u.useRef(),o=u.useState(Nn++)[0],a=u.useState(_e)[0],l=u.useRef(e);u.useEffect(function(){l.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${o}`);var s=Kt([e.lockRef.current],(e.shards||[]).map(Be),!0).filter(Boolean);return s.forEach(function(v){return v.classList.add(`allow-interactivity-${o}`)}),function(){document.body.classList.remove(`block-interactivity-${o}`),s.forEach(function(v){return v.classList.remove(`allow-interactivity-${o}`)})}}},[e.inert,e.lockRef.current,e.shards]);var i=u.useCallback(function(s,v){if("touches"in s&&s.touches.length===2||s.type==="wheel"&&s.ctrlKey)return!l.current.allowPinchZoom;var b=H(s),S=r.current,w="deltaX"in s?s.deltaX:S[0]-b[0],y="deltaY"in s?s.deltaY:S[1]-b[1],x,R=s.target,g=Math.abs(w)>Math.abs(y)?"h":"v";if("touches"in s&&g==="h"&&R.type==="range")return!1;var P=je(g,R);if(!P)return!0;if(P?x=g:(x=g==="v"?"h":"v",P=je(g,R)),!P)return!1;if(!n.current&&"changedTouches"in s&&(w||y)&&(n.current=x),!x)return!0;var T=n.current||x;return En(T,v,s,T==="h"?w:y,!0)},[]),m=u.useCallback(function(s){var v=s;if(!(!_.length||_[_.length-1]!==a)){var b="deltaY"in v?Fe(v):H(v),S=t.current.filter(function(y){return y.name===v.type&&(y.target===v.target||v.target===y.shadowParent)&&bn(y.delta,b)})[0];if(S&&S.should){v.cancelable&&v.preventDefault();return}if(!S){var w=(l.current.shards||[]).map(Be).filter(Boolean).filter(function(y){return y.contains(v.target)});(w.length>0?i(v,w[0]):!l.current.noIsolation)&&v.cancelable&&v.preventDefault()}}},[]),c=u.useCallback(function(s,v,b,S){var w={name:s,delta:v,target:b,should:S,shadowParent:Cn(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(y){return y!==w})},1)},[]),d=u.useCallback(function(s){r.current=H(s),n.current=void 0},[]),f=u.useCallback(function(s){c(s.type,Fe(s),s.target,i(s,e.lockRef.current))},[]),p=u.useCallback(function(s){c(s.type,H(s),s.target,i(s,e.lockRef.current))},[]);u.useEffect(function(){return _.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",m,A),document.addEventListener("touchmove",m,A),document.addEventListener("touchstart",d,A),function(){_=_.filter(function(s){return s!==a}),document.removeEventListener("wheel",m,A),document.removeEventListener("touchmove",m,A),document.removeEventListener("touchstart",d,A)}},[]);var h=e.removeScrollBar,N=e.inert;return u.createElement(u.Fragment,null,N?u.createElement(a,{styles:wn(o)}):null,h?u.createElement(fn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Cn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var xn=Jt($e,Sn),Ue=u.forwardRef(function(e,t){return u.createElement(Z,C({},e,{ref:t,sideCar:xn}))});Ue.classNames=Z.classNames;var Rn=Ue;export{L as C,He as E,Je as S,qe as T,k as _,Lt as a,it as b,Tt as c,ye as d,wt as f,M as g,yt as h,Se as i,U as l,G as m,Ut as n,Rt as o,gt as p,Bt as r,Ot as s,Rn as t,ge as u,de as v,F as w,le as x,ce as y};
import{s as fe}from"./chunk-LvLJmgfZ.js";import{t as De}from"./react-BGmjiNul.js";import{G as Pe}from"./cells-BpZ7g6ok.js";import{t as $e}from"./compiler-runtime-DeeZ7FnK.js";import{n as V}from"./useEventListener-DIUKKfEy.js";import{t as Le}from"./jsx-runtime-ZmTK25f3.js";import{t as P}from"./cn-BKtXLv3a.js";import{lt as Fe}from"./input-pAun1m1X.js";import{f as $}from"./Combination-CMPwuAmi.js";import{c as Ke,n as Oe,o as Ve,t as qe}from"./menu-items-CJhvWPOk.js";import{_ as ze,g as Be,h as Ge,p as He}from"./alert-dialog-DwQffb13.js";import{n as Ue,t as Te}from"./dialog-CxGKN4C_.js";import{t as A}from"./dist-CdxIjAOP.js";var pe=1,We=.9,Je=.8,Qe=.17,ee=.1,te=.999,Xe=.9999,Ye=.99,Ze=/[\\\/_+.#"@\[\(\{&]/,et=/[\\\/_+.#"@\[\(\{&]/g,tt=/[\s-]/,ve=/[\s-]/g;function re(t,r,e,n,a,l,o){if(l===r.length)return a===t.length?pe:Ye;var m=`${a},${l}`;if(o[m]!==void 0)return o[m];for(var p=n.charAt(l),c=e.indexOf(p,a),f=0,v,y,x,I;c>=0;)v=re(t,r,e,n,c+1,l+1,o),v>f&&(c===a?v*=pe:Ze.test(t.charAt(c-1))?(v*=Je,x=t.slice(a,c-1).match(et),x&&a>0&&(v*=te**+x.length)):tt.test(t.charAt(c-1))?(v*=We,I=t.slice(a,c-1).match(ve),I&&a>0&&(v*=te**+I.length)):(v*=Qe,a>0&&(v*=te**+(c-a))),t.charAt(c)!==r.charAt(l)&&(v*=Xe)),(v<ee&&e.charAt(c-1)===n.charAt(l+1)||n.charAt(l+1)===n.charAt(l)&&e.charAt(c-1)!==n.charAt(l))&&(y=re(t,r,e,n,c+1,l+2,o),y*ee>v&&(v=y*ee)),v>f&&(f=v),c=e.indexOf(p,c+1);return o[m]=f,f}function he(t){return t.toLowerCase().replace(ve," ")}function rt(t,r,e){return t=e&&e.length>0?`${t+" "+e.join(" ")}`:t,re(t,r,he(t),he(r),0,0,{})}var u=fe(De(),1),q='[cmdk-group=""]',ae='[cmdk-group-items=""]',at='[cmdk-group-heading=""]',ge='[cmdk-item=""]',be=`${ge}:not([aria-disabled="true"])`,ne="cmdk-item-select",L="data-value",nt=(t,r,e)=>rt(t,r,e),we=u.createContext(void 0),z=()=>u.useContext(we),ye=u.createContext(void 0),le=()=>u.useContext(ye),xe=u.createContext(void 0),ke=u.forwardRef((t,r)=>{let e=F(()=>({search:"",value:t.value??t.defaultValue??"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),n=F(()=>new Set),a=F(()=>new Map),l=F(()=>new Map),o=F(()=>new Set),m=Se(t),{label:p,children:c,value:f,onValueChange:v,filter:y,shouldFilter:x,loop:I,disablePointerSelection:Me=!1,vimBindings:H=!0,...B}=t,U=$(),T=$(),K=$(),b=u.useRef(null),N=pt();M(()=>{if(f!==void 0){let i=f.trim();e.current.value=i,S.emit()}},[f]),M(()=>{N(6,ue)},[]);let S=u.useMemo(()=>({subscribe:i=>(o.current.add(i),()=>o.current.delete(i)),snapshot:()=>e.current,setState:(i,d,h)=>{var R;var s,g,w;if(!Object.is(e.current[i],d)){if(e.current[i]=d,i==="search")X(),J(),N(1,Q);else if(i==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let C=document.getElementById(K);C?C.focus():(s=document.getElementById(U))==null||s.focus()}if(N(7,()=>{var C;e.current.selectedItemId=(C=D())==null?void 0:C.id,S.emit()}),h||N(5,ue),((R=m.current)==null?void 0:R.value)!==void 0){let C=d??"";(w=(g=m.current).onValueChange)==null||w.call(g,C);return}}S.emit()}},emit:()=>{o.current.forEach(i=>i())}}),[]),W=u.useMemo(()=>({value:(i,d,h)=>{var s;d!==((s=l.current.get(i))==null?void 0:s.value)&&(l.current.set(i,{value:d,keywords:h}),e.current.filtered.items.set(i,oe(d,h)),N(2,()=>{J(),S.emit()}))},item:(i,d)=>(n.current.add(i),d&&(a.current.has(d)?a.current.get(d).add(i):a.current.set(d,new Set([i]))),N(3,()=>{X(),J(),e.current.value||Q(),S.emit()}),()=>{l.current.delete(i),n.current.delete(i),e.current.filtered.items.delete(i);let h=D();N(4,()=>{X(),(h==null?void 0:h.getAttribute("id"))===i&&Q(),S.emit()})}),group:i=>(a.current.has(i)||a.current.set(i,new Set),()=>{l.current.delete(i),a.current.delete(i)}),filter:()=>m.current.shouldFilter,label:p||t["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:U,inputId:K,labelId:T,listInnerRef:b}),[]);function oe(i,d){var s;let h=((s=m.current)==null?void 0:s.filter)??nt;return i?h(i,e.current.search,d):0}function J(){if(!e.current.search||m.current.shouldFilter===!1)return;let i=e.current.filtered.items,d=[];e.current.filtered.groups.forEach(s=>{let g=a.current.get(s),w=0;g.forEach(R=>{let C=i.get(R);w=Math.max(C,w)}),d.push([s,w])});let h=b.current;O().sort((s,g)=>{let w=s.getAttribute("id"),R=g.getAttribute("id");return(i.get(R)??0)-(i.get(w)??0)}).forEach(s=>{let g=s.closest(ae);g?g.appendChild(s.parentElement===g?s:s.closest(`${ae} > *`)):h.appendChild(s.parentElement===h?s:s.closest(`${ae} > *`))}),d.sort((s,g)=>g[1]-s[1]).forEach(s=>{var w;let g=(w=b.current)==null?void 0:w.querySelector(`${q}[${L}="${encodeURIComponent(s[0])}"]`);g==null||g.parentElement.appendChild(g)})}function Q(){var d;let i=(d=O().find(h=>h.getAttribute("aria-disabled")!=="true"))==null?void 0:d.getAttribute(L);S.setState("value",i||void 0)}function X(){var d,h;if(!e.current.search||m.current.shouldFilter===!1){e.current.filtered.count=n.current.size;return}e.current.filtered.groups=new Set;let i=0;for(let s of n.current){let g=oe(((d=l.current.get(s))==null?void 0:d.value)??"",((h=l.current.get(s))==null?void 0:h.keywords)??[]);e.current.filtered.items.set(s,g),g>0&&i++}for(let[s,g]of a.current)for(let w of g)if(e.current.filtered.items.get(w)>0){e.current.filtered.groups.add(s);break}e.current.filtered.count=i}function ue(){var h,s;var i;let d=D();d&&(((h=d.parentElement)==null?void 0:h.firstChild)===d&&((i=(s=d.closest(q))==null?void 0:s.querySelector(at))==null||i.scrollIntoView({block:"nearest"})),d.scrollIntoView({block:"nearest"}))}function D(){var i;return(i=b.current)==null?void 0:i.querySelector(`${ge}[aria-selected="true"]`)}function O(){var i;return Array.from(((i=b.current)==null?void 0:i.querySelectorAll(be))||[])}function Y(i){let d=O()[i];d&&S.setState("value",d.getAttribute(L))}function Z(i){var d;let h=D(),s=O(),g=s.findIndex(R=>R===h),w=s[g+i];(d=m.current)!=null&&d.loop&&(w=g+i<0?s[s.length-1]:g+i===s.length?s[0]:s[g+i]),w&&S.setState("value",w.getAttribute(L))}function ce(i){var s;let d=(s=D())==null?void 0:s.closest(q),h;for(;d&&!h;)d=i>0?mt(d,q):ft(d,q),h=d==null?void 0:d.querySelector(be);h?S.setState("value",h.getAttribute(L)):Z(i)}let se=()=>Y(O().length-1),de=i=>{i.preventDefault(),i.metaKey?se():i.altKey?ce(1):Z(1)},me=i=>{i.preventDefault(),i.metaKey?Y(0):i.altKey?ce(-1):Z(-1)};return u.createElement(A.div,{ref:r,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:i=>{var d;(d=B.onKeyDown)==null||d.call(B,i);let h=i.nativeEvent.isComposing||i.keyCode===229;if(!(i.defaultPrevented||h))switch(i.key){case"n":case"j":H&&i.ctrlKey&&de(i);break;case"ArrowDown":de(i);break;case"p":case"k":H&&i.ctrlKey&&me(i);break;case"ArrowUp":me(i);break;case"Home":i.preventDefault(),Y(0);break;case"End":i.preventDefault(),se();break;case"Enter":{i.preventDefault();let s=D();if(s){let g=new Event(ne);s.dispatchEvent(g)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:W.inputId,id:W.labelId,style:ht},p),G(t,i=>u.createElement(ye.Provider,{value:S},u.createElement(we.Provider,{value:W},i))))}),lt=u.forwardRef((t,r)=>{var K;let e=$(),n=u.useRef(null),a=u.useContext(xe),l=z(),o=Se(t),m=((K=o.current)==null?void 0:K.forceMount)??(a==null?void 0:a.forceMount);M(()=>{if(!m)return l.item(e,a==null?void 0:a.id)},[m]);let p=Ne(e,n,[t.value,t.children,n],t.keywords),c=le(),f=_(b=>b.value&&b.value===p.current),v=_(b=>m||l.filter()===!1?!0:b.search?b.filtered.items.get(e)>0:!0);u.useEffect(()=>{let b=n.current;if(!(!b||t.disabled))return b.addEventListener(ne,y),()=>b.removeEventListener(ne,y)},[v,t.onSelect,t.disabled]);function y(){var b,N;x(),(N=(b=o.current).onSelect)==null||N.call(b,p.current)}function x(){c.setState("value",p.current,!0)}if(!v)return null;let{disabled:I,value:Me,onSelect:H,forceMount:B,keywords:U,...T}=t;return u.createElement(A.div,{ref:V(n,r),...T,id:e,"cmdk-item":"",role:"option","aria-disabled":!!I,"aria-selected":!!f,"data-disabled":!!I,"data-selected":!!f,onPointerMove:I||l.getDisablePointerSelection()?void 0:x,onClick:I?void 0:y},t.children)}),it=u.forwardRef((t,r)=>{let{heading:e,children:n,forceMount:a,...l}=t,o=$(),m=u.useRef(null),p=u.useRef(null),c=$(),f=z(),v=_(x=>a||f.filter()===!1?!0:x.search?x.filtered.groups.has(o):!0);M(()=>f.group(o),[]),Ne(o,m,[t.value,t.heading,p]);let y=u.useMemo(()=>({id:o,forceMount:a}),[a]);return u.createElement(A.div,{ref:V(m,r),...l,"cmdk-group":"",role:"presentation",hidden:v?void 0:!0},e&&u.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:c},e),G(t,x=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":e?c:void 0},u.createElement(xe.Provider,{value:y},x))))}),ot=u.forwardRef((t,r)=>{let{alwaysRender:e,...n}=t,a=u.useRef(null),l=_(o=>!o.search);return!e&&!l?null:u.createElement(A.div,{ref:V(a,r),...n,"cmdk-separator":"",role:"separator"})}),ut=u.forwardRef((t,r)=>{let{onValueChange:e,...n}=t,a=t.value!=null,l=le(),o=_(c=>c.search),m=_(c=>c.selectedItemId),p=z();return u.useEffect(()=>{t.value!=null&&l.setState("search",t.value)},[t.value]),u.createElement(A.input,{ref:r,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":m,id:p.inputId,type:"text",value:a?t.value:o,onChange:c=>{a||l.setState("search",c.target.value),e==null||e(c.target.value)}})}),Ee=u.forwardRef((t,r)=>{let{children:e,label:n="Suggestions",...a}=t,l=u.useRef(null),o=u.useRef(null),m=_(c=>c.selectedItemId),p=z();return u.useEffect(()=>{if(o.current&&l.current){let c=o.current,f=l.current,v,y=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let x=c.offsetHeight;f.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return y.observe(c),()=>{cancelAnimationFrame(v),y.unobserve(c)}}},[]),u.createElement(A.div,{ref:V(l,r),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":n,id:p.listId},G(t,c=>u.createElement("div",{ref:V(o,p.listInnerRef),"cmdk-list-sizer":""},c)))}),ct=u.forwardRef((t,r)=>{let{open:e,onOpenChange:n,overlayClassName:a,contentClassName:l,container:o,...m}=t;return u.createElement(ze,{open:e,onOpenChange:n},u.createElement(Be,{container:o},u.createElement(Ge,{"cmdk-overlay":"",className:a}),u.createElement(He,{"aria-label":t.label,"cmdk-dialog":"",className:l},u.createElement(ke,{ref:r,...m}))))}),st=u.forwardRef((t,r)=>_(e=>e.filtered.count===0)?u.createElement(A.div,{ref:r,...t,"cmdk-empty":"",role:"presentation"}):null),dt=u.forwardRef((t,r)=>{let{progress:e,children:n,label:a="Loading...",...l}=t;return u.createElement(A.div,{ref:r,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},G(t,o=>u.createElement("div",{"aria-hidden":!0},o)))}),k=Object.assign(ke,{List:Ee,Item:lt,Input:ut,Group:it,Separator:ot,Dialog:ct,Empty:st,Loading:dt});function mt(t,r){let e=t.nextElementSibling;for(;e;){if(e.matches(r))return e;e=e.nextElementSibling}}function ft(t,r){let e=t.previousElementSibling;for(;e;){if(e.matches(r))return e;e=e.previousElementSibling}}function Se(t){let r=u.useRef(t);return M(()=>{r.current=t}),r}var M=typeof window>"u"?u.useEffect:u.useLayoutEffect;function F(t){let r=u.useRef();return r.current===void 0&&(r.current=t()),r}function _(t){let r=le(),e=()=>t(r.snapshot());return u.useSyncExternalStore(r.subscribe,e,e)}function Ne(t,r,e,n=[]){let a=u.useRef(),l=z();return M(()=>{var o;let m=(()=>{var c;for(let f of e){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(c=f.current.textContent)==null?void 0:c.trim():a.current}})(),p=n.map(c=>c.trim());l.value(t,m,p),(o=r.current)==null||o.setAttribute(L,m),a.current=m}),a}var pt=()=>{let[t,r]=u.useState(),e=F(()=>new Map);return M(()=>{e.current.forEach(n=>n()),e.current=new Map},[t]),(n,a)=>{e.current.set(n,a),r({})}};function vt(t){let r=t.type;return typeof r=="function"?r(t.props):"render"in r?r.render(t.props):t}function G({asChild:t,children:r},e){return t&&u.isValidElement(r)?u.cloneElement(vt(r),{ref:r.ref},e(r.props.children)):e(r)}var ht={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},j=$e(),E=fe(Le(),1),ie=u.forwardRef((t,r)=>{let e=(0,j.c)(9),n,a;e[0]===t?(n=e[1],a=e[2]):({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a);let l;e[3]===n?l=e[4]:(l=P("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",n),e[3]=n,e[4]=l);let o;return e[5]!==a||e[6]!==r||e[7]!==l?(o=(0,E.jsx)(k,{ref:r,className:l,...a}),e[5]=a,e[6]=r,e[7]=l,e[8]=o):o=e[8],o});ie.displayName=k.displayName;var gt=t=>{let r=(0,j.c)(8),e,n;r[0]===t?(e=r[1],n=r[2]):({children:e,...n}=t,r[0]=t,r[1]=e,r[2]=n);let a;r[3]===e?a=r[4]:(a=(0,E.jsx)(Ue,{className:"overflow-hidden p-0 shadow-2xl",usePortal:!0,children:(0,E.jsx)(ie,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})}),r[3]=e,r[4]=a);let l;return r[5]!==n||r[6]!==a?(l=(0,E.jsx)(Te,{...n,children:a}),r[5]=n,r[6]=a,r[7]=l):l=r[7],l},Ie=u.forwardRef((t,r)=>{let e=(0,j.c)(19),n,a,l,o;e[0]===t?(n=e[1],a=e[2],l=e[3],o=e[4]):({className:n,icon:a,rootClassName:o,...l}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=l,e[4]=o);let m;e[5]===o?m=e[6]:(m=P("flex items-center border-b px-3",o),e[5]=o,e[6]=m);let p;e[7]===a?p=e[8]:(p=a===null?null:(0,E.jsx)(Fe,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e[7]=a,e[8]=p);let c;e[9]===n?c=e[10]:(c=P("placeholder:text-foreground-muted flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),e[9]=n,e[10]=c);let f;e[11]!==l||e[12]!==r||e[13]!==c?(f=(0,E.jsx)(k.Input,{ref:r,className:c,...l}),e[11]=l,e[12]=r,e[13]=c,e[14]=f):f=e[14];let v;return e[15]!==m||e[16]!==p||e[17]!==f?(v=(0,E.jsxs)("div",{className:m,"cmdk-input-wrapper":"",children:[p,f]}),e[15]=m,e[16]=p,e[17]=f,e[18]=v):v=e[18],v});Ie.displayName=k.Input.displayName;var Ce=u.forwardRef((t,r)=>{let e=(0,j.c)(9),n,a;e[0]===t?(n=e[1],a=e[2]):({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a);let l;e[3]===n?l=e[4]:(l=P("max-h-[300px] overflow-y-auto overflow-x-hidden",n),e[3]=n,e[4]=l);let o;return e[5]!==a||e[6]!==r||e[7]!==l?(o=(0,E.jsx)(k.List,{ref:r,className:l,...a}),e[5]=a,e[6]=r,e[7]=l,e[8]=o):o=e[8],o});Ce.displayName=k.List.displayName;var Re=u.forwardRef((t,r)=>{let e=(0,j.c)(3),n;return e[0]!==t||e[1]!==r?(n=(0,E.jsx)(k.Empty,{ref:r,className:"py-6 text-center text-sm",...t}),e[0]=t,e[1]=r,e[2]=n):n=e[2],n});Re.displayName=k.Empty.displayName;var Ae=u.forwardRef((t,r)=>{let e=(0,j.c)(9),n,a;e[0]===t?(n=e[1],a=e[2]):({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a);let l;e[3]===n?l=e[4]:(l=P("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",n),e[3]=n,e[4]=l);let o;return e[5]!==a||e[6]!==r||e[7]!==l?(o=(0,E.jsx)(k.Group,{ref:r,className:l,...a}),e[5]=a,e[6]=r,e[7]=l,e[8]=o):o=e[8],o});Ae.displayName=k.Group.displayName;var _e=u.forwardRef((t,r)=>{let e=(0,j.c)(9),n,a;e[0]===t?(n=e[1],a=e[2]):({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a);let l;e[3]===n?l=e[4]:(l=Ke({className:n}),e[3]=n,e[4]=l);let o;return e[5]!==a||e[6]!==r||e[7]!==l?(o=(0,E.jsx)(k.Separator,{ref:r,className:l,...a}),e[5]=a,e[6]=r,e[7]=l,e[8]=o):o=e[8],o});_e.displayName=k.Separator.displayName;var je=u.forwardRef((t,r)=>{let e=(0,j.c)(17),n,a,l,o,m;if(e[0]!==r||e[1]!==t){let{className:c,variant:f,inset:v,...y}=t;n=k.Item,a=r,e[7]!==c||e[8]!==v||e[9]!==f?(l=P(Ve({variant:f,inset:v}).replace(qe,"data-[disabled=false]:pointer-events-all data-[disabled=false]:opacity-100 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"),c),e[7]=c,e[8]=v,e[9]=f,e[10]=l):l=e[10],o=y,m=Pe.htmlEscape(y.value),e[0]=r,e[1]=t,e[2]=n,e[3]=a,e[4]=l,e[5]=o,e[6]=m}else n=e[2],a=e[3],l=e[4],o=e[5],m=e[6];let p;return e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==o||e[15]!==m?(p=(0,E.jsx)(n,{ref:a,className:l,...o,value:m}),e[11]=n,e[12]=a,e[13]=l,e[14]=o,e[15]=m,e[16]=p):p=e[16],p});je.displayName=k.Item.displayName;var bt=Oe;export{Ie as a,_e as c,Ae as i,bt as l,gt as n,je as o,Re as r,Ce as s,ie as t,Ee as u};
import{s as V}from"./chunk-LvLJmgfZ.js";import{l as X,u as L}from"./useEvent-DO6uJBas.js";import{t as Y}from"./react-BGmjiNul.js";import{Wr as Z}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as T}from"./compiler-runtime-DeeZ7FnK.js";import"./tooltip-BGrCWNss.js";import{S as ee}from"./ai-model-dropdown-71lgLrLy.js";import{a as le,i as te,l as ie}from"./hotkeys-BHHWjLlp.js";import{p as ae,v as oe,y as re}from"./utils-DXvhzCGS.js";import"./config-CIrPQIbt.js";import{i as ne}from"./switch-8sn_4qbh.js";import{t as pe}from"./useEventListener-DIUKKfEy.js";import{t as se}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./JsonOutput-CknFTI_u.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{r as de}from"./requests-BsVD4CdD.js";import"./layout-B1RE_FQ4.js";import"./download-BhCZMKuQ.js";import{t as me}from"./useCellActionButton-DNI-LzxR.js";import"./markdown-renderer-DhMlG2dP.js";import{i as he,t as ce}from"./useNotebookActions-BkFpDvzl.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import"./Combination-CMPwuAmi.js";import"./dates-Dhn1r-h6.js";import"./popover-Gz-GJzym.js";import"./share-CbPtIlnM.js";import"./vega-loader.browser-CRZ52CKf.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import"./purify.es-DNVQZNFu.js";import{a as ye,c as fe,i as W,l as z,n as ue,o as J,r as be,s as ge}from"./command-DhzFN2CJ.js";import"./chunk-5FQGJX7Z-CVUXBqX6.js";import"./katex-Dc8yG8NU.js";import"./html-to-image-DjukyIj4.js";import{r as ke}from"./focus-D51fcwZX.js";import{t as K}from"./renderShortcut-DEwfrKeS.js";import"./esm-DpMp6qko.js";import"./name-cell-input-FC1vzor8.js";import"./multi-icon-DZsiUPo5.js";import"./dist-C9XNJlLJ.js";import"./dist-fsvXrTzp.js";import"./dist-6cIjG-FS.js";import"./dist-CldbmzwA.js";import"./dist-OM63llNV.js";import"./dist-BmvOPdv_.js";import"./dist-DDGPBuw4.js";import"./dist-C4h-1T2Q.js";import"./dist-D_XLVesh.js";import"./esm-l4kcybiY.js";var Ce=T(),je=V(Y(),1);function xe(e,l){let t=(0,Ce.c)(11),n;t[0]===l?n=t[1]:(n=new Z(l),t[0]=l,t[1]=n);let p=n,r;t[2]!==e||t[3]!==p?(r=()=>p.get(e),t[2]=e,t[3]=p,t[4]=r):r=t[4];let[m,g]=(0,je.useState)(r),i;t[5]!==e||t[6]!==p?(i=k=>{g(k),p.set(e,k)},t[5]=e,t[6]=p,t[7]=i):i=t[7];let f=i,h;return t[8]!==f||t[9]!==m?(h=[m,f],t[8]=f,t[9]=m,t[10]=h):h=t[10],h}var ve=T(),Se=3;function we(){let e=(0,ve.c)(7),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];let[t,n]=xe("marimo:commands",l),p;e[1]!==t||e[2]!==n?(p=m=>{n(_e([m,...t]).slice(0,Se))},e[1]=t,e[2]=n,e[3]=p):p=e[3];let r;return e[4]!==t||e[5]!==p?(r={recentCommands:t,addRecentCommand:p},e[4]=t,e[5]=p,e[6]=r):r=e[6],r}function _e(e){return[...new Set(e)]}function Q(e){return e.dropdown!==void 0}function U(e,l=""){return e.flatMap(t=>t.label?Q(t)?U(t.dropdown,`${l+t.label} > `):{...t,label:l+t.label}:[])}var He=T();function Ae(){let e=(0,He.c)(75),[l,t]=re(),[n,p]=oe(),{saveAppConfig:r,saveUserConfig:m}=de(),g;e[0]!==m||e[1]!==t?(g=async d=>{await m({config:d}).then(()=>{t(c=>({...c,...d}))})},e[0]=m,e[1]=t,e[2]=g):g=e[2];let i=g,f;e[3]!==r||e[4]!==p?(f=async d=>{await r({config:d}).then(()=>{p(d)})},e[3]=r,e[4]=p,e[5]=f):f=e[5];let h=f,k;if(e[6]!==n||e[7]!==l.completion||e[8]!==l.display||e[9]!==l.keymap||e[10]!==h||e[11]!==i){let d;e[13]===n?d=e[14]:(d=O=>O!==n.width,e[13]=n,e[14]=d);let c;e[15]!==n||e[16]!==h?(c=O=>({label:`App config > Set width=${O}`,handle:()=>{h({...n,width:O})}}),e[15]=n,e[16]=h,e[17]=c):c=e[17];let H;e[18]!==l.display||e[19]!==i?(H={label:"Config > Set theme: dark",handle:()=>{i({display:{...l.display,theme:"dark"}})}},e[18]=l.display,e[19]=i,e[20]=H):H=e[20];let C;e[21]!==l.display||e[22]!==i?(C={label:"Config > Set theme: light",handle:()=>{i({display:{...l.display,theme:"light"}})}},e[21]=l.display,e[22]=i,e[23]=C):C=e[23];let A;e[24]!==l.display||e[25]!==i?(A={label:"Config > Set theme: system",handle:()=>{i({display:{...l.display,theme:"system"}})}},e[24]=l.display,e[25]=i,e[26]=A):A=e[26];let P=l.keymap.preset==="vim",M;e[27]!==l.keymap||e[28]!==i?(M=()=>{i({keymap:{...l.keymap,preset:"vim"}})},e[27]=l.keymap,e[28]=i,e[29]=M):M=e[29];let N;e[30]!==P||e[31]!==M?(N={label:"Config > Switch keymap to VIM",hidden:P,handle:M},e[30]=P,e[31]=M,e[32]=N):N=e[32];let D=l.keymap.preset==="default",j;e[33]!==l.keymap||e[34]!==i?(j=()=>{i({keymap:{...l.keymap,preset:"default"}})},e[33]=l.keymap,e[34]=i,e[35]=j):j=e[35];let u;e[36]!==D||e[37]!==j?(u={label:"Config > Switch keymap to default (current: VIM)",hidden:D,handle:j},e[36]=D,e[37]=j,e[38]=u):u=e[38];let x;e[39]!==l.completion||e[40]!==i?(x=()=>{i({completion:{...l.completion,copilot:!1}})},e[39]=l.completion,e[40]=i,e[41]=x):x=e[41];let v=l.completion.copilot!=="github",$;e[42]!==x||e[43]!==v?($={label:"Config > Disable GitHub Copilot",handle:x,hidden:v},e[42]=x,e[43]=v,e[44]=$):$=e[44];let S;e[45]!==l.completion||e[46]!==i?(S=()=>{i({completion:{...l.completion,copilot:"github"}})},e[45]=l.completion,e[46]=i,e[47]=S):S=e[47];let I=l.completion.copilot==="github",q;e[48]!==S||e[49]!==I?(q={label:"Config > Enable GitHub Copilot",handle:S,hidden:I},e[48]=S,e[49]=I,e[50]=q):q=e[50];let B=!l.display.reference_highlighting,w;e[51]!==l.display||e[52]!==i?(w=()=>{i({display:{...l.display,reference_highlighting:!1}})},e[51]=l.display,e[52]=i,e[53]=w):w=e[53];let b;e[54]!==B||e[55]!==w?(b={label:"Config > Disable reference highlighting",hidden:B,handle:w},e[54]=B,e[55]=w,e[56]=b):b=e[56];let y;e[57]!==l.display||e[58]!==i?(y=()=>{i({display:{...l.display,reference_highlighting:!0}})},e[57]=l.display,e[58]=i,e[59]=y):y=e[59];let F;e[60]!==l.display.reference_highlighting||e[61]!==y?(F={label:"Config > Enable reference highlighting",hidden:l.display.reference_highlighting,handle:y},e[60]=l.display.reference_highlighting,e[61]=y,e[62]=F):F=e[62];let o=l.display.cell_output==="above",a;e[63]!==l.display||e[64]!==i?(a=()=>{i({display:{...l.display,cell_output:"above"}})},e[63]=l.display,e[64]=i,e[65]=a):a=e[65];let R;e[66]!==o||e[67]!==a?(R={label:"Config > Set cell output area: above",hidden:o,handle:a},e[66]=o,e[67]=a,e[68]=R):R=e[68];let _=l.display.cell_output==="below",E;e[69]!==l.display||e[70]!==i?(E=()=>{i({display:{...l.display,cell_output:"below"}})},e[69]=l.display,e[70]=i,e[71]=E):E=e[71];let G;e[72]!==_||e[73]!==E?(G={label:"Config > Set cell output area: below",hidden:_,handle:E},e[72]=_,e[73]=E,e[74]=G):G=e[74],k=[...ee().filter(d).map(c),H,C,A,N,u,$,q,b,F,R,G].filter(Me),e[6]=n,e[7]=l.completion,e[8]=l.display,e[9]=l.keymap,e[10]=h,e[11]=i,e[12]=k}else k=e[12];return k}function Me(e){return!e.hidden}var Ne=T(),s=V(se(),1),De=()=>{let e=(0,Ne.c)(37),[l,t]=X(he),n=ne(),p=L(ke),r=L(ae),m;e[0]===p?m=e[1]:(m={cell:p},e[0]=p,e[1]=m);let g=me(m).flat();g=U(g);let i=Ae(),f=ce();f=[...U(f),...U(i)];let h=f.filter(Fe),k=le.keyBy(h,Re),{recentCommands:d,addRecentCommand:c}=we(),H;e[2]===d?H=e[3]:(H=new Set(d),e[2]=d,e[3]=H);let C=H,A;e[4]!==r||e[5]!==t?(A=o=>{ie(r.getHotkey("global.commandPalette").key)(o)&&(o.preventDefault(),t(Ee))},e[4]=r,e[5]=t,e[6]=A):A=e[6],pe(document,"keydown",A);let P;e[7]!==c||e[8]!==r||e[9]!==n||e[10]!==t?(P=(o,a)=>{let R=n[o];if(!R)return null;let _=r.getHotkey(o);return(0,s.jsxs)(J,{disabled:a.disabled,onSelect:()=>{c(o),t(!1),requestAnimationFrame(()=>{R()})},value:_.name,children:[(0,s.jsxs)("span",{children:[_.name,a.tooltip&&(0,s.jsx)("span",{className:"ml-2",children:a.tooltip})]}),(0,s.jsx)(z,{children:(0,s.jsx)(K,{shortcut:_.key})})]},o)},e[7]=c,e[8]=r,e[9]=n,e[10]=t,e[11]=P):P=e[11];let M=P,N;e[12]!==c||e[13]!==r||e[14]!==t?(N=o=>{let{label:a,handle:R,props:_,hotkey:E}=o,G=_===void 0?{}:_;return(0,s.jsxs)(J,{disabled:G.disabled,onSelect:()=>{c(a),t(!1),requestAnimationFrame(()=>{R()})},value:a,children:[(0,s.jsxs)("span",{children:[a,G.tooltip&&(0,s.jsxs)("span",{className:"ml-2",children:["(",G.tooltip,")"]})]}),E&&(0,s.jsx)(z,{children:(0,s.jsx)(K,{shortcut:r.getHotkey(E).key})})]},a)},e[12]=c,e[13]=r,e[14]=t,e[15]=N):N=e[15];let D=N,j=ue,u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=(0,s.jsx)(ye,{placeholder:"Type to search..."}),e[16]=u):u=e[16];let x=ge,v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=(0,s.jsx)(be,{children:"No results found."}),e[17]=v):v=e[17];let $=d.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W,{heading:"Recently Used",children:d.map(o=>{let a=k[o];return te(o)?M(o,{disabled:a==null?void 0:a.disabled,tooltip:a==null?void 0:a.tooltip}):a&&!Q(a)?D({label:a.label,handle:a.handleHeadless||a.handle,props:{disabled:a.disabled,tooltip:a.tooltip}}):null})}),(0,s.jsx)(fe,{})]}),S=W,I=r.iterate().map(o=>{if(C.has(o))return null;let a=k[o];return M(o,{disabled:a==null?void 0:a.disabled,tooltip:a==null?void 0:a.tooltip})}),q=h.map(o=>C.has(o.label)?null:D({label:o.label,handle:o.handleHeadless||o.handle,props:{disabled:o.disabled,tooltip:o.tooltip}})),B;e[18]!==C||e[19]!==D?(B=o=>C.has(o.label)?null:D({label:`Cell > ${o.label}`,handle:o.handleHeadless||o.handle,props:{disabled:o.disabled,tooltip:o.tooltip}}),e[18]=C,e[19]=D,e[20]=B):B=e[20];let w=g.map(B),b;e[21]!==S||e[22]!==q||e[23]!==w||e[24]!==I?(b=(0,s.jsxs)(S,{heading:"Commands",children:[I,q,w]}),e[21]=S,e[22]=q,e[23]=w,e[24]=I,e[25]=b):b=e[25];let y;e[26]!==x||e[27]!==b||e[28]!==v||e[29]!==$?(y=(0,s.jsxs)(x,{children:[v,$,b]}),e[26]=x,e[27]=b,e[28]=v,e[29]=$,e[30]=y):y=e[30];let F;return e[31]!==j||e[32]!==l||e[33]!==t||e[34]!==y||e[35]!==u?(F=(0,s.jsxs)(j,{open:l,onOpenChange:t,children:[u,y]}),e[31]=j,e[32]=l,e[33]=t,e[34]=y,e[35]=u,e[36]=F):F=e[36],F};function Fe(e){return!e.hotkey}function Re(e){return e.label}function Ee(e){return!e}export{De as default};
import{s as j}from"./chunk-LvLJmgfZ.js";import{t as w}from"./react-BGmjiNul.js";import{k}from"./cells-BpZ7g6ok.js";import{t as g}from"./compiler-runtime-DeeZ7FnK.js";import{t as N}from"./jsx-runtime-ZmTK25f3.js";import{t as y}from"./badge-Ce8wRjuQ.js";import{t as C}from"./use-toast-rmUWldD_.js";import{i as _,r as b,t as I}from"./popover-Gz-GJzym.js";import{t as S}from"./copy-Bv2DBpIS.js";import{t as v}from"./cell-link-Bw5bzt4a.js";var O=g(),i=j(N(),1);const B=p=>{let e=(0,O.c)(18),{maxCount:n,cellIds:r,onClick:t,skipScroll:o}=p,m=k(),l,a,c;if(e[0]!==r||e[1]!==m||e[2]!==n||e[3]!==t||e[4]!==o){c=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===m?f=e[9]:(f=(s,x)=>m.inOrderIds.indexOf(s)-m.inOrderIds.indexOf(x),e[8]=m,e[9]=f);let u=[...r].sort(f);if(r.length===0){let s;e[10]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)("div",{className:"text-muted-foreground",children:"--"}),e[10]=s):s=e[10],c=s;break e}let h;e[11]!==r.length||e[12]!==t||e[13]!==o?(h=(s,x)=>(0,i.jsxs)("span",{className:"truncate",children:[(0,i.jsx)(v,{variant:"focus",cellId:s,skipScroll:o,className:"whitespace-nowrap",onClick:t?()=>t(s):void 0},s),x<r.length-1&&", "]},s),e[11]=r.length,e[12]=t,e[13]=o,e[14]=h):h=e[14],l=u.slice(0,n).map(h),a=r.length>n&&(0,i.jsxs)(I,{children:[(0,i.jsx)(_,{asChild:!0,children:(0,i.jsxs)("span",{className:"whitespace-nowrap text-muted-foreground text-xs hover:underline cursor-pointer",children:["+",r.length-n," more"]})}),(0,i.jsx)(b,{className:"w-auto",children:(0,i.jsx)("div",{className:"flex flex-col gap-1 py-1",children:u.slice(n).map(s=>(0,i.jsx)(v,{variant:"focus",cellId:s,className:"whitespace-nowrap",onClick:t?()=>t(s):void 0},s))})})]})}e[0]=r,e[1]=m,e[2]=n,e[3]=t,e[4]=o,e[5]=l,e[6]=a,e[7]=c}else l=e[5],a=e[6],c=e[7];if(c!==Symbol.for("react.early_return_sentinel"))return c;let d;return e[15]!==l||e[16]!==a?(d=(0,i.jsxs)(i.Fragment,{children:[l,a]}),e[15]=l,e[16]=a,e[17]=d):d=e[17],d};var F=g();w();const q=p=>{let e=(0,F.c)(15),n,r,t,o;e[0]===p?(n=e[1],r=e[2],t=e[3],o=e[4]):({name:r,declaredBy:n,onClick:t,...o}=p,e[0]=p,e[1]=n,e[2]=r,e[3]=t,e[4]=o);let m=n.length>1?"destructive":"outline",l;e[5]!==r||e[6]!==t?(l=async d=>{if(t){t(d);return}await S(r),C({title:"Copied to clipboard"})},e[5]=r,e[6]=t,e[7]=l):l=e[7];let a;e[8]!==r||e[9]!==m||e[10]!==l?(a=(0,i.jsx)(y,{title:r,variant:m,className:"rounded-sm text-ellipsis block overflow-hidden max-w-fit cursor-pointer font-medium",onClick:l,children:r}),e[8]=r,e[9]=m,e[10]=l,e[11]=a):a=e[11];let c;return e[12]!==o||e[13]!==a?(c=(0,i.jsx)("div",{className:"max-w-[130px]",...o,children:a}),e[12]=o,e[13]=a,e[14]=c):c=e[14],c};export{B as n,q as t};
const e=JSON.parse(`{"select":{"description":"Retrieves data from one or more tables","syntax":"SELECT column1, column2, ... FROM table_name","example":"SELECT name, email FROM users WHERE active = true"},"from":{"description":"Specifies which table to select data from","syntax":"FROM table_name","example":"FROM users u JOIN orders o ON u.id = o.user_id"},"where":{"description":"Filters records based on specified conditions","syntax":"WHERE condition","example":"WHERE age > 18 AND status = 'active'"},"join":{"description":"Combines rows from two or more tables based on a related column","syntax":"JOIN table_name ON condition","example":"JOIN orders ON users.id = orders.user_id"},"inner":{"description":"Returns records that have matching values in both tables","syntax":"INNER JOIN table_name ON condition","example":"INNER JOIN orders ON users.id = orders.user_id"},"left":{"description":"Returns all records from the left table and matching records from the right","syntax":"LEFT JOIN table_name ON condition","example":"LEFT JOIN orders ON users.id = orders.user_id"},"right":{"description":"Returns all records from the right table and matching records from the left","syntax":"RIGHT JOIN table_name ON condition","example":"RIGHT JOIN users ON users.id = orders.user_id"},"full":{"description":"Returns all records when there is a match in either left or right table","syntax":"FULL OUTER JOIN table_name ON condition","example":"FULL OUTER JOIN orders ON users.id = orders.user_id"},"outer":{"description":"Used with FULL to return all records from both tables","syntax":"FULL OUTER JOIN table_name ON condition","example":"FULL OUTER JOIN orders ON users.id = orders.user_id"},"cross":{"description":"Returns the Cartesian product of both tables","syntax":"CROSS JOIN table_name","example":"CROSS JOIN colors"},"order":{"description":"Sorts the result set in ascending or descending order","syntax":"ORDER BY column_name [ASC|DESC]","example":"ORDER BY created_at DESC, name ASC"},"by":{"description":"Used with ORDER BY and GROUP BY clauses","syntax":"ORDER BY column_name or GROUP BY column_name","example":"ORDER BY name ASC or GROUP BY category"},"group":{"description":"Groups rows that have the same values into summary rows","syntax":"GROUP BY column_name","example":"GROUP BY category HAVING COUNT(*) > 5"},"having":{"description":"Filters groups based on specified conditions (used with GROUP BY)","syntax":"HAVING condition","example":"GROUP BY category HAVING COUNT(*) > 5"},"insert":{"description":"Adds new records to a table","syntax":"INSERT INTO table_name (columns) VALUES (values)","example":"INSERT INTO users (name, email) VALUES ('John', 'john@example.com')"},"into":{"description":"Specifies the target table for INSERT statements","syntax":"INSERT INTO table_name","example":"INSERT INTO users (name, email) VALUES ('John', 'john@example.com')"},"values":{"description":"Specifies the values to insert into a table","syntax":"VALUES (value1, value2, ...)","example":"VALUES ('John', 'john@example.com', true)"},"update":{"description":"Modifies existing records in a table","syntax":"UPDATE table_name SET column = value WHERE condition","example":"UPDATE users SET email = 'new@example.com' WHERE id = 1"},"set":{"description":"Specifies which columns to update and their new values","syntax":"SET column1 = value1, column2 = value2","example":"SET name = 'John', email = 'john@example.com'"},"delete":{"description":"Removes records from a table","syntax":"DELETE FROM table_name WHERE condition","example":"DELETE FROM users WHERE active = false"},"create":{"description":"Creates a new table, database, or other database object","syntax":"CREATE TABLE table_name (column definitions)","example":"CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100))"},"table":{"description":"Specifies a table in CREATE, ALTER, or DROP statements","syntax":"CREATE TABLE table_name or ALTER TABLE table_name","example":"CREATE TABLE users (id INT, name VARCHAR(100))"},"drop":{"description":"Deletes a table, database, or other database object","syntax":"DROP TABLE table_name","example":"DROP TABLE old_users"},"alter":{"description":"Modifies an existing database object","syntax":"ALTER TABLE table_name ADD/DROP/MODIFY column","example":"ALTER TABLE users ADD COLUMN phone VARCHAR(20)"},"add":{"description":"Adds a new column or constraint to a table","syntax":"ALTER TABLE table_name ADD column_name data_type","example":"ALTER TABLE users ADD phone VARCHAR(20)"},"column":{"description":"Specifies a column in table operations","syntax":"ADD COLUMN column_name or DROP COLUMN column_name","example":"ADD COLUMN created_at TIMESTAMP DEFAULT NOW()"},"primary":{"description":"Defines a primary key constraint","syntax":"PRIMARY KEY (column_name)","example":"CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100))"},"key":{"description":"Used with PRIMARY or FOREIGN to define constraints","syntax":"PRIMARY KEY or FOREIGN KEY","example":"PRIMARY KEY (id) or FOREIGN KEY (user_id) REFERENCES users(id)"},"foreign":{"description":"Defines a foreign key constraint","syntax":"FOREIGN KEY (column_name) REFERENCES table_name(column_name)","example":"FOREIGN KEY (user_id) REFERENCES users(id)"},"references":{"description":"Specifies the referenced table and column for foreign keys","syntax":"REFERENCES table_name(column_name)","example":"FOREIGN KEY (user_id) REFERENCES users(id)"},"unique":{"description":"Ensures all values in a column are unique","syntax":"UNIQUE (column_name)","example":"CREATE TABLE users (email VARCHAR(255) UNIQUE)"},"constraint":{"description":"Names a constraint for easier management","syntax":"CONSTRAINT constraint_name constraint_type","example":"CONSTRAINT fk_user FOREIGN KEY (user_id) REFERENCES users(id)"},"check":{"description":"Defines a condition that must be true for all rows","syntax":"CHECK (condition)","example":"CHECK (age >= 18)"},"default":{"description":"Specifies a default value for a column","syntax":"column_name data_type DEFAULT value","example":"created_at TIMESTAMP DEFAULT NOW()"},"index":{"description":"Creates an index to improve query performance","syntax":"CREATE INDEX index_name ON table_name (column_name)","example":"CREATE INDEX idx_user_email ON users (email)"},"view":{"description":"Creates a virtual table based on a SELECT statement","syntax":"CREATE VIEW view_name AS SELECT ...","example":"CREATE VIEW active_users AS SELECT * FROM users WHERE active = true"},"limit":{"description":"Restricts the number of records returned","syntax":"LIMIT number","example":"SELECT * FROM users LIMIT 10"},"offset":{"description":"Skips a specified number of rows before returning results","syntax":"OFFSET number","example":"SELECT * FROM users LIMIT 10 OFFSET 20"},"top":{"description":"Limits the number of records returned (SQL Server syntax)","syntax":"SELECT TOP number columns FROM table","example":"SELECT TOP 10 * FROM users"},"fetch":{"description":"Retrieves a specific number of rows (modern SQL standard)","syntax":"OFFSET number ROWS FETCH NEXT number ROWS ONLY","example":"OFFSET 10 ROWS FETCH NEXT 5 ROWS ONLY"},"with":{"description":"Defines a Common Table Expression (CTE)","syntax":"WITH cte_name AS (SELECT ...) SELECT ... FROM cte_name","example":"WITH user_stats AS (SELECT user_id, COUNT(*) FROM orders GROUP BY user_id) SELECT * FROM user_stats"},"recursive":{"description":"Creates a recursive CTE that can reference itself","syntax":"WITH RECURSIVE cte_name AS (...) SELECT ...","example":"WITH RECURSIVE tree AS (SELECT id, parent_id FROM categories WHERE parent_id IS NULL UNION ALL SELECT c.id, c.parent_id FROM categories c JOIN tree t ON c.parent_id = t.id) SELECT * FROM tree"},"distinct":{"description":"Returns only unique values","syntax":"SELECT DISTINCT column_name FROM table_name","example":"SELECT DISTINCT category FROM products"},"count":{"description":"Returns the number of rows that match a condition","syntax":"COUNT(*) or COUNT(column_name)","example":"SELECT COUNT(*) FROM users WHERE active = true"},"sum":{"description":"Returns the sum of numeric values","syntax":"SUM(column_name)","example":"SELECT SUM(price) FROM orders WHERE status = 'completed'"},"avg":{"description":"Returns the average value of numeric values","syntax":"AVG(column_name)","example":"SELECT AVG(age) FROM users"},"max":{"description":"Returns the maximum value","syntax":"MAX(column_name)","example":"SELECT MAX(price) FROM products"},"min":{"description":"Returns the minimum value","syntax":"MIN(column_name)","example":"SELECT MIN(price) FROM products"},"as":{"description":"Creates an alias for a column or table","syntax":"column_name AS alias_name or table_name AS alias_name","example":"SELECT name AS customer_name FROM users AS u"},"on":{"description":"Specifies the join condition between tables","syntax":"JOIN table_name ON condition","example":"JOIN orders ON users.id = orders.user_id"},"and":{"description":"Combines multiple conditions with logical AND","syntax":"WHERE condition1 AND condition2","example":"WHERE age > 18 AND status = 'active'"},"or":{"description":"Combines multiple conditions with logical OR","syntax":"WHERE condition1 OR condition2","example":"WHERE category = 'electronics' OR category = 'books'"},"not":{"description":"Negates a condition","syntax":"WHERE NOT condition","example":"WHERE NOT status = 'inactive'"},"null":{"description":"Represents a missing or unknown value","syntax":"column_name IS NULL or column_name IS NOT NULL","example":"WHERE email IS NOT NULL"},"is":{"description":"Used to test for NULL values or boolean conditions","syntax":"column_name IS NULL or column_name IS NOT NULL","example":"WHERE deleted_at IS NULL"},"in":{"description":"Checks if a value matches any value in a list","syntax":"column_name IN (value1, value2, ...)","example":"WHERE status IN ('active', 'pending', 'approved')"},"between":{"description":"Selects values within a range","syntax":"column_name BETWEEN value1 AND value2","example":"WHERE age BETWEEN 18 AND 65"},"like":{"description":"Searches for a pattern in a column","syntax":"column_name LIKE pattern","example":"WHERE name LIKE 'John%' (starts with 'John')"},"exists":{"description":"Tests whether a subquery returns any rows","syntax":"WHERE EXISTS (subquery)","example":"WHERE EXISTS (SELECT 1 FROM orders WHERE orders.user_id = users.id)"},"any":{"description":"Compares a value to any value returned by a subquery","syntax":"column_name operator ANY (subquery)","example":"WHERE price > ANY (SELECT price FROM products WHERE category = 'electronics')"},"all":{"description":"Compares a value to all values returned by a subquery","syntax":"column_name operator ALL (subquery)","example":"WHERE price > ALL (SELECT price FROM products WHERE category = 'books')"},"some":{"description":"Synonym for ANY - compares a value to some values in a subquery","syntax":"column_name operator SOME (subquery)","example":"WHERE price > SOME (SELECT price FROM products WHERE category = 'electronics')"},"union":{"description":"Combines the result sets of two or more SELECT statements","syntax":"SELECT ... UNION SELECT ...","example":"SELECT name FROM customers UNION SELECT name FROM suppliers"},"intersect":{"description":"Returns rows that are in both result sets","syntax":"SELECT ... INTERSECT SELECT ...","example":"SELECT customer_id FROM orders INTERSECT SELECT customer_id FROM returns"},"except":{"description":"Returns rows from the first query that are not in the second","syntax":"SELECT ... EXCEPT SELECT ...","example":"SELECT customer_id FROM customers EXCEPT SELECT customer_id FROM blacklist"},"case":{"description":"Provides conditional logic in SQL queries","syntax":"CASE WHEN condition THEN result ELSE result END","example":"CASE WHEN age < 18 THEN 'Minor' ELSE 'Adult' END"},"when":{"description":"Specifies conditions in CASE statements","syntax":"CASE WHEN condition THEN result","example":"CASE WHEN score >= 90 THEN 'A' WHEN score >= 80 THEN 'B' END"},"then":{"description":"Specifies the result for a WHEN condition","syntax":"WHEN condition THEN result","example":"WHEN age < 18 THEN 'Minor'"},"else":{"description":"Specifies the default result in CASE statements","syntax":"CASE WHEN condition THEN result ELSE default_result END","example":"CASE WHEN score >= 60 THEN 'Pass' ELSE 'Fail' END"},"end":{"description":"Terminates a CASE statement","syntax":"CASE WHEN condition THEN result END","example":"CASE WHEN age < 18 THEN 'Minor' ELSE 'Adult' END"},"over":{"description":"Defines a window for window functions","syntax":"window_function() OVER (PARTITION BY ... ORDER BY ...)","example":"ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC)"},"partition":{"description":"Divides the result set into groups for window functions","syntax":"OVER (PARTITION BY column_name)","example":"SUM(salary) OVER (PARTITION BY department)"},"row_number":{"description":"Assigns a unique sequential integer to each row","syntax":"ROW_NUMBER() OVER (ORDER BY column_name)","example":"ROW_NUMBER() OVER (ORDER BY created_at DESC)"},"rank":{"description":"Assigns a rank to each row with gaps for ties","syntax":"RANK() OVER (ORDER BY column_name)","example":"RANK() OVER (ORDER BY score DESC)"},"dense_rank":{"description":"Assigns a rank to each row without gaps for ties","syntax":"DENSE_RANK() OVER (ORDER BY column_name)","example":"DENSE_RANK() OVER (ORDER BY score DESC)"},"begin":{"description":"Starts a transaction block","syntax":"BEGIN [TRANSACTION]","example":"BEGIN; UPDATE accounts SET balance = balance - 100; COMMIT;"},"commit":{"description":"Permanently saves all changes made in the current transaction","syntax":"COMMIT [TRANSACTION]","example":"BEGIN; INSERT INTO users VALUES (...); COMMIT;"},"rollback":{"description":"Undoes all changes made in the current transaction","syntax":"ROLLBACK [TRANSACTION]","example":"BEGIN; DELETE FROM users WHERE id = 1; ROLLBACK;"},"transaction":{"description":"Groups multiple SQL statements into a single unit of work","syntax":"BEGIN TRANSACTION; ... COMMIT/ROLLBACK;","example":"BEGIN TRANSACTION; UPDATE accounts SET balance = balance - 100 WHERE id = 1; COMMIT;"}}`);var a={keywords:e};export{a as default,e as keywords};
var i=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,c=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,s=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,u=/[^\s'`,@()\[\]";]/,o;function l(t){for(var e;e=t.next();)if(e=="\\")t.next();else if(!u.test(e)){t.backUp(1);break}return t.current()}function a(t,e){if(t.eatSpace())return o="ws",null;if(t.match(s))return"number";var n=t.next();if(n=="\\"&&(n=t.next()),n=='"')return(e.tokenize=d)(t,e);if(n=="(")return o="open","bracket";if(n==")")return o="close","bracket";if(n==";")return t.skipToEnd(),o="ws","comment";if(/['`,@]/.test(n))return null;if(n=="|")return t.skipTo("|")?(t.next(),"variableName"):(t.skipToEnd(),"error");if(n=="#"){var n=t.next();return n=="("?(o="open","bracket"):/[+\-=\.']/.test(n)||/\d/.test(n)&&t.match(/^\d*#/)?null:n=="|"?(e.tokenize=f)(t,e):n==":"?(l(t),"meta"):n=="\\"?(t.next(),l(t),"string.special"):"error"}else{var r=l(t);return r=="."?null:(o="symbol",r=="nil"||r=="t"||r.charAt(0)==":"?"atom":e.lastType=="open"&&(i.test(r)||c.test(r))?"keyword":r.charAt(0)=="&"?"variableName.special":"variableName")}}function d(t,e){for(var n=!1,r;r=t.next();){if(r=='"'&&!n){e.tokenize=a;break}n=!n&&r=="\\"}return"string"}function f(t,e){for(var n,r;n=t.next();){if(n=="#"&&r=="|"){e.tokenize=a;break}r=n}return o="ws","comment"}const m={name:"commonlisp",startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:a}},token:function(t,e){t.sol()&&typeof e.ctx.indentTo!="number"&&(e.ctx.indentTo=e.ctx.start+1),o=null;var n=e.tokenize(t,e);return o!="ws"&&(e.ctx.indentTo==null?o=="symbol"&&c.test(t.current())?e.ctx.indentTo=e.ctx.start+t.indentUnit:e.ctx.indentTo="next":e.ctx.indentTo=="next"&&(e.ctx.indentTo=t.column()),e.lastType=o),o=="open"?e.ctx={prev:e.ctx,start:t.column(),indentTo:null}:o=="close"&&(e.ctx=e.ctx.prev||e.ctx),n},indent:function(t){var e=t.ctx.indentTo;return typeof e=="number"?e:t.ctx.start+1},languageData:{commentTokens:{line:";;",block:{open:"#|",close:"|#"}},closeBrackets:{brackets:["(","[","{",'"']}}};export{m as t};
import{t as o}from"./commonlisp-BjIOT_KK.js";export{o as commonLisp};
import{t}from"./chunk-LvLJmgfZ.js";import{t as o}from"./react-BGmjiNul.js";var N=t((r=>{var _=o().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;r.c=function(e){return _.H.useMemoCache(e)}})),E=t(((r,_)=>{_.exports=N()}));export{E as t};
var ct=Object.defineProperty;var ht=(t,n,s)=>n in t?ct(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var V=(t,n,s)=>ht(t,typeof n!="symbol"?n+"":n,s);import{t as F}from"./chunk-LvLJmgfZ.js";import{i as lt,l as ft,n as dt,o as pt,p as $,u as gt}from"./useEvent-DO6uJBas.js";import{t as yt}from"./compiler-runtime-DeeZ7FnK.js";import{d as M}from"./hotkeys-BHHWjLlp.js";import{t as Lt}from"./utils-DXvhzCGS.js";import{r as j}from"./constants-B6Cb__3x.js";import{t as wt}from"./Deferred-CrO5-0RA.js";function Y(){return typeof document<"u"&&document.querySelector("marimo-wasm")!==null}const S={NOT_STARTED:"NOT_STARTED",CONNECTING:"CONNECTING",OPEN:"OPEN",CLOSING:"CLOSING",CLOSED:"CLOSED"},mt={KERNEL_DISCONNECTED:"KERNEL_DISCONNECTED",ALREADY_RUNNING:"ALREADY_RUNNING",MALFORMED_QUERY:"MALFORMED_QUERY",KERNEL_STARTUP_ERROR:"KERNEL_STARTUP_ERROR"},W=$({state:S.NOT_STARTED});function bt(){return pt(W,t=>t.state===S.OPEN)}const St=$(t=>t(W).state===S.CONNECTING);$(t=>t(W).state===S.OPEN);const Et=$(t=>{let n=t(W);return n.state===S.OPEN||n.state===S.NOT_STARTED}),Rt=$(t=>t(W).state===S.CLOSED),Ot=$(t=>t(W).state===S.NOT_STARTED);function Ut(t){return t===S.CLOSED}function kt(t){return t===S.CONNECTING}function It(t){return t===S.OPEN}function vt(t){return t===S.CLOSING}function q(t){return t===S.NOT_STARTED}function Nt(t){return t===S.CLOSED||t===S.CLOSING||t===S.CONNECTING}function _t(t){switch(t){case S.CLOSED:return"App disconnected";case S.CONNECTING:return"Connecting to a runtime ...";case S.CLOSING:return"App disconnecting...";case S.OPEN:return"";case S.NOT_STARTED:return"Click to connect to a runtime";default:return""}}var xt=F((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=L,t.fromBig=f,t.split=h;var n=BigInt(2**32-1),s=BigInt(32);function f(o,i=!1){return i?{h:Number(o&n),l:Number(o>>s&n)}:{h:Number(o>>s&n)|0,l:Number(o&n)|0}}function h(o,i=!1){let e=o.length,d=new Uint32Array(e),O=new Uint32Array(e);for(let I=0;I<e;I++){let{h:A,l:G}=f(o[I],i);[d[I],O[I]]=[A,G]}return[d,O]}var R=(o,i)=>BigInt(o>>>0)<<s|BigInt(i>>>0);t.toBig=R;var E=(o,i,e)=>o>>>e;t.shrSH=E;var C=(o,i,e)=>o<<32-e|i>>>e;t.shrSL=C;var H=(o,i,e)=>o>>>e|i<<32-e;t.rotrSH=H;var P=(o,i,e)=>o<<32-e|i>>>e;t.rotrSL=P;var v=(o,i,e)=>o<<64-e|i>>>e-32;t.rotrBH=v;var N=(o,i,e)=>o>>>e-32|i<<64-e;t.rotrBL=N;var T=(o,i)=>i;t.rotr32H=T;var D=(o,i)=>o;t.rotr32L=D;var _=(o,i,e)=>o<<e|i>>>32-e;t.rotlSH=_;var k=(o,i,e)=>i<<e|o>>>32-e;t.rotlSL=k;var p=(o,i,e)=>i<<e-32|o>>>64-e;t.rotlBH=p;var w=(o,i,e)=>o<<e-32|i>>>64-e;t.rotlBL=w;function L(o,i,e,d){let O=(i>>>0)+(d>>>0);return{h:o+e+(O/2**32|0)|0,l:O|0}}var y=(o,i,e)=>(o>>>0)+(i>>>0)+(e>>>0);t.add3L=y;var B=(o,i,e,d)=>i+e+d+(o/2**32|0)|0;t.add3H=B;var l=(o,i,e,d)=>(o>>>0)+(i>>>0)+(e>>>0)+(d>>>0);t.add4L=l;var a=(o,i,e,d,O)=>i+e+d+O+(o/2**32|0)|0;t.add4H=a;var c=(o,i,e,d,O)=>(o>>>0)+(i>>>0)+(e>>>0)+(d>>>0)+(O>>>0);t.add5L=c;var g=(o,i,e,d,O,I)=>i+e+d+O+I+(o/2**32|0)|0;t.add5H=g,t.default={fromBig:f,split:h,toBig:R,shrSH:E,shrSL:C,rotrSH:H,rotrSL:P,rotrBH:v,rotrBL:N,rotr32H:T,rotr32L:D,rotlSH:_,rotlSL:k,rotlBH:p,rotlBL:w,add:L,add3L:y,add3H:B,add4L:l,add4H:a,add5H:g,add5L:c}})),Ct=F((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0})),Ht=F((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=s,t.anumber=f,t.abytes=h,t.ahash=R,t.aexists=E,t.aoutput=C,t.u8=H,t.u32=P,t.clean=v,t.createView=N,t.rotr=T,t.rotl=D,t.byteSwap=_,t.byteSwap32=k,t.bytesToHex=L,t.hexToBytes=l,t.asyncLoop=a,t.utf8ToBytes=c,t.bytesToUtf8=g,t.toBytes=o,t.kdfInputToBytes=i,t.concatBytes=e,t.checkOpts=d,t.createHasher=O,t.createOptHasher=I,t.createXOFer=A,t.randomBytes=G;var n=Ct();function s(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function f(r){if(!Number.isSafeInteger(r)||r<0)throw Error("positive integer expected, got "+r)}function h(r,...u){if(!s(r))throw Error("Uint8Array expected");if(u.length>0&&!u.includes(r.length))throw Error("Uint8Array expected of length "+u+", got length="+r.length)}function R(r){if(typeof r!="function"||typeof r.create!="function")throw Error("Hash should be wrapped by utils.createHasher");f(r.outputLen),f(r.blockLen)}function E(r,u=!0){if(r.destroyed)throw Error("Hash instance has been destroyed");if(u&&r.finished)throw Error("Hash#digest() has already been called")}function C(r,u){h(r);let m=u.outputLen;if(r.length<m)throw Error("digestInto() expects output buffer of length at least "+m)}function H(r){return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}function P(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}function v(...r){for(let u=0;u<r.length;u++)r[u].fill(0)}function N(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}function T(r,u){return r<<32-u|r>>>u}function D(r,u){return r<<u|r>>>32-u>>>0}t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function _(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}t.swap8IfBE=t.isLE?r=>r:r=>_(r),t.byteSwapIfBE=t.swap8IfBE;function k(r){for(let u=0;u<r.length;u++)r[u]=_(r[u]);return r}t.swap32IfBE=t.isLE?r=>r:k;var p=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",w=Array.from({length:256},(r,u)=>u.toString(16).padStart(2,"0"));function L(r){if(h(r),p)return r.toHex();let u="";for(let m=0;m<r.length;m++)u+=w[r[m]];return u}var y={_0:48,_9:57,A:65,F:70,a:97,f:102};function B(r){if(r>=y._0&&r<=y._9)return r-y._0;if(r>=y.A&&r<=y.F)return r-(y.A-10);if(r>=y.a&&r<=y.f)return r-(y.a-10)}function l(r){if(typeof r!="string")throw Error("hex string expected, got "+typeof r);if(p)return Uint8Array.fromHex(r);let u=r.length,m=u/2;if(u%2)throw Error("hex string expected, got unpadded hex of length "+u);let b=new Uint8Array(m);for(let U=0,x=0;U<m;U++,x+=2){let X=B(r.charCodeAt(x)),K=B(r.charCodeAt(x+1));if(X===void 0||K===void 0){let ut=r[x]+r[x+1];throw Error('hex string expected, got non-hex character "'+ut+'" at index '+x)}b[U]=X*16+K}return b}t.nextTick=async()=>{};async function a(r,u,m){let b=Date.now();for(let U=0;U<r;U++){m(U);let x=Date.now()-b;x>=0&&x<u||(await(0,t.nextTick)(),b+=x)}}function c(r){if(typeof r!="string")throw Error("string expected");return new Uint8Array(new TextEncoder().encode(r))}function g(r){return new TextDecoder().decode(r)}function o(r){return typeof r=="string"&&(r=c(r)),h(r),r}function i(r){return typeof r=="string"&&(r=c(r)),h(r),r}function e(...r){let u=0;for(let b=0;b<r.length;b++){let U=r[b];h(U),u+=U.length}let m=new Uint8Array(u);for(let b=0,U=0;b<r.length;b++){let x=r[b];m.set(x,U),U+=x.length}return m}function d(r,u){if(u!==void 0&&{}.toString.call(u)!=="[object Object]")throw Error("options should be object or undefined");return Object.assign(r,u)}t.Hash=class{};function O(r){let u=b=>r().update(o(b)).digest(),m=r();return u.outputLen=m.outputLen,u.blockLen=m.blockLen,u.create=()=>r(),u}function I(r){let u=(b,U)=>r(U).update(o(b)).digest(),m=r({});return u.outputLen=m.outputLen,u.blockLen=m.blockLen,u.create=b=>r(b),u}function A(r){let u=(b,U)=>r(U).update(o(b)).digest(),m=r({});return u.outputLen=m.outputLen,u.blockLen=m.blockLen,u.create=b=>r(b),u}t.wrapConstructor=O,t.wrapConstructorWithOpts=I,t.wrapXOFConstructorWithOpts=A;function G(r=32){if(n.crypto&&typeof n.crypto.getRandomValues=="function")return n.crypto.getRandomValues(new Uint8Array(r));if(n.crypto&&typeof n.crypto.randomBytes=="function")return Uint8Array.from(n.crypto.randomBytes(r));throw Error("crypto.getRandomValues must be defined")}})),Tt=F((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=w;var n=xt(),s=Ht(),f=BigInt(0),h=BigInt(1),R=BigInt(2),E=BigInt(7),C=BigInt(256),H=BigInt(113),P=[],v=[],N=[];for(let l=0,a=h,c=1,g=0;l<24;l++){[c,g]=[g,(2*c+3*g)%5],P.push(2*(5*g+c)),v.push((l+1)*(l+2)/2%64);let o=f;for(let i=0;i<7;i++)a=(a<<h^(a>>E)*H)%C,a&R&&(o^=h<<(h<<BigInt(i))-h);N.push(o)}var T=(0,n.split)(N,!0),D=T[0],_=T[1],k=(l,a,c)=>c>32?(0,n.rotlBH)(l,a,c):(0,n.rotlSH)(l,a,c),p=(l,a,c)=>c>32?(0,n.rotlBL)(l,a,c):(0,n.rotlSL)(l,a,c);function w(l,a=24){let c=new Uint32Array(10);for(let g=24-a;g<24;g++){for(let e=0;e<10;e++)c[e]=l[e]^l[e+10]^l[e+20]^l[e+30]^l[e+40];for(let e=0;e<10;e+=2){let d=(e+8)%10,O=(e+2)%10,I=c[O],A=c[O+1],G=k(I,A,1)^c[d],r=p(I,A,1)^c[d+1];for(let u=0;u<50;u+=10)l[e+u]^=G,l[e+u+1]^=r}let o=l[2],i=l[3];for(let e=0;e<24;e++){let d=v[e],O=k(o,i,d),I=p(o,i,d),A=P[e];o=l[A],i=l[A+1],l[A]=O,l[A+1]=I}for(let e=0;e<50;e+=10){for(let d=0;d<10;d++)c[d]=l[e+d];for(let d=0;d<10;d++)l[e+d]^=~c[(d+2)%10]&c[(d+4)%10]}l[0]^=D[g],l[1]^=_[g]}(0,s.clean)(c)}var L=class at extends s.Hash{constructor(a,c,g,o=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=a,this.suffix=c,this.outputLen=g,this.enableXOF=o,this.rounds=i,(0,s.anumber)(g),!(0<a&&a<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,s.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,s.swap32IfBE)(this.state32),w(this.state32,this.rounds),(0,s.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(a){(0,s.aexists)(this),a=(0,s.toBytes)(a),(0,s.abytes)(a);let{blockLen:c,state:g}=this,o=a.length;for(let i=0;i<o;){let e=Math.min(c-this.pos,o-i);for(let d=0;d<e;d++)g[this.pos++]^=a[i++];this.pos===c&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:a,suffix:c,pos:g,blockLen:o}=this;a[g]^=c,c&128&&g===o-1&&this.keccak(),a[o-1]^=128,this.keccak()}writeInto(a){(0,s.aexists)(this,!1),(0,s.abytes)(a),this.finish();let c=this.state,{blockLen:g}=this;for(let o=0,i=a.length;o<i;){this.posOut>=g&&this.keccak();let e=Math.min(g-this.posOut,i-o);a.set(c.subarray(this.posOut,this.posOut+e),o),this.posOut+=e,o+=e}return a}xofInto(a){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(a)}xof(a){return(0,s.anumber)(a),this.xofInto(new Uint8Array(a))}digestInto(a){if((0,s.aoutput)(a,this),this.finished)throw Error("digest() was already called");return this.writeInto(a),this.destroy(),a}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,s.clean)(this.state)}_cloneInto(a){let{blockLen:c,suffix:g,outputLen:o,rounds:i,enableXOF:e}=this;return a||(a=new at(c,g,o,e,i)),a.state32.set(this.state32),a.pos=this.pos,a.posOut=this.posOut,a.finished=this.finished,a.rounds=i,a.suffix=g,a.outputLen=o,a.enableXOF=e,a.destroyed=this.destroyed,a}};t.Keccak=L;var y=(l,a,c)=>(0,s.createHasher)(()=>new L(a,l,c));t.sha3_224=y(6,144,224/8),t.sha3_256=y(6,136,256/8),t.sha3_384=y(6,104,384/8),t.sha3_512=y(6,72,512/8),t.keccak_224=y(1,144,224/8),t.keccak_256=y(1,136,256/8),t.keccak_384=y(1,104,384/8),t.keccak_512=y(1,72,512/8);var B=(l,a,c)=>(0,s.createXOFer)((g={})=>new L(a,l,g.dkLen===void 0?c:g.dkLen,!0));t.shake128=B(31,168,128/8),t.shake256=B(31,136,256/8)})),Bt=F(((t,n)=>{var{sha3_512:s}=Tt(),f=24,h=32,R=(p=4,w=Math.random)=>{let L="";for(;L.length<p;)L+=Math.floor(w()*36).toString(36);return L};function E(p){let w=0n;for(let L of p.values()){let y=BigInt(L);w=(w<<8n)+y}return w}var C=(p="")=>E(s(p)).toString(36).slice(1),H=Array.from({length:26},(p,w)=>String.fromCharCode(w+97)),P=p=>H[Math.floor(p()*H.length)],v=({globalObj:p=typeof global<"u"?global:typeof window<"u"?window:{},random:w=Math.random}={})=>{let L=Object.keys(p).toString();return C(L.length?L+R(h,w):R(h,w)).substring(0,h)},N=p=>()=>p++,T=476782367,D=({random:p=Math.random,counter:w=N(Math.floor(p()*T)),length:L=f,fingerprint:y=v({random:p})}={})=>function(){let B=P(p),l=Date.now().toString(36),a=w().toString(36);return`${B+C(`${l+R(L,p)+a+y}`).substring(1,L)}`},_=D(),k=(p,{minLength:w=2,maxLength:L=h}={})=>{let y=p.length,B=/^[0-9a-z]+$/;return!!(typeof p=="string"&&y>=w&&y<=L&&B.test(p))};n.exports.getConstants=()=>({defaultLength:f,bigLength:h}),n.exports.init=D,n.exports.createId=_,n.exports.bufToBigInt=E,n.exports.createCounter=N,n.exports.createFingerprint=v,n.exports.isCuid=k})),Q=F(((t,n)=>{var{createId:s,init:f,getConstants:h,isCuid:R}=Bt();n.exports.createId=s,n.exports.init=f,n.exports.getConstants=h,n.exports.isCuid=R}));function J(t){return new URL(t,document.baseURI)}function Z(t){let n=new URL(window.location.href);t(n.searchParams),window.history.replaceState({},"",n.toString())}function At(t,n){if(typeof window>"u")return!1;let s=new URLSearchParams(window.location.search);return n===void 0?s.has(t):s.get(t)===n}function Pt(){return J(`?file=${`__new__${tt()}`}`).toString()}var Dt=/^(https?:\/\/\S+)$/;function $t(t){return typeof t=="string"&&Dt.test(t)}function Mt({href:t,queryParams:n,keys:s}){let f=typeof n=="string"?new URLSearchParams(n):n;if(f.size===0||t.startsWith("http://")||t.startsWith("https://"))return t;let h=t.startsWith("#"),R=h&&t.includes("?");if(h&&!R){let k=s?[...f.entries()].filter(([L])=>s.includes(L)):[...f.entries()],p=new URLSearchParams;for(let[L,y]of k)p.set(L,y);let w=p.toString();return w?`/?${w}${t}`:t}let E=t,C="",H=new URLSearchParams,P=h?1:0,v=t.indexOf("#",P);v!==-1&&(C=t.slice(v),E=t.slice(0,v));let N=E.indexOf("?");N!==-1&&(H=new URLSearchParams(E.slice(N+1)),E=E.slice(0,N));let T=new URLSearchParams(H),D=s?[...f.entries()].filter(([k])=>s.includes(k)):[...f.entries()];for(let[k,p]of D)T.set(k,p);let _=T.toString();return _?`${E}?${_}${C}`:t}var Wt=(0,Q().init)({length:6});function tt(){return`s_${Wt()}`}function rt(t){return t?/^s_[\da-z]{6}$/.test(t):!1}var Ft=(()=>{let t=new URL(window.location.href).searchParams.get(j.sessionId);return rt(t)?(Z(n=>{n.has(j.kiosk)||n.delete(j.sessionId)}),M.debug("Connecting to existing session",{sessionId:t}),t):(M.debug("Starting a new session",{sessionId:t}),tt())})();function z(){return Ft}var jt=class{constructor(t,n=!1){V(this,"initialHealthyCheck",new wt);this.config=t,this.lazy=n;try{new URL(this.config.url)}catch(s){throw Error(`Invalid runtime URL: ${this.config.url}. ${s instanceof Error?s.message:"Unknown error"}`)}this.lazy||this.init()}get isLazy(){return this.lazy}get httpURL(){return new URL(this.config.url)}get isSameOrigin(){return this.httpURL.origin===window.location.origin}formatHttpURL(t,n,s=!0){t||(t="");let f=this.httpURL,h=new URLSearchParams(window.location.search);if(n)for(let[R,E]of n.entries())f.searchParams.set(R,E);for(let[R,E]of h.entries())s&&!Object.values(j).includes(R)||f.searchParams.set(R,E);return f.pathname=`${f.pathname.replace(/\/$/,"")}/${t.replace(/^\//,"")}`,f.hash="",f}formatWsURL(t,n){return Gt(this.formatHttpURL(t,n,!1).toString())}getWsURL(t){let n=new URL(this.config.url),s=new URLSearchParams(n.search);return new URLSearchParams(window.location.search).forEach((f,h)=>{s.has(h)||s.set(h,f)}),s.set(j.sessionId,t),this.formatWsURL("/ws",s)}getWsSyncURL(t){let n=new URL(this.config.url),s=new URLSearchParams(n.search);return new URLSearchParams(window.location.search).forEach((f,h)=>{s.has(h)||s.set(h,f)}),s.set(j.sessionId,t),this.formatWsURL("/ws_sync",s)}getTerminalWsURL(){return this.formatWsURL("/terminal/ws")}getLSPURL(t){if(t==="copilot"){let n=this.formatWsURL(`/lsp/${t}`);return n.search="",n}return this.formatWsURL(`/lsp/${t}`)}getAiURL(t){return this.formatHttpURL(`/api/ai/${t}`)}healthURL(){return this.formatHttpURL("/health")}async isHealthy(){if(Y()||Lt())return!0;try{let t=await fetch(this.healthURL().toString());if(t.redirected){M.debug(`Runtime redirected to ${t.url}`);let s=t.url.replace(/\/health$/,"");this.config.url=s}let n=t.ok;return n&&this.setDOMBaseUri(this.config.url),n}catch{return!1}}setDOMBaseUri(t){t=t.split("?",1)[0],t.endsWith("/")||(t+="/");let n=document.querySelector("base");n?n.setAttribute("href",t):(n=document.createElement("base"),n.setAttribute("href",t),document.head.append(n))}async init(t){M.debug("Initializing runtime...");let n=0;for(;!await this.isHealthy();){if(n>=25){M.error("Failed to connect after 25 retries"),this.initialHealthyCheck.reject(Error("Failed to connect after 25 retries"));return}if(!(t!=null&&t.disableRetryDelay)){let s=Math.min(100*1.2**n,2e3);await new Promise(f=>setTimeout(f,s))}n++}M.debug("Runtime is healthy"),this.initialHealthyCheck.resolve()}async waitForHealthy(){return this.initialHealthyCheck.promise}headers(){let t={"Marimo-Session-Id":z(),"Marimo-Server-Token":this.config.serverToken??"","x-runtime-url":this.httpURL.toString()};return this.config.authToken&&(t.Authorization=`Bearer ${this.config.authToken}`),t}sessionHeaders(){return{"Marimo-Session-Id":z()}}};function Gt(t){if(!t.startsWith("http")){M.warn(`URL must start with http: ${t}`);let n=new URL(t);return n.protocol="ws",n}return new URL(t.replace(/^http/,"ws"))}var zt=yt();function Xt(){let t=new URL(document.baseURI);return t.search="",t.hash="",t.toString()}const nt={lazy:!0,url:Xt()},et=$(nt);var ot=$(t=>{let n=t(et);return new jt(n,n.lazy)});function st(){return gt(ot)}function Kt(){let t=(0,zt.c)(4),n=st(),[s,f]=ft(W),h;return t[0]!==s.state||t[1]!==n||t[2]!==f?(h=async()=>{q(s.state)?(f({state:S.CONNECTING}),await n.init()):M.log("Runtime already started or starting...")},t[0]=s.state,t[1]=n,t[2]=f,t[3]=h):h=t[3],dt(h)}function it(){return lt.get(ot)}function Vt(t){if(t.startsWith("http"))return new URL(t);let n=it().httpURL.toString();return n.startsWith("blob:")&&(n=n.replace("blob:","")),new URL(t,n)}export{S as A,Et as C,Ot as D,St as E,bt as O,q as S,Rt as T,Ut as _,Kt as a,kt as b,rt as c,$t as d,Pt as f,_t as g,Q as h,et as i,Y as j,mt as k,Mt as l,J as m,Vt as n,st as o,Z as p,it as r,z as s,nt as t,At as u,vt as v,W as w,Nt as x,It as y};

Sorry, the diff of this file is too big to display

import{s}from"./chunk-LvLJmgfZ.js";import{t as m}from"./react-BGmjiNul.js";import{t as g}from"./SSRProvider-CEHRCdjA.js";var p=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),v=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function c(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),o=typeof t.getTextInfo=="function"?t.getTextInfo():t.textInfo;if(o)return o.direction==="rtl";if(t.script)return p.has(t.script)}let n=e.split("-")[0];return v.has(n)}var r=s(m(),1),h=Symbol.for("react-aria.i18n.locale");function u(){let e=typeof window<"u"&&window[h]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:c(e)?"rtl":"ltr"}}var l=u(),a=new Set;function f(){l=u();for(let e of a)e(l)}function d(){let e=g(),[n,t]=(0,r.useState)(l);return(0,r.useEffect)(()=>(a.size===0&&window.addEventListener("languagechange",f),a.add(t),()=>{a.delete(t),a.size===0&&window.removeEventListener("languagechange",f)}),[]),e?{locale:"en-US",direction:"ltr"}:n}var i=r.createContext(null);function w(e){let{locale:n,children:t}=e,o=r.useMemo(()=>({locale:n,direction:c(n)?"rtl":"ltr"}),[n]);return r.createElement(i.Provider,{value:o},t)}function S(e){let{children:n}=e,t=d();return r.createElement(i.Provider,{value:t},n)}function b(e){let{locale:n,children:t}=e;return n?r.createElement(w,{locale:n,children:t}):r.createElement(S,{children:t})}function x(){let e=d();return(0,r.useContext)(i)||e}export{b as n,x as t};
import{d as r}from"./hotkeys-BHHWjLlp.js";async function a(o){if(navigator.clipboard===void 0){r.warn("navigator.clipboard is not supported"),window.prompt("Copy to clipboard: Ctrl+C, Enter",o);return}await navigator.clipboard.writeText(o).catch(async()=>{r.warn("Failed to copy to clipboard using navigator.clipboard"),window.prompt("Copy to clipboard: Ctrl+C, Enter",o)})}export{a as t};
import{t}from"./createLucideIcon-CnW3RofX.js";var e=t("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);export{e as t};
import{s as y}from"./chunk-LvLJmgfZ.js";import{t as j}from"./react-BGmjiNul.js";import{t as g}from"./compiler-runtime-DeeZ7FnK.js";import{t as v}from"./jsx-runtime-ZmTK25f3.js";import{r as T}from"./button-YC1gW_kJ.js";import{t as w}from"./cn-BKtXLv3a.js";import{t as D}from"./check-DdfN0k2d.js";import{t as S}from"./copy-CQ15EONK.js";import{t as k}from"./use-toast-rmUWldD_.js";import{t as E}from"./tooltip-CEc2ajau.js";import{t as L}from"./copy-Bv2DBpIS.js";var P=g(),_=y(j(),1),n=y(v(),1);const q=C=>{let t=(0,P.c)(14),{value:a,className:r,buttonClassName:c,tooltip:d,toastTitle:s,ariaLabel:N}=C,[e,x]=(0,_.useState)(!1),m;t[0]!==s||t[1]!==a?(m=T.stopPropagation(async h=>{await L(typeof a=="function"?a(h):a).then(()=>{x(!0),setTimeout(()=>x(!1),2e3),s&&k({title:s})})}),t[0]=s,t[1]=a,t[2]=m):m=t[2];let f=m,u=N??"Copy to clipboard",o;t[3]!==r||t[4]!==e?(o=e?(0,n.jsx)(D,{className:w(r,"text-(--grass-11)")}):(0,n.jsx)(S,{className:r}),t[3]=r,t[4]=e,t[5]=o):o=t[5];let i;t[6]!==c||t[7]!==f||t[8]!==u||t[9]!==o?(i=(0,n.jsx)("button",{type:"button",onClick:f,"aria-label":u,className:c,children:o}),t[6]=c,t[7]=f,t[8]=u,t[9]=o,t[10]=i):i=t[10];let l=i;if(d===!1)return l;let b=e?"Copied!":d??"Copy to clipboard",p;return t[11]!==l||t[12]!==b?(p=(0,n.jsx)(E,{content:b,delayDuration:400,children:l}),t[11]=l,t[12]=b,t[13]=p):p=t[13],p};export{q as t};

Sorry, the diff of this file is too big to display

import{s as f}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-BGmjiNul.js";var w=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,o)=>o?o.toUpperCase():t.toLowerCase()),c=r=>{let e=N(r);return e.charAt(0).toUpperCase()+e.slice(1)},n=(...r)=>r.filter((e,t,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===t).join(" ").trim(),k=r=>{for(let e in r)if(e.startsWith("aria-")||e==="role"||e==="title")return!0},g={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=f(p()),C=(0,a.forwardRef)(({color:r="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:s="",children:i,iconNode:d,...l},m)=>(0,a.createElement)("svg",{ref:m,...g,width:e,height:e,stroke:r,strokeWidth:o?Number(t)*24/Number(e):t,className:n("lucide",s),...!i&&!k(l)&&{"aria-hidden":"true"},...l},[...d.map(([h,u])=>(0,a.createElement)(h,u)),...Array.isArray(i)?i:[i]])),A=(r,e)=>{let t=(0,a.forwardRef)(({className:o,...s},i)=>(0,a.createElement)(C,{ref:i,iconNode:e,className:n(`lucide-${w(c(r))}`,`lucide-${r}`,o),...s}));return t.displayName=c(r),t};export{A as t};
import{d as m,p as A}from"./useEvent-DO6uJBas.js";import{t as h}from"./compiler-runtime-DeeZ7FnK.js";import{d as s}from"./hotkeys-BHHWjLlp.js";var $=h();function v(i,c){return{reducer:(o,e)=>(o||(o=i()),e.type in c?c[e.type](o,e.payload):(s.error(`Action type ${e.type} is not defined in reducers.`),o)),createActions:o=>{let e={};for(let a in c)e[a]=u=>{o({type:a,payload:u})};return e}}}function w(i,c,o){let{reducer:e,createActions:a}=v(i,c),u=(n,r)=>{try{let t=e(n,r);if(o)for(let d of o)try{d(n,t,r)}catch(f){s.error(`Error in middleware for action ${r.type}:`,f)}return t}catch(t){return s.error(`Error in reducer for action ${r.type}:`,t),n}},l=A(i()),p=new WeakMap;function y(){let n=(0,$.c)(2),r=m(l);p.has(r)||p.set(r,a(d=>{r(f=>u(f,d))}));let t;return n[0]===r?t=n[1]:(t=p.get(r),n[0]=r,n[1]=t),t}return{reducer:u,createActions:a,valueAtom:l,useActions:y}}export{w as t};
function i(t,e){return RegExp((e?"":"^")+"(?:"+t.join("|")+")"+(e?"$":"\\b"))}function o(t,e,n){return n.tokenize.push(t),t(e,n)}var f=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,k=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,_=/^(?:\[\][?=]?)/,I=/^(?:\.(?:\.{2})?|->|[?:])/,m=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,h=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,w=i("abstract.alias.as.asm.begin.break.case.class.def.do.else.elsif.end.ensure.enum.extend.for.fun.if.include.instance_sizeof.lib.macro.module.next.of.out.pointerof.private.protected.rescue.return.require.select.sizeof.struct.super.then.type.typeof.uninitialized.union.unless.until.when.while.with.yield.__DIR__.__END_LINE__.__FILE__.__LINE__".split(".")),S=i(["true","false","nil","self"]),E=i(["def","fun","macro","class","module","struct","lib","enum","union","do","for"]),T=i(["if","unless","case","while","until","begin","then"]),b=["end","else","elsif","rescue","ensure"],A=i(b),g=["\\)","\\}","\\]"],Z=RegExp("^(?:"+g.join("|")+")$"),x={def:y,fun:y,macro:v,class:s,module:s,struct:s,lib:s,enum:s,union:s},d={"[":"]","{":"}","(":")","<":">"};function F(t,e){if(t.eatSpace())return null;if(e.lastToken!="\\"&&t.match("{%",!1))return o(c("%","%"),t,e);if(e.lastToken!="\\"&&t.match("{{",!1))return o(c("{","}"),t,e);if(t.peek()=="#")return t.skipToEnd(),"comment";var n;if(t.match(m))return t.eat(/[?!]/),n=t.current(),t.eat(":")?"atom":e.lastToken=="."?"property":w.test(n)?(E.test(n)?!(n=="fun"&&e.blocks.indexOf("lib")>=0)&&!(n=="def"&&e.lastToken=="abstract")&&(e.blocks.push(n),e.currentIndent+=1):(e.lastStyle=="operator"||!e.lastStyle)&&T.test(n)?(e.blocks.push(n),e.currentIndent+=1):n=="end"&&(e.blocks.pop(),--e.currentIndent),x.hasOwnProperty(n)&&e.tokenize.push(x[n]),"keyword"):S.test(n)?"atom":"variable";if(t.eat("@"))return t.peek()=="["?o(p("[","]","meta"),t,e):(t.eat("@"),t.match(m)||t.match(h),"propertyName");if(t.match(h))return"tag";if(t.eat(":"))return t.eat('"')?o(z('"',"atom",!1),t,e):t.match(m)||t.match(h)||t.match(f)||t.match(k)||t.match(_)?"atom":(t.eat(":"),"operator");if(t.eat('"'))return o(z('"',"string",!0),t,e);if(t.peek()=="%"){var a="string",r=!0,u;if(t.match("%r"))a="string.special",u=t.next();else if(t.match("%w"))r=!1,u=t.next();else if(t.match("%q"))r=!1,u=t.next();else if(u=t.match(/^%([^\w\s=])/))u=u[1];else{if(t.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/))return"meta";if(t.eat("%"))return"operator"}return d.hasOwnProperty(u)&&(u=d[u]),o(z(u,a,r),t,e)}return(n=t.match(/^<<-('?)([A-Z]\w*)\1/))?o(N(n[2],!n[1]),t,e):t.eat("'")?(t.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),t.eat("'"),"atom"):t.eat("0")?(t.eat("x")?t.match(/^[0-9a-fA-F_]+/):t.eat("o")?t.match(/^[0-7_]+/):t.eat("b")&&t.match(/^[01_]+/),"number"):t.eat(/^\d/)?(t.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/),"number"):t.match(f)?(t.eat("="),"operator"):t.match(k)||t.match(I)?"operator":(n=t.match(/[({[]/,!1))?(n=n[0],o(p(n,d[n],null),t,e)):t.eat("\\")?(t.next(),"meta"):(t.next(),null)}function p(t,e,n,a){return function(r,u){if(!a&&r.match(t))return u.tokenize[u.tokenize.length-1]=p(t,e,n,!0),u.currentIndent+=1,n;var l=F(r,u);return r.current()===e&&(u.tokenize.pop(),--u.currentIndent,l=n),l}}function c(t,e,n){return function(a,r){return!n&&a.match("{"+t)?(r.currentIndent+=1,r.tokenize[r.tokenize.length-1]=c(t,e,!0),"meta"):a.match(e+"}")?(--r.currentIndent,r.tokenize.pop(),"meta"):F(a,r)}}function v(t,e){if(t.eatSpace())return null;var n;if(n=t.match(m)){if(n=="def")return"keyword";t.eat(/[?!]/)}return e.tokenize.pop(),"def"}function y(t,e){return t.eatSpace()?null:(t.match(m)?t.eat(/[!?]/):t.match(f)||t.match(k)||t.match(_),e.tokenize.pop(),"def")}function s(t,e){return t.eatSpace()?null:(t.match(h),e.tokenize.pop(),"def")}function z(t,e,n){return function(a,r){for(var u=!1;a.peek();)if(u)a.next(),u=!1;else{if(a.match("{%",!1))return r.tokenize.push(c("%","%")),e;if(a.match("{{",!1))return r.tokenize.push(c("{","}")),e;if(n&&a.match("#{",!1))return r.tokenize.push(p("#{","}","meta")),e;var l=a.next();if(l==t)return r.tokenize.pop(),e;u=n&&l=="\\"}return e}}function N(t,e){return function(n,a){if(n.sol()&&(n.eatSpace(),n.match(t)))return a.tokenize.pop(),"string";for(var r=!1;n.peek();)if(r)n.next(),r=!1;else{if(n.match("{%",!1))return a.tokenize.push(c("%","%")),"string";if(n.match("{{",!1))return a.tokenize.push(c("{","}")),"string";if(e&&n.match("#{",!1))return a.tokenize.push(p("#{","}","meta")),"string";r=n.next()=="\\"&&e}return"string"}}const O={name:"crystal",startState:function(){return{tokenize:[F],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(t,e){var n=e.tokenize[e.tokenize.length-1](t,e),a=t.current();return n&&n!="comment"&&(e.lastToken=a,e.lastStyle=n),n},indent:function(t,e,n){return e=e.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),A.test(e)||Z.test(e)?n.unit*(t.currentIndent-1):n.unit*t.currentIndent},languageData:{indentOnInput:i(g.concat(b),!0),commentTokens:{line:"#"}}};export{O as t};
import{t as r}from"./crystal-CQtLRTna.js";export{r as crystal};
function y(o){o={...ne,...o};var l=o.inline,m=o.tokenHooks,f=o.documentTypes||{},G=o.mediaTypes||{},J=o.mediaFeatures||{},Q=o.mediaValueKeywords||{},C=o.propertyKeywords||{},S=o.nonStandardPropertyKeywords||{},R=o.fontProperties||{},ee=o.counterDescriptors||{},F=o.colorKeywords||{},N=o.valueKeywords||{},b=o.allowNested,te=o.lineComment,re=o.supportsAtComponent===!0,$=o.highlightNonStandardPropertyKeywords!==!1,w,a;function c(e,r){return w=r,e}function oe(e,r){var t=e.next();if(m[t]){var i=m[t](e,r);if(i!==!1)return i}if(t=="@")return e.eatWhile(/[\w\\\-]/),c("def",e.current());if(t=="="||(t=="~"||t=="|")&&e.eat("="))return c(null,"compare");if(t=='"'||t=="'")return r.tokenize=L(t),r.tokenize(e,r);if(t=="#")return e.eatWhile(/[\w\\\-]/),c("atom","hash");if(t=="!")return e.match(/^\s*\w*/),c("keyword","important");if(/\d/.test(t)||t=="."&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),c("number","unit");if(t==="-"){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),c("number","unit");if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?c("def","variable-definition"):c("variableName","variable");if(e.match(/^\w+-/))return c("meta","meta")}else return/[,+>*\/]/.test(t)?c(null,"select-op"):t=="."&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?c("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(t)?c(null,t):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(r.tokenize=ie),c("variableName.function","variable")):/[\w\\\-]/.test(t)?(e.eatWhile(/[\w\\\-]/),c("property","word")):c(null,null)}function L(e){return function(r,t){for(var i=!1,d;(d=r.next())!=null;){if(d==e&&!i){e==")"&&r.backUp(1);break}i=!i&&d=="\\"}return(d==e||!i&&e!=")")&&(t.tokenize=null),c("string","string")}}function ie(e,r){return e.next(),e.match(/^\s*[\"\')]/,!1)?r.tokenize=null:r.tokenize=L(")"),c(null,"(")}function W(e,r,t){this.type=e,this.indent=r,this.prev=t}function s(e,r,t,i){return e.context=new W(t,r.indentation()+(i===!1?0:r.indentUnit),e.context),t}function p(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function k(e,r,t){return n[t.context.type](e,r,t)}function h(e,r,t,i){for(var d=i||1;d>0;d--)t.context=t.context.prev;return k(e,r,t)}function D(e){var r=e.current().toLowerCase();a=N.hasOwnProperty(r)?"atom":F.hasOwnProperty(r)?"keyword":"variable"}var n={};return n.top=function(e,r,t){if(e=="{")return s(t,r,"block");if(e=="}"&&t.context.prev)return p(t);if(re&&/@component/i.test(e))return s(t,r,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(t,r,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(t,r,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return t.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&e.charAt(0)=="@")return s(t,r,"at");if(e=="hash")a="builtin";else if(e=="word")a="tag";else{if(e=="variable-definition")return"maybeprop";if(e=="interpolation")return s(t,r,"interpolation");if(e==":")return"pseudo";if(b&&e=="(")return s(t,r,"parens")}return t.context.type},n.block=function(e,r,t){if(e=="word"){var i=r.current().toLowerCase();return C.hasOwnProperty(i)?(a="property","maybeprop"):S.hasOwnProperty(i)?(a=$?"string.special":"property","maybeprop"):b?(a=r.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a="error","maybeprop")}else return e=="meta"?"block":!b&&(e=="hash"||e=="qualifier")?(a="error","block"):n.top(e,r,t)},n.maybeprop=function(e,r,t){return e==":"?s(t,r,"prop"):k(e,r,t)},n.prop=function(e,r,t){if(e==";")return p(t);if(e=="{"&&b)return s(t,r,"propBlock");if(e=="}"||e=="{")return h(e,r,t);if(e=="(")return s(t,r,"parens");if(e=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(r.current()))a="error";else if(e=="word")D(r);else if(e=="interpolation")return s(t,r,"interpolation");return"prop"},n.propBlock=function(e,r,t){return e=="}"?p(t):e=="word"?(a="property","maybeprop"):t.context.type},n.parens=function(e,r,t){return e=="{"||e=="}"?h(e,r,t):e==")"?p(t):e=="("?s(t,r,"parens"):e=="interpolation"?s(t,r,"interpolation"):(e=="word"&&D(r),"parens")},n.pseudo=function(e,r,t){return e=="meta"?"pseudo":e=="word"?(a="variableName.constant",t.context.type):k(e,r,t)},n.documentTypes=function(e,r,t){return e=="word"&&f.hasOwnProperty(r.current())?(a="tag",t.context.type):n.atBlock(e,r,t)},n.atBlock=function(e,r,t){if(e=="(")return s(t,r,"atBlock_parens");if(e=="}"||e==";")return h(e,r,t);if(e=="{")return p(t)&&s(t,r,b?"block":"top");if(e=="interpolation")return s(t,r,"interpolation");if(e=="word"){var i=r.current().toLowerCase();a=i=="only"||i=="not"||i=="and"||i=="or"?"keyword":G.hasOwnProperty(i)?"attribute":J.hasOwnProperty(i)?"property":Q.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":S.hasOwnProperty(i)?$?"string.special":"property":N.hasOwnProperty(i)?"atom":F.hasOwnProperty(i)?"keyword":"error"}return t.context.type},n.atComponentBlock=function(e,r,t){return e=="}"?h(e,r,t):e=="{"?p(t)&&s(t,r,b?"block":"top",!1):(e=="word"&&(a="error"),t.context.type)},n.atBlock_parens=function(e,r,t){return e==")"?p(t):e=="{"||e=="}"?h(e,r,t,2):n.atBlock(e,r,t)},n.restricted_atBlock_before=function(e,r,t){return e=="{"?s(t,r,"restricted_atBlock"):e=="word"&&t.stateArg=="@counter-style"?(a="variable","restricted_atBlock_before"):k(e,r,t)},n.restricted_atBlock=function(e,r,t){return e=="}"?(t.stateArg=null,p(t)):e=="word"?(a=t.stateArg=="@font-face"&&!R.hasOwnProperty(r.current().toLowerCase())||t.stateArg=="@counter-style"&&!ee.hasOwnProperty(r.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},n.keyframes=function(e,r,t){return e=="word"?(a="variable","keyframes"):e=="{"?s(t,r,"top"):k(e,r,t)},n.at=function(e,r,t){return e==";"?p(t):e=="{"||e=="}"?h(e,r,t):(e=="word"?a="tag":e=="hash"&&(a="builtin"),"at")},n.interpolation=function(e,r,t){return e=="}"?p(t):e=="{"||e==";"?h(e,r,t):(e=="word"?a="variable":e!="variable"&&e!="("&&e!=")"&&(a="error"),"interpolation")},{name:o.name,startState:function(){return{tokenize:null,state:l?"block":"top",stateArg:null,context:new W(l?"block":"top",0,null)}},token:function(e,r){if(!r.tokenize&&e.eatSpace())return null;var t=(r.tokenize||oe)(e,r);return t&&typeof t=="object"&&(w=t[1],t=t[0]),a=t,w!="comment"&&(r.state=n[r.state](w,e,r)),a},indent:function(e,r,t){var i=e.context,d=r&&r.charAt(0),_=i.indent;return i.type=="prop"&&(d=="}"||d==")")&&(i=i.prev),i.prev&&(d=="}"&&(i.type=="block"||i.type=="top"||i.type=="interpolation"||i.type=="restricted_atBlock")?(i=i.prev,_=i.indent):(d==")"&&(i.type=="parens"||i.type=="atBlock_parens")||d=="{"&&(i.type=="at"||i.type=="atBlock"))&&(_=Math.max(0,i.indent-t.unit))),_},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:te,block:{open:"/*",close:"*/"}},autocomplete:M}}}function u(o){for(var l={},m=0;m<o.length;++m)l[o[m].toLowerCase()]=!0;return l}var H=["domain","regexp","url","url-prefix"],E=u(H),V=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=u(V),X="width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.orientation.device-pixel-ratio.min-device-pixel-ratio.max-device-pixel-ratio.pointer.any-pointer.hover.any-hover.prefers-color-scheme.dynamic-range.video-dynamic-range".split("."),x=u(X),Y=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],B=u(Y),O="align-content.align-items.align-self.alignment-adjust.alignment-baseline.all.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.binding.bleed.block-size.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-content.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.gap.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-gap.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-gap.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.inset.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.left.letter-spacing.line-break.line-height.line-height-step.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.place-content.place-items.place-self.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotate.rotation.rotation-point.row-gap.ruby-align.ruby-overhang.ruby-position.ruby-span.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-type.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-orientation.text-outline.text-overflow.text-rendering.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.touch-action.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-select.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.paint-order.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode".split("."),z=u(O),Z="accent-color.aspect-ratio.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.content-visibility.margin-block.margin-block-end.margin-block-start.margin-inline.margin-inline-end.margin-inline-start.overflow-anchor.overscroll-behavior.padding-block.padding-block-end.padding-block-start.padding-inline.padding-inline-end.padding-inline-start.scroll-snap-stop.scrollbar-3d-light-color.scrollbar-arrow-color.scrollbar-base-color.scrollbar-dark-shadow-color.scrollbar-face-color.scrollbar-highlight-color.scrollbar-shadow-color.scrollbar-track-color.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.shape-inside.zoom".split("."),P=u(Z),U=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],j=u(U),I=u(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),T="aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen".split("."),q=u(T),A="above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.blur.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.brightness.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.contrast.copy.counter.counters.cover.crop.cross.crosshair.cubic-bezier.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.devanagari.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.drop-shadow.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.georgian.grayscale.graytext.grid.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hard-light.hebrew.help.hidden.hide.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.hue.hue-rotate.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.luminosity.malayalam.manipulation.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.multiple_mask_images.multiply.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.opacity.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturate.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.self-start.self-end.semi-condensed.semi-expanded.separate.sepia.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.somali.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.square-button.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small".split("."),K=u(A),M=H.concat(V).concat(X).concat(Y).concat(O).concat(Z).concat(T).concat(A);const ae={properties:O,colors:T,fonts:U,values:A,all:M};var ne={documentTypes:E,mediaTypes:v,mediaFeatures:x,mediaValueKeywords:B,propertyKeywords:z,nonStandardPropertyKeywords:P,fontProperties:j,counterDescriptors:I,colorKeywords:q,valueKeywords:K,tokenHooks:{"/":function(o,l){return o.eat("*")?(l.tokenize=g,g(o,l)):!1}}};const le=y({name:"css"});function g(o,l){for(var m=!1,f;(f=o.next())!=null;){if(m&&f=="/"){l.tokenize=null;break}m=f=="*"}return["comment","comment"]}const se=y({name:"scss",mediaTypes:v,mediaFeatures:x,mediaValueKeywords:B,propertyKeywords:z,nonStandardPropertyKeywords:P,colorKeywords:q,valueKeywords:K,fontProperties:j,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(o,l){return o.eat("/")?(o.skipToEnd(),["comment","comment"]):o.eat("*")?(l.tokenize=g,g(o,l)):["operator","operator"]},":":function(o){return o.match(/^\s*\{/,!1)?[null,null]:!1},$:function(o){return o.match(/^[\w-]+/),o.match(/^\s*:/,!1)?["def","variable-definition"]:["variableName.special","variable"]},"#":function(o){return o.eat("{")?[null,"interpolation"]:!1}}}),ce=y({name:"less",mediaTypes:v,mediaFeatures:x,mediaValueKeywords:B,propertyKeywords:z,nonStandardPropertyKeywords:P,colorKeywords:q,valueKeywords:K,fontProperties:j,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(o,l){return o.eat("/")?(o.skipToEnd(),["comment","comment"]):o.eat("*")?(l.tokenize=g,g(o,l)):["operator","operator"]},"@":function(o){return o.eat("{")?[null,"interpolation"]:o.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(o.eatWhile(/[\w\\\-]/),o.match(/^\s*:/,!1)?["def","variable-definition"]:["variableName","variable"])},"&":function(){return["atom","atom"]}}}),de=y({name:"gss",documentTypes:E,mediaTypes:v,mediaFeatures:x,propertyKeywords:z,nonStandardPropertyKeywords:P,fontProperties:j,counterDescriptors:I,colorKeywords:q,valueKeywords:K,supportsAtComponent:!0,tokenHooks:{"/":function(o,l){return o.eat("*")?(l.tokenize=g,g(o,l)):!1}}});export{y as a,ce as i,de as n,se as o,ae as r,le as t};
import{a as s,i as a,n as r,o,r as e,t}from"./css-CU1K_XUx.js";export{t as css,r as gss,e as keywords,a as less,s as mkCSS,o as sCSS};
var i=function(t){return RegExp("^(?:"+t.join("|")+")$","i")},d=function(t){a=null;var e=t.next();if(e==='"')return t.match(/^.*?"/),"string";if(e==="'")return t.match(/^.*?'/),"string";if(/[{}\(\),\.;\[\]]/.test(e))return a=e,"punctuation";if(e==="/"&&t.eat("/"))return t.skipToEnd(),"comment";if(p.test(e))return t.eatWhile(p),null;if(t.eatWhile(/[_\w\d]/),t.eat(":"))return t.eatWhile(/[\w\d_\-]/),"atom";var n=t.current();return u.test(n)?"builtin":m.test(n)?"def":x.test(n)||h.test(n)?"keyword":"variable"},o=function(t,e,n){return t.context={prev:t.context,indent:t.indent,col:n,type:e}},s=function(t){return t.indent=t.context.indent,t.context=t.context.prev},a,u=i("abs.acos.allShortestPaths.asin.atan.atan2.avg.ceil.coalesce.collect.cos.cot.count.degrees.e.endnode.exp.extract.filter.floor.haversin.head.id.keys.labels.last.left.length.log.log10.lower.ltrim.max.min.node.nodes.percentileCont.percentileDisc.pi.radians.rand.range.reduce.rel.relationship.relationships.replace.reverse.right.round.rtrim.shortestPath.sign.sin.size.split.sqrt.startnode.stdev.stdevp.str.substring.sum.tail.tan.timestamp.toFloat.toInt.toString.trim.type.upper".split(".")),m=i(["all","and","any","contains","exists","has","in","none","not","or","single","xor"]),x=i("as.asc.ascending.assert.by.case.commit.constraint.create.csv.cypher.delete.desc.descending.detach.distinct.drop.else.end.ends.explain.false.fieldterminator.foreach.from.headers.in.index.is.join.limit.load.match.merge.null.on.optional.order.periodic.profile.remove.return.scan.set.skip.start.starts.then.true.union.unique.unwind.using.when.where.with.call.yield".split(".")),h=i("access.active.assign.all.alter.as.catalog.change.copy.create.constraint.constraints.current.database.databases.dbms.default.deny.drop.element.elements.exists.from.grant.graph.graphs.if.index.indexes.label.labels.management.match.name.names.new.node.nodes.not.of.on.or.password.populated.privileges.property.read.relationship.relationships.remove.replace.required.revoke.role.roles.set.show.start.status.stop.suspended.to.traverse.type.types.user.users.with.write".split(".")),p=/[*+\-<>=&|~%^]/;const f={name:"cypher",startState:function(){return{tokenize:d,context:null,indent:0,col:0}},token:function(t,e){if(t.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=t.indentation()),t.eatSpace())return null;var n=e.tokenize(t,e);if(n!=="comment"&&e.context&&e.context.align==null&&e.context.type!=="pattern"&&(e.context.align=!0),a==="(")o(e,")",t.column());else if(a==="[")o(e,"]",t.column());else if(a==="{")o(e,"}",t.column());else if(/[\]\}\)]/.test(a)){for(;e.context&&e.context.type==="pattern";)s(e);e.context&&a===e.context.type&&s(e)}else a==="."&&e.context&&e.context.type==="pattern"?s(e):/atom|string|variable/.test(n)&&e.context&&(/[\}\]]/.test(e.context.type)?o(e,"pattern",t.column()):e.context.type==="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=t.column()));return n},indent:function(t,e,n){var l=e&&e.charAt(0),r=t.context;if(/[\]\}]/.test(l))for(;r&&r.type==="pattern";)r=r.prev;var c=r&&l===r.type;return r?r.type==="keywords"?null:r.align?r.col+(c?0:1):r.indent+(c?0:n.unit):0}};export{f as t};
import{t as r}from"./cypher-An7BGqKu.js";export{r as cypher};

Sorry, the diff of this file is too big to display

import{t as o}from"./d-fbf-n02o.js";export{o as d};
function s(t){for(var n={},e=t.split(" "),r=0;r<e.length;++r)n[e[r]]=!0;return n}var f="body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with",a={keywords:s("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters "+f),blockKeywords:s(f),builtin:s("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t"),atoms:s("exit failure success true false null"),hooks:{"@":function(t,n){return t.eatWhile(/[\w\$_]/),"meta"}}},v=a.statementIndentUnit,x=a.keywords,_=a.builtin,d=a.blockKeywords,w=a.atoms,m=a.hooks,g=a.multiLineStrings,p=/[+\-*&%=<>!?|\/]/,o;function y(t,n){var e=t.next();if(m[e]){var r=m[e](t,n);if(r!==!1)return r}if(e=='"'||e=="'"||e=="`")return n.tokenize=z(e),n.tokenize(t,n);if(/[\[\]{}\(\),;\:\.]/.test(e))return o=e,null;if(/\d/.test(e))return t.eatWhile(/[\w\.]/),"number";if(e=="/"){if(t.eat("+"))return n.tokenize=b,b(t,n);if(t.eat("*"))return n.tokenize=h,h(t,n);if(t.eat("/"))return t.skipToEnd(),"comment"}if(p.test(e))return t.eatWhile(p),"operator";t.eatWhile(/[\w\$_\xa1-\uffff]/);var i=t.current();return x.propertyIsEnumerable(i)?(d.propertyIsEnumerable(i)&&(o="newstatement"),"keyword"):_.propertyIsEnumerable(i)?(d.propertyIsEnumerable(i)&&(o="newstatement"),"builtin"):w.propertyIsEnumerable(i)?"atom":"variable"}function z(t){return function(n,e){for(var r=!1,i,u=!1;(i=n.next())!=null;){if(i==t&&!r){u=!0;break}r=!r&&i=="\\"}return(u||!(r||g))&&(e.tokenize=null),"string"}}function h(t,n){for(var e=!1,r;r=t.next();){if(r=="/"&&e){n.tokenize=null;break}e=r=="*"}return"comment"}function b(t,n){for(var e=!1,r;r=t.next();){if(r=="/"&&e){n.tokenize=null;break}e=r=="+"}return"comment"}function k(t,n,e,r,i){this.indented=t,this.column=n,this.type=e,this.align=r,this.prev=i}function c(t,n,e){var r=t.indented;return t.context&&t.context.type=="statement"&&(r=t.context.indented),t.context=new k(r,n,e,null,t.context)}function l(t){var n=t.context.type;return(n==")"||n=="]"||n=="}")&&(t.indented=t.context.indented),t.context=t.context.prev}const I={name:"d",startState:function(t){return{tokenize:null,context:new k(-t,0,"top",!1),indented:0,startOfLine:!0}},token:function(t,n){var e=n.context;if(t.sol()&&(e.align??(e.align=!1),n.indented=t.indentation(),n.startOfLine=!0),t.eatSpace())return null;o=null;var r=(n.tokenize||y)(t,n);if(r=="comment"||r=="meta")return r;if(e.align??(e.align=!0),(o==";"||o==":"||o==",")&&e.type=="statement")l(n);else if(o=="{")c(n,t.column(),"}");else if(o=="[")c(n,t.column(),"]");else if(o=="(")c(n,t.column(),")");else if(o=="}"){for(;e.type=="statement";)e=l(n);for(e.type=="}"&&(e=l(n));e.type=="statement";)e=l(n)}else o==e.type?l(n):((e.type=="}"||e.type=="top")&&o!=";"||e.type=="statement"&&o=="newstatement")&&c(n,t.column(),"statement");return n.startOfLine=!1,r},indent:function(t,n,e){if(t.tokenize!=y&&t.tokenize!=null)return null;var r=t.context,i=n&&n.charAt(0);r.type=="statement"&&i=="}"&&(r=r.prev);var u=i==r.type;return r.type=="statement"?r.indented+(i=="{"?0:v||e.unit):r.align?r.column+(u?0:1):r.indented+(u?0:e.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{I as t};
import{n as C,t as D}from"./graphlib-B4SLw_H3.js";import{t as F}from"./clone-bEECh4rs.js";import{t as L}from"./dagre-DFula7I5.js";import{i as O}from"./min-Ci3LzCQg.js";import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as w,r as t}from"./src-BKLwm2RN.js";import{b as M}from"./chunk-ABZYJK2D-t8l6Viza.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import{t as j}from"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import{a as Y,c as k,i as H,l as _,n as z,t as q,u as K}from"./chunk-JZLCHNYA-cYgsW1_e.js";import{a as Q,i as U,n as V,r as W,t as Z}from"./chunk-QXUST7PY-CUUVFKsm.js";function X(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:$(e),edges:ee(e)};return C(e.graph())||(r.value=F(e.graph())),r}function $(e){return O(e.nodes(),function(r){var n=e.node(r),d=e.parent(r),o={v:r};return C(n)||(o.value=n),C(d)||(o.parent=d),o})}function ee(e){return O(e.edges(),function(r){var n=e.edge(r),d={v:r.v,w:r.w};return C(r.name)||(d.name=r.name),C(n)||(d.value=n),d})}var c=new Map,b=new Map,G=new Map,ne=w(()=>{b.clear(),G.clear(),c.clear()},"clear"),I=w((e,r)=>{let n=b.get(r)||[];return t.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),re=w((e,r)=>{let n=b.get(r)||[];return t.info("Descendants of ",r," is ",n),t.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||I(e.v,r)||I(e.w,r)||n.includes(e.w):(t.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),P=w((e,r,n,d)=>{t.warn("Copying children of ",e,"root",d,"data",r.node(e),d);let o=r.children(e)||[];e!==d&&o.push(e),t.warn("Copying (nodes) clusterId",e,"nodes",o),o.forEach(l=>{if(r.children(l).length>0)P(l,r,n,d);else{let i=r.node(l);t.info("cp ",l," to ",d," with parent ",e),n.setNode(l,i),d!==r.parent(l)&&(t.warn("Setting parent",l,r.parent(l)),n.setParent(l,r.parent(l))),e!==d&&l!==e?(t.debug("Setting parent",l,e),n.setParent(l,e)):(t.info("In copy ",e,"root",d,"data",r.node(e),d),t.debug("Not Setting parent for node=",l,"cluster!==rootId",e!==d,"node!==clusterId",l!==e));let s=r.edges(l);t.debug("Copying Edges",s),s.forEach(f=>{t.info("Edge",f);let E=r.edge(f.v,f.w,f.name);t.info("Edge data",E,d);try{re(f,d)?(t.info("Copying as ",f.v,f.w,E,f.name),n.setEdge(f.v,f.w,E,f.name),t.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):t.info("Skipping copy of edge ",f.v,"-->",f.w," rootId: ",d," clusterId:",e)}catch(N){t.error(N)}})}t.debug("Removing node",l),r.removeNode(l)})},"copy"),B=w((e,r)=>{let n=r.children(e),d=[...n];for(let o of n)G.set(o,e),d=[...d,...B(o,r)];return d},"extractDescendants"),ae=w((e,r,n)=>{let d=e.edges().filter(s=>s.v===r||s.w===r),o=e.edges().filter(s=>s.v===n||s.w===n),l=d.map(s=>({v:s.v===r?n:s.v,w:s.w===r?r:s.w})),i=o.map(s=>({v:s.v,w:s.w}));return l.filter(s=>i.some(f=>s.v===f.v&&s.w===f.w))},"findCommonEdges"),S=w((e,r,n)=>{let d=r.children(e);if(t.trace("Searching children of id ",e,d),d.length<1)return e;let o;for(let l of d){let i=S(l,r,n),s=ae(r,n,i);if(i)if(s.length>0)o=i;else return i}return o},"findNonClusterChild"),T=w(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),te=w((e,r)=>{if(!e||r>10){t.debug("Opting out, no graph ");return}else t.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(t.warn("Cluster identified",n," Replacement id in edges: ",S(n,e,n)),b.set(n,B(n,e)),c.set(n,{id:S(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){let d=e.children(n),o=e.edges();d.length>0?(t.debug("Cluster identified",n,b),o.forEach(l=>{I(l.v,n)^I(l.w,n)&&(t.warn("Edge: ",l," leaves cluster ",n),t.warn("Descendants of XXX ",n,": ",b.get(n)),c.get(n).externalConnections=!0)})):t.debug("Not a cluster ",n,b)});for(let n of c.keys()){let d=c.get(n).id,o=e.parent(d);o!==n&&c.has(o)&&!c.get(o).externalConnections&&(c.get(n).id=o)}e.edges().forEach(function(n){let d=e.edge(n);t.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),t.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let o=n.v,l=n.w;if(t.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(t.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),o=T(n.v),l=T(n.w),e.removeEdge(n.v,n.w,n.name),o!==n.v){let i=e.parent(o);c.get(i).externalConnections=!0,d.fromCluster=n.v}if(l!==n.w){let i=e.parent(l);c.get(i).externalConnections=!0,d.toCluster=n.w}t.warn("Fix Replacing with XXX",o,l,n.name),e.setEdge(o,l,d,n.name)}}),t.warn("Adjusted Graph",X(e)),A(e,0),t.trace(c)},"adjustClustersAndEdges"),A=w((e,r)=>{var o,l;if(t.warn("extractor - ",r,X(e),e.children("D")),r>10){t.error("Bailing out");return}let n=e.nodes(),d=!1;for(let i of n){let s=e.children(i);d||(d=s.length>0)}if(!d){t.debug("Done, no node has children",e.nodes());return}t.debug("Nodes = ",n,r);for(let i of n)if(t.debug("Extracting node",i,c,c.has(i)&&!c.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",r),!c.has(i))t.debug("Not a cluster",i,r);else if(!c.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){t.warn("Cluster without external connections, without a parent and with children",i,r);let s=e.graph().rankdir==="TB"?"LR":"TB";(l=(o=c.get(i))==null?void 0:o.clusterData)!=null&&l.dir&&(s=c.get(i).clusterData.dir,t.warn("Fixing dir",c.get(i).clusterData.dir,s));let f=new D({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});t.warn("Old graph before copy",X(e)),P(i,e,f,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:c.get(i).clusterData,label:c.get(i).label,graph:f}),t.warn("New graph after copy node: (",i,")",X(f)),t.debug("Old graph after copy",X(e))}else t.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!c.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),r),t.debug(c);n=e.nodes(),t.warn("New list of nodes",n);for(let i of n){let s=e.node(i);t.warn(" Now next level",i,s),s!=null&&s.clusterNode&&A(s.graph,r+1)}},"extractor"),J=w((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(d=>{let o=J(e,e.children(d));n=[...n,...o]}),n},"sorter"),ie=w(e=>J(e,e.children()),"sortNodesByHierarchy"),R=w(async(e,r,n,d,o,l)=>{t.warn("Graph in recursive render:XAX",X(r),o);let i=r.graph().rankdir;t.trace("Dir in recursive render - dir:",i);let s=e.insert("g").attr("class","root");r.nodes()?t.info("Recursive render XXX",r.nodes()):t.info("No nodes found for",r),r.edges().length>0&&t.info("Recursive edges",r.edge(r.edges()[0]));let f=s.insert("g").attr("class","clusters"),E=s.insert("g").attr("class","edgePaths"),N=s.insert("g").attr("class","edgeLabels"),p=s.insert("g").attr("class","nodes");await Promise.all(r.nodes().map(async function(g){let a=r.node(g);if(o!==void 0){let u=JSON.parse(JSON.stringify(o.clusterData));t.trace(`Setting data for parent cluster XXX
Node.id = `,g,`
data=`,u.height,`
Parent cluster`,o.height),r.setNode(o.id,u),r.parent(g)||(t.trace("Setting parent",g,o.id),r.setParent(g,o.id,u))}if(t.info("(Insert) Node XXX"+g+": "+JSON.stringify(r.node(g))),a==null?void 0:a.clusterNode){t.info("Cluster identified XBX",g,a.width,r.node(g));let{ranksep:u,nodesep:m}=r.graph();a.graph.setGraph({...a.graph.graph(),ranksep:u+25,nodesep:m});let y=await R(p,a.graph,n,d,r.node(g),l),x=y.elem;K(a,x),a.diff=y.diff||0,t.info("New compound node after recursive render XAX",g,"width",a.width,"height",a.height),_(x,a)}else r.children(g).length>0?(t.trace("Cluster - the non recursive path XBX",g,a.id,a,a.width,"Graph:",r),t.trace(S(a.id,r)),c.set(a.id,{id:S(a.id,r),node:a})):(t.trace("Node - the non recursive path XAX",g,p,r.node(g),i),await Y(p,r.node(g),{config:l,dir:i}))})),await w(async()=>{let g=r.edges().map(async function(a){let u=r.edge(a.v,a.w,a.name);t.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(a)),t.info("Edge "+a.v+" -> "+a.w+": ",a," ",JSON.stringify(r.edge(a))),t.info("Fix",c,"ids:",a.v,a.w,"Translating: ",c.get(a.v),c.get(a.w)),await W(N,u)});await Promise.all(g)},"processEdges")(),t.info("Graph before layout:",JSON.stringify(X(r))),t.info("############################################# XXX"),t.info("### Layout ### XXX"),t.info("############################################# XXX"),L(r),t.info("Graph after layout:",JSON.stringify(X(r)));let h=0,{subGraphTitleTotalMargin:v}=j(l);return await Promise.all(ie(r).map(async function(g){var u;let a=r.node(g);if(t.info("Position XBX => "+g+": ("+a.x,","+a.y,") width: ",a.width," height: ",a.height),a==null?void 0:a.clusterNode)a.y+=v,t.info("A tainted cluster node XBX1",g,a.id,a.width,a.height,a.x,a.y,r.parent(g)),c.get(a.id).node=a,k(a);else if(r.children(g).length>0){t.info("A pure cluster node XBX1",g,a.id,a.x,a.y,a.width,a.height,r.parent(g)),a.height+=v,r.node(a.parentId);let m=(a==null?void 0:a.padding)/2||0,y=((u=a==null?void 0:a.labelBBox)==null?void 0:u.height)||0,x=y-m||0;t.debug("OffsetY",x,"labelHeight",y,"halfPadding",m),await H(f,a),c.get(a.id).node=a}else{let m=r.node(a.parentId);a.y+=v/2,t.info("A regular node XBX1 - using the padding",a.id,"parent",a.parentId,a.width,a.height,a.x,a.y,"offsetY",a.offsetY,"parent",m,m==null?void 0:m.offsetY,a),k(a)}})),r.edges().forEach(function(g){let a=r.edge(g);t.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(a),a),a.points.forEach(u=>u.y+=v/2),Q(a,V(E,a,c,n,r.node(g.v),r.node(g.w),d))}),r.nodes().forEach(function(g){let a=r.node(g);t.info(g,a.type,a.diff),a.isGroup&&(h=a.diff)}),t.warn("Returning from recursive render XAX",s,h),{elem:s,diff:h}},"recursiveRender"),de=w(async(e,r)=>{var l,i,s,f,E,N;let n=new D({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((l=e.config)==null?void 0:l.nodeSpacing)||((s=(i=e.config)==null?void 0:i.flowchart)==null?void 0:s.nodeSpacing)||e.nodeSpacing,ranksep:((f=e.config)==null?void 0:f.rankSpacing)||((N=(E=e.config)==null?void 0:E.flowchart)==null?void 0:N.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),d=r.select("g");U(d,e.markers,e.type,e.diagramId),z(),Z(),q(),ne(),e.nodes.forEach(p=>{n.setNode(p.id,{...p}),p.parentId&&n.setParent(p.id,p.parentId)}),t.debug("Edges:",e.edges),e.edges.forEach(p=>{if(p.start===p.end){let h=p.start,v=h+"---"+h+"---1",g=h+"---"+h+"---2",a=n.node(h);n.setNode(v,{domId:v,id:v,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(v,a.parentId),n.setNode(g,{domId:g,id:g,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(g,a.parentId);let u=structuredClone(p),m=structuredClone(p),y=structuredClone(p);u.label="",u.arrowTypeEnd="none",u.id=h+"-cyclic-special-1",m.arrowTypeStart="none",m.arrowTypeEnd="none",m.id=h+"-cyclic-special-mid",y.label="",a.isGroup&&(u.fromCluster=h,y.toCluster=h),y.id=h+"-cyclic-special-2",y.arrowTypeStart="none",n.setEdge(h,v,u,h+"-cyclic-special-0"),n.setEdge(v,g,m,h+"-cyclic-special-1"),n.setEdge(g,h,y,h+"-cyc<lic-special-2")}else n.setEdge(p.start,p.end,{...p},p.id)}),t.warn("Graph at first:",JSON.stringify(X(n))),te(n),t.warn("Graph after XAX:",JSON.stringify(X(n)));let o=M();await R(d,n,e.type,e.diagramId,void 0,o)},"render");export{de as render};
import{s as z}from"./chunk-LvLJmgfZ.js";import{t as J}from"./react-BGmjiNul.js";import{t as Q}from"./react-dom-C9fstfnp.js";import{_ as P,i as U,n as Z,t as ee,v as te,y as re}from"./click-outside-container-BVQDdpbt.js";import{t as ie}from"./dist-CdBsAJTp.js";var ae=Q(),r=z(J(),1),ne=()=>t=>t.targetX,oe=()=>t=>t.targetY,le=()=>t=>t.targetWidth,de=()=>t=>t.targetHeight,se=()=>t=>t.targetY+10,ue=()=>t=>Math.max(0,(t.targetHeight-28)/2);const ce=ie("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[oe(),"px"],"d19meir1-1":[ne(),"px"],"d19meir1-2":[le(),"px"],"d19meir1-3":[de(),"px"],"d19meir1-4":[se(),"px"],"d19meir1-5":[ue(),"px"]}});function ge(){let[t,n]=r.useState();return[t??void 0,n]}function me(){let[t,n]=ge(),[a,f]=r.useState(0),[v,b]=r.useState(!0);return r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;let o=new IntersectionObserver(l=>{l.length!==0&&b(l[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),r.useEffect(()=>{if(v||t===void 0)return;let o,l=()=>{let{right:k}=t.getBoundingClientRect();f(x=>Math.min(x+window.innerWidth-k-10,0)),o=requestAnimationFrame(l)};return o=requestAnimationFrame(l),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,v]),{ref:n,style:r.useMemo(()=>({transform:`translateX(${a}px)`}),[a])}}var ve=t=>{let{target:n,content:a,onFinishEditing:f,forceEditMode:v,initialValue:b,imageEditorOverride:o,markdownDivCreateNode:l,highlight:k,className:x,theme:C,id:V,cell:w,bloom:c,validateCell:d,getCellRenderer:M,provideEditor:p,isOutsideClick:W,customEventTarget:X}=t,[s,Y]=r.useState(v?a:void 0),O=r.useRef(s??a);O.current=s??a;let[h,N]=r.useState(()=>d===void 0?!0:!(P(a)&&(d==null?void 0:d(w,a,O.current))===!1)),g=r.useCallback((e,i)=>{f(h?e:void 0,i)},[h,f]),q=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&P(e)){let i=d(w,e,O.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[w,d]),y=r.useRef(!1),m=r.useRef(void 0),B=r.useCallback(()=>{g(s,[0,0]),y.current=!0},[s,g]),G=r.useCallback((e,i)=>{g(e,i??m.current??[0,0]),y.current=!0},[g]),_=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),m.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!y.current&&m.current!==void 0&&(g(i?s:void 0,m.current),y.current=!0)},0)},[g,s]),D=s??a,[u,j]=r.useMemo(()=>{var i,K;if(te(a))return[];let e=p==null?void 0:p(a);return e===void 0?[(K=(i=M(a))==null?void 0:i.provideEditor)==null?void 0:K.call(i,a),!1]:[e,!1]},[a,M,p]),{ref:L,style:$}=me(),R=!0,F,I=!0,E;if(u!==void 0){R=u.disablePadding!==!0,I=u.disableStyling!==!0;let e=re(u);e&&(E=u.styleOverride);let i=e?u.editor:u;F=r.createElement(i,{isHighlighted:k,onChange:q,value:D,initialValue:b,onFinishedEditing:G,validatedSelection:P(D)?D.selectionRange:void 0,forceEditMode:v,target:n,imageEditorOverride:o,markdownDivCreateNode:l,isValid:h,theme:C})}E={...E,...$};let A=document.getElementById("portal");if(A===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let S=I?"gdg-style":"gdg-unstyle";h||(S+=" gdg-invalid"),R&&(S+=" gdg-pad");let H=(c==null?void 0:c[0])??1,T=(c==null?void 0:c[1])??1;return(0,ae.createPortal)(r.createElement(Z.Provider,{value:C},r.createElement(ee,{style:U(C),className:x,onClickOutside:B,isOutsideClick:W,customEventTarget:X},r.createElement(ce,{ref:L,id:V,className:S,style:E,as:j===!0?"label":void 0,targetX:n.x-H,targetY:n.y-T,targetWidth:n.width+H*2,targetHeight:n.height+T*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:_},F)))),A)};export{ve as default};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var e=a("database-zap",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84",key:"14ibmq"}],["path",{d:"M21 5V8",key:"1marbg"}],["path",{d:"M21 12L18 17H22L19 22",key:"zafso"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87",key:"1y4wr8"}]]);export{e as t};
var x=Object.defineProperty;var A=(r,e,n)=>e in r?x(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n;var l=(r,e,n)=>A(r,typeof e!="symbol"?e+"":e,n);import{i as m}from"./useEvent-DO6uJBas.js";import{Ct as I,Dn as E,Mn as T,Yr as C,gr as p,hi as M,ir as w,n as L,rr as O}from"./cells-BpZ7g6ok.js";import{d as $}from"./hotkeys-BHHWjLlp.js";import{t as P}from"./createLucideIcon-CnW3RofX.js";import{t as R}from"./multi-map-C8GlnP-4.js";var D=P("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]),u,c;function S(r,e,n,a,i){var t={};return Object.keys(a).forEach(function(s){t[s]=a[s]}),t.enumerable=!!t.enumerable,t.configurable=!!t.configurable,("value"in t||t.initializer)&&(t.writable=!0),t=n.slice().reverse().reduce(function(s,o){return o(r,e,s)||s},t),i&&t.initializer!==void 0&&(t.value=t.initializer?t.initializer.call(i):void 0,t.initializer=void 0),t.initializer===void 0?(Object.defineProperty(r,e,t),null):t}var d=class{async getAttachments(r){return[]}asURI(r){return`${this.contextType}://${r}`}parseContextIds(r){let e=RegExp(`${this.mentionPrefix}([\\w-]+):\\/\\/([\\w./-]+)`,"g"),n=[...r.matchAll(e)],a=t=>t.slice(1),i=n.filter(([,t])=>t===this.contextType).map(([t])=>a(t));return[...new Set(i)]}createBasicCompletion(r,e){return{label:`${this.mentionPrefix}${r.uri.split("://")[1]}`,displayLabel:r.name,detail:(e==null?void 0:e.detail)||r.description,boost:(e==null?void 0:e.boost)||1,type:(e==null?void 0:e.type)||this.contextType,apply:`${this.mentionPrefix}${r.uri}`,section:(e==null?void 0:e.section)||this.title}}};let U=(u=C(),c=class{constructor(){l(this,"providers",new Set)}register(r){return this.providers.add(r),this}getProviders(){return this.providers}getProvider(r){return[...this.providers].find(e=>e.contextType===r)}getAllItems(){return[...this.providers].flatMap(r=>r.getItems())}parseAllContextIds(r){return[...this.providers].flatMap(e=>e.parseContextIds(r))}getContextInfo(r){let e=[],n=new Map(this.getAllItems().map(a=>[a.uri,a]));for(let a of r){let i=n.get(a);i&&e.push(i)}return e}formatContextForAI(r){let e=new Map(this.getAllItems().map(a=>[a.uri,a])),n=[];for(let a of r){let i=e.get(a);i&&n.push(i)}return n.length===0?"":n.map(a=>{var i;return((i=this.getProvider(a.type))==null?void 0:i.formatContext(a))||""}).join(`
`)}async getAttachmentsForContext(r){let e=new Map(this.getAllItems().map(t=>[t.uri,t])),n=[];for(let t of r){let s=e.get(t);s&&n.push(s)}if(n.length===0)return[];let a=new R;for(let t of n){let s=t.type;a.add(s,t)}let i=[...a.entries()].map(async([t,s])=>{let o=this.getProvider(t);if(!o)return[];try{return await o.getAttachments(s)}catch(v){return $.error("Error getting attachments from provider",v),[]}});return(await Promise.all(i)).flat()}},S(c.prototype,"getAllItems",[u],Object.getOwnPropertyDescriptor(c.prototype,"getAllItems"),c.prototype),c);function f(r){return r.replaceAll("<","&lt;").replaceAll(">","&gt;")}function h(r){let{type:e,data:n,details:a}=r,i=`<${e}`;for(let[t,s]of Object.entries(n))if(s!==void 0){let o=f(typeof s=="object"&&s?JSON.stringify(s):String(s));i+=` ${t}="${o}"`}return i+=">",a&&(i+=f(a)),i+=`</${e}>`,i}const g={LOCAL_TABLE:7,REMOTE_TABLE:5,HIGH:4,MEDIUM:3,CELL_OUTPUT:2,LOW:2},y={ERROR:{name:"Error",rank:1},TABLE:{name:"Table",rank:2},DATA_SOURCES:{name:"Data Sources",rank:3},VARIABLE:{name:"Variable",rank:4},CELL_OUTPUT:{name:"Cell Output",rank:5},FILE:{name:"File",rank:6}};var _=M(),b="datasource",k=class extends d{constructor(e,n){super();l(this,"title","Datasource");l(this,"mentionPrefix","@");l(this,"contextType",b);this.connectionsMap=e,this.dataframes=[...n.values()].filter(a=>w(a)==="dataframe")}getItems(){return[...this.connectionsMap.values()].map(e=>{var i;let n="Database schema.",a={connection:e};return p.has(e.name)&&(a.tables=this.dataframes,n="Database schema and the dataframes that can be queried"),e.databases.length===0&&(((i=a.tables)==null?void 0:i.length)??0)===0?null:{uri:this.asURI(e.name),name:e.name,description:n,type:this.contextType,data:a}}).filter(Boolean)}formatContext(e){let n=e.data,{name:a,display_name:i,source:t,...s}=n.connection,o=s;return p.has(a)||(o={...s,engine_name:a}),h({type:this.contextType,data:{connection:o,tables:n.tables}})}formatCompletion(e){let n=e.data,a=n.connection,i=n.tables,t=a.name;return p.has(a.name)&&(t="In-Memory"),{label:`@${t}`,displayLabel:t,detail:T(a.dialect),boost:g.MEDIUM,type:this.contextType,section:y.DATA_SOURCES,info:()=>{let s=document.createElement("div");return s.classList.add("mo-cm-tooltip","docs-documentation"),(0,_.createRoot)(s).render(E(a,i)),s}}}};function z(r){var s;let e=(s=m.get(L(r)))==null?void 0:s.code;if(!e||e.trim()==="")return null;let[n,a,i]=I.sql.transformIn(e),t=m.get(O).connectionsMap.get(i.engine);return t?`@${b}://${t.name}`:null}export{h as a,D as c,y as i,z as n,d as o,g as r,U as s,k as t};
var Lt=Object.defineProperty;var Ct=(n,t,e)=>t in n?Lt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>Ct(n,typeof t!="symbol"?t+"":t,e);import{d as W}from"./hotkeys-BHHWjLlp.js";import{a as Nt,i as Et,n as S,o as Qt,r as Gt,s as ct,t as x}from"./toDate-CgbKQM5E.js";import{i as Z,n as Ft,r as A,t as lt}from"./en-US-pRRbZZHE.js";import{t as dt}from"./isValid-DcYggVWP.js";function ht(n,t,e){let r=x(n,e==null?void 0:e.in);return isNaN(t)?S((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function N(n,t){var c,h,y,b;let e=Z(),r=(t==null?void 0:t.weekStartsOn)??((h=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:h.weekStartsOn)??e.weekStartsOn??((b=(y=e.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0,a=x(n,t==null?void 0:t.in),i=a.getDay(),s=(i<r?7:0)+i-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function $(n,t){return N(n,{...t,weekStartsOn:1})}function wt(n,t){let e=x(n,t==null?void 0:t.in),r=e.getFullYear(),a=S(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let i=$(a),s=S(e,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let c=$(s);return e.getTime()>=i.getTime()?r+1:e.getTime()>=c.getTime()?r:r-1}function mt(n,t){let e=x(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function Zt(n,t,e){let[r,a]=Ft(e==null?void 0:e.in,n,t),i=mt(r),s=mt(a),c=+i-A(i),h=+s-A(s);return Math.round((c-h)/Gt)}function $t(n,t){let e=wt(n,t),r=S((t==null?void 0:t.in)||n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),$(r)}function Ut(n,t){let e=x(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function It(n,t){let e=x(n,t==null?void 0:t.in);return Zt(e,Ut(e))+1}function ft(n,t){let e=x(n,t==null?void 0:t.in),r=$(e)-+$t(e);return Math.round(r/ct)+1}function j(n,t){var b,k,D,O;let e=x(n,t==null?void 0:t.in),r=e.getFullYear(),a=Z(),i=(t==null?void 0:t.firstWeekContainsDate)??((k=(b=t==null?void 0:t.locale)==null?void 0:b.options)==null?void 0:k.firstWeekContainsDate)??a.firstWeekContainsDate??((O=(D=a.locale)==null?void 0:D.options)==null?void 0:O.firstWeekContainsDate)??1,s=S((t==null?void 0:t.in)||n,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let c=N(s,t),h=S((t==null?void 0:t.in)||n,0);h.setFullYear(r,0,i),h.setHours(0,0,0,0);let y=N(h,t);return+e>=+c?r+1:+e>=+y?r:r-1}function Bt(n,t){var s,c,h,y;let e=Z(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??e.firstWeekContainsDate??((y=(h=e.locale)==null?void 0:h.options)==null?void 0:y.firstWeekContainsDate)??1,a=j(n,t),i=S((t==null?void 0:t.in)||n,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),N(i,t)}function gt(n,t){let e=x(n,t==null?void 0:t.in),r=N(e,t)-+Bt(e,t);return Math.round(r/ct)+1}function d(n,t){return(n<0?"-":"")+Math.abs(n).toString().padStart(t,"0")}const E={y(n,t){let e=n.getFullYear(),r=e>0?e:1-e;return d(t==="yy"?r%100:r,t.length)},M(n,t){let e=n.getMonth();return t==="M"?String(e+1):d(e+1,2)},d(n,t){return d(n.getDate(),t.length)},a(n,t){let e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];default:return e==="am"?"a.m.":"p.m."}},h(n,t){return d(n.getHours()%12||12,t.length)},H(n,t){return d(n.getHours(),t.length)},m(n,t){return d(n.getMinutes(),t.length)},s(n,t){return d(n.getSeconds(),t.length)},S(n,t){let e=t.length,r=n.getMilliseconds();return d(Math.trunc(r*10**(e-3)),t.length)}};var U={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};const pt={G:function(n,t,e){let r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){let r=n.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return E.y(n,t)},Y:function(n,t,e,r){let a=j(n,r),i=a>0?a:1-a;return t==="YY"?d(i%100,2):t==="Yo"?e.ordinalNumber(i,{unit:"year"}):d(i,t.length)},R:function(n,t){return d(wt(n),t.length)},u:function(n,t){return d(n.getFullYear(),t.length)},Q:function(n,t,e){let r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){let r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return d(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){let r=n.getMonth();switch(t){case"M":case"MM":return E.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){let r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){let a=gt(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):d(a,t.length)},I:function(n,t,e){let r=ft(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):d(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):E.d(n,t)},D:function(n,t,e){let r=It(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):d(r,t.length)},E:function(n,t,e){let r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return d(i,2);case"eo":return e.ordinalNumber(i,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return d(i,t.length);case"co":return e.ordinalNumber(i,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){let r=n.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return d(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){let r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){let r=n.getHours(),a;switch(a=r===12?U.noon:r===0?U.midnight:r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){let r=n.getHours(),a;switch(a=r>=17?U.evening:r>=12?U.afternoon:r>=4?U.morning:U.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return E.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):E.H(n,t)},K:function(n,t,e){let r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):E.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):E.s(n,t)},S:function(n,t){return E.S(n,t)},X:function(n,t,e){let r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return bt(r);case"XXXX":case"XX":return Q(r);default:return Q(r,":")}},x:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"x":return bt(r);case"xxxx":case"xx":return Q(r);default:return Q(r,":")}},O:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yt(r,":");default:return"GMT"+Q(r,":")}},z:function(n,t,e){let r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yt(r,":");default:return"GMT"+Q(r,":")}},t:function(n,t,e){return d(Math.trunc(n/1e3),t.length)},T:function(n,t,e){return d(+n,t.length)}};function yt(n,t=""){let e=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),i=r%60;return i===0?e+String(a):e+String(a)+t+d(i,2)}function bt(n,t){return n%60==0?(n>0?"-":"+")+d(Math.abs(n)/60,2):Q(n,t)}function Q(n,t=""){let e=n>0?"-":"+",r=Math.abs(n),a=d(Math.trunc(r/60),2),i=d(r%60,2);return e+a+t+i}var xt=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Tt=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const V={p:Tt,P:(n,t)=>{let e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return xt(n,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",xt(r,t)).replace("{{time}}",Tt(a,t))}};var Xt=/^D+$/,zt=/^Y+$/,Rt=["D","DD","YY","YYYY"];function Dt(n){return Xt.test(n)}function Mt(n){return zt.test(n)}function J(n,t,e){let r=Wt(n,t,e);if(console.warn(r),Rt.includes(n))throw RangeError(r)}function Wt(n,t,e){let r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var At=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Kt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jt=/^'([^]*?)'?$/,Vt=/''/g,Jt=/[a-zA-Z]/;function I(n,t,e){var b,k,D,O,v,C,P,L;let r=Z(),a=(e==null?void 0:e.locale)??r.locale??lt,i=(e==null?void 0:e.firstWeekContainsDate)??((k=(b=e==null?void 0:e.locale)==null?void 0:b.options)==null?void 0:k.firstWeekContainsDate)??r.firstWeekContainsDate??((O=(D=r.locale)==null?void 0:D.options)==null?void 0:O.firstWeekContainsDate)??1,s=(e==null?void 0:e.weekStartsOn)??((C=(v=e==null?void 0:e.locale)==null?void 0:v.options)==null?void 0:C.weekStartsOn)??r.weekStartsOn??((L=(P=r.locale)==null?void 0:P.options)==null?void 0:L.weekStartsOn)??0,c=x(n,e==null?void 0:e.in);if(!dt(c))throw RangeError("Invalid time value");let h=t.match(Kt).map(M=>{let T=M[0];if(T==="p"||T==="P"){let F=V[T];return F(M,a.formatLong)}return M}).join("").match(At).map(M=>{if(M==="''")return{isToken:!1,value:"'"};let T=M[0];if(T==="'")return{isToken:!1,value:_t(M)};if(pt[T])return{isToken:!0,value:M};if(T.match(Jt))throw RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:M}});a.localize.preprocessor&&(h=a.localize.preprocessor(c,h));let y={firstWeekContainsDate:i,weekStartsOn:s,locale:a};return h.map(M=>{if(!M.isToken)return M.value;let T=M.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Mt(T)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Dt(T))&&J(T,t,String(n));let F=pt[T[0]];return F(c,T,a.localize,y)}).join("")}function _t(n){let t=n.match(jt);return t?t[1].replace(Vt,"'"):n}function te(){return Object.assign({},Z())}function ee(n,t){let e=x(n,t==null?void 0:t.in).getDay();return e===0?7:e}function re(n,t){let e=ne(t)?new t(0):S(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function ne(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}var ae=10,St=class{constructor(){o(this,"subPriority",0)}validate(n,t){return!0}},ie=class extends St{constructor(n,t,e,r,a){super(),this.value=n,this.validateValue=t,this.setValue=e,this.priority=r,a&&(this.subPriority=a)}validate(n,t){return this.validateValue(n,this.value,t)}set(n,t,e){return this.setValue(n,t,this.value,e)}},oe=class extends St{constructor(t,e){super();o(this,"priority",ae);o(this,"subPriority",-1);this.context=t||(r=>S(e,r))}set(t,e){return e.timestampIsSet?t:S(t,re(t,this.context))}},l=class{run(n,t,e,r){let a=this.parse(n,t,e,r);return a?{setter:new ie(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(n,t,e){return!0}},se=class extends l{constructor(){super(...arguments);o(this,"priority",140);o(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}};const g={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Y={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function p(n,t){return n&&{value:t(n.value),rest:n.rest}}function w(n,t){let e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function q(n,t){let e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};let r=e[1]==="+"?1:-1,a=e[2]?parseInt(e[2],10):0,i=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:r*(a*Et+i*Nt+s*Qt),rest:t.slice(e[0].length)}}function kt(n){return w(g.anyDigitsSigned,n)}function f(n,t){switch(n){case 1:return w(g.singleDigit,t);case 2:return w(g.twoDigits,t);case 3:return w(g.threeDigits,t);case 4:return w(g.fourDigits,t);default:return w(RegExp("^\\d{1,"+n+"}"),t)}}function vt(n,t){switch(n){case 1:return w(g.singleDigitSigned,t);case 2:return w(g.twoDigitsSigned,t);case 3:return w(g.threeDigitsSigned,t);case 4:return w(g.fourDigitsSigned,t);default:return w(RegExp("^-?\\d{1,"+n+"}"),t)}}function _(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Ht(n,t){let e=t>0,r=e?t:1-t,a;if(r<=50)a=n||100;else{let i=r+50,s=Math.trunc(i/100)*100,c=n>=i%100;a=n+s-(c?100:0)}return e?a:1-a}function Yt(n){return n%400==0||n%4==0&&n%100!=0}var ue=class extends l{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){let a=i=>({year:i,isTwoDigitYear:e==="yy"});switch(e){case"y":return p(f(4,t),a);case"yo":return p(r.ordinalNumber(t,{unit:"year"}),a);default:return p(f(e.length,t),a)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){let a=t.getFullYear();if(r.isTwoDigitYear){let s=Ht(r.year,a);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}let i=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}},ce=class extends l{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){let a=i=>({year:i,isTwoDigitYear:e==="YY"});switch(e){case"Y":return p(f(4,t),a);case"Yo":return p(r.ordinalNumber(t,{unit:"year"}),a);default:return p(f(e.length,t),a)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,a){let i=j(t,a);if(r.isTwoDigitYear){let c=Ht(r.year,i);return t.setFullYear(c,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),N(t,a)}let s=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(s,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),N(t,a)}},le=class extends l{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return vt(e==="R"?4:e.length,t)}set(t,e,r){let a=S(t,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),$(a)}},de=class extends l{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return vt(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}},he=class extends l{constructor(){super(...arguments);o(this,"priority",120);o(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return f(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}},we=class extends l{constructor(){super(...arguments);o(this,"priority",120);o(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return f(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}},me=class extends l{constructor(){super(...arguments);o(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);o(this,"priority",110)}parse(t,e,r){let a=i=>i-1;switch(e){case"M":return p(w(g.month,t),a);case"MM":return p(f(2,t),a);case"Mo":return p(r.ordinalNumber(t,{unit:"month"}),a);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}},fe=class extends l{constructor(){super(...arguments);o(this,"priority",110);o(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){let a=i=>i-1;switch(e){case"L":return p(w(g.month,t),a);case"LL":return p(f(2,t),a);case"Lo":return p(r.ordinalNumber(t,{unit:"month"}),a);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}};function ge(n,t,e){let r=x(n,e==null?void 0:e.in),a=gt(r,e)-t;return r.setDate(r.getDate()-a*7),x(r,e==null?void 0:e.in)}var pe=class extends l{constructor(){super(...arguments);o(this,"priority",100);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return w(g.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return f(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,a){return N(ge(t,r,a),a)}};function ye(n,t,e){let r=x(n,e==null?void 0:e.in),a=ft(r,e)-t;return r.setDate(r.getDate()-a*7),r}var be=class extends l{constructor(){super(...arguments);o(this,"priority",100);o(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return w(g.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return f(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return $(ye(t,r))}},xe=[31,28,31,30,31,30,31,31,30,31,30,31],Te=[31,29,31,30,31,30,31,31,30,31,30,31],De=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"subPriority",1);o(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return w(g.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return f(e.length,t)}}validate(t,e){let r=Yt(t.getFullYear()),a=t.getMonth();return r?e>=1&&e<=Te[a]:e>=1&&e<=xe[a]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}},Me=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"subpriority",1);o(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return w(g.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return f(e.length,t)}}validate(t,e){return Yt(t.getFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}};function tt(n,t,e){var y,b,k,D;let r=Z(),a=(e==null?void 0:e.weekStartsOn)??((b=(y=e==null?void 0:e.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??r.weekStartsOn??((D=(k=r.locale)==null?void 0:k.options)==null?void 0:D.weekStartsOn)??0,i=x(n,e==null?void 0:e.in),s=i.getDay(),c=(t%7+7)%7,h=7-a;return ht(i,t<0||t>6?t-(s+h)%7:(c+h)%7-(s+h)%7,e)}var Se=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,a){return t=tt(t,r,a),t.setHours(0,0,0,0),t}},ke=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,a){let i=s=>{let c=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+c};switch(e){case"e":case"ee":return p(f(e.length,t),i);case"eo":return p(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,a){return t=tt(t,r,a),t.setHours(0,0,0,0),t}},ve=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,a){let i=s=>{let c=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+c};switch(e){case"c":case"cc":return p(f(e.length,t),i);case"co":return p(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,a){return t=tt(t,r,a),t.setHours(0,0,0,0),t}};function He(n,t,e){let r=x(n,e==null?void 0:e.in);return ht(r,t-ee(r,e),e)}var Ye=class extends l{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){let a=i=>i===0?7:i;switch(e){case"i":case"ii":return f(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return p(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),a);case"iiiii":return p(r.day(t,{width:"narrow",context:"formatting"}),a);case"iiiiii":return p(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),a);default:return p(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),a)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=He(t,r),t.setHours(0,0,0,0),t}},qe=class extends l{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(_(r),0,0,0),t}},Oe=class extends l{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(_(r),0,0,0),t}},Pe=class extends l{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(_(r),0,0,0),t}},Le=class extends l{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return w(g.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return f(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){let a=t.getHours()>=12;return a&&r<12?t.setHours(r+12,0,0,0):!a&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}},Ce=class extends l{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return w(g.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return f(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}},Ne=class extends l{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return w(g.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return f(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}},Ee=class extends l{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return w(g.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return f(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){let a=r<=24?r%24:r;return t.setHours(a,0,0,0),t}},Qe=class extends l{constructor(){super(...arguments);o(this,"priority",60);o(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return w(g.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return f(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}},Ge=class extends l{constructor(){super(...arguments);o(this,"priority",50);o(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return w(g.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return f(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}},Fe=class extends l{constructor(){super(...arguments);o(this,"priority",30);o(this,"incompatibleTokens",["t","T"])}parse(t,e){return p(f(e.length,t),r=>Math.trunc(r*10**(-e.length+3)))}set(t,e,r){return t.setMilliseconds(r),t}},Ze=class extends l{constructor(){super(...arguments);o(this,"priority",10);o(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return q(Y.basicOptionalMinutes,t);case"XX":return q(Y.basic,t);case"XXXX":return q(Y.basicOptionalSeconds,t);case"XXXXX":return q(Y.extendedOptionalSeconds,t);default:return q(Y.extended,t)}}set(t,e,r){return e.timestampIsSet?t:S(t,t.getTime()-A(t)-r)}},$e=class extends l{constructor(){super(...arguments);o(this,"priority",10);o(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return q(Y.basicOptionalMinutes,t);case"xx":return q(Y.basic,t);case"xxxx":return q(Y.basicOptionalSeconds,t);case"xxxxx":return q(Y.extendedOptionalSeconds,t);default:return q(Y.extended,t)}}set(t,e,r){return e.timestampIsSet?t:S(t,t.getTime()-A(t)-r)}},Ue=class extends l{constructor(){super(...arguments);o(this,"priority",40);o(this,"incompatibleTokens","*")}parse(t){return kt(t)}set(t,e,r){return[S(t,r*1e3),{timestampIsSet:!0}]}},Ie=class extends l{constructor(){super(...arguments);o(this,"priority",20);o(this,"incompatibleTokens","*")}parse(t){return kt(t)}set(t,e,r){return[S(t,r),{timestampIsSet:!0}]}};const Be={G:new se,y:new ue,Y:new ce,R:new le,u:new de,Q:new he,q:new we,M:new me,L:new fe,w:new pe,I:new be,d:new De,D:new Me,E:new Se,e:new ke,c:new ve,i:new Ye,a:new qe,b:new Oe,B:new Pe,h:new Le,H:new Ce,K:new Ne,k:new Ee,m:new Qe,s:new Ge,S:new Fe,X:new Ze,x:new $e,t:new Ue,T:new Ie};var Xe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ze=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Re=/^'([^]*?)'?$/,We=/''/g,Ae=/\S/,Ke=/[a-zA-Z]/;function je(n,t,e,r){var P,L,M,T,F,nt,at,it;let a=()=>S((r==null?void 0:r.in)||e,NaN),i=te(),s=(r==null?void 0:r.locale)??i.locale??lt,c=(r==null?void 0:r.firstWeekContainsDate)??((L=(P=r==null?void 0:r.locale)==null?void 0:P.options)==null?void 0:L.firstWeekContainsDate)??i.firstWeekContainsDate??((T=(M=i.locale)==null?void 0:M.options)==null?void 0:T.firstWeekContainsDate)??1,h=(r==null?void 0:r.weekStartsOn)??((nt=(F=r==null?void 0:r.locale)==null?void 0:F.options)==null?void 0:nt.weekStartsOn)??i.weekStartsOn??((it=(at=i.locale)==null?void 0:at.options)==null?void 0:it.weekStartsOn)??0;if(!t)return n?a():x(e,r==null?void 0:r.in);let y={firstWeekContainsDate:c,weekStartsOn:h,locale:s},b=[new oe(r==null?void 0:r.in,e)],k=t.match(ze).map(u=>{let m=u[0];if(m in V){let H=V[m];return H(u,s.formatLong)}return u}).join("").match(Xe),D=[];for(let u of k){!(r!=null&&r.useAdditionalWeekYearTokens)&&Mt(u)&&J(u,t,n),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Dt(u)&&J(u,t,n);let m=u[0],H=Be[m];if(H){let{incompatibleTokens:ot}=H;if(Array.isArray(ot)){let st=D.find(ut=>ot.includes(ut.token)||ut.token===m);if(st)throw RangeError(`The format string mustn't contain \`${st.fullToken}\` and \`${u}\` at the same time`)}else if(H.incompatibleTokens==="*"&&D.length>0)throw RangeError(`The format string mustn't contain \`${u}\` and any other token at the same time`);D.push({token:m,fullToken:u});let K=H.run(n,u,s.match,y);if(!K)return a();b.push(K.setter),n=K.rest}else{if(m.match(Ke))throw RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");if(u==="''"?u="'":m==="'"&&(u=Ve(u)),n.indexOf(u)===0)n=n.slice(u.length);else return a()}}if(n.length>0&&Ae.test(n))return a();let O=b.map(u=>u.priority).sort((u,m)=>m-u).filter((u,m,H)=>H.indexOf(u)===m).map(u=>b.filter(m=>m.priority===u).sort((m,H)=>H.subPriority-m.subPriority)).map(u=>u[0]),v=x(e,r==null?void 0:r.in);if(isNaN(+v))return a();let C={};for(let u of O){if(!u.validate(v,y))return a();let m=u.set(v,C,y);Array.isArray(m)?(v=m[0],Object.assign(C,m[1])):v=m}return v}function Ve(n){return n.match(Re)[1].replace(We,"'")}function Je(n,t,e){return dt(je(n,t,new Date,e))}function _e(n,t,e="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:n,timeZoneName:e}).format(t).split(/\s/g).slice(2).join(" ")}var et={},B={};function G(n,t){try{let e=(et[n]||(et[n]=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return e in B?B[e]:qt(e,e.split(":"))}catch{if(n in B)return B[n];let e=n==null?void 0:n.match(tr);return e?qt(n,e.slice(1)):NaN}}var tr=/([+-]\d\d):?(\d\d)?/;function qt(n,t){let e=+(t[0]||0),r=+(t[1]||0),a=(t[2]||0)/60;return B[n]=e*60+r>0?e*60+r+a:e*60-r-a}var X=class z extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(G(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Pt(this,NaN),rt(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new z(...e,t):new z(Date.now(),t)}withTimeZone(t){return new z(+this,t)}getTimezoneOffset(){let t=-G(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),rt(this),+this}[Symbol.for("constructDateFrom")](t){return new z(+new Date(t),this.timeZone)}},Ot=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!Ot.test(n))return;let t=n.replace(Ot,"$1UTC");X.prototype[t]&&(n.startsWith("get")?X.prototype[n]=function(){return this.internal[t]()}:(X.prototype[n]=function(){return Date.prototype[t].apply(this.internal,arguments),er(this),+this},X.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),rt(this),+this}))});function rt(n){n.internal.setTime(+n),n.internal.setUTCSeconds(n.internal.getUTCSeconds()-Math.round(-G(n.timeZone,n)*60))}function er(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),Pt(n)}function Pt(n){let t=G(n.timeZone,n),e=t>0?Math.floor(t):Math.ceil(t),r=new Date(+n);r.setUTCHours(r.getUTCHours()-1);let a=-new Date(+n).getTimezoneOffset(),i=a- -new Date(+r).getTimezoneOffset(),s=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();i&&s&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+i);let c=a-e;c&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+c);let h=new Date(+n);h.setUTCSeconds(0);let y=a>0?h.getSeconds():(h.getSeconds()-60)%60,b=Math.round(-(G(n.timeZone,n)*60))%60;(b||y)&&(n.internal.setUTCSeconds(n.internal.getUTCSeconds()+b),Date.prototype.setUTCSeconds.call(n,Date.prototype.getUTCSeconds.call(n)+b+y));let k=G(n.timeZone,n),D=k>0?Math.floor(k):Math.ceil(k),O=-new Date(+n).getTimezoneOffset()-D,v=D!==e,C=O-c;if(v&&C){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+C);let P=G(n.timeZone,n),L=D-(P>0?Math.floor(P):Math.ceil(P));L&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+L),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+L))}}var rr=class R extends X{static tz(t,...e){return e.length?new R(...e,t):new R(Date.now(),t)}toISOString(){let[t,e,r]=this.tzComponents(),a=`${t}${e}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[t,e,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${e} ${a}`}toTimeString(){let t=this.internal.toUTCString().split(" ")[4],[e,r,a]=this.tzComponents();return`${t} GMT${e}${r}${a} (${_e(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}tzComponents(){let t=this.getTimezoneOffset();return[t>0?"-":"+",String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),String(Math.abs(t)%60).padStart(2,"0")]}withTimeZone(t){return new R(+this,t)}[Symbol.for("constructDateFrom")](t){return new R(+new Date(t),this.timeZone)}};function nr(n,t,e){if(n==null)return"";try{return t==="date"?new Date(n).toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}):new Date(n).toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}catch(r){return W.warn("Failed to parse date",r),n.toString()}}function ar(n,t,e){let r=n.getUTCMilliseconds()!==0;try{if(t){let a=new rr(n,t),i=ir(t,e);return r?`${I(a,"yyyy-MM-dd HH:mm:ss.SSS")} ${i}`:`${I(a,"yyyy-MM-dd HH:mm:ss")} ${i}`}return r?I(n,"yyyy-MM-dd HH:mm:ss.SSS"):I(n,"yyyy-MM-dd HH:mm:ss")}catch(a){return W.warn("Failed to parse date",a),n.toISOString()}}function ir(n,t){var e;try{return((e=new Intl.DateTimeFormat(t,{timeZone:n,timeZoneName:"short"}).formatToParts(new Date).find(r=>r.type==="timeZoneName"))==null?void 0:e.value)??""}catch(r){return W.warn("Failed to get abbrev",r),n}}function or(n,t){if(n==null||n===0)return"";try{let e=new Date(n),r=new Date,a=new Date;return a.setDate(a.getDate()-1),e.toDateString()===r.toDateString()?`Today at ${e.toLocaleTimeString(t,{hour:"numeric",minute:"numeric"})}`:e.toDateString()===a.toDateString()?`Yesterday at ${e.toLocaleTimeString(t,{hour:"numeric",minute:"numeric"})}`:`${e.toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"})} at ${e.toLocaleTimeString(t,{hour:"numeric",minute:"numeric"})}`}catch(e){W.warn("Failed to parse date",e)}return n.toString()}const sr=["yyyy","yyyy-MM","yyyy-MM-dd"];function ur(n){for(let t of sr)if(Je(n,t))return t;return null}export{I as a,or as i,ur as n,nr as r,ar as t};
var P=new Date,B=new Date;function T(t,e,n,r){function f(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return f.floor=a=>(t(a=new Date(+a)),a),f.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),f.round=a=>{let c=f(a),C=f.ceil(a);return a-c<C-a?c:C},f.offset=(a,c)=>(e(a=new Date(+a),c==null?1:Math.floor(c)),a),f.range=(a,c,C)=>{let d=[];if(a=f.ceil(a),C=C==null?1:Math.floor(C),!(a<c)||!(C>0))return d;let X;do d.push(X=new Date(+a)),e(a,C),t(a);while(X<a&&a<c);return d},f.filter=a=>T(c=>{if(c>=c)for(;t(c),!a(c);)c.setTime(c-1)},(c,C)=>{if(c>=c)if(C<0)for(;++C<=0;)for(;e(c,-1),!a(c););else for(;--C>=0;)for(;e(c,1),!a(c););}),n&&(f.count=(a,c)=>(P.setTime(+a),B.setTime(+c),t(P),t(B),Math.floor(n(P,B))),f.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?f.filter(r?c=>r(c)%a===0:c=>f.count(0,c)%a===0):f)),f}const z=T(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);z.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?T(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):z),z.range;const L=1e3,y=L*60,Z=y*60,m=Z*24,E=m*7,ie=m*30,ce=m*365,tt=T(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*L)},(t,e)=>(e-t)/L,t=>t.getUTCSeconds());tt.range;const et=T(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*L)},(t,e)=>{t.setTime(+t+e*y)},(t,e)=>(e-t)/y,t=>t.getMinutes());et.range;const nt=T(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*y)},(t,e)=>(e-t)/y,t=>t.getUTCMinutes());nt.range;const rt=T(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*L-t.getMinutes()*y)},(t,e)=>{t.setTime(+t+e*Z)},(t,e)=>(e-t)/Z,t=>t.getHours());rt.range;const ut=T(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Z)},(t,e)=>(e-t)/Z,t=>t.getUTCHours());ut.range;const J=T(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*y)/m,t=>t.getDate()-1);J.range;const I=T(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/m,t=>t.getUTCDate()-1);I.range;const ot=T(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/m,t=>Math.floor(t/m));ot.range;function S(t){return T(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*y)/E)}const G=S(0),W=S(1),at=S(2),it=S(3),p=S(4),ct=S(5),st=S(6);G.range,W.range,at.range,it.range,p.range,ct.range,st.range;function A(t){return T(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/E)}const _=A(0),N=A(1),se=A(2),le=A(3),b=A(4),ge=A(5),fe=A(6);_.range,N.range,se.range,le.range,b.range,ge.range,fe.range;const lt=T(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());lt.range;const gt=T(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());gt.range;const F=T(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());F.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:T(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}),F.range;const w=T(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());w.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:T(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}),w.range;function $(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function k(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function j(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function ft(t){var e=t.dateTime,n=t.date,r=t.time,f=t.periods,a=t.days,c=t.shortDays,C=t.months,d=t.shortMonths,X=O(f),Lt=Q(f),Zt=O(a),bt=Q(a),Vt=O(c),Wt=Q(c),jt=O(C),Ot=Q(C),Qt=O(d),Xt=Q(d),Y={a:_t,A:$t,b:kt,B:Rt,c:null,d:Dt,e:Dt,f:We,g:Pe,G:Ee,H:Ze,I:be,j:Ve,L:yt,m:je,M:Oe,p:Kt,q:te,Q:Yt,s:xt,S:Qe,u:Xe,U:qe,V:ze,w:Je,W:Ie,x:null,X:null,y:Ne,Y:Be,Z:Ge,"%":wt},x={a:ee,A:ne,b:re,B:ue,c:null,d:vt,e:vt,f:Re,g:sn,G:gn,H:_e,I:$e,j:ke,L:mt,m:Ke,M:tn,p:oe,q:ae,Q:Yt,s:xt,S:en,u:nn,U:rn,V:un,w:on,W:an,x:null,X:null,y:cn,Y:ln,Z:fn,"%":wt},qt={a:Jt,A:It,b:Nt,B:Pt,c:Bt,d:Ut,e:Ut,f:Se,g:Ct,G:ht,H:Mt,I:Mt,j:we,L:He,m:Fe,M:Ye,p:zt,q:me,Q:Ae,s:Le,S:xe,u:Me,U:De,V:ye,w:Ue,W:de,x:Et,X:Gt,y:Ct,Y:ht,Z:ve,"%":pe};Y.x=v(n,Y),Y.X=v(r,Y),Y.c=v(e,Y),x.x=v(n,x),x.X=v(r,x),x.c=v(e,x);function v(o,i){return function(s){var u=[],U=-1,g=0,M=o.length,D,H,K;for(s instanceof Date||(s=new Date(+s));++U<M;)o.charCodeAt(U)===37&&(u.push(o.slice(g,U)),(H=Tt[D=o.charAt(++U)])==null?H=D==="e"?" ":"0":D=o.charAt(++U),(K=i[D])&&(D=K(s,H)),u.push(D),g=U+1);return u.push(o.slice(g,U)),u.join("")}}function R(o,i){return function(s){var u=j(1900,void 0,1),U=q(u,o,s+="",0),g,M;if(U!=s.length)return null;if("Q"in u)return new Date(u.Q);if("s"in u)return new Date(u.s*1e3+("L"in u?u.L:0));if(i&&!("Z"in u)&&(u.Z=0),"p"in u&&(u.H=u.H%12+u.p*12),u.m===void 0&&(u.m="q"in u?u.q:0),"V"in u){if(u.V<1||u.V>53)return null;"w"in u||(u.w=1),"Z"in u?(g=k(j(u.y,0,1)),M=g.getUTCDay(),g=M>4||M===0?N.ceil(g):N(g),g=I.offset(g,(u.V-1)*7),u.y=g.getUTCFullYear(),u.m=g.getUTCMonth(),u.d=g.getUTCDate()+(u.w+6)%7):(g=$(j(u.y,0,1)),M=g.getDay(),g=M>4||M===0?W.ceil(g):W(g),g=J.offset(g,(u.V-1)*7),u.y=g.getFullYear(),u.m=g.getMonth(),u.d=g.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),M="Z"in u?k(j(u.y,0,1)).getUTCDay():$(j(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(M+5)%7:u.w+u.U*7-(M+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,k(u)):$(u)}}function q(o,i,s,u){for(var U=0,g=i.length,M=s.length,D,H;U<g;){if(u>=M)return-1;if(D=i.charCodeAt(U++),D===37){if(D=i.charAt(U++),H=qt[D in Tt?i.charAt(U++):D],!H||(u=H(o,s,u))<0)return-1}else if(D!=s.charCodeAt(u++))return-1}return u}function zt(o,i,s){var u=X.exec(i.slice(s));return u?(o.p=Lt.get(u[0].toLowerCase()),s+u[0].length):-1}function Jt(o,i,s){var u=Vt.exec(i.slice(s));return u?(o.w=Wt.get(u[0].toLowerCase()),s+u[0].length):-1}function It(o,i,s){var u=Zt.exec(i.slice(s));return u?(o.w=bt.get(u[0].toLowerCase()),s+u[0].length):-1}function Nt(o,i,s){var u=Qt.exec(i.slice(s));return u?(o.m=Xt.get(u[0].toLowerCase()),s+u[0].length):-1}function Pt(o,i,s){var u=jt.exec(i.slice(s));return u?(o.m=Ot.get(u[0].toLowerCase()),s+u[0].length):-1}function Bt(o,i,s){return q(o,e,i,s)}function Et(o,i,s){return q(o,n,i,s)}function Gt(o,i,s){return q(o,r,i,s)}function _t(o){return c[o.getDay()]}function $t(o){return a[o.getDay()]}function kt(o){return d[o.getMonth()]}function Rt(o){return C[o.getMonth()]}function Kt(o){return f[+(o.getHours()>=12)]}function te(o){return 1+~~(o.getMonth()/3)}function ee(o){return c[o.getUTCDay()]}function ne(o){return a[o.getUTCDay()]}function re(o){return d[o.getUTCMonth()]}function ue(o){return C[o.getUTCMonth()]}function oe(o){return f[+(o.getUTCHours()>=12)]}function ae(o){return 1+~~(o.getUTCMonth()/3)}return{format:function(o){var i=v(o+="",Y);return i.toString=function(){return o},i},parse:function(o){var i=R(o+="",!1);return i.toString=function(){return o},i},utcFormat:function(o){var i=v(o+="",x);return i.toString=function(){return o},i},utcParse:function(o){var i=R(o+="",!0);return i.toString=function(){return o},i}}}var Tt={"-":"",_:" ",0:"0"},h=/^\s*\d+/,Te=/^%/,he=/[\\^$*+?|[\]().{}]/g;function l(t,e,n){var r=t<0?"-":"",f=(r?-t:t)+"",a=f.length;return r+(a<n?Array(n-a+1).join(e)+f:f)}function Ce(t){return t.replace(he,"\\$&")}function O(t){return RegExp("^(?:"+t.map(Ce).join("|")+")","i")}function Q(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ue(t,e,n){var r=h.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Me(t,e,n){var r=h.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function De(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function ye(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function de(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ht(t,e,n){var r=h.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ct(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ve(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function me(t,e,n){var r=h.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Fe(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ut(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function we(t,e,n){var r=h.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Mt(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ye(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function xe(t,e,n){var r=h.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function He(t,e,n){var r=h.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Se(t,e,n){var r=h.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pe(t,e,n){var r=Te.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ae(t,e,n){var r=h.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Le(t,e,n){var r=h.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Dt(t,e){return l(t.getDate(),e,2)}function Ze(t,e){return l(t.getHours(),e,2)}function be(t,e){return l(t.getHours()%12||12,e,2)}function Ve(t,e){return l(1+J.count(F(t),t),e,3)}function yt(t,e){return l(t.getMilliseconds(),e,3)}function We(t,e){return yt(t,e)+"000"}function je(t,e){return l(t.getMonth()+1,e,2)}function Oe(t,e){return l(t.getMinutes(),e,2)}function Qe(t,e){return l(t.getSeconds(),e,2)}function Xe(t){var e=t.getDay();return e===0?7:e}function qe(t,e){return l(G.count(F(t)-1,t),e,2)}function dt(t){var e=t.getDay();return e>=4||e===0?p(t):p.ceil(t)}function ze(t,e){return t=dt(t),l(p.count(F(t),t)+(F(t).getDay()===4),e,2)}function Je(t){return t.getDay()}function Ie(t,e){return l(W.count(F(t)-1,t),e,2)}function Ne(t,e){return l(t.getFullYear()%100,e,2)}function Pe(t,e){return t=dt(t),l(t.getFullYear()%100,e,2)}function Be(t,e){return l(t.getFullYear()%1e4,e,4)}function Ee(t,e){var n=t.getDay();return t=n>=4||n===0?p(t):p.ceil(t),l(t.getFullYear()%1e4,e,4)}function Ge(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+l(e/60|0,"0",2)+l(e%60,"0",2)}function vt(t,e){return l(t.getUTCDate(),e,2)}function _e(t,e){return l(t.getUTCHours(),e,2)}function $e(t,e){return l(t.getUTCHours()%12||12,e,2)}function ke(t,e){return l(1+I.count(w(t),t),e,3)}function mt(t,e){return l(t.getUTCMilliseconds(),e,3)}function Re(t,e){return mt(t,e)+"000"}function Ke(t,e){return l(t.getUTCMonth()+1,e,2)}function tn(t,e){return l(t.getUTCMinutes(),e,2)}function en(t,e){return l(t.getUTCSeconds(),e,2)}function nn(t){var e=t.getUTCDay();return e===0?7:e}function rn(t,e){return l(_.count(w(t)-1,t),e,2)}function Ft(t){var e=t.getUTCDay();return e>=4||e===0?b(t):b.ceil(t)}function un(t,e){return t=Ft(t),l(b.count(w(t),t)+(w(t).getUTCDay()===4),e,2)}function on(t){return t.getUTCDay()}function an(t,e){return l(N.count(w(t)-1,t),e,2)}function cn(t,e){return l(t.getUTCFullYear()%100,e,2)}function sn(t,e){return t=Ft(t),l(t.getUTCFullYear()%100,e,2)}function ln(t,e){return l(t.getUTCFullYear()%1e4,e,4)}function gn(t,e){var n=t.getUTCDay();return t=n>=4||n===0?b(t):b.ceil(t),l(t.getUTCFullYear()%1e4,e,4)}function fn(){return"+0000"}function wt(){return"%"}function Yt(t){return+t}function xt(t){return Math.floor(t/1e3)}var V,Ht,St,pt,At;Tn({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 Tn(t){return V=ft(t),Ht=V.format,St=V.parse,pt=V.utcFormat,At=V.utcParse,V}export{L as A,et as C,Z as D,m as E,ce as M,z as N,y as O,ut as S,tt as T,_,ft as a,I as b,lt as c,W as d,st as f,it as g,at as h,At as i,E as j,ie as k,gt as l,p as m,St as n,F as o,G as p,pt as r,w as s,Ht as t,ct as u,J as v,nt as w,rt as x,ot as y};
function Q(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function A(t,i){if((o=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"))<0)return null;var o,n=t.slice(0,o);return[n.length>1?n[0]+n.slice(2):n,+t.slice(o+1)]}function T(t){return t=A(Math.abs(t)),t?t[1]:NaN}function R(t,i){return function(o,n){for(var a=o.length,c=[],m=0,f=t[0],y=0;a>0&&f>0&&(y+f+1>n&&(f=Math.max(1,n-y)),c.push(o.substring(a-=f,a+f)),!((y+=f+1)>n));)f=t[m=(m+1)%t.length];return c.reverse().join(i)}}function V(t){return function(i){return i.replace(/[0-9]/g,function(o){return t[+o]})}}var W=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function N(t){if(!(i=W.exec(t)))throw Error("invalid format: "+t);var i;return new $({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}N.prototype=$.prototype;function $(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.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 tt(t){t:for(var i=t.length,o=1,n=-1,a;o<i;++o)switch(t[o]){case".":n=a=o;break;case"0":n===0&&(n=o),a=o;break;default:if(!+t[o])break t;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(a+1):t}var X;function it(t,i){var o=A(t,i);if(!o)return t+"";var n=o[0],a=o[1],c=a-(X=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,m=n.length;return c===m?n:c>m?n+Array(c-m+1).join("0"):c>0?n.slice(0,c)+"."+n.slice(c):"0."+Array(1-c).join("0")+A(t,Math.max(0,i+c-1))[0]}function _(t,i){var o=A(t,i);if(!o)return t+"";var n=o[0],a=o[1];return a<0?"0."+Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+Array(a-n.length+2).join("0")}var D={"%":(t,i)=>(t*100).toFixed(i),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Q,e:(t,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>_(t*100,i),r:_,s:it,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function G(t){return t}var U=Array.prototype.map,Y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Z(t){var i=t.grouping===void 0||t.thousands===void 0?G:R(U.call(t.grouping,Number),t.thousands+""),o=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",c=t.numerals===void 0?G:V(U.call(t.numerals,String)),m=t.percent===void 0?"%":t.percent+"",f=t.minus===void 0?"\u2212":t.minus+"",y=t.nan===void 0?"NaN":t.nan+"";function C(s){s=N(s);var b=s.fill,M=s.align,u=s.sign,x=s.symbol,p=s.zero,w=s.width,E=s.comma,g=s.precision,P=s.trim,l=s.type;l==="n"?(E=!0,l="g"):D[l]||(g===void 0&&(g=12),P=!0,l="g"),(p||b==="0"&&M==="=")&&(p=!0,b="0",M="=");var I=x==="$"?o:x==="#"&&/[boxX]/.test(l)?"0"+l.toLowerCase():"",J=x==="$"?n:/[%p]/.test(l)?m:"",O=D[l],K=/[defgprs%]/.test(l);g=g===void 0?6:/[gprs]/.test(l)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function F(r){var v=I,h=J,e,L,k;if(l==="c")h=O(r)+h,r="";else{r=+r;var S=r<0||1/r<0;if(r=isNaN(r)?y:O(Math.abs(r),g),P&&(r=tt(r)),S&&+r==0&&u!=="+"&&(S=!1),v=(S?u==="("?u:f:u==="-"||u==="("?"":u)+v,h=(l==="s"?Y[8+X/3]:"")+h+(S&&u==="("?")":""),K){for(e=-1,L=r.length;++e<L;)if(k=r.charCodeAt(e),48>k||k>57){h=(k===46?a+r.slice(e+1):r.slice(e))+h,r=r.slice(0,e);break}}}E&&!p&&(r=i(r,1/0));var z=v.length+r.length+h.length,d=z<w?Array(w-z+1).join(b):"";switch(E&&p&&(r=i(d+r,d.length?w-h.length:1/0),d=""),M){case"<":r=v+r+h+d;break;case"=":r=v+d+r+h;break;case"^":r=d.slice(0,z=d.length>>1)+v+r+h+d.slice(z);break;default:r=d+v+r+h;break}return c(r)}return F.toString=function(){return s+""},F}function H(s,b){var M=C((s=N(s),s.type="f",s)),u=Math.max(-8,Math.min(8,Math.floor(T(b)/3)))*3,x=10**-u,p=Y[8+u/3];return function(w){return M(x*w)+p}}return{format:C,formatPrefix:H}}var j,q,B;rt({thousands:",",grouping:[3],currency:["$",""]});function rt(t){return j=Z(t),q=j.format,B=j.formatPrefix,j}export{T as a,N as i,B as n,Z as r,q as t};
var i=Object.defineProperty;var o=(e,s,t)=>s in e?i(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t;var r=(e,s,t)=>o(e,typeof s!="symbol"?s+"":s,t);var a=class{constructor(){r(this,"status","pending");this.promise=new Promise((e,s)=>{this.reject=t=>{this.status="rejected",s(t)},this.resolve=t=>{this.status="resolved",e(t)}})}};export{a as t};
var a=Object.defineProperty;var h=(s,e,t)=>e in s?a(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>h(s,typeof e!="symbol"?e+"":e,t);import{t as l}from"./createLucideIcon-CnW3RofX.js";import{t as u}from"./Deferred-CrO5-0RA.js";import{t as c}from"./uuid-DercMavo.js";var n=l("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);const q={create(){return c()}};var p=class{constructor(s,e,t={}){i(this,"requests",new Map);this.operation=s,this.makeRequest=e,this.opts=t}async request(s){if(this.opts.resolveExistingRequests){let r=this.opts.resolveExistingRequests();for(let o of this.requests.values())o.resolve(r);this.requests.clear()}let e=q.create(),t=new u;return this.requests.set(e,t),await this.makeRequest(e,s).catch(r=>{t.reject(r),this.requests.delete(e)}),t.promise}resolve(s,e){let t=this.requests.get(s);t!==void 0&&(t.resolve(e),this.requests.delete(s))}reject(s,e){let t=this.requests.get(s);t!==void 0&&(t.reject(e),this.requests.delete(s))}};export{n,p as t};

Sorry, the diff of this file is too big to display

var $;import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as A}from"./ordinal-DTOdb5Da.js";import{t as T}from"./defaultLocale-D_rSvXvJ.js";import"./purify.es-DNVQZNFu.js";import{u as D}from"./src-Cf4NnJCp.js";import{i as _}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{p as Y,t as Z}from"./treemap-DqSsE4KM.js";import{n as h,r as V}from"./src-BKLwm2RN.js";import{B as ee,C as te,U as ae,_ as le,a as re,c as se,d as ie,v as oe,y as G,z as ne}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as ce}from"./chunk-EXTU4WIE-CyW9PraH.js";import{i as C,n as de}from"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-O7ZBX7Z2-CsMGWxKA.js";import"./chunk-S6J4BHB3-B5AsdTT7.js";import"./chunk-LBM3YZW2-DNY-0NiJ.js";import"./chunk-76Q3JFCE-CC_RB1qp.js";import"./chunk-T53DSG4Q-td6bRJ2x.js";import"./chunk-LHMN2FUI-xvIevmTh.js";import"./chunk-FWNWRKHM-D3c3qJTG.js";import{t as pe}from"./chunk-4BX2VUAB-BpI4ekYZ.js";import{t as he}from"./mermaid-parser.core-BQwQ8Y_u.js";import{t as me}from"./chunk-QN33PNHL-C_hHv997.js";var O=($=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ee,this.getAccTitle=oe,this.setDiagramTitle=ae,this.getDiagramTitle=te,this.getAccDescription=le,this.setAccDescription=ne}getNodes(){return this.nodes}getConfig(){let a=ie,i=G();return _({...a.treemap,...i.treemap??{}})}addNode(a,i){this.nodes.push(a),this.levels.set(a,i),i===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,i){let r=this.classes.get(a)??{id:a,styles:[],textStyles:[]},n=i.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(s=>{de(s)&&(r!=null&&r.textStyles?r.textStyles.push(s):r.textStyles=[s]),r!=null&&r.styles?r.styles.push(s):r.styles=[s]}),this.classes.set(a,r)}getClasses(){return this.classes}getStylesForClass(a){var i;return((i=this.classes.get(a))==null?void 0:i.styles)??[]}clear(){re(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},h($,"TreeMapDB"),$);function U(c){if(!c.length)return[];let a=[],i=[];return c.forEach(r=>{let n={name:r.name,children:r.type==="Leaf"?void 0:[]};for(n.classSelector=r==null?void 0:r.classSelector,r!=null&&r.cssCompiledStyles&&(n.cssCompiledStyles=[r.cssCompiledStyles]),r.type==="Leaf"&&r.value!==void 0&&(n.value=r.value);i.length>0&&i[i.length-1].level>=r.level;)i.pop();if(i.length===0)a.push(n);else{let s=i[i.length-1].node;s.children?s.children.push(n):s.children=[n]}r.type!=="Leaf"&&i.push({node:n,level:r.level})}),a}h(U,"buildHierarchy");var ye=h((c,a)=>{pe(c,a);let i=[];for(let s of c.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(let s of c.TreemapRows??[]){let d=s.item;if(!d)continue;let y=s.indent?parseInt(s.indent):0,z=fe(d),l=d.classSelector?a.getStylesForClass(d.classSelector):[],w=l.length>0?l.join(";"):void 0,g={level:y,name:z,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:w};i.push(g)}let r=U(i),n=h((s,d)=>{for(let y of s)a.addNode(y,d),y.children&&y.children.length>0&&n(y.children,d+1)},"addNodesRecursively");n(r,0)},"populate"),fe=h(c=>c.name?String(c.name):"","getItemName"),q={parser:{yy:void 0},parse:h(async c=>{var a;try{let i=await he("treemap",c);V.debug("Treemap AST:",i);let r=(a=q.parser)==null?void 0:a.yy;if(!(r instanceof O))throw 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.");ye(i,r)}catch(i){throw V.error("Error parsing treemap:",i),i}},"parse")},ue=10,v=10,M=25,Se={draw:h((c,a,i,r)=>{let n=r.db,s=n.getConfig(),d=s.padding??ue,y=n.getDiagramTitle(),z=n.getRoot(),{themeVariables:l}=G();if(!z)return;let w=y?30:0,g=ce(a),E=s.nodeWidth?s.nodeWidth*v:960,R=s.nodeHeight?s.nodeHeight*v:500,W=E,B=R+w;g.attr("viewBox",`0 0 ${W} ${B}`),se(g,B,W,s.useMaxWidth);let x;try{let e=s.valueFormat||",";if(e==="$0,0")x=h(t=>"$"+T(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){let t=/\.\d+/.exec(e),p=t?t[0]:"";x=h(f=>"$"+T(","+p)(f),"valueFormat")}else if(e.startsWith("$")){let t=e.substring(1);x=h(p=>"$"+T(t||"")(p),"valueFormat")}else x=T(e)}catch(e){V.error("Error creating format function:",e),x=T(",")}let L=A().range(["transparent",l.cScale0,l.cScale1,l.cScale2,l.cScale3,l.cScale4,l.cScale5,l.cScale6,l.cScale7,l.cScale8,l.cScale9,l.cScale10,l.cScale11]),J=A().range(["transparent",l.cScalePeer0,l.cScalePeer1,l.cScalePeer2,l.cScalePeer3,l.cScalePeer4,l.cScalePeer5,l.cScalePeer6,l.cScalePeer7,l.cScalePeer8,l.cScalePeer9,l.cScalePeer10,l.cScalePeer11]),F=A().range([l.cScaleLabel0,l.cScaleLabel1,l.cScaleLabel2,l.cScaleLabel3,l.cScaleLabel4,l.cScaleLabel5,l.cScaleLabel6,l.cScaleLabel7,l.cScaleLabel8,l.cScaleLabel9,l.cScaleLabel10,l.cScaleLabel11]);y&&g.append("text").attr("x",W/2).attr("y",w/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(y);let I=g.append("g").attr("transform",`translate(0, ${w})`).attr("class","treemapContainer"),K=Y(z).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),j=Z().size([E,R]).paddingTop(e=>e.children&&e.children.length>0?M+v:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?v:0).paddingRight(e=>e.children&&e.children.length>0?v:0).paddingBottom(e=>e.children&&e.children.length>0?v:0).round(!0)(K),Q=j.descendants().filter(e=>e.children&&e.children.length>0),k=I.selectAll(".treemapSection").data(Q).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);k.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),k.append("clipPath").attr("id",(e,t)=>`clip-section-${a}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),k.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>L(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>J(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";let t=C({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),k.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>e.depth===0?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+F(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(e){if(e.depth===0)return;let t=D(this),p=e.data.name;t.text(p);let f=e.x1-e.x0,S;S=s.showValues!==!1&&e.value?f-10-30-10-6:f-6-6;let m=Math.max(15,S),u=t.node();if(u.getComputedTextLength()>m){let o=p;for(;o.length>0;){if(o=p.substring(0,o.length-1),o.length===0){t.text("..."),u.getComputedTextLength()>m&&t.text("");break}if(t.text(o+"..."),u.getComputedTextLength()<=m)break}}}),s.showValues!==!1&&k.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?x(e.value):"").attr("font-style","italic").attr("style",e=>e.depth===0?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+F(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"));let X=j.leaves(),P=I.selectAll(".treemapLeafGroup").data(X).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);P.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("style",e=>C({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("stroke-width",3),P.append("clipPath").attr("id",(e,t)=>`clip-${a}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),P.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+F(e.data.name)+";"+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.data.name).each(function(e){let t=D(this),p=e.x1-e.x0,f=e.y1-e.y0,S=t.node(),m=p-8,u=f-8;if(m<10||u<10){t.style("display","none");return}let o=parseInt(t.style("font-size"),10),N=.6;for(;S.getComputedTextLength()>m&&o>8;)o--,t.style("font-size",`${o}px`);let b=Math.max(6,Math.min(28,Math.round(o*N))),H=o+2+b;for(;H>u&&o>8&&(o--,b=Math.max(6,Math.min(28,Math.round(o*N))),!(b<6&&o===8));)t.style("font-size",`${o}px`),H=o+2+b;t.style("font-size",`${o}px`),(S.getComputedTextLength()>m||o<8||u<o)&&t.style("display","none")}),s.showValues!==!1&&P.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+F(e.data.name)+";"+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.value?x(e.value):"").each(function(e){let t=D(this),p=this.parentNode;if(!p){t.style("display","none");return}let f=D(p).select(".treemapLabel");if(f.empty()||f.style("display")==="none"){t.style("display","none");return}let S=parseFloat(f.style("font-size")),m=Math.max(6,Math.min(28,Math.round(S*.6)));t.style("font-size",`${m}px`);let u=(e.y1-e.y0)/2+S/2+2;t.attr("y",u);let o=e.x1-e.x0,N=e.y1-e.y0-4,b=o-8;t.node().getComputedTextLength()>b||u+m>N||m<6?t.style("display","none"):t.style("display",null)}),me(g,s.diagramPadding??8,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),getClasses:h(function(c,a){return a.db.getClasses()},"getClasses")},ge={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},xe={parser:q,get db(){return new O},renderer:Se,styles:h(({treemap:c}={})=>{let a=_(ge,c);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")};export{xe as diagram};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import{i as y}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as o,r as k}from"./src-BKLwm2RN.js";import{B as O,C as S,T as I,U as z,_ as E,a as F,d as P,v as R,y as w,z as D}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as B}from"./chunk-EXTU4WIE-CyW9PraH.js";import"./dist-C04_12Dz.js";import"./chunk-O7ZBX7Z2-CsMGWxKA.js";import"./chunk-S6J4BHB3-B5AsdTT7.js";import"./chunk-LBM3YZW2-DNY-0NiJ.js";import"./chunk-76Q3JFCE-CC_RB1qp.js";import"./chunk-T53DSG4Q-td6bRJ2x.js";import"./chunk-LHMN2FUI-xvIevmTh.js";import"./chunk-FWNWRKHM-D3c3qJTG.js";import{t as G}from"./chunk-4BX2VUAB-BpI4ekYZ.js";import{t as V}from"./mermaid-parser.core-BQwQ8Y_u.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},b={axes:[],curves:[],options:h},g=structuredClone(b),_=P.radar,j=o(()=>y({..._,...w().radar}),"getConfig"),C=o(()=>g.axes,"getAxes"),W=o(()=>g.curves,"getCurves"),H=o(()=>g.options,"getOptions"),N=o(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),U=o(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=o(a=>{if(a[0].axis==null)return a.map(e=>e.value);let t=C();if(t.length===0)throw Error("Axes must be populated before curves for reference entries");return t.map(e=>{let r=a.find(i=>{var n;return((n=i.axis)==null?void 0:n.$refText)===e.name});if(r===void 0)throw Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),x={getAxes:C,getCurves:W,getOptions:H,setAxes:N,setCurves:U,setOptions:o(a=>{var e,r,i,n,l;let t=a.reduce((s,c)=>(s[c.name]=c,s),{});g.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??h.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??h.ticks,max:((i=t.max)==null?void 0:i.value)??h.max,min:((n=t.min)==null?void 0:n.value)??h.min,graticule:((l=t.graticule)==null?void 0:l.value)??h.graticule}},"setOptions"),getConfig:j,clear:o(()=>{F(),g=structuredClone(b)},"clear"),setAccTitle:O,getAccTitle:R,setDiagramTitle:z,getDiagramTitle:S,getAccDescription:E,setAccDescription:D},q=o(a=>{G(a,x);let{axes:t,curves:e,options:r}=a;x.setAxes(t),x.setCurves(e),x.setOptions(r)},"populate"),J={parse:o(async a=>{let t=await V("radar",a);k.debug(t),q(t)},"parse")},K=o((a,t,e,r)=>{let i=r.db,n=i.getAxes(),l=i.getCurves(),s=i.getOptions(),c=i.getConfig(),p=i.getDiagramTitle(),d=Q(B(t),c),m=s.max??Math.max(...l.map($=>Math.max(...$.entries))),u=s.min,f=Math.min(c.width,c.height)/2;X(d,n,f,s.ticks,s.graticule),Y(d,n,f,c),M(d,n,l,u,m,s.graticule,c),A(d,l,s.showLegend,c),d.append("text").attr("class","radarTitle").text(p).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),Q=o((a,t)=>{let e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={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(${i.x}, ${i.y})`)},"drawFrame"),X=o((a,t,e,r,i)=>{if(i==="circle")for(let n=0;n<r;n++){let l=e*(n+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(i==="polygon"){let n=t.length;for(let l=0;l<r;l++){let s=e*(l+1)/r,c=t.map((p,d)=>{let m=2*d*Math.PI/n-Math.PI/2;return`${s*Math.cos(m)},${s*Math.sin(m)}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),Y=o((a,t,e,r)=>{let i=t.length;for(let n=0;n<i;n++){let l=t[n].label,s=2*n*Math.PI/i-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(s)).attr("y2",e*r.axisScaleFactor*Math.sin(s)).attr("class","radarAxisLine"),a.append("text").text(l).attr("x",e*r.axisLabelFactor*Math.cos(s)).attr("y",e*r.axisLabelFactor*Math.sin(s)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,i,n,l){let s=t.length,c=Math.min(l.width,l.height)/2;e.forEach((p,d)=>{if(p.entries.length!==s)return;let m=p.entries.map((u,f)=>{let $=2*Math.PI*f/s-Math.PI/2,v=L(u,r,i,c);return{x:v*Math.cos($),y:v*Math.sin($)}});n==="circle"?a.append("path").attr("d",T(m,l.curveTension)).attr("class",`radarCurve-${d}`):n==="polygon"&&a.append("polygon").attr("points",m.map(u=>`${u.x},${u.y}`).join(" ")).attr("class",`radarCurve-${d}`)})}o(M,"drawCurves");function L(a,t,e,r){return r*(Math.min(Math.max(a,t),e)-t)/(e-t)}o(L,"relativeRadius");function T(a,t){let e=a.length,r=`M${a[0].x},${a[0].y}`;for(let i=0;i<e;i++){let n=a[(i-1+e)%e],l=a[i],s=a[(i+1)%e],c=a[(i+2)%e],p={x:l.x+(s.x-n.x)*t,y:l.y+(s.y-n.y)*t},d={x:s.x-(c.x-l.x)*t,y:s.y-(c.y-l.y)*t};r+=` C${p.x},${p.y} ${d.x},${d.y} ${s.x},${s.y}`}return`${r} Z`}o(T,"closedRoundCurve");function A(a,t,e,r){if(!e)return;let i=(r.width/2+r.marginRight)*3/4,n=-(r.height/2+r.marginTop)*3/4;t.forEach((l,s)=>{let c=a.append("g").attr("transform",`translate(${i}, ${n+s*20})`);c.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${s}`),c.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(l.label)})}o(A,"drawLegend");var tt={draw:K},et=o((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){let i=a[`cScale${r}`];e+=`
.radarCurve-${r} {
color: ${i};
fill: ${i};
fill-opacity: ${t.curveOpacity};
stroke: ${i};
stroke-width: ${t.curveStrokeWidth};
}
.radarLegendBox-${r} {
fill: ${i};
fill-opacity: ${t.curveOpacity};
stroke: ${i};
}
`}return e},"genIndexStyles"),at=o(a=>{let t=y(I(),w().themeVariables);return{themeVariables:t,radarOptions:y(t.radar,a)}},"buildRadarStyleOptions"),rt={parser:J,db:x,renderer:tt,styles:o(({radar:a}={})=>{let{themeVariables:t,radarOptions:e}=at(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;
}
${et(t,e)}
`},"styles")};export{rt as diagram};
var g;import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import{i as u}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as f,r as y}from"./src-BKLwm2RN.js";import{B as C,C as v,U as P,_ as z,a as S,c as E,d as F,v as T,y as W,z as D}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as A}from"./chunk-EXTU4WIE-CyW9PraH.js";import"./dist-C04_12Dz.js";import"./chunk-O7ZBX7Z2-CsMGWxKA.js";import"./chunk-S6J4BHB3-B5AsdTT7.js";import"./chunk-LBM3YZW2-DNY-0NiJ.js";import"./chunk-76Q3JFCE-CC_RB1qp.js";import"./chunk-T53DSG4Q-td6bRJ2x.js";import"./chunk-LHMN2FUI-xvIevmTh.js";import"./chunk-FWNWRKHM-D3c3qJTG.js";import{t as R}from"./chunk-4BX2VUAB-BpI4ekYZ.js";import{t as Y}from"./mermaid-parser.core-BQwQ8Y_u.js";var _=F.packet,w=(g=class{constructor(){this.packet=[],this.setAccTitle=C,this.getAccTitle=T,this.setDiagramTitle=P,this.getDiagramTitle=v,this.getAccDescription=z,this.setAccDescription=D}getConfig(){let t=u({..._,...W().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){S(),this.packet=[]}},f(g,"PacketDB"),g),H=1e4,L=f((e,t)=>{R(e,t);let i=-1,a=[],l=1,{bitsPerRow:n}=t.getConfig();for(let{start:r,end:s,bits:c,label:d}of e.blocks){if(r!==void 0&&s!==void 0&&s<r)throw Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??(r=i+1),r!==i+1)throw Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${i+1}.`);if(c===0)throw Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??(s=r+(c??1)-1),c??(c=s-r+1),i=s,y.debug(`Packet block ${r} - ${i} with label ${d}`);a.length<=n+1&&t.getPacket().length<H;){let[p,o]=M({start:r,end:s,bits:c,label:d},l,n);if(a.push(p),p.end+1===l*n&&(t.pushWord(a),a=[],l++),!o)break;({start:r,end:s,bits:c,label:d}=o)}}t.pushWord(a)},"populate"),M=f((e,t,i)=>{if(e.start===void 0)throw Error("start should have been set during first phase");if(e.end===void 0)throw Error("end should have been set during first phase");if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*i)return[e,void 0];let a=t*i-1,l=t*i;return[{start:e.start,end:a,label:e.label,bits:a-e.start},{start:l,end:e.end,label:e.label,bits:e.end-l}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:f(async e=>{var a;let t=await Y("packet",e),i=(a=x.parser)==null?void 0:a.yy;if(!(i instanceof w))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");y.debug(t),L(t,i)},"parse")},j=f((e,t,i,a)=>{let l=a.db,n=l.getConfig(),{rowHeight:r,paddingY:s,bitWidth:c,bitsPerRow:d}=n,p=l.getPacket(),o=l.getDiagramTitle(),b=r+s,h=b*(p.length+1)-(o?0:r),k=c*d+2,m=A(t);m.attr("viewbox",`0 0 ${k} ${h}`),E(m,h,k,n.useMaxWidth);for(let[$,B]of p.entries())I(m,B,$,n);m.append("text").text(o).attr("x",k/2).attr("y",h-b/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=f((e,t,i,{rowHeight:a,paddingX:l,paddingY:n,bitWidth:r,bitsPerRow:s,showBits:c})=>{let d=e.append("g"),p=i*(a+n)+n;for(let o of t){let b=o.start%s*r+1,h=(o.end-o.start+1)*r-l;if(d.append("rect").attr("x",b).attr("y",p).attr("width",h).attr("height",a).attr("class","packetBlock"),d.append("text").attr("x",b+h/2).attr("y",p+a/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!c)continue;let k=o.end===o.start,m=p-2;d.append("text").attr("x",b+(k?h/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||d.append("text").attr("x",b+h).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),N={draw:j},U={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},X={parser:x,get db(){return new w},renderer:N,styles:f(({packet:e}={})=>{let t=u(U,e);return`
.packetByte {
font-size: ${t.byteFontSize};
}
.packetByte.start {
fill: ${t.startByteColor};
}
.packetByte.end {
fill: ${t.endByteColor};
}
.packetLabel {
fill: ${t.labelColor};
font-size: ${t.labelFontSize};
}
.packetTitle {
fill: ${t.titleColor};
font-size: ${t.titleFontSize};
}
.packetBlock {
stroke: ${t.blockStrokeColor};
stroke-width: ${t.blockStrokeWidth};
fill: ${t.blockFillColor};
}
`},"styles")};export{X as diagram};
import{s as b}from"./chunk-LvLJmgfZ.js";import{t as E}from"./react-BGmjiNul.js";import{t as F}from"./compiler-runtime-DeeZ7FnK.js";import{t as H}from"./jsx-runtime-ZmTK25f3.js";import{t as m}from"./cn-BKtXLv3a.js";import{h as O}from"./select-V5IdpNiR.js";import{s as P,u as T}from"./Combination-CMPwuAmi.js";import{_ as q,d as A,f as B,g as v,h as j,m as w,p as k,v as z,y as G}from"./alert-dialog-DwQffb13.js";var n=F(),u=b(E(),1),i=b(H(),1),I=q,J=G,y=P(({className:o,children:s,...a})=>(0,i.jsx)(v,{...a,children:(0,i.jsx)(T,{children:(0,i.jsx)("div",{className:m("fixed inset-0 z-50 flex items-start justify-center sm:items-start sm:top-[15%]",o),children:s})})}));y.displayName=v.displayName;var h=u.forwardRef((o,s)=>{let a=(0,n.c)(9),e,t;a[0]===o?(e=a[1],t=a[2]):({className:e,...t}=o,a[0]=o,a[1]=e,a[2]=t);let r;a[3]===e?r=a[4]:(r=m("fixed inset-0 z-50 bg-background/80 backdrop-blur-xs transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",e),a[3]=e,a[4]=r);let l;return a[5]!==t||a[6]!==s||a[7]!==r?(l=(0,i.jsx)(j,{ref:s,className:r,...t}),a[5]=t,a[6]=s,a[7]=r,a[8]=l):l=a[8],l});h.displayName=j.displayName;var R=u.forwardRef((o,s)=>{let a=(0,n.c)(17),e,t,r,l;a[0]===o?(e=a[1],t=a[2],r=a[3],l=a[4]):({className:t,children:e,usePortal:l,...r}=o,a[0]=o,a[1]=e,a[2]=t,a[3]=r,a[4]=l);let N=l===void 0?!0:l,g=A(),d;a[5]===t?d=a[6]:(d=m("fixed z-50 grid w-full gap-4 rounded-b-lg border bg-background p-6 shadow-sm animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-2xl sm:mx-4 sm:rounded-lg sm:zoom-in-90 sm:data-[state=open]:slide-in-from-bottom-0",t),a[5]=t,a[6]=d);let c;a[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,i.jsxs)(B,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,i.jsx)(O,{className:"h-4 w-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]}),a[7]=c):c=a[7];let f;a[8]!==e||a[9]!==r||a[10]!==s||a[11]!==g||a[12]!==d?(f=(0,i.jsxs)(k,{ref:s,className:d,...g,...r,children:[e,c]}),a[8]=e,a[9]=r,a[10]=s,a[11]=g,a[12]=d,a[13]=f):f=a[13];let p=f,x;return a[14]!==p||a[15]!==N?(x=N?(0,i.jsxs)(y,{children:[(0,i.jsx)(h,{}),p]}):p,a[14]=p,a[15]=N,a[16]=x):x=a[16],x});R.displayName=k.displayName;var _=o=>{let s=(0,n.c)(8),a,e;s[0]===o?(a=s[1],e=s[2]):({className:a,...e}=o,s[0]=o,s[1]=a,s[2]=e);let t;s[3]===a?t=s[4]:(t=m("flex flex-col space-y-1.5 text-center sm:text-left",a),s[3]=a,s[4]=t);let r;return s[5]!==e||s[6]!==t?(r=(0,i.jsx)("div",{className:t,...e}),s[5]=e,s[6]=t,s[7]=r):r=s[7],r};_.displayName="DialogHeader";var D=o=>{let s=(0,n.c)(8),a,e;s[0]===o?(a=s[1],e=s[2]):({className:a,...e}=o,s[0]=o,s[1]=a,s[2]=e);let t;s[3]===a?t=s[4]:(t=m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),s[3]=a,s[4]=t);let r;return s[5]!==e||s[6]!==t?(r=(0,i.jsx)("div",{className:t,...e}),s[5]=e,s[6]=t,s[7]=r):r=s[7],r};D.displayName="DialogFooter";var C=u.forwardRef((o,s)=>{let a=(0,n.c)(9),e,t;a[0]===o?(e=a[1],t=a[2]):({className:e,...t}=o,a[0]=o,a[1]=e,a[2]=t);let r;a[3]===e?r=a[4]:(r=m("text-lg font-semibold leading-none tracking-tight",e),a[3]=e,a[4]=r);let l;return a[5]!==t||a[6]!==s||a[7]!==r?(l=(0,i.jsx)(z,{ref:s,className:r,...t}),a[5]=t,a[6]=s,a[7]=r,a[8]=l):l=a[8],l});C.displayName=z.displayName;var S=u.forwardRef((o,s)=>{let a=(0,n.c)(9),e,t;a[0]===o?(e=a[1],t=a[2]):({className:e,...t}=o,a[0]=o,a[1]=e,a[2]=t);let r;a[3]===e?r=a[4]:(r=m("text-sm text-muted-foreground",e),a[3]=e,a[4]=r);let l;return a[5]!==t||a[6]!==s||a[7]!==r?(l=(0,i.jsx)(w,{ref:s,className:r,...t}),a[5]=t,a[6]=s,a[7]=r,a[8]=l):l=a[8],l});S.displayName=w.displayName;export{_ as a,C as c,D as i,J as l,R as n,h as o,S as r,y as s,I as t};
import{t as f}from"./diff-DbzsqZEz.js";export{f as diff};
var n={"+":"inserted","-":"deleted","@":"meta"};const s={name:"diff",token:function(e){var r=e.string.search(/[\t ]+?$/);if(!e.sol()||r===0)return e.skipToEnd(),("error "+(n[e.string.charAt(0)]||"")).replace(/ $/,"");var o=n[e.peek()]||e.skipToEnd();return r===-1?e.skipToEnd():e.pos=r,o}};export{s as t};
import"./dist-DBwNzi3C.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import{i,n as r,r as a,t as o}from"./dist-BVyBw1BD.js";export{o as closePercentBrace,r as liquid,a as liquidCompletionSource,i as liquidLanguage};
import{D as e,J as O,N as s,T as X,g as $,q as l,r as Y,s as S,u as o,x as t,y as Z}from"./dist-DBwNzi3C.js";var n=l({null:O.null,instanceof:O.operatorKeyword,this:O.self,"new super assert open to with void":O.keyword,"class interface extends implements enum var":O.definitionKeyword,"module package import":O.moduleKeyword,"switch while for if else case default do break continue return try catch finally throw":O.controlKeyword,"requires exports opens uses provides public private protected static transitive abstract final strictfp synchronized native transient volatile throws":O.modifier,IntegerLiteral:O.integer,FloatingPointLiteral:O.float,"StringLiteral TextBlock":O.string,CharacterLiteral:O.character,LineComment:O.lineComment,BlockComment:O.blockComment,BooleanLiteral:O.bool,PrimitiveType:O.standard(O.typeName),TypeName:O.typeName,Identifier:O.variableName,"MethodName/Identifier":O.function(O.variableName),Definition:O.definition(O.variableName),ArithOp:O.arithmeticOperator,LogicOp:O.logicOperator,BitOp:O.bitwiseOperator,CompareOp:O.compareOperator,AssignOp:O.definitionOperator,UpdateOp:O.updateOperator,Asterisk:O.punctuation,Label:O.labelName,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace,".":O.derefOperator,", ;":O.separator}),_={__proto__:null,true:34,false:34,null:42,void:46,byte:48,short:48,int:48,long:48,char:48,float:48,double:48,boolean:48,extends:62,super:64,class:76,this:78,new:84,public:100,protected:102,private:104,abstract:106,static:108,final:110,strictfp:112,default:114,synchronized:116,native:118,transient:120,volatile:122,throws:150,implements:160,interface:166,enum:176,instanceof:238,open:267,module:269,requires:274,transitive:276,exports:278,to:280,opens:282,uses:284,provides:286,with:288,package:292,import:296,if:308,else:310,while:314,for:318,var:325,assert:332,switch:336,case:342,do:346,break:350,continue:354,return:358,throw:364,try:368,catch:372,finally:380},d=Y.deserialize({version:14,states:"##jQ]QPOOQ$wQPOOO(bQQO'#H^O*iQQO'#CbOOQO'#Cb'#CbO*pQPO'#CaO*xOSO'#CpOOQO'#Hc'#HcOOQO'#Cu'#CuO,eQPO'#D_O-OQQO'#HmOOQO'#Hm'#HmO/gQQO'#HhO/nQQO'#HhOOQO'#Hh'#HhOOQO'#Hg'#HgO1rQPO'#DUO2PQPO'#GnO4wQPO'#D_O5OQPO'#DzO*pQPO'#E[O5qQPO'#E[OOQO'#DV'#DVO7SQQO'#HaO9^QQO'#EeO9eQPO'#EdO9jQPO'#EfOOQO'#Hb'#HbO7jQQO'#HbO:pQQO'#FhO:wQPO'#ExO:|QPO'#E}O:|QPO'#FPOOQO'#Ha'#HaOOQO'#HY'#HYOOQO'#Gh'#GhOOQO'#HX'#HXO<^QPO'#FiOOQO'#HW'#HWOOQO'#Gg'#GgQ]QPOOOOQO'#Hs'#HsO<cQPO'#HsO<hQPO'#D{O<hQPO'#EVO<hQPO'#EQO<pQPO'#HpO=RQQO'#EfO*pQPO'#C`O=ZQPO'#C`O*pQPO'#FcO=`QPO'#FeO=kQPO'#FkO=kQPO'#FnO<hQPO'#FsO=pQPO'#FpO:|QPO'#FwO=kQPO'#FyO]QPO'#GOO=uQPO'#GQO>QQPO'#GSO>]QPO'#GUO=kQPO'#GWO:|QPO'#GXO>dQPO'#GZO?QQQO'#HiO?mQQO'#CuO?tQPO'#HxO@SQPO'#D_O@rQPO'#DpO?wQPO'#DqO@|QPO'#HxOA_QPO'#DpOAgQPO'#IROAlQPO'#E`OOQO'#Hr'#HrOOQO'#Gm'#GmQ$wQPOOOAtQPO'#HsOOQO'#H^'#H^OCsQQO,58{OOQO'#H['#H[OOOO'#Gi'#GiOEfOSO,59[OOQO,59[,59[OOQO'#Hi'#HiOFVQPO,59eOGXQPO,59yOOQO-E:f-E:fO*pQPO,58zOG{QPO,58zO*pQPO,5;}OHQQPO'#DQOHVQPO'#DQOOQO'#Gk'#GkOIVQQO,59jOOQO'#Dm'#DmOJqQPO'#HuOJ{QPO'#DlOKZQPO'#HtOKcQPO,5<_OKhQPO,59^OLRQPO'#CxOOQO,59c,59cOLYQPO,59bOLeQQO'#H^ONgQQO'#CbO!!iQPO'#D_O!#nQQO'#HmO!$OQQO,59pO!$VQPO'#DvO!$eQPO'#H|O!$mQPO,5:`O!$rQPO,5:`O!%YQPO,5;nO!%eQPO'#ITO!%pQPO,5;eO!%uQPO,5=YOOQO-E:l-E:lOOQO,5:f,5:fO!']QPO,5:fO!'dQPO,5:vO?tQPO,5<_O*pQPO,5:vO<hQPO,5:gO<hQPO,5:qO<hQPO,5:lO<hQPO,5<_O!'zQPO,59qO:|QPO,5:}O!(RQPO,5;QO:|QPO,59TO!(aQPO'#DXOOQO,5;O,5;OOOQO'#El'#ElOOQO'#Eo'#EoO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;UO:|QPO,5;fOOQO,5;i,5;iOOQO,5<S,5<SO!(hQPO,5;bO!(yQPO,5;dO!(hQPO'#CyO!)QQQO'#HmO!)`QQO,5;kO]QPO,5<TOOQO-E:e-E:eOOQO,5>_,5>_O!*sQPO,5:gO!+RQPO,5:qO!+ZQPO,5:lO!+fQPO,5>[O!$VQPO,5>[O!'iQPO,59UO!+qQQO,58zO!+yQQO,5;}O!,RQQO,5<PO*pQPO,5<PO:|QPO'#DUO]QPO,5<VO]QPO,5<YO!,ZQPO'#FrO]QPO,5<[O]QPO,5<aO!,kQQO,5<cO!,uQPO,5<eO!,zQPO,5<jOOQO'#Fj'#FjOOQO,5<l,5<lO!-PQPO,5<lOOQO,5<n,5<nO!-UQPO,5<nO!-ZQQO,5<pOOQO,5<p,5<pO>gQPO,5<rO!-bQQO,5<sO!-iQPO'#GdO!.oQPO,5<uO>gQPO,5<}O!2mQPO,59jO!2zQPO'#HuO!3RQPO,59xO!3WQPO,5>dO?tQPO,59xO!3cQPO,5:[OAlQPO,5:zO!3kQPO'#DrO?wQPO'#DrO!3vQPO'#HyO!4OQPO,5:]O?tQPO,5>dO!(hQPO,5>dOAgQPO,5>mOOQO,5:[,5:[O!$rQPO'#DtOOQO,5>m,5>mO!4TQPO'#EaOOQO,5:z,5:zO!7UQPO,5:zO!(hQPO'#DxOOQO-E:k-E:kOOQO,5:y,5:yO*pQPO,58}O!7ZQPO'#ChOOQO1G.k1G.kOOOO-E:g-E:gOOQO1G.v1G.vO!+qQQO1G.fO*pQPO1G.fO!7eQQO1G1iOOQO,59l,59lO!7mQPO,59lOOQO-E:i-E:iO!7rQPO,5>aO!8ZQPO,5:WO<hQPO'#GpO!8bQPO,5>`OOQO1G1y1G1yOOQO1G.x1G.xO!8{QPO'#CyO!9kQPO'#HmO!9uQPO'#CzO!:TQPO'#HlO!:]QPO,59dOOQO1G.|1G.|OLYQPO1G.|O!:sQPO,59eO!;QQQO'#H^O!;cQQO'#CbOOQO,5:b,5:bO<hQPO,5:cOOQO,5:a,5:aO!;tQQO,5:aOOQO1G/[1G/[O!;yQPO,5:bO!<[QPO'#GsO!<oQPO,5>hOOQO1G/z1G/zO!<wQPO'#DvO!=YQPO1G/zO!(hQPO'#GqO!=_QPO1G1YO:|QPO1G1YO<hQPO'#GyO!=gQPO,5>oOOQO1G1P1G1POOQO1G0Q1G0QO!=oQPO'#E]OOQO1G0b1G0bO!>`QPO1G1yO!'dQPO1G0bO!*sQPO1G0RO!+RQPO1G0]O!+ZQPO1G0WOOQO1G/]1G/]O!>eQQO1G.pO9eQPO1G0jO*pQPO1G0jO<pQPO'#HpO!@[QQO1G.pOOQO1G.p1G.pO!@aQQO1G0iOOQO1G0l1G0lO!@hQPO1G0lO!@sQQO1G.oO!AZQQO'#HqO!AhQPO,59sO!BzQQO1G0pO!DfQQO1G0pO!DmQQO1G0pO!FUQQO1G0pO!F]QQO1G0pO!GbQQO1G0pO!I]QQO1G0pO!IdQQO1G0pO!IkQQO1G0pO!IuQQO1G1QO!I|QQO'#HmOOQO1G0|1G0|O!KSQQO1G1OOOQO1G1O1G1OOOQO1G1o1G1oO!KjQPO'#D[O!(hQPO'#D|O!(hQPO'#D}OOQO1G0R1G0RO!KqQPO1G0RO!KvQPO1G0RO!LOQPO1G0RO!LZQPO'#EXOOQO1G0]1G0]O!LnQPO1G0]O!LsQPO'#ETO!(hQPO'#ESOOQO1G0W1G0WO!MmQPO1G0WO!MrQPO1G0WO!MzQPO'#EhO!NRQPO'#EhOOQO'#Gx'#GxO!NZQQO1G0mO# }QQO1G3vO9eQPO1G3vO#$PQPO'#FXOOQO1G.f1G.fOOQO1G1i1G1iO#$WQPO1G1kOOQO1G1k1G1kO#$cQQO1G1kO#$kQPO1G1qOOQO1G1t1G1tO+QQPO'#D_O-OQQO,5<bO#(cQPO,5<bO#(tQPO,5<^O#({QPO,5<^OOQO1G1v1G1vOOQO1G1{1G1{OOQO1G1}1G1}O:|QPO1G1}O#,oQPO'#F{OOQO1G2P1G2PO=kQPO1G2UOOQO1G2W1G2WOOQO1G2Y1G2YOOQO1G2[1G2[OOQO1G2^1G2^OOQO1G2_1G2_O#,vQQO'#H^O#-aQQO'#CbO-OQQO'#HmO#-zQQOOO#.hQQO'#EeO#.VQQO'#HbO!$VQPO'#GeO#.oQPO,5=OOOQO'#HQ'#HQO#.wQPO1G2aO#2uQPO'#G]O>gQPO'#GaOOQO1G2a1G2aO#2zQPO1G2iO#6xQPO,5>gOOQO1G/d1G/dOOQO1G4O1G4OO#7ZQPO1G/dOOQO1G/v1G/vOOQO1G0f1G0fO!7UQPO1G0fOOQO,5:^,5:^O!(hQPO'#DsO#7`QPO,5:^O?wQPO'#GrO#7kQPO,5>eOOQO1G/w1G/wOAgQPO'#H{O#7sQPO1G4OO?tQPO1G4OOOQO1G4X1G4XO!#YQPO'#DvO!!iQPO'#D_OOQO,5:{,5:{O#8OQPO,5:{O#8OQPO,5:{O#8VQQO'#HaO#9hQQO'#HbO#9rQQO'#EbO#9}QPO'#EbO#:VQPO'#IOOOQO,5:d,5:dOOQO1G.i1G.iO#:bQQO'#EeO#:rQQO'#H`O#;SQPO'#FTOOQO'#H`'#H`O#;^QPO'#H`O#;{QPO'#IWO#<TQPO,59SOOQO7+$Q7+$QO!+qQQO7+$QOOQO7+'T7+'TOOQO1G/W1G/WO#<YQPO'#DoO#<dQQO'#HvOOQO'#Hv'#HvOOQO1G/r1G/rOOQO,5=[,5=[OOQO-E:n-E:nO#<tQWO,58{O#<{QPO,59fOOQO,59f,59fO!(hQPO'#HoOKmQPO'#GjO#=ZQPO,5>WOOQO1G/O1G/OOOQO7+$h7+$hOOQO1G/{1G/{O#=cQQO1G/{OOQO1G/}1G/}O#=hQPO1G/{OOQO1G/|1G/|O<hQPO1G/}OOQO,5=_,5=_OOQO-E:q-E:qOOQO7+%f7+%fOOQO,5=],5=]OOQO-E:o-E:oO:|QPO7+&tOOQO7+&t7+&tOOQO,5=e,5=eOOQO-E:w-E:wO#=mQPO'#EUO#={QPO'#EUOOQO'#Gw'#GwO#>dQPO,5:wOOQO,5:w,5:wOOQO7+'e7+'eOOQO7+%|7+%|OOQO7+%m7+%mO!KqQPO7+%mO!KvQPO7+%mO!LOQPO7+%mOOQO7+%w7+%wO!LnQPO7+%wOOQO7+%r7+%rO!MmQPO7+%rO!MrQPO7+%rOOQO7+&U7+&UOOQO'#Ee'#EeO9eQPO7+&UO9eQPO,5>[O#?TQPO7+$[OOQO7+&T7+&TOOQO7+&W7+&WO:|QPO'#GlO#?cQPO,5>]OOQO1G/_1G/_O:|QPO7+&lO#?nQQO,59eO#@tQPO,59vOOQO,59v,59vOOQO,5:h,5:hOOQO'#EP'#EPOOQO,5:i,5:iO#@{QPO'#EYO<hQPO'#EYO#A^QPO'#IPO#AiQPO,5:sO?tQPO'#HxO!(hQPO'#HxO#AqQPO'#DpOOQO'#Gu'#GuO#AxQPO,5:oOOQO,5:o,5:oOOQO,5:n,5:nOOQO,5;S,5;SO#BrQQO,5;SO#ByQPO,5;SOOQO-E:v-E:vOOQO7+&X7+&XOOQO7+)b7+)bO#CQQQO7+)bOOQO'#G|'#G|O#DqQPO,5;sOOQO,5;s,5;sO#DxQPO'#FYO*pQPO'#FYO*pQPO'#FYO*pQPO'#FYO#EWQPO7+'VO#E]QPO7+'VOOQO7+'V7+'VO]QPO7+']O#EhQPO1G1|O?tQPO1G1|O#EvQQO1G1xO!(aQPO1G1xO#E}QPO1G1xO#FUQQO7+'iOOQO'#HP'#HPO#F]QPO,5<gOOQO,5<g,5<gO#FdQPO'#HsO:|QPO'#F|O#FlQPO7+'pO#FqQPO,5=PO?tQPO,5=PO#FvQPO1G2jO#HPQPO1G2jOOQO1G2j1G2jOOQO-E;O-E;OOOQO7+'{7+'{O!<[QPO'#G_O>gQPO,5<wOOQO,5<{,5<{O#HXQPO7+(TOOQO7+(T7+(TO#LVQPO1G4ROOQO7+%O7+%OOOQO7+&Q7+&QO#LhQPO,5:_OOQO1G/x1G/xOOQO,5=^,5=^OOQO-E:p-E:pOOQO7+)j7+)jO#LsQPO7+)jO!:bQPO,5:aOOQO1G0g1G0gO#MOQPO1G0gO#MVQPO,59qO#MkQPO,5:|O9eQPO,5:|O!(hQPO'#GtO#MpQPO,5>jO#M{QPO,59TO#NSQPO'#IVO#N[QPO,5;oO*pQPO'#G{O#NaQPO,5>rOOQO1G.n1G.nOOQO<<Gl<<GlO#NiQPO'#HwO#NqQPO,5:ZOOQO1G/Q1G/QOOQO,5>Z,5>ZOOQO,5=U,5=UOOQO-E:h-E:hO#NvQPO7+%gOOQO7+%g7+%gOOQO7+%i7+%iOOQO<<J`<<J`O$ ^QPO'#H^O$ eQPO'#CbO$ lQPO,5:pO$ qQPO,5:xO#=mQPO,5:pOOQO-E:u-E:uOOQO1G0c1G0cOOQO<<IX<<IXO!KqQPO<<IXO!KvQPO<<IXOOQO<<Ic<<IcOOQO<<I^<<I^O!MmQPO<<I^OOQO<<Ip<<IpO$ vQQO<<GvO9eQPO<<IpO*pQPO<<IpOOQO<<Gv<<GvO$#mQQO,5=WOOQO-E:j-E:jO$#zQQO<<JWOOQO1G/b1G/bOOQO,5:t,5:tO$$bQPO,5:tO$$pQPO,5:tO$%RQPO'#GvO$%iQPO,5>kO$%tQPO'#EZOOQO1G0_1G0_O$%{QPO1G0_O?tQPO,5:pOOQO-E:s-E:sOOQO1G0Z1G0ZOOQO1G0n1G0nO$&QQQO1G0nOOQO<<L|<<L|OOQO-E:z-E:zOOQO1G1_1G1_O$&XQQO,5;tOOQO'#G}'#G}O#DxQPO,5;tOOQO'#IX'#IXO$&aQQO,5;tO$&rQQO,5;tOOQO<<Jq<<JqO$&zQPO<<JqOOQO<<Jw<<JwO:|QPO7+'hO$'PQPO7+'hO!(aQPO7+'dO$'_QPO7+'dO$'dQQO7+'dOOQO<<KT<<KTOOQO-E:}-E:}OOQO1G2R1G2ROOQO,5<h,5<hO$'kQQO,5<hOOQO<<K[<<K[O:|QPO1G2kO$'rQPO1G2kOOQO,5=n,5=nOOQO7+(U7+(UO$'wQPO7+(UOOQO-E;Q-E;QO$)fQWO'#HhO$)QQWO'#HhO$)mQPO'#G`O<hQPO,5<yO!$VQPO,5<yOOQO1G2c1G2cOOQO<<Ko<<KoO$*OQPO1G/yOOQO<<MU<<MUOOQO7+&R7+&RO$*ZQPO1G0jO$*fQQO1G0hOOQO1G0h1G0hO$*nQPO1G0hOOQO,5=`,5=`OOQO-E:r-E:rO$*sQQO1G.oOOQO1G1[1G1[O$*}QPO'#GzO$+[QPO,5>qOOQO1G1Z1G1ZO$+dQPO'#FUOOQO,5=g,5=gOOQO-E:y-E:yO$+iQPO'#GoO$+vQPO,5>cOOQO1G/u1G/uOOQO<<IR<<IROOQO1G0[1G0[O$,OQPO1G0dO$,TQPO1G0[O$,YQPO1G0dOOQOAN>sAN>sO!KqQPOAN>sOOQOAN>xAN>xOOQOAN?[AN?[O9eQPOAN?[OOQO1G0`1G0`O$,_QPO1G0`OOQO,5=b,5=bOOQO-E:t-E:tO$,mQPO,5:uOOQO7+%y7+%yOOQO7+&Y7+&YOOQO1G1`1G1`O$,tQQO1G1`OOQO-E:{-E:{O$,|QQO'#IYO$,wQPO1G1`O$&gQPO1G1`O*pQPO1G1`OOQOAN@]AN@]O$-XQQO<<KSO:|QPO<<KSO$-`QPO<<KOOOQO<<KO<<KOO!(aQPO<<KOOOQO1G2S1G2SO$-eQQO7+(VO:|QPO7+(VOOQO<<Kp<<KpP!-iQPO'#HSO!$VQPO'#HRO$-oQPO,5<zO$-zQPO1G2eO<hQPO1G2eO9eQPO7+&SO$.PQPO7+&SOOQO7+&S7+&SOOQO,5=f,5=fOOQO-E:x-E:xO#M{QPO,5;pOOQO,5=Z,5=ZOOQO-E:m-E:mO$.UQPO7+&OOOQO7+%v7+%vO$.dQPO7+&OOOQOG24_G24_OOQOG24vG24vOOQO7+%z7+%zOOQO7+&z7+&zO*pQPO'#HOO$.iQPO,5>tO$.qQPO7+&zO$.vQQO'#IZOOQOAN@nAN@nO$/RQQOAN@nOOQOAN@jAN@jO$/YQPOAN@jO$/_QQO<<KqO$/iQPO,5=mOOQO-E;P-E;POOQO7+(P7+(PO$/zQPO7+(PO$0PQPO<<InOOQO<<In<<InO$0UQPO<<IjOOQO<<Ij<<IjO#M{QPO<<IjO$0UQPO<<IjO$0dQQO,5=jOOQO-E:|-E:|OOQO<<Jf<<JfO$0oQPO,5>uOOQOG26YG26YOOQOG26UG26UOOQO<<Kk<<KkOOQOAN?YAN?YOOQOAN?UAN?UO#M{QPOAN?UO$0wQPOAN?UO$0|QPOAN?UO$1[QPOG24pOOQOG24pG24pO#M{QPOG24pOOQOLD*[LD*[O$1aQPOLD*[OOQO!$'Mv!$'MvO*pQPO'#CaO$1fQQO'#H^O$1yQQO'#CbO!(hQPO'#Cy",stateData:"$2i~OPOSQOS%yOS~OZ`O_VO`VOaVObVOcVOeVOg^Oh^Op!POv{OwkOz!OO}cO!PvO!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO![!`O!]yO!^yO!_yO!u}O!z|O#fpO#roO#tpO#upO#y!RO#z!QO$W!SO$Y!TO$`!UO$c!VO$e!XO$h!WO$l!YO$n!ZO$s![O$u!]O$w!^O$y!_O$|!aO%O!bO%}TO&PRO&RQO&XUO&tdO~Og^Oh^Ov{O}cO!P!mO!SyO!TyO!UyO!VyO!W!pO!XyO!YyO!ZzO!]yO!^yO!_yO!u}O!z|O%}TO&P!cO&R!dO&_!hO&tdO~OWiXW&QXZ&QXuiXu&QX!P&QX!b&QX#]&QX#_&QX#a&QX#b&QX#d&QX#e&QX#f&QX#g&QX#h&QX#i&QX#k&QX#o&QX#r&QX%}iX&PiX&RiX&^&QX&_iX&_&QX&n&QX&viX&v&QX&x!aX~O#p$^X~P&bOWUXW&]XZUXuUXu&]X!PUX!bUX#]UX#_UX#aUX#bUX#dUX#eUX#fUX#gUX#hUX#iUX#kUX#oUX#rUX%}&]X&P&]X&R&]X&^UX&_UX&_&]X&nUX&vUX&v&]X&x!aX~O#p$^X~P(iO&PSO&R!qO~O&W!vO&Y!tO~Og^Oh^O!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO!]yO!^yO!_yO%}TO&P!wO&RWOg!RXh!RX$h!RX&P!RX&R!RX~O#y!|O#z!{O$W!}Ov!RX!u!RX!z!RX&t!RX~P+QOW#XOu#OO%}TO&P#SO&R#SO&v&aX~OW#[Ou&[X%}&[X&P&[X&R&[X&v&[XY&[Xw&[X&n&[X&q&[XZ&[Xq&[X&^&[X!P&[X#_&[X#a&[X#b&[X#d&[X#e&[X#f&[X#g&[X#h&[X#i&[X#k&[X#o&[X#r&[X}&[X!r&[X#p&[Xs&[X|&[X~O&_#YO~P-dO&_&[X~P-dOZ`O_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO!]yO!^yO!_yO#fpO#roO#tpO#upO%}TO&XUO~O&P#^O&R#]OY&pP~P/uO%}TOg%bXh%bXv%bX!S%bX!T%bX!U%bX!V%bX!W%bX!X%bX!Y%bX!Z%bX!]%bX!^%bX!_%bX!u%bX!z%bX$h%bX&P%bX&R%bX&t%bX&_%bX~O!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO!]yO!^yO!_yOg!RXh!RXv!RX!u!RX!z!RX&P!RX&R!RX&t!RX&_!RX~O$h!RX~P3gO|#kO~P]Og^Oh^Ov#pO!u#rO!z#qO&P!wO&RWO&t#oO~O$h#sO~P5VOu#uO&v#vO!P&TX#_&TX#a&TX#b&TX#d&TX#e&TX#f&TX#g&TX#h&TX#i&TX#k&TX#o&TX#r&TX&^&TX&_&TX&n&TX~OW#tOY&TX#p&TXs&TXq&TX|&TX~P5xO!b#wO#]#wOW&UXu&UX!P&UX#_&UX#a&UX#b&UX#d&UX#e&UX#f&UX#g&UX#h&UX#i&UX#k&UX#o&UX#r&UX&^&UX&_&UX&n&UX&v&UXY&UX#p&UXs&UXq&UX|&UX~OZ#XX~P7jOZ#xO~O&v#vO~O#_#|O#a#}O#b$OO#d$QO#e$RO#f$SO#g$TO#h$UO#i$UO#k$YO#o$VO#r$WO&^#zO&_#zO&n#{O~O!P$XO~P9oO&x$ZO~OZ`O_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO#fpO#roO#tpO#upO%}TO&P0qO&R0pO&XUO~O#p$_O~O![$aO~O&P#SO&R#SO~Og^Oh^O&P!wO&RWO&_#YO~OW$gO&v#vO~O#z!{O~O!W$kO&PSO&R!qO~OZ$lO~OZ$oO~O!P$vO&P$uO&R$uO~O!P$xO&P$uO&R$uO~O!P${O~P:|OZ%OO}cO~OW&]Xu&]X%}&]X&P&]X&R&]X&_&]X~OZ!aX~P>lOWiXuiX%}iX&PiX&RiX&_iX~OZ!aX~P?XOu#OO%}TO&P#SO&R#SO~O%}TO~P3gOg^Oh^Ov#pO!u#rO!z#qO&_!hO&t#oO~O&P!cO&R!dO~P@ZOg^Oh^O%}TO&P!cO&R!dO~O}cO!P%aO~OZ%bO~O}%dO!m%gO~O}cOg&gXh&gXv&gX!S&gX!T&gX!U&gX!V&gX!W&gX!X&gX!Y&gX!Z&gX!]&gX!^&gX!_&gX!u&gX!z&gX%}&gX&P&gX&R&gX&_&gX&t&gX~OW%jOZ%kOgTahTa%}Ta&PTa&RTa~OvTa!STa!TTa!UTa!VTa!WTa!XTa!YTa!ZTa!]Ta!^Ta!_Ta!uTa!zTa#yTa#zTa$WTa$hTa&tTa&_TauTaYTaqTa|Ta!PTa~PC[O&W%nO&Y!tO~Ou#OO%}TOqma&^maYma&nma!Pma~O&vma}ma!rma~PEnO!SyO!TyO!UyO!VyO!WyO!XyO!YyO!ZzO!]yO!^yO!_yO~Og!Rah!Rav!Ra!u!Ra!z!Ra$h!Ra&P!Ra&R!Ra&t!Ra&_!Ra~PFdO#z%pO~Os%rO~Ou%sO%}TO~Ou#OO%}ra&Pra&Rra&vraYrawra&nra&qra!Pra&^raqra~OWra#_ra#ara#bra#dra#era#fra#gra#hra#ira#kra#ora#rra&_ra#prasra|ra~PH_Ou#OO%}TOq&iX!P&iX!b&iX~OY&iX#p&iX~PJ`O!b%vOq!`X!P!`XY!`X~Oq%wO!P&hX~O!P%yO~Ov%zO~Og^Oh^O%}0oO&P!wO&RWO&b%}O~O&^&`P~PKmO%}TO&P!wO&RWO~OW&QXYiXY!aXY&QXZ&QXq!aXu&QXwiX!b&QX#]&QX#_&QX#a&QX#b&QX#d&QX#e&QX#f&QX#g&QX#h&QX#i&QX#k&QX#o&QX#r&QX&^&QX&_&QX&niX&n&QX&qiX&viX&v&QX&x!aX~P?XOWUXYUXY!aXY&]XZUXq!aXuUXw&]X!bUX#]UX#_UX#aUX#bUX#dUX#eUX#fUX#gUX#hUX#iUX#kUX#oUX#rUX&^UX&_UX&nUX&n&]X&q&]X&vUX&v&]X&x!aX~P>lOg^Oh^O%}TO&P!wO&RWOg!RXh!RX&P!RX&R!RX~PFdOu#OOw&XO%}TO&P&UO&R&TO&q&WO~OW#XOY&aX&n&aX&v&aX~P!#YOY&ZO~P9oOg^Oh^O&P!wO&RWO~Oq&]OY&pX~OY&_O~Og^Oh^O%}TO&P!wO&RWOY&pP~PFdOY&dO&n&bO&v#vO~Oq&eO&x$ZOY&wX~OY&gO~O%}TOg%bah%bav%ba!S%ba!T%ba!U%ba!V%ba!W%ba!X%ba!Y%ba!Z%ba!]%ba!^%ba!_%ba!u%ba!z%ba$h%ba&P%ba&R%ba&t%ba&_%ba~O|&hO~P]O}&iO~Op&uOw&vO&PSO&R!qO&_#YO~Oz&tO~P!'iOz&xO&PSO&R!qO&_#YO~OY&eP~P:|Og^Oh^O%}TO&P!wO&RWO~O}cO~P:|OW#XOu#OO%}TO&v&aX~O#r$WO!P#sa#_#sa#a#sa#b#sa#d#sa#e#sa#f#sa#g#sa#h#sa#i#sa#k#sa#o#sa&^#sa&_#sa&n#saY#sa#p#sas#saq#sa|#sa~Oo'_O}'^O!r'`O&_!hO~O}'eO!r'`O~Oo'iO}'hO&_!hO~OZ#xOu'mO%}TO~OW%jO}'sO~OW%jO!P'uO~OW'vO!P'wO~O$h!WO&P0qO&R0pO!P&eP~P/uO!P(SO#p(TO~P9oO}(UO~O$c(WO~O!P(XO~O!P(YO~O!P(ZO~P9oO!P(]O~P9oOZ$lO_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO%}TO&P(_O&R(^O&XUO~PFdO%Q(hO%U(iOZ$}a_$}a`$}aa$}ab$}ac$}ae$}ag$}ah$}ap$}av$}aw$}az$}a}$}a!P$}a!S$}a!T$}a!U$}a!V$}a!W$}a!X$}a!Y$}a!Z$}a![$}a!]$}a!^$}a!_$}a!u$}a!z$}a#f$}a#r$}a#t$}a#u$}a#y$}a#z$}a$W$}a$Y$}a$`$}a$c$}a$e$}a$h$}a$l$}a$n$}a$s$}a$u$}a$w$}a$y$}a$|$}a%O$}a%w$}a%}$}a&P$}a&R$}a&X$}a&t$}a|$}a$a$}a$q$}a~O}ra!rra'Ora~PH_OZ%bO~PJ`O!P(mO~O!m%gO}&la!P&la~O}cO!P(pO~Oo(tOq!fX&^!fX~Oq(vO&^&mX~O&^(xO~OZ`O_VO`VOaVObVOcVOeVOg^Oh^Op)UOv{Ow)TOz!OO|)PO}cO!PvO![!`O!u}O!z|O#fpO#roO#tpO#upO#y!RO#z!QO$W!SO$Y!TO$`!UO$c!VO$e!XO$h!WO$l!YO$n!ZO$s![O$u!]O$w!^O$y!_O$|!aO%O!bO%}TO&PRO&RQO&XUO&_#YO&tdO~PFdO}%dO~O})]OY&zP~P:|OW%jO!P)dO~Os)eO~Ou#OO%}TOq&ia!P&ia!b&iaY&ia#p&ia~O})fO~P:|Oq%wO!P&ha~Og^Oh^O%}0oO&P!wO&RWO~O&b)mO~P!8jOu#OO%}TOq&aX&^&aXY&aX&n&aX!P&aX~O}&aX!r&aX~P!9SOo)oOp)oOqnX&^nX~Oq)pO&^&`X~O&^)rO~Ou#OOw)tO%}TO&PSO&R!qO~OYma&nma&vma~P!:bOW&QXY!aXq!aXu!aX%}!aX~OWUXY!aXq!aXu!aX%}!aX~OW)wO~Ou#OO%}TO&P#SO&R#SO&q)yO~Og^Oh^O%}TO&P!wO&RWO~PFdOq&]OY&pa~Ou#OO%}TO&P#SO&R#SO&q&WO~OY)|O~OY*PO&n&bO~Oq&eOY&wa~Og^Oh^Ov{O|*XO!u}O%}TO&P!wO&RWO&tdO~PFdO!P*YO~OW^iZ#XXu^i!P^i!b^i#]^i#_^i#a^i#b^i#d^i#e^i#f^i#g^i#h^i#i^i#k^i#o^i#r^i&^^i&_^i&n^i&v^iY^i#p^is^iq^i|^i~OW*iO~Os*jO~P9oOz*kO&PSO&R!qO~O!P]iY]i#p]is]iq]i|]i~P9oOq*lOY&eX!P&eX~P9oOY*nO~O#f$SO#g$TO#k$YO#r$WO!P#^i#_#^i#a#^i#b#^i#d#^i#e#^i#o#^i&^#^i&_#^i&n#^iY#^i#p#^is#^iq#^i|#^i~O#h$UO#i$UO~P!AmO#_#|O#d$QO#e$RO#f$SO#g$TO#h$UO#i$UO#k$YO#r$WO&^#zO&_#zO&n#{O!P#^i#b#^i#o#^iY#^i#p#^is#^iq#^i|#^i~O#a#^i~P!CUO#a#}O~P!CUO#_#|O#f$SO#g$TO#h$UO#i$UO#k$YO#r$WO&^#zO&_#zO!P#^i#a#^i#b#^i#d#^i#e#^i#o#^iY#^i#p#^is#^iq#^i|#^i~O&n#^i~P!DtO&n#{O~P!DtO#f$SO#g$TO#k$YO#r$WO!P#^i#a#^i#b#^i#e#^i#o#^iY#^i#p#^is#^iq#^i|#^i~O#_#|O#d$QO#h$UO#i$UO&^#zO&_#zO&n#{O~P!FdO#k$YO#r$WO!P#^i#_#^i#a#^i#b#^i#d#^i#e#^i#f#^i#h#^i#i#^i#o#^i&^#^i&_#^i&n#^iY#^i#p#^is#^iq#^i|#^i~O#g$TO~P!G{O#g#^i~P!G{O#h#^i#i#^i~P!AmO#p*oO~P9oO#_&aX#a&aX#b&aX#d&aX#e&aX#f&aX#g&aX#h&aX#i&aX#k&aX#o&aX#r&aX&_&aX#p&aXs&aX|&aX~P!9SO!P#liY#li#p#lis#liq#li|#li~P9oO|*rO~P$wO}'^O~O}'^O!r'`O~Oo'_O}'^O!r'`O~O%}TO&P#SO&R#SO|&sP!P&sP~PFdO}'eO~Og^Oh^Ov{O|+PO!P*}O!u}O!z|O%}TO&P!wO&RWO&_!hO&tdO~PFdO}'hO~Oo'iO}'hO~Os+RO~P:|Ou+TO%}TO~Ou'mO})fO%}TOW#Zi!P#Zi#_#Zi#a#Zi#b#Zi#d#Zi#e#Zi#f#Zi#g#Zi#h#Zi#i#Zi#k#Zi#o#Zi#r#Zi&^#Zi&_#Zi&n#Zi&v#ZiY#Zi#p#Zis#Ziq#Zi|#Zi~O}'^OW&diu&di!P&di#_&di#a&di#b&di#d&di#e&di#f&di#g&di#h&di#i&di#k&di#o&di#r&di&^&di&_&di&n&di&v&diY&di#p&dis&diq&di|&di~O#}+]O$P+^O$R+^O$S+_O$T+`O~O|+[O~P##nO$Z+aO&PSO&R!qO~OW+bO!P+cO~O$a+dOZ$_i_$_i`$_ia$_ib$_ic$_ie$_ig$_ih$_ip$_iv$_iw$_iz$_i}$_i!P$_i!S$_i!T$_i!U$_i!V$_i!W$_i!X$_i!Y$_i!Z$_i![$_i!]$_i!^$_i!_$_i!u$_i!z$_i#f$_i#r$_i#t$_i#u$_i#y$_i#z$_i$W$_i$Y$_i$`$_i$c$_i$e$_i$h$_i$l$_i$n$_i$s$_i$u$_i$w$_i$y$_i$|$_i%O$_i%w$_i%}$_i&P$_i&R$_i&X$_i&t$_i|$_i$q$_i~Og^Oh^O$h#sO&P!wO&RWO~O!P+hO~P:|O!P+iO~OZ`O_VO`VOaVObVOcVOeVOg^Oh^Op!POv{OwkOz!OO}cO!PvO!SyO!TyO!UyO!VyO!WyO!XyO!YyO!Z+nO![!`O!]yO!^yO!_yO!u}O!z|O#fpO#roO#tpO#upO#y!RO#z!QO$W!SO$Y!TO$`!UO$c!VO$e!XO$h!WO$l!YO$n!ZO$q+oO$s![O$u!]O$w!^O$y!_O$|!aO%O!bO%}TO&PRO&RQO&XUO&tdO~O|+mO~P#)QOW&QXY&QXZ&QXu&QX!P&QX&viX&v&QX~P?XOWUXYUXZUXuUX!PUX&vUX&v&]X~P>lOW#tOu#uO&v#vO~OW&UXY%XXu&UX!P%XX&v&UX~OZ#XX~P#.VOY+uO!P+sO~O%Q(hO%U(iOZ$}i_$}i`$}ia$}ib$}ic$}ie$}ig$}ih$}ip$}iv$}iw$}iz$}i}$}i!P$}i!S$}i!T$}i!U$}i!V$}i!W$}i!X$}i!Y$}i!Z$}i![$}i!]$}i!^$}i!_$}i!u$}i!z$}i#f$}i#r$}i#t$}i#u$}i#y$}i#z$}i$W$}i$Y$}i$`$}i$c$}i$e$}i$h$}i$l$}i$n$}i$s$}i$u$}i$w$}i$y$}i$|$}i%O$}i%w$}i%}$}i&P$}i&R$}i&X$}i&t$}i|$}i$a$}i$q$}i~OZ+xO~O%Q(hO%U(iOZ%Vi_%Vi`%Via%Vib%Vic%Vie%Vig%Vih%Vip%Viv%Viw%Viz%Vi}%Vi!P%Vi!S%Vi!T%Vi!U%Vi!V%Vi!W%Vi!X%Vi!Y%Vi!Z%Vi![%Vi!]%Vi!^%Vi!_%Vi!u%Vi!z%Vi#f%Vi#r%Vi#t%Vi#u%Vi#y%Vi#z%Vi$W%Vi$Y%Vi$`%Vi$c%Vi$e%Vi$h%Vi$l%Vi$n%Vi$s%Vi$u%Vi$w%Vi$y%Vi$|%Vi%O%Vi%w%Vi%}%Vi&P%Vi&R%Vi&X%Vi&t%Vi|%Vi$a%Vi$q%Vi~Ou#OO%}TO}&oa!P&oa!m&oa~O!P,OO~Oo(tOq!fa&^!fa~Oq(vO&^&ma~O!m%gO}&li!P&li~O|,XO~P]OW,ZO~P5xOW&UXu&UX#_&UX#a&UX#b&UX#d&UX#e&UX#f&UX#g&UX#h&UX#i&UX#k&UX#o&UX#r&UX&^&UX&_&UX&n&UX&v&UX~OZ#xO!P&UX~P#8^OW$gOZ#xO&v#vO~Op,]Ow,]O~Oq,^O}&rX!P&rX~O!b,`O#]#wOY&UXZ#XX~P#8^OY&SXq&SX|&SX!P&SX~P9oO})]O|&yP~P:|OY&SXg%[Xh%[X%}%[X&P%[X&R%[Xq&SX|&SX!P&SX~Oq,cOY&zX~OY,eO~O})fO|&kP~P:|Oq&jX!P&jX|&jXY&jX~P9oO&bTa~PC[Oo)oOp)oOqna&^na~Oq)pO&^&`a~OW,mO~Ow,nO~Ou#OO%}TO&P,rO&R,qO~Og^Oh^Ov#pO!u#rO&P!wO&RWO&t#oO~Og^Oh^Ov{O|,wO!u}O%}TO&P!wO&RWO&tdO~PFdOw-SO&PSO&R!qO&_#YO~Oq*lOY&ea!P&ea~O#_ma#ama#bma#dma#ema#fma#gma#hma#ima#kma#oma#rma&_ma#pmasma|ma~PEnO|-WO~P$wOZ#xO}'^Oq!|X|!|X!P!|X~Oq-[O|&sX!P&sX~O|-_O!P-^O~O&_!hO~P5VOg^Oh^Ov{O|-cO!P*}O!u}O!z|O%}TO&P!wO&RWO&_!hO&tdO~PFdOs-dO~P9oOs-dO~P:|O}'^OW&dqu&dq!P&dq#_&dq#a&dq#b&dq#d&dq#e&dq#f&dq#g&dq#h&dq#i&dq#k&dq#o&dq#r&dq&^&dq&_&dq&n&dq&v&dqY&dq#p&dqs&dqq&dq|&dq~O|-hO~P##nO!W-lO$O-lO&PSO&R!qO~O!P-oO~O$Z-pO&PSO&R!qO~O!b%vO#p-rOq!`X!P!`X~O!P-tO~P9oO!P-tO~P:|O!P-wO~P9oO|-yO~P#)QO![$aO#p-zO~O!P-|O~O!b-}O~OY.QOZ$lO_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO%}TO&P(_O&R(^O&XUO~PFdOY.QO!P.RO~O%Q(hO%U(iOZ%Vq_%Vq`%Vqa%Vqb%Vqc%Vqe%Vqg%Vqh%Vqp%Vqv%Vqw%Vqz%Vq}%Vq!P%Vq!S%Vq!T%Vq!U%Vq!V%Vq!W%Vq!X%Vq!Y%Vq!Z%Vq![%Vq!]%Vq!^%Vq!_%Vq!u%Vq!z%Vq#f%Vq#r%Vq#t%Vq#u%Vq#y%Vq#z%Vq$W%Vq$Y%Vq$`%Vq$c%Vq$e%Vq$h%Vq$l%Vq$n%Vq$s%Vq$u%Vq$w%Vq$y%Vq$|%Vq%O%Vq%w%Vq%}%Vq&P%Vq&R%Vq&X%Vq&t%Vq|%Vq$a%Vq$q%Vq~Ou#OO%}TO}&oi!P&oi!m&oi~O&n&bOq!ga&^!ga~O!m%gO}&lq!P&lq~O|.^O~P]Op.`Ow&vOz&tO&PSO&R!qO&_#YO~O!P.aO~Oq,^O}&ra!P&ra~O})]O~P:|Oq.gO|&yX~O|.iO~Oq,cOY&za~Oq.mO|&kX~O|.oO~Ow.pO~Oq!aXu!aX!P!aX!b!aX%}!aX~OZ&QX~P#N{OZUX~P#N{O!P.qO~OZ.rO~OW^yZ#XXu^y!P^y!b^y#]^y#_^y#a^y#b^y#d^y#e^y#f^y#g^y#h^y#i^y#k^y#o^y#r^y&^^y&_^y&n^y&v^yY^y#p^ys^yq^y|^y~OY%`aq%`a!P%`a~P9oO!P#nyY#ny#p#nys#nyq#ny|#ny~P9oO}'^Oq!|a|!|a!P!|a~OZ#xO}'^Oq!|a|!|a!P!|a~O%}TO&P#SO&R#SOq%jX|%jX!P%jX~PFdOq-[O|&sa!P&sa~O|!}X~P$wO|/PO~Os/QO~P9oOW%jO!P/RO~OW%jO$Q/WO&PSO&R!qO!P&|P~OW%jO$U/XO~O!P/YO~O!b%vO#p/[Oq!`X!P!`X~OY/^O~O!P/_O~P9oO#p/`O~P9oO!b/bO~OY/cOZ$lO_VO`VOaVObVOcVOeVOg^Oh^Op!POwkOz!OO%}TO&P(_O&R(^O&XUO~PFdOW#[Ou&[X%}&[X&P&[X&R&[X'O&[X~O&_#YO~P$)QOu#OO%}TO'O/eO&P%SX&R%SX~O&n&bOq!gi&^!gi~Op/iO&PSO&R!qO~OW*iOZ#xO~O!P/kO~OY&SXq&SX~P9oO})]Oq%nX|%nX~P:|Oq.gO|&ya~O!b/nO~O})fOq%cX|%cX~P:|Oq.mO|&ka~OY/qO~O!P/rO~OZ/sO~O}'^Oq!|i|!|i!P!|i~O|!}a~P$wOW%jO!P/wO~OW%jOq/xO!P&|X~OY/|O~P9oOY0OO~OY%Xq!P%Xq~P9oO'O/eO&P%Sa&R%Sa~OY0TO~O!P0WO~Ou#OO!P0YO!Z0ZO%}TO~OY0[O~Oq/xO!P&|a~O!P0_O~OW%jOq/xO!P&}X~OY0aO~P9oOY0bO~OY%Xy!P%Xy~P9oOu#OO%}TO&P%ua&R%ua'O%ua~OY0cO~O!P0dO~Ou#OO!P0eO!Z0fO%}TO~OW%jOq%ra!P%ra~Oq/xO!P&}a~O!P0jO~Ou#OO!P0jO!Z0kO%}TO~O!P0lO~O!P0nO~O#p&QXY&QXs&QXq&QX|&QX~P&bO#pUXYUXsUXqUX|UX~P(iO`Q_P#g%y&P&Xc&X~",goto:"#+S'OPPPP'P'd*x.OP'dPP.d.h0PPPPPP1nP3ZPP4v7l:[<z=d?[PPP?bPA{PPPBu3ZPDqPPElPFcFkPPPPPPPPPPPPGvH_PKjKrLOLjLpLvNiNmNmNuP! U!!^!#R!#]P!#r!!^P!#x!$S!!y!$cP!%S!%^!%d!!^!%g!%mFcFc!%q!%{!&O3Z!'m3Z3Z!)iP.hP!)mPP!*_PPPPPP.hP.h!+O.hPP.hP.hPP.h!,g!,qPP!,w!-QPPPPPPPP'PP'PPP!-U!-U!-i!-UPP!-UP!-UP!.S!.VP!-U!.m!-UP!-UP!.p!.sP!-UP!-UP!-UP!-UP!-U!-UP!-UP!.wP!.}!/Q!/WP!-U!/d!/gP!/o!0R!4T!4Z!4a!5g!5m!5{!7R!7X!7_!7i!7o!7u!7{!8R!8X!8_!8e!8k!8q!8w!8}!9T!9_!9e!9o!9uPPP!9{!-U!:pP!>WP!?[P!Ap!BW!E]3ZPPP!F|!Jm!MaPP#!P#!SP#$`#$f#&V#&f#&n#'p#(Y#)T#)^#)a#)oP#)r#*OP#*V#*^P#*aP#*lP#*o#*r#*u#*y#+PstOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y'urOPXY`acopx!Y![!_!a!e!f!h!i!o!x#P#T#Y#[#_#`#e#i#l#n#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$]$_$e$l$m$n$o$p$q%O%S%V%Z%^%_%b%d%g%k%u%v%{%|&R&S&[&]&`&b&d&i'X'^'_'`'e'h'i'm'n'p'{'|(O(T(U(`(l(t(v({(})O)Q)R)])f)o)p*P*T*W*l*o*p*q*z*{+O+T+d+f+h+i+l+o+r+s+x+},W,Y,^,`,u-[-^-a-r-t-}.R.V.g.m/O/[/_/b/d/n/q0R0X0Z0[0f0h0k0r#xhO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0kt!sT!Q!S!T!{!}$k%p+]+^+_+`-k-m/W/X/x0oQ#mdS&Y#`(}Q&l#oU&q#t$g,ZQ&x#vW(b%O+s.R/dU)Y%j'v+bQ)Z%kS)u&S,WU*f&s-R._Q*k&yQ,t*TQ-P*iQ.j,cR.t,uu!sT!Q!S!T!{!}$k%p+]+^+_+`-k-m/W/X/x0oT%l!r)l#{qO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0k#zlO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0kX(c%O+s.R/d$TVO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0k$TkO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0k&O[OPX`ceopx!O!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$f$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i&t'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s,Y,^,`-^-r-t-}.R.g.m/O/[/_/b/d/n0Z0f0k0rQ&Q#[Q)s&RV.T+x.X/e&O[OPX`ceopx!O!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$f$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i&t'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s,Y,^,`-^-r-t-}.R.g.m/O/[/_/b/d/n0Z0f0k0rV.T+x.X/e&O]OPX`ceopx!O!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$f$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i&t'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s,Y,^,`-^-r-t-}.R.g.m/O/[/_/b/d/n0Z0f0k0rV.U+x.X/eS#Z[.TS$f!O&tS&s#t$gQ&y#vQ)V%dQ-R*iR._,Z$kZO`copx!Y![!_!a#Y#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$_$l$m$n$o$p$q%O%d%g%k%v&b&d'_'`'i'm(O(T(U(t)Q)R)])f)o)p*P*l*o+T+d+h+i+l+o+s,Y,^,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kQ&O#YR,k)p&P_OPX`ceopx!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s+x,Y,^,`-^-r-t-}.R.X.g.m/O/[/_/b/d/e/n0Z0f0k0r!o#QY!e!x#R#T#`#n$]%R%S%V%^%u%|&S&[&`'X'|(`(l({(}*T*p*z+f+r+},W,u-a.V/q0R0X0[0h$SkO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kQ$m!UQ$n!VQ$s!ZQ$|!`R+p(WQ#yiS'q$e*hQ*e&rQ+X'rS,[)T)UQ-O*gQ-Y*vQ.b,]Q.x-QQ.{-ZQ/j.`Q/u.yR0V/iQ'a$bW*[&m'b'c'dQ+W'qU,x*]*^*_Q-X*vQ-f+XS.u,y,zS.z-Y-ZQ/t.vR/v.{]!mP!o'^*q-^/OreOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!gP!o'^*q-^/OW#b`#e%b&]Q'}$oW(d%O+s.R/dS*U&i*WS*w'e-[S*|'h+OR.X+xh#VY!W!e#n#s%V'|*T*z+f,u-aQ)j%wQ)v&WR,o)y#xnOcopx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0k^!kP!g!o'^*q-^/Ov#TY!W#`#n#s%w&W&[&`'|(`(})y*T+f+r,u.W/hQ#g`Q$b{Q$c|Q$d}W%S!e%V*z-aS%Y!h(vQ%`!iQ&m#pQ&n#qQ&o#rQ(u%ZS(y%^({Q*R&eS*v'e-[R-Z*wU)h%v)f.mR+V'p[!mP!o'^*q-^/OT*}'h+O^!iP!g!o'^*q-^/OQ'd$bQ'l$dQ*_&mQ*d&oV*{'h*|+OQ%[!hR,S(vQ(s%YR,R(u#znO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0kQ%c!kS(l%S(yR(|%`T#e`%bU#c`#e%bR)z&]Q%f!lQ(n%UQ(r%XQ,U(zR.],VrvOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!mP!o'^*q-^/OQ%P!bQ%a!jQ%i!pQ'[$ZQ([$|Q(k%QQ(p%WQ+z(iR.Y+yrtOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!mP!o'^*q-^/OS*V&i*WT*}'h+OQ'c$bS*^&m'dR,z*_Q'b$bQ'g$cU*]&m'c'dQ*a&nS,y*^*_R.v,zQ*u'`R+Q'iQ'k$dS*c&o'lR,}*dQ'j$dU*b&o'k'lS,|*c*dR.w,}rtOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!mP!o'^*q-^/OT*}'h+OQ'f$cS*`&n'gR,{*aQ*x'eR.|-[R-`*yQ&j#mR*Z&lT*V&i*WQ%e!lS(q%X%fR,P(rR)R%dWk%O+s.R/d#{lO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0k$SiO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kU&r#t$g,ZS*g&s._Q-Q*iR.y-RT'o$e'p!_#|m#a$r$z$}&w&z&{'O'P'Q'R'S'W'Z)[)g+S+g+j-T-V-e-v-{.e/Z/a/}0Q!]$Pm#a$r$z$}&w&z&{'O'P'R'S'W'Z)[)g+S+g+j-T-V-e-v-{.e/Z/a/}0Q#{nO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0ka)^%k)],`.g/n0Z0f0kQ)`%kR.k,cQ't$hQ)b%oR,f)cT+Y's+ZsvOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,YruOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,YQ$w!]R$y!^R$p!XrvOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,YR(O$oR$q!XR(V$sT+k(U+lX(f%P(g(k+{R+y(hQ.W+xR/h.XQ(j%PQ+w(gQ+|(kR.Z+{R%Q!bQ(e%OV.P+s.R/dQxOQ#lcW$`x#l)Q,YQ)Q%dR,Y)RrXOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Yn!fP!o#e&]&i'^'e'h*W*q+O+x-[-^/Ol!zX!f#P#_#i$[%Z%_%{&R'n'{)O0r!j#PY!e!x#T#`#n$]%S%V%^%u%|&S&[&`'X'|(`(l({(}*T*p*z+f+r+},W,u-a.V/q0R0X0[0hQ#_`Q#ia#d$[op!Y!_!a#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$l%g%k%v&b&d'_'`'i'm(O(T(t)])f)o*P*l*o+T+h+i+o,^,`-r-t-}.g.m/[/_/b/n0Z0f0kS%Z!h(vS%_!i*{S%{#Y)pQ&R#[S'n$e'pY'{$o%O+s.R/dQ)O%bR0r$YQ!uUR%m!uQ)q&OR,l)q^#RY#`$]'X'|(`*px%R!e!x#n%V%^%|&S&[&`({(}*T*z+f+r,W,u-a.V0R[%t#R%R%u+}0X0hS%u#T%SQ+}(lQ0X/qR0h0[Q*m&{R-U*mQ!oPU%h!o*q/OQ*q'^R/O-^!pbOP`cx![!o#e#l$_$m$n$o$p$q%O%b%d&]&i'^'e'h(U)Q)R*W*q+O+d+l+s+x,Y-[-^.R/O/dY!yX!f#_'{)OT#jb!yQ.n,gR/p.nQ%x#VR)k%xQ&c#fS*O&c.[R.[,QQ(w%[R,T(wQ&^#cR){&^Q,_)WR.d,_Q+O'hR-b+OQ-]*xR.}-]Q*W&iR,v*WQ'p$eR+U'pQ&f#gR*S&fQ.h,aR/m.hQ,d)`R.l,dQ+Z'sR-g+ZQ-k+]R/T-kQ/y/US0^/y0`R0`/{Q+l(UR-x+lQ(g%PS+v(g+{R+{(kQ/f.VR0S/fQ+t(eR.S+t`wOcx#l%d)Q)R,YQ$t![Q']$_Q'y$mQ'z$nQ(Q$pQ(R$qS+k(U+lR-q+d'dsOPXY`acopx!Y![!_!a!e!f!h!i!o!x#P#T#Y#[#_#`#e#i#l#n#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$]$_$e$l$m$n$o$p$q%O%S%V%Z%^%_%b%d%g%u%v%{%|&R&S&[&]&`&b&d&i'X'^'_'`'e'h'i'm'n'p'{'|(O(T(U(`(l(t(v({(})O)Q)R)f)o)p*P*T*W*l*o*p*q*z*{+O+T+d+f+h+i+l+o+r+s+x+},W,Y,^,u-[-^-a-r-t-}.R.V.m/O/[/_/b/d/q0R0X0[0h0ra)_%k)],`.g/n0Z0f0kQ!rTQ$h!QQ$i!SQ$j!TQ%o!{Q%q!}Q'x$kQ)c%pQ)l0oS-i+]+_Q-m+^Q-n+`Q/S-kS/U-m/WQ/{/XR0]/x%uSOT`cdopx!Q!S!T!Y![!_!a!{!}#`#l#o#t#u#v#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$g$k$l$m$n$o$p$q%O%d%j%k%p%v&S&d&s&y'm'v(O(T(U(})Q)R)])f*P*T*i*l*o+T+]+^+_+`+b+d+h+i+l+o+s,W,Y,Z,`,c,u-R-k-m-r-t-}.R._.g.m/W/X/[/_/b/d/n/x0Z0f0k0oQ)a%kQ,a)]S.f,`/nQ/l.gQ0g0ZQ0i0fR0m0krmOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,YS#a`$lQ$WoQ$^pQ$r!YQ$z!_Q$}!aQ&w#uQ&z#wY&{#x$o+h-t/_Q&}#|Q'O#}Q'P$OQ'Q$PQ'R$QQ'S$RQ'T$SQ'U$TQ'V$UQ'W$VQ'Z$Z^)[%k)].g/n0Z0f0kU)g%v)f.mQ*Q&dQ+S'mQ+g(OQ+j(TQ,p*PQ-T*lQ-V*oQ-e+TQ-v+iQ-{+oQ.e,`Q/Z-rQ/a-}Q/}/[R0Q/b#xgO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o,Y,`-r-t-}.g.m/[/_/b/n0Z0f0kW(a%O+s.R/dR)S%drYOcx![#l$_$m$n$p$q%d(U)Q)R+d+l,Y[!eP!o'^*q-^/OW!xX$[%{'{Q#``Q#ne#S$]op!Y!_!a#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$l%k%v&d'm(O(T)])f*P*l*o+T+h+i+o,`-r-t-}.g.m/[/_/b/n0Z0f0kQ%V!gS%^!i*{d%|#Y%g&b'_'`'i(t)o)p,^Q&S#_Q&[#bS&`#e&]Q'X$YQ'|$oW(`%O+s.R/dQ({%_Q(}%bS*T&i*WQ*p0rS*z'h+OQ+f'}Q+r(dQ,W)OQ,u*UQ-a*|S.V+x.XR0R/e&O_OPX`ceopx!Y![!_!a!g!i!o#Y#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$l$m$n$o$p$q%O%_%b%d%g%k%v%{&]&b&d&i'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s+x,Y,^,`-^-r-t-}.R.X.g.m/O/[/_/b/d/e/n0Z0f0k0rQ$e!OQ'r$fR*h&t&ZWOPX`ceopx!O!Y![!_!a!g!i!o#Y#[#_#b#e#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Y$Z$[$_$f$l$m$n$o$p$q%O%_%b%d%g%k%v%{&R&]&b&d&i&t'^'_'`'h'i'm'{'}(O(T(U(d(t)O)Q)R)])f)o)p*P*U*W*l*o*q*{*|+O+T+d+h+i+l+o+s+x,Y,^,`-^-r-t-}.R.X.g.m/O/[/_/b/d/e/n0Z0f0k0rR&P#Y$QjOcopx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kQ#f`Q&O#YQ'Y$YU)W%g'`'iQ)}&bQ*s'_Q,Q(tQ,j)oQ,k)pR.c,^Q)n%}R,i)m$SfO`copx!Y![!_!a#l#u#w#x#|#}$O$P$Q$R$S$T$U$V$Z$_$l$m$n$o$p$q%O%d%k%v&d'm(O(T(U)Q)R)])f*P*l*o+T+d+h+i+l+o+s,Y,`-r-t-}.R.g.m/[/_/b/d/n0Z0f0kT&p#t,ZQ&|#xQ(P$oQ-u+hQ/]-tR0P/_]!nP!o'^*q-^/O#PaOPX`bcx![!f!o!y#_#e#l$_$m$n$o$p$q%O%b%d&]&i'^'e'h'{(U)O)Q)R*W*q+O+d+l+s+x,Y-[-^.R/O/dU#WY!W'|Q%T!eU&k#n#s+fQ(o%VS,s*T*zT.s,u-aj#UY!W!e#n#s%V%w&W)y*T*z,u-aU&V#`&`(}Q)x&[Q+e'|Q+q(`Q-s+fQ.O+rQ/g.WR0U/hQ)i%vQ,g)fR/o.mR,h)f`!jP!o'^'h*q+O-^/OT%W!g*|R%]!hW%U!e%V*z-aQ(z%^R,V({S#d`%bR&a#eQ)X%gT*t'`'iR*y'e[!lP!o'^*q-^/OR%X!gR#h`R,b)]R)a%kT-j+]-kQ/V-mR/z/WR/z/X",nodeNames:"\u26A0 LineComment BlockComment Program ModuleDeclaration MarkerAnnotation Identifier ScopedIdentifier . Annotation ) ( AnnotationArgumentList AssignmentExpression FieldAccess IntegerLiteral FloatingPointLiteral BooleanLiteral CharacterLiteral StringLiteral TextBlock null ClassLiteral void PrimitiveType TypeName ScopedTypeName GenericType TypeArguments AnnotatedType Wildcard extends super , ArrayType ] Dimension [ class this ParenthesizedExpression ObjectCreationExpression new ArgumentList } { ClassBody ; FieldDeclaration Modifiers public protected private abstract static final strictfp default synchronized native transient volatile VariableDeclarator Definition AssignOp ArrayInitializer MethodDeclaration TypeParameters TypeParameter TypeBound FormalParameters ReceiverParameter FormalParameter SpreadParameter Throws throws Block ClassDeclaration Superclass SuperInterfaces implements InterfaceTypeList InterfaceDeclaration interface ExtendsInterfaces InterfaceBody ConstantDeclaration EnumDeclaration enum EnumBody EnumConstant EnumBodyDeclarations AnnotationTypeDeclaration AnnotationTypeBody AnnotationTypeElementDeclaration StaticInitializer ConstructorDeclaration ConstructorBody ExplicitConstructorInvocation ArrayAccess MethodInvocation MethodName MethodReference ArrayCreationExpression Dimension AssignOp BinaryExpression CompareOp CompareOp LogicOp LogicOp BitOp BitOp BitOp ArithOp ArithOp ArithOp BitOp InstanceofExpression instanceof LambdaExpression InferredParameters TernaryExpression LogicOp : UpdateExpression UpdateOp UnaryExpression LogicOp BitOp CastExpression ElementValueArrayInitializer ElementValuePair open module ModuleBody ModuleDirective requires transitive exports to opens uses provides with PackageDeclaration package ImportDeclaration import Asterisk ExpressionStatement LabeledStatement Label IfStatement if else WhileStatement while ForStatement for ForSpec LocalVariableDeclaration var EnhancedForStatement ForSpec AssertStatement assert SwitchStatement switch SwitchBlock SwitchLabel case DoStatement do BreakStatement break ContinueStatement continue ReturnStatement return SynchronizedStatement ThrowStatement throw TryStatement try CatchClause catch CatchFormalParameter CatchType FinallyClause finally TryWithResourcesStatement ResourceSpecification Resource ClassContent",maxTerm:276,nodeProps:[["isolate",-4,1,2,18,19,""],["group",-26,4,47,76,77,82,87,92,145,147,150,151,153,156,158,161,163,165,167,172,174,176,178,180,181,183,191,"Statement",-25,6,13,14,15,16,17,18,19,20,21,22,39,40,41,99,100,102,103,106,118,120,122,125,127,130,"Expression",-7,23,24,25,26,27,29,34,"Type"],["openedBy",10,"(",44,"{"],["closedBy",11,")",45,"}"]],propSources:[n],skippedNodes:[0,1,2],repeatNodeCount:28,tokenData:"#'f_R!_OX%QXY'fYZ)bZ^'f^p%Qpq'fqr*|rs,^st%Qtu4euv5zvw7[wx8rxyAZyzAwz{Be{|CZ|}Dq}!OE_!O!PFx!P!Q! r!Q!R!,h!R![!0`![!]!>p!]!^!@Q!^!_!@n!_!`!BX!`!a!B{!a!b!Di!b!c!EX!c!}!LT!}#O!Mj#O#P%Q#P#Q!NW#Q#R!Nt#R#S4e#S#T%Q#T#o4e#o#p# h#p#q#!U#q#r##n#r#s#$[#s#y%Q#y#z'f#z$f%Q$f$g'f$g#BY4e#BY#BZ#$x#BZ$IS4e$IS$I_#$x$I_$I|4e$I|$JO#$x$JO$JT4e$JT$JU#$x$JU$KV4e$KV$KW#$x$KW&FU4e&FU&FV#$x&FV;'S4e;'S;=`5t<%lO4eS%VV&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QS%qO&YSS%tVOY&ZYZ%lZr&Zrs&ys;'S&Z;'S;=`'`<%lO&ZS&^VOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QS&vP;=`<%l%QS&|UOY&ZYZ%lZr&Zs;'S&Z;'S;=`'`<%lO&ZS'cP;=`<%l&Z_'mk&YS%yZOX%QXY'fYZ)bZ^'f^p%Qpq'fqr%Qrs%qs#y%Q#y#z'f#z$f%Q$f$g'f$g#BY%Q#BY#BZ'f#BZ$IS%Q$IS$I_'f$I_$I|%Q$I|$JO'f$JO$JT%Q$JT$JU'f$JU$KV%Q$KV$KW'f$KW&FU%Q&FU&FV'f&FV;'S%Q;'S;=`&s<%lO%Q_)iY&YS%yZX^*Xpq*X#y#z*X$f$g*X#BY#BZ*X$IS$I_*X$I|$JO*X$JT$JU*X$KV$KW*X&FU&FV*XZ*^Y%yZX^*Xpq*X#y#z*X$f$g*X#BY#BZ*X$IS$I_*X$I|$JO*X$JT$JU*X$KV$KW*X&FU&FV*XV+TX#tP&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`+p!`;'S%Q;'S;=`&s<%lO%QU+wV#_Q&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT,aXOY,|YZ%lZr,|rs3Ys#O,|#O#P2d#P;'S,|;'S;=`3S<%lO,|T-PXOY-lYZ%lZr-lrs.^s#O-l#O#P.x#P;'S-l;'S;=`2|<%lO-lT-qX&YSOY-lYZ%lZr-lrs.^s#O-l#O#P.x#P;'S-l;'S;=`2|<%lO-lT.cVcPOY&ZYZ%lZr&Zrs&ys;'S&Z;'S;=`'`<%lO&ZT.}V&YSOY-lYZ/dZr-lrs1]s;'S-l;'S;=`2|<%lO-lT/iW&YSOY0RZr0Rrs0ns#O0R#O#P0s#P;'S0R;'S;=`1V<%lO0RP0UWOY0RZr0Rrs0ns#O0R#O#P0s#P;'S0R;'S;=`1V<%lO0RP0sOcPP0vTOY0RYZ0RZ;'S0R;'S;=`1V<%lO0RP1YP;=`<%l0RT1`XOY,|YZ%lZr,|rs1{s#O,|#O#P2d#P;'S,|;'S;=`3S<%lO,|T2QUcPOY&ZYZ%lZr&Zs;'S&Z;'S;=`'`<%lO&ZT2gVOY-lYZ/dZr-lrs1]s;'S-l;'S;=`2|<%lO-lT3PP;=`<%l-lT3VP;=`<%l,|T3_VcPOY&ZYZ%lZr&Zrs3ts;'S&Z;'S;=`'`<%lO&ZT3yR&WSXY4SYZ4`pq4SP4VRXY4SYZ4`pq4SP4eO&XP_4lb&YS&PZOY%QYZ%lZr%Qrs%qst%Qtu4eu!Q%Q!Q![4e![!c%Q!c!}4e!}#R%Q#R#S4e#S#T%Q#T#o4e#o$g%Q$g;'S4e;'S;=`5t<%lO4e_5wP;=`<%l4eU6RX#hQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QU6uV#]Q&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QV7cZ&nR&YSOY%QYZ%lZr%Qrs%qsv%Qvw8Uw!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QU8]V#aQ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT8wZ&YSOY9jYZ%lZr9jrs:xsw9jwx%Qx#O9j#O#P<S#P;'S9j;'S;=`AT<%lO9jT9oX&YSOY%QYZ%lZr%Qrs%qsw%Qwx:[x;'S%Q;'S;=`&s<%lO%QT:cVbP&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT:{XOY&ZYZ%lZr&Zrs&ysw&Zwx;hx;'S&Z;'S;=`'`<%lO&ZT;mVbPOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT<XZ&YSOY<zYZ%lZr<zrs=rsw<zwx9jx#O<z#O#P9j#P;'S<z;'S;=`?^<%lO<zT=PZ&YSOY<zYZ%lZr<zrs=rsw<zwx:[x#O<z#O#P%Q#P;'S<z;'S;=`?^<%lO<zT=uZOY>hYZ%lZr>hrs?dsw>hwx;hx#O>h#O#P&Z#P;'S>h;'S;=`@}<%lO>hT>kZOY<zYZ%lZr<zrs=rsw<zwx:[x#O<z#O#P%Q#P;'S<z;'S;=`?^<%lO<zT?aP;=`<%l<zT?gZOY>hYZ%lZr>hrs@Ysw>hwx;hx#O>h#O#P&Z#P;'S>h;'S;=`@}<%lO>hP@]VOY@YZw@Ywx@rx#O@Y#P;'S@Y;'S;=`@w<%lO@YP@wObPP@zP;=`<%l@YTAQP;=`<%l>hTAWP;=`<%l9j_AbVZZ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QVBOVYR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QVBnX$ZP&YS#gQOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QVCbZ#fR&YSOY%QYZ%lZr%Qrs%qs{%Q{|DT|!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QVD[V#rR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QVDxVqR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QVEf[#fR&YSOY%QYZ%lZr%Qrs%qs}%Q}!ODT!O!_%Q!_!`6n!`!aF[!a;'S%Q;'S;=`&s<%lO%QVFcV&xR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_GPZWY&YSOY%QYZ%lZr%Qrs%qs!O%Q!O!PGr!P!Q%Q!Q![IQ![;'S%Q;'S;=`&s<%lO%QVGwX&YSOY%QYZ%lZr%Qrs%qs!O%Q!O!PHd!P;'S%Q;'S;=`&s<%lO%QVHkV&qR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QTIXc&YS`POY%QYZ%lZr%Qrs%qs!Q%Q!Q![IQ![!f%Q!f!gJd!g!hKQ!h!iJd!i#R%Q#R#SNz#S#W%Q#W#XJd#X#YKQ#Y#ZJd#Z;'S%Q;'S;=`&s<%lO%QTJkV&YS`POY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QTKV]&YSOY%QYZ%lZr%Qrs%qs{%Q{|LO|}%Q}!OLO!O!Q%Q!Q![Lp![;'S%Q;'S;=`&s<%lO%QTLTX&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![Lp![;'S%Q;'S;=`&s<%lO%QTLwc&YS`POY%QYZ%lZr%Qrs%qs!Q%Q!Q![Lp![!f%Q!f!gJd!g!h%Q!h!iJd!i#R%Q#R#SNS#S#W%Q#W#XJd#X#Y%Q#Y#ZJd#Z;'S%Q;'S;=`&s<%lO%QTNXZ&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![Lp![#R%Q#R#SNS#S;'S%Q;'S;=`&s<%lO%QT! PZ&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![IQ![#R%Q#R#SNz#S;'S%Q;'S;=`&s<%lO%Q_! y]&YS#gQOY%QYZ%lZr%Qrs%qsz%Qz{!!r{!P%Q!P!Q!)e!Q!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%Q_!!wX&YSOY!!rYZ!#dZr!!rrs!%Psz!!rz{!&_{;'S!!r;'S;=`!'s<%lO!!r_!#iT&YSOz!#xz{!$[{;'S!#x;'S;=`!$y<%lO!#xZ!#{TOz!#xz{!$[{;'S!#x;'S;=`!$y<%lO!#xZ!$_VOz!#xz{!$[{!P!#x!P!Q!$t!Q;'S!#x;'S;=`!$y<%lO!#xZ!$yOQZZ!$|P;=`<%l!#x_!%SXOY!%oYZ!#dZr!%ors!'ysz!%oz{!(i{;'S!%o;'S;=`!)_<%lO!%o_!%rXOY!!rYZ!#dZr!!rrs!%Psz!!rz{!&_{;'S!!r;'S;=`!'s<%lO!!r_!&dZ&YSOY!!rYZ!#dZr!!rrs!%Psz!!rz{!&_{!P!!r!P!Q!'V!Q;'S!!r;'S;=`!'s<%lO!!r_!'^V&YSQZOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_!'vP;=`<%l!!r_!'|XOY!%oYZ!#dZr!%ors!#xsz!%oz{!(i{;'S!%o;'S;=`!)_<%lO!%o_!(lZOY!!rYZ!#dZr!!rrs!%Psz!!rz{!&_{!P!!r!P!Q!'V!Q;'S!!r;'S;=`!'s<%lO!!r_!)bP;=`<%l!%o_!)lV&YSPZOY!)eYZ%lZr!)ers!*Rs;'S!)e;'S;=`!+X<%lO!)e_!*WVPZOY!*mYZ%lZr!*mrs!+_s;'S!*m;'S;=`!,b<%lO!*m_!*rVPZOY!)eYZ%lZr!)ers!*Rs;'S!)e;'S;=`!+X<%lO!)e_!+[P;=`<%l!)e_!+dVPZOY!*mYZ%lZr!*mrs!+ys;'S!*m;'S;=`!,b<%lO!*mZ!,OSPZOY!+yZ;'S!+y;'S;=`!,[<%lO!+yZ!,_P;=`<%l!+y_!,eP;=`<%l!*mT!,ou&YS_POY%QYZ%lZr%Qrs%qs!O%Q!O!P!/S!P!Q%Q!Q![!0`![!d%Q!d!e!3j!e!f%Q!f!gJd!g!hKQ!h!iJd!i!n%Q!n!o!2U!o!q%Q!q!r!5h!r!z%Q!z!{!7`!{#R%Q#R#S!2r#S#U%Q#U#V!3j#V#W%Q#W#XJd#X#YKQ#Y#ZJd#Z#`%Q#`#a!2U#a#c%Q#c#d!5h#d#l%Q#l#m!7`#m;'S%Q;'S;=`&s<%lO%QT!/Za&YS`POY%QYZ%lZr%Qrs%qs!Q%Q!Q![IQ![!f%Q!f!gJd!g!hKQ!h!iJd!i#W%Q#W#XJd#X#YKQ#Y#ZJd#Z;'S%Q;'S;=`&s<%lO%QT!0gi&YS_POY%QYZ%lZr%Qrs%qs!O%Q!O!P!/S!P!Q%Q!Q![!0`![!f%Q!f!gJd!g!hKQ!h!iJd!i!n%Q!n!o!2U!o#R%Q#R#S!2r#S#W%Q#W#XJd#X#YKQ#Y#ZJd#Z#`%Q#`#a!2U#a;'S%Q;'S;=`&s<%lO%QT!2]V&YS_POY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT!2wZ&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!0`![#R%Q#R#S!2r#S;'S%Q;'S;=`&s<%lO%QT!3oY&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q!R!4_!R!S!4_!S;'S%Q;'S;=`&s<%lO%QT!4f`&YS_POY%QYZ%lZr%Qrs%qs!Q%Q!Q!R!4_!R!S!4_!S!n%Q!n!o!2U!o#R%Q#R#S!3j#S#`%Q#`#a!2U#a;'S%Q;'S;=`&s<%lO%QT!5mX&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q!Y!6Y!Y;'S%Q;'S;=`&s<%lO%QT!6a_&YS_POY%QYZ%lZr%Qrs%qs!Q%Q!Q!Y!6Y!Y!n%Q!n!o!2U!o#R%Q#R#S!5h#S#`%Q#`#a!2U#a;'S%Q;'S;=`&s<%lO%QT!7e_&YSOY%QYZ%lZr%Qrs%qs!O%Q!O!P!8d!P!Q%Q!Q![!:r![!c%Q!c!i!:r!i#T%Q#T#Z!:r#Z;'S%Q;'S;=`&s<%lO%QT!8i]&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!9b![!c%Q!c!i!9b!i#T%Q#T#Z!9b#Z;'S%Q;'S;=`&s<%lO%QT!9gc&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!9b![!c%Q!c!i!9b!i!r%Q!r!sKQ!s#R%Q#R#S!8d#S#T%Q#T#Z!9b#Z#d%Q#d#eKQ#e;'S%Q;'S;=`&s<%lO%QT!:yi&YS_POY%QYZ%lZr%Qrs%qs!O%Q!O!P!<h!P!Q%Q!Q![!:r![!c%Q!c!i!:r!i!n%Q!n!o!2U!o!r%Q!r!sKQ!s#R%Q#R#S!=r#S#T%Q#T#Z!:r#Z#`%Q#`#a!2U#a#d%Q#d#eKQ#e;'S%Q;'S;=`&s<%lO%QT!<ma&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!9b![!c%Q!c!i!9b!i!r%Q!r!sKQ!s#T%Q#T#Z!9b#Z#d%Q#d#eKQ#e;'S%Q;'S;=`&s<%lO%QT!=w]&YSOY%QYZ%lZr%Qrs%qs!Q%Q!Q![!:r![!c%Q!c!i!:r!i#T%Q#T#Z!:r#Z;'S%Q;'S;=`&s<%lO%QV!>wX#pR&YSOY%QYZ%lZr%Qrs%qs![%Q![!]!?d!];'S%Q;'S;=`&s<%lO%QV!?kV&vR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QV!@XV!PR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_!@uY&_Z&YSOY%QYZ%lZr%Qrs%qs!^%Q!^!_!Ae!_!`+p!`;'S%Q;'S;=`&s<%lO%QU!AlX#iQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QV!B`X!bR&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`+p!`;'S%Q;'S;=`&s<%lO%QV!CSY&^R&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`+p!`!a!Cr!a;'S%Q;'S;=`&s<%lO%QU!CyY#iQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`!a!Ae!a;'S%Q;'S;=`&s<%lO%Q_!DrV&bX#oQ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_!E`X%}Z&YSOY%QYZ%lZr%Qrs%qs#]%Q#]#^!E{#^;'S%Q;'S;=`&s<%lO%QV!FQX&YSOY%QYZ%lZr%Qrs%qs#b%Q#b#c!Fm#c;'S%Q;'S;=`&s<%lO%QV!FrX&YSOY%QYZ%lZr%Qrs%qs#h%Q#h#i!G_#i;'S%Q;'S;=`&s<%lO%QV!GdX&YSOY%QYZ%lZr%Qrs%qs#X%Q#X#Y!HP#Y;'S%Q;'S;=`&s<%lO%QV!HUX&YSOY%QYZ%lZr%Qrs%qs#f%Q#f#g!Hq#g;'S%Q;'S;=`&s<%lO%QV!HvX&YSOY%QYZ%lZr%Qrs%qs#Y%Q#Y#Z!Ic#Z;'S%Q;'S;=`&s<%lO%QV!IhX&YSOY%QYZ%lZr%Qrs%qs#T%Q#T#U!JT#U;'S%Q;'S;=`&s<%lO%QV!JYX&YSOY%QYZ%lZr%Qrs%qs#V%Q#V#W!Ju#W;'S%Q;'S;=`&s<%lO%QV!JzX&YSOY%QYZ%lZr%Qrs%qs#X%Q#X#Y!Kg#Y;'S%Q;'S;=`&s<%lO%QV!KnV&tR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_!L[b&RZ&YSOY%QYZ%lZr%Qrs%qst%Qtu!LTu!Q%Q!Q![!LT![!c%Q!c!}!LT!}#R%Q#R#S!LT#S#T%Q#T#o!LT#o$g%Q$g;'S!LT;'S;=`!Md<%lO!LT_!MgP;=`<%l!LT_!MqVuZ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QV!N_VsR&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QU!N{X#eQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`;'S%Q;'S;=`&s<%lO%QV# oV}R&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_#!_Z'OX#dQ&YSOY%QYZ%lZr%Qrs%qs!_%Q!_!`6n!`#p%Q#p#q##Q#q;'S%Q;'S;=`&s<%lO%QU##XV#bQ&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QV##uV|R&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%QT#$cV#uP&YSOY%QYZ%lZr%Qrs%qs;'S%Q;'S;=`&s<%lO%Q_#%Ru&YS%yZ&PZOX%QXY'fYZ)bZ^'f^p%Qpq'fqr%Qrs%qst%Qtu4eu!Q%Q!Q![4e![!c%Q!c!}4e!}#R%Q#R#S4e#S#T%Q#T#o4e#o#y%Q#y#z'f#z$f%Q$f$g'f$g#BY4e#BY#BZ#$x#BZ$IS4e$IS$I_#$x$I_$I|4e$I|$JO#$x$JO$JT4e$JT$JU#$x$JU$KV4e$KV$KW#$x$KW&FU4e&FU&FV#$x&FV;'S4e;'S;=`5t<%lO4e",tokenizers:[0,1,2,3],topRules:{Program:[0,3],ClassContent:[1,194]},dynamicPrecedences:{27:1,232:-1,243:-1},specialized:[{term:231,get:Q=>_[Q]||-1}],tokenPrec:7144}),i=S.define({name:"java",parser:d.configure({props:[s.add({IfStatement:$({except:/^\s*({|else\b)/}),TryStatement:$({except:/^\s*({|catch|finally)\b/}),LabeledStatement:t,SwitchBlock:Q=>{let P=Q.textAfter,a=/^\s*\}/.test(P),r=/^\s*(case|default)\b/.test(P);return Q.baseIndent+(a?0:r?1:2)*Q.unit},Block:Z({closing:"}"}),BlockComment:()=>null,Statement:$({except:/^{/})}),e.add({"Block SwitchBlock ClassBody ElementValueArrayInitializer ModuleBody EnumBody ConstructorBody InterfaceBody ArrayInitializer":X,BlockComment(Q){return{from:Q.from+2,to:Q.to-2}}})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/}});function R(){return new o(i)}export{i as n,R as t};
import"./dist-DBwNzi3C.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import{n as p,t as o}from"./dist-OM63llNV.js";export{o as php,p as phpLanguage};
import"./dist-DBwNzi3C.js";import{n as s,r as a,t as n}from"./dist-CldbmzwA.js";export{n as json,s as jsonLanguage,a as jsonParseLinter};

Sorry, the diff of this file is too big to display

import"./dist-DBwNzi3C.js";import{i as s,n as a,r as o,t as e}from"./dist-BIKFl48f.js";export{e as css,a as cssCompletionSource,o as cssLanguage,s as defineCSSCompletionSource};
import"./dist-DBwNzi3C.js";import{n as p,t as a}from"./dist-C9XNJlLJ.js";export{a as cpp,p as cppLanguage};
import{$ as x,D as q,H as j,J as r,N as G,T as R,Y as E,g as T,i as U,n as c,q as Z,r as C,s as V,u as _}from"./dist-DBwNzi3C.js";var W=122,g=1,F=123,N=124,$=2,I=125,D=3,B=4,y=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],K=58,J=40,P=95,A=91,p=45,L=46,H=35,M=37,ee=38,Oe=92,ae=10,te=42;function d(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function m(e){return e>=48&&e<=57}function b(e){return m(e)||e>=97&&e<=102||e>=65&&e<=70}var f=(e,t,l)=>(O,a)=>{for(let o=!1,i=0,Q=0;;Q++){let{next:n}=O;if(d(n)||n==p||n==P||o&&m(n))!o&&(n!=p||Q>0)&&(o=!0),i===Q&&n==p&&i++,O.advance();else if(n==Oe&&O.peek(1)!=ae){if(O.advance(),b(O.next)){do O.advance();while(b(O.next));O.next==32&&O.advance()}else O.next>-1&&O.advance();o=!0}else{o&&O.acceptToken(i==2&&a.canShift($)?t:n==J?l:e);break}}},re=new c(f(F,$,N)),le=new c(f(I,D,B)),oe=new c(e=>{if(y.includes(e.peek(-1))){let{next:t}=e;(d(t)||t==P||t==H||t==L||t==te||t==A||t==K&&d(e.peek(1))||t==p||t==ee)&&e.acceptToken(W)}}),ie=new c(e=>{if(!y.includes(e.peek(-1))){let{next:t}=e;if(t==M&&(e.advance(),e.acceptToken(g)),d(t)){do e.advance();while(d(e.next)||m(e.next));e.acceptToken(g)}}}),Qe=Z({"AtKeyword import charset namespace keyframes media supports":r.definitionKeyword,"from to selector":r.keyword,NamespaceName:r.namespace,KeyframeName:r.labelName,KeyframeRangeName:r.operatorKeyword,TagName:r.tagName,ClassName:r.className,PseudoClassName:r.constant(r.className),IdName:r.labelName,"FeatureName PropertyName":r.propertyName,AttributeName:r.attributeName,NumberLiteral:r.number,KeywordQuery:r.keyword,UnaryQueryOp:r.operatorKeyword,"CallTag ValueName":r.atom,VariableName:r.variableName,Callee:r.operatorKeyword,Unit:r.unit,"UniversalSelector NestingSelector":r.definitionOperator,"MatchOp CompareOp":r.compareOperator,"ChildOp SiblingOp, LogicOp":r.logicOperator,BinOp:r.arithmeticOperator,Important:r.modifier,Comment:r.blockComment,ColorLiteral:r.color,"ParenthesizedContent StringLiteral":r.string,":":r.punctuation,"PseudoOp #":r.derefOperator,"; ,":r.separator,"( )":r.paren,"[ ]":r.squareBracket,"{ }":r.brace}),ne={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},se={__proto__:null,or:98,and:98,not:106,only:106,layer:170},de={__proto__:null,selector:112,layer:166},ce={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},pe={__proto__:null,to:207},me=C.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"\u26A0 Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[Qe],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[oe,ie,re,le,1,2,3,4,new U("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:e=>ne[e]||-1},{term:125,get:e=>se[e]||-1},{term:4,get:e=>de[e]||-1},{term:25,get:e=>ce[e]||-1},{term:123,get:e=>pe[e]||-1}],tokenPrec:1963}),u=null;function S(){if(!u&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],l=new Set;for(let O in e)O!="cssText"&&O!="cssFloat"&&typeof e[O]=="string"&&(/[A-Z]/.test(O)&&(O=O.replace(/[A-Z]/g,a=>"-"+a.toLowerCase())),l.has(O)||(t.push(O),l.add(O)));u=t.sort().map(O=>({type:"property",label:O,apply:O+": "}))}return u||[]}var X="active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where".split(".").map(e=>({type:"class",label:e})),k="above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small".split(".").map(e=>({type:"keyword",label:e})).concat("aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen".split(".").map(e=>({type:"constant",label:e}))),ue="a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul".split(".").map(e=>({type:"type",label:e})),Se=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),s=/^(\w[\w-]*|-\w[\w-]*|)$/,he=/^-(-[\w-]*)?$/;function ge(e,t){var O;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let l=(O=e.parent)==null?void 0:O.firstChild;return(l==null?void 0:l.name)=="Callee"?t.sliceString(l.from,l.to)=="var":!1}var z=new x,$e=["Declaration"];function ye(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function v(e,t,l){if(t.to-t.from>4096){let O=z.get(t);if(O)return O;let a=[],o=new Set,i=t.cursor(E.IncludeAnonymous);if(i.firstChild())do for(let Q of v(e,i.node,l))o.has(Q.label)||(o.add(Q.label),a.push(Q));while(i.nextSibling());return z.set(t,a),a}else{let O=[],a=new Set;return t.cursor().iterate(o=>{var i;if(l(o)&&o.matchContext($e)&&((i=o.node.nextSibling)==null?void 0:i.name)==":"){let Q=e.sliceString(o.from,o.to);a.has(Q)||(a.add(Q),O.push({label:Q,type:"variable"}))}}),O}}var w=e=>t=>{let{state:l,pos:O}=t,a=j(l).resolveInner(O,-1),o=a.type.isError&&a.from==a.to-1&&l.doc.sliceString(a.from,a.to)=="-";if(a.name=="PropertyName"||(o||a.name=="TagName")&&/^(Block|Styles)$/.test(a.resolve(a.to).name))return{from:a.from,options:S(),validFor:s};if(a.name=="ValueName")return{from:a.from,options:k,validFor:s};if(a.name=="PseudoClassName")return{from:a.from,options:X,validFor:s};if(e(a)||(t.explicit||o)&&ge(a,l.doc))return{from:e(a)||o?a.from:O,options:v(l.doc,ye(a),e),validFor:he};if(a.name=="TagName"){for(let{parent:n}=a;n;n=n.parent)if(n.name=="Block")return{from:a.from,options:S(),validFor:s};return{from:a.from,options:ue,validFor:s}}if(a.name=="AtKeyword")return{from:a.from,options:Se,validFor:s};if(!t.explicit)return null;let i=a.resolve(O),Q=i.childBefore(O);return Q&&Q.name==":"&&i.name=="PseudoClassSelector"?{from:O,options:X,validFor:s}:Q&&Q.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:O,options:k,validFor:s}:i.name=="Block"||i.name=="Styles"?{from:O,options:S(),validFor:s}:null},Y=w(e=>e.name=="VariableName"),h=V.define({name:"css",parser:me.configure({props:[G.add({Declaration:T()}),q.add({"Block KeyframeList":R})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Pe(){return new _(h,h.data.of({autocomplete:Y}))}export{w as i,Y as n,h as r,Pe as t};

Sorry, the diff of this file is too big to display

import"./dist-DBwNzi3C.js";import{a,i as t,n as o,o as s,r as m,t as i}from"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";export{i as autoCloseTags,o as html,m as htmlCompletionSource,t as htmlCompletionSourceWith,a as htmlLanguage,s as htmlPlain};
import{D as i,J as O,N as $,T as y,g as X,n as S,q as P,r as m,s as n,u as c}from"./dist-DBwNzi3C.js";import{i as f}from"./dist-BIKFl48f.js";var p=110,r=1,s=2,t=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function e(T){return T>=65&&T<=90||T>=97&&T<=122||T>=161}function W(T){return T>=48&&T<=57}var Z=new S((T,Q)=>{if(T.next==40){let a=T.peek(-1);(e(a)||W(a)||a==95||a==45)&&T.acceptToken(s,1)}}),w=new S(T=>{if(t.indexOf(T.peek(-1))>-1){let{next:Q}=T;(e(Q)||Q==95||Q==35||Q==46||Q==91||Q==58||Q==45)&&T.acceptToken(p)}}),h=new S(T=>{if(t.indexOf(T.peek(-1))<0){let{next:Q}=T;if(Q==37&&(T.advance(),T.acceptToken(r)),e(Q)){do T.advance();while(e(T.next));T.acceptToken(r)}}}),d=P({"import charset namespace keyframes media supports when":O.definitionKeyword,"from to selector":O.keyword,NamespaceName:O.namespace,KeyframeName:O.labelName,TagName:O.tagName,ClassName:O.className,PseudoClassName:O.constant(O.className),IdName:O.labelName,"FeatureName PropertyName PropertyVariable":O.propertyName,AttributeName:O.attributeName,NumberLiteral:O.number,KeywordQuery:O.keyword,UnaryQueryOp:O.operatorKeyword,"CallTag ValueName":O.atom,VariableName:O.variableName,"AtKeyword Interpolation":O.special(O.variableName),Callee:O.operatorKeyword,Unit:O.unit,"UniversalSelector NestingSelector":O.definitionOperator,MatchOp:O.compareOperator,"ChildOp SiblingOp, LogicOp":O.logicOperator,BinOp:O.arithmeticOperator,Important:O.modifier,"Comment LineComment":O.blockComment,ColorLiteral:O.color,"ParenthesizedContent StringLiteral":O.string,Escape:O.special(O.string),": ...":O.punctuation,"PseudoOp #":O.derefOperator,"; ,":O.separator,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),z={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},u={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":160,"@keyframes":166,"@supports":178},U=m.deserialize({version:14,states:"@^O!gQWOOO!nQaO'#CeOOQP'#Cd'#CdO$RQWO'#CgO$xQaO'#EaO%cQWO'#CiO%kQWO'#DZO%pQWO'#D^O%uQaO'#DfOOQP'#Es'#EsO'YQWO'#DlO'yQWO'#DyO(QQWO'#D{O(xQWO'#D}O)TQWO'#EQO'bQWO'#EWO)YQ`O'#FTO)]Q`O'#FTO)hQ`O'#FTO)vQWO'#EYOOQO'#Er'#ErOOQO'#FV'#FVOOQO'#Ec'#EcO){QWO'#EqO*WQWO'#EqQOQWOOOOQP'#Ch'#ChOOQP,59R,59RO$RQWO,59RO*bQWO'#EdO+PQWO,58|O+_QWO,59TO%kQWO,59uO%pQWO,59xO*bQWO,59{O*bQWO,59}OOQO'#De'#DeO*bQWO,5:OO,bQpO'#E}O,iQWO'#DkOOQO,58|,58|O(QQWO,58|O,pQWO,5:{OOQO,5:{,5:{OOQT'#Cl'#ClO-UQeO,59TO.cQ[O,59TOOQP'#D]'#D]OOQP,59u,59uOOQO'#D_'#D_O.hQpO,59xOOQO'#EZ'#EZO.pQ`O,5;oOOQO,5;o,5;oO/OQWO,5:WO/VQWO,5:WOOQS'#Dn'#DnO/rQWO'#DsO/yQ!fO'#FRO0eQWO'#DtOOQS'#FS'#FSO+YQWO,5:eO'bQWO'#DrOOQS'#Cu'#CuO(QQWO'#CwO0jQ!hO'#CyO2^Q!fO,5:gO2oQWO'#DWOOQS'#Ex'#ExO(QQWO'#DQOOQO'#EP'#EPO2tQWO,5:iO2yQWO,5:iOOQO'#ES'#ESO3RQWO,5:lO3WQ!fO,5:rO3iQ`O'#EkO.pQ`O,5;oOOQO,5:|,5:|O3zQWO,5:tOOQO,5:},5:}O4XQWO,5;]OOQO-E8a-E8aOOQP1G.m1G.mOOQP'#Ce'#CeO5RQaO,5;OOOQP'#Df'#DfOOQO-E8b-E8bOOQO1G.h1G.hO(QQWO1G.hO5fQWO1G.hO5nQeO1G.oO.cQ[O1G.oOOQP1G/a1G/aO6{QpO1G/dO7fQaO1G/gO8cQaO1G/iO9`QaO1G/jO:]Q!fO'#FOO:yQ!fO'#ExOOQO'#FO'#FOOOQO,5;i,5;iO<^QWO,5;iO<iQWO,5:VO<nQ!fO1G.hOOQO1G0g1G0gO=PQWO'#CnOOQP1G.o1G.oO=WQWO'#CqOOQP1G/d1G/dO(QQWO1G/dO=_Q`O1G1ZOOQO1G1Z1G1ZO=mQWO1G/rO=rQ!fO'#FQO>WQWO1G/rO>]Q!fO'#DnO>qQWO,5:ZO>vQ!fO,5:_OOQO'#DP'#DPO'bQWO,5:]O?XQWO'#DwOOQS,5:b,5:bO?`QWO,5:dO'bQWO'#EiO?gQWO,5;mO*bQWO,5:`OOQO1G0P1G0PO?uQ!fO,5:^O@aQ!fO,59cOOQS,59e,59eO(QQWO,59iOOQS,59n,59nO@rQWO,59pOOQO1G0R1G0RO@yQ#tO,59rOARQ!fO,59lOOQO1G0T1G0TOBrQWO1G0TOBwQWO'#ETOOQO1G0W1G0WOOQO1G0^1G0^OOQO,5;V,5;VOOQO-E8i-E8iOCVQ!fO1G0bOCvQWO1G0`O%kQWO'#E_O$RQWO'#E`OEZQWO'#E^OOQO1G0b1G0bPEkQWO'#EcO<nQ!fO7+$SOOQO7+$S7+$SO(QQWO7+$SOOQP7+$Z7+$ZOOQP7+%O7+%OO(QQWO7+%OOEpQ!fO'#EeOF}QWO,5;jO(QQWO,5;jOOQO,5;j,5;jO+gQpO'#EgOG[QWO1G1TOOQO1G1T1G1TOOQO1G/q1G/qOGgQaO'#EvOGnQWO,59YOGsQWO'#EwOG}QWO,59]OHSQ!fO7+%OOOQO7+&u7+&uOOQO7+%^7+%^O(QQWO'#EhOHeQWO,5;lOHmQWO7+%^O(QQWO1G/uOOQS1G/y1G/yOOQS1G/w1G/wOHrQWO,5:cOHwQ!fO1G0OOOQS1G0O1G0OOIYQ!fO,5;TOOQO-E8g-E8gOItQaO1G/zOOQS1G.}1G.}OOQS1G/T1G/TOI{Q!fO1G/[OOQS1G/[1G/[OJ^QWO1G/^OOQO7+%o7+%oOJcQYO'#CyO+YQWO'#EjOJkQWO,5:oOOQO,5:o,5:oOJyQ!fO'#ElO(QQWO'#ElOL^QWO7+%|OOQO7+%|7+%|OOQO7+%z7+%zOOQO,5:y,5:yOOQO,5:z,5:zOLqQaO,5:xOOQO,5:x,5:xOOQO<<Gn<<GnO<nQ!fO<<GnOMRQ!fO<<HjOOQO-E8c-E8cOMdQWO1G1UOOQO,5;R,5;ROOQO-E8e-E8eOOQO7+&o7+&oOMqQWO,5;bOOQP1G.t1G.tO(QQWO'#EfOMyQWO,5;cOOQT1G.w1G.wOOQP<<Hj<<HjONRQ!fO,5;SOOQO-E8f-E8fO/OQWO<<HxONgQWO7+%aOOQS1G/}1G/}OOQS7+%j7+%jOOQS7+%f7+%fOOQS7+$v7+$vOOQS7+$x7+$xOOQO,5;U,5;UOOQO-E8h-E8hOOQO1G0Z1G0ZONnQ!fO,5;WOOQO-E8j-E8jOOQO<<Ih<<IhOOQO1G0d1G0dOOQOAN=YAN=YOOQPAN>UAN>UO!!RQWO,5;QOOQO-E8d-E8dO!!]QWOAN>dOOQS<<H{<<H{OOQOG24OG24O",stateData:"!!n~O#dOSROSSOS~OVXOYXO^TO_TOfaOgbOoaOpWOyVO!OUO!aYO!nZO!p[O!r]O!u^O!{_O#hPO#iRO~O#a#eP~P]O^XX^!}X_XXcXXjXXp!}XyXX!OXX!UXX!ZXX![XX!^XX#PXX#aXX#bXX#iXX#oXX#pXX#p!}X#x!}X!]XX~O#hjO~O^oO_oOcmOyqO!OpO!UrO#bsO#ilO#otO#ptO~OjvO![yO!^wO#P{O!Z#TX#a#TX!]#TX~P$WOd!OO#h|O~O#h!PO~O#h!RO~O#h!TO#p!VO#x!VO^!YX^#wX_!YXc!YXj!YXy!YX!O!YX!U!YX!Z!YX![!YX!^!YX#P!YX#a!YX#b!YX#i!YX#o!YX#p!YX!]!YX~Oj!XOn!WO~Og!^Oj!ZOo!^Op!^Ou!`O!i!]O#h!YO~O!^#uP~P'bOf!fOg!fOh!fOj!bOl!fOn!fOo!fOp!fOu!gO{!eO#h!aO#m!cO~On!iO{!eO#h!hO~O#h!kO~Op!nO#p!VO#x!VO^#wX~OjvO#p!VO#x!VO^#wX~O^!qO~O!Z!rO#a#eX!]#eX~O#a#eX!]#eX~P]OVXOYXO^TO_TOp!xOyVO!OUO#h!vO#iRO~OcmOjvO![!{O!^wO~Od#OO#h|O~Of!fOg#VOh!fOj!bOl!fOn!fOo!fOp!fOu!gO{!eO#h!aO#m!cO#s#WO~Oa#XO~P+gO!]#eP~P]O![!{O!^wO#P#]O!Z#Ta#a#Ta!]#Ta~OQ#^O^]a_]ac]aj]ay]a!O]a!U]a!Z]a![]a!^]a#P]a#a]a#b]a#i]a#o]a#p]a!]]aa]a~OQ#`O~Ow#aO!S#bO~Op!nO#p#dO#x#dO^#wa~O!Z#uP~P'bOa#tP~P(QOg!^Oj!ZOo!^Op!^Ou!`O!i!]O~O#h#hO~P/^OQ#mOc#pOr#lOy#oO#n#kO!^#uX!Z#uXa#uX~Oj#rO~OP#vOQmXrmXymX!ZmX#nmX^mXamXcmXfmXgmXhmXjmXlmXnmXomXpmXumX{mX#hmX#mmX!^mX#PmX#amXwmX!]mX~OQ#`Or#wOy#yO!Z#zO#n#kO~Oj#{O~O!Z#}O~On$OO{!eO~O!^$PO~OQ#mOr#lOy#oO!^wO#n#kO~O#h!TO^#_Xp#_X#p#_X#x#_X~O!O$WO!^wO#i$XO~P(QO!Z!rO#a#ea!]#ea~O^oO_oOyqO!OpO!UrO#bsO#ilO#otO#ptO~Oc#Waj#Wa![#Wa!^#Waa#Wa~P4dO![$_O!^wO~OQ#^O^]i_]ic]ij]iy]i!O]i!U]i!Z]i![]i!^]i#P]i#a]i#b]i#i]i#o]i#p]i!]]ia]i~Ow$aO!S$bO~O^oO_oOyqO!OpO#ilO~Oc!Tij!Ti!U!Ti!Z!Ti![!Ti!^!Ti#P!Ti#a!Ti#b!Ti#o!Ti#p!Ti!]!Tia!Ti~P7TOc!Vij!Vi!U!Vi!Z!Vi![!Vi!^!Vi#P!Vi#a!Vi#b!Vi#o!Vi#p!Vi!]!Via!Vi~P7TOc!Wij!Wi!U!Wi!Z!Wi![!Wi!^!Wi#P!Wi#a!Wi#b!Wi#o!Wi#p!Wi!]!Wia!Wi~P7TOQ#`O^$eOr#wOy#yO#n#kOa#rXc#rX!Z#rX~P(QO#s$fOQ#lX^#lXa#lXc#lXf#lXg#lXh#lXj#lXl#lXn#lXo#lXp#lXr#lXu#lXy#lX{#lX!Z#lX#h#lX#m#lX#n#lX~Oa$iOc$gO!Z$gO~O!]$jO~OQ#`Or#wOy#yO!^wO#n#kO~Oa#jP~P*bOa#kP~P(QOp!nO#p$pO#x$pO^#wi~O!Z$qO~OQ#`Oc$rOr#wOy#yO#n#kOa#tX~Oa$tO~OQ!bX^!dXa!bXr!bXy!bX#n!bX~O^$uO~OQ#mOa$vOr#lOy#oO#n#kO~Oa#uP~P'bOw$zO~P(QOc#pO!^#ua!Z#uaa#ua~OQ#mOr#lOy#oO#n#kOc!fa!^!fa!Z!faa!fa~OQ#`Oa%OOr#wOy#yO#n#kO~Ow%RO~P(QOn%SO|%SO~OQ#`Or#wOy#yO#n#kO!Zta^taatactaftagtahtajtaltantaotaptauta{ta#hta#mta!^ta#Pta#atawta!]ta~O!Z%TO~O!]%XO!x%VO!y%VO#m%UO~OQ#`Oc%ZOr#wOy#yO#P%]O#n#kO!Z#Oi#a#Oi!]#Oi~P(QO!Z%^OV!|iY!|i^!|i_!|if!|ig!|io!|ip!|iy!|i!O!|i!a!|i!n!|i!p!|i!r!|i!u!|i!{!|i#a!|i#h!|i#i!|i!]!|i~OjvO!Z#QX#a#QX!]#QX~P*bO!Z!rO~OQ#`Or#wOy#yO#n#kOa#XXc#XXf#XXg#XXh#XXj#XXl#XXn#XXo#XXp#XXu#XX{#XX!Z#XX#h#XX#m#XX~Oa#rac#ra!Z#ra~P(QOa%jOc$gO!Z$gO~Oa#jX~P$WOa%lO~Oc%mOa#kX~P(QOa%oO~OQ#`Or#wOw%pOy#yO#n#kO~Oc$rOa#ta~On%sO~Oa%uO~OQ#`Or#wOw%vOy#yO#n#kO~OQ#mOr#lOy#oO#n#kOc#]a!^#]a!Z#]aa#]a~Oa%wO~P4dOQ#`Or#wOw%xOy#yO#n#kO~Oa%yO~OP#vO!^mX~O!]%|O!x%VO!y%VO#m%UO~OQ#`Or#wOy#yO#n#kOc#`Xf#`Xg#`Xh#`Xj#`Xl#`Xn#`Xo#`Xp#`Xu#`X{#`X!Z#`X#P#`X#a#`X#h#`X#m#`X!]#`X~Oc%ZO#P&PO!Z#Oq#a#Oq!]#Oq~P(QOjvO!Z#Qa#a#Qa!]#Qa~P4dOQ#`Or#wOw&SOy#yO#n#kO~Oa#ric#ri!Z#ri~P(QOcmOa#ja~Oc%mOa#ka~OQ#`Or#wOy#yO#n#kOa#[ac#[a~Oa&WO~P(QOQ#`Or#wOy#yO#n#kOc#`af#`ag#`ah#`aj#`al#`an#`ao#`ap#`au#`a{#`a!Z#`a#P#`a#a#`a#h#`a#m#`a!]#`a~Oa#Yac#Ya~P(QO!Z&XO~Of#dpg#m|#iRSRr~",goto:"0^#zPPPPPP#{P$Q$^P$Q$j$QPP$sP$yPP%PPPP%jP%jP&ZPPP%jP'O%jP%jP%jP'jPP$QP(a$Q(jP$QP$Q$Q(p$QPPPP(w#{P)f)f)q)f)f)f)fP)f)t)f#{P#{P#{P){#{P*O*RPP#{P#{*U*aP*f*i*i*a*a*l*s*}+e+k+q+w+},T,_PPPP,e,k,pPP-[-_-bPPPP.u/UP/[/_/k0QP0VVdOhweXOhmrsuw#^#r$YeQOhmrsuw#^#r$YQkRQ!ulR%`$XQ}TR!}oQ#_}R$`!}Q#_!Or#x!d#U#[#f#u#|$U$]$c$o$y%Q%Y%d%e%q%}R$`#O!]!f[vy!X!b!g!q!{#U#`#b#o#w#y$U$_$b$d$e$g$m$r$u%Z%[%g%m%t&T![!f[vy!X!b!g!q!{#U#`#b#o#w#y$U$_$b$d$e$g$m$r$u%Z%[%g%m%t&TT%V$P%WY#l![!m#j#t${s#w!d#U#[#f#u#|$U$]$c$o$y%Q%Y%d%e%q%}![!f[vy!X!b!g!q!{#U#`#b#o#w#y$U$_$b$d$e$g$m$r$u%Z%[%g%m%t&TQ!i]R$O!jQ!QUQ#PpR%_$WQ!SVR#QqZuS!w$k$}%aQxSS!znzQ#s!_Q$R!mQ$V!qS$^!|#[Q%c$]Q%z%VR&R%dc!^Z_!W!Z!`#l#m#p%sR#i!ZZ#n![!m#j#t${R!j]R!l^R$Q!lU`OhwQ!UWR$S!nVeOhwR$Z!qR$Y!qShOwR!thQnSS!yn%kR%k$kQ$d#UQ$m#`Y%f$d$m%g%t&TQ%g$eQ%t$uR&T%mQ%n$mR&U%nQ$h#YR%i$hQ$s#fR%r$sQ#q![R$|#qQ%W$PR%{%WQ!o`Q#c!UT$T!o#cQ%[$UR&O%[QiOR#ZwVfOhwUSOhwQ!wmQ#RrQ#SsQ#TuQ$k#^Q$}#rR%a$YR$l#^R$n#`Q!d[S#Uv$gQ#[yQ#f!XQ#u!bQ#|!gQ$U!qQ$]!{d$c#U#`$d$e$m$u%g%m%t&TQ$o#bQ$y#oQ%P#wQ%Q#yS%Y$U%[Q%d$_Q%e$bQ%q$rR%}%ZQzSQ!pbQ!|nQ%b$YR&Q%aQ#YvR%h$gR#g!XQ!_ZQ#e!WQ$x#mR&V%sW![Z!W#m%sQ!m_Q#j!ZQ#t!`Q$w#lR${#pVcOhwSgOwR!sh",nodeNames:"\u26A0 Unit ( Comment LineComment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName ) ArgList , PseudoClassName ArgList VariableName AtKeyword PropertyVariable ValueName ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral Escape Interpolation BinaryExpression BinOp LogicOp UnaryExpression UnaryQueryOp CallExpression ] SubscriptExpression [ CallLiteral CallTag ParenthesizedContent IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp InterpolatedSelector ; when } { Block ImportStatement import KeywordQuery FeatureQuery FeatureName BinaryQuery UnaryQuery ParenthesizedQuery SelectorQuery selector CallQuery ArgList SubscriptQuery MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports DetachedRuleSet PropertyName Declaration Important Inclusion IdSelector ClassSelector Inclusion CallExpression",maxTerm:133,nodeProps:[["isolate",-3,3,4,30,""],["openedBy",17,"(",59,"{"],["closedBy",26,")",60,"}"]],propSources:[d],skippedNodes:[0,3,4],repeatNodeCount:10,tokenData:"!2q~R!ZOX$tX^%l^p$tpq%lqr)Ors-xst/ltu6Zuv$tvw8^wx:Uxy;syz<Uz{<Z{|<t|}BQ}!OBc!O!PDo!P!QFY!Q![Jw![!]Kr!]!^Ln!^!_MP!_!`M{!`!aNl!a!b$t!b!c! m!c!}!&R!}#O!'y#O#P$t#P#Q!([#Q#R!(m#R#T$t#T#o!&R#o#p!)S#p#q!(m#q#r!)e#r#s!)v#s#y$t#y#z%l#z$f$t$f$g%l$g#BY$t#BY#BZ%l#BZ$IS$t$IS$I_%l$I_$I|$t$I|$JO%l$JO$JT$t$JT$JU%l$JU$KV$t$KV$KW%l$KW&FU$t&FU&FV%l&FV;'S$t;'S;=`!2k<%lO$t`$wSOy%Tz;'S%T;'S;=`%f<%lO%T`%YS|`Oy%Tz;'S%T;'S;=`%f<%lO%T`%iP;=`<%l%T~%qh#d~OX%TX^']^p%Tpq']qy%Tz#y%T#y#z']#z$f%T$f$g']$g#BY%T#BY#BZ']#BZ$IS%T$IS$I_']$I_$I|%T$I|$JO']$JO$JT%T$JT$JU']$JU$KV%T$KV$KW']$KW&FU%T&FU&FV']&FV;'S%T;'S;=`%f<%lO%T~'dh#d~|`OX%TX^']^p%Tpq']qy%Tz#y%T#y#z']#z$f%T$f$g']$g#BY%T#BY#BZ']#BZ$IS%T$IS$I_']$I_$I|%T$I|$JO']$JO$JT%T$JT$JU']$JU$KV%T$KV$KW']$KW&FU%T&FU&FV']&FV;'S%T;'S;=`%f<%lO%Tk)RUOy%Tz#]%T#]#^)e#^;'S%T;'S;=`%f<%lO%Tk)jU|`Oy%Tz#a%T#a#b)|#b;'S%T;'S;=`%f<%lO%Tk*RU|`Oy%Tz#d%T#d#e*e#e;'S%T;'S;=`%f<%lO%Tk*jU|`Oy%Tz#c%T#c#d*|#d;'S%T;'S;=`%f<%lO%Tk+RU|`Oy%Tz#f%T#f#g+e#g;'S%T;'S;=`%f<%lO%Tk+jU|`Oy%Tz#h%T#h#i+|#i;'S%T;'S;=`%f<%lO%Tk,RU|`Oy%Tz#T%T#T#U,e#U;'S%T;'S;=`%f<%lO%Tk,jU|`Oy%Tz#b%T#b#c,|#c;'S%T;'S;=`%f<%lO%Tk-RU|`Oy%Tz#h%T#h#i-e#i;'S%T;'S;=`%f<%lO%Tk-lS#PZ|`Oy%Tz;'S%T;'S;=`%f<%lO%T~-{WOY-xZr-xrs.es#O-x#O#P.j#P;'S-x;'S;=`/f<%lO-x~.jOn~~.mRO;'S-x;'S;=`.v;=`O-x~.yXOY-xZr-xrs.es#O-x#O#P.j#P;'S-x;'S;=`/f;=`<%l-x<%lO-x~/iP;=`<%l-xo/qY!OROy%Tz!Q%T!Q![0a![!c%T!c!i0a!i#T%T#T#Z0a#Z;'S%T;'S;=`%f<%lO%Tm0fY|`Oy%Tz!Q%T!Q![1U![!c%T!c!i1U!i#T%T#T#Z1U#Z;'S%T;'S;=`%f<%lO%Tm1ZY|`Oy%Tz!Q%T!Q![1y![!c%T!c!i1y!i#T%T#T#Z1y#Z;'S%T;'S;=`%f<%lO%Tm2QYl]|`Oy%Tz!Q%T!Q![2p![!c%T!c!i2p!i#T%T#T#Z2p#Z;'S%T;'S;=`%f<%lO%Tm2wYl]|`Oy%Tz!Q%T!Q![3g![!c%T!c!i3g!i#T%T#T#Z3g#Z;'S%T;'S;=`%f<%lO%Tm3lY|`Oy%Tz!Q%T!Q![4[![!c%T!c!i4[!i#T%T#T#Z4[#Z;'S%T;'S;=`%f<%lO%Tm4cYl]|`Oy%Tz!Q%T!Q![5R![!c%T!c!i5R!i#T%T#T#Z5R#Z;'S%T;'S;=`%f<%lO%Tm5WY|`Oy%Tz!Q%T!Q![5v![!c%T!c!i5v!i#T%T#T#Z5v#Z;'S%T;'S;=`%f<%lO%Tm5}Sl]|`Oy%Tz;'S%T;'S;=`%f<%lO%Tm6^YOy%Tz!_%T!_!`6|!`!c%T!c!}7a!}#T%T#T#o7a#o;'S%T;'S;=`%f<%lO%Td7TS!SS|`Oy%Tz;'S%T;'S;=`%f<%lO%Tm7h[h]|`Oy%Tz}%T}!O7a!O!Q%T!Q![7a![!c%T!c!}7a!}#T%T#T#o7a#o;'S%T;'S;=`%f<%lO%Ta8c[YPOy%Tz}%T}!O9X!O!Q%T!Q![9X![!c%T!c!}9X!}#T%T#T#o9X#o;'S%T;'S;=`%f<%lO%Ta9`[YP|`Oy%Tz}%T}!O9X!O!Q%T!Q![9X![!c%T!c!}9X!}#T%T#T#o9X#o;'S%T;'S;=`%f<%lO%T~:XWOY:UZw:Uwx.ex#O:U#O#P:q#P;'S:U;'S;=`;m<%lO:U~:tRO;'S:U;'S;=`:};=`O:U~;QXOY:UZw:Uwx.ex#O:U#O#P:q#P;'S:U;'S;=`;m;=`<%l:U<%lO:U~;pP;=`<%l:Uo;xSj_Oy%Tz;'S%T;'S;=`%f<%lO%T~<ZOa~m<bUVPrWOy%Tz!_%T!_!`6|!`;'S%T;'S;=`%f<%lO%To<{Y#pQrWOy%Tz!O%T!O!P=k!P!Q%T!Q![@p![#R%T#R#SAm#S;'S%T;'S;=`%f<%lO%Tm=pU|`Oy%Tz!Q%T!Q![>S![;'S%T;'S;=`%f<%lO%Tm>ZY#m]|`Oy%Tz!Q%T!Q![>S![!g%T!g!h>y!h#X%T#X#Y>y#Y;'S%T;'S;=`%f<%lO%Tm?OY|`Oy%Tz{%T{|?n|}%T}!O?n!O!Q%T!Q![@V![;'S%T;'S;=`%f<%lO%Tm?sU|`Oy%Tz!Q%T!Q![@V![;'S%T;'S;=`%f<%lO%Tm@^U#m]|`Oy%Tz!Q%T!Q![@V![;'S%T;'S;=`%f<%lO%Tm@w[#m]|`Oy%Tz!O%T!O!P>S!P!Q%T!Q![@p![!g%T!g!h>y!h#X%T#X#Y>y#Y;'S%T;'S;=`%f<%lO%TbAtS#xQ|`Oy%Tz;'S%T;'S;=`%f<%lO%TkBVScZOy%Tz;'S%T;'S;=`%f<%lO%TmBhXrWOy%Tz}%T}!OCT!O!P=k!P!Q%T!Q![@p![;'S%T;'S;=`%f<%lO%TmCYW|`Oy%Tz!c%T!c!}Cr!}#T%T#T#oCr#o;'S%T;'S;=`%f<%lO%TmCy[f]|`Oy%Tz}%T}!OCr!O!Q%T!Q![Cr![!c%T!c!}Cr!}#T%T#T#oCr#o;'S%T;'S;=`%f<%lO%ToDtW#iROy%Tz!O%T!O!PE^!P!Q%T!Q![>S![;'S%T;'S;=`%f<%lO%TlEcU|`Oy%Tz!O%T!O!PEu!P;'S%T;'S;=`%f<%lO%TlE|S#s[|`Oy%Tz;'S%T;'S;=`%f<%lO%T~F_VrWOy%Tz{Ft{!P%T!P!QIl!Q;'S%T;'S;=`%f<%lO%T~FyU|`OyFtyzG]z{Hd{;'SFt;'S;=`If<%lOFt~G`TOzG]z{Go{;'SG];'S;=`H^<%lOG]~GrVOzG]z{Go{!PG]!P!QHX!Q;'SG];'S;=`H^<%lOG]~H^OR~~HaP;=`<%lG]~HiW|`OyFtyzG]z{Hd{!PFt!P!QIR!Q;'SFt;'S;=`If<%lOFt~IYS|`R~Oy%Tz;'S%T;'S;=`%f<%lO%T~IiP;=`<%lFt~IsV|`S~OYIlYZ%TZyIlyzJYz;'SIl;'S;=`Jq<%lOIl~J_SS~OYJYZ;'SJY;'S;=`Jk<%lOJY~JnP;=`<%lJY~JtP;=`<%lIlmJ|[#m]Oy%Tz!O%T!O!P>S!P!Q%T!Q![@p![!g%T!g!h>y!h#X%T#X#Y>y#Y;'S%T;'S;=`%f<%lO%TkKwU^ZOy%Tz![%T![!]LZ!];'S%T;'S;=`%f<%lO%TcLbS_R|`Oy%Tz;'S%T;'S;=`%f<%lO%TkLsS!ZZOy%Tz;'S%T;'S;=`%f<%lO%ThMUUrWOy%Tz!_%T!_!`Mh!`;'S%T;'S;=`%f<%lO%ThMoS|`rWOy%Tz;'S%T;'S;=`%f<%lO%TlNSW!SSrWOy%Tz!^%T!^!_Mh!_!`%T!`!aMh!a;'S%T;'S;=`%f<%lO%TjNsV!UQrWOy%Tz!_%T!_!`Mh!`!a! Y!a;'S%T;'S;=`%f<%lO%Tb! aS!UQ|`Oy%Tz;'S%T;'S;=`%f<%lO%To! rYg]Oy%Tz!b%T!b!c!!b!c!}!#R!}#T%T#T#o!#R#o#p!$O#p;'S%T;'S;=`%f<%lO%Tm!!iWg]|`Oy%Tz!c%T!c!}!#R!}#T%T#T#o!#R#o;'S%T;'S;=`%f<%lO%Tm!#Y[g]|`Oy%Tz}%T}!O!#R!O!Q%T!Q![!#R![!c%T!c!}!#R!}#T%T#T#o!#R#o;'S%T;'S;=`%f<%lO%To!$TW|`Oy%Tz!c%T!c!}!$m!}#T%T#T#o!$m#o;'S%T;'S;=`%f<%lO%To!$r^|`Oy%Tz}%T}!O!$m!O!Q%T!Q![!$m![!c%T!c!}!$m!}#T%T#T#o!$m#o#q%T#q#r!%n#r;'S%T;'S;=`%f<%lO%To!%uSp_|`Oy%Tz;'S%T;'S;=`%f<%lO%To!&W[#h_Oy%Tz}%T}!O!&|!O!Q%T!Q![!&|![!c%T!c!}!&|!}#T%T#T#o!&|#o;'S%T;'S;=`%f<%lO%To!'T[#h_|`Oy%Tz}%T}!O!&|!O!Q%T!Q![!&|![!c%T!c!}!&|!}#T%T#T#o!&|#o;'S%T;'S;=`%f<%lO%Tk!(OSyZOy%Tz;'S%T;'S;=`%f<%lO%Tm!(aSw]Oy%Tz;'S%T;'S;=`%f<%lO%Td!(pUOy%Tz!_%T!_!`6|!`;'S%T;'S;=`%f<%lO%Tk!)XS!^ZOy%Tz;'S%T;'S;=`%f<%lO%Tk!)jS!]ZOy%Tz;'S%T;'S;=`%f<%lO%To!){Y#oQOr%Trs!*ksw%Twx!.wxy%Tz!_%T!_!`6|!`;'S%T;'S;=`%f<%lO%Tm!*pZ|`OY!*kYZ%TZr!*krs!+csy!*kyz!+vz#O!*k#O#P!-j#P;'S!*k;'S;=`!.q<%lO!*km!+jSo]|`Oy%Tz;'S%T;'S;=`%f<%lO%T]!+yWOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d<%lO!+v]!,hOo]]!,kRO;'S!+v;'S;=`!,t;=`O!+v]!,wXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!+v<%lO!+v]!-gP;=`<%l!+vm!-oU|`Oy!*kyz!+vz;'S!*k;'S;=`!.R;=`<%l!+v<%lO!*km!.UXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!*k<%lO!+vm!.tP;=`<%l!*km!.|Z|`OY!.wYZ%TZw!.wwx!+cxy!.wyz!/oz#O!.w#O#P!1^#P;'S!.w;'S;=`!2e<%lO!.w]!/rWOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W<%lO!/o]!0_RO;'S!/o;'S;=`!0h;=`O!/o]!0kXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!/o<%lO!/o]!1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[w,h,Z,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:T=>z[T]||-1},{term:23,get:T=>u[T]||-1}],tokenPrec:2180}),l=n.define({name:"less",parser:U.configure({props:[$.add({Declaration:X()}),i.add({Block:y})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"@-"}}),o=f(T=>T.name=="VariableName"||T.name=="AtKeyword");function g(){return new c(l,l.data.of({autocomplete:o}))}export{o as n,l as r,g as t};
import{D as v,H as y,J as t,N as u,at as k,n as l,nt as _,q as W,r as T,s as Y,u as R,y as w,zt as U}from"./dist-DBwNzi3C.js";import{n as G}from"./dist-TiFCI16_.js";var X=1,j=2,z=3,S=180,x=4,Z=181,E=5,V=182,D=6;function F(O){return O>=65&&O<=90||O>=97&&O<=122}var N=new l(O=>{let a=O.pos;for(;;){let{next:e}=O;if(e<0)break;if(e==123){let $=O.peek(1);if($==123){if(O.pos>a)break;O.acceptToken(X,2);return}else if($==37){if(O.pos>a)break;let i=2,n=2;for(;;){let r=O.peek(i);if(r==32||r==10)++i;else if(r==35)for(++i;;){let Q=O.peek(i);if(Q<0||Q==10)break;i++}else if(r==45&&n==2)n=++i;else{let Q=r==101&&O.peek(i+1)==110&&O.peek(i+2)==100;O.acceptToken(Q?z:j,n);return}}}}if(O.advance(),e==10)break}O.pos>a&&O.acceptToken(S)});function P(O,a,e){return new l($=>{let i=$.pos;for(;;){let{next:n}=$;if(n==123&&$.peek(1)==37){let r=2;for(;;r++){let c=$.peek(r);if(c!=32&&c!=10)break}let Q="";for(;;r++){let c=$.peek(r);if(!F(c))break;Q+=String.fromCharCode(c)}if(Q==O){if($.pos>i)break;$.acceptToken(e,2);break}}else if(n<0)break;if($.advance(),n==10)break}$.pos>i&&$.acceptToken(a)})}var C=P("endcomment",V,E),I=P("endraw",Z,x),A=new l(O=>{if(O.next==35){for(O.advance();!(O.next==10||O.next<0||(O.next==37||O.next==125)&&O.peek(1)==125);)O.advance();O.acceptToken(D)}}),B={__proto__:null,contains:32,or:36,and:36,true:50,false:50,empty:52,forloop:54,tablerowloop:56,continue:58,in:128,with:194,for:196,as:198,if:234,endif:238,unless:244,endunless:248,elsif:252,else:256,case:262,endcase:266,when:270,endfor:278,tablerow:284,endtablerow:288,break:292,cycle:298,echo:302,render:306,include:312,assign:316,capture:322,endcapture:326,increment:330,decrement:334},H={__proto__:null,if:82,endif:86,elsif:90,else:94,unless:100,endunless:104,case:110,endcase:114,when:118,for:126,endfor:136,tablerow:142,endtablerow:146,break:150,continue:154,cycle:158,comment:164,endcomment:170,raw:176,endraw:182,echo:186,render:190,include:202,assign:206,capture:212,endcapture:216,increment:220,decrement:224,liquid:228},L=T.deserialize({version:14,states:"HOQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DQO#{OPO'#DTO$ZOPO'#D^O$iOPO'#DcO$wOPO'#DkO%VOPO'#DsO%eOSO'#EOO%jOQO'#EUO%oOPO'#EhOOOP'#G`'#G`OOOP'#G]'#G]OOOP'#Fz'#FzQYOPOOOOOP-E9y-E9yOOQW'#Cg'#CgO&`Q!jO,59QO&gQ!jO'#G^OsQhO'#CsOOQW'#G^'#G^OOOP,59l,59lO)PQhO,59lOsQhO,59pOsQhO,59tO)ZQhO,59vOsQhO,59yOsQhO,5:OOsQhO,5:SO!]QhO,5:WO!]QhO,5:`O)`QhO,5:dO)eQhO,5:fO)jQhO,5:hO)oQhO,5:kO)tQhO,5:qOsQhO,5:vOsQhO,5:xOsQhO,5;OOsQhO,5;QOsQhO,5;TOsQhO,5;XOsQhO,5;ZO+TQhO,5;]O+[OPO'#CdOOOP,59o,59oO#{OPO,59oO+jQxO'#DWOOOP,59x,59xO$ZOPO,59xO+oQxO'#DaOOOP,59},59}O$iOPO,59}O+tQxO'#DfOOOP,5:V,5:VO$wOPO,5:VO+yQxO'#DqOOOP,5:_,5:_O%VOPO,5:_O,OQxO'#DvOOOS'#GQ'#GQO,TOSO'#ERO,]OSO,5:jOOOQ'#GR'#GRO,bOQO'#EXO,jOQO,5:pOOOP,5;S,5;SO%oOPO,5;SO,oQxO'#EkOOOP-E9x-E9xO,tQ#|O,59SOsQhO,59VOsQhO,59VO,yQhO'#C|OOQW'#F|'#F|O-OQhO1G.lOOOP1G.l1G.lOsQhO,59VOsQhO,59ZO-WQ!jO,59_O-iQ!jO1G/WO-pQhO1G/WOOOP1G/W1G/WO-xQ!jO1G/[O.ZQ!jO1G/`OOOP1G/b1G/bO.lQ!jO1G/eO.}Q!jO1G/jO/qQ!jO1G/nO/xQhO1G/rO/}QhO1G/zOOOP1G0O1G0OOOOP1G0Q1G0QO0SQhO1G0SOOOS1G0V1G0VOOOQ1G0]1G0]O0_Q!jO1G0bO0fQ!jO1G0dO1QQ!jO1G0jO1cQ!jO1G0lO1jQ!jO1G0oO1{Q!jO1G0sO2^Q!jO1G0uO2oQhO'#EsO2vQhO'#ExO2}QhO'#FRO3UQhO'#FYO3]QhO'#F^O3dQhO'#FqOOQW'#Ga'#GaOOQW'#GT'#GTO3kQhO1G0wOsQhO'#EtOsQhO'#EyOsQhO'#E}OOQW'#FP'#FPOsQhO'#FSOsQhO'#FWO!]QhO'#FZO!]QhO'#F_OOQW'#Fc'#FcOOQW'#Fe'#FeO3rQhO'#FfOsQhO'#FhOsQhO'#FjOsQhO'#FmOsQhO'#FoOsQhO'#FrOsQhO'#FvOsQhO'#FxOOOP1G0w1G0wOOOP1G/Z1G/ZO3wQhO,59rOOOP1G/d1G/dO3|QhO,59{OOOP1G/i1G/iO4RQhO,5:QOOOP1G/q1G/qO4WQhO,5:]OOOP1G/y1G/yO4]QhO,5:bOOOS-E:O-E:OOOOP1G0U1G0UO4bQxO'#ESOOOQ-E:P-E:POOOP1G0[1G0[O4gQxO'#EYOOOP1G0n1G0nO4lQhO,5;VOOQW1G.n1G.nOOQW1G.q1G.qO7QQ!jO1G.qOOQW'#DO'#DOO7[QhO,59hOOQW-E9z-E9zOOOP7+$W7+$WO9UQ!jO1G.qO9`Q!jO1G.uOsQhO1G.yO;uQhO7+$rOOOP7+$r7+$rOOOP7+$v7+$vOOOP7+$z7+$zOOOP7+%P7+%POOOP7+%U7+%UOsQhO'#F}O;}QhO7+%YOOOP7+%Y7+%YOsQhO7+%^OsQhO7+%fO<VQhO'#GPO<[QhO7+%nOOOP7+%n7+%nO<dQhO7+%nO<iQhO7+%|OOOP7+%|7+%|O!]QhO'#E`OOQW'#GS'#GSO<qQhO7+&OOsQhO'#E`OOOP7+&O7+&OOOOP7+&U7+&UO=PQhO7+&WOOOP7+&W7+&WOOOP7+&Z7+&ZOOOP7+&_7+&_OOOP7+&a7+&aOOQW,5;_,5;_O2oQhO,5;_OOQW'#Ev'#EvOOQW,5;d,5;dO2vQhO,5;dOOQW'#E{'#E{OOQW,5;m,5;mO2}QhO,5;mOOQW'#FU'#FUOOQW,5;t,5;tO3UQhO,5;tOOQW'#F['#F[OOQW,5;x,5;xO3]QhO,5;xOOQW'#Fa'#FaOOQW,5<],5<]O3dQhO,5<]OOQW'#Ft'#FtOOQW-E:R-E:ROOOP7+&c7+&cO=XQ!jO,5;`O>rQ!jO,5;eO@]Q!jO,5;iOBYQ!jO,5;nOCsQ!jO,5;rOEfQhO,5;uOEkQhO,5;yOEpQhO,5<QOGgQ!jO,5<SOIYQ!jO,5<UOKYQ!jO,5<XOMVQ!jO,5<ZONxQ!jO,5<^O!!cQ!jO,5<bO!$`Q!jO,5<dOOOP1G/^1G/^OOOP1G/g1G/gOOOP1G/l1G/lOOOP1G/w1G/wOOOP1G/|1G/|O!&]QhO,5:nO!&bQhO,5:tOOOP1G0q1G0qOsQhO1G/SO!&gQ!jO7+$eOOOP<<H^<<H^O!&xQ!jO,5<iOOQW-E9{-E9{OOOP<<Ht<<HtO!)ZQ!jO<<HxO!)bQ!jO<<IQOOQW,5<k,5<kOOQW-E9}-E9}OOOP<<IY<<IYO!)iQhO<<IYOOOP<<Ih<<IhO!)qQhO,5:zOOQW-E:Q-E:QOOOP<<Ij<<IjO!)vQ!jO,5:zOOOP<<Ir<<IrOOQW1G0y1G0yOOQW1G1O1G1OOOQW1G1X1G1XOOQW1G1`1G1`OOQW1G1d1G1dOOQW1G1w1G1wO!*eQhO1G1^OsQhO1G1aOsQhO1G1eO!,XQhO1G1lO!-{QhO1G1lO!.QQhO1G1nO!]QhO'#FlOOQW'#GU'#GUO!/tQhO1G1pO!1hQhO1G1uOOOP1G0Y1G0YOOOP1G0`1G0`O!3[Q!jO7+$nOOQW<<HP<<HPOOQW'#Dp'#DpO!5_QhO'#DoOOQW'#GO'#GOO!6xQhOAN>dOOOPAN>dAN>dO!7QQhOAN>lOOOPAN>lAN>lO!7YQhOAN>tOOOPAN>tAN>tOsQhO1G0fO!]QhO1G0fO!7bQ!jO7+&{O!8qQ!jO7+'PO!:QQhO7+'WO!;tQhO,5<WOOQW-E:S-E:SOsQhO,5:ZOOQW-E9|-E9|OOOPG24OG24OOOOPG24WG24WOOOPG24`G24`O!;yQ!jO7+&QOOQW7+&Q7+&QO!<eQhO<<JgO!=uQhO<<JkO!?VQhO<<JrOsQhO1G1rO!@yQ!jO1G/uO!BmQ!jO7+'^",stateData:"!Dm~O%OOSUOS~OPROQSO$zPO~O$zPOPWXQWX$yWX~OfeOifOjfOkfOlfOmfOnfOofO%RbO~OuhOvgOyiO}jO!PkO!SlO!XmO!]nO!aoO!ipO!mqO!orO!qsO!ttO!zuO#PvO#RwO#XxO#ZyO#^zO#b{O#d|O#f}O~OPROQSOR!RO$zPO~OPROQSOR!UO$zPO~OPROQSOR!XO$zPO~OPROQSOR![O$zPO~OPROQSOR!_O$zPO~O$|!`O~O${!cO~OPROQSOR!hO$zPO~O]!jO`!qOa!kOb!lOq!mO~OX!pO~P%}Od!rOX%QX]%QX`%QXa%QXb%QXq%QXh%QXv%QX!^%QX#T%QX#U%QXm%QX#i%QX#k%QX#n%QX#r%QX#t%QX#w%QX#{%QX$S%QX$W%QX$Z%QX$]%QX$_%QX$b%QX$d%QX$g%QX$k%QX$m%QX#p%QX#y%QX$i%QXe%QX%R%QX#V%QX$P%QX$U%QX~Oq!mOv!vO~PsOv!yO~Ov#PO~Ov#QO~On#RO~Ov#SO~Ov#TO~Om#oO#U#lO#i#fO#n#gO#r#hO#t#iO#w#jO#{#kO$S#mO$W#nO$Z#pO$]#qO$_#rO$b#sO$d#tO$g#uO$k#vO$m#wO~Ov#xO~P)yO$zPOPWXQWXRWX~O{#zO~O!U#|O~O!Z$OO~O!f$QO~O!k$SO~O$|!`OT!uX~OT$VO~O${!cOS!{X~OS$YO~O#`$[O~O^$]O~O%R$`O~OX$cOq!mO~O]!jO`!qOa!kOb!lOh$fO~Ov$hO~P%}Oq!mOv$hO~O]!jO`!qOa!kOb!lOv$iO~O]!jO`!qOa!kOb!lOv$jO~O]!jO`!qOa!kOb!lOv$kO~O]!jO`!qOa!kOb!lOv$lO~O]!jO`!qOa!kOb!lO!^$mO~Ov$oO~P/`O!b$pO~O!b$qO~Os$uOv$tO!^$rO~Ov$wO~P%}O]!jO`!qOa!kOb!lOv$|O!^$xO#T${O#U${O~O]!jO`!qOa!kOb!lOv$}O~Ov%PO~P%}O]!jO`!qOa!kOb!lOv%QO~O]!jO`!qOa!kOb!lOv%RO~O]!jO`!qOa!kOb!lOv%SO~O#k%VO~P)yO#p%YO~P)yO#y%]O~P)yO$P%`O~P)yO$U%cO~P)yO$i%fO~P)yOv%hO~P)yOn%pO~Ov%xO~Ov%yO~Ov%zO~Ov%{O~Ov%|O~O!w%}O~O!}&OO~Ov&PO~Oa!kOX_i]_iq_ih_iv_i!^_i#T_i#U_im_i#i_i#k_i#n_i#r_i#t_i#w_i#{_i$S_i$W_i$Z_i$]_i$__i$b_i$d_i$g_i$k_i$m_i#p_i#y_i$i_ie_i%R_i#V_i$P_i$U_i~O`!qOb!lO~P4qOs&QOXpaqpavpampa#Upa#ipa#npa#rpa#tpa#wpa#{pa$Spa$Wpa$Zpa$]pa$_pa$bpa$dpa$gpa$kpa$mpa#kpa#ppa#ypa$Ppa$Upa$ipa~O`_ib_i~P4qO`!qOa!kOb!lOXci]ciqcihcivci!^ci#Tci#Ucimci#ici#kci#nci#rci#tci#wci#{ci$Sci$Wci$Zci$]ci$_ci$bci$dci$gci$kci$mci#pci#yci$icieci%Rci#Vci$Pci$Uci~Oq!mOv&SO~Ov&VO!^$mO~On&YO~Ov&[O!^$rO~On&]O~Oq!mOv&^O~Ov&aO!^$xO#T${O#U${O~Oq!mOv&cO~O]!jO`!qOa!kOb!lOm#ha#U#ha#i#ha#k#ha#n#ha#r#ha#t#ha#w#ha#{#ha$S#ha$W#ha$Z#ha$]#ha$_#ha$b#ha$d#ha$g#ha$k#ha$m#ha~O]!jO`!qOa!kOb!lOm#ma#U#ma#i#ma#n#ma#p#ma#r#ma#t#ma#w#ma#{#ma$S#ma$W#ma$Z#ma$]#ma$_#ma$b#ma$d#ma$g#ma$k#ma$m#ma~O]!jO`!qOa!kOb!lOm#qav#qa#U#qa#i#qa#n#qa#r#qa#t#qa#w#qa#{#qa$S#qa$W#qa$Z#qa$]#qa$_#qa$b#qa$d#qa$g#qa$k#qa$m#qa#k#qa#p#qa#y#qa$P#qa$U#qa$i#qa~O]!jO`!qOa!kOb!lOm#va#U#va#i#va#n#va#r#va#t#va#w#va#y#va#{#va$S#va$W#va$Z#va$]#va$_#va$b#va$d#va$g#va$k#va$m#va~Om#zav#za#U#za#i#za#n#za#r#za#t#za#w#za#{#za$S#za$W#za$Z#za$]#za$_#za$b#za$d#za$g#za$k#za$m#za#k#za#p#za#y#za$P#za$U#za$i#za~P/`O!b&kO~O!b&lO~Os&nO!^$rOm$Yav$Ya#U$Ya#i$Ya#n$Ya#r$Ya#t$Ya#w$Ya#{$Ya$S$Ya$W$Ya$Z$Ya$]$Ya$_$Ya$b$Ya$d$Ya$g$Ya$k$Ya$m$Ya#k$Ya#p$Ya#y$Ya$P$Ya$U$Ya$i$Ya~Om$[av$[a#U$[a#i$[a#n$[a#r$[a#t$[a#w$[a#{$[a$S$[a$W$[a$Z$[a$]$[a$_$[a$b$[a$d$[a$g$[a$k$[a$m$[a#k$[a#p$[a#y$[a$P$[a$U$[a$i$[a~P%}O]!jO`!qOa!kOb!lO!^&pOm$^av$^a#U$^a#i$^a#n$^a#r$^a#t$^a#w$^a#{$^a$S$^a$W$^a$Z$^a$]$^a$_$^a$b$^a$d$^a$g$^a$k$^a$m$^a#k$^a#p$^a#y$^a$P$^a$U$^a$i$^a~O]!jO`!qOa!kOb!lOm$aav$aa#U$aa#i$aa#n$aa#r$aa#t$aa#w$aa#{$aa$S$aa$W$aa$Z$aa$]$aa$_$aa$b$aa$d$aa$g$aa$k$aa$m$aa#k$aa#p$aa#y$aa$P$aa$U$aa$i$aa~Om$cav$ca#U$ca#i$ca#n$ca#r$ca#t$ca#w$ca#{$ca$S$ca$W$ca$Z$ca$]$ca$_$ca$b$ca$d$ca$g$ca$k$ca$m$ca#k$ca#p$ca#y$ca$P$ca$U$ca$i$ca~P%}O]!jO`!qOa!kOb!lOm$fa#U$fa#i$fa#n$fa#r$fa#t$fa#w$fa#{$fa$S$fa$W$fa$Z$fa$]$fa$_$fa$b$fa$d$fa$g$fa$i$fa$k$fa$m$fa~O]!jO`!qOa!kOb!lOm$jav$ja#U$ja#i$ja#n$ja#r$ja#t$ja#w$ja#{$ja$S$ja$W$ja$Z$ja$]$ja$_$ja$b$ja$d$ja$g$ja$k$ja$m$ja#k$ja#p$ja#y$ja$P$ja$U$ja$i$ja~O]!jO`!qOa!kOb!lOm$lav$la#U$la#i$la#n$la#r$la#t$la#w$la#{$la$S$la$W$la$Z$la$]$la$_$la$b$la$d$la$g$la$k$la$m$la#k$la#p$la#y$la$P$la$U$la$i$la~Ov&tO~Ov&uO~O]!jO`!qOa!kOb!lOe&wO~O]!jO`!qOa!kOb!lOv$qa!^$qam$qa#U$qa#i$qa#n$qa#r$qa#t$qa#w$qa#{$qa$S$qa$W$qa$Z$qa$]$qa$_$qa$b$qa$d$qa$g$qa$k$qa$m$qa#k$qa#p$qa#y$qa$P$qa$U$qa$i$qa~O]!jO`!qOa!kOb!lO%R&xO~Ov&|O~P!(xOv'OO~P!(xOv'QO!^$rO~Os'RO~O]!jO`!qOa!kOb!lO#V'SOv#Sa!^#Sa#T#Sa#U#Sa~O!^$mOm#ziv#zi#U#zi#i#zi#n#zi#r#zi#t#zi#w#zi#{#zi$S#zi$W#zi$Z#zi$]#zi$_#zi$b#zi$d#zi$g#zi$k#zi$m#zi#k#zi#p#zi#y#zi$P#zi$U#zi$i#zi~O!^$rOm$Yiv$Yi#U$Yi#i$Yi#n$Yi#r$Yi#t$Yi#w$Yi#{$Yi$S$Yi$W$Yi$Z$Yi$]$Yi$_$Yi$b$Yi$d$Yi$g$Yi$k$Yi$m$Yi#k$Yi#p$Yi#y$Yi$P$Yi$U$Yi$i$Yi~On'VO~Oq!mOm$[iv$[i#U$[i#i$[i#n$[i#r$[i#t$[i#w$[i#{$[i$S$[i$W$[i$Z$[i$]$[i$_$[i$b$[i$d$[i$g$[i$k$[i$m$[i#k$[i#p$[i#y$[i$P$[i$U$[i$i$[i~O!^&pOm$^iv$^i#U$^i#i$^i#n$^i#r$^i#t$^i#w$^i#{$^i$S$^i$W$^i$Z$^i$]$^i$_$^i$b$^i$d$^i$g$^i$k$^i$m$^i#k$^i#p$^i#y$^i$P$^i$U$^i$i$^i~Oq!mOm$civ$ci#U$ci#i$ci#n$ci#r$ci#t$ci#w$ci#{$ci$S$ci$W$ci$Z$ci$]$ci$_$ci$b$ci$d$ci$g$ci$k$ci$m$ci#k$ci#p$ci#y$ci$P$ci$U$ci$i$ci~O]!jO`!qOa!kOb!lOXpqqpqvpqmpq#Upq#ipq#npq#rpq#tpq#wpq#{pq$Spq$Wpq$Zpq$]pq$_pq$bpq$dpq$gpq$kpq$mpq#kpq#ppq#ypq$Ppq$Upq$ipq~Os'YOv!cX%R!cXm!cX#U!cX#i!cX#n!cX#r!cX#t!cX#w!cX#{!cX$P!cX$S!cX$W!cX$Z!cX$]!cX$_!cX$b!cX$d!cX$g!cX$k!cX$m!cX$U!cX~Ov'[O%R&xO~Ov']O%R&xO~Ov'^O!^$rO~Om#}q#U#}q#i#}q#n#}q#r#}q#t#}q#w#}q#{#}q$P#}q$S#}q$W#}q$Z#}q$]#}q$_#}q$b#}q$d#}q$g#}q$k#}q$m#}q~P!(xOm$Rq#U$Rq#i$Rq#n$Rq#r$Rq#t$Rq#w$Rq#{$Rq$S$Rq$U$Rq$W$Rq$Z$Rq$]$Rq$_$Rq$b$Rq$d$Rq$g$Rq$k$Rq$m$Rq~P!(xO!^$rOm$Yqv$Yq#U$Yq#i$Yq#n$Yq#r$Yq#t$Yq#w$Yq#{$Yq$S$Yq$W$Yq$Z$Yq$]$Yq$_$Yq$b$Yq$d$Yq$g$Yq$k$Yq$m$Yq#k$Yq#p$Yq#y$Yq$P$Yq$U$Yq$i$Yq~Os'dO~O]!jO`!qOa!kOb!lOv#Sq!^#Sq#T#Sq#U#Sq~O%R&xOm#}y#U#}y#i#}y#n#}y#r#}y#t#}y#w#}y#{#}y$P#}y$S#}y$W#}y$Z#}y$]#}y$_#}y$b#}y$d#}y$g#}y$k#}y$m#}y~O%R&xOm$Ry#U$Ry#i$Ry#n$Ry#r$Ry#t$Ry#w$Ry#{$Ry$S$Ry$U$Ry$W$Ry$Z$Ry$]$Ry$_$Ry$b$Ry$d$Ry$g$Ry$k$Ry$m$Ry~O!^$rOm$Yyv$Yy#U$Yy#i$Yy#n$Yy#r$Yy#t$Yy#w$Yy#{$Yy$S$Yy$W$Yy$Z$Yy$]$Yy$_$Yy$b$Yy$d$Yy$g$Yy$k$Yy$m$Yy#k$Yy#p$Yy#y$Yy$P$Yy$U$Yy$i$Yy~O]!jO`!qOa!kOb!lOv!ci%R!cim!ci#U!ci#i!ci#n!ci#r!ci#t!ci#w!ci#{!ci$P!ci$S!ci$W!ci$Z!ci$]!ci$_!ci$b!ci$d!ci$g!ci$k!ci$m!ci$U!ci~O]!jO`!qOa!kOb!lOm$`qv$`q!^$`q#U$`q#i$`q#n$`q#r$`q#t$`q#w$`q#{$`q$S$`q$W$`q$Z$`q$]$`q$_$`q$b$`q$d$`q$g$`q$k$`q$m$`q#k$`q#p$`q#y$`q$P$`q$U$`q$i$`q~O",goto:"7o%UPPPPPPPP%VP%V%g&zPP&zPPP&zPPP&zPPPPPPPP'xP(YP(]PP(](mP(}P(]P(]P(])TP)eP(])kP){P(]PP(]*RPP*c*m*wP(]*}P+_P(]P(]P(]P(]+eP+u+xP(]+{P,],`P(]P(]P,cPPP(]P(]P(],gP,wP(]P(]P(]P,}-_P-oP,}-uP.VP,}P,}P,}.]P.mP,}P,}.s/TP,}/ZP/kP,}P,},}P,}P,}P/q,}P,}P,}/uP0VP,}P,}P0]0{1c2R2]2o3R3X3_3e4TPPPPPP4Z4kP%V7_m^OTUVWX[`!Q!T!W!Z!^!g!vdRehijlmnvwxyz{|!k!l!q!r#f#g#h#j#k#q#r#s#t#u#v#w$f$m$p$q${&Q&k&l'R'Y'dQ!}oQ#OpQ%n#lQ%o#mQ&_$xQ'W&pR'`'S!wfRehijlmnvwxyz{|!k!l!q!r#f#g#h#j#k#q#r#s#t#u#v#w$f$m$p$q${&Q&k&l'R'Y'dm!nch!o!t!u#U#X$g$v%O%q%t&o&sR$a!mm]OTUVWX[`!Q!T!W!Z!^!gmTOTUVWX[`!Q!T!W!Z!^!gQ!PTR#y!QmUOTUVWX[`!Q!T!W!Z!^!gQ!SUR#{!TmVOTUVWX[`!Q!T!W!Z!^!gQ!VVR#}!WmWOTUVWX[`!Q!T!W!Z!^!ga&z&W&X&{&}'T'U'a'ba&y&W&X&{&}'T'U'a'bQ!YWR$P!ZmXOTUVWX[`!Q!T!W!Z!^!gQ!]XR$R!^mYOTUVWX[`!Q!T!W!Z!^!gR!bYR$U!bmZOTUVWX[`!Q!T!W!Z!^!gR!eZR$X!eT$y#V$zm[OTUVWX[`!Q!T!W!Z!^!gQ!f[R$Z!gm#c}#]#^#_#`#a#b#e%U%X%[%_%b%em#]}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%T#]R&d%Um#^}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%W#^R&e%Xm#_}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%Z#_R&f%[m#`}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%^#`R&g%_m#a}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%a#aR&h%bT&q%r&rm#b}#]#^#_#`#a#b#e%U%X%[%_%b%eQ%d#bR&i%eQ`OQ!QTQ!TUQ!WVQ!ZWQ!^XQ!g[_!i`!Q!T!W!Z!^!gSQO`SaQ!Oi!OTUVWX[!Q!T!W!Z!^!gQ!ocQ!uh^$b!o!u$g$v%O&o&sQ$g!tQ$v#UQ%O#XQ&o%qR&s%tQ$n!|S&U$n&jR&j%mQ&{&WQ&}&XW'Z&{&}'a'bQ'a'TR'b'UQ$s#RW&Z$s&m'P'cQ&m%pQ'P&]R'c'VQ!aYR$T!aQ!dZR$W!dQ$z#VR&`$zQ#e}Q%U#]Q%X#^Q%[#_Q%_#`Q%b#aQ%e#b_%g#e%U%X%[%_%b%eQ&r%rR'X&rm_OTUVWX[`!Q!T!W!Z!^!gQcRQ!seQ!thQ!wiQ!xjQ!zlQ!{mQ!|nQ#UvQ#VwQ#WxQ#XyQ#YzQ#Z{Q#[|Q$^!kQ$_!lQ$d!qQ$e!rQ%i#fQ%j#gQ%k#hQ%l#jQ%m#kQ%q#qQ%r#rQ%s#sQ%t#tQ%u#uQ%v#vQ%w#wQ&R$fQ&T$mQ&W$pQ&X$qQ&b${Q&v&QQ'T&kQ'U&lQ'_'RQ'e'YR'f'dm#d}#]#^#_#`#a#b#e%U%X%[%_%b%e",nodeNames:"\u26A0 {{ {% {% {% {% InlineComment Template Text }} Interpolation VariableName MemberExpression . PropertyName BinaryExpression contains CompareOp LogicOp AssignmentExpression AssignOp ) ( RangeExpression .. BooleanLiteral empty forloop tablerowloop continue StringLiteral NumberLiteral Filter | FilterName : Tag TagName %} IfDirective Tag if EndTag endif Tag elsif Tag else UnlessDirective Tag unless EndTag endunless CaseDirective Tag case EndTag endcase Tag when , ForDirective Tag for in Parameter ParameterName EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag continue Tag cycle Comment Tag comment CommentText EndTag endcomment RawDirective Tag raw RawText EndTag endraw Tag echo Tag render RenderParameter with for as Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement Tag liquid IfDirective Tag if EndTag endif UnlessDirective Tag unless EndTag endunless Tag elsif Tag else CaseDirective Tag case EndTag endcase Tag when ForDirective Tag EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag Tag cycle Tag echo Tag render RenderParameter Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement",maxTerm:189,nodeProps:[["closedBy",1,"}}",-4,2,3,4,5,"%}",22,")"],["openedBy",9,"{{",21,"(",38,"{%"],["group",-12,11,12,15,19,23,25,26,27,28,29,30,31,"Expression"]],skippedNodes:[0,6],repeatNodeCount:11,tokenData:")Q~RkXY!vYZ!v]^!vpq!vqr#Xrs#duv$Uwx$axy$|yz%R{|%W|}&r}!O&w!O!P'T!Q![&a![!]'e!^!_'j!_!`'r!`!a'j!c!}'z#R#S'z#T#o'z#p#q(p#q#r(u%W;'S'z;'S;:j(j<%lO'z~!{S%O~XY!vYZ!v]^!vpq!v~#[P!_!`#_~#dOa~~#gUOY#dZr#drs#ys;'S#d;'S;=`$O<%lO#d~$OOn~~$RP;=`<%l#d~$XP#q#r$[~$aOv~~$dUOY$aZw$awx#yx;'S$a;'S;=`$v<%lO$a~$yP;=`<%l$a~%ROf~~%WOe~P%ZQ!O!P%a!Q![&aP%dP!Q![%gP%lRoP!Q![%g!g!h%u#X#Y%uP%xR{|&R}!O&R!Q![&XP&UP!Q![&XP&^PoP!Q![&XP&fSoP!O!P%a!Q![&a!g!h%u#X#Y%u~&wO!^~~&zRuv$U!O!P%a!Q![&a~'YQ]S!O!P'`!Q![%g~'eOh~~'jOs~~'oPa~!_!`#_~'wPd~!_!`#__(TV^WuQ%RT!Q!['z!c!}'z#R#S'z#T#o'z%W;'S'z;'S;:j(j<%lO'z_(mP;=`<%l'z~(uOq~~(xP#q#r({~)QOX~",tokenizers:[N,I,C,A,0,1,2,3],topRules:{Template:[0,7]},specialized:[{term:187,get:O=>B[O]||-1},{term:37,get:O=>H[O]||-1}],tokenPrec:0});function o(O,a){return O.split(" ").map(e=>({label:e,type:a}))}var p=o("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where","function"),q=o("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include","keyword"),d=o("empty forloop tablerowloop in with as contains","keyword"),M=o("first index index0 last length rindex","property"),K=o("col col0 col_first col_last first index index0 last length rindex rindex0 row","property");function J(O){var r;let{state:a,pos:e}=O,$=y(a).resolveInner(e,-1).enterUnfinishedNodesBefore(e),i=((r=$.childBefore(e))==null?void 0:r.name)||$.name;if($.name=="FilterName")return{type:"filter",node:$};if(O.explicit&&i=="|")return{type:"filter"};if($.name=="TagName")return{type:"tag",node:$};if(O.explicit&&i=="{%")return{type:"tag"};if($.name=="PropertyName"&&$.parent.name=="MemberExpression")return{type:"property",node:$,target:$.parent};if($.name=="."&&$.parent.name=="MemberExpression")return{type:"property",target:$.parent};if($.name=="MemberExpression"&&i==".")return{type:"property",target:$};if($.name=="VariableName")return{type:"expression",from:$.from};let n=O.matchBefore(/[\w\u00c0-\uffff]+$/);return n?{type:"expression",from:n.from}:O.explicit&&$.name!="CommentText"&&$.name!="StringLiteral"&&$.name!="NumberLiteral"&&$.name!="InlineComment"?{type:"expression"}:null}function OO(O,a,e,$){let i=[];for(;;){let n=a.getChild("Expression");if(!n)return[];if(n.name=="forloop")return i.length?[]:M;if(n.name=="tablerowloop")return i.length?[]:K;if(n.name=="VariableName"){i.unshift(O.sliceDoc(n.from,n.to));break}else if(n.name=="MemberExpression"){let r=n.getChild("PropertyName");r&&i.unshift(O.sliceDoc(r.from,r.to)),a=n}else return[]}return $?$(i,O,e):[]}function f(O={}){let a=O.filters?O.filters.concat(p):p,e=O.tags?O.tags.concat(q):q,$=O.variables?O.variables.concat(d):d,{properties:i}=O;return n=>{let r=J(n);if(!r)return null;let Q=r.from??(r.node?r.node.from:n.pos),c;return c=r.type=="filter"?a:r.type=="tag"?e:r.type=="expression"?$:OO(n.state,r.target,n,i),c.length?{options:c,from:Q,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var h=k.inputHandler.of((O,a,e,$)=>$!="%"||a!=e||O.state.doc.sliceString(a-1,e+1)!="{}"?!1:(O.dispatch(O.state.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:"%%"},range:U.cursor(i.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function s(O){return a=>{let e=O.test(a.textAfter);return a.lineIndent(a.node.from)+(e?0:a.unit)}}var $O=Y.define({name:"liquid",parser:L.configure({props:[W({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":t.keyword,"empty forloop tablerowloop":t.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":t.controlKeyword,"assign capture endcapture":t.definitionKeyword,contains:t.operatorKeyword,"render include":t.moduleKeyword,VariableName:t.variableName,TagName:t.tagName,FilterName:t.function(t.variableName),PropertyName:t.propertyName,CompareOp:t.compareOperator,AssignOp:t.definitionOperator,LogicOp:t.logicOperator,NumberLiteral:t.number,StringLiteral:t.string,BooleanLiteral:t.bool,InlineComment:t.lineComment,CommentText:t.blockComment,"{% %} {{ }}":t.brace,"( )":t.paren,".":t.derefOperator,", .. : |":t.punctuation}),u.add({Tag:w({closing:"%}"}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":s(/^\s*(\{%-?\s*)?end\w/),IfDirective:s(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:s(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),v.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(O){let a=O.firstChild,e=O.lastChild;return!a||a.name!="Tag"?null:{from:a.to,to:e.name=="EndTag"?e.from:O.to}}})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),m=G();function g(O){return $O.configure({wrap:_(a=>a.type.isTop?{parser:O.parser,overlay:e=>e.name=="Text"||e.name=="RawText"}:null)},"liquid")}var b=g(m.language);function aO(O={}){let a=O.base||m,e=a.language==m.language?b:g(a.language);return new R(e,[a.support,e.data.of({autocomplete:f(O)}),a.language.data.of({closeBrackets:{brackets:["{"]}}),h])}export{b as i,aO as n,f as r,h as t};
import"./dist-DBwNzi3C.js";import"./dist-BIKFl48f.js";import{n as s,r as a,t as e}from"./dist-BtWo0SNF.js";export{e as less,s as lessCompletionSource,a as lessLanguage};
import{$ as B,D as K,H as M,J as Q,N as OO,T as iO,Y as aO,n as $,q as nO,r as QO,s as eO,t as rO,u as tO,y}from"./dist-DBwNzi3C.js";import{m as d,s as oO,u as dO}from"./dist-ChS0Dc_R.js";var TO=1,x=194,_=195,sO=196,U=197,lO=198,SO=199,pO=200,qO=2,V=3,G=201,PO=24,$O=25,mO=49,hO=50,gO=55,cO=56,XO=57,yO=59,zO=60,fO=61,WO=62,vO=63,RO=65,kO=238,uO=71,xO=241,_O=242,UO=243,VO=244,GO=245,bO=246,ZO=247,jO=248,b=72,wO=249,EO=250,YO=251,FO=252,JO=253,AO=254,CO=255,NO=256,IO=73,DO=77,HO=263,LO=112,BO=130,KO=151,MO=152,Oi=155,T=10,S=13,z=32,m=9,f=35,ii=40,ai=46,W=123,Z=125,j=39,w=34,E=92,ni=111,Qi=120,ei=78,ri=117,ti=85,oi=new Set([$O,mO,hO,HO,RO,BO,cO,XO,kO,WO,vO,b,IO,DO,zO,fO,KO,MO,Oi,LO]);function v(O){return O==T||O==S}function R(O){return O>=48&&O<=57||O>=65&&O<=70||O>=97&&O<=102}var di=new $((O,i)=>{let a;if(O.next<0)O.acceptToken(SO);else if(i.context.flags&h)v(O.next)&&O.acceptToken(lO,1);else if(((a=O.peek(-1))<0||v(a))&&i.canShift(U)){let n=0;for(;O.next==z||O.next==m;)O.advance(),n++;(O.next==T||O.next==S||O.next==f)&&O.acceptToken(U,-n)}else v(O.next)&&O.acceptToken(sO,1)},{contextual:!0}),Ti=new $((O,i)=>{let a=i.context;if(a.flags)return;let n=O.peek(-1);if(n==T||n==S){let e=0,r=0;for(;;){if(O.next==z)e++;else if(O.next==m)e+=8-e%8;else break;O.advance(),r++}e!=a.indent&&O.next!=T&&O.next!=S&&O.next!=f&&(e<a.indent?O.acceptToken(_,-r):O.acceptToken(x))}}),h=1,Y=2,p=4,s=8,l=16,q=32;function g(O,i,a){this.parent=O,this.indent=i,this.flags=a,this.hash=(O?O.hash+O.hash<<8:0)+i+(i<<4)+a+(a<<6)}var si=new g(null,0,0);function li(O){let i=0;for(let a=0;a<O.length;a++)i+=O.charCodeAt(a)==m?8-i%8:1;return i}var F=new Map([[xO,0],[_O,p],[UO,s],[VO,s|p],[GO,l],[bO,l|p],[ZO,l|s],[jO,s|20],[wO,q],[EO,q|p],[YO,q|s],[FO,s|36],[JO,q|l],[AO,l|36],[CO,l|40],[NO,60]].map(([O,i])=>[O,i|Y])),Si=new rO({start:si,reduce(O,i,a,n){return O.flags&h&&oi.has(i)||(i==uO||i==b)&&O.flags&Y?O.parent:O},shift(O,i,a,n){return i==x?new g(O,li(n.read(n.pos,a.pos)),0):i==_?O.parent:i==PO||i==gO||i==yO||i==V?new g(O,0,h):F.has(i)?new g(O,0,F.get(i)|O.flags&h):O},hash(O){return O.hash}}),pi=new $(O=>{for(let i=0;i<5;i++){if(O.next!="print".charCodeAt(i))return;O.advance()}if(!/\w/.test(String.fromCharCode(O.next)))for(let i=0;;i++){let a=O.peek(i);if(!(a==z||a==m)){a!=ii&&a!=ai&&a!=T&&a!=S&&a!=f&&O.acceptToken(TO);return}}}),qi=new $((O,i)=>{let{flags:a}=i.context,n=a&p?w:j,e=(a&s)>0,r=!(a&l),t=(a&q)>0,o=O.pos;for(;!(O.next<0);)if(t&&O.next==W)if(O.peek(1)==W)O.advance(2);else{if(O.pos==o){O.acceptToken(V,1);return}break}else if(r&&O.next==E){if(O.pos==o){O.advance();let P=O.next;P>=0&&(O.advance(),Pi(O,P)),O.acceptToken(qO);return}break}else if(O.next==E&&!r&&O.peek(1)>-1)O.advance(2);else if(O.next==n&&(!e||O.peek(1)==n&&O.peek(2)==n)){if(O.pos==o){O.acceptToken(G,e?3:1);return}break}else if(O.next==T){if(e)O.advance();else if(O.pos==o){O.acceptToken(G);return}break}else O.advance();O.pos>o&&O.acceptToken(pO)});function Pi(O,i){if(i==ni)for(let a=0;a<2&&O.next>=48&&O.next<=55;a++)O.advance();else if(i==Qi)for(let a=0;a<2&&R(O.next);a++)O.advance();else if(i==ri)for(let a=0;a<4&&R(O.next);a++)O.advance();else if(i==ti)for(let a=0;a<8&&R(O.next);a++)O.advance();else if(i==ei&&O.next==W){for(O.advance();O.next>=0&&O.next!=Z&&O.next!=j&&O.next!=w&&O.next!=T;)O.advance();O.next==Z&&O.advance()}}var $i=nO({'async "*" "**" FormatConversion FormatSpec':Q.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":Q.controlKeyword,"in not and or is del":Q.operatorKeyword,"from def class global nonlocal lambda":Q.definitionKeyword,import:Q.moduleKeyword,"with as print":Q.keyword,Boolean:Q.bool,None:Q.null,VariableName:Q.variableName,"CallExpression/VariableName":Q.function(Q.variableName),"FunctionDefinition/VariableName":Q.function(Q.definition(Q.variableName)),"ClassDefinition/VariableName":Q.definition(Q.className),PropertyName:Q.propertyName,"CallExpression/MemberExpression/PropertyName":Q.function(Q.propertyName),Comment:Q.lineComment,Number:Q.number,String:Q.string,FormatString:Q.special(Q.string),Escape:Q.escape,UpdateOp:Q.updateOperator,"ArithOp!":Q.arithmeticOperator,BitOp:Q.bitwiseOperator,CompareOp:Q.compareOperator,AssignOp:Q.definitionOperator,Ellipsis:Q.punctuation,At:Q.meta,"( )":Q.paren,"[ ]":Q.squareBracket,"{ }":Q.brace,".":Q.derefOperator,", ;":Q.separator}),mi={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},J=QO.deserialize({version:14,states:"##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQdO,59aO'vQdO,59aO:zQdO,59aOOQS,59y,59yO;PQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;_QdO,5:QO;dQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;uQdO,5:UO;zQdO,5:WOOOW'#Fy'#FyO<POWO,5:aOOQS,5:a,5:aO<[QdO'#HwOOOW'#Dw'#DwOOOW'#Fz'#FzO<lOWO,5:bOOQS,5:b,5:bOOQS'#F}'#F}O<zQtO,5:iO?lQtO,5=`O@VQ#xO,5=`O@vQtO,5=`OOQS,5:},5:}OA_QeO'#GWOBqQdO,5;^OOQV,5=^,5=^OB|QtO'#IPOCkQdO,5;tOOQS-E:[-E:[OOQV,5;s,5;sO4dQdO'#FQOOQV-E9o-E9oOCsQtO,59]OEzQtO,59iOFeQdO'#HVOFpQdO'#HVO1XQdO'#HVOF{QdO'#DTOGTQdO,59mOGYQdO'#HZO'vQdO'#HZO0rQdO,5=tOOQS,5=t,5=tO0rQdO'#EROOQS'#ES'#ESOGwQdO'#GPOHXQdO,58|OHXQdO,58|O*xQdO,5:oOHgQtO'#H]OOQS,5:r,5:rOOQS,5:z,5:zOHzQdO,5;OOI]QdO'#IOO1XQdO'#H}OOQS,5;Q,5;QOOQS'#GT'#GTOIqQtO,5;QOJPQdO,5;QOJUQdO'#IQOOQS,5;T,5;TOJdQdO'#H|OOQS,5;W,5;WOJuQdO,5;YO4iQdO,5;`O4iQdO,5;cOJ}QtO'#ITO'vQdO'#ITOKXQdO,5;eO4VQdO,5;eO0rQdO,5;jO1XQdO,5;lOK^QeO'#EuOLjQgO,5;fO!!kQdO'#IUO4iQdO,5;jO!!vQdO,5;lO!#OQdO,5;qO!#ZQtO,5;vO'vQdO,5;vPOOO,5=[,5=[P!#bOSO,5=[P!#jOdO,5=[O!&bQtO1G.jO!&iQtO1G.jO!)YQtO1G.jO!)dQtO1G.jO!+}QtO1G.jO!,bQtO1G.jO!,uQdO'#HcO!-TQtO'#GuO0rQdO'#HcO!-_QdO'#HbOOQS,5:Z,5:ZO!-gQdO,5:ZO!-lQdO'#HeO!-wQdO'#HeO!.[QdO,5>OOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!/[QtO1G.|O!/cQtO1G.|O1lQdO1G.|O!0OQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!0VQdO1G/eO!0gQdO1G/eO!0oQdO1G/fO'vQdO'#H[O!0tQdO'#H[O!0yQtO1G.{O!1ZQdO,59iO!2aQdO,5=zO!2qQdO,5=zO!2yQdO1G/mO!3OQtO1G/mOOQS1G/l1G/lO!3`QdO,5=uO!4VQdO,5=uO0rQdO1G/qO!4tQdO1G/sO!4yQtO1G/sO!5ZQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!5kQdO'#HxO0rQdO'#HxO!5|QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!6[Q#xO1G2zO!6{QtO1G2zO'vQdO,5<jOOQS,5<j,5<jOOQS-E9|-E9|OOQS,5<r,5<rOOQS-E:U-E:UOOQV1G0x1G0xO1XQdO'#GRO!7dQtO,5>kOOQS1G1`1G1`O!8RQdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!8WQdO'#FrO!8cQdO,59oO!8kQdO1G/XO!8uQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!9fQdO'#GtOOQS,5<k,5<kOOQS-E9}-E9}O!9wQdO1G.hOOQS1G0Z1G0ZO!:VQdO,5=wO!:gQdO,5=wO0rQdO1G0jO0rQdO1G0jO!:xQdO,5>jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!<RQdO,5>lO!<aQdO,5>lO!<oQdO,5>hO!=VQdO,5>hO!=hQdO'#EpO0rQdO1G0tO!=sQdO1G0tO!=xQgO1G0zO!AvQgO1G0}O!EqQdO,5>oO!E{QdO,5>oO!FTQtO,5>oO0rQdO1G1PO!F_QdO1G1PO4iQdO1G1UO!!vQdO1G1WOOQV,5;a,5;aO!FdQfO,5;aO!FiQgO1G1QO!JjQdO'#GZO4iQdO1G1QO4iQdO1G1QO!JzQdO,5>pO!KXQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!KaQdO'#FSO!KrQ!fO1G1WO!KzQdO1G1WOOQV1G1]1G1]O4iQdO1G1]O!LPQdO1G1]O!LXQdO'#F^OOQV1G1b1G1bO!#ZQtO1G1bPOOO1G2v1G2vP!L^OSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!LfQdO,5=|O!LyQdO,5=|OOQS1G/u1G/uO!MRQdO,5>PO!McQdO,5>PO!MkQdO,5>PO!NOQdO,5>PO!N`QdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!8kQdO7+$pO#!RQdO1G.|O#!YQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO#!aQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO#!qQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO#!vQdO7+%PO##OQdO7+%QO##TQdO1G3fOOQS7+%X7+%XO##eQdO1G3fO##mQdO7+%XOOQS,5<_,5<_O'vQdO,5<_O##rQdO1G3aOOQS-E9q-E9qO#$iQdO7+%]OOQS7+%_7+%_O#$wQdO1G3aO#%fQdO7+%_O#%kQdO1G3gO#%{QdO1G3gO#&TQdO7+%]O#&YQdO,5>dO#&sQdO,5>dO#&sQdO,5>dOOQS'#Dx'#DxO#'UO&jO'#DzO#'aO`O'#HyOOOW1G3}1G3}O#'fQdO1G3}O#'nQdO1G3}O#'yQ#xO7+(fO#(jQtO1G2UP#)TQdO'#GOOOQS,5<m,5<mOOQS-E:P-E:POOQS7+&z7+&zOOQS1G3]1G3]OOQS,5<^,5<^OOQS-E9p-E9pOOQS7+$s7+$sO#)bQdO,5=`O#){QdO,5=`O#*^QtO,5<aO#*qQdO1G3cOOQS-E9s-E9sOOQS7+&U7+&UO#+RQdO7+&UO#+aQdO,5<nO#+uQdO1G4UOOQS-E:Q-E:QO#,WQdO1G4UOOQS1G4T1G4TOOQS7+&W7+&WO#,iQdO7+&WOOQS,5<p,5<pO#,tQdO1G4WOOQS-E:S-E:SOOQS,5<l,5<lO#-SQdO1G4SOOQS-E:O-E:OO1XQdO'#EqO#-jQdO'#EqO#-uQdO'#IRO#-}QdO,5;[OOQS7+&`7+&`O0rQdO7+&`O#.SQgO7+&fO!JmQdO'#GXO4iQdO7+&fO4iQdO7+&iO#2QQtO,5<tO'vQdO,5<tO#2[QdO1G4ZOOQS-E:W-E:WO#2fQdO1G4ZO4iQdO7+&kO0rQdO7+&kOOQV7+&p7+&pO!KrQ!fO7+&rO!KzQdO7+&rO`QeO1G0{OOQV-E:X-E:XO4iQdO7+&lO4iQdO7+&lOOQV,5<u,5<uO#2nQdO,5<uO!JmQdO,5<uOOQV7+&l7+&lO#2yQgO7+&lO#6tQdO,5<vO#7PQdO1G4[OOQS-E:Y-E:YO#7^QdO1G4[O#7fQdO'#IWO#7tQdO'#IWO1XQdO'#IWOOQS'#IW'#IWO#8PQdO'#IVOOQS,5;n,5;nO#8XQdO,5;nO0rQdO'#FUOOQV7+&r7+&rO4iQdO7+&rOOQV7+&w7+&wO4iQdO7+&wO#8^QfO,5;xOOQV7+&|7+&|POOO7+(b7+(bO#8cQdO1G3iOOQS,5<c,5<cO#8qQdO1G3hOOQS-E9u-E9uO#9UQdO,5<dO#9aQdO,5<dO#9tQdO1G3kOOQS-E9v-E9vO#:UQdO1G3kO#:^QdO1G3kO#:nQdO1G3kO#:UQdO1G3kOOQS<<H[<<H[O#:yQtO1G1zOOQS<<Hk<<HkP#;WQdO'#FtO8vQdO1G3bO#;eQdO1G3bO#;jQdO<<HkOOQS<<Hl<<HlO#;zQdO7+)QOOQS<<Hs<<HsO#<[QtO1G1yP#<{QdO'#FsO#=YQdO7+)RO#=jQdO7+)RO#=rQdO<<HwO#=wQdO7+({OOQS<<Hy<<HyO#>nQdO,5<bO'vQdO,5<bOOQS-E9t-E9tOOQS<<Hw<<HwOOQS,5<g,5<gO0rQdO,5<gO#>sQdO1G4OOOQS-E9y-E9yO#?^QdO1G4OO<[QdO'#H{OOOO'#D{'#D{OOOO'#F|'#F|O#?oO&jO,5:fOOOW,5>e,5>eOOOW7+)i7+)iO#?zQdO7+)iO#@SQdO1G2zO#@mQdO1G2zP'vQdO'#FuO0rQdO<<IpO1XQdO1G2YP1XQdO'#GSO#AOQdO7+)pO#AaQdO7+)pOOQS<<Ir<<IrP1XQdO'#GUP0rQdO'#GQOOQS,5;],5;]O#ArQdO,5>mO#BQQdO,5>mOOQS1G0v1G0vOOQS<<Iz<<IzOOQV-E:V-E:VO4iQdO<<JQOOQV,5<s,5<sO4iQdO,5<sOOQV<<JQ<<JQOOQV<<JT<<JTO#BYQtO1G2`P#BdQdO'#GYO#BkQdO7+)uO#BuQgO<<JVO4iQdO<<JVOOQV<<J^<<J^O4iQdO<<J^O!KrQ!fO<<J^O#FpQgO7+&gOOQV<<JW<<JWO#FzQgO<<JWOOQV1G2a1G2aO1XQdO1G2aO#JuQdO1G2aO4iQdO<<JWO1XQdO1G2bP0rQdO'#G[O#KQQdO7+)vO#K_QdO7+)vOOQS'#FT'#FTO0rQdO,5>rO#KgQdO,5>rO#KrQdO,5>rO#K}QdO,5>qO#L`QdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<<Jc<<JcO#LhQdO1G1dOOQS7+)T7+)TP#LmQdO'#FwO#L}QdO1G2OO#MbQdO1G2OO#MrQdO1G2OP#M}QdO'#FxO#N[QdO7+)VO#NlQdO7+)VO#NlQdO7+)VO#NtQdO7+)VO$ UQdO7+(|O8vQdO7+(|OOQSAN>VAN>VO$ oQdO<<LmOOQSAN>cAN>cO0rQdO1G1|O$!PQtO1G1|P$!ZQdO'#FvOOQS1G2R1G2RP$!hQdO'#F{O$!uQdO7+)jO$#`QdO,5>gOOOO-E9z-E9zOOOW<<MT<<MTO$#nQdO7+(fOOQSAN?[AN?[OOQS7+'t7+'tO$$XQdO<<M[OOQS,5<q,5<qO$$jQdO1G4XOOQS-E:T-E:TOOQVAN?lAN?lOOQV1G2_1G2_O4iQdOAN?qO$$xQgOAN?qOOQVAN?xAN?xO4iQdOAN?xOOQV<<JR<<JRO4iQdOAN?rO4iQdO7+'{OOQV7+'{7+'{O1XQdO7+'{OOQVAN?rAN?rOOQS7+'|7+'|O$(sQdO<<MbOOQS1G4^1G4^O0rQdO1G4^OOQS,5<w,5<wO$)QQdO1G4]OOQS-E:Z-E:ZOOQU'#G_'#G_O$)cQfO7+'OO$)nQdO'#F_O$*uQdO7+'jO$+VQdO7+'jOOQS7+'j7+'jO$+bQdO<<LqO$+rQdO<<LqO$+rQdO<<LqO$+zQdO'#H^OOQS<<Lh<<LhO$,UQdO<<LhOOQS7+'h7+'hOOQS'#D|'#D|OOOO1G4R1G4RO$,oQdO1G4RO$,wQdO1G4RP!=hQdO'#GVOOQVG25]G25]O4iQdOG25]OOQVG25dG25dOOQVG25^G25^OOQV<<Kg<<KgO4iQdO<<KgOOQS7+)x7+)xP$-SQdO'#G]OOQU-E:]-E:]OOQV<<Jj<<JjO$-vQtO'#FaOOQS'#Fc'#FcO$.WQdO'#FbO$.xQdO'#FbOOQS'#Fb'#FbO$.}QdO'#IYO$)nQdO'#FiO$)nQdO'#FiO$/fQdO'#FjO$)nQdO'#FkO$/mQdO'#IZOOQS'#IZ'#IZO$0[QdO,5;yOOQS<<KU<<KUO$0dQdO<<KUO$0tQdOANB]O$1UQdOANB]O$1^QdO'#H_OOQS'#H_'#H_O1sQdO'#DcO$1wQdO,5=xOOQSANBSANBSOOOO7+)m7+)mO$2`QdO7+)mOOQVLD*wLD*wOOQVANARANARO5uQ!fO'#GaO$2hQtO,5<SO$)nQdO'#FmOOQS,5<W,5<WOOQS'#Fd'#FdO$3YQdO,5;|O$3_QdO,5;|OOQS'#Fg'#FgO$)nQdO'#G`O$4PQdO,5<QO$4kQdO,5>tO$4{QdO,5>tO1XQdO,5<PO$5^QdO,5<TO$5cQdO,5<TO$)nQdO'#I[O$5hQdO'#I[O$5mQdO,5<UOOQS,5<V,5<VO0rQdO'#FpOOQU1G1e1G1eO4iQdO1G1eOOQSAN@pAN@pO$5rQdOG27wO$6SQdO,59}OOQS1G3d1G3dOOOO<<MX<<MXOOQS,5<{,5<{OOQS-E:_-E:_O$6XQtO'#FaO$6`QdO'#I]O$6nQdO'#I]O$6vQdO,5<XOOQS1G1h1G1hO$6{QdO1G1hO$7QQdO,5<zOOQS-E:^-E:^O$7lQdO,5=OO$8TQdO1G4`OOQS-E:b-E:bOOQS1G1k1G1kOOQS1G1o1G1oO$8eQdO,5>vO$)nQdO,5>vOOQS1G1p1G1pOOQS,5<[,5<[OOQU7+'P7+'PO$+zQdO1G/iO$)nQdO,5<YO$8sQdO,5>wO$8zQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$)nQdO'#GdO$9SQdO1G4bO$9^QdO1G4bO$9fQdO1G4bOOQS7+%T7+%TO$9tQdO1G1tO$:SQtO'#FaO$:ZQdO,5<}OOQS,5<},5<}O$:iQdO1G4cOOQS-E:a-E:aO$)nQdO,5<|O$:pQdO,5<|O$:uQdO7+)|OOQS-E:`-E:`O$;PQdO7+)|O$)nQdO,5<ZP$)nQdO'#GcO$;XQdO1G2hO$)nQdO1G2hP$;gQdO'#GbO$;nQdO<<MhO$;xQdO1G1uO$<WQdO7+(SO8vQdO'#C}O8vQdO,59bO8vQdO,59bO8vQdO,59bO$<fQtO,5=`O8vQdO1G.|O0rQdO1G/XO0rQdO7+$pP$<yQdO'#GOO'vQdO'#GtO$=WQdO,59bO$=]QdO,59bO$=dQdO,59mO$=iQdO1G/UO1sQdO'#DRO8vQdO,59j",stateData:"$>S~O%cOS%^OSSOS%]PQ~OPdOVaOfoOhYOopOs!POvqO!PrO!Q{O!T!SO!U!RO!XZO!][O!h`O!r`O!s`O!t`O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#l!QO#o!TO#s!UO#u!VO#z!WO#}hO$P!XO%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~O%]!YO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%j![O%k!]O%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aO~Ok%xXl%xXm%xXn%xXo%xXp%xXs%xXz%xX{%xX!x%xX#g%xX%[%xX%_%xX%z%xXg%xX!T%xX!U%xX%{%xX!W%xX![%xX!Q%xX#[%xXt%xX!m%xX~P%SOfoOhYO!XZO!][O!h`O!r`O!s`O!t`O%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~Oz%wX{%wX#g%wX%[%wX%_%wX%z%wX~Ok!pOl!qOm!oOn!oOo!rOp!sOs!tO!x%wX~P)pOV!zOg!|Oo0cOv0qO!PrO~P'vOV#OOo0cOv0qO!W#PO~P'vOV#SOa#TOo0cOv0qO![#UO~P'vOQ#XO%`#XO%a#ZO~OQ#^OR#[O%`#^O%a#`O~OV%iX_%iXa%iXh%iXk%iXl%iXm%iXn%iXo%iXp%iXs%iXz%iX!X%iX!f%iX%j%iX%k%iX%l%iX%m%iX%n%iX%o%iX%p%iX%q%iX%r%iX%s%iXg%iX!T%iX!U%iX~O&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O{%iX!x%iX#g%iX%[%iX%_%iX%z%iX%{%iX!W%iX![%iX!Q%iX#[%iXt%iX!m%iX~P,eOz#dO{%hX!x%hX#g%hX%[%hX%_%hX%z%hX~Oo0cOv0qO~P'vO#g#gO%[#iO%_#iO~O%uWO~O!T#nO#u!VO#z!WO#}hO~OopO~P'vOV#sOa#tO%uWO{wP~OV#xOo0cOv0qO!Q#yO~P'vO{#{O!x$QO%z#|O#g!yX%[!yX%_!yX~OV#xOo0cOv0qO#g#SX%[#SX%_#SX~P'vOo0cOv0qO#g#WX%[#WX%_#WX~P'vOh$WO%uWO~O!f$YO!r$YO%uWO~OV$eO~P'vO!U$gO#s$hO#u$iO~O{$jO~OV$qO~P'vOS$sO%[$rO%_$rO%c$tO~OV$}Oa$}Og%POo0cOv0qO~P'vOo0cOv0qO{%SO~P'vO&Y%UO~Oa!bOh!iO!X!kO!f!mOVba_bakbalbambanbaobapbasbazba{ba!xba#gba%[ba%_ba%jba%kba%lba%mba%nba%oba%pba%qba%rba%sba%zbagba!Tba!Uba%{ba!Wba![ba!Qba#[batba!mba~On%ZO~Oo%ZO~P'vOo0cO~P'vOk0eOl0fOm0dOn0dOo0mOp0nOs0rOg%wX!T%wX!U%wX%{%wX!W%wX![%wX!Q%wX#[%wX!m%wX~P)pO%{%]Og%vXz%vX!T%vX!U%vX!W%vX{%vX~Og%_Oz%`O!T%dO!U%cO~Og%_O~Oz%gO!T%dO!U%cO!W&SX~O!W%kO~Oz%lO{%nO!T%dO!U%cO![%}X~O![%rO~O![%sO~OQ#XO%`#XO%a%uO~OV%wOo0cOv0qO!PrO~P'vOQ#^OR#[O%`#^O%a%zO~OV!qa_!qaa!qah!qak!qal!qam!qan!qao!qap!qas!qaz!qa{!qa!X!qa!f!qa!x!qa#g!qa%[!qa%_!qa%j!qa%k!qa%l!qa%m!qa%n!qa%o!qa%p!qa%q!qa%r!qa%s!qa%z!qag!qa!T!qa!U!qa%{!qa!W!qa![!qa!Q!qa#[!qat!qa!m!qa~P#yOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P%SOV&OOopOvqO{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P'vOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#g$zX%[$zX%_$zX~P'vO#g#gO%[&TO%_&TO~O!f&UOh&sX%[&sXz&sX#[&sX#g&sX%_&sX#Z&sXg&sX~Oh!iO%[&WO~Okealeameaneaoeapeaseazea{ea!xea#gea%[ea%_ea%zeagea!Tea!Uea%{ea!Wea![ea!Qea#[eatea!mea~P%SOsqazqa{qa#gqa%[qa%_qa%zqa~Ok!pOl!qOm!oOn!oOo!rOp!sO!xqa~PEcO%z&YOz%yX{%yX~O%uWOz%yX{%yX~Oz&]O{wX~O{&_O~Oz%lO#g%}X%[%}X%_%}Xg%}X{%}X![%}X!m%}X%z%}X~OV0lOo0cOv0qO!PrO~P'vO%z#|O#gUa%[Ua%_Ua~Oz&hO#g&PX%[&PX%_&PXn&PX~P%SOz&kO!Q&jO#g#Wa%[#Wa%_#Wa~Oz&lO#[&nO#g&rX%[&rX%_&rXg&rX~O!f$YO!r$YO#Z&qO%uWO~O#Z&qO~Oz&sO#g&tX%[&tX%_&tX~Oz&uO#g&pX%[&pX%_&pX{&pX~O!X&wO%z&xO~Oz&|On&wX~P%SOn'PO~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO%['UO~P'vOt'YO#p'WO#q'XOP#naV#naf#nah#nao#nas#nav#na!P#na!Q#na!T#na!U#na!X#na!]#na!h#na!r#na!s#na!t#na!{#na!}#na#P#na#R#na#T#na#X#na#Z#na#^#na#_#na#a#na#c#na#l#na#o#na#s#na#u#na#z#na#}#na$P#na%X#na%o#na%p#na%t#na%u#na&Z#na&[#na&]#na&^#na&_#na&`#na&a#na&b#na&c#na&d#na&e#na&f#na&g#na&h#na&i#na&j#na%Z#na%_#na~Oz'ZO#[']O{&xX~Oh'_O!X&wO~Oh!iO{$jO!X&wO~O{'eO~P%SO%['hO%_'hO~OS'iO%['hO%_'hO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%k!]O~P!#uO%kWi~P!#uOV!aO_!aOa!bOh!iO!X!kO!f!mO%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%m!_O%n!_O~P!&pO%mWi%nWi~P!&pOa!bOh!iO!X!kO!f!mOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%mWi%nWi%oWi%pWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~OV!aO_!aO%q!aO%r!aO%s!aO~P!)nOVWi_Wi%qWi%rWi%sWi~P!)nO!T%dO!U%cOg&VXz&VX~O%z'kO%{'kO~P,eOz'mOg&UX~Og'oO~Oz'pO{'rO!W&XX~Oo0cOv0qOz'pO{'sO!W&XX~P'vO!W'uO~Om!oOn!oOo!rOp!sOkjisjizji{ji!xji#gji%[ji%_ji%zji~Ol!qO~P!.aOlji~P!.aOk0eOl0fOm0dOn0dOo0mOp0nO~Ot'wO~P!/jOV'|Og'}Oo0cOv0qO~P'vOg'}Oz(OO~Og(QO~O!U(SO~Og(TOz(OO!T%dO!U%cO~P%SOk0eOl0fOm0dOn0dOo0mOp0nOgqa!Tqa!Uqa%{qa!Wqa![qa!Qqa#[qatqa!mqa~PEcOV'|Oo0cOv0qO!W&Sa~P'vOz(WO!W&Sa~O!W(XO~Oz(WO!T%dO!U%cO!W&Sa~P%SOV(]Oo0cOv0qO![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~P'vOz(^O![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~O![(aO~Oz(^O!T%dO!U%cO![%}a~P%SOz(dO!T%dO!U%cO![&Ta~P%SOz(gO{&lX![&lX!m&lX%z&lX~O{(kO![(mO!m(nO%z(jO~OV&OOopOvqO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~P'vOz(pO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~O!f&UOh&sa%[&saz&sa#[&sa#g&sa%_&sa#Z&sag&sa~O%[(uO~OV#sOa#tO%uWO~Oz&]O{wa~OopOvqO~P'vOz(^O#g%}a%[%}a%_%}ag%}a{%}a![%}a!m%}a%z%}a~P%SOz(zO#g%hX%[%hX%_%hX%z%hX~O%z#|O#gUi%[Ui%_Ui~O#g&Pa%[&Pa%_&Pan&Pa~P'vOz(}O#g&Pa%[&Pa%_&Pan&Pa~O%uWO#g&ra%[&ra%_&rag&ra~Oz)SO#g&ra%[&ra%_&rag&ra~Og)VO~OV)WOh$WO%uWO~O#Z)XO~O%uWO#g&ta%[&ta%_&ta~Oz)ZO#g&ta%[&ta%_&ta~Oo0cOv0qO#g&pa%[&pa%_&pa{&pa~P'vOz)^O#g&pa%[&pa%_&pa{&pa~OV)`Oa)`O%uWO~O%z)eO~Ot)hO#j)gOP#hiV#hif#hih#hio#his#hiv#hi!P#hi!Q#hi!T#hi!U#hi!X#hi!]#hi!h#hi!r#hi!s#hi!t#hi!{#hi!}#hi#P#hi#R#hi#T#hi#X#hi#Z#hi#^#hi#_#hi#a#hi#c#hi#l#hi#o#hi#s#hi#u#hi#z#hi#}#hi$P#hi%X#hi%o#hi%p#hi%t#hi%u#hi&Z#hi&[#hi&]#hi&^#hi&_#hi&`#hi&a#hi&b#hi&c#hi&d#hi&e#hi&f#hi&g#hi&h#hi&i#hi&j#hi%Z#hi%_#hi~Ot)iOP#kiV#kif#kih#kio#kis#kiv#ki!P#ki!Q#ki!T#ki!U#ki!X#ki!]#ki!h#ki!r#ki!s#ki!t#ki!{#ki!}#ki#P#ki#R#ki#T#ki#X#ki#Z#ki#^#ki#_#ki#a#ki#c#ki#l#ki#o#ki#s#ki#u#ki#z#ki#}#ki$P#ki%X#ki%o#ki%p#ki%t#ki%u#ki&Z#ki&[#ki&]#ki&^#ki&_#ki&`#ki&a#ki&b#ki&c#ki&d#ki&e#ki&f#ki&g#ki&h#ki&i#ki&j#ki%Z#ki%_#ki~OV)kOn&wa~P'vOz)lOn&wa~Oz)lOn&wa~P%SOn)pO~O%Y)tO~Ot)wO#p'WO#q)vOP#niV#nif#nih#nio#nis#niv#ni!P#ni!Q#ni!T#ni!U#ni!X#ni!]#ni!h#ni!r#ni!s#ni!t#ni!{#ni!}#ni#P#ni#R#ni#T#ni#X#ni#Z#ni#^#ni#_#ni#a#ni#c#ni#l#ni#o#ni#s#ni#u#ni#z#ni#}#ni$P#ni%X#ni%o#ni%p#ni%t#ni%u#ni&Z#ni&[#ni&]#ni&^#ni&_#ni&`#ni&a#ni&b#ni&c#ni&d#ni&e#ni&f#ni&g#ni&h#ni&i#ni&j#ni%Z#ni%_#ni~OV)zOo0cOv0qO{$jO~P'vOo0cOv0qO{&xa~P'vOz*OO{&xa~OV*SOa*TOg*WO%q*UO%uWO~O{$jO&{*YO~Oh'_O~Oh!iO{$jO~O%[*_O~O%[*aO%_*aO~OV$}Oa$}Oo0cOv0qOg&Ua~P'vOz*dOg&Ua~Oo0cOv0qO{*gO!W&Xa~P'vOz*hO!W&Xa~Oo0cOv0qOz*hO{*kO!W&Xa~P'vOo0cOv0qOz*hO!W&Xa~P'vOz*hO{*kO!W&Xa~Om0dOn0dOo0mOp0nOgjikjisjizji!Tji!Uji%{ji!Wji{ji![ji#gji%[ji%_ji!Qji#[jitji!mji%zji~Ol0fO~P!NkOlji~P!NkOV'|Og*pOo0cOv0qO~P'vOn*rO~Og*pOz*tO~Og*uO~OV'|Oo0cOv0qO!W&Si~P'vOz*vO!W&Si~O!W*wO~OV(]Oo0cOv0qO![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~P'vOz*zO!T%dO!U%cO![&Ti~Oz*}O![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~O![+OO~Oa+QOo0cOv0qO![&Ti~P'vOz*zO![&Ti~O![+SO~OV+UOo0cOv0qO{&la![&la!m&la%z&la~P'vOz+VO{&la![&la!m&la%z&la~O!]+YO&n+[O![!nX~O![+^O~O{(kO![+_O~O{(kO![+_O!m+`O~OV&OOopOvqO{%hq!x%hq#g%hq%[%hq%_%hq%z%hq~P'vOz$ri{$ri!x$ri#g$ri%[$ri%_$ri%z$ri~P%SOV&OOopOvqO~P'vOV&OOo0cOv0qO#g%ha%[%ha%_%ha%z%ha~P'vOz+aO#g%ha%[%ha%_%ha%z%ha~Oz$ia#g$ia%[$ia%_$ian$ia~P%SO#g&Pi%[&Pi%_&Pin&Pi~P'vOz+dO#g#Wq%[#Wq%_#Wq~O#[+eOz$va#g$va%[$va%_$vag$va~O%uWO#g&ri%[&ri%_&rig&ri~Oz+gO#g&ri%[&ri%_&rig&ri~OV+iOh$WO%uWO~O%uWO#g&ti%[&ti%_&ti~Oo0cOv0qO#g&pi%[&pi%_&pi{&pi~P'vO{#{Oz#eX!W#eX~Oz+mO!W&uX~O!W+oO~Ot+rO#j)gOP#hqV#hqf#hqh#hqo#hqs#hqv#hq!P#hq!Q#hq!T#hq!U#hq!X#hq!]#hq!h#hq!r#hq!s#hq!t#hq!{#hq!}#hq#P#hq#R#hq#T#hq#X#hq#Z#hq#^#hq#_#hq#a#hq#c#hq#l#hq#o#hq#s#hq#u#hq#z#hq#}#hq$P#hq%X#hq%o#hq%p#hq%t#hq%u#hq&Z#hq&[#hq&]#hq&^#hq&_#hq&`#hq&a#hq&b#hq&c#hq&d#hq&e#hq&f#hq&g#hq&h#hq&i#hq&j#hq%Z#hq%_#hq~On$|az$|a~P%SOV)kOn&wi~P'vOz+yOn&wi~Oz,TO{$jO#[,TO~O#q,VOP#nqV#nqf#nqh#nqo#nqs#nqv#nq!P#nq!Q#nq!T#nq!U#nq!X#nq!]#nq!h#nq!r#nq!s#nq!t#nq!{#nq!}#nq#P#nq#R#nq#T#nq#X#nq#Z#nq#^#nq#_#nq#a#nq#c#nq#l#nq#o#nq#s#nq#u#nq#z#nq#}#nq$P#nq%X#nq%o#nq%p#nq%t#nq%u#nq&Z#nq&[#nq&]#nq&^#nq&_#nq&`#nq&a#nq&b#nq&c#nq&d#nq&e#nq&f#nq&g#nq&h#nq&i#nq&j#nq%Z#nq%_#nq~O#[,WOz%Oa{%Oa~Oo0cOv0qO{&xi~P'vOz,YO{&xi~O{#{O%z,[Og&zXz&zX~O%uWOg&zXz&zX~Oz,`Og&yX~Og,bO~O%Y,eO~O!T%dO!U%cOg&Viz&Vi~OV$}Oa$}Oo0cOv0qOg&Ui~P'vO{,hOz$la!W$la~Oo0cOv0qO{,iOz$la!W$la~P'vOo0cOv0qO{*gO!W&Xi~P'vOz,lO!W&Xi~Oo0cOv0qOz,lO!W&Xi~P'vOz,lO{,oO!W&Xi~Og$hiz$hi!W$hi~P%SOV'|Oo0cOv0qO~P'vOn,qO~OV'|Og,rOo0cOv0qO~P'vOV'|Oo0cOv0qO!W&Sq~P'vOz$gi![$gi#g$gi%[$gi%_$gig$gi{$gi!m$gi%z$gi~P%SOV(]Oo0cOv0qO~P'vOa+QOo0cOv0qO![&Tq~P'vOz,sO![&Tq~O![,tO~OV(]Oo0cOv0qO![%}q#g%}q%[%}q%_%}qg%}q{%}q!m%}q%z%}q~P'vO{,uO~OV+UOo0cOv0qO{&li![&li!m&li%z&li~P'vOz,zO{&li![&li!m&li%z&li~O!]+YO&n+[O![!na~O{(kO![,}O~OV&OOo0cOv0qO#g%hi%[%hi%_%hi%z%hi~P'vOz-OO#g%hi%[%hi%_%hi%z%hi~O%uWO#g&rq%[&rq%_&rqg&rq~Oz-RO#g&rq%[&rq%_&rqg&rq~OV)`Oa)`O%uWO!W&ua~Oz-TO!W&ua~On$|iz$|i~P%SOV)kO~P'vOV)kOn&wq~P'vOt-XOP#myV#myf#myh#myo#mys#myv#my!P#my!Q#my!T#my!U#my!X#my!]#my!h#my!r#my!s#my!t#my!{#my!}#my#P#my#R#my#T#my#X#my#Z#my#^#my#_#my#a#my#c#my#l#my#o#my#s#my#u#my#z#my#}#my$P#my%X#my%o#my%p#my%t#my%u#my&Z#my&[#my&]#my&^#my&_#my&`#my&a#my&b#my&c#my&d#my&e#my&f#my&g#my&h#my&i#my&j#my%Z#my%_#my~O%Z-]O%_-]O~P`O#q-^OP#nyV#nyf#nyh#nyo#nys#nyv#ny!P#ny!Q#ny!T#ny!U#ny!X#ny!]#ny!h#ny!r#ny!s#ny!t#ny!{#ny!}#ny#P#ny#R#ny#T#ny#X#ny#Z#ny#^#ny#_#ny#a#ny#c#ny#l#ny#o#ny#s#ny#u#ny#z#ny#}#ny$P#ny%X#ny%o#ny%p#ny%t#ny%u#ny&Z#ny&[#ny&]#ny&^#ny&_#ny&`#ny&a#ny&b#ny&c#ny&d#ny&e#ny&f#ny&g#ny&h#ny&i#ny&j#ny%Z#ny%_#ny~Oz-aO{$jO#[-aO~Oo0cOv0qO{&xq~P'vOz-dO{&xq~O%z,[Og&zaz&za~O{#{Og&zaz&za~OV*SOa*TO%q*UO%uWOg&ya~Oz-hOg&ya~O$S-lO~OV$}Oa$}Oo0cOv0qO~P'vOo0cOv0qO{-mOz$li!W$li~P'vOo0cOv0qOz$li!W$li~P'vO{-mOz$li!W$li~Oo0cOv0qO{*gO~P'vOo0cOv0qO{*gO!W&Xq~P'vOz-pO!W&Xq~Oo0cOv0qOz-pO!W&Xq~P'vOs-sO!T%dO!U%cOg&Oq!W&Oq![&Oqz&Oq~P!/jOa+QOo0cOv0qO![&Ty~P'vOz$ji![$ji~P%SOa+QOo0cOv0qO~P'vOV+UOo0cOv0qO~P'vOV+UOo0cOv0qO{&lq![&lq!m&lq%z&lq~P'vO{(kO![-xO!m-yO%z-wO~OV&OOo0cOv0qO#g%hq%[%hq%_%hq%z%hq~P'vO%uWO#g&ry%[&ry%_&ryg&ry~OV)`Oa)`O%uWO!W&ui~Ot-}OP#m!RV#m!Rf#m!Rh#m!Ro#m!Rs#m!Rv#m!R!P#m!R!Q#m!R!T#m!R!U#m!R!X#m!R!]#m!R!h#m!R!r#m!R!s#m!R!t#m!R!{#m!R!}#m!R#P#m!R#R#m!R#T#m!R#X#m!R#Z#m!R#^#m!R#_#m!R#a#m!R#c#m!R#l#m!R#o#m!R#s#m!R#u#m!R#z#m!R#}#m!R$P#m!R%X#m!R%o#m!R%p#m!R%t#m!R%u#m!R&Z#m!R&[#m!R&]#m!R&^#m!R&_#m!R&`#m!R&a#m!R&b#m!R&c#m!R&d#m!R&e#m!R&f#m!R&g#m!R&h#m!R&i#m!R&j#m!R%Z#m!R%_#m!R~Oo0cOv0qO{&xy~P'vOV*SOa*TO%q*UO%uWOg&yi~O$S-lO%Z.VO%_.VO~OV.aOh._O!X.^O!].`O!h.YO!s.[O!t.[O%p.XO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O~Oo0cOv0qOz$lq!W$lq~P'vO{.fOz$lq!W$lq~Oo0cOv0qO{*gO!W&Xy~P'vOz.gO!W&Xy~Oo0cOv.kO~P'vOs-sO!T%dO!U%cOg&Oy!W&Oy![&Oyz&Oy~P!/jO{(kO![.nO~O{(kO![.nO!m.oO~OV*SOa*TO%q*UO%uWO~Oh.tO!f.rOz$TX#[$TX%j$TXg$TX~Os$TX{$TX!W$TX![$TX~P$-bO%o.vO%p.vOs$UXz$UX{$UX#[$UX%j$UX!W$UXg$UX![$UX~O!h.xO~Oz.|O#[/OO%j.yOs&|X{&|X!W&|Xg&|X~Oa/RO~P$)zOh.tOs&}Xz&}X{&}X#[&}X%j&}X!W&}Xg&}X![&}X~Os/VO{$jO~Oo0cOv0qOz$ly!W$ly~P'vOo0cOv0qO{*gO!W&X!R~P'vOz/ZO!W&X!R~Og&RXs&RX!T&RX!U&RX!W&RX![&RXz&RX~P!/jOs-sO!T%dO!U%cOg&Qa!W&Qa![&Qaz&Qa~O{(kO![/^O~O!f.rOh$[as$[az$[a{$[a#[$[a%j$[a!W$[ag$[a![$[a~O!h/eO~O%o.vO%p.vOs$Uaz$Ua{$Ua#[$Ua%j$Ua!W$Uag$Ua![$Ua~O%j.yOs$Yaz$Ya{$Ya#[$Ya!W$Yag$Ya![$Ya~Os&|a{&|a!W&|ag&|a~P$)nOz/jOs&|a{&|a!W&|ag&|a~O!W/mO~Og/mO~O{/oO~O![/pO~Oo0cOv0qO{*gO!W&X!Z~P'vO{/sO~O%z/tO~P$-bOz/uO#[/OO%j.yOg'PX~Oz/uOg'PX~Og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)nOz/zO#[/OO%j.yO!['Oa~Og'Pa~P$)nOz0SOg'Pa~Oa0UO!['Oi~P$)zOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-bO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)nO{0^O~Oa0UO!['Oq~P$)zOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)zOa0UO!['Oy~P$)zO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",goto:"!=j'QPPPPPP'RP'Z*s+[+t,_,y-fP.SP'Z.r.r'ZPPP'Z2[PPPPPP2[5PPP5PP7b7k=sPP=v>h>kPP'Z'ZPP>zPP'Z'ZPP'Z'Z'Z'Z'Z?O?w'ZP?zP@QDXGuGyPG|HWH['ZPPPH_Hk'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPHqH}IVPI^IdPI^PI^I^PPPI^PKrPK{LVL]KrPI^LfPI^PLmLsPLwM]MzNeLwLwNkNxLwLwLwLw! ^! d! g! l! o! y!!P!!]!!o!!u!#P!#V!#s!#y!$P!$Z!$a!$g!$y!%T!%Z!%a!%k!%q!%w!%}!&T!&Z!&e!&k!&u!&{!'U!'[!'k!'s!'}!(UPPPPPPPPPPP!([!(_!(e!(n!(x!)TPPPPPPPPPPPP!-u!/Z!3^!6oPP!6w!7W!7a!8Y!8P!8c!8i!8l!8o!8r!8z!9jPPPPPPPPPPPPPPPPP!9m!9q!9wP!:]!:a!:m!:v!;S!;j!;m!;p!;v!;|!<S!<VP!<_!<h!=d!=g]eOn#g$j)t,P'}`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r{!cQ#c#p$R$d$p%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g}!dQ#c#p$R$d$p$u%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!P!eQ#c#p$R$d$p$u$v%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!R!fQ#c#p$R$d$p$u$v$w%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!T!gQ#c#p$R$d$p$u$v$w$x%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!V!hQ#c#p$R$d$p$u$v$w$x$y%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!Z!hQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g'}TOTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r&eVOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0n0r%oXOYZ[dnrxy}!P!Q!U!i!k#[#d#g#y#{#}$Q$h$j$}%S%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/V/Z0i0j0kQ#vqQ/[.kR0o0q't`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rh#jhz{$W$Z&l&q)S)X+f+g-RW#rq&].k0qQ$]|Q$a!OQ$n!VQ$o!WW$|!i'm*d,gS&[#s#tQ'S$iQ(s&UQ)U&nU)Y&s)Z+jW)a&w+m-T-{Q*Q']W*R'_,`-h.TQ+l)`S,_*S*TQ-Q+eQ-_,TQ-c,WQ.R-al.W-l.^._.a.z.|/R/j/o/t/y0U0Z0^Q/S.`Q/a.tQ/l/OU0P/u0S0[X0V/z0W0_0`R&Z#r!_!wYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZR%^!vQ!{YQ%x#[Q&d#}Q&g$QR,{+YT.j-s/s!Y!jQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gQ&X#kQ'c$oR*^'dR'l$|Q%V!mR/_.r'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rS#a_#b!P.[-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rT#a_#bT#^^#_R(o%xa(l%x(n(o+`,{-y-z.oT+[(k+]R-z,{Q$PsQ+l)aQ,^*RR-e,_X#}s$O$P&fQ&y$aQ'a$nQ'd$oR)s'SQ)b&wV-S+m-T-{ZgOn$j)t,PXkOn)t,PQ$k!TQ&z$bQ&{$cQ'^$mQ'b$oQ)q'RQ)x'WQ){'XQ)|'YQ*Z'`S*]'c'dQ+s)gQ+u)hQ+v)iQ+z)oS+|)r*[Q,Q)vQ,R)wS,S)y)zQ,d*^Q-V+rQ-W+tQ-Y+{S-Z+},OQ-`,UQ-b,VQ-|-XQ.O-[Q.P-^Q.Q-_Q.p-}Q.q.RQ/W.dR/r/XWkOn)t,PR#mjQ'`$nS)r'S'aR,O)sQ,]*RR-f,^Q*['`Q+})rR-[,OZiOjn)t,PQ'f$pR*`'gT-j,e-ku.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^t.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^Q/S.`X0V/z0W0_0`!P.Z-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`Q.w.YR/f.xg.z.].{/b/i/n/|0O0Q0]0a0bu.b-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^X.u.W.b/a0PR/c.tV0R/u0S0[R/X.dQnOS#on,PR,P)tQ&^#uR(x&^S%m#R#wS(_%m(bT(b%p&`Q%a!yQ%h!}W(P%a%h(U(YQ(U%eR(Y%jQ&i$RR)O&iQ(e%qQ*{(`T+R(e*{Q'n%OR*e'nS'q%R%SY*i'q*j,m-q.hU*j'r's'tU,m*k*l*mS-q,n,oR.h-rQ#Y]R%t#YQ#_^R%y#_Q(h%vS+W(h+XR+X(iQ+](kR,|+]Q#b_R%{#bQ#ebQ%}#cW&Q#e%}({+bQ({&cR+b0gQ$OsS&e$O&fR&f$PQ&v$_R)_&vQ&V#jR(t&VQ&m$VS)T&m+hR+h)UQ$Z{R&p$ZQ&t$]R)[&tQ+n)bR-U+nQ#hfR&S#hQ)f&zR+q)fQ&}$dS)m&})nR)n'OQ'V$kR)u'VQ'[$lS*P'[,ZR,Z*QQ,a*VR-i,aWjOn)t,PR#ljQ-k,eR.U-kd.{.]/b/i/n/|0O0Q0]0a0bR/h.{U.s.W/a0PR/`.sQ/{/nS0X/{0YR0Y/|S/v/b/cR0T/vQ.}.]R/k.}R!ZPXmOn)t,PWlOn)t,PR'T$jYfOn$j)t,PR&R#g[sOn#g$j)t,PR&d#}&dQOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0n0rQ!nTQ#caQ#poU$Rt%c(SS$d!R$gQ$p!XQ$u!cQ$v!dQ$w!eQ$x!fQ$y!gQ$z!hQ%e!zQ%j#OQ%p#SQ%q#TQ&`#xQ'O$eQ'g$qQ(q&OU(|&h(}+cW)j&|)l+x+yQ*o'|Q*x(]Q+w)kQ,v+QR0g0lQ!yYQ!}ZQ$b!PQ$c!QQ%R!kQ't%S^'{%`%g(O(W*q*t*v^*f'p*h,k,l-p.g/ZQ*l'rQ*m'sQ+t)gQ,j*gQ,n*kQ-n,hQ-o,iQ-r,oQ.e-mR/Y.f[bOn#g$j)t,P!^!vYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZQ#R[Q#fdS#wrxQ$UyW$_}$Q'P)pS$l!U$hW${!i'm*d,gS%v#[+Y`&P#d%|(p(r(z+a-O0kQ&a#yQ&b#{Q&c#}Q'j$}Q'z%^W([%l(^*y*}Q(`%nQ(i%wQ(v&ZS(y&_0iQ)P&jQ)Q&kU)]&u)^+kQ)d&xQ)y'WY)}'Z*O,X,Y-dQ*b'lS*n'w0jW+P(d*z,s,wW+T(g+V,y,zQ+p)eQ,U)zQ,c*YQ,x+UQ-P+dQ-e,]Q-v,uQ.S-fR/q/VhUOn#d#g$j%|&_'w(p(r)t,P%U!uYZ[drxy}!P!Q!U!i!k#[#y#{#}$Q$h$}%S%^%`%g%l%n%w&Z&j&k&u&x'P'W'Z'l'm'p'r's(O(W(^(d(g(z)^)e)g)p)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/V/Z0i0j0kQ#qpW%W!o!s0d0nQ%X!pQ%Y!qQ%[!tQ%f0cS'v%Z0hQ'x0eQ'y0fQ,p*rQ-u,qS.i-s/sR0p0rU#uq.k0qR(w&][cOn#g$j)t,PZ!xY#[#}$Q+YQ#W[Q#zrR$TxQ%b!yQ%i!}Q%o#RQ'j${Q(V%eQ(Z%jQ(c%pQ(f%qQ*|(`Q,f*bQ-t,pQ.m-uR/].lQ$StQ(R%cR*s(SQ.l-sR/}/sR#QZR#V[R%Q!iQ%O!iV*c'm*d,g!Z!lQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gR%T!kT#]^#_Q%x#[R,{+YQ(m%xS+_(n(oQ,}+`Q-x,{S.n-y-zR/^.oT+Z(k+]Q$`}Q&g$QQ)o'PR+{)pQ$XzQ)W&qR+i)XQ$XzQ&o$WQ)W&qR+i)XQ#khW$Vz$W&q)XQ$[{Q&r$ZZ)R&l)S+f+g-RR$^|R)c&wXlOn)t,PQ$f!RR'Q$gQ$m!UR'R$hR*X'_Q*V'_V-g,`-h.TQ.d-lQ/P.^R/Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",nodeNames:"\u26A0 print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:277,context:Si,nodeProps:[["isolate",-5,4,71,72,73,77,""],["group",-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,"Statement Statement",-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,"Expression",-10,114,116,119,121,122,126,128,133,135,138,"Statement",-9,143,144,147,148,150,151,152,153,154,"Pattern"],["openedBy",23,"(",54,"[",58,"{"],["closedBy",24,")",55,"]",59,"}"]],propSources:[$i],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[pi,Ti,di,qi,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:O=>mi[O]||-1}],tokenPrec:7668}),A=new B,C=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function c(O){return(i,a,n)=>{if(n)return!1;let e=i.node.getChild("VariableName");return e&&a(e,O),!0}}var hi={FunctionDefinition:c("function"),ClassDefinition:c("class"),ForStatement(O,i,a){if(a){for(let n=O.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")i(n,"variable");else if(n.name=="in")break}},ImportStatement(O,i){var e,r;let{node:a}=O,n=((e=a.firstChild)==null?void 0:e.name)=="from";for(let t=a.getChild("import");t;t=t.nextSibling)t.name=="VariableName"&&((r=t.nextSibling)==null?void 0:r.name)!="as"&&i(t,n?"variable":"namespace")},AssignStatement(O,i){for(let a=O.node.firstChild;a;a=a.nextSibling)if(a.name=="VariableName")i(a,"variable");else if(a.name==":"||a.name=="AssignOp")break},ParamList(O,i){for(let a=null,n=O.node.firstChild;n;n=n.nextSibling)n.name=="VariableName"&&(!a||!/\*|AssignOp/.test(a.name))&&i(n,"variable"),a=n},CapturePattern:c("variable"),AsPattern:c("variable"),__proto__:null};function N(O,i){let a=A.get(i);if(a)return a;let n=[],e=!0;function r(t,o){let P=O.sliceString(t.from,t.to);n.push({label:P,type:o})}return i.cursor(aO.IncludeAnonymous).iterate(t=>{if(t.name){let o=hi[t.name];if(o&&o(t,r,e)||!e&&C.has(t.name))return!1;e=!1}else if(t.to-t.from>8192){for(let o of N(O,t.node))n.push(o);return!1}}),A.set(i,n),n}var I=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,D=["String","FormatString","Comment","PropertyName"];function H(O){let i=M(O.state).resolveInner(O.pos,-1);if(D.indexOf(i.name)>-1)return null;let a=i.name=="VariableName"||i.to-i.from<20&&I.test(O.state.sliceDoc(i.from,i.to));if(!a&&!O.explicit)return null;let n=[];for(let e=i;e;e=e.parent)C.has(e.name)&&(n=n.concat(N(O.state.doc,e)));return{options:n,from:a?i.from:O.pos,validFor:I}}var gi=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(O=>({label:O,type:"constant"})).concat("ArithmeticError.AssertionError.AttributeError.BaseException.BlockingIOError.BrokenPipeError.BufferError.BytesWarning.ChildProcessError.ConnectionAbortedError.ConnectionError.ConnectionRefusedError.ConnectionResetError.DeprecationWarning.EOFError.Ellipsis.EncodingWarning.EnvironmentError.Exception.FileExistsError.FileNotFoundError.FloatingPointError.FutureWarning.GeneratorExit.IOError.ImportError.ImportWarning.IndentationError.IndexError.InterruptedError.IsADirectoryError.KeyError.KeyboardInterrupt.LookupError.MemoryError.ModuleNotFoundError.NameError.NotADirectoryError.NotImplemented.NotImplementedError.OSError.OverflowError.PendingDeprecationWarning.PermissionError.ProcessLookupError.RecursionError.ReferenceError.ResourceWarning.RuntimeError.RuntimeWarning.StopAsyncIteration.StopIteration.SyntaxError.SyntaxWarning.SystemError.SystemExit.TabError.TimeoutError.TypeError.UnboundLocalError.UnicodeDecodeError.UnicodeEncodeError.UnicodeError.UnicodeTranslateError.UnicodeWarning.UserWarning.ValueError.Warning.ZeroDivisionError".split(".").map(O=>({label:O,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(O=>({label:O,type:"class"}))).concat("abs.aiter.all.anext.any.ascii.bin.breakpoint.callable.chr.compile.delattr.dict.dir.divmod.enumerate.eval.exec.exit.filter.format.getattr.globals.hasattr.hash.help.hex.id.input.isinstance.issubclass.iter.len.license.locals.max.min.next.oct.open.ord.pow.print.property.quit.repr.reversed.round.setattr.slice.sorted.sum.vars.zip".split(".").map(O=>({label:O,type:"function"}))),ci=[d("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),d("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),d("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),d("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),d(`if \${}:
`,{label:"if",detail:"block",type:"keyword"}),d("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),d("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),d("import ${module}",{label:"import",detail:"statement",type:"keyword"}),d("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],L=dO(D,oO(gi.concat(ci)));function k(O){let{node:i,pos:a}=O,n=O.lineIndent(a,-1),e=null;for(;;){let r=i.childBefore(a);if(r)if(r.name=="Comment")a=r.from;else if(r.name=="Body"||r.name=="MatchBody")O.baseIndentFor(r)+O.unit<=n&&(e=r),i=r;else if(r.name=="MatchClause")i=r;else if(r.type.is("Statement"))i=r;else break;else break}return e}function u(O,i){let a=O.baseIndentFor(i),n=O.lineAt(O.pos,-1),e=n.from+n.text.length;return/^\s*($|#)/.test(n.text)&&O.node.to<e+100&&!/\S/.test(O.state.sliceDoc(e,O.node.to))&&O.lineIndent(O.pos,-1)<=a||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(O.textAfter)&&O.lineIndent(O.pos,-1)>a?null:a+O.unit}var X=eO.define({name:"python",parser:J.configure({props:[OO.add({Body:O=>u(O,/^\s*(#|$)/.test(O.textAfter)&&k(O)||O.node)??O.continue(),MatchBody:O=>u(O,k(O)||O.node)??O.continue(),IfStatement:O=>/^\s*(else:|elif )/.test(O.textAfter)?O.baseIndent:O.continue(),"ForStatement WhileStatement":O=>/^\s*else:/.test(O.textAfter)?O.baseIndent:O.continue(),TryStatement:O=>/^\s*(except[ :]|finally:|else:)/.test(O.textAfter)?O.baseIndent:O.continue(),MatchStatement:O=>/^\s*case /.test(O.textAfter)?O.baseIndent+O.unit:O.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":y({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":y({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":y({closing:"]"}),MemberExpression:O=>O.baseIndent+O.unit,"String FormatString":()=>null,Script:O=>{let i=k(O);return(i&&u(O,i))??O.continue()}}),K.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":iO,Body:(O,i)=>({from:O.from+1,to:O.to-(O.to==i.doc.length?0:1)}),"String FormatString":(O,i)=>({from:i.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Xi(){return new tO(X,[X.data.of({autocomplete:H}),X.data.of({autocomplete:L})])}export{J as a,X as i,H as n,Xi as r,L as t};
import{J as e,i as r,nt as a,q as p,r as u,s as m,u as S}from"./dist-DBwNzi3C.js";import{n as b}from"./dist-TiFCI16_.js";import{a as c}from"./dist-B0VqT_4z.js";var Q=u.deserialize({version:14,states:"%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",stateData:"$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",goto:"!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso",nodeNames:"\u26A0 Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity",maxTerm:36,nodeProps:[["isolate",-3,3,13,17,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",tokenizers:[6,7,new r("b~RP#q#rU~XP#q#r[~aOT~~",17,4),new r("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~",72,2),new r("[~RPwxU~ZOp~~",11,15),new r("[~RPrsU~ZOn~~",11,14),new r("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~",66,35),new r("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~",66,33)],topRules:{Content:[0,1],Attribute:[1,7]},tokenPrec:157}),P=c.parser.configure({top:"SingleExpression"}),o=Q.configure({props:[p({Text:e.content,Is:e.definitionOperator,AttributeName:e.attributeName,VueAttributeName:e.keyword,Identifier:e.variableName,"AttributeValue ScriptAttributeValue":e.attributeValue,Entity:e.character,"{{ }}":e.brace,"@ :":e.punctuation})]}),i={parser:P},y=o.configure({wrap:a((O,t)=>O.name=="InterpolationContent"?i:null)}),g=o.configure({wrap:a((O,t)=>O.name=="AttributeScript"?i:null),top:"Attribute"}),X={parser:y},f={parser:g},n=b();function s(O){return O.configure({dialect:"selfClosing",wrap:a(R)},"vue")}var l=s(n.language);function R(O,t){switch(O.name){case"Attribute":return/^(@|:|v-)/.test(t.read(O.from,O.from+2))?f:null;case"Text":return X}return null}function T(O={}){let t=n;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof m))throw RangeError("The base option must be the result of calling html(...)");t=O.base}return new S(t.language==n.language?l:s(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["{",'"']}})])}export{l as n,T as t};
import{t as g}from"./chunk-LvLJmgfZ.js";var p=g((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"})),f=g((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var t=p();function R(r){return t.relativeFirstCharacters.indexOf(r[0])>-1}function m(r){return r.replace(t.ctrlCharactersRegex,"").replace(t.htmlEntitiesRegex,function(l,a){return String.fromCharCode(a)})}function x(r){return URL.canParse(r)}function s(r){try{return decodeURIComponent(r)}catch{return r}}function C(r){if(!r)return t.BLANK_URL;var l,a=s(r.trim());do a=m(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),a=s(a),l=a.match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex);while(l&&l.length>0);var i=a;if(!i)return t.BLANK_URL;if(R(i))return i;var h=i.trimStart(),u=h.match(t.urlSchemeRegex);if(!u)return i;var n=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(n))return t.BLANK_URL;var o=h.replace(/\\/g,"/");if(n==="mailto:"||n.includes("://"))return o;if(n==="http:"||n==="https:"){if(!x(o))return t.BLANK_URL;var c=new URL(o);return c.protocol=c.protocol.toLowerCase(),c.hostname=c.hostname.toLowerCase(),c.toString()}return o}e.sanitizeUrl=C}));export{f as t};
import{D as U,H as _,J as m,N as Z,at as B,h as D,n as R,q as M,r as F,s as J,t as K,u as H,zt as L}from"./dist-DBwNzi3C.js";var W=1,OO=2,tO=3,eO=4,oO=5,rO=36,nO=37,aO=38,lO=11,sO=13;function iO(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function cO(O){return O==9||O==10||O==13||O==32}var E=null,z=null,G=0;function w(O,t){let e=O.pos+t;if(z==O&&G==e)return E;for(;cO(O.peek(t));)t++;let o="";for(;;){let s=O.peek(t);if(!iO(s))break;o+=String.fromCharCode(s),t++}return z=O,G=e,E=o||null}function A(O,t){this.name=O,this.parent=t}var $O=new K({start:null,shift(O,t,e,o){return t==W?new A(w(o,1)||"",O):O},reduce(O,t){return t==lO&&O?O.parent:O},reuse(O,t,e,o){let s=t.type.id;return s==W||s==sO?new A(w(o,1)||"",O):O},strict:!1}),SO=new R((O,t)=>{if(O.next==60){if(O.advance(),O.next==47){O.advance();let e=w(O,0);if(!e)return O.acceptToken(oO);if(t.context&&e==t.context.name)return O.acceptToken(OO);for(let o=t.context;o;o=o.parent)if(o.name==e)return O.acceptToken(tO,-2);O.acceptToken(eO)}else if(O.next!=33&&O.next!=63)return O.acceptToken(W)}},{contextual:!0});function Q(O,t){return new R(e=>{let o=0,s=t.charCodeAt(0);O:for(;!(e.next<0);e.advance(),o++)if(e.next==s){for(let a=1;a<t.length;a++)if(e.peek(a)!=t.charCodeAt(a))continue O;break}o&&e.acceptToken(O)})}var pO=Q(rO,"-->"),gO=Q(nO,"?>"),mO=Q(aO,"]]>"),uO=M({Text:m.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":m.angleBracket,TagName:m.tagName,"MismatchedCloseTag/TagName":[m.tagName,m.invalid],AttributeName:m.attributeName,AttributeValue:m.attributeValue,Is:m.definitionOperator,"EntityReference CharacterReference":m.character,Comment:m.blockComment,ProcessingInst:m.processingInstruction,DoctypeDecl:m.documentMeta,Cdata:m.special(m.string)}),xO=F.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(hO#tO'#CnO(vO&jO'#CnOOOO1G.q1G.qO)UOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO)^O#tO,59YOOOO,59Y,59YOOOO'#C{'#C{O)lO&jO,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.tOOOO-E6y-E6y",stateData:")z~OPQOSVOTWOVWOWWOXWOiXOyPO!QTO!SUO~OvZOx]O~O^`Oz^O~OPQOQcOSVOTWOVWOWWOXWOyPO!QTO!SUO~ORdO~P!SOteO!PgO~OuhO!RjO~O^lOz^O~OvZOxoO~O^qOz^O~O[vO`sOdwOz^O~ORyO~P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",goto:"%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:"\u26A0 StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",maxTerm:50,context:$O,nodeProps:[["closedBy",1,"SelfCloseEndTag EndTag",13,"CloseTag MissingCloseTag"],["openedBy",12,"StartTag StartCloseTag",19,"OpenTag",20,"StartTag"],["isolate",-6,13,18,19,21,22,24,""]],propSources:[uO],skippedNodes:[0],repeatNodeCount:9,tokenData:"!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q#T#o4n#o%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U$q4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qi$zXVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qa%nVVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%gP&YTVPOv&Tw!^&T!_;'S&T;'S;=`&i<%lO&TP&lP;=`<%l&T`&tS!O`Ov&ox;'S&o;'S;=`'Q<%lO&o`'TP;=`<%l&oa'ZP;=`<%l%gX'eWVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^W(ST|WOr'}sv'}w;'S'};'S;=`(c<%lO'}W(fP;=`<%l'}X(lP;=`<%l'^h(vV|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oh)`P;=`<%l(oi)fP;=`<%l$qo)t`VP|W!O`zUOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk+PV{YVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%g~+iast,n![!]-r!c!}-r#R#S-r#T#o-r%W%o-r%p&a-r&b1p-r4U4d-r4e$IS-r$I`$Ib-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~,qQ!Q![,w#l#m-V~,zQ!Q![,w!]!^-Q~-VOX~~-YR!Q![-c!c!i-c#T#Z-c~-fS!Q![-c!]!^-Q!c!i-c#T#Z-c~-ug}!O-r!O!P-r!Q![-r![!]-r!]!^/^!c!}-r#R#S-r#T#o-r$}%O-r%W%o-r%p&a-r&b1p-r1p4U-r4U4d-r4e$IS-r$I`$Ib-r$Je$Jg-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~/cOW~~/fP;=`<%l-rk/rW}bVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^k0eZVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O1W!O!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk1aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a2S!a;'S$q;'S;=`)c<%lO$qk2_X!PQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qm3TZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a3v!a;'S$q;'S;=`)c<%lO$qm4RXdSVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo4{!P`S^QVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O4n!O!P4n!P!Q$q!Q![4n![!]4n!]!^$q!^!_(o!_!c$q!c!}4n!}#R$q#R#S4n#S#T$q#T#o4n#o$}$q$}%O4n%O%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U4n4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Je$q$Je$Jg4n$Jg$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qo8RP;=`<%l4ni8]Y|W!O`Oq(oqr8{rs&osv(owx'}x!a(o!a!b!#U!b;'S(o;'S;=`)]<%lO(oi9S_|W!O`Or(ors&osv(owx'}x}(o}!O:R!O!f(o!f!g;e!g!}(o!}#ODh#O#W(o#W#XLp#X;'S(o;'S;=`)]<%lO(oi:YX|W!O`Or(ors&osv(owx'}x}(o}!O:u!O;'S(o;'S;=`)]<%lO(oi;OV!QP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oi;lX|W!O`Or(ors&osv(owx'}x!q(o!q!r<X!r;'S(o;'S;=`)]<%lO(oi<`X|W!O`Or(ors&osv(owx'}x!e(o!e!f<{!f;'S(o;'S;=`)]<%lO(oi=SX|W!O`Or(ors&osv(owx'}x!v(o!v!w=o!w;'S(o;'S;=`)]<%lO(oi=vX|W!O`Or(ors&osv(owx'}x!{(o!{!|>c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[SO,pO,gO,mO,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function v(O,t){let e=t&&t.getChild("TagName");return e?O.sliceString(e.from,e.to):""}function y(O,t){let e=t&&t.firstChild;return!e||e.name!="OpenTag"?"":v(O,e)}function fO(O,t,e){let o=t&&t.getChildren("Attribute").find(a=>a.from<=e&&a.to>=e),s=o&&o.getChild("AttributeName");return s?O.sliceString(s.from,s.to):""}function X(O){for(let t=O&&O.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function qO(O,t){var s;let e=_(O).resolveInner(t,-1),o=null;for(let a=e;!o&&a.parent;a=a.parent)(a.name=="OpenTag"||a.name=="CloseTag"||a.name=="SelfClosingTag"||a.name=="MismatchedCloseTag")&&(o=a);if(o&&(o.to>t||o.lastChild.type.isError)){let a=o.parent;if(e.name=="TagName")return o.name=="CloseTag"||o.name=="MismatchedCloseTag"?{type:"closeTag",from:e.from,context:a}:{type:"openTag",from:e.from,context:X(a)};if(e.name=="AttributeName")return{type:"attrName",from:e.from,context:o};if(e.name=="AttributeValue")return{type:"attrValue",from:e.from,context:o};let l=e==o||e.name=="Attribute"?e.childBefore(t):e;return(l==null?void 0:l.name)=="StartTag"?{type:"openTag",from:t,context:X(a)}:(l==null?void 0:l.name)=="StartCloseTag"&&l.to<=t?{type:"closeTag",from:t,context:a}:(l==null?void 0:l.name)=="Is"?{type:"attrValue",from:t,context:o}:l?{type:"attrName",from:t,context:o}:null}else if(e.name=="StartCloseTag")return{type:"closeTag",from:t,context:e.parent};for(;e.parent&&e.to==t&&!((s=e.lastChild)!=null&&s.type.isError);)e=e.parent;return e.name=="Element"||e.name=="Text"||e.name=="Document"?{type:"tag",from:t,context:e.name=="Element"?e:X(e)}:null}var dO=class{constructor(O,t,e){this.attrs=t,this.attrValues=e,this.children=[],this.name=O.name,this.completion=Object.assign(Object.assign({type:"type"},O.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"</"+this.name+">",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=O.textContent?O.textContent.map(o=>({label:o,type:"text"})):[]}},V=/^[:\-\.\w\u00b7-\uffff]*$/;function k(O){return Object.assign(Object.assign({type:"property"},O.completion||{}),{label:O.name})}function Y(O){return typeof O=="string"?{label:`"${O}"`,type:"constant"}:/^"/.test(O.label)?O:Object.assign(Object.assign({},O),{label:`"${O.label}"`})}function I(O,t){let e=[],o=[],s=Object.create(null);for(let n of t){let r=k(n);e.push(r),n.global&&o.push(r),n.values&&(s[n.name]=n.values.map(Y))}let a=[],l=[],u=Object.create(null);for(let n of O){let r=o,g=s;n.attributes&&(r=r.concat(n.attributes.map(c=>typeof c=="string"?e.find(S=>S.label==c)||{label:c,type:"property"}:(c.values&&(g==s&&(g=Object.create(g)),g[c.name]=c.values.map(Y)),k(c)))));let i=new dO(n,r,g);u[i.name]=i,a.push(i),n.top&&l.push(i)}l.length||(l=a);for(let n=0;n<a.length;n++){let r=O[n],g=a[n];if(r.children)for(let i of r.children)u[i]&&g.children.push(u[i]);else g.children=a}return n=>{var f,q,x,d;let{doc:r}=n.state,g=qO(n.state,n.pos);if(!g||g.type=="tag"&&!n.explicit)return null;let{type:i,from:c,context:S}=g;if(i=="openTag"){let $=l,p=y(r,S);return p&&($=((f=u[p])==null?void 0:f.children)||a),{from:c,options:$.map(P=>P.completion),validFor:V}}else if(i=="closeTag"){let $=y(r,S);return $?{from:c,to:n.pos+(r.sliceString(n.pos,n.pos+1)==">"?1:0),options:[((q=u[$])==null?void 0:q.closeNameCompletion)||{label:$+">",type:"type"}],validFor:V}:null}else{if(i=="attrName")return{from:c,options:((x=u[v(r,S)])==null?void 0:x.attrs)||o,validFor:V};if(i=="attrValue"){let $=fO(r,S,c);if(!$)return null;let p=(((d=u[v(r,S)])==null?void 0:d.attrValues)||s)[$];return!p||!p.length?null:{from:c,to:n.pos+(r.sliceString(n.pos,n.pos+1)=='"'?1:0),options:p,validFor:/^"[^"]*"?$/}}else if(i=="tag"){let $=y(r,S),p=u[$],P=[],C=S&&S.lastChild;$&&(!C||C.name!="CloseTag"||v(r,C)!=$)&&P.push(p?p.closeCompletion:{label:"</"+$+">",type:"type",boost:2});let b=P.concat(((p==null?void 0:p.children)||(S?a:l)).map(T=>T.openCompletion));if(S&&(p!=null&&p.text.length)){let T=S.firstChild;T.to>n.pos-20&&!/\S/.test(n.state.sliceDoc(T.to,n.pos))&&(b=b.concat(p.text))}return{from:c,options:b,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}}var h=J.define({name:"xml",parser:xO.configure({props:[Z.add({Element(O){let t=/^\s*<\//.test(O.textAfter);return O.lineIndent(O.node.from)+(t?0:O.unit)},"OpenTag CloseTag SelfClosingTag"(O){return O.column(O.node.from)+O.unit}}),U.add({Element(O){let t=O.firstChild,e=O.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:e.name=="CloseTag"?e.from:O.to}}}),D.add({"OpenTag CloseTag":O=>O.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/$/}});function PO(O={}){let t=[h.data.of({autocomplete:I(O.elements||[],O.attributes||[])})];return O.autoCloseTags!==!1&&t.push(j),new H(h,t)}function N(O,t,e=O.length){if(!t)return"";let o=t.firstChild,s=o&&o.getChild("TagName");return s?O.sliceString(s.from,Math.min(s.to,e)):""}var j=B.inputHandler.of((O,t,e,o,s)=>{if(O.composing||O.state.readOnly||t!=e||o!=">"&&o!="/"||!h.isActiveAt(O.state,t,-1))return!1;let a=s(),{state:l}=a,u=l.changeByRange(n=>{var S,f,q;let{head:r}=n,g=l.doc.sliceString(r-1,r)==o,i=_(l).resolveInner(r,-1),c;if(g&&o==">"&&i.name=="EndTag"){let x=i.parent;if(((f=(S=x.parent)==null?void 0:S.lastChild)==null?void 0:f.name)!="CloseTag"&&(c=N(l.doc,x.parent,r)))return{range:n,changes:{from:r,to:r+(l.doc.sliceString(r,r+1)===">"?1:0),insert:`</${c}>`}}}else if(g&&o=="/"&&i.name=="StartCloseTag"){let x=i.parent;if(i.from==r-2&&((q=x.lastChild)==null?void 0:q.name)!="CloseTag"&&(c=N(l.doc,x,r))){let d=r+(l.doc.sliceString(r,r+1)===">"?1:0),$=`${c}>`;return{range:L.cursor(r+$.length,-1),changes:{from:r,to:d,insert:$}}}}return{range:n}});return u.changes.empty?!1:(O.dispatch([a,l.update(u,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{h as i,I as n,PO as r,j as t};

Sorry, the diff of this file is too big to display

import{Bt as ue,D as lt,G as ce,H as N,I as de,J as m,N as pe,O as me,Q as q,R as ge,St as ke,Ut as xe,X as E,Z as ht,at as Le,c as be,d as Se,en as O,et as Ce,l as ft,nt as we,q as ut,tt as v,u as ct,v as ye,zt as H}from"./dist-DBwNzi3C.js";import{t as Ae}from"./dist-ChS0Dc_R.js";import{n as Ie,r as Te}from"./dist-TiFCI16_.js";var dt=class le{static create(e,r,n,s,i){return new le(e,r,n,s+(s<<8)+e+(r<<4)|0,i,[],[])}constructor(e,r,n,s,i,o,a){this.type=e,this.value=r,this.from=n,this.hash=s,this.end=i,this.children=o,this.positions=a,this.hashProp=[[E.contextHash,s]]}addChild(e,r){e.prop(E.contextHash)!=this.hash&&(e=new v(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new v(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(s,i,o)=>new v(q.none,s,i,o,this.hashProp)})}},u;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(u||(u={}));var ve=class{constructor(t,e){this.start=t,this.content=e,this.marks=[],this.parsers=[]}},Be=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}skipSpace(t){return R(this.text,t)}reset(t){for(this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}moveBaseColumn(t){this.baseIndent=t,this.basePos=this.findColumn(t)}addMarker(t){this.markers.push(t)}countIndent(t,e=0,r=0){for(let n=e;n<t;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return r}findColumn(t){let e=0;for(let r=0;e<this.text.length&&r<t;e++)r+=this.text.charCodeAt(e)==9?4-r%4:1;return e}scrub(){if(!this.baseIndent)return this.text;let t="";for(let e=0;e<this.basePos;e++)t+=" ";return t+this.text.slice(this.basePos)}};function pt(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==u.OrderedList?V:_)(r,e,!1);return n>0&&(t.type!=u.BulletList||Z(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}var mt={[u.Blockquote](t,e,r){return r.next==62?(r.markers.push(g(u.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(w(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0):!1},[u.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[u.OrderedList]:pt,[u.BulletList]:pt,[u.Document](){return!0}};function w(t){return t==32||t==9||t==10||t==13}function R(t,e=0){for(;e<t.length&&w(t.charCodeAt(e));)e++;return e}function gt(t,e,r){for(;e>r&&w(t.charCodeAt(e-1));)e--;return e}function kt(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function xt(t){return t.next==62?t.text.charCodeAt(t.pos+1)==32?2:1:-1}function Z(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let s=t.pos+1;s<t.text.length;s++){let i=t.text.charCodeAt(s);if(i==t.next)n++;else if(!w(i))return-1}return r&&t.next==45&&St(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(It.SetextHeading)>-1||n<3?-1:1}function Lt(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function _(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||w(t.text.charCodeAt(t.pos+1)))&&(!r||Lt(e,u.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function V(t,e,r){let n=t.pos,s=t.next;for(;s>=48&&s<=57;){if(n++,n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||s!=46&&s!=41||n<t.text.length-1&&!w(t.text.charCodeAt(n+1))||r&&!Lt(e,u.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function bt(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function St(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&w(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}var G=/^[ \t]*$/,Ct=/-->/,wt=/\?>/,J=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Ct],[/^\s*<\?/,wt],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,G],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,G]];function yt(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let s=0,i=J.length-(r?1:0);s<i;s++)if(J[s][0].test(n))return s;return-1}function At(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function y(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==u.CodeText?t[n].to=r:t.push(g(u.CodeText,e,r))}var j={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),s=t.lineStart+n,i=t.lineStart+e.text.length,o=[],a=[];for(y(o,s,i);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){y(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let h of a)h.type==u.CodeText?y(o,h.from,h.to):o.push(h);a=[]}y(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);i=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<i&&y(o,l,i)}}return a.length&&(a=a.filter(l=>l.type!=u.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-s).finish(u.CodeBlock,i-s),s),!0},FencedCode(t,e){let r=kt(e);if(r<0)return!1;let n=t.lineStart+e.pos,s=e.next,i=r-e.pos,o=e.skipSpace(r),a=gt(e.text,e.text.length,o),l=[g(u.CodeMark,n,n+i)];o<a&&l.push(g(u.CodeInfo,t.lineStart+o,t.lineStart+a));for(let h=!0,f=!0,d=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let c=e.pos;if(e.indent-e.baseIndent<4)for(;c<e.text.length&&e.text.charCodeAt(c)==s;)c++;if(c-e.pos>=i&&e.skipSpace(c)==e.text.length){for(let p of e.markers)l.push(p);f&&d&&y(l,t.lineStart-1,t.lineStart),l.push(g(u.CodeMark,t.lineStart+e.pos,t.lineStart+c)),t.nextLine();break}else{d=!0,h||(y(l,t.lineStart-1,t.lineStart),f=!1);for(let S of e.markers)l.push(S);let p=t.lineStart+e.basePos,k=t.lineStart+e.text.length;p<k&&(y(l,p,k),f=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish(u.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=xt(e);return r<0?!1:(t.startContext(u.Blockquote,e.pos),t.addNode(u.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(Z(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(u.HorizontalRule,r),!0},BulletList(t,e){let r=_(e,t,!1);if(r<0)return!1;t.block.type!=u.BulletList&&t.startContext(u.BulletList,e.basePos,e.next);let n=At(e,e.pos+1);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=V(e,t,!1);if(r<0)return!1;t.block.type!=u.OrderedList&&t.startContext(u.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=At(e,e.pos+r);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=bt(e);if(r<0)return!1;let n=e.pos,s=t.lineStart+n,i=gt(e.text,e.text.length,n),o=i;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==i||o==n||!w(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(u.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,o),s+r+1),-s);o<e.text.length&&a.write(u.HeaderMark,o-n,i-n);let l=a.finish(u.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,s),!0},HTMLBlock(t,e){let r=yt(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,s=J[r][1],i=[],o=s!=G;for(;!s.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)i.push(h)}o&&t.nextLine();let a=s==Ct?u.CommentBlock:s==wt?u.ProcessingInstructionBlock:u.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(i,-n).finish(a,l-n),n),!0},SetextHeading:void 0},Ee=class{constructor(t){this.stage=0,this.elts=[],this.pos=0,this.start=t.start,this.advance(t.content)}nextLine(t,e,r){if(this.stage==-1)return!1;let n=r.content+`
`+e.scrub(),s=this.advance(n);return s>-1&&s<n.length?this.complete(t,r,s):!1}finish(t,e){return(this.stage==2||this.stage==3)&&R(e.content,this.pos)==e.content.length?this.complete(t,e,e.content.length):!1}complete(t,e,r){return t.addLeafElement(e,g(u.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(t){return t?(this.pos=t.to-this.start,this.elts.push(t),this.stage++,!0):(t===!1&&(this.stage=-1),!1)}advance(t){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Rt(t,this.pos,this.start,!0)))return-1;if(t.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(g(u.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Nt(t,R(t,this.pos),this.start)))return-1}else if(this.stage==2){let e=R(t,this.pos),r=0;if(e>this.pos){let n=Ot(t,e,this.start);if(n){let s=K(t,n.to-this.start);s>0&&(this.nextStage(n),r=s)}}return r||(r=K(t,this.pos)),r>0&&r<t.length?r:-1}else return K(t,this.pos)}}};function K(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!w(r))return-1}return e}var He=class{nextLine(t,e,r){let n=e.depth<t.stack.length?-1:St(e),s=e.next;if(n<0)return!1;let i=g(u.HeaderMark,t.lineStart+e.pos,t.lineStart+n);return t.nextLine(),t.addLeafElement(r,g(s==61?u.SetextHeading1:u.SetextHeading2,r.start,t.prevLineEnd(),[...t.parser.parseInline(r.content,r.start),i])),!0}finish(){return!1}},It={LinkReference(t,e){return e.content.charCodeAt(0)==91?new Ee(e):null},SetextHeading(){return new He}},Me=[(t,e)=>bt(e)>=0,(t,e)=>kt(e)>=0,(t,e)=>xt(e)>=0,(t,e)=>_(e,t,!0)>=0,(t,e)=>V(e,t,!0)>=0,(t,e)=>Z(e,t,!0)>=0,(t,e)=>yt(e,t,!0)>=0],Pe={text:"",end:0},Ne=class{constructor(t,e,r,n){this.parser=t,this.input=e,this.ranges=n,this.line=new Be,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=n[n.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=n[0].from,this.block=dt.create(u.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new ze(r,e):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:t}=this;for(;;){for(let r=0;;){let n=t.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<t.markers.length&&(!n||t.markers[r].from<n.end);){let s=t.markers[r++];this.addNode(s.type,s.from,s.to)}if(!n)break;this.finishContext()}if(t.pos<t.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(t.basePos))return null;t:for(;;){for(let r of this.parser.blockParsers)if(r){let n=r(this,t);if(n!=0){if(n==1)return null;t.forward();continue t}}break}let e=new ve(this.lineStart+t.pos,t.text.slice(t.pos));for(let r of this.parser.leafBlockParsers)if(r){let n=r(this,e);n&&e.parsers.push(n)}t:for(;this.nextLine()&&t.pos!=t.text.length;){if(t.indent<t.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,t,e))break t}for(let r of e.parsers)if(r.nextLine(this,t,e))return null;e.content+=`
`+t.scrub();for(let r of t.markers)e.marks.push(r)}return this.finishLeaf(e),null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=t}reuseFragment(t){if(!this.fragments.moveTo(this.absoluteLineStart+t,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let e=this.fragments.takeNodes(this);return e?(this.absoluteLineStart+=e,this.lineStart=Xt(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(t=this.depth-1){return this.parser.nodeSet.types[this.stack[t].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(t){let e=Pe;if(e.end=t,t>=this.to)e.text="";else if(e.text=this.lineChunkAt(t),e.end+=e.text.length,this.ranges.length>1){let r=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<e.end;){n++;let s=this.ranges[n].from,i=this.lineChunkAt(s);e.end=s+i.length,e.text=e.text.slice(0,this.ranges[n-1].to-r)+i,r=e.end-e.text.length}}return e}readLine(){let{line:t}=this,{text:e,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,t.reset(e);t.depth<this.stack.length;t.depth++){let n=this.stack[t.depth],s=this.parser.skipContextMarkup[n.type];if(!s)throw Error("Unhandled block context "+u[n.type]);let i=this.line.markers.length;if(!s(n,this,t)){this.line.markers.length>i&&(n.end=this.line.markers[this.line.markers.length-1].to),t.forward();break}t.forward()}}lineChunkAt(t){let e=this.input.chunk(t),r;if(this.input.lineChunks)r=e==`
`?"":e;else{let n=e.indexOf(`
`);r=n<0?e:e.slice(0,n)}return t+r.length>this.to?r.slice(0,this.to-t):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(t,e,r=0){this.block=dt.create(t,r,this.lineStart+e,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(t,e,r=0){this.startContext(this.parser.getNodeType(t),e,r)}addNode(t,e,r){typeof t=="number"&&(t=new v(this.parser.nodeSet.types[t],M,M,(r??this.prevLineEnd())-e)),this.block.addChild(t,e-this.block.from)}addElement(t){this.block.addChild(t.toTree(this.parser.nodeSet),t.from-this.block.from)}addLeafElement(t,e){this.addNode(this.buffer.writeElements(et(e.children,t.marks),-e.from).finish(e.type,e.to-e.from),e.from)}finishContext(){let t=this.stack.pop(),e=this.stack[this.stack.length-1];e.addChild(t.toTree(this.parser.nodeSet),t.from-e.from),this.block=e}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(t){return this.ranges.length>1?Tt(this.ranges,0,t.topNode,this.ranges[0].from,this.reusePlaceholders):t}finishLeaf(t){for(let r of t.parsers)if(r.finish(this,t))return;let e=et(this.parser.parseInline(t.content,t.start),t.marks);this.addNode(this.buffer.writeElements(e,-t.start).finish(u.Paragraph,t.content.length),t.start)}elt(t,e,r,n){return typeof t=="string"?g(this.parser.getNodeType(t),e,r,n):new Ht(t,e)}get buffer(){return new Et(this.parser.nodeSet)}};function Tt(t,e,r,n,s){let i=t[e].to,o=[],a=[],l=r.from+n;function h(f,d){for(;d?f>=i:f>i;){let c=t[e+1].from-i;n+=c,f+=c,e++,i=t[e].to}}for(let f=r.firstChild;f;f=f.nextSibling){h(f.from+n,!0);let d=f.from+n,c,p=s.get(f.tree);p?c=p:f.to+n>i?(c=Tt(t,e,f,n,s),h(f.to+n,!1)):c=f.toTree(),o.push(c),a.push(d-l)}return h(r.to+n,!1),new v(r.type,o,a,r.to+n-l,r.tree?r.tree.propValues:void 0)}var vt=class he extends Ce{constructor(e,r,n,s,i,o,a,l,h){super(),this.nodeSet=e,this.blockParsers=r,this.leafBlockParsers=n,this.blockNames=s,this.endLeafBlock=i,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=h,this.nodeTypes=Object.create(null);for(let f of e.types)this.nodeTypes[f.name]=f.id}createParse(e,r,n){let s=new Ne(this,e,r,n);for(let i of this.wrappers)s=i(s,e,r,n);return s}configure(e){let r=W(e);if(!r)return this;let{nodeSet:n,skipContextMarkup:s}=this,i=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),h=this.inlineNames.slice(),f=this.endLeafBlock.slice(),d=this.wrappers;if(X(r.defineNodes)){s=Object.assign({},s);let c=n.types.slice(),p;for(let k of r.defineNodes){let{name:S,block:A,composite:L,style:b}=typeof k=="string"?{name:k}:k;if(c.some(T=>T.name==S))continue;L&&(s[c.length]=(T,P,fe)=>L(P,fe,T.value));let x=c.length,I=L?["Block","BlockContext"]:A?x>=u.ATXHeading1&&x<=u.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;c.push(q.define({id:x,name:S,props:I&&[[E.group,I]]})),b&&(p||(p={}),Array.isArray(b)||b instanceof ce?p[S]=b:Object.assign(p,b))}n=new ht(c),p&&(n=n.extend(ut(p)))}if(X(r.props)&&(n=n.extend(...r.props)),X(r.remove))for(let c of r.remove){let p=this.blockNames.indexOf(c),k=this.inlineNames.indexOf(c);p>-1&&(i[p]=o[p]=void 0),k>-1&&(l[k]=void 0)}if(X(r.parseBlock))for(let c of r.parseBlock){let p=a.indexOf(c.name);if(p>-1)i[p]=c.parse,o[p]=c.leaf;else{let k=c.before?U(a,c.before):c.after?U(a,c.after)+1:a.length-1;i.splice(k,0,c.parse),o.splice(k,0,c.leaf),a.splice(k,0,c.name)}c.endLeaf&&f.push(c.endLeaf)}if(X(r.parseInline))for(let c of r.parseInline){let p=h.indexOf(c.name);if(p>-1)l[p]=c.parse;else{let k=c.before?U(h,c.before):c.after?U(h,c.after)+1:h.length-1;l.splice(k,0,c.parse),h.splice(k,0,c.name)}}return r.wrap&&(d=d.concat(r.wrap)),new he(n,i,o,a,f,s,l,h,d)}getNodeType(e){let r=this.nodeTypes[e];if(r==null)throw RangeError(`Unknown node type '${e}'`);return r}parseInline(e,r){let n=new tt(this,e,r);t:for(let s=r;s<n.end;){let i=n.char(s);for(let o of this.inlineParsers)if(o){let a=o(n,i,s);if(a>=0){s=a;continue t}}s++}return n.resolveMarkers(0)}};function X(t){return t!=null&&t.length>0}function W(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=W(t[0]);if(t.length==1)return e;let r=W(t.slice(1));if(!r||!e)return e||r;let n=(o,a)=>(o||M).concat(a||M),s=e.wrap,i=r.wrap;return{props:n(e.props,r.props),defineNodes:n(e.defineNodes,r.defineNodes),parseBlock:n(e.parseBlock,r.parseBlock),parseInline:n(e.parseInline,r.parseInline),remove:n(e.remove,r.remove),wrap:s?i?(o,a,l,h)=>s(i(o,a,l,h),a,l,h):s:i}}function U(t,e){let r=t.indexOf(e);if(r<0)throw RangeError(`Position specified relative to unknown parser ${e}`);return r}var Bt=[q.none];for(let t=1,e;e=u[t];t++)Bt[t]=q.define({id:t,name:e,props:t>=u.Escape?[]:[[E.group,t in mt?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});var M=[],Et=class{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,e,r,n=0){return this.content.push(t,e,r,4+n*4),this}writeElements(t,e=0){for(let r of t)r.writeTo(this,e);return this}finish(t,e){return v.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:e})}},z=class{constructor(t,e,r,n=M){this.type=t,this.from=e,this.to=r,this.children=n}writeTo(t,e){let r=t.content.length;t.writeElements(this.children,e),t.content.push(this.type,this.from+e,this.to+e,t.content.length+4-r)}toTree(t){return new Et(t).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},Ht=class{constructor(t,e){this.tree=t,this.from=e}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return M}writeTo(t,e){t.nodes.push(this.tree),t.content.push(t.nodes.length-1,this.from+e,this.to+e,-1)}toTree(){return this.tree}};function g(t,e,r,n){return new z(t,e,r,n)}var Mt={resolve:"Emphasis",mark:"EmphasisMark"},Pt={resolve:"Emphasis",mark:"EmphasisMark"},B={},Q={},C=class{constructor(t,e,r,n){this.type=t,this.from=e,this.to=r,this.side=n}},Oe="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",D=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{D=RegExp("[\\p{S}|\\p{P}]","u")}catch{}var Y={Escape(t,e,r){if(e!=92||r==t.end-1)return-1;let n=t.char(r+1);for(let s=0;s<32;s++)if(Oe.charCodeAt(s)==n)return t.append(g(u.Escape,r,r+2));return-1},Entity(t,e,r){if(e!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(r+1,r+31));return n?t.append(g(u.Entity,r,r+1+n[0].length)):-1},InlineCode(t,e,r){if(e!=96||r&&t.char(r-1)==96)return-1;let n=r+1;for(;n<t.end&&t.char(n)==96;)n++;let s=n-r,i=0;for(;n<t.end;n++)if(t.char(n)==96){if(i++,i==s&&t.char(n+1)!=96)return t.append(g(u.InlineCode,r,n+1,[g(u.CodeMark,r,r+s),g(u.CodeMark,n+1-s,n+1)]))}else i=0;return-1},HTMLTag(t,e,r){if(e!=60||r==t.end-1)return-1;let n=t.slice(r+1,t.end),s=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(s)return t.append(g(u.Autolink,r,r+1+s[0].length,[g(u.LinkMark,r,r+1),g(u.URL,r+1,r+s[0].length),g(u.LinkMark,r+s[0].length,r+1+s[0].length)]));let i=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(i)return t.append(g(u.Comment,r,r+1+i[0].length));let o=/^\?[^]*?\?>/.exec(n);if(o)return t.append(g(u.ProcessingInstruction,r,r+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return a?t.append(g(u.HTMLTag,r,r+1+a[0].length)):-1},Emphasis(t,e,r){if(e!=95&&e!=42)return-1;let n=r+1;for(;t.char(n)==e;)n++;let s=t.slice(r-1,r),i=t.slice(n,n+1),o=D.test(s),a=D.test(i),l=/\s|^$/.test(s),h=/\s|^$/.test(i),f=!h&&(!a||l||o),d=!l&&(!o||h||a),c=f&&(e==42||!d||o),p=d&&(e==42||!f||a);return t.append(new C(e==95?Mt:Pt,r,n,(c?1:0)|(p?2:0)))},HardBreak(t,e,r){if(e==92&&t.char(r+1)==10)return t.append(g(u.HardBreak,r,r+2));if(e==32){let n=r+1;for(;t.char(n)==32;)n++;if(t.char(n)==10&&n>=r+2)return t.append(g(u.HardBreak,r,n+1))}return-1},Link(t,e,r){return e==91?t.append(new C(B,r,r+1,1)):-1},Image(t,e,r){return e==33&&t.char(r+1)==91?t.append(new C(Q,r,r+2,1)):-1},LinkEnd(t,e,r){if(e!=93)return-1;for(let n=t.parts.length-1;n>=0;n--){let s=t.parts[n];if(s instanceof C&&(s.type==B||s.type==Q)){if(!s.side||t.skipSpace(s.to)==r&&!/[(\[]/.test(t.slice(r+1,r+2)))return t.parts[n]=null,-1;let i=t.takeContent(n),o=t.parts[n]=Re(t,i,s.type==B?u.Link:u.Image,s.from,r+1);if(s.type==B)for(let a=0;a<n;a++){let l=t.parts[a];l instanceof C&&l.type==B&&(l.side=0)}return o.to}}return-1}};function Re(t,e,r,n,s){let{text:i}=t,o=t.char(s),a=s;if(e.unshift(g(u.LinkMark,n,n+(r==u.Image?2:1))),e.push(g(u.LinkMark,s-1,s)),o==40){let l=t.skipSpace(s+1),h=Nt(i,l-t.offset,t.offset),f;h&&(l=t.skipSpace(h.to),l!=h.to&&(f=Ot(i,l-t.offset,t.offset),f&&(l=t.skipSpace(f.to)))),t.char(l)==41&&(e.push(g(u.LinkMark,s,s+1)),a=l+1,h&&e.push(h),f&&e.push(f),e.push(g(u.LinkMark,l,a)))}else if(o==91){let l=Rt(i,s-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return g(r,n,a,e)}function Nt(t,e,r){if(t.charCodeAt(e)==60){for(let n=e+1;n<t.length;n++){let s=t.charCodeAt(n);if(s==62)return g(u.URL,e+r,n+1+r);if(s==60||s==10)return!1}return null}else{let n=0,s=e;for(let i=!1;s<t.length;s++){let o=t.charCodeAt(s);if(w(o))break;if(i)i=!1;else if(o==40)n++;else if(o==41){if(!n)break;n--}else o==92&&(i=!0)}return s>e?g(u.URL,e+r,s+r):s==t.length?null:!1}}function Ot(t,e,r){let n=t.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let s=n==40?41:n;for(let i=e+1,o=!1;i<t.length;i++){let a=t.charCodeAt(i);if(o)o=!1;else{if(a==s)return g(u.LinkTitle,e+r,i+1+r);a==92&&(o=!0)}}return null}function Rt(t,e,r,n){for(let s=!1,i=e+1,o=Math.min(t.length,i+999);i<o;i++){let a=t.charCodeAt(i);if(s)s=!1;else{if(a==93)return n?!1:g(u.LinkLabel,e+r,i+1+r);if(n&&!w(a)&&(n=!1),a==91)return!1;a==92&&(s=!0)}}return null}var tt=class{constructor(t,e,r){this.parser=t,this.text=e,this.offset=r,this.parts=[]}char(t){return t>=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,e){return this.text.slice(t-this.offset,e-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,e,r,n,s){return this.append(new C(t,e,r,(n?1:0)|(s?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let e=this.parts[t];if(e instanceof C&&(e.type==B||e.type==Q))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let r=t;r<this.parts.length;r++){let n=this.parts[r];if(!(n instanceof C&&n.type.resolve&&n.side&2))continue;let s=n.type==Mt||n.type==Pt,i=n.to-n.from,o,a=r-1;for(;a>=t;a--){let p=this.parts[a];if(p instanceof C&&p.side&1&&p.type==n.type&&!(s&&(n.side&1||p.side&2)&&(p.to-p.from+i)%3==0&&((p.to-p.from)%3||i%3))){o=p;break}}if(!o)continue;let l=n.type.resolve,h=[],f=o.from,d=n.to;if(s){let p=Math.min(2,o.to-o.from,i);f=o.to-p,d=n.from+p,l=p==1?"Emphasis":"StrongEmphasis"}o.type.mark&&h.push(this.elt(o.type.mark,f,o.to));for(let p=a+1;p<r;p++)this.parts[p]instanceof z&&h.push(this.parts[p]),this.parts[p]=null;n.type.mark&&h.push(this.elt(n.type.mark,n.from,d));let c=this.elt(l,f,d,h);this.parts[a]=s&&o.from!=f?new C(o.type,o.from,f,o.side):null,(this.parts[r]=s&&n.to!=d?new C(n.type,d,n.to,n.side):null)?this.parts.splice(r,0,c):this.parts[r]=c}let e=[];for(let r=t;r<this.parts.length;r++){let n=this.parts[r];n instanceof z&&e.push(n)}return e}findOpeningDelimiter(t){for(let e=this.parts.length-1;e>=0;e--){let r=this.parts[e];if(r instanceof C&&r.type==t&&r.side&1)return e}return null}takeContent(t){let e=this.resolveMarkers(t);return this.parts.length=t,e}getDelimiterAt(t){let e=this.parts[t];return e instanceof C?e:null}skipSpace(t){return R(this.text,t-this.offset)+this.offset}elt(t,e,r,n){return typeof t=="string"?g(this.parser.getNodeType(t),e,r,n):new Ht(t,e)}};tt.linkStart=B,tt.imageStart=Q;function et(t,e){if(!e.length)return t;if(!t.length)return e;let r=t.slice(),n=0;for(let s of e){for(;n<r.length&&r[n].to<s.to;)n++;if(n<r.length&&r[n].from<s.from){let i=r[n];i instanceof z&&(r[n]=new z(i.type,i.from,i.to,et(i.children,[s])))}else r.splice(n++,0,s)}return r}var Xe=[u.CodeBlock,u.ListItem,u.OrderedList,u.BulletList],ze=class{constructor(t,e){this.fragments=t,this.input=e,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,t.length&&(this.fragment=t[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(t,e){for(;this.fragment&&this.fragment.to<=t;)this.nextFragment();if(!this.fragment||this.fragment.from>(t?t-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
`;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let n=t+this.fragment.offset;for(;r.to<=n;)if(!r.parent())return!1;for(;;){if(r.from>=n)return this.fragment.from<=e;if(!r.childAfter(n))return!1}}matches(t){let e=this.cursor.tree;return e&&e.prop(E.contextHash)==t}takeNodes(t){let e=this.cursor,r=this.fragment.offset,n=this.fragmentEnd-(this.fragment.openEnd?1:0),s=t.absoluteLineStart,i=s,o=t.block.children.length,a=i,l=o;for(;;){if(e.to-r>n){if(e.type.isAnonymous&&e.firstChild())continue;break}let h=Xt(e.from-r,t.ranges);if(e.to-r<=t.ranges[t.rangeI].to)t.addNode(e.tree,h);else{let f=new v(t.parser.nodeSet.types[u.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(f,e.tree),t.addNode(f,h)}if(e.type.is("Block")&&(Xe.indexOf(e.type.id)<0?(i=e.to-r,o=t.block.children.length):(i=a,o=l),a=e.to-r,l=t.block.children.length),!e.nextSibling())break}for(;t.block.children.length>o;)t.block.children.pop(),t.block.positions.pop();return i-s}};function Xt(t,e){let r=t;for(let n=1;n<e.length;n++){let s=e[n-1].to,i=e[n].from;s<t&&(r-=i-s)}return r}var De=ut({"Blockquote/...":m.quote,HorizontalRule:m.contentSeparator,"ATXHeading1/... SetextHeading1/...":m.heading1,"ATXHeading2/... SetextHeading2/...":m.heading2,"ATXHeading3/...":m.heading3,"ATXHeading4/...":m.heading4,"ATXHeading5/...":m.heading5,"ATXHeading6/...":m.heading6,"Comment CommentBlock":m.comment,Escape:m.escape,Entity:m.character,"Emphasis/...":m.emphasis,"StrongEmphasis/...":m.strong,"Link/... Image/...":m.link,"OrderedList/... BulletList/...":m.list,"BlockQuote/...":m.quote,"InlineCode CodeText":m.monospace,"URL Autolink":m.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":m.processingInstruction,"CodeInfo LinkLabel":m.labelName,LinkTitle:m.string,Paragraph:m.content}),$e=new vt(new ht(Bt).extend(De),Object.keys(j).map(t=>j[t]),Object.keys(j).map(t=>It[t]),Object.keys(j),Me,mt,Object.keys(Y).map(t=>Y[t]),Object.keys(Y),[]);function Fe(t,e,r){let n=[];for(let s=t.firstChild,i=e;;s=s.nextSibling){let o=s?s.from:r;if(o>i&&n.push({from:i,to:o}),!s)break;i=s.to}return n}function qe(t){let{codeParser:e,htmlParser:r}=t;return{wrap:we((n,s)=>{let i=n.type.id;if(e&&(i==u.CodeBlock||i==u.FencedCode)){let o="";if(i==u.FencedCode){let l=n.node.getChild(u.CodeInfo);l&&(o=s.read(l.from,l.to))}let a=e(o);if(a)return{parser:a,overlay:l=>l.type.id==u.CodeText,bracketed:i==u.FencedCode}}else if(r&&(i==u.HTMLBlock||i==u.HTMLTag||i==u.CommentBlock))return{parser:r,overlay:Fe(n.node,n.from,n.to)};return null})}}var je={resolve:"Strikethrough",mark:"StrikethroughMark"},Ue={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":m.strikethrough}},{name:"StrikethroughMark",style:m.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,r){if(e!=126||t.char(r+1)!=126||t.char(r+2)==126)return-1;let n=t.slice(r-1,r),s=t.slice(r+2,r+3),i=/\s|^$/.test(n),o=/\s|^$/.test(s),a=D.test(n),l=D.test(s);return t.addDelimiter(je,r,r+2,!o&&(!l||i||a),!i&&(!a||o||l))},after:"Emphasis"}]};function $(t,e,r=0,n,s=0){let i=0,o=!0,a=-1,l=-1,h=!1,f=()=>{n.push(t.elt("TableCell",s+a,s+l,t.parser.parseInline(e.slice(a,l),s+a)))};for(let d=r;d<e.length;d++){let c=e.charCodeAt(d);c==124&&!h?((!o||a>-1)&&i++,o=!1,n&&(a>-1&&f(),n.push(t.elt("TableDelimiter",d+s,d+s+1))),a=l=-1):(h||c!=32&&c!=9)&&(a<0&&(a=d),l=d+1),h=!h&&c==92}return a>-1&&(i++,n&&f()),i}function zt(t,e){for(let r=e;r<t.length;r++){let n=t.charCodeAt(r);if(n==124)return!0;n==92&&r++}return!1}var Dt=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,$t=class{constructor(){this.rows=null}nextLine(t,e,r){if(this.rows==null){this.rows=!1;let n;if((e.next==45||e.next==58||e.next==124)&&Dt.test(n=e.text.slice(e.pos))){let s=[];$(t,r.content,0,s,r.start)==$(t,n,e.pos)&&(this.rows=[t.elt("TableHeader",r.start,r.start+r.content.length,s),t.elt("TableDelimiter",t.lineStart+e.pos,t.lineStart+e.text.length)])}}else if(this.rows){let n=[];$(t,e.text,e.pos,n,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+e.pos,t.lineStart+e.text.length,n))}return!1}finish(t,e){return this.rows?(t.addLeafElement(e,t.elt("Table",e.start,e.start+e.content.length,this.rows)),!0):!1}},Qe={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":m.heading}},"TableRow",{name:"TableCell",style:m.content},{name:"TableDelimiter",style:m.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return zt(e.content,0)?new $t:null},endLeaf(t,e,r){if(r.parsers.some(s=>s instanceof $t)||!zt(e.text,e.basePos))return!1;let n=t.peekLine();return Dt.test(n)&&$(t,e.text,e.basePos)==$(t,n,e.basePos)},before:"SetextHeading"}]},Ze=class{nextLine(){return!1}finish(t,e){return t.addLeafElement(e,t.elt("Task",e.start,e.start+e.content.length,[t.elt("TaskMarker",e.start,e.start+3),...t.parser.parseInline(e.content.slice(3),e.start+3)])),!0}},_e={defineNodes:[{name:"Task",block:!0,style:m.list},{name:"TaskMarker",style:m.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Ze:null},after:"SetextHeading"}]},Ft=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,qt=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Ve=/[\w-]+\.[\w-]+($|\/)/,jt=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Ut=/\/[a-zA-Z\d@.]+/gy;function Qt(t,e,r,n){let s=0;for(let i=e;i<r;i++)t[i]==n&&s++;return s}function Ge(t,e){qt.lastIndex=e;let r=qt.exec(t);if(!r||Ve.exec(r[0])[0].indexOf("_")>-1)return-1;let n=e+r[0].length;for(;;){let s=t[n-1],i;if(/[?!.,:*_~]/.test(s)||s==")"&&Qt(t,e,n,")")>Qt(t,e,n,"("))n--;else if(s==";"&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,n))))n=e+i.index;else break}return n}function Zt(t,e){jt.lastIndex=e;let r=jt.exec(t);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:e+r[0].length-(n=="."?1:0)}var Je=[Qe,_e,Ue,{parseInline:[{name:"Autolink",parse(t,e,r){let n=r-t.offset;if(n&&/\w/.test(t.text[n-1]))return-1;Ft.lastIndex=n;let s=Ft.exec(t.text),i=-1;return!s||(s[1]||s[2]?(i=Ge(t.text,n+s[0].length),i>-1&&t.hasOpenLink&&(i=n+/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(n,i))[0].length)):s[3]?i=Zt(t.text,n):(i=Zt(t.text,n+s[0].length),i>-1&&s[0]=="xmpp:"&&(Ut.lastIndex=i,s=Ut.exec(t.text),s&&(i=s.index+s[0].length))),i<0)?-1:(t.addElement(t.elt("URL",r,i+t.offset)),i+t.offset)}}]}];function _t(t,e,r){return(n,s,i)=>{if(s!=t||n.char(i+1)==t)return-1;let o=[n.elt(r,i,i+1)];for(let a=i+1;a<n.end;a++){let l=n.char(a);if(l==t)return n.addElement(n.elt(e,i,a+1,o.concat(n.elt(r,a,a+1))));if(l==92&&o.push(n.elt("Escape",a,a+++2)),w(l))break}return-1}}var Ke={defineNodes:[{name:"Superscript",style:m.special(m.content)},{name:"SuperscriptMark",style:m.processingInstruction}],parseInline:[{name:"Superscript",parse:_t(94,"Superscript","SuperscriptMark")}]},We={defineNodes:[{name:"Subscript",style:m.special(m.content)},{name:"SubscriptMark",style:m.processingInstruction}],parseInline:[{name:"Subscript",parse:_t(126,"Subscript","SubscriptMark")}]},Ye={defineNodes:[{name:"Emoji",style:m.character}],parseInline:[{name:"Emoji",parse(t,e,r){let n;return e!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(t.slice(r+1,t.end)))?-1:t.addElement(t.elt("Emoji",r,r+1+n[0].length))}}]},Vt=ye({commentTokens:{block:{open:"<!--",close:"-->"}}}),Gt=new E,Jt=$e.configure({props:[lt.add(t=>!t.is("Block")||t.is("Document")||rt(t)!=null||tr(t)?void 0:(e,r)=>({from:r.doc.lineAt(e.from).to,to:e.to})),Gt.add(rt),pe.add({Document:()=>null}),ge.add({Document:Vt})]});function rt(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function tr(t){return t.name=="OrderedList"||t.name=="BulletList"}function er(t,e){let r=t;for(;;){let n=r.nextSibling,s;if(!n||(s=rt(n.type))!=null&&s<=e)break;r=n}return r.to}var rr=me.of((t,e,r)=>{for(let n=N(t).resolveInner(r,-1);n&&!(n.from<e);n=n.parent){let s=n.type.prop(Gt);if(s==null)continue;let i=er(n,s);if(i>r)return{from:r,to:i}}return null});function nt(t){return new be(Vt,t,[],"markdown")}var Kt=nt(Jt),F=nt(Jt.configure([Je,We,Ke,Ye,{props:[lt.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]));function nr(t,e){return r=>{if(r&&t){let n=null;if(r=/\S*/.exec(r)[0],n=typeof t=="function"?t(r):ft.matchLanguageName(t,r,!0),n instanceof ft)return n.support?n.support.language.parser:Se.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}var st=class{constructor(t,e,r,n,s,i,o){this.node=t,this.from=e,this.to=r,this.spaceBefore=n,this.spaceAfter=s,this.type=i,this.item=o}blank(t,e=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){for(;r.length<t;)r+=" ";return r}else{for(let n=this.to-this.from-r.length-this.spaceAfter.length;n>0;n--)r+=" ";return r+(e?this.spaceAfter:"")}}marker(t,e){let r=this.node.name=="OrderedList"?String(+Yt(this.item,t)[2]+e):"";return this.spaceBefore+r+this.type+this.spaceAfter}};function Wt(t,e){let r=[],n=[];for(let s=t;s;s=s.parent){if(s.name=="FencedCode")return n;(s.name=="ListItem"||s.name=="Blockquote")&&r.push(s)}for(let s=r.length-1;s>=0;s--){let i=r[s],o,a=e.lineAt(i.from),l=i.from-a.from;if(i.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))n.push(new st(i,l,l+o[0].length,"",o[1],">",null));else if(i.name=="ListItem"&&i.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let h=o[3],f=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),n.push(new st(i.parent,l,l+f,o[1],h,o[2],i))}else if(i.name=="ListItem"&&i.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let h=o[4],f=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),f-=4);let d=o[2];o[3]&&(d+=o[3].replace(/[xX]/," ")),n.push(new st(i.parent,l,l+f,o[1],h,d,i))}}return n}function Yt(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function it(t,e,r,n=0){for(let s=-1,i=t;;){if(i.name=="ListItem"){let a=Yt(i,e),l=+a[2];if(s>=0){if(l!=s+1)return;r.push({from:i.from+a[1].length,to:i.from+a[0].length,insert:String(s+2+n)})}s=l}let o=i.nextSibling;if(!o)break;i=o}}function ot(t,e){let r=/^[ \t]*/.exec(t)[0].length;if(!r||e.facet(de)!=" ")return t;let n=O(t,4,r),s="";for(let i=n;i>0;)i>=4?(s+=" ",i-=4):(s+=" ",i--);return s+t.slice(r)}var te=(t={})=>({state:e,dispatch:r})=>{let n=N(e),{doc:s}=e,i=null,o=e.changeByRange(a=>{if(!a.empty||!F.isActiveAt(e,a.from,-1)&&!F.isActiveAt(e,a.from,1))return i={range:a};let l=a.from,h=s.lineAt(l),f=Wt(n.resolveInner(l,-1),s);for(;f.length&&f[f.length-1].from>l-h.from;)f.pop();if(!f.length)return i={range:a};let d=f[f.length-1];if(d.to-d.spaceAfter.length>l-h.from)return i={range:a};let c=l>=d.to-d.spaceAfter.length&&!/\S/.test(h.text.slice(d.to));if(d.item&&c){let L=d.node.firstChild,b=d.node.getChild("ListItem","ListItem");if(L.to>=l||b&&b.to<l||h.from>0&&!/[^\s>]/.test(s.lineAt(h.from-1).text)||t.nonTightLists===!1){let x=f.length>1?f[f.length-2]:null,I,T="";x&&x.item?(I=h.from+x.from,T=x.marker(s,1)):I=h.from+(x?x.to:0);let P=[{from:I,to:l,insert:T}];return d.node.name=="OrderedList"&&it(d.item,s,P,-2),x&&x.node.name=="OrderedList"&&it(x.item,s,P),{range:H.cursor(I+T.length),changes:P}}else{let x=ne(f,e,h);return{range:H.cursor(l+x.length+1),changes:{from:h.from,insert:x+e.lineBreak}}}}if(d.node.name=="Blockquote"&&c&&h.from){let L=s.lineAt(h.from-1),b=/>\s*$/.exec(L.text);if(b&&b.index==d.from){let x=e.changes([{from:L.from+b.index,to:L.to},{from:h.from+d.from,to:h.to}]);return{range:a.map(x),changes:x}}}let p=[];d.node.name=="OrderedList"&&it(d.item,s,p);let k=d.item&&d.item.from<h.from,S="";if(!k||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=d.to)for(let L=0,b=f.length-1;L<=b;L++)S+=L==b&&!k?f[L].marker(s,1):f[L].blank(L<b?O(h.text,4,f[L+1].from)-S.length:null);let A=l;for(;A>h.from&&/\s/.test(h.text.charAt(A-h.from-1));)A--;return S=ot(S,e),sr(d.node,e.doc)&&(S=ne(f,e,h)+e.lineBreak+S),p.push({from:A,to:l,insert:e.lineBreak+S}),{range:H.cursor(A+S.length+1),changes:p}});return i?!1:(r(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},ee=te();function re(t){return t.name=="QuoteMark"||t.name=="ListMark"}function sr(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let r=t.firstChild,n=t.getChild("ListItem","ListItem");if(!n)return!1;let s=e.lineAt(r.to),i=e.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1)<i.number}function ne(t,e,r){let n="";for(let s=0,i=t.length-2;s<=i;s++)n+=t[s].blank(s<i?O(r.text,4,t[s+1].from)-n.length:null,s<i);return ot(n,e)}function ir(t,e){let r=t.resolveInner(e,-1),n=e;re(r)&&(n=r.from,r=r.parent);for(let s;s=r.childBefore(n);)if(re(s))n=s.from;else if(s.name=="OrderedList"||s.name=="BulletList")r=s.lastChild,n=r.to;else break;return r}var se=({state:t,dispatch:e})=>{let r=N(t),n=null,s=t.changeByRange(i=>{let o=i.from,{doc:a}=t;if(i.empty&&F.isActiveAt(t,i.from)){let l=a.lineAt(o),h=Wt(ir(r,o),a);if(h.length){let f=h[h.length-1],d=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(o-l.from>d&&!/\S/.test(l.text.slice(d,o-l.from)))return{range:H.cursor(l.from+d),changes:{from:l.from+d,to:o}};if(o-l.from==d&&(!f.item||l.from<=f.item.from||!/\S/.test(l.text.slice(0,f.to)))){let c=l.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(l.text.slice(f.from,f.to))){let p=f.blank(O(l.text,4,f.to)-O(l.text,4,f.from));return c==l.from&&(p=ot(p,t)),{range:H.cursor(c+p.length),changes:{from:c,to:l.from+f.to,insert:p}}}if(c<o)return{range:H.cursor(c),changes:{from:c,to:o}}}}}return n={range:i}});return n?!1:(e(t.update(s,{scrollIntoView:!0,userEvent:"delete"})),!0)},ie=[{key:"Enter",run:ee},{key:"Backspace",run:se}],oe=Ie({matchClosingTags:!1});function or(t={}){let{codeLanguages:e,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:s}=Kt,completeHTMLTags:i=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=oe}=t;if(!(s instanceof vt))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],h=[a.support,rr],f;o&&h.push(ae),r instanceof ct?(h.push(r.support),f=r.language):r&&(f=r);let d=e||f?nr(e,f):void 0;l.push(qe({codeParser:d,htmlParser:a.language.parser})),n&&h.push(xe.high(ke.of(ie)));let c=nt(s.configure(l));return i&&h.push(c.data.of({autocomplete:ar})),new ct(c,h)}function ar(t){let{state:e,pos:r}=t,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r-25,r));if(!n)return null;let s=N(e).resolveInner(r,-1);for(;s&&!s.type.isTop;){if(s.name=="CodeBlock"||s.name=="FencedCode"||s.name=="ProcessingInstructionBlock"||s.name=="CommentBlock"||s.name=="Link"||s.name=="Image")return null;s=s.parent}return{from:r-n[0].length,to:r,options:lr(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var at=null;function lr(){if(at)return at;let t=Te(new Ae(ue.create({extensions:oe}),0,!0));return at=t?t.options:[]}var hr=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,ae=Le.domEventHandlers({paste:(t,e)=>{var o;let{main:r}=e.state.selection;if(r.empty)return!1;let n=(o=t.clipboardData)==null?void 0:o.getData("text/plain");if(!n||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(n)||(/^www\./.test(n)&&(n="https://"+n),!F.isActiveAt(e.state,r.from,1)))return!1;let s=N(e.state),i=!1;return s.iterate({from:r.from,to:r.to,enter:a=>{(a.from>r.from||hr.test(a.name))&&(i=!0)},leave:a=>{a.to<r.to&&(i=!0)}}),i?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${n})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});export{or as a,ae as c,te as i,se as n,ie as o,ee as r,F as s,Kt as t};
import{s as b}from"./chunk-LvLJmgfZ.js";import{t as v}from"./react-BGmjiNul.js";import{t as m}from"./emotion-is-prop-valid.esm-DD4AwVTU.js";var O=function(){let r=Array.prototype.slice.call(arguments).filter(Boolean),e={},a=[];r.forEach(s=>{(s?s.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){let[,o]=l.split("_");e[o]=l}else a.push(l)})});let t=[];for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(e[s]);return t.push(...a),t.join(" ")},f=b(v(),1),x=r=>r.toUpperCase()===r,R=r=>e=>r.indexOf(e)===-1,_=(r,e)=>{let a={};return Object.keys(r).filter(R(e)).forEach(t=>{a[t]=r[t]}),a};function g(r,e,a){let t=_(e,a);if(!r){let s=typeof m=="function"?{default:m}:m;Object.keys(t).forEach(l=>{s.default(l)||delete t[l]})}return t}function k(r){return e=>{let a=(s,l)=>{let{as:o=r,class:y=""}=s,n=g(e.propsAsIs===void 0?!(typeof o=="string"&&o.indexOf("-")===-1&&!x(o[0])):e.propsAsIs,s,["as","class"]);n.ref=l,n.className=e.atomic?O(e.class,n.className||y):O(n.className||y,e.class);let{vars:c}=e;if(c){let p={};for(let i in c){let E=c[i],u=E[0],j=E[1]||"",N=typeof u=="function"?u(s):u;e.name,p[`--${i}`]=`${N}${j}`}let d=n.style||{},h=Object.keys(d);h.length>0&&h.forEach(i=>{p[i]=d[i]}),n.style=p}return r.__linaria&&r!==o?(n.as=o,f.createElement(r,n)):f.createElement(o,n)},t=f.forwardRef?f.forwardRef(a):s=>a(_(s,["innerRef"]),s.innerRef);return t.displayName=e.name,t.__linaria={className:e.class||"",extends:r},t}}var w=k;export{w as t};
import{s as o}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-BGmjiNul.js";import{t as n}from"./react-dom-C9fstfnp.js";import{t as d}from"./jsx-runtime-ZmTK25f3.js";import{a as u}from"./button-YC1gW_kJ.js";var v=o(p(),1);n();var w=o(d(),1),b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((a,r)=>{let t=u(`Primitive.${r}`),i=v.forwardRef((e,m)=>{let{asChild:s,...f}=e,l=s?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,w.jsx)(l,{...f,ref:m})});return i.displayName=`Primitive.${r}`,{...a,[r]:i}},{});export{b as t};
import"./dist-DBwNzi3C.js";import{i as a,n as s,r as m,t as o}from"./dist-C4h-1T2Q.js";export{o as autoCloseTags,s as completeFromSchema,m as xml,a as xmlLanguage};
import"./dist-DBwNzi3C.js";import{i as a,n as o,r as s,t as r}from"./dist-fsvXrTzp.js";export{r as go,o as goLanguage,s as localCompletionSource,a as snippets};
import"./dist-DBwNzi3C.js";import{i as o,n as a,r as t,t as s}from"./dist-BYyu59D8.js";export{s as globalCompletion,a as localCompletionSource,t as python,o as pythonLanguage};
import{D as s,J as r,N as Q,T as n,g as t,q as o,r as c,s as i,u as l}from"./dist-DBwNzi3C.js";var g=o({String:r.string,Number:r.number,"True False":r.bool,PropertyName:r.propertyName,Null:r.null,", :":r.separator,"[ ]":r.squareBracket,"{ }":r.brace}),p=c.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[g],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),m=()=>a=>{try{JSON.parse(a.state.doc.toString())}catch(O){if(!(O instanceof SyntaxError))throw O;let e=u(O,a.state.doc);return[{from:e,message:O.message,severity:"error",to:e}]}return[]};function u(a,O){let e;return(e=a.message.match(/at position (\d+)/))?Math.min(+e[1],O.length):(e=a.message.match(/at line (\d+) column (\d+)/))?Math.min(O.line(+e[1]).from+ +e[2]-1,O.length):0}var P=i.define({name:"json",parser:p.configure({props:[Q.add({Object:t({except:/^\s*\}/}),Array:t({except:/^\s*\]/})}),s.add({"Object Array":n})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function R(){return new l(P)}export{P as n,m as r,R as t};
import{D as b,J as e,N as r,T as s,q as a,r as t,s as P,u as S,y as Q}from"./dist-DBwNzi3C.js";var n={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},i=t.deserialize({version:14,states:"!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",stateData:"!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O",goto:"xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV",nodeNames:"\u26A0 LineComment BlockComment Module ) ( App Identifier Type Keyword Number String",maxTerm:17,nodeProps:[["isolate",-3,1,2,11,""],["openedBy",4,"("],["closedBy",5,")"],["group",-6,6,7,8,9,10,11,"Expression"]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"0o~R^XY}YZ}]^}pq}rs!Stu#pxy'Uyz(e{|(j}!O(j!Q!R(s!R![*p!]!^.^#T#o.{~!SO_~~!VVOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j<%lO!S~!qOZ~~!tRO;'S!S;'S;=`!};=`O!S~#QWOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j;=`<%l!S<%lO!S~#mP;=`<%l!S~#siqr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%b~%giV~qr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%b~'ZPT~!]!^'^~'aTO!]'^!]!^'p!^;'S'^;'S;=`(_<%lO'^~'sVOy'^yz(Yz!]'^!]!^'p!^;'S'^;'S;=`(_<%lO'^~(_OQ~~(bP;=`<%l'^~(jOS~~(mQ!Q!R(s!R![*p~(xUY~!O!P)[!Q![*p!g!h){#R#S+U#X#Y){#l#m+[~)aRY~!Q![)j!g!h){#X#Y){~)oSY~!Q![)j!g!h){#R#S*j#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dQY~!Q![*_#R#S*X~*mP!Q![)j~*uTY~!O!P)[!Q![*p!g!h){#R#S+U#X#Y){~+XP!Q![*p~+_R!Q![+h!c!i+h#T#Z+h~+mVY~!O!P,S!Q![+h!c!i+h!r!s-P#R#S+[#T#Z+h#d#e-P~,XTY~!Q![,h!c!i,h!r!s-P#T#Z,h#d#e-P~,mUY~!Q![,h!c!i,h!r!s-P#R#S.Q#T#Z,h#d#e-P~-ST{|-c}!O-c!Q![-o!c!i-o#T#Z-o~-fR!Q![-o!c!i-o#T#Z-o~-tSY~!Q![-o!c!i-o#R#S-c#T#Z-o~.TR!Q![,h!c!i,h#T#Z,h~.aP!]!^.d~.iSP~OY.dZ;'S.d;'S;=`.u<%lO.d~.xP;=`<%l.d~/QiX~qr.{st.{tu.{uv.{vw.{wx.{z{.{{|.{}!O.{!O!P.{!P!Q.{!Q![.{![!].{!^!_.{!_!`.{!`!a.{!a!b.{!b!c.{!c!}.{#Q#R.{#R#S.{#S#T.{#T#o.{#p#q.{#r#s.{",tokenizers:[0],topRules:{Module:[0,3]},specialized:[{term:9,get:O=>n[O]||-1}],tokenPrec:0}),o=P.define({name:"wast",parser:i.configure({props:[r.add({App:Q({closing:")",align:!1})}),b.add({App:s,BlockComment(O){return{from:O.from+2,to:O.to-2}}}),a({Keyword:e.keyword,Type:e.typeName,Number:e.number,String:e.string,Identifier:e.variableName,LineComment:e.lineComment,BlockComment:e.blockComment,"( )":e.paren})]}),languageData:{commentTokens:{line:";;",block:{open:"(;",close:";)"}},closeBrackets:{brackets:["(",'"']}}});function p(){return new S(o)}export{o as n,p as t};
import"./dist-DBwNzi3C.js";import"./dist-BIKFl48f.js";import{n as s,r as a,t as o}from"./dist-DDGPBuw4.js";export{o as sass,s as sassCompletionSource,a as sassLanguage};
import"./dist-DBwNzi3C.js";import{n as a,t as o}from"./dist-6cIjG-FS.js";export{o as java,a as javaLanguage};
import{Bt as he,Gt as T,It as de,Jt as H,K as nt,L as it,M as st,Nt as lt,Rt as ue,Ut as j,Vt as me,Wt as ge,Yt as pe,_t as Ae,at as O,ct as at,lt as z,ot as X,qt as G,rt as w}from"./dist-DBwNzi3C.js";var b=class rt{constructor(t,o,i,n){this.fromA=t,this.toA=o,this.fromB=i,this.toB=n}offset(t,o=t){return new rt(this.fromA+t,this.toA+t,this.fromB+o,this.toB+o)}};function E(e,t,o,i,n,r){if(e==i)return[];let s=te(e,t,o,i,n,r),l=re(e,t+s,o,i,n+s,r);t+=s,o-=l,n+=s,r-=l;let f=o-t,h=r-n;if(!f||!h)return[new b(t,o,n,r)];if(f>h){let c=e.slice(t,o).indexOf(i.slice(n,r));if(c>-1)return[new b(t,t+c,n,n),new b(t+c+h,o,r,r)]}else if(h>f){let c=i.slice(n,r).indexOf(e.slice(t,o));if(c>-1)return[new b(t,t,n,n+c),new b(o,o,n+c+f,r)]}if(f==1||h==1)return[new b(t,o,n,r)];let a=be(e,t,o,i,n,r);if(a){let[c,d,u]=a;return E(e,t,c,i,n,d).concat(E(e,c+u,o,i,d+u,r))}return ft(e,t,o,i,n,r)}var U=1e9,q=0,Z=!1;function ft(e,t,o,i,n,r){let s=o-t,l=r-n;if(U<1e9&&Math.min(s,l)>U*16||q>0&&Date.now()>q)return Math.min(s,l)>U*64?[new b(t,o,n,r)]:Ce(e,t,o,i,n,r);let f=Math.ceil((s+l)/2);_.reset(f),ee.reset(f);let h=(u,g)=>e.charCodeAt(t+u)==i.charCodeAt(n+g),a=(u,g)=>e.charCodeAt(o-u-1)==i.charCodeAt(r-g-1),c=(s-l)%2==0?null:ee,d=c?null:_;for(let u=0;u<f;u++){if(u>U||q>0&&!(u&63)&&Date.now()>q)return Ce(e,t,o,i,n,r);let g=_.advance(u,s,l,f,c,!1,h)||ee.advance(u,s,l,f,d,!0,a);if(g)return ct(e,t,o,t+g[0],i,n,r,n+g[1])}return[new b(t,o,n,r)]}var ve=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let t=0;t<this.len;t++)this.vec[t]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,t,o,i,n,r,s){for(let l=-e+this.start;l<=e-this.end;l+=2){let f=i+l,h=l==-e||l!=e&&this.vec[f-1]<this.vec[f+1]?this.vec[f+1]:this.vec[f-1]+1,a=h-l;for(;h<t&&a<o&&s(h,a);)h++,a++;if(this.vec[f]=h,h>t)this.end+=2;else if(a>o)this.start+=2;else if(n){let c=i+(t-o)-l;if(c>=0&&c<this.len&&n.vec[c]!=-1)if(r){let d=n.vec[c];if(d>=t-h)return[d,i+d-c]}else{let d=t-n.vec[c];if(h>=d)return[h,a]}}}return null}},_=new ve,ee=new ve;function ct(e,t,o,i,n,r,s,l){let f=!1;return!N(e,i)&&++i==o&&(f=!0),!N(n,l)&&++l==s&&(f=!0),f?[new b(t,o,r,s)]:E(e,t,i,n,r,l).concat(E(e,i,o,n,l,s))}function Be(e,t){let o=1,i=Math.min(e,t);for(;o<i;)o<<=1;return o}function te(e,t,o,i,n,r){if(t==o||t==r||e.charCodeAt(t)!=i.charCodeAt(n))return 0;let s=Be(o-t,r-n);for(let l=t,f=n;;){let h=l+s,a=f+s;if(h>o||a>r||e.slice(l,h)!=i.slice(f,a)){if(s==1)return l-t-(N(e,l)?0:1);s>>=1}else{if(h==o||a==r)return h-t;l=h,f=a}}}function re(e,t,o,i,n,r){if(t==o||n==r||e.charCodeAt(o-1)!=i.charCodeAt(r-1))return 0;let s=Be(o-t,r-n);for(let l=o,f=r;;){let h=l-s,a=f-s;if(h<t||a<n||e.slice(h,l)!=i.slice(a,f)){if(s==1)return o-l-(N(e,l)?0:1);s>>=1}else{if(h==t||a==n)return o-h;l=h,f=a}}}function oe(e,t,o,i,n,r,s,l){let f=i.slice(n,r),h=null;for(;;){if(h||s<l)return h;for(let a=t+s;;){N(e,a)||a++;let c=a+s;if(N(e,c)||(c+=c==a+1?1:-1),c>=o)break;let d=e.slice(a,c),u=-1;for(;(u=f.indexOf(d,u+1))!=-1;){let g=te(e,c,o,i,n+u+d.length,r),p=re(e,t,a,i,n,n+u),m=d.length+g+p;(!h||h[2]<m)&&(h=[a-p,n+u-p,m])}a=c}if(l<0)return h;s>>=1}}function be(e,t,o,i,n,r){let s=o-t,l=r-n;if(s<l){let f=be(i,n,r,e,t,o);return f&&[f[1],f[0],f[2]]}return s<4||l*2<s?null:oe(e,t,o,i,n,r,Math.floor(s/4),-1)}function Ce(e,t,o,i,n,r){Z=!0;let s=o-t,l=r-n,f;if(s<l){let d=oe(i,n,r,e,t,o,Math.floor(s/6),50);f=d&&[d[1],d[0],d[2]]}else f=oe(e,t,o,i,n,r,Math.floor(l/6),50);if(!f)return[new b(t,o,n,r)];let[h,a,c]=f;return E(e,t,h,i,n,a).concat(E(e,h+c,o,i,a+c,r))}function we(e,t){for(let o=1;o<e.length;o++){let i=e[o-1],n=e[o];i.toA>n.fromA-t&&i.toB>n.fromB-t&&(e[o-1]=new b(i.fromA,n.toA,i.fromB,n.toB),e.splice(o--,1))}}function ht(e,t,o){for(;;){we(o,1);let i=!1;for(let n=0;n<o.length;n++){let r=o[n],s,l;(s=te(e,r.fromA,r.toA,t,r.fromB,r.toB))&&(r=o[n]=new b(r.fromA+s,r.toA,r.fromB+s,r.toB)),(l=re(e,r.fromA,r.toA,t,r.fromB,r.toB))&&(r=o[n]=new b(r.fromA,r.toA-l,r.fromB,r.toB-l));let f=r.toA-r.fromA,h=r.toB-r.fromB;if(f&&h)continue;let a=r.fromA-(n?o[n-1].toA:0),c=(n<o.length-1?o[n+1].fromA:e.length)-r.toA;if(!a||!c)continue;let d=f?e.slice(r.fromA,r.toA):t.slice(r.fromB,r.toB);a<=d.length&&e.slice(r.fromA-a,r.fromA)==d.slice(d.length-a)?(o[n]=new b(r.fromA-a,r.toA-a,r.fromB-a,r.toB-a),i=!0):c<=d.length&&e.slice(r.toA,r.toA+c)==d.slice(0,c)&&(o[n]=new b(r.fromA+c,r.toA+c,r.fromB+c,r.toB+c),i=!0)}if(!i)break}return o}function dt(e,t,o){for(let i=0,n=0;n<e.length;n++){let r=e[n],s=r.toA-r.fromA,l=r.toB-r.fromB;if(s&&l||s>3||l>3){let f=n==e.length-1?t.length:e[n+1].fromA,h=r.fromA-i,a=f-r.toA,c=Le(t,r.fromA,h),d=Oe(t,r.toA,a),u=r.fromA-c,g=d-r.toA;if((!s||!l)&&u&&g){let p=Math.max(s,l),[m,A,D]=s?[t,r.fromA,r.toA]:[o,r.fromB,r.toB];p>u&&t.slice(c,r.fromA)==m.slice(D-u,D)?(r=e[n]=new b(c,c+s,r.fromB-u,r.toB-u),c=r.fromA,d=Oe(t,r.toA,f-r.toA)):p>g&&t.slice(r.toA,d)==m.slice(A,A+g)&&(r=e[n]=new b(d-s,d,r.fromB+g,r.toB+g),d=r.toA,c=Le(t,r.fromA,r.fromA-i)),u=r.fromA-c,g=d-r.toA}if(u||g)r=e[n]=new b(r.fromA-u,r.toA+g,r.fromB-u,r.toB+g);else if(s){if(!l){let p=ye(t,r.fromA,r.toA),m,A=p<0?-1:Ee(t,r.toA,r.fromA);p>-1&&(m=p-r.fromA)<=a&&t.slice(r.fromA,p)==t.slice(r.toA,r.toA+m)?r=e[n]=r.offset(m):A>-1&&(m=r.toA-A)<=h&&t.slice(r.fromA-m,r.fromA)==t.slice(A,r.toA)&&(r=e[n]=r.offset(-m))}}else{let p=ye(o,r.fromB,r.toB),m,A=p<0?-1:Ee(o,r.toB,r.fromB);p>-1&&(m=p-r.fromB)<=a&&o.slice(r.fromB,p)==o.slice(r.toB,r.toB+m)?r=e[n]=r.offset(m):A>-1&&(m=r.toB-A)<=h&&o.slice(r.fromB-m,r.fromB)==o.slice(A,r.toB)&&(r=e[n]=r.offset(-m))}}i=r.toA}return we(e,3),e}var y;try{y=RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function ke(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function xe(e,t){if(t==e.length)return 0;let o=e.charCodeAt(t);return o<192?ke(o)?1:0:y?!Se(o)||t==e.length-1?y.test(String.fromCharCode(o))?1:0:y.test(e.slice(t,t+2))?2:0:0}function Me(e,t){if(!t)return 0;let o=e.charCodeAt(t-1);return o<192?ke(o)?1:0:y?!Te(o)||t==1?y.test(String.fromCharCode(o))?1:0:y.test(e.slice(t-2,t))?2:0:0}var De=8;function Oe(e,t,o){if(t==e.length||!Me(e,t))return t;for(let i=t,n=t+o,r=0;r<De;r++){let s=xe(e,i);if(!s||i+s>n)return i;i+=s}return t}function Le(e,t,o){if(!t||!xe(e,t))return t;for(let i=t,n=t-o,r=0;r<De;r++){let s=Me(e,i);if(!s||i-s<n)return i;i-=s}return t}function Ee(e,t,o){for(;t!=o;t--)if(e.charCodeAt(t-1)==10)return t;return-1}function ye(e,t,o){for(;t!=o;t++)if(e.charCodeAt(t)==10)return t;return-1}var Se=e=>e>=55296&&e<=56319,Te=e=>e>=56320&&e<=57343;function N(e,t){return!t||t==e.length||!Se(e.charCodeAt(t-1))||!Te(e.charCodeAt(t))}function ut(e,t,o){return U=((o==null?void 0:o.scanLimit)??1e9)>>1,q=o!=null&&o.timeout?Date.now()+o.timeout:0,Z=!1,ht(e,t,E(e,0,e.length,t,0,t.length))}function Ge(){return!Z}function Ne(e,t,o){return dt(ut(e,t,o),e,t)}var k=me.define({combine:e=>e[0]}),ne=G.define(),Re=me.define(),M=H.define({create(e){return null},update(e,t){for(let o of t.effects)o.is(ne)&&(e=o.value);for(let o of t.state.facet(Re))e=o(e,t);return e}}),S=class ot{constructor(t,o,i,n,r,s=!0){this.changes=t,this.fromA=o,this.toA=i,this.fromB=n,this.toB=r,this.precise=s}offset(t,o){return t||o?new ot(this.changes,this.fromA+t,this.toA+t,this.fromB+o,this.toB+o,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(t,o,i){return Ue(Ne(t.toString(),o.toString(),i),t,o,0,0,Ge())}static updateA(t,o,i,n,r){return je(Ie(t,n,!0,i.length),t,o,i,r)}static updateB(t,o,i,n,r){return je(Ie(t,n,!1,o.length),t,o,i,r)}};function Ve(e,t,o,i){let n=o.lineAt(e),r=i.lineAt(t);return n.to==e&&r.to==t&&e<o.length&&t<i.length?[e+1,t+1]:[n.from,r.from]}function He(e,t,o,i){let n=o.lineAt(e),r=i.lineAt(t);return n.from==e&&r.from==t?[e,t]:[n.to+1,r.to+1]}function Ue(e,t,o,i,n,r){let s=[];for(let l=0;l<e.length;l++){let f=e[l],[h,a]=Ve(f.fromA+i,f.fromB+n,t,o),[c,d]=He(f.toA+i,f.toB+n,t,o),u=[f.offset(-h+i,-a+n)];for(;l<e.length-1;){let g=e[l+1],[p,m]=Ve(g.fromA+i,g.fromB+n,t,o);if(p>c+1&&m>d+1)break;u.push(g.offset(-h+i,-a+n)),[c,d]=He(g.toA+i,g.toB+n,t,o),l++}s.push(new S(u,h,Math.max(h,c),a,Math.max(a,d),r))}return s}var W=1e3;function qe(e,t,o,i){let n=0,r=e.length;for(;;){if(n==r){let a=0,c=0;n&&({toA:a,toB:c}=e[n-1]);let d=t-(o?a:c);return[a+d,c+d]}let s=n+r>>1,l=e[s],[f,h]=o?[l.fromA,l.toA]:[l.fromB,l.toB];if(f>t)r=s;else if(h<=t)n=s+1;else return i?[l.fromA,l.fromB]:[l.toA,l.toB]}}function Ie(e,t,o,i){let n=[];return t.iterChangedRanges((r,s,l,f)=>{let h=0,a=o?t.length:i,c=0,d=o?i:t.length;r>W&&([h,c]=qe(e,r-W,o,!0)),s<t.length-W&&([a,d]=qe(e,s+W,o,!1));let u=f-l-(s-r),g,[p,m]=o?[u,0]:[0,u];n.length&&(g=n[n.length-1]).toA>=h?n[n.length-1]={fromA:g.fromA,fromB:g.fromB,toA:a,toB:d,diffA:g.diffA+p,diffB:g.diffB+m}:n.push({fromA:h,toA:a,fromB:c,toB:d,diffA:p,diffB:m})}),n}function je(e,t,o,i,n){if(!e.length)return t;let r=[];for(let s=0,l=0,f=0,h=0;;s++){let a=s==e.length?null:e[s],c=a?a.fromA+l:o.length,d=a?a.fromB+f:i.length;for(;h<t.length;){let m=t[h];if(Math.min(o.length,m.toA+l)>c||Math.min(i.length,m.toB+f)>d)break;r.push(m.offset(l,f)),h++}if(!a)break;let u=a.toA+l+a.diffA,g=a.toB+f+a.diffB,p=Ne(o.sliceString(c,u),i.sliceString(d,g),n);for(let m of Ue(p,o,i,c,d,Ge()))r.push(m);for(l+=a.diffA,f+=a.diffB;h<t.length;){let m=t[h];if(m.fromA+l>u&&m.fromB+f>g)break;h++}}return r}var ze={scanLimit:500},Y=at.fromClass(class{constructor(e){({deco:this.deco,gutter:this.gutter}=Je(e))}update(e){(e.docChanged||e.viewportChanged||mt(e.startState,e.state)||gt(e.startState,e.state))&&({deco:this.deco,gutter:this.gutter}=Je(e.view))}},{decorations:e=>e.deco}),F=j.low(Ae({class:"cm-changeGutter",markers:e=>{var t;return((t=e.plugin(Y))==null?void 0:t.gutter)||ge.empty}}));function mt(e,t){return e.field(M,!1)!=t.field(M,!1)}function gt(e,t){return e.facet(k)!=t.facet(k)}var We=w.line({class:"cm-changedLine"}),Ye=w.mark({class:"cm-changedText"}),pt=w.mark({tagName:"ins",class:"cm-insertedLine"}),At=w.mark({tagName:"del",class:"cm-deletedLine"}),Fe=new class extends X{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function vt(e,t,o,i,n,r){let s=o?e.fromA:e.fromB,l=o?e.toA:e.toB,f=0;if(s!=l){n.add(s,s,We),n.add(s,l,o?At:pt),r&&r.add(s,s,Fe);for(let h=t.iterRange(s,l-1),a=s;!h.next().done;){if(h.lineBreak){a++,n.add(a,a,We),r&&r.add(a,a,Fe);continue}let c=a+h.value.length;if(i)for(;f<e.changes.length;){let d=e.changes[f],u=s+(o?d.fromA:d.fromB),g=s+(o?d.toA:d.toB),p=Math.max(a,u),m=Math.min(c,g);if(p<m&&n.add(p,m,Ye),g<c)f++;else break}a=c}}}function Je(e){let t=e.state.field(M),{side:o,highlightChanges:i,markGutter:n,overrideChunk:r}=e.state.facet(k),s=o=="a",l=new T,f=n?new T:null,{from:h,to:a}=e.viewport;for(let c of t){if((s?c.fromA:c.fromB)>=a)break;(s?c.toA:c.toB)>h&&(!r||!r(e.state,c,l,f))&&vt(c,e.state.doc,s,i,l,f)}return{deco:l.finish(),gutter:f&&f.finish()}}var J=class extends z{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},K=G.define({map:(e,t)=>e.map(t)}),I=H.define({create:()=>w.none,update:(e,t)=>{for(let o of t.effects)if(o.is(K))return o.value;return e.map(t.changes)},provide:e=>O.decorations.from(e)}),P=.01;function Ke(e,t){if(e.size!=t.size)return!1;let o=e.iter(),i=t.iter();for(;o.value;){if(o.from!=i.from||Math.abs(o.value.spec.widget.height-i.value.spec.widget.height)>1)return!1;o.next(),i.next()}return!0}function Bt(e,t,o){let i=new T,n=new T,r=e.state.field(I).iter(),s=t.state.field(I).iter(),l=0,f=0,h=0,a=0,c=e.viewport,d=t.viewport;for(let m=0;;m++){let A=m<o.length?o[m]:null,D=A?A.fromA:e.state.doc.length,C=A?A.fromB:t.state.doc.length;if(l<D){let v=e.lineBlockAt(l).top+h-(t.lineBlockAt(f).top+a);v<-P?(h-=v,i.add(l,l,w.widget({widget:new J(-v),block:!0,side:-1}))):v>P&&(a+=v,n.add(f,f,w.widget({widget:new J(v),block:!0,side:-1})))}if(D>l+1e3&&l<c.from&&D>c.from&&f<d.from&&C>d.from){let v=Math.min(c.from-l,d.from-f);l+=v,f+=v,m--}else if(A)l=A.toA,f=A.toB;else break;for(;r.value&&r.from<l;)h-=r.value.spec.widget.height,r.next();for(;s.value&&s.from<f;)a-=s.value.spec.widget.height,s.next()}for(;r.value;)h-=r.value.spec.widget.height,r.next();for(;s.value;)a-=s.value.spec.widget.height,s.next();let u=e.contentHeight+h-(t.contentHeight+a);u<P?i.add(e.state.doc.length,e.state.doc.length,w.widget({widget:new J(-u),block:!0,side:1})):u>P&&n.add(t.state.doc.length,t.state.doc.length,w.widget({widget:new J(u),block:!0,side:1}));let g=i.finish(),p=n.finish();Ke(g,e.state.field(I))||e.dispatch({effects:K.of(g)}),Ke(p,t.state.field(I))||t.dispatch({effects:K.of(p)})}var ie=G.define({map:(e,t)=>t.mapPos(e)}),bt=class extends z{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let t=document.createElement("div");return t.className="cm-collapsedLines",t.textContent=e.state.phrase("$ unchanged lines",this.lines),t.addEventListener("click",o=>{let i=e.posAtDOM(o.target);e.dispatch({effects:ie.of(i)});let{side:n,sibling:r}=e.state.facet(k);r&&r().dispatch({effects:ie.of(Ct(i,e.state.field(M),n=="a"))})}),t}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}};function Ct(e,t,o){let i=0,n=0;for(let r=0;;r++){let s=r<t.length?t[r]:null;if(!s||(o?s.fromA:s.fromB)>=e)return n+(e-i);[i,n]=o?[s.toA,s.toB]:[s.toB,s.toA]}}var wt=H.define({create(e){return w.none},update(e,t){e=e.map(t.changes);for(let o of t.effects)o.is(ie)&&(e=e.update({filter:i=>i!=o.value}));return e},provide:e=>O.decorations.from(e)});function se({margin:e=3,minSize:t=4}){return wt.init(o=>kt(o,e,t))}function kt(e,t,o){let i=new T,n=e.facet(k).side=="a",r=e.field(M),s=1;for(let l=0;;l++){let f=l<r.length?r[l]:null,h=l?s+t:1,a=f?e.doc.lineAt(n?f.fromA:f.fromB).number-1-t:e.doc.lines,c=a-h+1;if(c>=o&&i.add(e.doc.line(h).from,e.doc.line(a).to,w.replace({widget:new bt(c),block:!0})),!f)break;s=e.doc.lineAt(Math.min(e.doc.length,n?f.toA:f.toB)).number}return i.finish()}var xt=O.styleModule.of(new lt({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),Pe=O.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"\u299A"',marginInlineEnd:"7px"},"&:after":{content:'"\u299A"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),$e=new ue,$=new ue,Mt=class{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||ze;let t=[j.low(Y),Pe,xt,I,O.updateListener.of(a=>{this.measuring<0&&(a.heightChanged||a.viewportChanged)&&!a.transactions.some(c=>c.effects.some(d=>d.is(K)))&&this.measure()})],o=[k.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&o.push(F);let i=he.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],O.editorAttributes.of({class:"cm-merge-a"}),$.of(o),t]}),n=[k.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&n.push(F);let r=he.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],O.editorAttributes.of({class:"cm-merge-b"}),$.of(n),t]});this.chunks=S.build(i.doc,r.doc,this.diffConf);let s=[M.init(()=>this.chunks),$e.of(e.collapseUnchanged?se(e.collapseUnchanged):[])];i=i.update({effects:G.appendConfig.of(s)}).state,r=r.update({effects:G.appendConfig.of(s)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let l=e.orientation||"a-b",f=document.createElement("div");f.className="cm-mergeViewEditor";let h=document.createElement("div");h.className="cm-mergeViewEditor",this.editorDOM.appendChild(l=="a-b"?f:h),this.editorDOM.appendChild(l=="a-b"?h:f),this.a=new O({state:i,parent:f,root:e.root,dispatchTransactions:a=>this.dispatch(a,this.a)}),this.b=new O({state:r,parent:h,root:e.root,dispatchTransactions:a=>this.dispatch(a,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,t){if(e.some(o=>o.docChanged)){let o=e[e.length-1],i=e.reduce((r,s)=>r.compose(s.changes),de.empty(e[0].startState.doc.length));this.chunks=t==this.a?S.updateA(this.chunks,o.newDoc,this.b.state.doc,i,this.diffConf):S.updateB(this.chunks,this.a.state.doc,o.newDoc,i,this.diffConf),t.update([...e,o.state.update({effects:ne.of(this.chunks)})]);let n=t==this.a?this.b:this.a;n.update([n.state.update({effects:ne.of(this.chunks)})]),this.scheduleMeasure()}else t.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let n=e.orientation!="b-a";if(n!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let r=this.a.dom.parentNode,s=this.b.dom.parentNode;r.remove(),s.remove(),this.editorDOM.insertBefore(n?r:s,this.editorDOM.firstChild),this.editorDOM.appendChild(n?s:r),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let n=!!this.revertDOM,r=this.revertToA,s=this.renderRevert;"revertControls"in e&&(n=!!e.revertControls,r=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(s=e.renderRevertControl),this.setupRevertControls(n,r,s)}let t="highlightChanges"in e,o="gutter"in e,i="collapseUnchanged"in e;if(t||o||i){let n=[],r=[];if(t||o){let s=this.a.state.facet(k),l=o?e.gutter!==!1:s.markGutter,f=t?e.highlightChanges!==!1:s.highlightChanges;n.push($.reconfigure([k.of({side:"a",sibling:()=>this.b,highlightChanges:f,markGutter:l}),l?F:[]])),r.push($.reconfigure([k.of({side:"b",sibling:()=>this.a,highlightChanges:f,markGutter:l}),l?F:[]]))}if(i){let s=$e.reconfigure(e.collapseUnchanged?se(e.collapseUnchanged):[]);n.push(s),r.push(s)}this.a.dispatch({effects:n}),this.b.dispatch({effects:r})}this.scheduleMeasure()}setupRevertControls(e,t,o){this.revertToA=t,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=o,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){this.measuring<0&&(this.measuring=(this.dom.ownerDocument.defaultView||window).requestAnimationFrame(()=>{this.measuring=-1,this.measure()}))}measure(){Bt(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,t=e.firstChild,o=this.a.viewport,i=this.b.viewport;for(let n=0;n<this.chunks.length;n++){let r=this.chunks[n];if(r.fromA>o.to||r.fromB>i.to)break;if(r.fromA<o.from||r.fromB<i.from)continue;let s=this.a.lineBlockAt(r.fromA).top+"px";for(;t&&+t.dataset.chunk<n;)t=Qe(t);t&&t.dataset.chunk==String(n)?(t.style.top!=s&&(t.style.top=s),t=t.nextSibling):e.insertBefore(this.renderRevertButton(s,n),t)}for(;t;)t=Qe(t)}renderRevertButton(e,t){let o;if(this.renderRevert)o=this.renderRevert();else{o=document.createElement("button");let i=this.a.state.phrase("Revert this chunk");o.setAttribute("aria-label",i),o.setAttribute("title",i),o.textContent=this.revertToLeft?"\u21DC":"\u21DD"}return o.style.top=e,o.setAttribute("data-chunk",String(t)),o}revertClicked(e){let t=e.target,o;for(;t&&t.parentNode!=this.revertDOM;)t=t.parentNode;if(t&&(o=this.chunks[t.dataset.chunk])){let[i,n,r,s,l,f]=this.revertToA?[this.b,this.a,o.fromB,o.toB,o.fromA,o.toA]:[this.a,this.b,o.fromA,o.toA,o.fromB,o.toB],h=i.state.sliceDoc(r,Math.max(r,s-1));r!=s&&f<=n.state.doc.length&&(h+=i.state.lineBreak),n.dispatch({changes:{from:l,to:Math.min(n.state.doc.length,f),insert:h},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function Qe(e){let t=e.nextSibling;return e.remove(),t}var Dt=new class extends X{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Ot=j.low(Ae({class:"cm-changeGutter",markers:e=>{var t;return((t=e.plugin(Y))==null?void 0:t.gutter)||ge.empty},widgetMarker:(e,t)=>t instanceof Ze?Dt:null}));function Lt(e){let t=typeof e.original=="string"?pe.of(e.original.split(/\r?\n/)):e.original,o=e.diffConfig||ze;return[j.low(Y),Tt,Pe,O.editorAttributes.of({class:"cm-merge-b"}),Re.of((i,n)=>{let r=n.effects.find(s=>s.is(le));return r&&(i=S.updateA(i,r.value.doc,n.startState.doc,r.value.changes,o)),n.docChanged&&(i=S.updateB(i,n.state.field(R),n.newDoc,n.changes,o)),i}),k.of({highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1,syntaxHighlightDeletions:e.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:e.mergeControls??!0,overrideChunk:e.allowInlineDiffs?Vt:void 0,side:"b"}),R.init(()=>t),e.gutter===!1?[]:Ot,e.collapseUnchanged?se(e.collapseUnchanged):[],M.init(i=>S.build(t,i.doc,o))]}var le=G.define(),R=H.define({create:()=>pe.empty,update(e,t){for(let o of t.effects)o.is(le)&&(e=o.value.doc);return e}}),Xe=new WeakMap,Ze=class extends z{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}};function Et(e,t,o){let i=Xe.get(t.changes);if(i)return i;let n=w.widget({block:!0,side:-1,widget:new Ze(r=>{let{highlightChanges:s,syntaxHighlightDeletions:l,syntaxHighlightDeletionsMaxLength:f,mergeControls:h}=e.facet(k),a=document.createElement("div");if(a.className="cm-deletedChunk",h){let C=a.appendChild(document.createElement("div"));C.className="cm-chunkButtons";let v=B=>{B.preventDefault(),yt(r,r.posAtDOM(a))},L=B=>{B.preventDefault(),St(r,r.posAtDOM(a))};if(typeof h=="function")C.appendChild(h("accept",v)),C.appendChild(h("reject",L));else{let B=C.appendChild(document.createElement("button"));B.name="accept",B.textContent=e.phrase("Accept"),B.onmousedown=v;let x=C.appendChild(document.createElement("button"));x.name="reject",x.textContent=e.phrase("Reject"),x.onmousedown=L}}if(o||t.fromA>=t.toA)return a;let c=r.state.field(R).sliceString(t.fromA,t.endA),d=l&&e.facet(it),u=A(),g=t.changes,p=0,m=!1;function A(){let C=a.appendChild(document.createElement("div"));return C.className="cm-deletedLine",C.appendChild(document.createElement("del"))}function D(C,v,L){for(let B=C;B<v;){if(c.charAt(B)==`
`){u.firstChild||u.appendChild(document.createElement("br")),u=A(),B++;continue}let x=v,ae=L+(m?" cm-deletedText":""),fe=!1,Q=c.indexOf(`
`,B);if(Q>-1&&Q<v&&(x=Q),s&&p<g.length){let V=Math.max(0,m?g[p].toA:g[p].fromA);V<=x&&(x=V,m&&p++,fe=!0)}if(x>B){let V=document.createTextNode(c.slice(B,x));if(ae){let ce=u.appendChild(document.createElement("span"));ce.className=ae,ce.appendChild(V)}else u.appendChild(V);B=x}fe&&(m=!m)}}if(d&&t.toA-t.fromA<=f){let C=d.parser.parse(c),v=0;nt(C,{style:L=>st(e,L)},(L,B,x)=>{L>v&&D(v,L,""),D(L,B,x),v=B}),D(v,c.length,"")}else D(0,c.length,"");return u.firstChild||u.appendChild(document.createElement("br")),a})});return Xe.set(t.changes,n),n}function yt(e,t){let{state:o}=e,i=t??o.selection.main.head,n=e.state.field(M).find(f=>f.fromB<=i&&f.endB>=i);if(!n)return!1;let r=e.state.sliceDoc(n.fromB,Math.max(n.fromB,n.toB-1)),s=e.state.field(R);n.fromB!=n.toB&&n.toA<=s.length&&(r+=e.state.lineBreak);let l=de.of({from:n.fromA,to:Math.min(s.length,n.toA),insert:r},s.length);return e.dispatch({effects:le.of({doc:l.apply(s),changes:l}),userEvent:"accept"}),!0}function St(e,t){let{state:o}=e,i=t??o.selection.main.head,n=o.field(M).find(s=>s.fromB<=i&&s.endB>=i);if(!n)return!1;let r=o.field(R).sliceString(n.fromA,Math.max(n.fromA,n.toA-1));return n.fromA!=n.toA&&n.toB<=o.doc.length&&(r+=o.lineBreak),e.dispatch({changes:{from:n.fromB,to:Math.min(o.doc.length,n.toB),insert:r},userEvent:"revert"}),!0}function _e(e){let t=new T;for(let o of e.field(M)){let i=e.facet(k).overrideChunk&&tt(e,o);t.add(o.fromB,o.fromB,Et(e,o,!!i))}return t.finish()}var Tt=H.define({create:e=>_e(e),update(e,t){return t.state.field(M,!1)==t.startState.field(M,!1)?e:_e(t.state)},provide:e=>O.decorations.from(e)}),et=new WeakMap;function tt(e,t){let o=et.get(t);if(o!==void 0)return o;o=null;let i=e.field(R),n=e.doc,r=i.lineAt(t.endA).number-i.lineAt(t.fromA).number+1,s=n.lineAt(t.endB).number-n.lineAt(t.fromB).number+1;e:if(r==s&&r<10){let l=[],f=0,h=t.fromA,a=t.fromB;for(let c of t.changes){if(c.fromA<c.toA){f+=c.toA-c.fromA;let d=i.sliceString(h+c.fromA,h+c.toA);if(/\n/.test(d))break e;l.push(w.widget({widget:new Gt(d),side:-1}).range(a+c.fromB))}c.fromB<c.toB&&l.push(Ye.range(a+c.fromB,a+c.toB))}f<t.endA-t.fromA-r*2&&(o=l)}return et.set(t,o),o}var Gt=class extends z{constructor(e){super(),this.text=e}eq(e){return this.text==e.text}toDOM(e){let t=document.createElement("del");return t.className="cm-deletedText",t.textContent=this.text,t}},Nt=new class extends X{constructor(){super(...arguments),this.elementClass="cm-inlineChangedLineGutter"}},Rt=w.line({class:"cm-inlineChangedLine"});function Vt(e,t,o,i){let n=tt(e,t),r=0;if(!n)return!1;for(let s=e.doc.lineAt(t.fromB);;){for(i&&i.add(s.from,s.from,Nt),o.add(s.from,s.from,Rt);r<n.length&&n[r].to<=s.to;){let l=n[r++];o.add(l.from,l.to,l.value)}if(s.to>=t.endB)break;s=e.doc.lineAt(s.to+1)}return!0}export{Lt as n,Mt as t};
import{D as E,J as P,N as B,T as L,n as R,nt as j,q as T,r as D,s as Y,t as N,u as d,y as q}from"./dist-DBwNzi3C.js";var i=63,W=64,F=1,A=2,U=3,H=4,Z=5,I=6,M=7,y=65,K=66,J=8,OO=9,nO=10,eO=11,tO=12,z=13,aO=19,PO=20,QO=29,rO=33,oO=34,sO=47,cO=0,S=1,k=2,X=3,b=4,s=class{constructor(O,n,e){this.parent=O,this.depth=n,this.type=e,this.hash=(O?O.hash+O.hash<<8:0)+n+(n<<4)+e}};s.top=new s(null,-1,cO);function f(O,n){for(let e=0,t=n-O.pos-1;;t--,e++){let Q=O.peek(t);if(r(Q)||Q==-1)return e}}function x(O){return O==32||O==9}function r(O){return O==10||O==13}function V(O){return x(O)||r(O)}function c(O){return O<0||V(O)}var iO=new N({start:s.top,reduce(O,n){return O.type==X&&(n==PO||n==oO)?O.parent:O},shift(O,n,e,t){if(n==U)return new s(O,f(t,t.pos),S);if(n==y||n==Z)return new s(O,f(t,t.pos),k);if(n==i)return O.parent;if(n==aO||n==rO)return new s(O,0,X);if(n==z&&O.type==b)return O.parent;if(n==sO){let Q=/[1-9]/.exec(t.read(t.pos,e.pos));if(Q)return new s(O,O.depth+ +Q[0],b)}return O},hash(O){return O.hash}});function p(O,n,e=0){return O.peek(e)==n&&O.peek(e+1)==n&&O.peek(e+2)==n&&c(O.peek(e+3))}var pO=new R((O,n)=>{if(O.next==-1&&n.canShift(W))return O.acceptToken(W);let e=O.peek(-1);if((r(e)||e<0)&&n.context.type!=X){if(p(O,45))if(n.canShift(i))O.acceptToken(i);else return O.acceptToken(F,3);if(p(O,46))if(n.canShift(i))O.acceptToken(i);else return O.acceptToken(A,3);let t=0;for(;O.next==32;)t++,O.advance();(t<n.context.depth||t==n.context.depth&&n.context.type==S&&(O.next!=45||!c(O.peek(1))))&&O.next!=-1&&!r(O.next)&&O.next!=35&&O.acceptToken(i,-t)}},{contextual:!0}),XO=new R((O,n)=>{if(n.context.type==X){O.next==63&&(O.advance(),c(O.next)&&O.acceptToken(M));return}if(O.next==45)O.advance(),c(O.next)&&O.acceptToken(n.context.type==S&&n.context.depth==f(O,O.pos-1)?H:U);else if(O.next==63)O.advance(),c(O.next)&&O.acceptToken(n.context.type==k&&n.context.depth==f(O,O.pos-1)?I:Z);else{let e=O.pos;for(;;)if(x(O.next)){if(O.pos==e)return;O.advance()}else if(O.next==33)_(O);else if(O.next==38)m(O);else if(O.next==42){m(O);break}else if(O.next==39||O.next==34){if($(O,!0))break;return}else if(O.next==91||O.next==123){if(!lO(O))return;break}else{w(O,!0,!1,0);break}for(;x(O.next);)O.advance();if(O.next==58){if(O.pos==e&&n.canShift(QO))return;c(O.peek(1))&&O.acceptTokenTo(n.context.type==k&&n.context.depth==f(O,e)?K:y,e)}}},{contextual:!0});function fO(O){return O>32&&O<127&&O!=34&&O!=37&&O!=44&&O!=60&&O!=62&&O!=92&&O!=94&&O!=96&&O!=123&&O!=124&&O!=125}function C(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function G(O,n){return O.next==37?(O.advance(),C(O.next)&&O.advance(),C(O.next)&&O.advance(),!0):fO(O.next)||n&&O.next==44?(O.advance(),!0):!1}function _(O){if(O.advance(),O.next==60){for(O.advance();;)if(!G(O,!0)){O.next==62&&O.advance();break}}else for(;G(O,!1););}function m(O){for(O.advance();!c(O.next)&&u(O.tag)!="f";)O.advance()}function $(O,n){let e=O.next,t=!1,Q=O.pos;for(O.advance();;){let a=O.next;if(a<0)break;if(O.advance(),a==e)if(a==39)if(O.next==39)O.advance();else break;else break;else if(a==92&&e==34)O.next>=0&&O.advance();else if(r(a)){if(n)return!1;t=!0}else if(n&&O.pos>=Q+1024)return!1}return!t}function lO(O){for(let n=[],e=O.pos+1024;;)if(O.next==91||O.next==123)n.push(O.next),O.advance();else if(O.next==39||O.next==34){if(!$(O,!0))return!1}else if(O.next==93||O.next==125){if(n[n.length-1]!=O.next-2)return!1;if(n.pop(),O.advance(),!n.length)return!0}else{if(O.next<0||O.pos>e||r(O.next))return!1;O.advance()}}var RO="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function u(O){return O<33?"u":O>125?"s":RO[O-33]}function g(O,n){let e=u(O);return e!="u"&&!(n&&e=="f")}function w(O,n,e,t){if(u(O.next)=="s"||(O.next==63||O.next==58||O.next==45)&&g(O.peek(1),e))O.advance();else return!1;let Q=O.pos;for(;;){let a=O.next,o=0,l=t+1;for(;V(a);){if(r(a)){if(n)return!1;l=0}else l++;a=O.peek(++o)}if(!(a>=0&&(a==58?g(O.peek(o+1),e):a==35?O.peek(o-1)!=32:g(a,e)))||!e&&l<=t||l==0&&!e&&(p(O,45,o)||p(O,46,o)))break;if(n&&u(a)=="f")return!1;for(let v=o;v>=0;v--)O.advance();if(n&&O.pos>Q+1024)return!1}return!0}var uO=new R((O,n)=>{if(O.next==33)_(O),O.acceptToken(tO);else if(O.next==38||O.next==42){let e=O.next==38?nO:eO;m(O),O.acceptToken(e)}else O.next==39||O.next==34?($(O,!1),O.acceptToken(OO)):w(O,!1,n.context.type==X,n.context.depth)&&O.acceptToken(J)}),dO=new R((O,n)=>{let e=n.context.type==b?n.context.depth:-1,t=O.pos;O:for(;;){let Q=0,a=O.next;for(;a==32;)a=O.peek(++Q);if(!Q&&(p(O,45,Q)||p(O,46,Q))||!r(a)&&(e<0&&(e=Math.max(n.context.depth+1,Q)),Q<e))break;for(;;){if(O.next<0)break O;let o=r(O.next);if(O.advance(),o)continue O;t=O.pos}}O.acceptTokenTo(z,t)}),SO=T({DirectiveName:P.keyword,DirectiveContent:P.attributeValue,"DirectiveEnd DocEnd":P.meta,QuotedLiteral:P.string,BlockLiteralHeader:P.special(P.string),BlockLiteralContent:P.content,Literal:P.content,"Key/Literal Key/QuotedLiteral":P.definition(P.propertyName),"Anchor Alias":P.labelName,Tag:P.typeName,Comment:P.lineComment,": , -":P.separator,"?":P.punctuation,"[ ]":P.squareBracket,"{ }":P.brace}),kO=D.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"\u26A0 DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:iO,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[SO],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[pO,XO,uO,dO,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),bO=D.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"\u26A0 Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),h=Y.define({name:"yaml",parser:kO.configure({props:[B.add({Stream:O=>{for(let n=O.node.resolve(O.pos,-1);n&&n.to>=O.pos;n=n.parent){if(n.name=="BlockLiteralContent"&&n.from<n.to)return O.baseIndentFor(n);if(n.name=="BlockLiteral")return O.baseIndentFor(n)+O.unit;if(n.name=="BlockSequence"||n.name=="BlockMapping")return O.column(n.from,1);if(n.name=="QuotedLiteral")return null;if(n.name=="Literal"){let e=O.column(n.from,1);if(e==O.lineIndent(n.from,1))return e;if(n.to>O.pos)return null}}return null},FlowMapping:q({closing:"}"}),FlowSequence:q({closing:"]"})}),E.add({"FlowMapping FlowSequence":L,"Item Pair BlockLiteral":(O,n)=>({from:n.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function xO(){return new d(h)}var mO=Y.define({name:"yaml-frontmatter",parser:bO.configure({props:[T({DashLine:P.meta})]})});function $O(O){let{language:n,support:e}=O.content instanceof d?O.content:{language:O.content,support:[]};return new d(mO.configure({wrap:j(t=>t.name=="FrontmatterContent"?{parser:h.parser}:t.name=="Body"?{parser:n.parser}:null)}),e)}export{$O as n,h as r,xO as t};
import{D as f,J as e,N as Y,T as _,g as W,n as r,q as x,r as g,s as V,t as E,u as N}from"./dist-DBwNzi3C.js";import{i as C}from"./dist-BIKFl48f.js";var h=168,P=169,I=170,D=1,F=2,w=3,K=171,L=172,z=4,T=173,A=5,B=174,Z=175,G=176,s=177,q=6,U=7,H=8,J=9,c=0,i=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],M=58,OO=40,m=95,$O=91,S=45,eO=46,p=35,QO=37,k=123,tO=125,l=47,d=42,n=10,j=61,aO=43,nO=38;function o(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function u(O){return O>=48&&O<=57}function y(O){let $;return O.next==l&&(($=O.peek(1))==l||$==d)}var RO=new r((O,$)=>{if($.dialectEnabled(c)){let Q;if(O.next<0&&$.canShift(G))O.acceptToken(G);else if(((Q=O.peek(-1))==n||Q<0)&&$.canShift(Z)){let t=0;for(;O.next!=n&&i.includes(O.next);)O.advance(),t++;O.next==n||y(O)?O.acceptToken(Z,-t):t&&O.acceptToken(s)}else if(O.next==n)O.acceptToken(B,1);else if(i.includes(O.next)){for(O.advance();O.next!=n&&i.includes(O.next);)O.advance();O.acceptToken(s)}}else{let Q=0;for(;i.includes(O.next);)O.advance(),Q++;Q&&O.acceptToken(s)}},{contextual:!0}),iO=new r((O,$)=>{if(y(O)){if(O.advance(),$.dialectEnabled(c)){let Q=-1;for(let t=1;;t++){let R=O.peek(-t-1);if(R==n||R<0){Q=t+1;break}else if(!i.includes(R))break}if(Q>-1){let t=O.next==d,R=0;for(O.advance();O.next>=0;)if(O.next==n){O.advance();let a=0;for(;O.next!=n&&i.includes(O.next);)a++,O.advance();if(a<Q){R=-a-1;break}}else if(t&&O.next==d&&O.peek(1)==l){R=2;break}else O.advance();O.acceptToken(t?U:q,R);return}}if(O.next==l){for(;O.next!=n&&O.next>=0;)O.advance();O.acceptToken(q)}else{for(O.advance();O.next>=0;){let{next:Q}=O;if(O.advance(),Q==d&&O.next==l){O.advance();break}}O.acceptToken(U)}}}),rO=new r((O,$)=>{(O.next==aO||O.next==j)&&$.dialectEnabled(c)&&O.acceptToken(O.next==j?H:J,1)}),oO=new r((O,$)=>{if(!$.dialectEnabled(c))return;let Q=$.context.depth;if(O.next<0&&Q){O.acceptToken(P);return}if(O.peek(-1)==n){let t=0;for(;O.next!=n&&i.includes(O.next);)O.advance(),t++;t!=Q&&O.next!=n&&!y(O)&&(t<Q?O.acceptToken(P,-t):O.acceptToken(h))}}),SO=new r((O,$)=>{for(let Q=!1,t=0,R=0;;R++){let{next:a}=O;if(o(a)||a==S||a==m||Q&&u(a))!Q&&(a!=S||R>0)&&(Q=!0),t===R&&a==S&&t++,O.advance();else if(a==p&&O.peek(1)==k){O.acceptToken(A,2);break}else{Q&&O.acceptToken(t==2&&$.canShift(z)?z:$.canShift(T)?T:a==OO?K:L);break}}}),lO=new r(O=>{if(O.next==tO){for(O.advance();o(O.next)||O.next==S||O.next==m||u(O.next);)O.advance();O.next==p&&O.peek(1)==k?O.acceptToken(F,2):O.acceptToken(D)}}),dO=new r(O=>{if(i.includes(O.peek(-1))){let{next:$}=O;(o($)||$==m||$==p||$==eO||$==$O||$==M&&o(O.peek(1))||$==S||$==nO||$==d)&&O.acceptToken(I)}}),cO=new r(O=>{if(!i.includes(O.peek(-1))){let{next:$}=O;if($==QO&&(O.advance(),O.acceptToken(w)),o($)){do O.advance();while(o(O.next)||u(O.next));O.acceptToken(w)}}});function b(O,$){this.parent=O,this.depth=$,this.hash=(O?O.hash+O.hash<<8:0)+$+($<<4)}var XO=new E({start:new b(null,0),shift(O,$,Q,t){return $==h?new b(O,Q.pos-t.pos):$==P?O.parent:O},hash(O){return O.hash}}),PO=x({"AtKeyword import charset namespace keyframes media supports include mixin use forward extend at-root":e.definitionKeyword,"Keyword selector":e.keyword,ControlKeyword:e.controlKeyword,NamespaceName:e.namespace,KeyframeName:e.labelName,KeyframeRangeName:e.operatorKeyword,TagName:e.tagName,"ClassName Suffix":e.className,PseudoClassName:e.constant(e.className),IdName:e.labelName,"FeatureName PropertyName":e.propertyName,AttributeName:e.attributeName,NumberLiteral:e.number,KeywordQuery:e.keyword,UnaryQueryOp:e.operatorKeyword,"CallTag ValueName":e.atom,VariableName:e.variableName,SassVariableName:e.special(e.variableName),Callee:e.operatorKeyword,Unit:e.unit,"UniversalSelector NestingSelector IndentedMixin IndentedInclude":e.definitionOperator,MatchOp:e.compareOperator,"ChildOp SiblingOp, LogicOp":e.logicOperator,BinOp:e.arithmeticOperator,"Important Global Default":e.modifier,Comment:e.blockComment,LineComment:e.lineComment,ColorLiteral:e.color,"ParenthesizedContent StringLiteral":e.string,"InterpolationStart InterpolationContinue InterpolationEnd":e.meta,': "..."':e.punctuation,"PseudoOp #":e.derefOperator,"; ,":e.separator,"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace}),sO={__proto__:null,not:62,using:197,as:207,with:211,without:211,hide:225,show:225,if:263,from:269,to:271,through:273,in:279},mO={__proto__:null,url:82,"url-prefix":82,domain:82,regexp:82,lang:104,"nth-child":104,"nth-last-child":104,"nth-of-type":104,"nth-last-of-type":104,dir:104,"host-context":104},pO={__proto__:null,"@import":162,"@include":194,"@mixin":200,"@function":200,"@use":204,"@extend":214,"@at-root":218,"@forward":222,"@media":228,"@charset":232,"@namespace":236,"@keyframes":242,"@supports":254,"@if":258,"@else":260,"@for":266,"@each":276,"@while":282,"@debug":286,"@warn":286,"@error":286,"@return":286},uO={__proto__:null,layer:166,not:184,only:184,selector:190},yO=g.deserialize({version:14,states:"!$WQ`Q+tOOO#fQ+tOOP#mOpOOOOQ#U'#Ch'#ChO#rQ(pO'#CjOOQ#U'#Ci'#CiO%_Q)QO'#GXO%rQ.jO'#CnO&mQ#dO'#D]O'dQ(pO'#CgO'kQ)OO'#D_O'vQ#dO'#DfO'{Q#dO'#DiO(QQ#dO'#DqOOQ#U'#GX'#GXO(VQ(pO'#GXO(^Q(nO'#DuO%rQ.jO'#D}O%rQ.jO'#E`O%rQ.jO'#EcO%rQ.jO'#EeO(cQ)OO'#EjO)TQ)OO'#ElO%rQ.jO'#EnO)bQ)OO'#EqO%rQ.jO'#EsO)|Q)OO'#EuO*XQ)OO'#ExO*aQ)OO'#FOO*uQ)OO'#FbOOQ&Z'#GW'#GWOOQ&Y'#Fe'#FeO+PQ(nO'#FeQ`Q+tOOO%rQ.jO'#FQO+[Q(nO'#FUO+aQ)OO'#FZO%rQ.jO'#F^O%rQ.jO'#F`OOQ&Z'#Fm'#FmO+iQ+uO'#GaO+vQ(oO'#GaQOQ#SOOP,XO#SO'#GVPOOO)CAz)CAzOOQ#U'#Cm'#CmOOQ#U,59W,59WOOQ#i'#Cp'#CpO%rQ.jO'#CsO,xQ.wO'#CuO/dQ.^O,59YO%rQ.jO'#CzOOQ#S'#DP'#DPO/uQ(nO'#DUO/zQ)OO'#DZOOQ#i'#GZ'#GZO0SQ(nO'#DOOOQ#U'#D^'#D^OOQ#U,59w,59wO&mQ#dO,59wO0XQ)OO,59yO'vQ#dO,5:QO'{Q#dO,5:TO(cQ)OO,5:WO(cQ)OO,5:YO(cQ)OO,5:ZO(cQ)OO'#FlO0dQ(nO,59RO0oQ+tO'#DsO0vQ#TO'#DsOOQ&Z,59R,59ROOQ#U'#Da'#DaOOQ#S'#Dd'#DdOOQ#U,59y,59yO0{Q(nO,59yO1QQ(nO,59yOOQ#U'#Dh'#DhOOQ#U,5:Q,5:QOOQ#S'#Dj'#DjO1VQ9`O,5:TOOQ#U'#Dr'#DrOOQ#U,5:],5:]O2YQ.jO,5:aO2dQ.jO,5:iO3`Q.jO,5:zO3mQ.YO,5:}O4OQ.jO,5;POOQ#U'#Cj'#CjO4wQ(pO,5;UO5UQ(pO,5;WOOQ&Z,5;W,5;WO5]Q)OO,5;WO5bQ.jO,5;YOOQ#S'#ET'#ETO6TQ.jO'#E]O6kQ(nO'#GcO*aQ)OO'#EZO7PQ(nO'#E^OOQ#S'#Gd'#GdO0gQ(nO,5;]O4UQ.YO,5;_OOQ#d'#Ew'#EwO+PQ(nO,5;aO7UQ)OO,5;aOOQ#S'#Ez'#EzO7^Q(nO,5;dO7cQ(nO,5;jO7nQ(nO,5;|OOQ&Z'#Gf'#GfOOQ&Y,5<P,5<POOQ&Y-E9c-E9cO3mQ.YO,5;lO7|Q)OO,5;pO8RQ)OO'#GhO8ZQ)OO,5;uO3mQ.YO,5;xO4UQ.YO,5;zOOQ&Z-E9k-E9kO8`Q(oO,5<{OOQ&Z'#Gb'#GbO8qQ+uO'#FpO8`Q(oO,5<{POO#S'#Fd'#FdP9UO#SO,5<qPOOO,5<q,5<qO9dQ.YO,59_OOQ#i,59a,59aO%rQ.jO,59cO%rQ.jO,59hO%rQ.jO'#FiO9rQ#WO1G.tOOQ#k1G.t1G.tO9zQ.oO,59fO<pQ! lO,59pOOQ#d'#D['#D[OOQ#d'#Fh'#FhO<{Q)OO,59uOOQ#i,59u,59uO={Q.jO'#DQOOQ#i,59j,59jOOQ#U1G/c1G/cOOQ#U1G/e1G/eO0{Q(nO1G/eO1QQ(nO1G/eOOQ#U1G/l1G/lO>VQ9`O1G/oO>pQ(pO1G/rO?dQ(pO1G/tO@WQ(pO1G/uO@zQ(pO,5<WOOQ#S-E9j-E9jOOQ&Z1G.m1G.mOAXQ(nO,5:_OA^Q+uO,5:_OAeQ)OO'#DeOAlQ.jO'#DcOOQ#U1G/o1G/oO%rQ.jO1G/oOBkQ.jO'#DwOBuQ.kO1G/{OOQ#T1G/{1G/{OCrQ)OO'#EQO+PQ(nO1G0TO2pQ)OO1G0TODaQ+uO'#GfOOQ&Z1G0f1G0fO0SQ(nO1G0fOOQ&Z1G0i1G0iOOQ&Z1G0k1G0kO0SQ(nO1G0kOFyQ)OO1G0kOOQ&Z1G0p1G0pOOQ&Z1G0r1G0rOGRQ)OO1G0rOGWQ(nO1G0rOG]Q)OO1G0tOOQ&Z1G0t1G0tOGkQ.jO'#FsOG{Q#dO1G0tOHQQ!N^O'#CuOH]Q!NUO'#ETOHkQ!NUO,5:pOHsQ(nO,5:wOOQ#S'#Ge'#GeOHnQ!NUO,5:sO*aQ)OO,5:rOH{Q)OO'#FrOI`Q(nO,5<}OIqQ(nO,5:uO(cQ)OO,5:xOOQ&Z1G0w1G0wOOQ&Z1G0y1G0yOOQ&Z1G0{1G0{O+PQ(nO1G0{OJYQ)OO'#E{OOQ&Z1G1O1G1OOOQ&Z1G1U1G1UOOQ&Z1G1h1G1hOJeQ+uO1G1WO%rQ.jO1G1[OL}Q)OO'#FxOMYQ)OO,5=SO%rQ.jO1G1aOOQ&Z1G1d1G1dOOQ&Z1G1f1G1fOMbQ(oO1G2gOMsQ+uO,5<[OOQ#T,5<[,5<[OOQ#T-E9n-E9nPOO#S-E9b-E9bPOOO1G2]1G2]OOQ#i1G.y1G.yONWQ.oO1G.}OOQ#i1G/S1G/SO!!|Q.^O,5<TOOQ#W-E9g-E9gOOQ#k7+$`7+$`OOQ#i1G/[1G/[O!#_Q(nO1G/[OOQ#d-E9f-E9fOOQ#i1G/a1G/aO!#dQ.jO'#FfO!$qQ.jO'#G]O!&]Q.jO'#GZO!&dQ(nO,59lOOQ#U7+%P7+%POOQ#U7+%Z7+%ZO%rQ.jO7+%ZOOQ&Z1G/y1G/yO!&iQ#TO1G/yO!&nQ(pO'#G_O!&xQ(nO,5:PO!&}Q.jO'#G^O!'XQ(nO,59}O!'^Q.YO7+%ZO!'lQ.YO'#GZO!'}Q(nO,5:cOOQ#T,5:c,5:cO!(VQ.kO'#FoO%rQ.jO'#FoO!)yQ.kO7+%gOOQ#T7+%g7+%gO!*mQ#dO,5:lOOQ&Z7+%o7+%oO+PQ(nO7+%oO7nQ(nO7+&QO+PQ(nO7+&VOOQ#d'#Eh'#EhO!*rQ)OO7+&VO!+QQ(nO7+&^O*aQ)OO7+&^OOQ#d-E9q-E9qOOQ&Z7+&`7+&`O!+VQ.jO'#GgOOQ#d,5<_,5<_OF|Q(nO7+&`O%rQ.jO1G0[O!+qQ.jO1G0_OOQ#S1G0c1G0cOOQ#S1G0^1G0^O!+xQ(nO,5<^OOQ#S-E9p-E9pO!,^Q(pO1G0dOOQ&Z7+&g7+&gO,gQ(vO'#CuOOQ#S'#E}'#E}O!,eQ(nO'#E|OOQ#S'#E|'#E|O!,sQ(nO'#FuO!-OQ)OO,5;gOOQ&Z,5;g,5;gO!-ZQ+uO7+&rO!/sQ)OO7+&rO!0OQ.jO7+&vOOQ#d,5<d,5<dOOQ#d-E9v-E9vO3mQ.YO7+&{OOQ#T1G1v1G1vOOQ#i7+$v7+$vOOQ#d-E9d-E9dO!0aQ.jO'#FgO!0nQ(nO,5<wO!0nQ(nO,5<wO%rQ.jO,5<wOOQ#i1G/W1G/WO!0vQ.YO<<HuOOQ&Z7+%e7+%eO!1UQ)OO'#FkO!1`Q(nO,5<yOOQ#U1G/k1G/kO!1hQ.jO'#FjO!1rQ(nO,5<xOOQ#U1G/i1G/iOOQ#U<<Hu<<HuO1_Q.jO,5<YO!1zQ(nO'#FnOOQ#S-E9l-E9lOOQ#T1G/}1G/}O!2PQ.kO,5<ZOOQ#e-E9m-E9mOOQ#T<<IR<<IROOQ#S'#ES'#ESO!3sQ(nO1G0WOOQ&Z<<IZ<<IZOOQ&Z<<Il<<IlOOQ&Z<<Iq<<IqO0SQ(nO<<IqO*aQ)OO<<IxO!3{Q(nO<<IxO!4TQ.jO'#FtO!4hQ)OO,5=ROG]Q)OO<<IzO!4yQ.jO7+%vOOQ#S'#EV'#EVO!5QQ!NUO7+%yOOQ#S7+&O7+&OOOQ#S,5;h,5;hOJ]Q)OO'#FvO!,sQ(nO,5<aOOQ#d,5<a,5<aOOQ#d-E9s-E9sOOQ&Z1G1R1G1ROOQ&Z-E9u-E9uO!/sQ)OO<<J^O%rQ.jO,5<cOOQ&Z<<J^<<J^O%rQ.jO<<JbOOQ&Z<<Jg<<JgO!5YQ.jO,5<RO!5gQ.jO,5<ROOQ#S-E9e-E9eO!5nQ(nO1G2cO!5vQ.jO1G2cOOQ#UAN>aAN>aO!6QQ(pO,5<VOOQ#S-E9i-E9iO!6[Q.jO,5<UOOQ#S-E9h-E9hO!6fQ.YO1G1tO!6oQ(nO1G1tO!*mQ#dO'#FqO!6zQ(nO7+%rOOQ#d7+%r7+%rO+PQ(nOAN?]O!7SQ(nOAN?dO0gQ(nOAN?dO!7[Q.jO,5<`OOQ#d-E9r-E9rOG]Q)OOAN?fOOQ&ZAN?fAN?fOOQ#S<<Ib<<IbOOQ#S<<Ie<<IeO!7vQ.jO<<IeOOQ#S,5<b,5<bOOQ#S-E9t-E9tOOQ#d1G1{1G1{P!8_Q)OO'#FwOOQ&ZAN?xAN?xO3mQ.YO1G1}O3mQ.YOAN?|OOQ#S1G1m1G1mO%rQ.jO1G1mO!8dQ(nO7+'}OOQ#S7+'`7+'`OOQ#S,5<],5<]OOQ#S-E9o-E9oOOQ#d<<I^<<I^OOQ&ZG24wG24wO0gQ(nOG25OOOQ&ZG25OG25OOOQ&ZG25QG25QO!8lQ(nOAN?POOQ&Z7+'i7+'iOOQ&ZG25hG25hO!8qQ.jO7+'XOOQ&ZLD*jLD*jOOQ#SG24kG24k",stateData:"!9R~O$wOSVOSUOS$uQQ~OS`OTVOWcOXbO_UOc`OqWOuYO|[O!SYO!ZZO!rmO!saO#TbO#WcO#YdO#_eO#afO#cgO#fhO#hiO#jjO#mkO#slO#urO#ysO$OtO$RuO$TvO$rSO$|RO%S]O~O$m%TP~P`O$u{O~Oq^Xu^Xu!jXw^X|^X!S^X!Z^X!a^X!d^X!h^X$p^X$t^X~Oq${Xu${Xw${X|${X!S${X!Z${X!a${X!d${X!h${X$p${X$t${X~O$r}O!o${X$v${Xf${Xe${X~P$jOS!XOTVO_!XOc!XOf!QOh!XOj!XOo!TOy!VO|!WO$q!UO$r!PO%O!RO~O$r!ZO~Oq!]Ou!^O|!`O!S!^O!Z!_O!a!aO!d!cO!h!fO$p!bO$t!gO~Ow!dO~P&rO!U!mO$q!jO$r!iO~O$r!nO~O$r!pO~O$r!rO~Ou!tO~P$jOu!tO~OTVO_UOqWOuYO|[O!SYO!ZZO$r!yO$|RO%S]O~Of!}O!h!fO$t!gO~P(cOTVOc#UOf#QO#O#SO#R#TO$s#PO!h%VP$t%VP~Oj#YOy!VO$r#XO~Oj#[O$r#[O~OTVOc#UOf#QO#O#SO#R#TO$s#PO~O!o%VP$v%VP~P)bO!o#`O$t#`O$v#`O~Oc#dO~Oc#eO$P%[P~O$m%TX!p%TX$o%TX~P`O!o#kO$t#kO$m%TX!p%TX$o%TX~OU#nOV#nO$t#pO$w#nO~OR#rO$tiX!hiXeiXwiX~OPiXQiXliXmiXqiXTiXciXfiX!oiX!uiX#OiX#RiX$siX$viX#UiX#ZiX#]iX#diXSiX_iXhiXjiXoiXyiX|iX!liX!miX!niX$qiX$riX%OiX$miXviX{iX#{iX#|iX!piX$oiX~P,gOP#wOQ#uOl#sOm#sOq#tO~Of#yO~O{#}O$r#zO~Of$OO~O!U$TO$q!jO$r!iO~Ow!dO!h!fO$t!gO~O!p%TP~P`O$n$_O~Of$`O~Of$aO~O{$bO!_$cO~OS!XOTVO_!XOc!XOf$dOh!XOj!XOo!TOy!VO|!WO$q!UO$r!PO%O!RO~O!h!fO$t!gO~P1_Ol#sOm#sOq#tO!u$gO!o%VP$t%VP$v%VP~P*aOl#sOm#sOq#tO!o#`O$v#`O~O!h!fO#U$lO$t$jO~P2}Ol#sOm#sOq#tO!h!fO$t!gO~O#Z$pO#]$oO$t#`O~P2}Oq!]Ou!^O|!`O!S!^O!Z!_O!a!aO!d!cO$p!bO~O!o#`O$t#`O$v#`O~P4]Of$sO~P&rO#]$tO~O#Z$xO#d$wO$t#`O~P2}OS$}Oh$}Oj$}Oy!VO$q!UO%O$yO~OTVOc#UOf#QO#O#SO#R#TO$s$zO~P5oOm%POw%QO!h%VX$t%VX!o%VX$v%VX~Of%TO~Oj%XOy!VO~O!h%YO~Om%PO!h!fO$t!gO~O!h!fO!o#`O$t$jO$v#`O~O#z%_O~Ow%`O$P%[X~O$P%bO~O!o#kO$t#kO$m%Ta!p%Ta$o%Ta~O!o$dX$m$dX$t$dX!p$dX$o$dX~P`OU#nOV#nO$t%jO$w#nO~Oe%kOl#sOm#sOq#tO~OP%pOQ#uO~Ol#sOm#sOq#tOPnaQnaTnacnafna!ona!una#Ona#Rna$sna$tna$vna!hna#Una#Zna#]na#dnaenaSna_nahnajnaonawnayna|na!lna!mna!nna$qna$rna%Ona$mnavna{na#{na#|na!pna$ona~Oe%qOj%rOz%rO~O{%tO$r#zO~OS!XOTVO_!XOf!QOh!XOj!XOo!TOy!VO|!WO$q!UO$r!PO%O!RO~Oc%wOe%PP~P=TO{%zO!_%{O~Oq!]Ou!^O|!`O!S!^O!Z!_O~Ow!`i!a!`i!d!`i!h!`i$p!`i$t!`i!o!`i$v!`if!`ie!`i~P>_Ow!bi!a!bi!d!bi!h!bi$p!bi$t!bi!o!bi$v!bif!bie!bi~P>_Ow!ci!a!ci!d!ci!h!ci$p!ci$t!ci!o!ci$v!cif!cie!ci~P>_Ow$`a!h$`a$t$`a~P4]O!p%|O~O$o%TP~P`Oe%RP~P(cOe%QP~P%rOS!XOTVO_!XOc!XOf!QOh!XOo!TOy!VO|!WO$q!UO$r!PO%O!RO~Oe&VOj&TO~PAsOl#sOm#sOq#tOw&XO!l&ZO!m&ZO!n&ZO!o!ii$t!ii$v!ii$m!ii!p!ii$o!ii~P%rOf&[OT!tXc!tX!o!tX#O!tX#R!tX$s!tX$t!tX$v!tX~O$n$_OS%YXT%YXW%YXX%YX_%YXc%YXq%YXu%YX|%YX!S%YX!Z%YX!r%YX!s%YX#T%YX#W%YX#Y%YX#_%YX#a%YX#c%YX#f%YX#h%YX#j%YX#m%YX#s%YX#u%YX#y%YX$O%YX$R%YX$T%YX$m%YX$r%YX$|%YX%S%YX!p%YX!o%YX$t%YX$o%YX~O$r!PO$|&aO~O#]&cO~Ou&dO~O!o#`O#d$wO$t#`O$v#`O~O!o%ZP#d%ZP$t%ZP$v%ZP~P%rO$r!PO~OR#rO!|iXeiX~Oe!wXm!wXu!yX!|!yX~Ou&jO!|&kO~Oe&lOm%PO~Ow$fX!h$fX$t$fX!o$fX$v$fX~P*aOw%QO!h%Va$t%Va!o%Va$v%Va~Om%POw!}a!h!}a$t!}a!o!}a$v!}ae!}a~O!p&xO$r&sO%O&rO~O#v&zOS#tiT#tiW#tiX#ti_#tic#tiq#tiu#ti|#ti!S#ti!Z#ti!r#ti!s#ti#T#ti#W#ti#Y#ti#_#ti#a#ti#c#ti#f#ti#h#ti#j#ti#m#ti#s#ti#u#ti#y#ti$O#ti$R#ti$T#ti$m#ti$r#ti$|#ti%S#ti!p#ti!o#ti$t#ti$o#ti~Oc&|Ow$lX$P$lX~Ow%`O$P%[a~O!o#kO$t#kO$m%Ti!p%Ti$o%Ti~O!o$da$m$da$t$da!p$da$o$da~P`Oq#tOPkiQkilkimkiTkickifki!oki!uki#Oki#Rki$ski$tki$vki!hki#Uki#Zki#]ki#dkiekiSki_kihkijkiokiwkiyki|ki!lki!mki!nki$qki$rki%Oki$mkivki{ki#{ki#|ki!pki$oki~Ol#sOm#sOq#tOP$]aQ$]a~Oe'QO~Ol#sOm#sOq#tOS$YXT$YX_$YXc$YXe$YXf$YXh$YXj$YXo$YXv$YXw$YXy$YX|$YX$q$YX$r$YX%O$YX~Ov'UOw'SOe%PX~P%rOS$}XT$}X_$}Xc$}Xe$}Xf$}Xh$}Xj$}Xl$}Xm$}Xo$}Xq$}Xv$}Xw$}Xy$}X|$}X$q$}X$r$}X%O$}X~Ou'VO~P!%OOe'WO~O$o'YO~Ow'ZOe%RX~P4]Oe']O~Ow'^Oe%QX~P%rOe'`O~Ol#sOm#sOq#tO{'aO~Ou'bOe$}Xl$}Xm$}Xq$}X~Oe'eOj'cO~Ol#sOm#sOq#tOS$cXT$cX_$cXc$cXf$cXh$cXj$cXo$cXw$cXy$cX|$cX!l$cX!m$cX!n$cX!o$cX$q$cX$r$cX$t$cX$v$cX%O$cX$m$cX!p$cX$o$cX~Ow&XO!l'hO!m'hO!n'hO!o!iq$t!iq$v!iq$m!iq!p!iq$o!iq~P%rO$r'iO~O!o#`O#]'nO$t#`O$v#`O~Ou'oO~Ol#sOm#sOq#tOw'qO!o%ZX#d%ZX$t%ZX$v%ZX~O$s'uO~P5oOm%POw$fa!h$fa$t$fa!o$fa$v$fa~Oe'wO~P4]O%O&rOw#pX!h#pX$t#pX~Ow'yO!h!fO$t!gO~O!p'}O$r&sO%O&rO~O#v(POS#tqT#tqW#tqX#tq_#tqc#tqq#tqu#tq|#tq!S#tq!Z#tq!r#tq!s#tq#T#tq#W#tq#Y#tq#_#tq#a#tq#c#tq#f#tq#h#tq#j#tq#m#tq#s#tq#u#tq#y#tq$O#tq$R#tq$T#tq$m#tq$r#tq$|#tq%S#tq!p#tq!o#tq$t#tq$o#tq~O!h!fO#w(QO$t!gO~Ol#sOm#sOq#tO#{(SO#|(SO~Oc(VOe$ZXw$ZX~P=TOw'SOe%Pa~Ol#sOm#sOq#tO{(ZO~Oe$_Xw$_X~P(cOw'ZOe%Ra~Oe$^Xw$^X~P%rOw'^Oe%Qa~Ou'bO~Ol#sOm#sOq#tOS$caT$ca_$cac$caf$cah$caj$cao$caw$cay$ca|$ca!l$ca!m$ca!n$ca!o$ca$q$ca$r$ca$t$ca$v$ca%O$ca$m$ca!p$ca$o$ca~Oe(dOq(bO~Oe(gOm%PO~Ow$hX!o$hX#d$hX$t$hX$v$hX~P%rOw'qO!o%Za#d%Za$t%Za$v%Za~Oe(lO~P%rOe(mO!|(nO~Ov(vOe$Zaw$Za~P%rOu(wO~P!%OOw'SOe%Pi~Ow'SOe%Pi~P%rOe$_aw$_a~P4]Oe$^aw$^a~P%rOl#sOm#sOq#tOw(yOe$bij$bi~Oe(|Oq(bO~Oe)OOm%PO~Ol#sOm#sOq#tOw$ha!o$ha#d$ha$t$ha$v$ha~OS$}Oh$}Oj$}Oy!VO$q!UO$s'uO%O&rO~O#w(QO~Ow'SOe%Pq~Oe)WO~Oe$Zqw$Zq~P%rO%Oql!dl~",goto:"=Y%]PPPPPPPPPPP%^%h%h%{P%h&`&cP(UPP)ZP*YP)ZPP)ZP)ZP+f,j-lPPP-xPPPP)Z/S%h/W%hP/^P/d/j/p%hP/v%h/|P%hP%h%hP%h0S0VP1k1}2XPPPPP%^PP2_P2b'w'w2h'w'wP'wP'w'wP%^PP%^P%^PP2qP%^P%^P%^PP%^P%^P%^P2w%^P2z2}3Q3X%^P%^PPP%^PPPP%^PP%^P%^P%^P3^3d3j4Y4h4n4t4z5Q5W5d5j5p5z6Q6W6b6h6n6t6zPPPPPPPPPPPP7Q7T7aP8WP:_:b:eP:h:q:w;T;p;y=S=VanOPqx!f#l$_%fs^OPefqx!a!b!c!d!f#l$_$`%T%f'ZsTOPefqx!a!b!c!d!f#l$_$`%T%f'ZR!OUb^ef!a!b!c!d$`%T'Z`_OPqx!f#l$_%f!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)Ug#Uhlm!u#Q#S$i%P%Q&d'o!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)UQ&b$pR&i$x!y!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)U!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)UU$}#Q&k(nU&u%Y&w'yR'x&t!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)UV$}#Q&k(n#P!YVabcdgiruv!Q!T!t#Q#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j&k'S'V'^'b'q't(Q(S(U(Y(^(n(w)UQ$P!YQ&_$lQ&`$oR(e'n!x!XVabcdgiruv!Q!T!t#s#t#u$O$a$c$d$e$w%_%b%v%{&Q&X&Y&j'S'V'^'b'q't(Q(S(U(Y(^(w)UQ#YjU$}#Q&k(nR%X#ZT#{!W#|Q![WR$Q!]Q!kYR$R!^Q$R!mR%y$TQ!lYR$S!^Q$R!lR%y$SQ!oZR$U!_Q!q[R$V!`R!s]Q!hXQ!|fQ$]!eQ$f!tQ$k!vQ$m!wQ$r!{Q%U#VQ%[#^Q%]#_Q%^#cQ%c#gQ'l&_Q'{&vQ(R&zQ(T'OQ(q'zQ(s(PQ)P(gQ)S(tQ)T(uR)V)OSpOqUyP!f$_Q#jxQ%g#lR'P%fa`OPqx!f#l$_%fQ$f!tR(a'bR$i!uQ'j&[R(z(bQ${#QQ'v&kR)R(nQ&b$pR's&iR#ZjR#]kR%Z#]S&v%Y&wR(o'yV&t%Y&w'yQ#o{R%i#oQqOR#bqQ%v$OQ&Q$a^'R%v&Q't(U(Y(^)UQ't&jQ(U'SQ(Y'VQ(^'^R)U(wQ'T%vU(W'T(X(xQ(X'UR(x(YQ#|!WR%s#|Q#v!SR%o#vQ'_&QR(_'_Q'[&OR(]'[Q!eXR$[!eUxP!f$_S#ix%fR%f#lQ&U$dR'd&UQ&Y$eR'g&YQ#myQ%e#jT%h#m%eQ(c'jR({(cQ%R#RR&o%RQ$u#OS&e$u(jR(j'sQ'r&gR(i'rQ&w%YR'|&wQ'z&vR(p'zQ&y%^R(O&yQ%a#eR&}%aR|QSoOq]wPx!f#l$_%f`XOPqx!f#l$_%fQ!zeQ!{fQ$W!aQ$X!bQ$Y!cQ$Z!dQ&O$`Q&p%TR(['ZQ!SVQ!uaQ!vbQ!wcQ!xdQ#OgQ#WiQ#crQ#guQ#hvS#q!Q$dQ#x!TQ$e!tQ%l#sQ%m#tQ%n#ul%u$O$a%v&Q&j'S'V'^'t(U(Y(^(w)UQ&S$cS&W$e&YQ&g$wQ&{%_Q'O%bQ'X%{Q'f&XQ(`'bQ(h'qQ(t(QR(u(SR%x$OR&R$aR&P$`QzPQ$^!fR%}$_X#ly#j#m%eQ#VhQ#_mQ$h!uR&^$iW#Rhm!u$iQ#^lQ$|#QQ%S#SQ&m%PQ&n%QQ'p&dR(f'oQ%O#QQ'v&kR)R(nQ#apQ$k!vQ$n!xQ$q!zQ$v#OQ%V#WQ%W#YQ%]#_Q%d#hQ&]$hQ&f$uQ&q%XQ'k&^Q'l&_S'm&`&bQ(k'sQ(}(eR)Q(jR&h$wR#ft",nodeNames:"\u26A0 InterpolationEnd InterpolationContinue Unit VariableName InterpolationStart LineComment Comment IndentedMixin IndentedInclude StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector SuffixedSelector Suffix Interpolation SassVariableName ValueName ) ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp LogicOp UnaryExpression LogicOp NamespacedValue . CallExpression Callee ArgList : ... , CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName ClassSelector ClassName PseudoClassSelector :: PseudoClassName PseudoClassName ArgList PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp PlaceholderSelector ClassName Block { Declaration PropertyName Map Important Global Default ; } ImportStatement AtKeyword import Layer layer LayerName KeywordQuery FeatureQuery FeatureName BinaryQuery ComparisonQuery CompareOp UnaryQuery LogicOp ParenthesizedQuery SelectorQuery selector IncludeStatement include Keyword MixinStatement mixin UseStatement use Keyword Star Keyword ExtendStatement extend RootStatement at-root ForwardStatement forward Keyword MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports IfStatement ControlKeyword ControlKeyword Keyword ForStatement ControlKeyword Keyword Keyword Keyword EachStatement ControlKeyword Keyword WhileStatement ControlKeyword OutputStatement ControlKeyword AtRule Styles",maxTerm:196,context:XO,nodeProps:[["openedBy",1,"InterpolationStart",5,"InterpolationEnd",21,"(",43,"[",78,"{"],["isolate",-3,6,7,26,""],["closedBy",22,")",44,"]",70,"}"]],propSources:[PO],skippedNodes:[0,6,7,146],repeatNodeCount:21,tokenData:"!$Q~RyOq#rqr$jrs0jst2^tu8{uv;hvw;{wx<^xy={yz>^z{>c{|>||}Co}!ODQ!O!PDo!P!QFY!Q![Fk![!]Gf!]!^Hb!^!_Hs!_!`Is!`!aJ^!a!b#r!b!cKa!c!}#r!}#OMn#O#P#r#P#QNP#Q#RNb#R#T#r#T#UNw#U#c#r#c#d!!Y#d#o#r#o#p!!o#p#qNb#q#r!#Q#r#s!#c#s;'S#r;'S;=`!#z<%lO#rW#uSOy$Rz;'S$R;'S;=`$d<%lO$RW$WSzWOy$Rz;'S$R;'S;=`$d<%lO$RW$gP;=`<%l$RY$m[Oy$Rz!_$R!_!`%c!`#W$R#W#X%v#X#Z$R#Z#[)Z#[#]$R#]#^,V#^;'S$R;'S;=`$d<%lO$RY%jSzWlQOy$Rz;'S$R;'S;=`$d<%lO$RY%{UzWOy$Rz#X$R#X#Y&_#Y;'S$R;'S;=`$d<%lO$RY&dUzWOy$Rz#Y$R#Y#Z&v#Z;'S$R;'S;=`$d<%lO$RY&{UzWOy$Rz#T$R#T#U'_#U;'S$R;'S;=`$d<%lO$RY'dUzWOy$Rz#i$R#i#j'v#j;'S$R;'S;=`$d<%lO$RY'{UzWOy$Rz#`$R#`#a(_#a;'S$R;'S;=`$d<%lO$RY(dUzWOy$Rz#h$R#h#i(v#i;'S$R;'S;=`$d<%lO$RY(}S!nQzWOy$Rz;'S$R;'S;=`$d<%lO$RY)`UzWOy$Rz#`$R#`#a)r#a;'S$R;'S;=`$d<%lO$RY)wUzWOy$Rz#c$R#c#d*Z#d;'S$R;'S;=`$d<%lO$RY*`UzWOy$Rz#U$R#U#V*r#V;'S$R;'S;=`$d<%lO$RY*wUzWOy$Rz#T$R#T#U+Z#U;'S$R;'S;=`$d<%lO$RY+`UzWOy$Rz#`$R#`#a+r#a;'S$R;'S;=`$d<%lO$RY+yS!mQzWOy$Rz;'S$R;'S;=`$d<%lO$RY,[UzWOy$Rz#a$R#a#b,n#b;'S$R;'S;=`$d<%lO$RY,sUzWOy$Rz#d$R#d#e-V#e;'S$R;'S;=`$d<%lO$RY-[UzWOy$Rz#c$R#c#d-n#d;'S$R;'S;=`$d<%lO$RY-sUzWOy$Rz#f$R#f#g.V#g;'S$R;'S;=`$d<%lO$RY.[UzWOy$Rz#h$R#h#i.n#i;'S$R;'S;=`$d<%lO$RY.sUzWOy$Rz#T$R#T#U/V#U;'S$R;'S;=`$d<%lO$RY/[UzWOy$Rz#b$R#b#c/n#c;'S$R;'S;=`$d<%lO$RY/sUzWOy$Rz#h$R#h#i0V#i;'S$R;'S;=`$d<%lO$RY0^S!lQzWOy$Rz;'S$R;'S;=`$d<%lO$R~0mWOY0jZr0jrs1Vs#O0j#O#P1[#P;'S0j;'S;=`2W<%lO0j~1[Oj~~1_RO;'S0j;'S;=`1h;=`O0j~1kXOY0jZr0jrs1Vs#O0j#O#P1[#P;'S0j;'S;=`2W;=`<%l0j<%lO0j~2ZP;=`<%l0jZ2cY!ZPOy$Rz!Q$R!Q![3R![!c$R!c!i3R!i#T$R#T#Z3R#Z;'S$R;'S;=`$d<%lO$RY3WYzWOy$Rz!Q$R!Q![3v![!c$R!c!i3v!i#T$R#T#Z3v#Z;'S$R;'S;=`$d<%lO$RY3{YzWOy$Rz!Q$R!Q![4k![!c$R!c!i4k!i#T$R#T#Z4k#Z;'S$R;'S;=`$d<%lO$RY4rYhQzWOy$Rz!Q$R!Q![5b![!c$R!c!i5b!i#T$R#T#Z5b#Z;'S$R;'S;=`$d<%lO$RY5iYhQzWOy$Rz!Q$R!Q![6X![!c$R!c!i6X!i#T$R#T#Z6X#Z;'S$R;'S;=`$d<%lO$RY6^YzWOy$Rz!Q$R!Q![6|![!c$R!c!i6|!i#T$R#T#Z6|#Z;'S$R;'S;=`$d<%lO$RY7TYhQzWOy$Rz!Q$R!Q![7s![!c$R!c!i7s!i#T$R#T#Z7s#Z;'S$R;'S;=`$d<%lO$RY7xYzWOy$Rz!Q$R!Q![8h![!c$R!c!i8h!i#T$R#T#Z8h#Z;'S$R;'S;=`$d<%lO$RY8oShQzWOy$Rz;'S$R;'S;=`$d<%lO$R_9O`Oy$Rz}$R}!O:Q!O!Q$R!Q![:Q![!_$R!_!`;T!`!c$R!c!}:Q!}#R$R#R#S:Q#S#T$R#T#o:Q#o;'S$R;'S;=`$d<%lO$RZ:X^zWcROy$Rz}$R}!O:Q!O!Q$R!Q![:Q![!c$R!c!}:Q!}#R$R#R#S:Q#S#T$R#T#o:Q#o;'S$R;'S;=`$d<%lO$R[;[S!_SzWOy$Rz;'S$R;'S;=`$d<%lO$RZ;oS%SPlQOy$Rz;'S$R;'S;=`$d<%lO$RZ<QS_ROy$Rz;'S$R;'S;=`$d<%lO$R~<aWOY<^Zw<^wx1Vx#O<^#O#P<y#P;'S<^;'S;=`=u<%lO<^~<|RO;'S<^;'S;=`=V;=`O<^~=YXOY<^Zw<^wx1Vx#O<^#O#P<y#P;'S<^;'S;=`=u;=`<%l<^<%lO<^~=xP;=`<%l<^Z>QSfROy$Rz;'S$R;'S;=`$d<%lO$R~>cOe~_>jU$|PlQOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RZ?TWlQ!dPOy$Rz!O$R!O!P?m!P!Q$R!Q![Br![;'S$R;'S;=`$d<%lO$RZ?rUzWOy$Rz!Q$R!Q![@U![;'S$R;'S;=`$d<%lO$RZ@]YzW%OROy$Rz!Q$R!Q![@U![!g$R!g!h@{!h#X$R#X#Y@{#Y;'S$R;'S;=`$d<%lO$RZAQYzWOy$Rz{$R{|Ap|}$R}!OAp!O!Q$R!Q![BX![;'S$R;'S;=`$d<%lO$RZAuUzWOy$Rz!Q$R!Q![BX![;'S$R;'S;=`$d<%lO$RZB`UzW%OROy$Rz!Q$R!Q![BX![;'S$R;'S;=`$d<%lO$RZBy[zW%OROy$Rz!O$R!O!P@U!P!Q$R!Q![Br![!g$R!g!h@{!h#X$R#X#Y@{#Y;'S$R;'S;=`$d<%lO$RZCtSwROy$Rz;'S$R;'S;=`$d<%lO$RZDVWlQOy$Rz!O$R!O!P?m!P!Q$R!Q![Br![;'S$R;'S;=`$d<%lO$RZDtWqROy$Rz!O$R!O!PE^!P!Q$R!Q![@U![;'S$R;'S;=`$d<%lO$RYEcUzWOy$Rz!O$R!O!PEu!P;'S$R;'S;=`$d<%lO$RYE|SvQzWOy$Rz;'S$R;'S;=`$d<%lO$RYF_SlQOy$Rz;'S$R;'S;=`$d<%lO$RZFp[%OROy$Rz!O$R!O!P@U!P!Q$R!Q![Br![!g$R!g!h@{!h#X$R#X#Y@{#Y;'S$R;'S;=`$d<%lO$RkGkUucOy$Rz![$R![!]G}!];'S$R;'S;=`$d<%lO$RXHUS!SPzWOy$Rz;'S$R;'S;=`$d<%lO$RZHgS!oROy$Rz;'S$R;'S;=`$d<%lO$RjHzU!|`lQOy$Rz!_$R!_!`I^!`;'S$R;'S;=`$d<%lO$RjIgS!|`zWlQOy$Rz;'S$R;'S;=`$d<%lO$RnIzU!|`!_SOy$Rz!_$R!_!`%c!`;'S$R;'S;=`$d<%lO$RkJgV!aP!|`lQOy$Rz!_$R!_!`I^!`!aJ|!a;'S$R;'S;=`$d<%lO$RXKTS!aPzWOy$Rz;'S$R;'S;=`$d<%lO$RXKdYOy$Rz}$R}!OLS!O!c$R!c!}Lq!}#T$R#T#oLq#o;'S$R;'S;=`$d<%lO$RXLXWzWOy$Rz!c$R!c!}Lq!}#T$R#T#oLq#o;'S$R;'S;=`$d<%lO$RXLx[!rPzWOy$Rz}$R}!OLq!O!Q$R!Q![Lq![!c$R!c!}Lq!}#T$R#T#oLq#o;'S$R;'S;=`$d<%lO$RZMsS|ROy$Rz;'S$R;'S;=`$d<%lO$R_NUS{VOy$Rz;'S$R;'S;=`$d<%lO$R[NeUOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RkNzUOy$Rz#b$R#b#c! ^#c;'S$R;'S;=`$d<%lO$Rk! cUzWOy$Rz#W$R#W#X! u#X;'S$R;'S;=`$d<%lO$Rk! |SmczWOy$Rz;'S$R;'S;=`$d<%lO$Rk!!]UOy$Rz#f$R#f#g! u#g;'S$R;'S;=`$d<%lO$RZ!!tS!hROy$Rz;'S$R;'S;=`$d<%lO$RZ!#VS!pROy$Rz;'S$R;'S;=`$d<%lO$R]!#hU!dPOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RW!#}P;=`<%l#r",tokenizers:[oO,dO,lO,cO,SO,RO,iO,rO,0,1,2,3,4],topRules:{StyleSheet:[0,10],Styles:[1,145]},dialects:{indented:0},specialized:[{term:172,get:O=>sO[O]||-1},{term:171,get:O=>mO[O]||-1},{term:80,get:O=>pO[O]||-1},{term:173,get:O=>uO[O]||-1}],tokenPrec:3217}),X=V.define({name:"sass",parser:yO.configure({props:[f.add({Block:_,Comment(O,$){return{from:O.from+2,to:$.sliceDoc(O.to-2,O.to)=="*/"?O.to-2:O.to}}}),Y.add({Declaration:W()})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"$-"}}),fO=X.configure({dialect:"indented",props:[Y.add({"Block RuleSet":O=>O.baseIndent+O.unit}),f.add({Block:O=>({from:O.from,to:O.to})})]}),v=C(O=>O.name=="VariableName"||O.name=="SassVariableName");function YO(O){return new N(O!=null&&O.indented?fO:X,X.data.of({autocomplete:v}))}export{v as n,X as r,YO as t};
import{J as r,n as l,nt as o,q as P,r as g,s as R,u as $}from"./dist-DBwNzi3C.js";import{n as m}from"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import{a as Q}from"./dist-B0VqT_4z.js";var c=1,b=33,v=34,W=35,f=36,d=new l(O=>{let e=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>e&&O.acceptToken(c)});function n(O,e,a){return new l(t=>{let q=t.pos;for(;t.next!=O&&t.next>=0&&(a||t.next!=38&&(t.next!=123||t.peek(1)!=123));)t.advance();t.pos>q&&t.acceptToken(e)})}var C=n(39,b,!1),T=n(34,v,!1),x=n(39,W,!0),V=n(34,f,!0),U=g.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<<GrOOQO<<Gr<<GrOOQO1G/[1G/[OOOS-E6x-E6xOOQO1G.}1G.}OOOQ-E6y-E6yOOQOAN=^AN=^",stateData:"&d~OvOS~OPROSQOVROWRO~OZTO[XO^VOaUOhWO~OR]OU^O~O[`O^aO~O[bO~O[cO~O[dO~ObeO~ObfO~ObgO~ORhO~O]kOwiO~O[lO~O_mO~OynOzoO~OysOztO~O[uO~O]wOwiO~O_yOwiO~OtzO~Os|O~OSQOV!OOW!OOr!OOy!QO~OSQOV!ROW!ROq!ROz!QO~O_!TOwiO~O]!UO~Oy!VO~Oz!VO~OSQOV!OOW!OOr!OOy!XO~OSQOV!ROW!ROq!ROz!XO~O]!ZO~O",goto:"#dyPPPPPzPPPP!WPPPPP!WPP!Z!^!a!d!dP!g!j!m!p!v#Q#WPPPPPPPP#^SROSS!Os!PT!Rt!SRYPRqeR{nR}oRZPRqfR[PRqgQSOR_SQj`SvjxRxlQ!PsR!W!PQ!StR!Y!SQpeRrf",nodeNames:"\u26A0 Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue",maxTerm:42,nodeProps:[["openedBy",3,"{{",15,"("],["closedBy",4,"}}",14,")"],["isolate",-4,5,19,25,27,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mqr#rrs%jst&Qtv#rvw&hwx)zxy*byz*xz{+`{}#r}!O+v!O!P-]!P!Q#r!Q![+v![!]+v!]!_#r!_!`-s!`!c#r!c!}+v!}#O.Z#O#P#r#P#Q.q#Q#R#r#R#S+v#S#T#r#T#o+v#o#p/X#p#q#r#q#r0Z#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vQ#wTUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rQ$ZSO#q#r#r;'S#r;'S;=`$g<%lO#rQ$jP;=`<%l#rR$t[UQvPOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mq#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR%qTyPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&XTaPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&oXUQWPOp'[pq#rq!]'[!]!^#r!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R'aXUQOp'[pq#rq!]'[!]!^'|!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R(TTVPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR(gXOp'[pq#rq!]'[!]!^'|!^#q'[#q#r)S#r;'S'[;'S;=`)t<%lO'[P)VUOp)Sq!])S!]!^)i!^;'S)S;'S;=`)n<%lO)SP)nOVPP)qP;=`<%l)SR)wP;=`<%l'[R*RTzPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR*iT^PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+PT_PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+gThPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+}b[PUQO}#r}!O+v!O!Q#r!Q![+v![!]+v!]!c#r!c!}+v!}#R#r#R#S+v#S#T#r#T#o+v#o#q#r#q#r$W#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vR-YP;=`<%l+vR-dTwPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR-zTUQbPO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.bTZPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.xT]PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/^VUQO#o#r#o#p/s#p#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/zTSPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#r~0^TO#q#r#q#r0m#r;'S#r;'S;=`$g<%lO#r~0rOR~",tokenizers:[d,C,T,x,V,0,1],topRules:{Content:[0,2],Attribute:[1,9]},tokenPrec:0}),w=Q.parser.configure({top:"SingleExpression"}),S=U.configure({props:[P({Text:r.content,Is:r.definitionOperator,AttributeName:r.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":r.attributeValue,Entity:r.character,InvalidEntity:r.invalid,"BoundAttributeName/Identifier":r.attributeName,"EventName/Identifier":r.special(r.attributeName),"ReferenceName/Identifier":r.variableName,"DirectiveName/Identifier":r.keyword,"{{ }}":r.brace,"( )":r.paren,"[ ]":r.bracket,"# '*'":r.punctuation})]}),i={parser:w},y={parser:Q.parser},A=S.configure({wrap:o((O,e)=>O.name=="InterpolationContent"?i:null)}),N=S.configure({wrap:o((O,e)=>{var a;return O.name=="InterpolationContent"?i:O.name=="AttributeInterpolation"?((a=O.node.parent)==null?void 0:a.name)=="StatementAttributeValue"?y:i:null}),top:"Attribute"}),E={parser:A},k={parser:N},p=m({selfClosingTags:!0});function s(O){return O.configure({wrap:o(z)},"angular")}var u=s(p.language);function z(O,e){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(e.read(O.from,O.to))?k:null;case"Text":return E}return null}function I(O={}){let e=p;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof R))throw RangeError("The base option must be the result of calling html(...)");e=O.base}return new $(e.language==p.language?u:s(e.language),[e.support,e.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{I as angular,u as angularLanguage};
import"./dist-DBwNzi3C.js";import{n as r,t}from"./dist-BmvOPdv_.js";export{t as rust,r as rustLanguage};
import"./dist-DBwNzi3C.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import{i as a,n as r,r as o,t as i}from"./dist-kdxmhWbv.js";export{i as closePercentBrace,r as jinja,o as jinjaCompletionSource,a as jinjaLanguage};
import"./dist-DBwNzi3C.js";import{a,c as s,i as r,n,o as e,r as o,s as m,t as i}from"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";export{i as commonmarkLanguage,n as deleteMarkupBackward,o as insertNewlineContinueMarkup,r as insertNewlineContinueMarkupCommand,a as markdown,e as markdownKeymap,m as markdownLanguage,s as pasteURLAsLink};
import{$ as x,D as w,H as s,J as O,N as k,T as h,Y as d,g as $,i as y,n as u,q as f,r as j,s as g,t as U,u as G,x as b,y as Z}from"./dist-DBwNzi3C.js";import{m as P,s as q,u as _}from"./dist-ChS0Dc_R.js";var E=177,v=179,D=184,C=12,z=13,F=17,B=20,N=25,I=53,L=95,A=142,J=144,M=145,H=148,K=10,OO=13,QO=32,eO=9,l=47,aO=41,XO=125,iO=new u((Q,e)=>{for(let t=0,a=Q.next;(e.context&&(a<0||a==K||a==OO||a==l&&Q.peek(t+1)==l)||a==aO||a==XO)&&Q.acceptToken(E),!(a!=QO&&a!=eO);)a=Q.peek(++t)},{contextual:!0}),PO=new Set([L,D,B,C,F,J,M,A,H,z,I,N]),tO=new U({start:!1,shift:(Q,e)=>e==v?Q:PO.has(e)}),nO=f({"func interface struct chan map const type var":O.definitionKeyword,"import package":O.moduleKeyword,"switch for go select return break continue goto fallthrough case if else defer":O.controlKeyword,range:O.keyword,Bool:O.bool,String:O.string,Rune:O.character,Number:O.number,Nil:O.null,VariableName:O.variableName,DefName:O.definition(O.variableName),TypeName:O.typeName,LabelName:O.labelName,FieldName:O.propertyName,"FunctionDecl/DefName":O.function(O.definition(O.variableName)),"TypeSpec/DefName":O.definition(O.typeName),"CallExpr/VariableName":O.function(O.variableName),LineComment:O.lineComment,BlockComment:O.blockComment,LogicOp:O.logicOperator,ArithOp:O.arithmeticOperator,BitOp:O.bitwiseOperator,"DerefOp .":O.derefOperator,"UpdateOp IncDecOp":O.updateOperator,CompareOp:O.compareOperator,"= :=":O.definitionOperator,"<-":O.operator,'~ "*"':O.modifier,"; ,":O.separator,"... :":O.punctuation,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),oO={__proto__:null,package:10,import:18,true:380,false:380,nil:383,struct:48,func:68,interface:78,chan:94,map:118,make:157,new:159,const:204,type:212,var:224,if:236,else:238,switch:242,case:248,default:250,for:260,range:266,go:270,select:274,return:284,break:288,continue:290,goto:292,fallthrough:296,defer:300},cO=j.deserialize({version:14,states:"!=xO#{QQOOP$SOQOOO&UQTO'#CbO&]QRO'#FlO]QQOOOOQP'#Cn'#CnOOQP'#Co'#CoO&eQQO'#C|O(kQQO'#C{O)]QRO'#GiO+tQQO'#D_OOQP'#Ge'#GeO+{QQO'#GeO.aQTO'#GaO.hQQO'#D`OOQP'#Gm'#GmO.mQRO'#GdO/hQQO'#DgOOQP'#Gd'#GdO/uQQO'#DrO2bQQO'#DsO4QQTO'#GqO,^QTO'#GaO4XQQO'#DxO4^QQO'#D{OOQO'#EQ'#EQOOQO'#ER'#EROOQO'#ES'#ESOOQO'#ET'#ETO4cQQO'#EPO5}QQO'#EPOOQP'#Ga'#GaO6UQQO'#E`O6^QQO'#EcOOQP'#G`'#G`O6cQQO'#EsOOQP'#G_'#G_O&]QRO'#FnOOQO'#Fn'#FnO9QQQO'#G^QOQQOOO&]QROOO9XQQO'#C`O9^QSO'#CdO9lQQO'#C}O9tQQO'#DSO9yQQO'#D[O:kQQO'#CsO:pQQO'#DhO:uQQO'#EeO:}QQO'#EiO;VQQO'#EoO;_QQO'#EuO<uQQO'#ExO<|QQO'#FRO4cQQO'#FWO=WQQO'#FYO=]QRO'#F_O=jQRO'#FaO=uQQO'#FaOOQP'#Fe'#FeO4cQQO'#FgP=zOWO'#C^POOO)CAz)CAzOOQO'#G]'#G]OOQO,5<W,5<WOOQO-E9j-E9jO?TQTO'#CqOOQO'#C|'#C|OOQP,59g,59gO?tQQO'#D_O@fQSO'#FuO@kQQO'#C}O@pQQO'#D[O9XQQO'#FqO@uQRO,5=TOAyQQO,59yOCVQSO,5:[O@kQQO'#C}OCaQQO'#DjOOQP,59^,59^OOQO,5<a,5<aO?tQQO'#DeOOQO,5:e,5:eOOQO-E9s-E9sOOQP,59z,59zOOQP,59|,59|OCqQSO,5:QO(kQQO,5:ROC{QQO,5:RO&]QRO'#FxOOQO'#Fx'#FxOFjQQO'#GpOFwQQO,5:^OF|QQO,5:_OHdQQO,5:`OHlQQO,5:aOHvQRO'#FyOIaQRO,5=]OIuQQO'#DzOOQP,5:d,5:dOOQO'#EV'#EVOOQO'#EW'#EWOOQO'#EX'#EXOOQO'#EZ'#EZOOQO'#E['#E[O4cQQO,5:pO4cQQO,5:pO4cQQO,5:pO4cQQO,5:pO4cQQO,5:pO4cQQO,5:wOOQP,5:x,5:xO?tQQO'#EOOOQP,5:g,5:gOOQP,5:k,5:kO9yQQO,59vO4cQQO,5:zO4cQQO,5:}OI|QRO,5;_OOQO,5<Y,5<YOOQO-E9l-E9lO]QQOOOOQP'#Cb'#CbOOQP,58z,58zOOQP'#Cf'#CfOJWQQO'#CfOJ]QSO'#CkOOQP,59O,59OOJkQQO'#DPOLZQQO,5<UOLbQQO,59iOLsQQO,5<TOMpQQO'#DUOOQP,59n,59nOOQP,59v,59vONfQQO,59vONmQQO'#CwOOQP,59_,59_O?tQQO,5:SONxQRO'#EgO! VQQO'#EhOOQP,5;P,5;PO! |QQO'#EkO!!WQQO'#EnOOQP,5;T,5;TO!!`QRO'#EqO!!mQQO'#ErOOQP,5;Z,5;ZO!!uQTO'#CbO!!|QTO,5;aO&]QRO,5;aO!#WQQO,5;jO!$yQTO,5;dO!%WQQO'#EzOOQP,5;d,5;dO&]QRO,5;dO!%cQSO,5;mO!%mQQO'#E`O!%uQQO'#EcO!%zQQO'#FTO!&UQQO'#FTOOQP,5;m,5;mO!&ZQQO,5;mO!&`QTO,5;rO!&mQQO'#F[OOQP,5;t,5;tO!&xQTO'#GqOOQP,5;y,5;yOOQP'#Et'#EtOOQP,5;{,5;{O!']QTO,5<RPOOO'#Fk'#FkP!'jOWO,58xPOOO,58x,58xO!'uQQO,59yO!'zQQO'#GgOOQP,59i,59iO(kQQO,59vOOQP,5<],5<]OOQP-E9o-E9oOOQP1G/e1G/eOOQP1G/v1G/vO!([QSO'#DlO!(lQQO'#DlO!(wQQO'#DkOOQO'#Go'#GoO!(|QQO'#GoO!)UQQO,5:UO!)ZQQO'#GnO!)fQQO,5:PPOQO'#Cq'#CqO(kQQO1G/lOOQP1G/m1G/mO(kQQO1G/mOOQO,5<d,5<dOOQO-E9v-E9vOOQP1G/x1G/xO!)kQSO1G/yOOQP'#Cy'#CyOOQP1G/z1G/zO?tQQO1G/}O!)xQSO1G/{O!*YQQO1G/|O!*gQTO,5<eOOQP-E9w-E9wOOQP,5:f,5:fO!+QQQO,5:fOOQP1G0[1G0[O!,vQTO1G0[O!.wQTO1G0[O!/OQTO1G0[O!0pQTO1G0[O!1QQTO1G0cO!1bQQO,5:jOOQP1G/b1G/bOOQP1G0f1G0fOOQP1G0i1G0iOOQP1G0y1G0yOOQP,59Q,59QO&]QRO'#FmO!1mQSO,59VOOQP,59V,59VOOQO'#DQ'#DQO?tQQO'#DQO!1{QQO'#DQOOQO'#Gh'#GhO!2SQQO'#GhO!2[QQO,59kO!2aQSO'#CqOJkQQO'#DPOOQP,5=R,5=RO@kQQO1G1pOOQP1G/w1G/wO.hQQO'#ElO!2rQRO1G1oO@kQQO1G1oO@kQQO'#DVO?tQQO'#DWOOQP'#Gk'#GkO!2}QRO'#GjOOQP'#Gj'#GjO&]QRO'#FsO!3`QQO,59pOOQP,59p,59pO!3gQRO'#CxO!3uQQO'#CxO!3|QRO'#CxO.hQQO'#CxO&]QRO'#FoO!4XQQO,59cOOQP,59c,59cO!4dQQO1G/nO4cQQO,5;RO!4iQQO,5;RO&]QRO'#FzO!4nQQO,5;SOOQP,5;S,5;SO!6aQQO'#DgO?tQQO,5;VOOQP,5;V,5;VO&]QRO'#F}O!6hQQO,5;YOOQP,5;Y,5;YO!6pQRO,5;]O4cQQO,5;]O&]QRO'#GOO!6{QQO,5;^OOQP,5;^,5;^O!7TQRO1G0{O!7`QQO1G0{O4cQQO1G1UO!8vQQO1G1UOOQP1G1O1G1OO!9OQQO'#GPO!9YQQO,5;fOOQP,5;f,5;fO4cQQO'#E{O!9eQQO'#E{O<uQQO1G1OOOQP1G1X1G1XO!9jQQO,5:zO!9jQQO,5:}O!9tQSO,5;oO!:OQQO,5;oO!:VQQO,5;oO!9OQQO'#GRO!:aQQO,5;vOOQP,5;v,5;vO!<PQQO'#F]O!<WQQO'#F]POOO-E9i-E9iPOOO1G.d1G.dO!<]QQO,5:VO!<gQQO,5=ZO!<tQQO,5=ZOOQP1G/p1G/pO!<|QQO,5=YO!=WQQO,5=YOOQP1G/k1G/kOOQP7+%W7+%WOOQP7+%X7+%XOOQP7+%e7+%eO!=cQQO7+%eO!=hQQO7+%iOOQP7+%g7+%gO!=mQQO7+%gO!=rQQO7+%hO!>PQSO7+%hOOQP7+%h7+%hO4cQQO7+%hOOQP1G0Q1G0QO!>^QQO1G0QOOQP1G0U1G0UO!>fQQO1G0UOF|QQO1G0UOOQO,5<X,5<XOOQO-E9k-E9kOOQP1G.q1G.qOOQO,59l,59lO?tQQO,59lO!?cQQO,5=SO!?jQQO,5=SOOQP1G/V1G/VO!?rQQO,59yO!?}QRO7+'[O!@YQQO'#EmO!@dQQO'#HOO!@lQQO,5;WOOQP7+'Z7+'ZO!@qQRO7+'ZOOQP,59q,59qOOQP,59r,59rOOQO'#DZ'#DZO!@]QQO'#FtO!@|QRO,59tOOQO,5<_,5<_OOQO-E9q-E9qOOQP1G/[1G/[OOQP,59d,59dOHgQQO'#FpO!3uQQO,59dO!A_QRO,59dO!AjQRO,59dOOQO,5<Z,5<ZOOQO-E9m-E9mOOQP1G.}1G.}O(kQQO7+%YOOQP1G0m1G0mO4cQQO1G0mOOQO,5<f,5<fOOQO-E9x-E9xOOQP1G0n1G0nO!AxQQO'#GdOOQP1G0q1G0qOOQO,5<i,5<iOOQO-E9{-E9{OOQP1G0t1G0tO4cQQO1G0wOOQP1G0w1G0wOOQO,5<j,5<jOOQO-E9|-E9|OOQP1G0x1G0xO!B]QQO7+&gO!BeQSO7+&gO!CsQSO7+&pO!CzQQO7+&pOOQO,5<k,5<kOOQO-E9}-E9}OOQP1G1Q1G1QO!DRQQO,5;gOOQO,5;g,5;gO!DWQSO7+&jOOQP7+&j7+&jO!DbQQO7+&pO!7`QQO1G1[O!DgQQO1G1ZOOQO1G1Z1G1ZO!DnQSO1G1ZOOQO,5<m,5<mOOQO-E:P-E:POOQP1G1b1G1bO!DxQSO'#GqO!E]QQO'#F^O!EbQQO'#F^O!EgQQO,5;wOOQO,5;w,5;wO!ElQSO1G/qOOQO1G/q1G/qO!EyQSO'#DoO!FZQQO'#DoO!FfQQO'#DnOOQO,5<c,5<cO!FkQQO1G2uOOQO-E9u-E9uOOQO,5<b,5<bO!FxQQO1G2tOOQO-E9t-E9tOOQP<<IP<<IPOOQP<<IT<<ITOOQP<<IR<<IRO!GSQSO<<ISOOQP<<IS<<ISO4cQQO<<ISO!GaQSO<<ISOOQP7+%l7+%lO!GkQQO7+%lOOQP7+%p7+%pO!GpQQO7+%pO!GuQQO7+%pOOQO1G/W1G/WOOQO,5<^,5<^O!G}QQO1G2nOOQO-E9p-E9pOOQP<<Jv<<JvO.hQQO'#F{O!@YQQO,5;XOOQO,5;X,5;XO!HUQQO,5=jO!H^QQO,5=jOOQO1G0r1G0rOOQP<<Ju<<JuOOQP,5<`,5<`OOQP-E9r-E9rOOQO,5<[,5<[OOQO-E9n-E9nO!HfQRO1G/OOOQP1G/O1G/OOOQP<<Ht<<HtOOQP7+&X7+&XO!HqQQO'#DeOOQP7+&c7+&cOOQP<<JR<<JRO!HxQRO<<JRO!ITQQO<<J[O!I]QQO<<J[OOQO1G1R1G1ROOQP<<JU<<JUO4cQQO<<J[O!IbQSO7+&vOOQO7+&u7+&uO!IlQQO7+&uO4cQQO,5;xOOQO1G1c1G1cO!<]QQO,5:YP!<]QQO'#FwP?tQQO'#FvOOQPAN>nAN>nO4cQQOAN>nO!IsQSOAN>nOOQP<<IW<<IWOOQP<<I[<<I[O!I}QQO<<I[P!>nQQO'#FrOOQO,5<g,5<gOOQO-E9y-E9yOOQO1G0s1G0sOOQO,5<h,5<hO!JVQQO1G3UOOQO-E9z-E9zOOQP7+$j7+$jO!J_QQO'#GnO!B]QQOAN?mO!JjQQOAN?vO!JqQQOAN?vO!KzQSOAN?vOOQO<<Ja<<JaO!LRQSO1G1dO!L]QSO1G/tOOQO1G/t1G/tO!LjQSOG24YOOQPG24YG24YOOQPAN>vAN>vO!LtQQOAN>vP.hQQO'#F|OOQPG25XG25XO!LyQQOG25bO!MOQQO'#FPOOQPG25bG25bO!MZQQOG25bOOQPLD)tLD)tOOQPG24bG24bO!JqQQOLD*|O!9OQQO'#GQO!McQQO,5;kOOQP,5;k,5;kO?tQQO'#FQO!MnQQO'#FQO!MsQQOLD*|OOQP!$'Nh!$'NhOOQO,5<l,5<lOOQO-E:O-E:OOOQP1G1V1G1VO!MzQQO,5;lOOQO,5;l,5;lO!NPQQO!$'NhOOQO1G1W1G1WO!JqQQO!)9DSOOQP!.K9n!.K9nO# {QTO'#CqO#!`QTO'#CqO##}QSO'#CqO#$XQSO'#CqO#&]QSO'#CqO#&gQQO'#FyO#&tQQO'#FyO#'OQQO,5=]O#'ZQQO,5=]O#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO#'cQQO,5:pO!7`QQO,5:pOF|QQO,5:pO!7`QQO,5:wO!7`QQO,5:zO!7`QQO,5:}O#(yQSO'#CbO#)}QSO'#CbO#*bQSO'#GqO#*rQSO'#GqO#+PQRO'#GgO#+yQSO,5<eO#,ZQSO,5<eO#,hQSO1G0[O#-rQTO1G0[O#-yQSO1G0[O#.TQSO1G0[O#0{QTO1G0[O#1SQSO1G0[O#2eQSO1G0[O#2lQTO1G0[O#2sQSO1G0[O#4XQSO1G0[O#4`QTO1G0[O#4jQSO1G0[O#4wQSO1G0cO#5dQTO'#CqO#5kQTO'#CqO#6bQSO'#GqO#'cQQO'#EPO!7`QQO'#EPOF|QQO'#EPO#8]QQO'#EPO#8gQQO'#EPO#8qQQO'#EPO#8{QQO'#E`O#9TQQO'#EcO@kQQO'#C}O?tQQO,5:RO#9YQQO,59vO#:iQQO,59vO?tQQO,59vO?tQQO1G/lO?tQQO1G/mO?tQQO7+%YO?tQQO'#C{O#:pQQO'#DgO#9YQQO'#D[O#:wQQO'#D[O#:|QSO,5:QO#;WQQO,5:RO#;]QQO1G/nO?tQQO,5:SO#;bQQO'#Dh",stateData:"#;m~O$yOSPOS$zPQ~OVvOX{O[oO^YOaoOdoOh!POjcOr|Ow}O!P!OO!QnO!WaO!]!QO!phO!qhO#Y!RO#^!SO#d!TO#j!UO#m!VO#v!WO#{!XO#}!YO$S!ZO$U![O$V![O$W!]O$Y!^O$[!_O%OQO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO$v%QP~OTzO~P]O$z!`O~OVeXZeX^eX^!TXj!TXnUXneX!QeX!WeX!W!TX!|eX#ReX#TeX#UeX#WUX$weX%YeX%`eX%feX%geX%ieX%jeX%keX%leX%meX%neX%oeX%peX%qeX~O!a#hX~P$XOV!bO$w!bO~O[!wX^pX^!wXa!wXd!wXhpXh!wXrpXr!wXwpXw!wX!PpX!P!wX!QpX!Q!wX!WpX!W!wX!]pX!]!wX!p!wX!q!wX%OpX%O!wX%U!wX%V!wX%YpX%Y!wX%f!wX%g!wX%h!wX%i!wX%j!wX~O^!hOh!POr!jOw}O!P!OO!Q!kO!WaO!]!QO%O!eO%Y!fO~On!lO#W%]XV%]X^%]Xh%]Xr%]Xw%]X!P%]X!Q%]X!W%]X!]%]X#T%]X$w%]X%O%]X%Y%]Xu%]X~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!WaO!]!QO!phO!qhO%O+wO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O!Q-OO~P*aOj!qO^%XX]%XXn%XX!V%XX~O!W!tOV%TXZ%TX^%TXn%TX!Q%TX!W%TX!|%TX#R%TX#T%TX#U%TX$w%TX%Y%TX%`%TX%f%TX%g%TX%i%TX%j%TX%k%TX%l%TX%m%TX%n%TX%o%TX%p%TX%q%TX]%TX!V%TXj%TXi%TX!a%TXu%TX~OZ!sO~P,^O%O!eO~O!W!tO^%WXj%WX]%WXn%WX!V%WXu%WXV%WX$w%WX%`%WX#T%WX[%WX!a%WX~Ou!{O!QnO!V!zO~P*aOV!}O[oO^YOaoOdoOh!POjcOr!pOw}O!P!OO!QnO!WaO!]!QO!phO!qhO#Y!RO#^!SO#d!TO#j!UO#m!VO#v!WO#{!XO#}!YO$S!ZO$U![O$V![O$W!]O$Y!^O$[!_O%OQO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlOi%dP~O^#QO~OZ#RO^#VOn#TO!Q#cO!W#SO#R#dO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]OV`X#T%eX#U%eX$w`X~O!|#`O~P2gO^#VO~O^#eO~O!QnO~P*aO[oO^YOaoOdoOh!POr!pOw}O!QnO!WaO!]!QO!phO!qhO%O+wO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O!P#hO~P4jO#T#iO#U#iO~O#W#jO~O!a#kO~OVvO[oO^YOaoOdoOh!POjcOr|Ow}O!P!OO!QnO!WaO!]!QO!phO!qhO#Y!RO#^!SO#d!TO#j!UO#m!VO#v!WO#{!XO#}!YO$S!ZO$U![O$V![O$W!]O$Y!^O$[!_O%OQO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O$v%QX~P6hO%O#oO~OZ#rO[#qO^#sO%O#oO~O^#uO%O#oO~Oj#yO~O^!hOh!POr!jOw}O!P!OO!Q#|O!WaO!]!QO%O!eO%Y!fO~Oj#}O~O!W$PO~O^$RO%O#oO~O^$UO%O#oO~O^$XO%O#oO~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!Q-PO!WaO!]!QO!phO!qhO%O$ZO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~Oj$`O~P;_OV$fOjcO~P;_Oj$kO~O!QnOV$RX$w$RX~P*aO%O$oOV$TX$w$TX~O%O$oO~O${$rO$|$rO$}$tO~OZeX^!TX!W!TXj!TXn!TXh!TXr!TXw!TX{!TX!P!TX!Q!TX!]!TX%O!TX%Y!TX~O]!TX!V!TXu!TX#T!TXV!TX$w!TX%`!TX[!TX!a!TX~P>VO^!hOh!POr-TOw}O!P-_O!Q-`O!W-^O!]-eO%O!eO%Y!fO~OZ!sO~O^#uO~O!P$xO~On!lO#W%]aV%]a^%]ah%]ar%]aw%]a!P%]a!Q%]a!W%]a!]%]a#T%]a$w%]a%O%]a%Y%]au%]a~O]${O^#QO~OZ#RO^#VO!W#SO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]O~O]$|O!|,WO~PBROj!qOn%QO!QnOi%cP~P*aO!V%WO!|#`O~PBRO!V%YO~OV!}O[oO^YOaoOdoOh!POjcOr!pOw}O!P!OO!QnO!WaO!]!QO!phO!qhO#Y!RO#^!SO#d!TO#j!UO#m!VO#v!WO#{!XO#}!YO$S!ZO$U![O$V![O$W!]O$Y!^O$[!_O%OQO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~Oi%dX#p%dX#q%dX~PDQOi%]O~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!Q-QO!WaO!]!QO!phO!qhO%O+{O%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O^%aO%O%_O~O!QnO!a%cO~P*aO!QnOn$mX#T$mX#U$mXV$mX$w$mX!a$mX~P*aOn#TO#T%ea#U%eaV%ea$w%ea!a%ea~O]%fO~PF|OV#ga$w#ga~PDTO[%sO~OZ#rO[#qO]%vO%O#oO~O^!hOh!POn%zOr-TOu%xOw}O!P-_O!Q-`O!W-^O!]-eO%O,dO%Y!fO]%[P~O^&OOh!POr!jOw}O!P!OO!Q!kO!WaO!]!QO%Y!fO^%ZXj%ZX~O%O%}O~PKfOjcO^qa]qanqa!Vqa~O^#uO!W&SO~O^!hOh!POr-TOw}O{&WO!P-_O!Q-`O!W-^O!]-eO%O,xO%Y!fO~Oi&^O~PL{O^!hOh!POr!jOw}O!Q!kO!WaO!]!QO%O!eO%Y!fO~O!P#hO~PMwOi&eO%O,yO%Y!fO~O#T&gOV#ZX$w#ZX~P?tO]&kO%O#oO~O^!hOh!POr-TOw}O!P-_O!Q-`O!]-eO%O!eO%Y!fO~O!W&lO#T&mO~P! _O]&qO%O#oO~O#T&sOV#eX$w#eX~P?tO]&vO%O#oO~OjeX~P$XOjcO!|,XO~P2gOn!lO#W&yO#W%]X~O^#VOn#TO!Q#cO!W#SO!|,XO#R#dO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]OV`X#T%eX#U%eX~OZ&zOj$`O$w`X~P!#cOi'OO#p'PO#q'QO~OZ#ROjcO~P!#cO#T'TO#U#iO~O#W'UO~OV'WO!QnO~P*aOV'XO~OjcO~O!|#`OV#za$w#za~PBROi'[O#p']O#q'^O~On#TO!|#`OV%eX$w%eX!a%eX~PBRO!|#`OV$Za$w$Za~PBRO${$rO$|$rO$}'`O~O]${O~O%O!eO]%ZXn%ZX!V%ZX~PKfO!|#`Oi!_Xn!_X!a!`X~PBROi!_Xn!_X!a!`X~O!a'aO~On'bOi%cX~Oi'dO~On'eO!V%bX!a%bX~O!V'gO~O]'jOn'kO!|,YO~PBROn'nO!V'mO!a'oO!|#`O~PBRO!QnO!V'qO!a'rO~P*aO!|#`On$ma#T$ma#U$maV$ma$w$ma!a$ma~PBRO]'sOu'tO~O%Y#XO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOV!xiZ!xi^!xin!xi!Q!xi!W!xi!|!xi#R!xi#T!xi#U!xi$w!xi%`!xi%f!xi%g!xi%i!xi%p!xi%q!xi~O!V!xii!xi!a!xi~P!+YO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOV!xiZ!xi^!xin!xi!Q!xi!W!xi#R!xi#T!xi#U!xi$w!xi%p!xi%q!xi!V!xii!xi!a!xi~O!|!xi~P!-TO!|#`O~P!-TO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[OV!xiZ!xi^!xin!xi!Q!xi!W!xi#R!xi#T!xi#U!xi$w!xi%q!xi~O!|#`O!V!xii!xi!a!xi~P!/VO!|#`OV#Pi$w#Pi!a#Pi~PBRO]'uOn'wOu'vO~OZ#rO[#qO]'zO%O#oO~Ou'|O~P?tOn'}O]%[X~O](PO~OZeX^mX^!TXj!TX!W!TX~OjcOV$]i$w$]i~O%`(ZOV%^X$w%^Xn%^X!V%^X~Oi(`O~PL{O[(aO!W!tOVlX$wlX~On(bO~P?tO[(aOVlX$wlX~Oi(hO%O,yO%Y!fO~O!V(iO~O#T(kO~O](nO%O#oO~O[oO^YOaoOdoOh!POr!pOu-bOw}O!P!OO!QnO!V-UO!WaO!]!QO!phO!qhO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O%O+zO~P!4vO](sO%O#oO~O#T(tOV#ea$w#ea~O](xO%O#oO~O#k(yOV#ii$w#ii~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!Q-PO!WaO!]!QO!phO!qhO%O+xO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O^(|O%O%_O~O#p%dP#q%dP~P/uOi)PO#p'PO#q'QO~O!a)RO~O!QnO#y)VO~P*aOV)WO!|#`O~PBROj#wa~P;_OV)WO!QnO~P*aOi)]O#p']O#q'^O~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!QnO!WaO!]!QO!phO!qhO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O%O,eO~P!:lO!a)bO~Oj!qO!QnO~P*aOj!qO!QnOi%ca~P*aOn)iOi%ca~O!V%ba!a%ba~P?tOn)lO!V%ba!a%ba~O])nO~O])oO~O!V)pO~O!QnO!V)rO!a)sO~P*aO!V)rO!a)sO!|#`O~PBRO])uOn)vO~O])wOn)xO~O^!hOh!POr-TOu%xOw}O!P-_O!Q-`O!W-^O!]-eO%O,dO%Y!fO~O]%[a~P!>nOn)|O]%[a~O]${O]tXntX~OjcOV$^q$w$^q~On*PO{&WO~P?tOn*SO!V%rX~O!V*UO~OjcOV$]q$w$]q~O%`(ZOV|a$w|an|a!V|a~O[*]OVla$wla~O[*]O!W!tOVla$wla~On*PO{&WO!W*`O^%WXj%WX~P! _OjcO#j!UO~OjcO!|,XO~PBROZ*dO^#VO!W#SO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]O~O!|#`O~P!BoO#^*eO~P?tO!a*fO~Oj$`O!|,XO~P!BoO#W*hO~Oj#wi~P;_OV*kO!|#`O~PBROn#TO!Q#cO!|#`O!a$QX#T%eX~PBRO#T*lO~O#W*lO~O!a*mO~O!|#`Oi!_in!_i~PBRO!|#`Oi!bXn!bX!a!cX~PBROi!bXn!bX!a!cX~O!a*nO~Oj!qO!QnOi%ci~P*aO!V%bi!a%bi~P?tO!V*qO!a*rO!|#`O~PBRO!V*qO!|#`O~PBRO]*tO~O]*uO~O]*uOu*vO~O]%[i~P!>nO%O!eO!V%ra~On*|O!V%ra~O[+OOVli$wli~O%O+yO~P!4vO#k+QOV#iy$w#iy~O^+RO%O%_O~O]+SO~O!|,XOj#xq~PBROj#wq~P;_O!V+ZO!|#`O~PBRO]+[On+]O~O%O!eO!V%ri~O^#QOn'eO!V%bX~O#^+`O~P?tOj+aO~O^#VO!W#SO!|#`O%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[O%q#]O~OZ+cO~P!JvO!|#`O!a$Qi~PBRO!|#`Oi!bin!bi~PBRO!V+dO!|#`O~PBRO]+eO~O]+fO~Oi+iO#p+jO#q+kO~O^+lO%O%_O~Oi+pO#p+jO#q+kO~O!a+rO~O#^+sO~P?tO!a+tO~O]+uO~OZeX^eX^!TXj!TX!WeX!W!TX!|eX%YeX%`eX%feX%geX%ieX%jeX%keX%leX%meX%neX%oeX%peX%qeXVeXneX!QeX#ReX#TeX#UeX$weX~O]eX]!TX!VeXieX!aeX~P!NUOjeX~P!NUOZeX^eX^!TXj!TX!WeX!W!TX!|eX%YeX%`eX%feX%geX%ieX%jeX%keX%leX%meX%neX%oeX%peX%qeXn!TX!VeX~O]eX!V!TX~P#!gOh!TXr!TXw!TX{!TX!P!TX!Q!TX!]!TX%O!TX%Y!TX~P#!gOZeX^eX^!TXj!TXneX!WeX!W!TX!|eX%YeX%`eX%feX%geX%ieX%jeX%keX%leX%meX%neX%oeX%peX%qeX~O]eXueX~P#$xO]$mXn$mXu$mX~PF|Oj$mXn$mX~P!7`On+|O]%eau%ea~On+}Oj%ea~O[oO^YOaoOdoOh!POr!pOw}O!P!OO!Q-OO!WaO!]!QO!phO!qhO%O+yO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~OZeX]!TX^UXhUXnUXn!TXrUXuUXwUX!PUX!QUX!WUX!W!TX!]UX%OUX%YUX~OnUX!QeX!aeX#TeX#WUX~P#$xOn+|O!|,YO]%eXu%eX~PBROn+}O!|,XOj%eX~PBRO^&OOV%ZXj%ZX$w%ZX]%ZXn%ZX!V%ZXu%ZX%`%ZX#T%ZX[%ZX!a%ZX~P?wO!|,YO]$man$mau$ma~PBRO!|,XOj$man$ma~PBRO%Y#XO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOZ!xi]!xi^!xi!W!xi!|!xi%`!xi%f!xi%g!xi%i!xi%p!xi%q!xi~Oj!xi~P!+YOn!xiu!xi~P#,hO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOZ!xi]!xi^!xi!W!xi!|!xi%p!xi%q!xi~O%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOV!xiZ!xi^!xij!xin!xi!Q!xi!W!xi#R!xi#T!xi#U!xi$w!xi%p!xi%q!xi~O!|!xi~P#/_On!xiu!xi~P#.TO%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YOZ!xi]!xi^!xi!W!xi%p!xi%q!xi~O!|,WO~P#1^O!|,XO~P#/_O!|,YOn!xiu!xi~P#1^O%Y#XO%`#ZO%fiO%giO%i#ZO%j#YO%k#XO%l#XO%m#YO%n#YO%o#YO%p#[OZ!xi]!xi^!xi!W!xi%q!xi~O!|,WO~P#3QO!|,XOj!xi~P!/VO!|,YOn!xiu!xi~P#3QO!|,XOj#Pi~PBROV!TXZeX^mX!W!TX$w!TX~O%`!TX~P#5RO[!TXhmXnmXrmXwmX!PmX!QmX!WmX!]mX%OmX%YmX~P#5ROn#TO!Q,aO!|,XO#R#dOj`X#T%eX#U%eX~PBRO[oO^YOaoOdoOh!POr!pOw}O!P#hO!WaO!]!QO!phO!qhO%UTO%VUO%YVO%fiO%giO%hjO%ikO%jlO~O!Q-OO%O+yO~P#6{O!Q-PO%O+xO~P#6{O!Q-QO%O+{O~P#6{O#T,bO#U,bO~O#W,cO~O^!hOh!POr-TOw}O!P-_O!Q-WO!W-^O!]-eO%O!eO%Y!fO~O^!hOh!POr-TOw}O!Q-`O!W-^O!]-eO%O!eO%Y!fO~O!P-VO~P#9zO%O+wO~P!4vO!P-XO~O!V-YO!|#`O~PBRO!V-ZO~O!V-[O~O!W-dO~OP%ka%Oa~",goto:"!FW%sPP%tP%wP%zP'SP'XPPPP'`'cP'u'uP)w'u-_PPP0j0m0qP1V4b1VP7s8WP1VP8a8d8hP8p8w1VPP1V8{<`?vPPCY-_-_-_PCdCuCxPC{DQ'u'uDV'uES'u'u'u'uGUIW'uPPJR'uJUMjMjMj'u! r! r!#SP!$`!%d!&d'cP'cPP'cP!&yP!'V!'^!&yP!'a!'h!'n!'w!&yP!'z!(R!&y!(U!(fPP!&yP!(x!)UPP!&y!)Y!)c!&yP!)g!)gP!&yP!&yP!)j!)m!&v!&yP!&yPPP!&yP!&yP!)q!)q!)w!)}!*U!*[!*d!*j!*p!*w!*}!+T!+Z!.q!.x!/O!/X!/m!/s!/z!0Q!0W!0^!0d!0jPPPPPPPPP!0p!1f!1k!1{!2kPP!7P!:^P!>u!?Z!?_!@Z!@fP!@p!D_!Df!Di!DuPPPPPPPPPPPP!FSR!aPRyO!WXOScw!R!T!U!W#O#k#n#u$R$X&O&j&u&|'W'Y']'})W)|*k*w+gQ#pzU#r{#s%uQ#x|U$T!S$U&pQ$^!VQ$y!lR)U'RVROS#nQ#t{T%t#s%uR#t{qrOScw!U!V!W#O#k#n&|'W'Y)W*k+g%PoOSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^%O]OSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^#u!iW^!O!h!t!z#e#h#u#v#y#|#}$P$Q$T$W$v$x%W%Y%a%x%y&O&S&W&]&`&b&d&m'e'|'}(S([(c(i(o(|)l)|*P*Q*S*p*w*|+R+^+j+l,h-U-V-W-X-Y-Z-[-]-_-d'cbOSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dR$O!PT&c#}&dW%`#R&z*d+cQ&Q#vS&V#y&]S&`#}&dR*Y(b'cZOSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-d%fWOSWYacmnw!O!U!V!W!X!Z!_!q!z#O#Q#S#T#V#^#_#`#a#b#c#h#i#j#k#n#v#|$f$v$x%W%Y%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(i(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^S&b#}&d!{-]!h!t#e#u#y$P$Q$T$W%a%x%y&O&W&]&`&m'e'|'}(S([(c(o(|)l)|*Q*p*w+R+j+l,h-U-V-W-X-Y-Z-[-]-_-dQ#v|S$v!j!pU&P#v$v,hZ,h#x&Q&U&V-TS%{#u&OV){'})|*wR#z}T&[#y&]]&X#y&](S([(o*QZ&Z#y&](S(o*QT([&Y(]'s_OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|#}$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&S&W&]&`&b&d&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*P*Q*S*`*h*k*l*n*o*p*r*w*|+R+^+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-d'r_OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|#}$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&S&W&]&`&b&d&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*P*Q*S*`*h*k*l*n*o*p*r*w*|+R+^+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dR!w^'bbOSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dS&a#}&dR(d&bS!u]fX!x`&_(e(oQ!r[Q%O!qQ)d'aU)f'b)i*oR+X*nR%R!qR%P!qV)h'b)i*oV)g'b)i*odtOScw#O#k#n&|'Y+gQ$h!WQ&R#wQ&w$[S'S$c$iQ(V&TQ*O(RQ*V(WQ*b(yQ*c(zR+_+Q%PfOSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^%PgOSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^!q#Weg!o!y$[$_$c$j$m$q$}%^%b%d%m'V'p(z({)S)Y)^)c)e)q)t*i*s+T+V+W+Y,f,g,i,j,w,z-aR#fh#^mOSacmnw!X!Z!_!q#O#S#T#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&y&|'P'T'U'X'Y']'a'b'o'r(k(t)i)s*`*h*l*n*o*r+g-^!W#_e!y$j$m$q$}%b%d%j%k%l%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aW,T!o,n,q,tj,U$[$_$c(z)S*i,g,j,o,r,u,w,z[,V%^,f,i,p,s,v`,{Y,Q,T,W,Z,^,{-Ox,|!U!V!W&x'R'W)V)W*k+},R,U,X,[,_,a,b,c,|-Pg,}#Q#V'w+|,S,V,Y,],`,}-Q#^mOSacmnw!X!Z!_!q#O#S#T#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&y&|'P'T'U'X'Y']'a'b'o'r(k(t)i)s*`*h*l*n*o*r+g-^`,{Y,Q,T,W,Z,^,{-Ox,|!U!V!W&x'R'W)V)W*k+},R,U,X,[,_,a,b,c,|-Pg,}#Q#V'w+|,S,V,Y,],`,}-Q!Y#^e!y$j$m$q$}%b%d%i%j%k%l%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aY,Q!o,k,n,q,tl,R$[$_$c(z)S*i,g,j,l,o,r,u,w,z_,S%^,f,i,m,p,s,v!W#_e!y$j$m$q$}%b%d%j%k%l%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aW,T!o,n,q,tj,U$[$_$c(z)S*i,g,j,o,r,u,w,z],V%^,f,i,p,s,v!S#ae!y$j$m$q$}%b%d%l%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aS,Z!o,tf,[$[$_$c(z)S*i,g,j,u,w,zX,]%^,f,i,v!Q#be!y$j$m$q$}%b%d%m'V'p({)Y)^)c)e)q)t*s+T+V+W+Y-aQ,^!od,_$[$_$c(z)S*i,g,j,w,zV,`%^,f,iprOScw!U!V!W#O#k#n&|'W'Y)W*k+gR)a']etOScw#O#k#n&|'Y+gQ$S!RT&i$R&jR$S!RQ$V!ST&o$U&pQ&U#xR&m$TS(T&S&lV*{*S*|+^R$V!SQ$Y!TT&t$X&uR$Y!TdsOScw#O#k#n&|'Y+gT$p![!]dtOScw#O#k#n&|'Y+gQ*b(yR+_+QQ$a!VQ&{$_Q)T'RR*g)ST&|$`&}Q+b+SQ+m+fR+v+uT+g+a+hR$i!WR$l!YT'Y$k'ZXuOSw#nQ$s!`R'_$sSSO#nR!dSQ%u#sR'y%uUwOS#nR#mwQ&d#}R(g&dQ(c&`R*Z(cS!mX$^R$z!mQ(O%{R)}(OQ&]#yR(_&]Q(]&YR*X(]'r^OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|#}$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&S&W&]&`&b&d&g&l&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*P*Q*S*`*h*k*l*n*o*p*r*w*|+R+^+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dR!v^S'f%T+PR)m'fQ'c%RR)j'cW#Oc&|'Y+gR%[#O^#Ue$[$_$c$m)^,zU%e#U,O,PQ,O,fR,P,gQ&j$RR(m&jS*Q(S(oR*y*QQ*T(TR*}*TQ&p$UR(r&pQ&u$XR(w&uQ&}$`R)O&}Q+h+aR+o+hQ'Z$kR)['ZQ!cRQ#luQ#nyQ%Z!|Q&x$]Q'R$bQ'x%tQ(^&[Q(f&cQ(l&iQ(q&oR(v&tVxOS#nWuOSw#nY!|c#O&|'Y+gR%r#kdtOScw#O#k#n&|'Y+gQ$]!UQ$b!VQ$g!WQ)X'WQ*j)WR+U*kdeOScw#O#k#n&|'Y+gQ!oYQ!ya`#gmn,{,|,}-O-P-QQ$[!UQ$_!VQ$c!WQ$j!Xd$m!Z#i#j&g&s'P'T'U(k(tQ$q!_Q$}!qQ%^#QQ%b#SQ%d#TW%h#^,Q,R,SQ%i#_Q%j#`Q%k#aQ%l#bQ%m#cQ'V$fQ'p%cQ(z&xQ({&yQ)S'RQ)Y'XQ)^']Q)c'aU)e'b)i*oQ)q'oQ)t'rQ*i)VQ*s)sQ+T*hQ+V*lQ+W*nQ+Y*rS,f#V'wS,g,b,cQ,i+|Q,j+}Q,k,TQ,l,UQ,m,VQ,n,WQ,o,XQ,p,YQ,q,ZQ,r,[Q,s,]Q,t,^Q,u,_Q,v,`Q,w,aU,z'W)W*kV-a&l*`-^#bZW!O!h!t!z#e#h#u#v#y#|$P$Q$T$W$v$x%W%Y%a%x%y&O&W&]&`&m'e'|'}(S([(c(i(o(|)l)|*Q*p*w+R+j+l,h-U-V-W-X-Y-Z-[-]-_-d%P[OSYacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*`*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^$zdOSacmnw!U!V!W!X!Z!_!q#O#Q#S#T#V#^#_#`#a#b#c#i#j#k#n$f%c&g&l&s&x&y&|'P'R'T'U'W'X'Y']'a'b'o'r'w(k(t)V)W)i)s*h*k*l*n*o*r+g+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,{,|,}-O-P-Q-^S!gW-]Q!nYS#{!O-_Q$u!hS%T!t+jS%X!z-UQ%n#e[%o#h#|$x-V-W-XW%w#u'})|*wU&P#v$v,h[&X#y&](S([(o*QQ&f$PQ&h$QQ&n$TQ&r$WS'h%W-YS'i%Y-ZW'l%a(|+R+lS'{%x%yQ(Q&OQ(Y&WQ(d&`Q(p&mU)k'e)l*pQ)z'|Q*[(cS*^(i-[Q+P*`R-c-dS#w|!pS$w!j-TQ&T#xQ(R&QQ(W&UR(X&VT%|#u&OhqOScw!U!V#O#k#n&|'Y+gU$Q!R$R&jU$W!T$X&uQ$e!WY%y#u&O'})|*wQ)`']V-S'W)W*kS&[#y&]S*R(S(oR*z*QY&Y#y&](S(o*QR*W(['``OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dS&_#}&dW(S&S*S*|+^Q(e&bQ(o&lR*x*PS%U!t*`R+q+jR%S!qQ#PcQ(}&|Q)Z'YR+n+ghpOScw!U!V#O#k#n&|'Y+gQ$d!WQ$n!ZQ%g#VU%p#i'T,bU%q#j'U,cQ(j&gQ(u&sQ)Q'PQ)_']Q)y'wQ*_(kQ*a(tV-R'W)W*kT(U&S&l",nodeNames:"\u26A0 LineComment BlockComment SourceFile PackageClause package DefName ; ImportDecl import ImportSpec . String ) ( SpecList ExprStatement Number Bool Nil Rune VariableName TypedLiteral StructType struct } { StructBody FieldDecl FieldName , PointerType * FunctionType func Parameters Parameter ... InterfaceType interface InterfaceBody MethodElem UnderlyingType ~ TypeElem LogicOp ChannelType chan <- ParenthesizedType QualifiedType TypeName ParameterizedType ] [ TypeArgs ArrayType SliceType MapType map LiteralValue Element Key : Element Key ParenthesizedExpr FunctionLiteral Block Conversion SelectorExpr IndexExpr SliceExpr TypeAssertion CallExpr ParameterizedExpr Arguments CallExpr make new Arguments UnaryExp ArithOp LogicOp BitOp DerefOp BinaryExp ArithOp BitOp BitOp CompareOp LogicOp LogicOp SendStatement IncDecStatement IncDecOp Assignment = UpdateOp VarDecl := ConstDecl const ConstSpec SpecList TypeDecl type TypeSpec TypeParams TypeParam SpecList VarDecl var VarSpec SpecList LabeledStatement LabelName IfStatement if else SwitchStatement switch SwitchBlock Case case default TypeSwitchStatement SwitchBlock Case ForStatement for ForClause RangeClause range GoStatement go SelectStatement select SelectBlock Case ReceiveStatement ReturnStatement return GotoStatement break continue goto FallthroughStatement fallthrough DeferStatement defer FunctionDecl MethodDecl",maxTerm:218,context:tO,nodeProps:[["isolate",-3,2,12,20,""],["group",-18,12,17,18,19,20,21,22,66,67,69,70,71,72,73,74,77,81,86,"Expr",-20,16,68,93,94,96,99,101,105,111,115,117,120,126,129,134,136,141,143,147,149,"Statement",-12,23,31,33,38,46,49,50,51,52,56,57,58,"Type"],["openedBy",13,"(",25,"{",53,"["],["closedBy",14,")",26,"}",54,"]"]],propSources:[nO],skippedNodes:[0,1,2,153],repeatNodeCount:23,tokenData:":b~RvXY#iYZ#i]^#ipq#iqr#zrs$Xuv&Pvw&^wx&yxy(qyz(vz{({{|)T|})e}!O)j!O!P)u!P!Q+}!Q!R,y!R![-t![!]2^!]!^2k!^!_2p!_!`3]!`!a3e!c!}3x!}#O4j#P#Q4o#Q#R4t#R#S4|#S#T9X#T#o3x#o#p9q#p#q9v#q#r:W#r#s:]$g;'S3x;'S;=`4d<%lO3x~#nS$y~XY#iYZ#i]^#ipq#iU$PP%hQ!_!`$SS$XO!|S~$^W[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y<%lO$X~${O[~~%ORO;'S$X;'S;=`%X;=`O$X~%^X[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y;=`<%l$X<%lO$X~%|P;=`<%l$X~&UP%l~!_!`&X~&^O#U~~&cR%j~vw&l!_!`&X#Q#R&q~&qO%p~~&vP%o~!_!`&X~'OWd~OY&yZw&ywx'hx#O&y#O#P'm#P;'S&y;'S;=`(k<%lO&y~'mOd~~'pRO;'S&y;'S;=`'y;=`O&y~(OXd~OY&yZw&ywx'hx#O&y#O#P'm#P;'S&y;'S;=`(k;=`<%l&y<%lO&y~(nP;=`<%l&y~(vO^~~({O]~~)QP%Y~!_!`&X~)YQ%f~{|)`!_!`&X~)eO#R~~)jOn~~)oQ%g~}!O)`!_!`&X~)zRZS!O!P*T!Q![*`#R#S+w~*WP!O!P*Z~*`Ou~Q*eTaQ!Q![*`!g!h*t#R#S+w#X#Y*t#]#^+rQ*wS{|+T}!O+T!Q![+^#R#S+lQ+WQ!Q![+^#R#S+lQ+cRaQ!Q![+^#R#S+l#]#^+rQ+oP!Q![+^Q+wOaQQ+zP!Q![*`~,SR%k~z{,]!P!Q,b!_!`&X~,bO$z~~,gSP~OY,bZ;'S,b;'S;=`,s<%lO,b~,vP;=`<%l,bQ-O[aQ!O!P*`!Q![-t!d!e.c!g!h*t!q!r/Z!z!{/x#R#S.]#U#V.c#X#Y*t#]#^+r#c#d/Z#l#m/xQ-yUaQ!O!P*`!Q![-t!g!h*t#R#S.]#X#Y*t#]#^+rQ.`P!Q![-tQ.fR!Q!R.o!R!S.o#R#S/QQ.tSaQ!Q!R.o!R!S.o#R#S/Q#]#^+rQ/TQ!Q!R.o!R!S.oQ/^Q!Q!Y/d#R#S/rQ/iRaQ!Q!Y/d#R#S/r#]#^+rQ/uP!Q!Y/dQ/{T!O!P0[!Q![1c!c!i1c#R#S2Q#T#Z1cQ0_S!Q![0k!c!i0k#R#S1V#T#Z0kQ0pVaQ!Q![0k!c!i0k!r!s*t#R#S1V#T#Z0k#]#^+r#d#e*tQ1YR!Q![0k!c!i0k#T#Z0kQ1hWaQ!O!P0k!Q![1c!c!i1c!r!s*t#R#S2Q#T#Z1c#]#^+r#d#e*tQ2TR!Q![1c!c!i1c#T#Z1c~2cP!a~!_!`2f~2kO#W~~2pOV~~2uR!|S}!O3O!^!_3T!_!`$S~3TO!Q~~3YP%m~!_!`&X~3bP#T~!_!`$S~3jQ!|S!_!`$S!`!a3p~3uP%n~!_!`&X~3}V%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~4gP;=`<%l3x~4oO!W~~4tO!V~~4yP%i~!_!`&X~5RV%O~!Q![5h!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~5o^aQ%O~!O!P*`!Q![5h!c!g3x!g!h6k!h!}3x#R#S4|#T#X3x#X#Y6k#Y#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~6pX%O~{|+T}!O+T!Q![7]!c!}3x#R#S8P#T#o3x$g;'S3x;'S;=`4d<%lO3x~7dXaQ%O~!Q![7]!c!}3x#R#S8P#T#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~8UV%O~!Q![7]!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~8rVaQ%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~9[TO#S9X#S#T$v#T;'S9X;'S;=`9k<%lO9X~9nP;=`<%l9X~9vOj~~9{Q%`~!_!`&X#p#q:R~:WO%q~~:]Oi~~:bO{~",tokenizers:[iO,1,2,new y("j~RQYZXz{^~^O$|~~aP!P!Qd~iO$}~~",25,181)],topRules:{SourceFile:[0,3]},dynamicPrecedences:{19:1,51:-1,55:2,69:-1,108:-1},specialized:[{term:184,get:Q=>oO[Q]||-1}],tokenPrec:5451}),S=[P("func ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"declaration",type:"keyword"}),P("func (${receiver}) ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"method declaration",type:"keyword"}),P("var ${name} = ${value}",{label:"var",detail:"declaration",type:"keyword"}),P("type ${name} ${type}",{label:"type",detail:"declaration",type:"keyword"}),P("const ${name} = ${value}",{label:"const",detail:"declaration",type:"keyword"}),P("type ${name} = ${type}",{label:"type",detail:"alias declaration",type:"keyword"}),P("for ${init}; ${test}; ${update} {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),P("for ${i} := range ${value} {\n ${}\n}",{label:"for",detail:"range",type:"keyword"}),P(`select {
\${}
}`,{label:"select",detail:"statement",type:"keyword"}),P("case ${}:\n${}",{label:"case",type:"keyword"}),P("switch ${} {\n ${}\n}",{label:"switch",detail:"statement",type:"keyword"}),P("switch ${}.(${type}) {\n ${}\n}",{label:"switch",detail:"type statement",type:"keyword"}),P("if ${} {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),P(`if \${} {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),P('import ${name} "${module}"\n${}',{label:"import",detail:"declaration",type:"keyword"})],T=new x,p=new Set(["SourceFile","Block","FunctionDecl","MethodDecl","FunctionLiteral","ForStatement","SwitchStatement","TypeSwitchStatement","IfStatement"]);function o(Q,e){return(t,a)=>{O:for(let X=t.node.firstChild,c=0,i=null;;){for(;!X;){if(!c)break O;c--,X=i.nextSibling,i=i.parent}e&&X.name==e||X.name=="SpecList"?(c++,i=X,X=X.firstChild):(X.name=="DefName"&&a(X,Q),X=X.nextSibling)}return!0}}var rO={FunctionDecl:o("function"),VarDecl:o("var","VarSpec"),ConstDecl:o("constant","ConstSpec"),TypeDecl:o("type","TypeSpec"),ImportDecl:o("constant","ImportSpec"),Parameter:o("var"),__proto__:null};function W(Q,e){let t=T.get(e);if(t)return t;let a=[],X=!0;function c(i,n){let R=Q.sliceString(i.from,i.to);a.push({label:R,type:n})}return e.cursor(d.IncludeAnonymous).iterate(i=>{if(X)X=!1;else if(i.name){let n=rO[i.name];if(n&&n(i,c)||p.has(i.name))return!1}else if(i.to-i.from>8192){for(let n of W(Q,i.node))a.push(n);return!1}}),T.set(e,a),a}var V=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,m=["String","LineComment","BlockComment","DefName","LabelName","FieldName",".","?."],Y=Q=>{let e=s(Q.state).resolveInner(Q.pos,-1);if(m.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&V.test(Q.state.sliceDoc(e.from,e.to));if(!t&&!Q.explicit)return null;let a=[];for(let X=e;X;X=X.parent)p.has(X.name)&&(a=a.concat(W(Q.state.doc,X)));return{options:a,from:t?e.from:Q.pos,validFor:V}},r=g.define({name:"go",parser:cO.configure({props:[k.add({IfStatement:$({except:/^\s*({|else\b)/}),LabeledStatement:b,"SwitchBlock SelectBlock":Q=>{let e=Q.textAfter,t=/^\s*\}/.test(e),a=/^\s*(case|default)\b/.test(e);return Q.baseIndent+(t||a?0:Q.unit)},Block:Z({closing:"}"}),BlockComment:()=>null,Statement:$({except:/^{/})}),w.add({"Block SwitchBlock SelectBlock LiteralValue InterfaceType StructType SpecList":h,BlockComment(Q){return{from:Q.from+2,to:Q.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case\b|default\b|\})$/}}),$O="interface struct chan map package go return break continue goto fallthrough else defer range true false nil".split(" ").map(Q=>({label:Q,type:"keyword"}));function lO(){let Q=S.concat($O);return new G(r,[r.data.of({autocomplete:_(m,q(Q))}),r.data.of({autocomplete:Y})])}export{S as i,r as n,Y as r,lO as t};
import"./dist-DBwNzi3C.js";import{n as a,r as t,t as m}from"./dist-D_XLVesh.js";export{m as yaml,a as yamlFrontmatter,t as yamlLanguage};
import{D as m,H as u,J as r,N as x,at as Z,i as G,n as l,nt as b,q as R,r as h,s as k,u as w,y as X,zt as T}from"./dist-DBwNzi3C.js";import{n as y}from"./dist-TiFCI16_.js";var U=1,z=2,j=3,Y=155,E=4,W=156;function _(O){return O>=65&&O<=90||O>=97&&O<=122}var V=new l(O=>{let e=O.pos;for(;;){let{next:t}=O;if(t<0)break;if(t==123){let i=O.peek(1);if(i==123){if(O.pos>e)break;O.acceptToken(U,2);return}else if(i==35){if(O.pos>e)break;O.acceptToken(z,2);return}else if(i==37){if(O.pos>e)break;let a=2,Q=2;for(;;){let P=O.peek(a);if(P==32||P==10)++a;else if(P==35)for(++a;;){let n=O.peek(a);if(n<0||n==10)break;a++}else if(P==45&&Q==2)Q=++a;else{O.acceptToken(j,Q);return}}}}if(O.advance(),t==10)break}O.pos>e&&O.acceptToken(Y)});function q(O,e,t){return new l(i=>{let a=i.pos;for(;;){let{next:Q}=i;if(Q==123&&i.peek(1)==37){let P=2;for(;;P++){let o=i.peek(P);if(o!=32&&o!=10)break}let n="";for(;;P++){let o=i.peek(P);if(!_(o))break;n+=String.fromCharCode(o)}if(n==O){if(i.pos>a)break;i.acceptToken(t,2);break}}else if(Q<0)break;if(i.advance(),Q==10)break}i.pos>a&&i.acceptToken(e)})}var F=q("endraw",W,E),N={__proto__:null,in:38,is:40,and:46,or:48,not:52,if:78,else:80,true:98,false:98,self:100,super:102,loop:104,recursive:136,scoped:160,required:162,as:256,import:260,ignore:268,missing:270,with:272,without:274,context:276},D={__proto__:null,if:112,elif:118,else:122,endif:126,for:132,endfor:140,raw:146,endraw:152,block:158,endblock:166,macro:172,endmacro:182,call:188,endcall:192,filter:198,endfilter:202,set:208,endset:212,trans:218,pluralize:222,endtrans:226,with:232,endwith:236,autoescape:242,endautoescape:246,import:254,from:258,include:266},C=h.deserialize({version:14,states:"!*dQVOPOOOOOP'#F`'#F`OeOTO'#CbOvQSO'#CdO!kOPO'#DcO!yOPO'#DnO#XOQO'#DuO#^OPO'#D{O#lOPO'#ESO#zOPO'#E[O$YOPO'#EaO$hOPO'#EfO$vOPO'#EkO%UOPO'#ErO%dOPO'#EwOOOP'#F|'#F|O%rQWO'#E|O&sO#tO'#F]OOOP'#Fq'#FqOOOP'#F_'#F_QVOPOOOOOP-E9^-E9^OOQO'#Ce'#CeO'sQSO,59OO'zQSO'#DWO(RQSO'#DXO(YQ`O'#DZOOQO'#Fr'#FrOvQSO'#CuO(aOPO'#CbOOOP'#Fd'#FdO!kOPO,59}OOOP,59},59}O(oOPO,59}O(}QWO'#E|OOOP,5:Y,5:YO)[OPO,5:YO!yOPO,5:YO)jQWO'#E|OOOQ'#Ff'#FfO)tOQO'#DxO)|OQO,5:aOOOP,5:g,5:gO#^OPO,5:gO*RQWO'#E|OOOP,5:n,5:nO#lOPO,5:nO*YQWO'#E|OOOP,5:v,5:vO#zOPO,5:vO*aQWO'#E|OOOP,5:{,5:{O$YOPO,5:{O*hQWO'#E|OOOP,5;Q,5;QO$hOPO,5;QO*oQWO'#E|OOOP,5;V,5;VO*vOPO,5;VO$vOPO,5;VO+UQWO'#E|OOOP,5;^,5;^O%UOPO,5;^O+`QWO'#E|OOOP,5;c,5;cO%dOPO,5;cO+gQWO'#E|O+nQSO,5;hOvQSO,5:OO+uQSO,5:ZO+zQSO,5:bO+uQSO,5:hO+uQSO,5:oO,PQSO,5:wO,XQpO,5:|O+uQSO,5;RO,^QSO,5;WO,fQSO,5;_OvQSO,5;dOvQSO,5;jOvQSO,5;jOvQSO,5;pOOOO'#Fk'#FkO,nO#tO,5;wOOOP-E9]-E9]O,vQ!bO,59QOvQSO,59TOvQSO,59UOvQSO,59UOvQSO,59UOvQSO,59UO,{QSO'#C}O,XQpO,59cOOQO,59q,59qOOOP1G.j1G.jOvQSO,59UO-SQSO,59UOvQSO,59UOvQSO,59UOvQSO,59nO-wQSO'#FxO.RQSO,59rO.WQSO,59tOOQO,59s,59sO.bQSO'#D[O.iQWO'#F{O.qQWO,59uO0WQSO,59aOOOP-E9b-E9bOOOP1G/i1G/iO(oOPO1G/iO(oOPO1G/iO)TQWO'#E|OvQSO,5:SO0nQSO,5:UO0sQSO,5:WOOOP1G/t1G/tO)[OPO1G/tO)mQWO'#E|O)[OPO1G/tO0xQSO,5:_OOOQ-E9d-E9dOOOP1G/{1G/{O0}QWO'#DyOOOP1G0R1G0RO1SQSO,5:lOOOP1G0Y1G0YO1[QSO,5:tOOOP1G0b1G0bO1aQSO,5:yOOOP1G0g1G0gO1fQSO,5;OOOOP1G0l1G0lO1kQSO,5;TOOOP1G0q1G0qO*vOPO1G0qO+XQWO'#E|O*vOPO1G0qOvQSO,5;YO1pQSO,5;[OOOP1G0x1G0xO1uQSO,5;aOOOP1G0}1G0}O1zQSO,5;fO2PQSO1G1SOOOP1G1S1G1SO2WQSO1G/jOOQO'#Dq'#DqO2_QSO1G/uOOOQ1G/|1G/|O2gQSO1G0SO2rQSO1G0ZO2zQSO'#EVO3SQSO1G0cO,SQSO1G0cO4fQSO'#FvOOQO'#Fv'#FvO5]QSO1G0hO5bQSO1G0mOOOP1G0r1G0rO5mQSO1G0rO5rQSO'#GOO5zQSO1G0yO6PQSO1G1OO6WQSO1G1UO6_QSO1G1UO6fQSO1G1[OOOO-E9i-E9iOOOP1G1c1G1cOOQO1G.l1G.lO6vQSO1G.oO8wQSO1G.pO:oQSO1G.pO:vQSO1G.pO<nQSO1G.pO<uQSO'#FwO>QQSO'#FrO>XQSO'#FwO>aQSO,59iOOQO1G.}1G.}O>fQSO1G.pO@aQSO1G.pOB_QSO1G.pOBfQSO1G.pOD^QSO1G/YOvQSO'#FbODeQSO,5<dOOQO1G/^1G/^ODmQSO1G/_OOQO1G/`1G/`ODuQSO,59vOvQSO'#FcOEjQWO,5<gOOQO1G/a1G/aPErQWO'#E|OOOP7+%T7+%TO(oOPO7+%TOEyQSO1G/nOOOP1G/p1G/pOOOP1G/r1G/rOOOP7+%`7+%`O)[OPO7+%`OOOP1G/y1G/yOFQQSO,5:eOOOP1G0W1G0WOFVQSO1G0WOOOP1G0`1G0`OOOP1G0e1G0eOOOP1G0j1G0jOOOP1G0o1G0oOOOP7+&]7+&]O*vOPO7+&]OF[QSO1G0tOOOP1G0v1G0vOOOP1G0{1G0{OOOP1G1Q1G1QOOOP7+&n7+&nOOOP7+%U7+%UO+uQSO'#FeOFcQSO7+%aOvQSO7+%aOOOP7+%n7+%nOFkQSO7+%nOFpQSO7+%nOOOP7+%u7+%uOFxQSO7+%uOF}QSO'#F}OGQQSO'#F}OGYQSO,5:qOOOP7+%}7+%}OG_QSO7+%}OGdQSO7+%}OOQO,59f,59fOOOP7+&S7+&SOGlQSO7+&oOOOP7+&X7+&XOvQSO7+&oOvQSO7+&^OGtQSO,5<jOvQSO,5<jOOOP7+&e7+&eOOOP7+&j7+&jO+uQSO7+&pOG|QSO7+&pOOOP7+&v7+&vOHRQSO7+&vOHWQSO7+&vOOQO7+$Z7+$ZOvQSO'#FaOH]QSO,5<cOvQSO,59jOOQO1G/T1G/TOOQO7+$[7+$[OvQSO7+$tOHeQSO,5;|OOQO-E9`-E9`OOQO7+$y7+$yOImQ`O1G/bOIwQSO'#D^OOQO,5;},5;}OOQO-E9a-E9aOOOP<<Ho<<HoOOOP7+%Y7+%YOOOP<<Hz<<HzOOOP1G0P1G0POOOP7+%r7+%rOOOP<<Iw<<IwOOOP7+&`7+&`OOQO,5<P,5<POOQO-E9c-E9cOvQSO<<H{OJOQSO<<H{OOOP<<IY<<IYOJYQSO<<IYOOOP<<Ia<<IaOvQSO,5:rO+uQSO'#FgOJ_QSO,5<iOOQO1G0]1G0]OOOP<<Ii<<IiOJgQSO<<IiOvQSO<<JZOJlQSO<<JZOJsQSO<<IxOvQSO1G2UOJ}QSO1G2UOKXQSO<<J[OK^QSO'#CeOOQO'#FT'#FTOKiQSO'#FTOKnQSO<<J[OKvQSO<<JbOK{QSO<<JbOLWQSO,5;{OLbQSO'#FrOOQO,5;{,5;{OOQO-E9_-E9_OLiQSO1G/UOM}QSO<<H`O! ]Q`O,59aODuQSO,59xO! sQSOAN>gOOOPAN>gAN>gO! }QSOAN>gOOOPAN>tAN>tO!!SQSO1G0^O!!^QSO,5<ROOQO,5<R,5<ROOQO-E9e-E9eOOOPAN?TAN?TO!!iQSOAN?uOOOPAN?uAN?uO+uQSO'#FhO!!pQSOAN?dOOOPAN?dAN?dO!!xQSO7+'pO+uQSO'#FiO!#SQSO7+'pOOOPAN?vAN?vO+uQSO,5;oOG|QSO'#FjO!#[QSOAN?vOOOPAN?|AN?|O!#dQSOAN?|OvQSO,59mO!$sQ`O1G.pO!%{Q`O1G.pO!&SQ`O1G.pO!'[Q`O1G.pO!'cQ`O'#FvO!'jQ`O1G.pO!(uQ`O1G.pO!*TQ`O1G.pO!*[Q`O1G.pO!+dQ`O1G/YO!+kQ`O1G/dOOOPG24RG24RO!+uQSOG24ROvQSO,5:sOOOPG25aG25aO!+zQSO,5<SOOQO-E9f-E9fOOOPG25OG25OO!,PQSO<<K[O!,XQSO,5<TOOQO-E9g-E9gOOQO1G1Z1G1ZOOQO,5<U,5<UOOQO-E9h-E9hOOOPG25bG25bO!,aQSOG25hO!,fQSO1G/XOOOPLD)mLD)mO!,pQSO1G0_OvQSO1G1nO!,zQSO1G1oOvQSO1G1oOOOPLD+SLD+SO!-wQ`O<<H`O!.[QSO7+'YOvQSO7+'ZO!.fQSO7+'ZO!.pQSO<<JuODuQSO'#CuODuQSO,59UODuQSO,59UODuQSO,59UODuQSO,59UO!.zQpO,59cODuQSO,59UO!/PQSO,59UODuQSO,59UODuQSO,59UODuQSO,59nO!/tQSO1G.pP!0RQSO1G/YODuQSO7+$tO!0YQ`O1G.pP!0gQ`O1G/YO-SQSO,59UPvQSO,59nO!0nQSO,59aP!3XQSO1G.pP!3`QSO1G.pP!5aQSO1G/YP!5hQSO<<H`O!/PQSO,59UPDuQSO,59nP!6_QSO1G/YP!7pQ`O1G/YO-SQSO'#CuO-SQSO,59UO-SQSO,59UO-SQSO,59UO-SQSO,59UO-SQSO,59UP-SQSO,59UP-SQSO,59UP-SQSO,59nO!7wQSO1G.pO!9xQSO1G.pO!:PQSO1G.pO!;UQSO1G.pP-SQSO7+$tO!<XQ`O,59aP!>SQ`O1G.pP!>ZQ`O1G.pP!>bQ`O1G/YP!?QQ`O<<H`O!/PQSO'#CuO!/PQSO,59UO!/PQSO,59UO!/PQSO,59UO!/PQSO,59UO!/PQSO,59UP!/PQSO,59UP!/PQSO,59UP!/PQSO,59nP!/PQSO7+$tP-SQSO,59nP!/PQSO,59nO!?zQ`O1G.pO!@RQ`O1G.pO!@fQ`O1G.pO!@yQ`O1G.p",stateData:"!Ac~O$dOS~OPROQaOR`O$aPO~O$aPOPUXQUXRUX$`UX~OekOfkOjlOpiO!RkO!SkO!TkO!UkO$gfO$ihO$njO~OPROQaORrO$aPO~OPROQaORvO$aPO~O$bwO~OPROQaOR|O$aPO~OPROQaOR!PO$aPO~OPROQaOR!SO$aPO~OPROQaOR!VO$aPO~OPROQaOR!YO$aPO~OPROQaOR!^O$aPO~OPROQaOR!aO$aPO~OPROQaOR!dO$aPO~O!X!eO!Y!fO!d!gO!k!hO!q!iO!x!jO#Q!kO#V!lO#[!mO#a!nO#h!oO#m!pO#s!qO#u!rO#y!sO~O$s!tO~OZ!wO_!yO`!zOa!{Ob!|Oc#ROd#SOg#TOh#UOl#OOp!}Ow#VO$i!xO~OV#QO~P&xO$h$lP~PvOo#ZO~PvO$m$oP~PvO$aPOPUXQUXRUX~OPROQaOR#dO$aPO~O!]#eO!_#fO!a#gO~P%rOPROQaOR#jO$aPO~O!_#fO!h#lO~P%rO$bwOS!lX~OS#oO~O!u#qO~P%rO!}#sO~P%rO#S#uO~P%rO#X#wO~P%rO#^#yO~P%rOPROQaOR#|O$aPO~O#c$OO#e$PO~P%rO#j$RO~P%rO#o$TO~P%rO!Z$VO~PvO$g$XO~O!Z$ZO~Op$^O$gfO~Om$aO~O!Z$eO$g$XO~O$g$XO!Z$rP~O$Q$nO$s!tO~O[$oO~Oo$kP~PvOekOfkOj)fOpiO!RkO!SkO!TkO!UkO$gfO$ihO$njO~Ot%PO$h$lX~P&xO$h%RO~Oo%TOt%PO~P&xO!P%UO~P&xOt%VO$m$oX~O$m%XO~OZ!wOp!}O$i!xOViagiahialiawiatia$hiaoia!Pia!Zia#tia#via#zia#|ia#}iaxia!fia~O_!yO`!zOa!{Ob!|Oc#ROd#SO~P.vO!Z%^O~O!Z%_O~O!Z%bO~O!n%cO~O!Z%dO$g$XO~O!Z%fO~O!Z%gO~O!Z%hO~O!Z%iO~O!Z%mO~O!Z%nO~O!Z%oO~O!Z%pO~P&xO!Z%qO~P&xOc%tOt%rO~O!Z%uO!r%wO!s%vO~Op$^O!Z%xO~O$g$XOo$qP~Op!}O!Z%}O~Op!}OZ$jX_$jX`$jXa$jXb$jXc$jXd$jXg$jXh$jXl$jXw$jX$i$jXt$jXe$jXf$jX$g$jXx$jX~O!Z$jXV$jX$h$jXo$jX!P$jX#t$jX#v$jX#z$jX#|$jX#}$jX!f$jX~P3[O!Z&RO~Os&UOt%rO!Z&TO~Os&VO~Os&XOt%rO~O!Z&YO~O!Z&ZO~P&xO#t&[O~P&xO#v&]O~P&xO!Z&^O#z&`O#|&_O#}&_O~P&xO$h&aO~P&xOZ!wOp!}O$i!xOV^i`^ia^ib^ic^id^ig^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ie^if^i$g^ix^i!f^i~O_^i~P6}OZ!wO_!yOp!}O$i!xOV^ia^ib^ic^id^ig^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~O`^i~P9OO`!zO~P9OOZ!wO_!yO`!zOa!{Op!}O$i!xOV^ic^id^ig^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Ob^i~P:}Ot&bOo$kX~P&xOZ$fX_$fX`$fXa$fXb$fXc$fXd$fXg$fXh$fXl$fXo$fXp$fXt$fXw$fX$i$fX~Os&dO~P=POt&bOo$kX~Oo&eO~Ob!|O~P:}OZ!wO_)gO`)hOa)iOb)jOc)kOp!}O$i!xOV^id^ig^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Oe&fOf&fO$gfO~P>mOZ!wO_!yO`!zOa!{Ob!|Oc#ROd#SOp!}O$i!xOV^ih^il^iw^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Og^i~P@nOg#TO~P@nOZ!wO_!yO`!zOa!{Ob!|Oc#ROd#SOg#TOh#UOp!}O$i!xOVvilviwvitvi$hviovi!Pvi!Zvi#tvi#vvi#zvi#|vi#}vi!fvi~Ox&gO~PBmOt%PO$h$la~Oo&jOt%PO~OekOfkOj(yOpiO!RkO!SkO!TkO!UkO$gfO$ihO$njO~Ot%VO$m$oa~O!]#eO~P%rO!Z&pO~P&xO!Z&rO~O!Z&sO~O!Z&uO~P&xOc&xOt%rO~O!Z&zO~O!Z&zO!s&{O~O!Z&|O~Os&}Ot'OOo$qX~Oo'QO~O!Z'RO~Op!}O!Z'RO~Os'TOt%rO~Os'WOt%rO~O$g'ZO~O$O'_O~O#{'`O~Ot&bOo$ka~Ot$Ua$h$Uao$Ua~P&xOZ!wO_(zO`({Oa(|Ob(}Oc)POd)QOg)ROh)SOl)OOp!}Ow)TO$i!xO~Ot!Oi$m!Oi~PHrO!P'hO~P&xO!Z'jO!f'kO~P&xO!Z'lO~Ot'OOo$qa~O!Z'qO~O!Z'sO~P&xOt'tO!Z'vO~P&xOt'xO!Z$ri~P&xO!Z'zO~Ot!eX!Z!eX#tXX~O#t'{O~Ot'|O!Z'zO~O!Z(OO~O!Z(OO#|(PO#}(PO~Oo$Tat$Ta~P&xOs(QO~P=POoritri~P&xOZ!wOp!}O$i!xOVvylvywvytvy$hvyovy!Pvy!Zvy#tvy#vvy#zvy#|vy#}vyxvy!fvy~O_!yO`!zOa!{Ob!|Oc#ROd#SOg#TOh#UO~PLsOZ!wOp!}O$i!xOgiahialiatiawia$miaxia~O_(zO`({Oa(|Ob(}Oc)POd)QO~PNkO!Z(^O!f(_O~P&xO!Z(^O~Oo!zit!zi~P&xOs(`Oo$Zat$Za~O!Z(aO~P&xOt'tO!Z(dO~Ot'xO!Z$rq~P&xOt'xO!Z$rq~Ot'|O!Z(kO~O$O(lO~OZ!wOp!}O$i!xO`^ia^ib^ic^id^ig^ih^il^it^iw^i$m^ie^if^i$g^ix^i~O_^i~P!#iOZ!wO_(zOp!}O$i!xOa^ib^ic^id^ig^ih^il^it^iw^i$m^ix^i~O`^i~P!$zO`({O~P!$zOZ!wO_(zO`({Oa(|Op!}O$i!xOc^id^ig^ih^il^it^iw^i$m^ix^i~Ob^i~P!&ZO$m$jX~P3[Ob(}O~P!&ZOZ!wO_)zO`){Oa)|Ob)}Oc*OOp!}O$i!xOd^ig^ih^il^it^iw^i$m^ix^i~Oe&fOf&fO$gfO~P!'qOZ!wO_(zO`({Oa(|Ob(}Oc)POd)QOp!}O$i!xOh^il^it^iw^i$m^ix^i~Og^i~P!)SOg)RO~P!)SOZ!wO_(zO`({Oa(|Ob(}Oc)POd)QOg)ROh)SOp!}O$i!xOlvitviwvi$mvi~Ox)WO~P!*cOt!Qi$m!Qi~PHrO!Z(nO~Os(pO~Ot'xO!Z$ry~Os(rOt%rO~O!Z(sO~Oouitui~P&xOo!{it!{i~P&xOs(vOt%rO~OZ!wO_(zO`({Oa(|Ob(}Oc)POd)QOg)ROh)SOp!}O$i!xO~Olvytvywvy$mvyxvy~P!-SOt$[q!Z$[q~P&xOt$]q!Z$]q~P&xOt$]y!Z$]y~P&xOm(VO~OekOfkOj)yOpiO!RkO!SkO!TkO!UkO$gfO$ihO$njO~Oe^if^i$g^i~P>mOxvi~PBmOe^if^i$g^i~P!'qOxvi~P!*cO_)gO`)hOa)iOb)jOc)kOd)ZOeiafia$gia~P.vOZ!wO_)gO`)hOa)iOb)jOc)kOd)ZOp!}O$i!xOV^ie^if^ih^il^iw^i$g^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Og^i~P!1_Og)lO~P!1_OZ!wO_)gO`)hOa)iOb)jOc)kOd)ZOg)lOh)mOp!}O$i!xOVvievifvilviwvi$gvitvi$hviovi!Pvi!Zvi#tvi#vvi#zvi#|vi#}vi!fvi~Ox)sO~P!3gO_)gO`)hOa)iOb)jOc)kOd)ZOg)lOh)mOevyfvy$gvy~PLsOxvi~P!3gOZ!wO_)zO`){Oa)|Ob)}Oc*OOd)bOg*POh*QOp!}O$i!xOevifvilvitviwvi$gvi$mvi~Oxvi~P!6fO_)gO~P6}OZ!wO_)gO`)hOp!}O$i!xOV^ib^ic^id^ie^if^ig^ih^il^iw^i$g^it^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^ix^i!f^i~Oa^i~P!8OOa)iO~P!8OOZ!wOp!}O$i!xOc^id^ie^if^ig^ih^il^iw^i$g^it^ix^i~O_)gO`)hOa)iOb)jOV^i$h^io^i!P^i!Z^i#t^i#v^i#z^i#|^i#}^i!f^i~P!:WO_)zO`){Oa)|Ob)}Oc*OOd)bOeiafia$gia~PNkOZ!wO_)zO`){Oa)|Ob)}Oc*OOd)bOp!}O$i!xOe^if^ih^il^it^iw^i$g^i$m^ix^i~Og^i~P!<xOg*PO~P!<xOx*SO~P!6fOZ!wO_)zO`){Oa)|Ob)}Op!}O$i!xO~Oc*OOd)bOg*POh*QOevyfvylvytvywvy$gvy$mvyxvy~P!>iO_)zO~P!#iO_)zO`){Oa^ib^i$m^i~P!:WO_)zO`){Oa)|Ob^i$m^i~P!:WO_)zO`){Oa)|Ob)}O$m^i~P!:WOfaZa~",goto:"Cy$sPPPPPP$tP$t%j'sPP's'sPPPPPPPPPP'sP'sPP)jPP)o+nPP+q'sPP's's's's's+tP+wPPPP+z,pPPP-fP-jP-vP+z.UP.zP/zP+z0YP1O1RP+z1UPPP1zP+z2QP2v2|3P3SP+z3YP4OP+z4UP4zP+z5QP5vP+z5|P6rP6xP+z7WP7|P+z8SP8xP$t$t$tPPPP9O$tPPPPPP$tP9U:j;f;m;w;}<T<g<m<t<z=U=[PPPPP=b>YPPPCcCjCmPPCp$tCsCv!gbOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%k$dkRhijl!e!f!p!q!r!s!x!y!z!{!|#R#S#T#U#V#e$O%P%U%V%t&U&V&X&d&g&x&}'T'W'h(Q(`(p(r(v(y(z({(|(})P)Q)R)S)T)W)Z)[)b)c)f)g)h)i)j)k)l)m)n)s)y)z){)|)}*O*P*Q*R*S*T*UQ$_!kQ$v!}Q&P$`S&f${(XS']&]'|R'b&b$ikRhijl!e!f!p!q!r!s!x!y!z!{!|!}#R#S#T#U#V#e$O%P%U%V%t&U&V&X&b&d&g&x&}'T'W'h(Q(`(p(r(v(y(z({(|(})P)Q)R)S)T)W)Z)[)b)c)f)g)h)i)j)k)l)m)n)s)y)z){)|)}*O*P*Q*R*S*T*UV$b!l#O)O$d#Pg#W#Y#[#_$U$W$i$j$k$l$p$q$r$s$t$u$z${$|$}%O%]%l&h&k&l&y'U'V'X'a'e'f'g'i'm'r'w(R(S(T(U(W(X(Y(Z([(](m(o(t(u(w(x)U)V)X)Y)])^)_)`)a)d)e)o)p)q)r)t)u)v)w)x*V*W*X*YQ&O$_S&Q$a(VR'S&PR$w!}R'c&bR#]jR&m%V!g_OSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%k!gSOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kTnSoQqSQtTQ#boR#kuQpSS#aoqS%Z#b#cR&o%[!gTOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ$Y!gQ$[!iQ$]!jQ$d!mQ$f!nQ$g!oQ%e#qQ%z$^Q&v%rQ'Y&[S'[&]'|Q'n'OQ(b'tQ(f'xR(h'{QsTS#htuS%`#i#kR&q%a!gUOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kRyUR#ny!gVOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQzVR#p{!gWOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ$`!kR%y$]R%{$^R'o'OQ}WR#r!O!gXOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!QXR#t!R!gYOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!TYR#v!U!gZOSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!WZR#x!X!g[OSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ![[R#}!]Q!Z[S#z![!]S%j#{#}R&t%k!g]OSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!_]R$Q!`!g^OSTVWXYZ[]^doqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kQ!b^R$S!cQ'^&]R(i'|QdOQuTQ{VQ!OWQ!RXQ!UYQ!XZQ!][Q!`]Q!c^p!vdu{!O!R!U!X!]!`!c#c#i#{%[%a%kQ#cqQ#itQ#{![Q%[#bQ%a#kR%k#}SQOdSeQm!cmSTVWXYZ[]^oqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kS&c$u$wR'd&cQ%Q#WQ%S#YT&i%Q%SQ%W#]R&n%WQoSR#`oQ%s$YQ&S$dQ&W$gW&w%s&S&W(qR(q(fQxUR#mxS'P%z%{R'p'PQ'u'VR(c'uQ'y'XQ(e'wT(g'y(eQ'}'^R(j'}Q!uaR$m!u!bcOTVWXYZ[]^dqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kTnSoQgRQ#WhQ#YiQ#[jQ#_lQ$U!eQ$W!fQ$i!pQ$j!qQ$k!rQ$l!sQ$p!xS$q!y)gQ$r!zQ$s!{Q$t!|Q$u!}Q$z#RQ${#SQ$|#TQ$}#UQ%O#VQ%]#eQ%l$OQ&h%PQ&k%UQ&l%VQ&y%tQ'U&UQ'V&VQ'X&XQ'a&bQ'e&dQ'f&gQ'g(yQ'i&xQ'm&}Q'r'TQ'w'WS(R(z)zQ(S({Q(T(|Q(U(}Q(W)PQ(X)QQ(Y)RQ(Z)SQ([)TQ(]'hQ(m(QQ(o(`Q(t)WQ(u(pQ(w(rQ(x(vQ)U)ZQ)V)[Q)X)bQ)Y)cQ)])fQ)^)lQ)_)mQ)`)nQ)a)sQ)d*TQ)e*UQ)o)hQ)p)iQ)q)jQ)r)kQ)t)yQ)u*PQ)v*QQ)w*RQ)x*SQ*V){Q*W)|Q*X)}R*Y*OQ$c!lT$y#O)OR$x!}R#XhR#^jR%|$^R$h!o",nodeNames:"\u26A0 {{ {# {% {% Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression ConcatOp ArithOp ArithOp CompareOp in is StringLiteral NumberLiteral and or NotExpression not FilterExpression FilterOp FilterName FilterCall ) ( ArgumentList NamedArgument AssignOp , NamedArgument ConditionalExpression if else CallExpression ArrayExpression TupleExpression ParenthesizedExpression DictExpression Entry : Entry BooleanLiteral self super loop IfStatement Tag TagName if %} Tag elif Tag else EndTag endif ForStatement Tag for Definition recursive EndTag endfor RawStatement Tag raw RawText EndTag endraw BlockStatement Tag block scoped required EndTag endblock MacroStatement Tag macro ParamList OptionalParameter OptionalParameter EndTag endmacro CallStatement Tag call EndTag endcall FilterStatement Tag filter EndTag endfilter SetStatement Tag set EndTag endset TransStatement Tag trans Tag pluralize EndTag endtrans WithStatement Tag with EndTag endwith AutoescapeStatement Tag autoescape EndTag endautoescape Tag Tag Tag import as from import ImportItem Tag include ignore missing with without context Comment #}",maxTerm:173,nodeProps:[["closedBy",1,"}}",2,"#}",-2,3,4,"%}",32,")"],["openedBy",7,"{{",31,"(",57,"{%",140,"{#"],["group",-18,9,10,13,14,21,22,25,27,38,41,42,43,44,45,49,50,51,52,"Expression",-11,53,64,71,77,84,92,97,102,107,114,119,"Statement"]],skippedNodes:[0],repeatNodeCount:13,tokenData:".|~RqXY#YYZ#Y]^#Ypq#Yqr#krs#vuv&nwx&{xy)nyz)sz{)x{|*V|}+|}!O,R!O!P,g!P!Q,o!Q![+h![!],w!^!_,|!_!`-U!`!a,|!c!}-^!}#O.U#P#Q.Z#R#S-^#T#o-^#o#p.`#p#q.e#q#r.j#r#s.w%W;'S-^;'S;:j.O<%lO-^~#_S$d~XY#YYZ#Y]^#Ypq#Y~#nP!_!`#q~#vOb~~#yWOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~$hOe~~$kYOY#vYZ#vZr#vrs%Zs#O#v#O#P$h#P;'S#v;'S;=`&O;=`<%l#v<%lO#v~%`We~OY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~%{P;=`<%l#v~&RXOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x;=`<%l#v<%lO#v~&sP`~#q#r&v~&{O!Z~~'OWOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~'kYOY&{YZ&{Zw&{wx(Zx#O&{#O#P'h#P;'S&{;'S;=`)O;=`<%l&{<%lO&{~(`We~OY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~({P;=`<%l&{~)RXOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x;=`<%l&{<%lO&{~)sOp~~)xOo~~)}P`~z{*Q~*VO`~~*[Qa~!O!P*b!Q![+h~*eP!Q![*h~*mSf~!Q![*h!g!h*y#R#S*h#X#Y*y~*|R{|+V}!O+V!Q![+]~+YP!Q![+]~+bQf~!Q![+]#R#S+]~+mTf~!O!P*b!Q![+h!g!h*y#R#S+h#X#Y*y~,ROt~~,WRa~uv,a!O!P*b!Q![+h~,dP#q#r&v~,lPZ~!Q![*h~,tP`~!P!Q*Q~,|O!P~~-RPb~!_!`#q~-ZPs~!_!`#q!`-iVm`[p!XS$gY!Q![-^!c!}-^#R#S-^#T#o-^%W;'S-^;'S;:j.O<%lO-^!`.RP;=`<%l-^~.ZO$i~~.`O$h~~.eO$n~~.jOl~^.oP$m[#q#r.rQ.wOVQ~.|O_~",tokenizers:[V,F,1,2,3,4,5,new G("b~RPstU~XP#q#r[~aO$Q~~",17,173)],topRules:{Template:[0,5]},specialized:[{term:161,get:O=>N[O]||-1},{term:55,get:O=>D[O]||-1}],tokenPrec:3602});function S(O,e){return O.split(" ").map(t=>({label:t,type:e}))}var A=S("abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr","function"),I=S("boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace","function"),L=S("loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller","keyword"),s=I.concat(L),p=S("raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends","keyword");function H(O){var P;let{state:e,pos:t}=O,i=u(e).resolveInner(t,-1).enterUnfinishedNodesBefore(t),a=((P=i.childBefore(t))==null?void 0:P.name)||i.name;if(i.name=="FilterName")return{type:"filter",node:i};if(O.explicit&&(a=="FilterOp"||a=="filter"))return{type:"filter"};if(i.name=="TagName")return{type:"tag",node:i};if(O.explicit&&a=="{%")return{type:"tag"};if(i.name=="PropertyName"&&i.parent.name=="MemberExpression")return{type:"prop",node:i,target:i.parent};if(i.name=="."&&i.parent.name=="MemberExpression")return{type:"prop",target:i.parent};if(i.name=="MemberExpression"&&a==".")return{type:"prop",target:i};if(i.name=="VariableName")return{type:"expr",from:i.from};if(i.name=="Comment"||i.name=="StringLiteral"||i.name=="NumberLiteral")return null;let Q=O.matchBefore(/[\w\u00c0-\uffff]+$/);return Q?{type:"expr",from:Q.from}:O.explicit?{type:"expr"}:null}function B(O,e,t,i){let a=[];for(;;){let Q=e.getChild("Expression");if(!Q)return[];if(Q.name=="VariableName"){a.unshift(O.sliceDoc(Q.from,Q.to));break}else if(Q.name=="MemberExpression"){let P=Q.getChild("PropertyName");P&&a.unshift(O.sliceDoc(P.from,P.to)),e=Q}else return[]}return i(a,O,t)}function f(O={}){let e=O.tags?O.tags.concat(p):p,t=O.variables?O.variables.concat(s):s,{properties:i}=O;return a=>{let Q=H(a);if(!Q)return null;let P=Q.from??(Q.node?Q.node.from:a.pos),n;return n=Q.type=="filter"?A:Q.type=="tag"?e:Q.type=="expr"?t:i?B(a.state,Q.target,a,i):[],n.length?{options:n,from:P,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var c=Z.inputHandler.of((O,e,t,i)=>i!="%"||e!=t||O.state.doc.sliceString(e-1,t+1)!="{}"?!1:(O.dispatch(O.state.changeByRange(a=>({changes:{from:a.from,to:a.to,insert:"%%"},range:T.cursor(a.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function v(O){return e=>{let t=O.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)}}var J=k.define({name:"jinja",parser:C.configure({props:[R({"TagName raw endraw filter endfilter as trans pluralize endtrans with endwith autoescape endautoescape":r.keyword,"required scoped recursive with without context ignore missing":r.modifier,self:r.self,"loop super":r.standard(r.variableName),"if elif else endif for endfor call endcall":r.controlKeyword,"block endblock set endset macro endmacro import from include":r.definitionKeyword,"Comment/...":r.blockComment,VariableName:r.variableName,Definition:r.definition(r.variableName),PropertyName:r.propertyName,FilterName:r.special(r.variableName),ArithOp:r.arithmeticOperator,AssignOp:r.definitionOperator,"not and or":r.logicOperator,CompareOp:r.compareOperator,"in is":r.operatorKeyword,"FilterOp ConcatOp":r.operator,StringLiteral:r.string,NumberLiteral:r.number,BooleanLiteral:r.bool,"{% %} {# #} {{ }} { }":r.brace,"( )":r.paren,".":r.derefOperator,": , .":r.punctuation}),x.add({Tag:X({closing:"%}"}),"IfStatement ForStatement":v(/^\s*(\{%-?\s*)?(endif|endfor|else|elif)\b/),Statement:v(/^\s*(\{%-?\s*)?end\w/)}),m.add({"Statement Comment"(O){let e=O.firstChild,t=O.lastChild;return!e||e.name!="Tag"&&e.name!="{#"?null:{from:e.to,to:t.name=="EndTag"||t.name=="#}"?t.from:O.to}}})]}),languageData:{indentOnInput:/^\s*{%-?\s*(?:end|elif|else)$/}}),$=y();function d(O){return J.configure({wrap:b(e=>e.type.isTop?{parser:O.parser,overlay:t=>t.name=="Text"||t.name=="RawText"}:null)},"jinja")}var g=d($.language);function K(O={}){let e=O.base||$,t=e.language==$.language?g:d(e.language);return new w(t,[e.support,t.data.of({autocomplete:f(O)}),e.language.data.of({closeBrackets:{brackets:["{"]}}),c])}export{g as i,K as n,f as r,c as t};

Sorry, the diff of this file is too big to display

import"./dist-DBwNzi3C.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import{n as o,t as r}from"./dist-BZY_uvFb.js";export{r as vue,o as vueLanguage};
import"./dist-DBwNzi3C.js";import{a,c as s,d as t,f as e,i as o,l as p,n as i,o as n,r,s as c,t as g,u}from"./dist-B0VqT_4z.js";export{g as autoCloseTags,i as completionPath,r as esLint,o as javascript,a as javascriptLanguage,n as jsxLanguage,c as localCompletionSource,s as scopeCompletionSource,p as snippets,u as tsxLanguage,t as typescriptLanguage,e as typescriptSnippets};
import{D as Pt,H as W,J as S,N as Vt,at as wt,h as Tt,n as X,nt as vt,q as Xt,r as yt,s as kt,t as $t,u as qt,zt as _t}from"./dist-DBwNzi3C.js";import{r as D,t as Qt}from"./dist-BIKFl48f.js";import{a as $,d as At,i as Yt,o as Ct,u as Mt}from"./dist-B0VqT_4z.js";var Rt=54,Zt=1,Bt=55,Et=2,zt=56,Wt=3,G=4,Dt=5,y=6,I=7,j=8,U=9,N=10,Gt=11,It=12,jt=13,q=57,Ut=14,F=58,H=20,Nt=22,K=23,Ft=24,_=26,J=27,Ht=28,Kt=31,Jt=34,Lt=36,te=37,ee=0,ae=1,le={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},re={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},L={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function ne(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function tt(t){return t==9||t==10||t==13||t==32}var et=null,at=null,lt=0;function Q(t,a){let r=t.pos+a;if(lt==r&&at==t)return et;let l=t.peek(a);for(;tt(l);)l=t.peek(++a);let e="";for(;ne(l);)e+=String.fromCharCode(l),l=t.peek(++a);return at=t,lt=r,et=e?e.toLowerCase():l==se||l==oe?void 0:null}var rt=60,k=62,A=47,se=63,oe=33,Oe=45;function nt(t,a){this.name=t,this.parent=a}var ie=[y,N,I,j,U],ue=new $t({start:null,shift(t,a,r,l){return ie.indexOf(a)>-1?new nt(Q(l,1)||"",t):t},reduce(t,a){return a==H&&t?t.parent:t},reuse(t,a,r,l){let e=a.type.id;return e==y||e==Lt?new nt(Q(l,1)||"",t):t},strict:!1}),pe=new X((t,a)=>{if(t.next!=rt){t.next<0&&a.context&&t.acceptToken(q);return}t.advance();let r=t.next==A;r&&t.advance();let l=Q(t,0);if(l===void 0)return;if(!l)return t.acceptToken(r?Ut:y);let e=a.context?a.context.name:null;if(r){if(l==e)return t.acceptToken(Gt);if(e&&re[e])return t.acceptToken(q,-2);if(a.dialectEnabled(ee))return t.acceptToken(It);for(let s=a.context;s;s=s.parent)if(s.name==l)return;t.acceptToken(jt)}else{if(l=="script")return t.acceptToken(I);if(l=="style")return t.acceptToken(j);if(l=="textarea")return t.acceptToken(U);if(le.hasOwnProperty(l))return t.acceptToken(N);e&&L[e]&&L[e][l]?t.acceptToken(q,-1):t.acceptToken(y)}},{contextual:!0}),ce=new X(t=>{for(let a=0,r=0;;r++){if(t.next<0){r&&t.acceptToken(F);break}if(t.next==Oe)a++;else if(t.next==k&&a>=2){r>=3&&t.acceptToken(F,-2);break}else a=0;t.advance()}});function de(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}var me=new X((t,a)=>{if(t.next==A&&t.peek(1)==k){let r=a.dialectEnabled(ae)||de(a.context);t.acceptToken(r?Dt:G,2)}else t.next==k&&t.acceptToken(G,1)});function Y(t,a,r){let l=2+t.length;return new X(e=>{for(let s=0,o=0,O=0;;O++){if(e.next<0){O&&e.acceptToken(a);break}if(s==0&&e.next==rt||s==1&&e.next==A||s>=2&&s<l&&e.next==t.charCodeAt(s-2))s++,o++;else if((s==2||s==l)&&tt(e.next))o++;else if(s==l&&e.next==k){O>o?e.acceptToken(a,-o):e.acceptToken(r,-(o-2));break}else if((e.next==10||e.next==13)&&O){e.acceptToken(a,1);break}else s=o=0;e.advance()}})}var fe=Y("script",Rt,Zt),Se=Y("style",Bt,Et),he=Y("textarea",zt,Wt),ge=Xt({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),xe=yt.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ue,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[ge],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebhSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXhSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vchS`P!a`!cpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WihSkWc!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QchSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[fe,Se,he,me,pe,ce,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:509},tokenPrec:511});function st(t,a){let r=Object.create(null);for(let l of t.getChildren(K)){let e=l.getChild(Ft),s=l.getChild(_)||l.getChild(J);e&&(r[a.read(e.from,e.to)]=s?s.type.id==_?a.read(s.from+1,s.to-1):a.read(s.from,s.to):"")}return r}function ot(t,a){let r=t.getChild(Nt);return r?a.read(r.from,r.to):" "}function C(t,a,r){let l;for(let e of r)if(!e.attrs||e.attrs(l||(l=st(t.node.parent.firstChild,a))))return{parser:e.parser};return null}function Ot(t=[],a=[]){let r=[],l=[],e=[],s=[];for(let O of t)(O.tag=="script"?r:O.tag=="style"?l:O.tag=="textarea"?e:s).push(O);let o=a.length?Object.create(null):null;for(let O of a)(o[O.name]||(o[O.name]=[])).push(O);return vt((O,i)=>{let h=O.type.id;if(h==Ht)return C(O,i,r);if(h==Kt)return C(O,i,l);if(h==Jt)return C(O,i,e);if(h==H&&s.length){let u=O.node,p=u.firstChild,c=p&&ot(p,i),f;if(c){for(let d of s)if(d.tag==c&&(!d.attrs||d.attrs(f||(f=st(p,i))))){let x=u.lastChild,g=x.type.id==te?x.from:u.to;if(g>p.to)return{parser:d.parser,overlay:[{from:p.to,to:g}]}}}}if(o&&h==K){let u=O.node,p;if(p=u.firstChild){let c=o[i.read(p.from,p.to)];if(c)for(let f of c){if(f.tagName&&f.tagName!=ot(u.parent,i))continue;let d=u.lastChild;if(d.type.id==_){let x=d.from+1,g=d.lastChild,v=d.to-(g&&g.isError?0:1);if(v>x)return{parser:f.parser,overlay:[{from:x,to:v}]}}else if(d.type.id==J)return{parser:f.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}var V=["_blank","_self","_top","_parent"],M=["ascii","utf-8","utf-16","latin1","latin1"],R=["get","post","put","delete"],Z=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],m=["true","false"],n={},be={a:{attrs:{href:null,ping:null,type:null,media:null,target:V,hreflang:null}},abbr:n,address:n,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:n,aside:n,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:n,base:{attrs:{href:null,target:V}},bdi:n,bdo:n,blockquote:{attrs:{cite:null}},body:n,br:n,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Z,formmethod:R,formnovalidate:["novalidate"],formtarget:V,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:n,center:n,cite:n,code:n,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:n,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:n,div:n,dl:n,dt:n,em:n,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:n,figure:n,footer:n,form:{attrs:{action:null,name:null,"accept-charset":M,autocomplete:["on","off"],enctype:Z,method:R,novalidate:["novalidate"],target:V}},h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:n,hgroup:n,hr:n,html:{attrs:{manifest:null}},i:n,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Z,formmethod:R,formnovalidate:["novalidate"],formtarget:V,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:n,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:n,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:n,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:M,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:n,noscript:n,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:n,param:{attrs:{name:null,value:null}},pre:n,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:n,rt:n,ruby:n,samp:n,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:M}},section:n,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:n,source:{attrs:{src:null,type:null,media:null}},span:n,strong:n,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:n,summary:n,sup:n,table:n,tbody:n,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:n,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:n,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:n,time:{attrs:{datetime:null}},title:n,tr:n,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:n,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:n},it={accesskey:null,class:null,contenteditable:m,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:m,autocorrect:m,autocapitalize:m,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":m,"aria-autocomplete":["inline","list","both","none"],"aria-busy":m,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":m,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":m,"aria-hidden":m,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":m,"aria-multiselectable":m,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":m,"aria-relevant":null,"aria-required":m,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},ut="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of ut)it[t]=null;var w=class{constructor(t,a){this.tags=Object.assign(Object.assign({},be),t),this.globalAttrs=Object.assign(Object.assign({},it),a),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};w.default=new w;function b(t,a,r=t.length){if(!a)return"";let l=a.firstChild,e=l&&l.getChild("TagName");return e?t.sliceString(e.from,Math.min(e.to,r)):""}function P(t,a=!1){for(;t;t=t.parent)if(t.name=="Element")if(a)a=!1;else return t;return null}function pt(t,a,r){var l;return((l=r.tags[b(t,P(a))])==null?void 0:l.children)||r.allTags}function B(t,a){let r=[];for(let l=P(a);l&&!l.type.isTop;l=P(l.parent)){let e=b(t,l);if(e&&l.lastChild.name=="CloseTag")break;e&&r.indexOf(e)<0&&(a.name=="EndTag"||a.from>=l.firstChild.to)&&r.push(e)}return r}var ct=/^[:\-\.\w\u00b7-\uffff]*$/;function dt(t,a,r,l,e){let s=/\s*>/.test(t.sliceDoc(e,e+5))?"":">",o=P(r,!0);return{from:l,to:e,options:pt(t.doc,o,a).map(O=>({label:O,type:"type"})).concat(B(t.doc,r).map((O,i)=>({label:"/"+O,apply:"/"+O+s,type:"type",boost:99-i}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function mt(t,a,r,l){let e=/\s*>/.test(t.sliceDoc(l,l+5))?"":">";return{from:r,to:l,options:B(t.doc,a).map((s,o)=>({label:s,apply:s+e,type:"type",boost:99-o})),validFor:ct}}function Pe(t,a,r,l){let e=[],s=0;for(let o of pt(t.doc,r,a))e.push({label:"<"+o,type:"type"});for(let o of B(t.doc,r))e.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:l,to:l,options:e,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Ve(t,a,r,l,e){let s=P(r),o=s?a.tags[b(t.doc,s)]:null,O=o&&o.attrs?Object.keys(o.attrs):[];return{from:l,to:e,options:(o&&o.globalAttrs===!1?O:O.length?O.concat(a.globalAttrNames):a.globalAttrNames).map(i=>({label:i,type:"property"})),validFor:ct}}function we(t,a,r,l,e){var i;let s=(i=r.parent)==null?void 0:i.getChild("AttributeName"),o=[],O;if(s){let h=t.sliceDoc(s.from,s.to),u=a.globalAttrs[h];if(!u){let p=P(r),c=p?a.tags[b(t.doc,p)]:null;u=(c==null?void 0:c.attrs)&&c.attrs[h]}if(u){let p=t.sliceDoc(l,e).toLowerCase(),c='"',f='"';/^['"]/.test(p)?(O=p[0]=='"'?/^[^"]*$/:/^[^']*$/,c="",f=t.sliceDoc(e,e+1)==p[0]?"":p[0],p=p.slice(1),l++):O=/^[^\s<>='"]*$/;for(let d of u)o.push({label:d,apply:c+d+f,type:"constant"})}}return{from:l,to:e,options:o,validFor:O}}function ft(t,a){let{state:r,pos:l}=a,e=W(r).resolveInner(l,-1),s=e.resolve(l);for(let o=l,O;s==e&&(O=e.childBefore(o));){let i=O.lastChild;if(!i||!i.type.isError||i.from<i.to)break;s=e=O,o=i.from}return e.name=="TagName"?e.parent&&/CloseTag$/.test(e.parent.name)?mt(r,e,e.from,l):dt(r,t,e,e.from,l):e.name=="StartTag"?dt(r,t,e,l,l):e.name=="StartCloseTag"||e.name=="IncompleteCloseTag"?mt(r,e,l,l):e.name=="OpenTag"||e.name=="SelfClosingTag"||e.name=="AttributeName"?Ve(r,t,e,e.name=="AttributeName"?e.from:l,l):e.name=="Is"||e.name=="AttributeValue"||e.name=="UnquotedAttributeValue"?we(r,t,e,e.name=="Is"?l:e.from,l):a.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Pe(r,t,e,l):null}function Te(t){return ft(w.default,t)}function St(t){let{extraTags:a,extraGlobalAttributes:r}=t,l=r||a?new w(a,r):w.default;return e=>ft(l,e)}var ve=$.parser.configure({top:"SingleExpression"}),ht=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:At.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:Ct.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:Mt.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:ve},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:$.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:D.parser}],gt=[{name:"style",parser:D.parser.configure({top:"Styles"})}].concat(ut.map(t=>({name:t,parser:$.parser}))),E=kt.define({name:"html",parser:xe.configure({props:[Vt.add({Element(t){let a=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+a[0].length?t.continue():t.lineIndent(t.node.from)+(a[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let a=null,r;for(let l=t.node;;){let e=l.lastChild;if(!e||e.name!="Element"||e.to!=l.to)break;a=l=e}return a&&!((r=a.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?t.lineIndent(a.from)+t.unit:null}}),Pt.add({Element(t){let a=t.firstChild,r=t.lastChild;return!a||a.name!="OpenTag"?null:{from:a.to,to:r.name=="CloseTag"?r.from:t.to}}}),Tt.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),T=E.configure({wrap:Ot(ht,gt)});function Xe(t={}){let a="",r;return t.matchClosingTags===!1&&(a="noMatch"),t.selfClosingTags===!0&&(a=(a?a+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(r=Ot((t.nestedLanguages||[]).concat(ht),(t.nestedAttributes||[]).concat(gt))),new qt(r?E.configure({wrap:r,dialect:a}):a?T.configure({dialect:a}):T,[T.data.of({autocomplete:St(t)}),t.autoCloseTags===!1?[]:bt,Yt().support,Qt().support])}var xt=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),bt=wt.inputHandler.of((t,a,r,l,e)=>{if(t.composing||t.state.readOnly||a!=r||l!=">"&&l!="/"||!T.isActiveAt(t.state,a,-1))return!1;let s=e(),{state:o}=s,O=o.changeByRange(i=>{var f,d,x;let h=o.doc.sliceString(i.from-1,i.to)==l,{head:u}=i,p=W(o).resolveInner(u,-1),c;if(h&&l==">"&&p.name=="EndTag"){let g=p.parent;if(((d=(f=g.parent)==null?void 0:f.lastChild)==null?void 0:d.name)!="CloseTag"&&(c=b(o.doc,g.parent,u))&&!xt.has(c))return{range:i,changes:{from:u,to:u+(o.doc.sliceString(u,u+1)===">"?1:0),insert:`</${c}>`}}}else if(h&&l=="/"&&p.name=="IncompleteCloseTag"){let g=p.parent;if(p.from==u-2&&((x=g.lastChild)==null?void 0:x.name)!="CloseTag"&&(c=b(o.doc,g,u))&&!xt.has(c)){let v=u+(o.doc.sliceString(u,u+1)===">"?1:0),z=`${c}>`;return{range:_t.cursor(u+z.length,-1),changes:{from:u,to:v,insert:z}}}}return{range:i}});return O.changes.empty?!1:(t.dispatch([s,o.update(O,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{T as a,St as i,Xe as n,E as o,Te as r,bt as t};
import{s as wt}from"./chunk-LvLJmgfZ.js";import{t as De}from"./react-BGmjiNul.js";import{t as ke}from"./react-dom-C9fstfnp.js";import{r as $t}from"./useEventListener-DIUKKfEy.js";import{t as He}from"./jsx-runtime-ZmTK25f3.js";import{C as xt,E as je,_ as st,g as Fe}from"./Combination-CMPwuAmi.js";var R=wt(De(),1);function Nt(t){let[e,r]=R.useState(void 0);return xt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});let n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;let o=i[0],l,a;if("borderBoxSize"in o){let s=o.borderBoxSize,u=Array.isArray(s)?s[0]:s;l=u.inlineSize,a=u.blockSize}else l=t.offsetWidth,a=t.offsetHeight;r({width:l,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var We=["top","right","bottom","left"],J=Math.min,_=Math.max,ft=Math.round,ct=Math.floor,N=t=>({x:t,y:t}),_e={left:"right",right:"left",bottom:"top",top:"bottom"},Be={start:"end",end:"start"};function vt(t,e,r){return _(t,J(e,r))}function q(t,e){return typeof t=="function"?t(e):t}function G(t){return t.split("-")[0]}function U(t){return t.split("-")[1]}function bt(t){return t==="x"?"y":"x"}function At(t){return t==="y"?"height":"width"}var Me=new Set(["top","bottom"]);function V(t){return Me.has(G(t))?"y":"x"}function Rt(t){return bt(V(t))}function ze(t,e,r){r===void 0&&(r=!1);let n=U(t),i=Rt(t),o=At(i),l=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(l=ut(l)),[l,ut(l)]}function $e(t){let e=ut(t);return[St(t),e,St(e)]}function St(t){return t.replace(/start|end/g,e=>Be[e])}var Vt=["left","right"],It=["right","left"],Ne=["top","bottom"],Ve=["bottom","top"];function Ie(t,e,r){switch(t){case"top":case"bottom":return r?e?It:Vt:e?Vt:It;case"left":case"right":return e?Ne:Ve;default:return[]}}function Ye(t,e,r,n){let i=U(t),o=Ie(G(t),r==="start",n);return i&&(o=o.map(l=>l+"-"+i),e&&(o=o.concat(o.map(St)))),o}function ut(t){return t.replace(/left|right|bottom|top/g,e=>_e[e])}function Xe(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yt(t){return typeof t=="number"?{top:t,right:t,bottom:t,left:t}:Xe(t)}function dt(t){let{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function Xt(t,e,r){let{reference:n,floating:i}=t,o=V(e),l=Rt(e),a=At(l),s=G(e),u=o==="y",f=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2,c;switch(s){case"top":c={x:f,y:n.y-i.height};break;case"bottom":c={x:f,y:n.y+n.height};break;case"right":c={x:n.x+n.width,y:d};break;case"left":c={x:n.x-i.width,y:d};break;default:c={x:n.x,y:n.y}}switch(U(e)){case"start":c[l]-=h*(r&&u?-1:1);break;case"end":c[l]+=h*(r&&u?-1:1);break}return c}var qe=async(t,e,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:l}=r,a=o.filter(Boolean),s=await(l.isRTL==null?void 0:l.isRTL(e)),u=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:d}=Xt(u,n,s),h=n,c={},p=0;for(let m=0;m<a.length;m++){let{name:y,fn:g}=a[m],{x:w,y:x,data:v,reset:b}=await g({x:f,y:d,initialPlacement:n,placement:h,strategy:i,middlewareData:c,rects:u,platform:l,elements:{reference:t,floating:e}});f=w??f,d=x??d,c={...c,[y]:{...c[y],...v}},b&&p<=50&&(p++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(u=b.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:f,y:d}=Xt(u,h,s)),m=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:c}};async function rt(t,e){e===void 0&&(e={});let{x:r,y:n,platform:i,rects:o,elements:l,strategy:a}=t,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=q(e,t),c=Yt(h),p=l[d?f==="floating"?"reference":"floating":f],m=dt(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(p))??!0?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:u,strategy:a})),y=f==="floating"?{x:r,y:n,width:o.floating.width,height:o.floating.height}:o.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),w=await(i.isElement==null?void 0:i.isElement(g))&&await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1},x=dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:g,strategy:a}):y);return{top:(m.top-x.top+c.top)/w.y,bottom:(x.bottom-m.bottom+c.bottom)/w.y,left:(m.left-x.left+c.left)/w.x,right:(x.right-m.right+c.right)/w.x}}var Ge=t=>({name:"arrow",options:t,async fn(e){let{x:r,y:n,placement:i,rects:o,platform:l,elements:a,middlewareData:s}=e,{element:u,padding:f=0}=q(t,e)||{};if(u==null)return{};let d=Yt(f),h={x:r,y:n},c=Rt(i),p=At(c),m=await l.getDimensions(u),y=c==="y",g=y?"top":"left",w=y?"bottom":"right",x=y?"clientHeight":"clientWidth",v=o.reference[p]+o.reference[c]-h[c]-o.floating[p],b=h[c]-o.reference[c],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u)),P=S?S[x]:0;(!P||!await(l.isElement==null?void 0:l.isElement(S)))&&(P=a.floating[x]||o.floating[p]);let O=v/2-b/2,D=P/2-m[p]/2-1,F=J(d[g],D),H=J(d[w],D),j=F,E=P-m[p]-H,T=P/2-m[p]/2+O,W=vt(j,T,E),L=!s.arrow&&U(i)!=null&&T!==W&&o.reference[p]/2-(T<j?F:H)-m[p]/2<0,C=L?T<j?T-j:T-E:0;return{[c]:h[c]+C,data:{[c]:W,centerOffset:T-W-C,...L&&{alignmentOffset:C}},reset:L}}}),Je=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var F,H,j,E;var r;let{placement:n,middlewareData:i,rects:o,initialPlacement:l,platform:a,elements:s}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:c="none",flipAlignment:p=!0,...m}=q(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let y=G(n),g=V(l),w=G(l)===l,x=await(a.isRTL==null?void 0:a.isRTL(s.floating)),v=d||(w||!p?[ut(l)]:$e(l)),b=c!=="none";!d&&b&&v.push(...Ye(l,p,c,x));let S=[l,...v],P=await rt(e,m),O=[],D=((F=i.flip)==null?void 0:F.overflows)||[];if(u&&O.push(P[y]),f){let T=ze(n,o,x);O.push(P[T[0]],P[T[1]])}if(D=[...D,{placement:n,overflows:O}],!O.every(T=>T<=0)){let T=(((H=i.flip)==null?void 0:H.index)||0)+1,W=S[T];if(W&&(!(f==="alignment"&&g!==V(W))||D.every(C=>C.overflows[0]>0&&V(C.placement)===g)))return{data:{index:T,overflows:D},reset:{placement:W}};let L=(j=D.filter(C=>C.overflows[0]<=0).sort((C,A)=>C.overflows[1]-A.overflows[1])[0])==null?void 0:j.placement;if(!L)switch(h){case"bestFit":{let C=(E=D.filter(A=>{if(b){let k=V(A.placement);return k===g||k==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(k=>k>0).reduce((k,$)=>k+$,0)]).sort((A,k)=>A[1]-k[1])[0])==null?void 0:E[0];C&&(L=C);break}case"initialPlacement":L=l;break}if(n!==L)return{reset:{placement:L}}}return{}}}};function qt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Gt(t){return We.some(e=>t[e]>=0)}var Ke=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:r}=e,{strategy:n="referenceHidden",...i}=q(t,e);switch(n){case"referenceHidden":{let o=qt(await rt(e,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Gt(o)}}}case"escaped":{let o=qt(await rt(e,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Gt(o)}}}default:return{}}}}},Jt=new Set(["left","top"]);async function Qe(t,e){let{placement:r,platform:n,elements:i}=t,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),l=G(r),a=U(r),s=V(r)==="y",u=Jt.has(l)?-1:1,f=o&&s?-1:1,d=q(e,t),{mainAxis:h,crossAxis:c,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(c=a==="end"?p*-1:p),s?{x:c*f,y:h*u}:{x:h*u,y:c*f}}var Ue=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var s;var r;let{x:n,y:i,placement:o,middlewareData:l}=e,a=await Qe(e,t);return o===((s=l.offset)==null?void 0:s.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+a.x,y:i+a.y,data:{...a,placement:o}}}}},Ze=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:i}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:a={fn:y=>{let{x:g,y:w}=y;return{x:g,y:w}}},...s}=q(t,e),u={x:r,y:n},f=await rt(e,s),d=V(G(i)),h=bt(d),c=u[h],p=u[d];if(o){let y=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=c+f[y],x=c-f[g];c=vt(w,c,x)}if(l){let y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=p+f[y],x=p-f[g];p=vt(w,p,x)}let m=a.fn({...e,[h]:c,[d]:p});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:o,[d]:l}}}}}},tn=function(t){return t===void 0&&(t={}),{options:t,fn(e){var g,w;let{x:r,y:n,placement:i,rects:o,middlewareData:l}=e,{offset:a=0,mainAxis:s=!0,crossAxis:u=!0}=q(t,e),f={x:r,y:n},d=V(i),h=bt(d),c=f[h],p=f[d],m=q(a,e),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){let x=h==="y"?"height":"width",v=o.reference[h]-o.floating[x]+y.mainAxis,b=o.reference[h]+o.reference[x]-y.mainAxis;c<v?c=v:c>b&&(c=b)}if(u){let x=h==="y"?"width":"height",v=Jt.has(G(i)),b=o.reference[d]-o.floating[x]+(v&&((g=l.offset)==null?void 0:g[d])||0)+(v?0:y.crossAxis),S=o.reference[d]+o.reference[x]+(v?0:((w=l.offset)==null?void 0:w[d])||0)-(v?y.crossAxis:0);p<b?p=b:p>S&&(p=S)}return{[h]:c,[d]:p}}}},en=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;let{placement:i,rects:o,platform:l,elements:a}=e,{apply:s=()=>{},...u}=q(t,e),f=await rt(e,u),d=G(i),h=U(i),c=V(i)==="y",{width:p,height:m}=o.floating,y,g;d==="top"||d==="bottom"?(y=d,g=h===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,y=h==="end"?"top":"bottom");let w=m-f.top-f.bottom,x=p-f.left-f.right,v=J(m-f[y],w),b=J(p-f[g],x),S=!e.middlewareData.shift,P=v,O=b;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(O=x),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(P=w),S&&!h){let F=_(f.left,0),H=_(f.right,0),j=_(f.top,0),E=_(f.bottom,0);c?O=p-2*(F!==0||H!==0?F+H:_(f.left,f.right)):P=m-2*(j!==0||E!==0?j+E:_(f.top,f.bottom))}await s({...e,availableWidth:O,availableHeight:P});let D=await l.getDimensions(a.floating);return p!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function Z(t){return Kt(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function I(t){var e;return(e=(Kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kt(t){return pt()?t instanceof Node||t instanceof B(t).Node:!1}function M(t){return pt()?t instanceof Element||t instanceof B(t).Element:!1}function Y(t){return pt()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Qt(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}var nn=new Set(["inline","contents"]);function it(t){let{overflow:e,overflowX:r,overflowY:n,display:i}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!nn.has(i)}var rn=new Set(["table","td","th"]);function on(t){return rn.has(Z(t))}var ln=[":popover-open",":modal"];function ht(t){return ln.some(e=>{try{return t.matches(e)}catch{return!1}})}var an=["transform","translate","scale","rotate","perspective"],sn=["transform","translate","scale","rotate","perspective","filter"],fn=["paint","layout","strict","content"];function Pt(t){let e=Tt(),r=M(t)?z(t):t;return an.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||sn.some(n=>(r.willChange||"").includes(n))||fn.some(n=>(r.contain||"").includes(n))}function cn(t){let e=K(t);for(;Y(e)&&!tt(e);){if(Pt(e))return e;if(ht(e))return null;e=K(e)}return null}function Tt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var un=new Set(["html","body","#document"]);function tt(t){return un.has(Z(t))}function z(t){return B(t).getComputedStyle(t)}function mt(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(Z(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Qt(t)&&t.host||I(t);return Qt(e)?e.host:e}function Ut(t){let e=K(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Y(e)&&it(e)?e:Ut(e)}function ot(t,e,r){var l;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=Ut(t),i=n===((l=t.ownerDocument)==null?void 0:l.body),o=B(n);if(i){let a=Ct(o);return e.concat(o,o.visualViewport||[],it(n)?n:[],a&&r?ot(a):[])}return e.concat(n,ot(n,[],r))}function Ct(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){let e=z(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Y(t),o=i?t.offsetWidth:r,l=i?t.offsetHeight:n,a=ft(r)!==o||ft(n)!==l;return a&&(r=o,n=l),{width:r,height:n,$:a}}function Et(t){return M(t)?t:t.contextElement}function et(t){let e=Et(t);if(!Y(e))return N(1);let r=e.getBoundingClientRect(),{width:n,height:i,$:o}=Zt(e),l=(o?ft(r.width):r.width)/n,a=(o?ft(r.height):r.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}var dn=N(0);function te(t){let e=B(t);return!Tt()||!e.visualViewport?dn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pn(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==B(t)?!1:e}function Q(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),o=Et(t),l=N(1);e&&(n?M(n)&&(l=et(n)):l=et(t));let a=pn(o,r,n)?te(o):N(0),s=(i.left+a.x)/l.x,u=(i.top+a.y)/l.y,f=i.width/l.x,d=i.height/l.y;if(o){let h=B(o),c=n&&M(n)?B(n):n,p=h,m=Ct(p);for(;m&&n&&c!==p;){let y=et(m),g=m.getBoundingClientRect(),w=z(m),x=g.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,v=g.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;s*=y.x,u*=y.y,f*=y.x,d*=y.y,s+=x,u+=v,p=B(m),m=Ct(p)}}return dt({width:f,height:d,x:s,y:u})}function Lt(t,e){let r=mt(t).scrollLeft;return e?e.left+r:Q(I(t)).left+r}function ee(t,e,r){r===void 0&&(r=!1);let n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-(r?0:Lt(t,n)),y:n.top+e.scrollTop}}function hn(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t,o=i==="fixed",l=I(n),a=e?ht(e.floating):!1;if(n===l||a&&o)return r;let s={scrollLeft:0,scrollTop:0},u=N(1),f=N(0),d=Y(n);if((d||!d&&!o)&&((Z(n)!=="body"||it(l))&&(s=mt(n)),Y(n))){let c=Q(n);u=et(n),f.x=c.x+n.clientLeft,f.y=c.y+n.clientTop}let h=l&&!d&&!o?ee(l,s,!0):N(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-s.scrollLeft*u.x+f.x+h.x,y:r.y*u.y-s.scrollTop*u.y+f.y+h.y}}function mn(t){return Array.from(t.getClientRects())}function gn(t){let e=I(t),r=mt(t),n=t.ownerDocument.body,i=_(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=_(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),l=-r.scrollLeft+Lt(t),a=-r.scrollTop;return z(n).direction==="rtl"&&(l+=_(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:l,y:a}}function yn(t,e){let r=B(t),n=I(t),i=r.visualViewport,o=n.clientWidth,l=n.clientHeight,a=0,s=0;if(i){o=i.width,l=i.height;let u=Tt();(!u||u&&e==="fixed")&&(a=i.offsetLeft,s=i.offsetTop)}return{width:o,height:l,x:a,y:s}}var wn=new Set(["absolute","fixed"]);function xn(t,e){let r=Q(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Y(t)?et(t):N(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:n*o.y}}function ne(t,e,r){let n;if(e==="viewport")n=yn(t,r);else if(e==="document")n=gn(I(t));else if(M(e))n=xn(e,r);else{let i=te(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return dt(n)}function re(t,e){let r=K(t);return r===e||!M(r)||tt(r)?!1:z(r).position==="fixed"||re(r,e)}function vn(t,e){let r=e.get(t);if(r)return r;let n=ot(t,[],!1).filter(a=>M(a)&&Z(a)!=="body"),i=null,o=z(t).position==="fixed",l=o?K(t):t;for(;M(l)&&!tt(l);){let a=z(l),s=Pt(l);!s&&a.position==="fixed"&&(i=null),(o?!s&&!i:!s&&a.position==="static"&&i&&wn.has(i.position)||it(l)&&!s&&re(t,l))?n=n.filter(u=>u!==l):i=a,l=K(l)}return e.set(t,n),n}function bn(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t,o=[...r==="clippingAncestors"?ht(e)?[]:vn(e,this._c):[].concat(r),n],l=o[0],a=o.reduce((s,u)=>{let f=ne(e,u,i);return s.top=_(f.top,s.top),s.right=J(f.right,s.right),s.bottom=J(f.bottom,s.bottom),s.left=_(f.left,s.left),s},ne(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function An(t){let{width:e,height:r}=Zt(t);return{width:e,height:r}}function Rn(t,e,r){let n=Y(e),i=I(e),o=r==="fixed",l=Q(t,!0,o,e),a={scrollLeft:0,scrollTop:0},s=N(0);function u(){s.x=Lt(i)}if(n||!n&&!o)if((Z(e)!=="body"||it(i))&&(a=mt(e)),n){let d=Q(e,!0,o,e);s.x=d.x+e.clientLeft,s.y=d.y+e.clientTop}else i&&u();o&&!n&&i&&u();let f=i&&!n&&!o?ee(i,a):N(0);return{x:l.left+a.scrollLeft-s.x-f.x,y:l.top+a.scrollTop-s.y-f.y,width:l.width,height:l.height}}function Ot(t){return z(t).position==="static"}function ie(t,e){if(!Y(t)||z(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return I(t)===r&&(r=r.ownerDocument.body),r}function oe(t,e){let r=B(t);if(ht(t))return r;if(!Y(t)){let i=K(t);for(;i&&!tt(i);){if(M(i)&&!Ot(i))return i;i=K(i)}return r}let n=ie(t,e);for(;n&&on(n)&&Ot(n);)n=ie(n,e);return n&&tt(n)&&Ot(n)&&!Pt(n)?r:n||cn(t)||r}var Sn=async function(t){let e=this.getOffsetParent||oe,r=this.getDimensions,n=await r(t.floating);return{reference:Rn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Pn(t){return z(t).direction==="rtl"}var Tn={convertOffsetParentRelativeRectToViewportRelativeRect:hn,getDocumentElement:I,getClippingRect:bn,getOffsetParent:oe,getElementRects:Sn,getClientRects:mn,getDimensions:An,getScale:et,isElement:M,isRTL:Pn};function le(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Cn(t,e){let r=null,n,i=I(t);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function l(a,s){a===void 0&&(a=!1),s===void 0&&(s=1),o();let u=t.getBoundingClientRect(),{left:f,top:d,width:h,height:c}=u;if(a||e(),!h||!c)return;let p=ct(d),m=ct(i.clientWidth-(f+h)),y=ct(i.clientHeight-(d+c)),g=ct(f),w={rootMargin:-p+"px "+-m+"px "+-y+"px "+-g+"px",threshold:_(0,J(1,s))||1},x=!0;function v(b){let S=b[0].intersectionRatio;if(S!==s){if(!x)return l();S?l(!1,S):n=setTimeout(()=>{l(!1,1e-7)},1e3)}S===1&&!le(u,t.getBoundingClientRect())&&l(),x=!1}try{r=new IntersectionObserver(v,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(v,w)}r.observe(t)}return l(!0),o}function En(t,e,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=n,u=Et(t),f=i||o?[...u?ot(u):[],...ot(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",r,{passive:!0}),o&&g.addEventListener("resize",r)});let d=u&&a?Cn(u,r):null,h=-1,c=null;l&&(c=new ResizeObserver(g=>{let[w]=g;w&&w.target===u&&c&&(c.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=c)==null||x.observe(e)})),r()}),u&&!s&&c.observe(u),c.observe(e));let p,m=s?Q(t):null;s&&y();function y(){let g=Q(t);m&&!le(m,g)&&r(),m=g,p=requestAnimationFrame(y)}return r(),()=>{var g;f.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),d==null||d(),(g=c)==null||g.disconnect(),c=null,s&&cancelAnimationFrame(p)}}var Ln=Ue,On=Ze,Dn=Je,kn=en,Hn=Ke,ae=Ge,jn=tn,Fn=(t,e,r)=>{let n=new Map,i={platform:Tn,...r},o={...i.platform,_c:n};return qe(t,e,{...i,platform:o})},Wn=wt(ke(),1),gt=typeof document<"u"?R.useLayoutEffect:function(){};function yt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!yt(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!(o==="_owner"&&t.$$typeof)&&!yt(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function se(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function fe(t,e){let r=se(t);return Math.round(e*r)/r}function Dt(t){let e=R.useRef(t);return gt(()=>{e.current=t}),e}function _n(t){t===void 0&&(t={});let{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:s,open:u}=t,[f,d]=R.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,c]=R.useState(n);yt(h,n)||c(n);let[p,m]=R.useState(null),[y,g]=R.useState(null),w=R.useCallback(A=>{A!==S.current&&(S.current=A,m(A))},[]),x=R.useCallback(A=>{A!==P.current&&(P.current=A,g(A))},[]),v=o||p,b=l||y,S=R.useRef(null),P=R.useRef(null),O=R.useRef(f),D=s!=null,F=Dt(s),H=Dt(i),j=Dt(u),E=R.useCallback(()=>{if(!S.current||!P.current)return;let A={placement:e,strategy:r,middleware:h};H.current&&(A.platform=H.current),Fn(S.current,P.current,A).then(k=>{let $={...k,isPositioned:j.current!==!1};T.current&&!yt(O.current,$)&&(O.current=$,Wn.flushSync(()=>{d($)}))})},[h,e,r,H,j]);gt(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);let T=R.useRef(!1);gt(()=>(T.current=!0,()=>{T.current=!1}),[]),gt(()=>{if(v&&(S.current=v),b&&(P.current=b),v&&b){if(F.current)return F.current(v,b,E);E()}},[v,b,E,F,D]);let W=R.useMemo(()=>({reference:S,floating:P,setReference:w,setFloating:x}),[w,x]),L=R.useMemo(()=>({reference:v,floating:b}),[v,b]),C=R.useMemo(()=>{let A={position:r,left:0,top:0};if(!L.floating)return A;let k=fe(L.floating,f.x),$=fe(L.floating,f.y);return a?{...A,transform:"translate("+k+"px, "+$+"px)",...se(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:$}},[r,a,L.floating,f.x,f.y]);return R.useMemo(()=>({...f,update:E,refs:W,elements:L,floatingStyles:C}),[f,E,W,L,C])}var Bn=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){let{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current==null?{}:ae({element:n.current,padding:i}).fn(r):n?ae({element:n,padding:i}).fn(r):{}}}},Mn=(t,e)=>({...Ln(t),options:[t,e]}),zn=(t,e)=>({...On(t),options:[t,e]}),$n=(t,e)=>({...jn(t),options:[t,e]}),Nn=(t,e)=>({...Dn(t),options:[t,e]}),Vn=(t,e)=>({...kn(t),options:[t,e]}),In=(t,e)=>({...Hn(t),options:[t,e]}),Yn=(t,e)=>({...Bn(t),options:[t,e]}),X=wt(He(),1),Xn="Arrow",ce=R.forwardRef((t,e)=>{let{children:r,width:n=10,height:i=5,...o}=t;return(0,X.jsx)(st.svg,{...o,ref:e,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:(0,X.jsx)("polygon",{points:"0,0 30,0 15,10"})})});ce.displayName=Xn;var qn=ce,kt="Popper",[ue,Gn]=je(kt),[Jn,de]=ue(kt),pe=t=>{let{__scopePopper:e,children:r}=t,[n,i]=R.useState(null);return(0,X.jsx)(Jn,{scope:e,anchor:n,onAnchorChange:i,children:r})};pe.displayName=kt;var he="PopperAnchor",me=R.forwardRef((t,e)=>{let{__scopePopper:r,virtualRef:n,...i}=t,o=de(he,r),l=R.useRef(null),a=$t(e,l),s=R.useRef(null);return R.useEffect(()=>{let u=s.current;s.current=(n==null?void 0:n.current)||l.current,u!==s.current&&o.onAnchorChange(s.current)}),n?null:(0,X.jsx)(st.div,{...i,ref:a})});me.displayName=he;var Ht="PopperContent",[Kn,Qn]=ue(Ht),ge=R.forwardRef((t,e)=>{var Ft,Wt,_t,Bt,Mt,zt;let{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:s=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:c="optimized",onPlaced:p,...m}=t,y=de(Ht,r),[g,w]=R.useState(null),x=$t(e,nt=>w(nt)),[v,b]=R.useState(null),S=Nt(v),P=(S==null?void 0:S.width)??0,O=(S==null?void 0:S.height)??0,D=n+(o==="center"?"":"-"+o),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(u)?u:[u],j=H.length>0,E={padding:F,boundary:H.filter(Zn),altBoundary:j},{refs:T,floatingStyles:W,placement:L,isPositioned:C,middlewareData:A}=_n({strategy:"fixed",placement:D,whileElementsMounted:(...nt)=>En(...nt,{animationFrame:c==="always"}),elements:{reference:y.anchor},middleware:[Mn({mainAxis:i+O,alignmentAxis:l}),s&&zn({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?$n():void 0,...E}),s&&Nn({...E}),Vn({...E,apply:({elements:nt,rects:Te,availableWidth:Ce,availableHeight:Ee})=>{let{width:Le,height:Oe}=Te.reference,at=nt.floating.style;at.setProperty("--radix-popper-available-width",`${Ce}px`),at.setProperty("--radix-popper-available-height",`${Ee}px`),at.setProperty("--radix-popper-anchor-width",`${Le}px`),at.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),v&&Yn({element:v,padding:a}),tr({arrowWidth:P,arrowHeight:O}),h&&In({strategy:"referenceHidden",...E})]}),[k,$]=xe(L),lt=Fe(p);xt(()=>{C&&(lt==null||lt())},[C,lt]);let be=(Ft=A.arrow)==null?void 0:Ft.x,Ae=(Wt=A.arrow)==null?void 0:Wt.y,Re=((_t=A.arrow)==null?void 0:_t.centerOffset)!==0,[Se,Pe]=R.useState();return xt(()=>{g&&Pe(window.getComputedStyle(g).zIndex)},[g]),(0,X.jsx)("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:C?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(Bt=A.transformOrigin)==null?void 0:Bt.x,(Mt=A.transformOrigin)==null?void 0:Mt.y].join(" "),...((zt=A.hide)==null?void 0:zt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,X.jsx)(Kn,{scope:r,placedSide:k,onArrowChange:b,arrowX:be,arrowY:Ae,shouldHideArrow:Re,children:(0,X.jsx)(st.div,{"data-side":k,"data-align":$,...m,ref:x,style:{...m.style,animation:C?void 0:"none"}})})})});ge.displayName=Ht;var ye="PopperArrow",Un={top:"bottom",right:"left",bottom:"top",left:"right"},we=R.forwardRef(function(t,e){let{__scopePopper:r,...n}=t,i=Qn(ye,r),o=Un[i.placedSide];return(0,X.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,X.jsx)(qn,{...n,ref:e,style:{...n.style,display:"block"}})})});we.displayName=ye;function Zn(t){return t!==null}var tr=t=>({name:"transformOrigin",options:t,fn(e){var m,y,g;let{placement:r,rects:n,middlewareData:i}=e,o=((m=i.arrow)==null?void 0:m.centerOffset)!==0,l=o?0:t.arrowWidth,a=o?0:t.arrowHeight,[s,u]=xe(r),f={start:"0%",center:"50%",end:"100%"}[u],d=(((y=i.arrow)==null?void 0:y.x)??0)+l/2,h=(((g=i.arrow)==null?void 0:g.y)??0)+a/2,c="",p="";return s==="bottom"?(c=o?f:`${d}px`,p=`${-a}px`):s==="top"?(c=o?f:`${d}px`,p=`${n.floating.height+a}px`):s==="right"?(c=`${-a}px`,p=o?f:`${h}px`):s==="left"&&(c=`${n.floating.width+a}px`,p=o?f:`${h}px`),{data:{x:c,y:p}}}});function xe(t){let[e,r="center"]=t.split("-");return[e,r]}var er=pe,nr=me,rr=ge,ir=we,ve=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),or="VisuallyHidden",jt=R.forwardRef((t,e)=>(0,X.jsx)(st.span,{...t,ref:e,style:{...ve,...t.style}}));jt.displayName=or;var lr=jt;export{ir as a,Gn as c,nr as i,Nt as l,ve as n,rr as o,jt as r,er as s,lr as t};
import"./dist-DBwNzi3C.js";import{n as a,t}from"./dist-CS67iP1P.js";export{t as wast,a as wastLanguage};
import{t as o}from"./simple-mode-BVXe8Gj5.js";var e="from",l=RegExp("^(\\s*)\\b("+e+")\\b","i"),n=["run","cmd","entrypoint","shell"],s=RegExp("^(\\s*)("+n.join("|")+")(\\s+\\[)","i"),t="expose",x=RegExp("^(\\s*)("+t+")(\\s+)","i"),r="("+[e,t].concat(n,["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"]).join("|")+")",g=RegExp("^(\\s*)"+r+"(\\s*)(#.*)?$","i"),k=RegExp("^(\\s*)"+r+"(\\s+)","i");const a=o({start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:l,token:[null,"keyword"],sol:!0,next:"from"},{regex:g,token:[null,"keyword",null,"error"],sol:!0},{regex:s,token:[null,"keyword",null],sol:!0,next:"array"},{regex:x,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:k,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],languageData:{commentTokens:{line:"#"}}});export{a as dockerFile};
import{s as a}from"./chunk-LvLJmgfZ.js";import{u as p}from"./useEvent-DO6uJBas.js";import{t as s}from"./react-BGmjiNul.js";import{Pn as l,an as n}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as c}from"./compiler-runtime-DeeZ7FnK.js";import"./config-CIrPQIbt.js";import{t as f}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import"./Combination-CMPwuAmi.js";import{t as u}from"./RenderHTML-CQZqVk1Z.js";import"./purify.es-DNVQZNFu.js";import{t as d}from"./empty-state-h8C2C6hZ.js";var x=c();s();var e=a(f(),1),v=()=>{let o=(0,x.c)(5),{documentation:r}=p(n);if(!r){let i;return o[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,e.jsx)(d,{title:"View docs as you type",description:"Move your text cursor over a symbol to see its documentation.",icon:(0,e.jsx)(l,{})}),o[0]=i):i=o[0],i}let t;o[1]===r?t=o[2]:(t=u({html:r}),o[1]=r,o[2]=t);let m;return o[3]===t?m=o[4]:(m=(0,e.jsx)("div",{className:"p-3 overflow-y-auto overflow-x-hidden h-full docs-documentation flex flex-col gap-4",children:t}),o[3]=t,o[4]=m),m};export{v as default};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);export{t};
var le=Object.defineProperty;var se=(r,e,t)=>e in r?le(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var D=(r,e,t)=>se(r,typeof e!="symbol"?e+"":e,t);import{s as C,t as I}from"./chunk-LvLJmgfZ.js";import{t as G}from"./react-BGmjiNul.js";import{ii as ue,zt as ce}from"./cells-BpZ7g6ok.js";import{t as V}from"./compiler-runtime-DeeZ7FnK.js";import{d as q}from"./hotkeys-BHHWjLlp.js";import{t as de}from"./jsx-runtime-ZmTK25f3.js";import{t as B}from"./cn-BKtXLv3a.js";import{t as fe}from"./requests-BsVD4CdD.js";import{t as me}from"./createLucideIcon-CnW3RofX.js";import{t as j}from"./use-toast-rmUWldD_.js";import{d as pe}from"./popover-Gz-GJzym.js";import{r as H}from"./errors-2SszdW9t.js";import{t as W}from"./dist-CdxIjAOP.js";import{t as z}from"./html-to-image-DjukyIj4.js";var ve=me("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),X=r=>{let e,t=new Set,a=(l,s)=>{let c=typeof l=="function"?l(e):l;if(!Object.is(c,e)){let d=e;e=s??(typeof c!="object"||!c)?c:Object.assign({},e,c),t.forEach(u=>u(e,d))}},n=()=>e,i={setState:a,getState:n,getInitialState:()=>o,subscribe:l=>(t.add(l),()=>t.delete(l)),destroy:()=>{t.clear()}},o=e=r(a,n,i);return i},he=r=>r?X(r):X,ge=I((r=>{var e=G(),t=pe();function a(d,u){return d===u&&(d!==0||1/d==1/u)||d!==d&&u!==u}var n=typeof Object.is=="function"?Object.is:a,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,s=e.useMemo,c=e.useDebugValue;r.useSyncExternalStoreWithSelector=function(d,u,f,g,m){var p=o(null);if(p.current===null){var x={hasValue:!1,value:null};p.current=x}else x=p.current;p=s(function(){function M(y){if(!T){if(T=!0,S=y,y=g(y),m!==void 0&&x.hasValue){var N=x.value;if(m(N,y))return $=N}return $=y}if(N=$,n(S,y))return N;var A=g(y);return m!==void 0&&m(N,A)?(S=y,N):(S=y,$=A)}var T=!1,S,$,U=f===void 0?null:f;return[function(){return M(u())},U===null?void 0:function(){return M(U())}]},[u,f,g,m]);var b=i(d,p[0],p[1]);return l(function(){x.hasValue=!0,x.value=b},[b]),c(b),b}})),ye=I(((r,e)=>{e.exports=ge()}));const h={toMarkdown:r=>h.replace(r,"md"),toHTML:r=>h.replace(r,"html"),toPNG:r=>h.replace(r,"png"),toPDF:r=>h.replace(r,"pdf"),toPY:r=>h.replace(r,"py"),withoutExtension:r=>{let e=r.split(".");return e.length===1?r:e.slice(0,-1).join(".")},replace:(r,e)=>r.endsWith(`.${e}`)?r:`${h.withoutExtension(r)}.${e}`};var P=320,L=180;function Y(r){if(!r||r==="about:blank")return null;try{let e=new URL(r,window.location.href);return e.origin===window.location.origin?null:e.href}catch{return r}}function we(r,e,t){let a=[],n="";for(let i of e){let o=n+i;r.measureText(o).width<=t?n=o:(n&&a.push(n),n=i)}return n&&a.push(n),a}function k(r){let e=window.devicePixelRatio||1,t=document.createElement("canvas");t.width=P*e,t.height=L*e;let a=t.getContext("2d");if(!a)return t.toDataURL("image/png");a.scale(e,e),a.fillStyle="#f3f4f6",a.fillRect(0,0,P,L),a.strokeStyle="#d1d5db",a.strokeRect(.5,.5,P-1,L-1),a.fillStyle="#6b7280",a.font="8px sans-serif",a.textAlign="center",a.textBaseline="middle";let n=P-32,i=r?we(a,r,n):[],o=(L-(1+i.length)*14)/2+14/2;a.fillText("External iframe",P/2,o),o+=14;for(let l of i)a.fillText(l,P/2,o),o+=14;return t.toDataURL("image/png")}async function xe(r){var n;let e=r.querySelector("iframe");if(!e)return null;let t=Y(e.getAttribute("src"));if(t)return k(t);let a;try{let i=e.contentDocument||((n=e.contentWindow)==null?void 0:n.document);if(!(i!=null&&i.body))return null;a=i}catch{return k(null)}for(let i of a.querySelectorAll("iframe")){let o=Y(i.getAttribute("src"));if(o)return k(o)}return null}var J=class ie{constructor(e){D(this,"progress",0);D(this,"listeners",new Set);this.total=e}static indeterminate(){return new ie("indeterminate")}addTotal(e){this.total==="indeterminate"?this.total=e:this.total+=e,this.notifyListeners()}increment(e){this.progress+=e,this.notifyListeners()}getProgress(){return this.total==="indeterminate"?"indeterminate":this.progress/this.total*100}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notifyListeners(){let e=this.getProgress();for(let t of this.listeners)t(e)}},v=C(G(),1),w=C(de(),1);function be(r,e=[]){let t=[];function a(i,o){let l=v.createContext(o);l.displayName=i+"Context";let s=t.length;t=[...t,o];let c=u=>{var b;let{scope:f,children:g,...m}=u,p=((b=f==null?void 0:f[r])==null?void 0:b[s])||l,x=v.useMemo(()=>m,Object.values(m));return(0,w.jsx)(p.Provider,{value:x,children:g})};c.displayName=i+"Provider";function d(u,f){var p;let g=((p=f==null?void 0:f[r])==null?void 0:p[s])||l,m=v.useContext(g);if(m)return m;if(o!==void 0)return o;throw Error(`\`${u}\` must be used within \`${i}\``)}return[c,d]}let n=()=>{let i=t.map(o=>v.createContext(o));return function(o){let l=(o==null?void 0:o[r])||i;return v.useMemo(()=>({[`__scope${r}`]:{...o,[r]:l}}),[o,l])}};return n.scopeName=r,[a,Ne(n,...e)]}function Ne(...r){let e=r[0];if(r.length===1)return e;let t=()=>{let a=r.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(n){let i=a.reduce((o,{useScope:l,scopeName:s})=>{let c=l(n)[`__scope${s}`];return{...o,...c}},{});return v.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return t.scopeName=e.scopeName,t}var O="Progress",_=100,[Pe,rt]=be(O),[Se,$e]=Pe(O),K=v.forwardRef((r,e)=>{let{__scopeProgress:t,value:a=null,max:n,getValueLabel:i=je,...o}=r;(n||n===0)&&!te(n)&&console.error(Le(`${n}`,"Progress"));let l=te(n)?n:_;a!==null&&!re(a,l)&&console.error(Ee(`${a}`,"Progress"));let s=re(a,l)?a:null,c=E(s)?i(s,l):void 0;return(0,w.jsx)(Se,{scope:t,value:s,max:l,children:(0,w.jsx)(W.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":E(s)?s:void 0,"aria-valuetext":c,role:"progressbar","data-state":ee(s,l),"data-value":s??void 0,"data-max":l,...o,ref:e})})});K.displayName=O;var Q="ProgressIndicator",Z=v.forwardRef((r,e)=>{let{__scopeProgress:t,...a}=r,n=$e(Q,t);return(0,w.jsx)(W.div,{"data-state":ee(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...a,ref:e})});Z.displayName=Q;function je(r,e){return`${Math.round(r/e*100)}%`}function ee(r,e){return r==null?"indeterminate":r===e?"complete":"loading"}function E(r){return typeof r=="number"}function te(r){return E(r)&&!isNaN(r)&&r>0}function re(r,e){return E(r)&&!isNaN(r)&&r<=e&&r>=0}function Le(r,e){return`Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${_}\`.`}function Ee(r,e){return`Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${_} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var ne=K,Re=Z,De=V(),F=v.forwardRef((r,e)=>{let t=(0,De.c)(20),a,n,i,o;t[0]===r?(a=t[1],n=t[2],i=t[3],o=t[4]):({className:a,value:o,indeterminate:n,...i}=r,t[0]=r,t[1]=a,t[2]=n,t[3]=i,t[4]=o);let l;t[5]===a?l=t[6]:(l=B("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",a),t[5]=a,t[6]=l);let s=n?"w-1/3 animate-progress-indeterminate":"w-full transition-transform duration-300 ease-out",c;t[7]===s?c=t[8]:(c=B("h-full flex-1 bg-primary",s),t[7]=s,t[8]=c);let d;t[9]!==n||t[10]!==o?(d=n?void 0:{transform:`translateX(-${100-(o||0)}%)`},t[9]=n,t[10]=o,t[11]=d):d=t[11];let u;t[12]!==c||t[13]!==d?(u=(0,w.jsx)(Re,{className:c,style:d}),t[12]=c,t[13]=d,t[14]=u):u=t[14];let f;return t[15]!==i||t[16]!==e||t[17]!==l||t[18]!==u?(f=(0,w.jsx)(ne,{ref:e,className:l,...i,children:u}),t[15]=i,t[16]=e,t[17]=l,t[18]=u,t[19]=f):f=t[19],f});F.displayName=ne.displayName;var ke=V();const Oe=r=>{let e=(0,ke.c)(13),{progress:t,showPercentage:a}=r,n=a===void 0?!1:a,i,o;e[0]===t?(i=e[1],o=e[2]):(i=g=>t.subscribe(g),o=()=>t.getProgress(),e[0]=t,e[1]=i,e[2]=o);let l=(0,v.useSyncExternalStore)(i,o),s=l==="indeterminate"||l===100,c=s?void 0:l,d;e[3]!==s||e[4]!==c?(d=(0,w.jsx)(F,{value:c,indeterminate:s}),e[3]=s,e[4]=c,e[5]=d):d=e[5];let u;e[6]!==s||e[7]!==n||e[8]!==l?(u=!s&&n&&(0,w.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground text-right",children:[Math.round(l),"%"]}),e[6]=s,e[7]=n,e[8]=l,e[9]=u):u=e[9];let f;return e[10]!==d||e[11]!==u?(f=(0,w.jsxs)("div",{className:"mt-2 w-full min-w-[200px]",children:[d,u]}),e[10]=d,e[11]=u,e[12]=f):f=e[12],f};async function _e(r,e){let t=J.indeterminate(),a=j({title:r,description:v.createElement(Oe,{progress:t}),duration:1/0});try{let n=await e(t);return a.dismiss(),n}catch(n){throw a.dismiss(),n}}function Fe(r){let e=document.getElementById(ue.create(r));if(!e){q.error(`Output element not found for cell ${r}`);return}return e}var Me=500,Te=`
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }
`;async function ae(r){let e=Fe(r);if(!e)return;let t=await xe(e);if(t)return t;let a=Date.now(),n=await z(e,{extraStyleContent:Te,style:{maxHeight:"none",overflow:"visible"},height:e.scrollHeight}),i=Date.now()-a;return i>Me&&q.debug("toPng operation for element",e,`took ${i} ms (exceeds threshold)`),n}async function Ue(r,e){try{let t=await ae(r);if(!t)throw Error("Failed to get image data URL");R(t,h.toPNG(e))}catch(t){j({title:"Failed to download PNG",description:H(t),variant:"danger"})}}const Ae=()=>(document.body.classList.add("printing"),()=>{document.body.classList.remove("printing")});async function Ce(r){let{element:e,filename:t,prepare:a}=r,n=document.getElementById("App"),i=(n==null?void 0:n.scrollTop)??0,o;a&&(o=a(e));try{R(await z(e),h.toPNG(t))}catch{j({title:"Error",description:"Failed to download as PNG.",variant:"danger"})}finally{o==null||o(),document.body.classList.contains("printing")&&document.body.classList.remove("printing"),requestAnimationFrame(()=>{n==null||n.scrollTo(0,i)})}}function R(r,e){let t=document.createElement("a");t.href=r,t.download=e,t.click(),t.remove()}function oe(r,e){let t=URL.createObjectURL(r);R(t,e),URL.revokeObjectURL(t)}async function Ie(r){let e=fe(),{filename:t,webpdf:a}=r;try{let n=await e.exportAsPDF({webpdf:a}),i=ce.basename(t);oe(n,h.toPDF(i))}catch(n){throw j({title:"Failed to download",description:H(n),variant:"danger"}),n}}export{Ue as a,_e as c,h as d,ye as f,R as i,F as l,ve as m,Ie as n,Ce as o,he as p,oe as r,ae as s,Ae as t,J as u};
import{s as Ne}from"./chunk-LvLJmgfZ.js";import{t as wr}from"./react-BGmjiNul.js";import{t as gr}from"./compiler-runtime-DeeZ7FnK.js";import{n as Ie,r as G}from"./useEventListener-DIUKKfEy.js";import{t as xr}from"./jsx-runtime-ZmTK25f3.js";import{t as ke}from"./cn-BKtXLv3a.js";import{t as yr}from"./createLucideIcon-CnW3RofX.js";import{t as _r}from"./check-DdfN0k2d.js";import{t as br}from"./chevron-right-DwagBitu.js";import{E as ue,S as ce,_ as S,a as Mr,c as Se,d as Cr,f as B,g as ee,i as Dr,m as jr,o as Rr,r as Nr,s as Ir,t as kr,u as Sr,v as Er,w as v,x as ne,y as Or}from"./Combination-CMPwuAmi.js";import{a as Tr,c as Ee,i as Pr,o as Fr,s as Oe}from"./dist-uzvC4uAK.js";import{a as Te,c as Ar,d as Pe,i as Fe,l as Kr,n as Lr,o as Gr,r as Ae,s as Ur,u as Ke}from"./menu-items-CJhvWPOk.js";var Le=yr("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),i=Ne(wr(),1),l=Ne(xr(),1),de="rovingFocusGroup.onEntryFocus",Vr={bubbles:!1,cancelable:!0},X="RovingFocusGroup",[pe,Ge,Br]=Pe(X),[Xr,fe]=ue(X,[Br]),[Hr,zr]=Xr(X),Ue=i.forwardRef((n,t)=>(0,l.jsx)(pe.Provider,{scope:n.__scopeRovingFocusGroup,children:(0,l.jsx)(pe.Slot,{scope:n.__scopeRovingFocusGroup,children:(0,l.jsx)(Yr,{...n,ref:t})})}));Ue.displayName=X;var Yr=i.forwardRef((n,t)=>{let{__scopeRovingFocusGroup:e,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:d=!1,...c}=n,m=i.useRef(null),x=G(t,m),w=Ke(a),[R,g]=ce({prop:s,defaultProp:u??null,onChange:p,caller:X}),[D,_]=i.useState(!1),b=ee(f),q=Ge(e),U=i.useRef(!1),[J,T]=i.useState(0);return i.useEffect(()=>{let M=m.current;if(M)return M.addEventListener(de,b),()=>M.removeEventListener(de,b)},[b]),(0,l.jsx)(Hr,{scope:e,orientation:r,dir:w,loop:o,currentTabStopId:R,onItemFocus:i.useCallback(M=>g(M),[g]),onItemShiftTab:i.useCallback(()=>_(!0),[]),onFocusableItemAdd:i.useCallback(()=>T(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>T(M=>M-1),[]),children:(0,l.jsx)(S.div,{tabIndex:D||J===0?-1:0,"data-orientation":r,...c,ref:x,style:{outline:"none",...n.style},onMouseDown:v(n.onMouseDown,()=>{U.current=!0}),onFocus:v(n.onFocus,M=>{let A=!U.current;if(M.target===M.currentTarget&&A&&!D){let P=new CustomEvent(de,Vr);if(M.currentTarget.dispatchEvent(P),!P.defaultPrevented){let V=q().filter(N=>N.focusable);Xe([V.find(N=>N.active),V.find(N=>N.id===R),...V].filter(Boolean).map(N=>N.ref.current),d)}}U.current=!1}),onBlur:v(n.onBlur,()=>_(!1))})})}),Ve="RovingFocusGroupItem",Be=i.forwardRef((n,t)=>{let{__scopeRovingFocusGroup:e,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...u}=n,p=B(),f=a||p,d=zr(Ve,e),c=d.currentTabStopId===f,m=Ge(e),{onFocusableItemAdd:x,onFocusableItemRemove:w,currentTabStopId:R}=d;return i.useEffect(()=>{if(r)return x(),()=>w()},[r,x,w]),(0,l.jsx)(pe.ItemSlot,{scope:e,id:f,focusable:r,active:o,children:(0,l.jsx)(S.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...u,ref:t,onMouseDown:v(n.onMouseDown,g=>{r?d.onItemFocus(f):g.preventDefault()}),onFocus:v(n.onFocus,()=>d.onItemFocus(f)),onKeyDown:v(n.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;let D=$r(g,d.orientation,d.dir);if(D!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let _=m().filter(b=>b.focusable).map(b=>b.ref.current);if(D==="last")_.reverse();else if(D==="prev"||D==="next"){D==="prev"&&_.reverse();let b=_.indexOf(g.currentTarget);_=d.loop?qr(_,b+1):_.slice(b+1)}setTimeout(()=>Xe(_))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:R!=null}):s})})});Be.displayName=Ve;var Wr={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Zr(n,t){return t==="rtl"?n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n:n}function $r(n,t,e){let r=Zr(n.key,e);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Wr[r]}function Xe(n,t=!1){let e=document.activeElement;for(let r of n)if(r===e||(r.focus({preventScroll:t}),document.activeElement!==e))return}function qr(n,t){return n.map((e,r)=>n[(t+r)%n.length])}var He=Ue,ze=Be,me=["Enter"," "],Jr=["ArrowDown","PageUp","Home"],Ye=["ArrowUp","PageDown","End"],Qr=[...Jr,...Ye],et={ltr:[...me,"ArrowRight"],rtl:[...me,"ArrowLeft"]},nt={ltr:["ArrowLeft"],rtl:["ArrowRight"]},H="Menu",[z,rt,tt]=Pe(H),[F,he]=ue(H,[tt,Ee,fe]),Y=Ee(),We=fe(),[Ze,E]=F(H),[ot,W]=F(H),$e=n=>{let{__scopeMenu:t,open:e=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=n,u=Y(t),[p,f]=i.useState(null),d=i.useRef(!1),c=ee(a),m=Ke(o);return i.useEffect(()=>{let x=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),(0,l.jsx)(Oe,{...u,children:(0,l.jsx)(Ze,{scope:t,open:e,onOpenChange:c,content:p,onContentChange:f,children:(0,l.jsx)(ot,{scope:t,onClose:i.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:m,modal:s,children:r})})})};$e.displayName=H;var at="MenuAnchor",ve=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n,o=Y(e);return(0,l.jsx)(Pr,{...o,...r,ref:t})});ve.displayName=at;var we="MenuPortal",[st,qe]=F(we,{forceMount:void 0}),Je=n=>{let{__scopeMenu:t,forceMount:e,children:r,container:o}=n,a=E(we,t);return(0,l.jsx)(st,{scope:t,forceMount:e,children:(0,l.jsx)(ne,{present:e||a.open,children:(0,l.jsx)(Cr,{asChild:!0,container:o,children:r})})})};Je.displayName=we;var j="MenuContent",[it,ge]=F(j),Qe=i.forwardRef((n,t)=>{let e=qe(j,n.__scopeMenu),{forceMount:r=e.forceMount,...o}=n,a=E(j,n.__scopeMenu),s=W(j,n.__scopeMenu);return(0,l.jsx)(z.Provider,{scope:n.__scopeMenu,children:(0,l.jsx)(ne,{present:r||a.open,children:(0,l.jsx)(z.Slot,{scope:n.__scopeMenu,children:s.modal?(0,l.jsx)(lt,{...o,ref:t}):(0,l.jsx)(ut,{...o,ref:t})})})})}),lt=i.forwardRef((n,t)=>{let e=E(j,n.__scopeMenu),r=i.useRef(null),o=G(t,r);return i.useEffect(()=>{let a=r.current;if(a)return Nr(a)},[]),(0,l.jsx)(xe,{...n,ref:o,trapFocus:e.open,disableOutsidePointerEvents:e.open,disableOutsideScroll:!0,onFocusOutside:v(n.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>e.onOpenChange(!1)})}),ut=i.forwardRef((n,t)=>{let e=E(j,n.__scopeMenu);return(0,l.jsx)(xe,{...n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>e.onOpenChange(!1)})}),ct=Or("MenuContent.ScrollLock"),xe=i.forwardRef((n,t)=>{let{__scopeMenu:e,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:u,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:m,onDismiss:x,disableOutsideScroll:w,...R}=n,g=E(j,e),D=W(j,e),_=Y(e),b=We(e),q=rt(e),[U,J]=i.useState(null),T=i.useRef(null),M=G(t,T,g.onContentChange),A=i.useRef(0),P=i.useRef(""),V=i.useRef(0),N=i.useRef(null),Ce=i.useRef("right"),se=i.useRef(0),mr=w?kr:i.Fragment,hr=w?{as:ct,allowPinchZoom:!0}:void 0,vr=h=>{var De,je;let C=P.current+h,I=q().filter(k=>!k.disabled),ie=document.activeElement,le=(De=I.find(k=>k.ref.current===ie))==null?void 0:De.textValue,Q=bt(I.map(k=>k.textValue),C,le),L=(je=I.find(k=>k.textValue===Q))==null?void 0:je.ref.current;(function k(Re){P.current=Re,window.clearTimeout(A.current),Re!==""&&(A.current=window.setTimeout(()=>k(""),1e3))})(C),L&&setTimeout(()=>L.focus())};i.useEffect(()=>()=>window.clearTimeout(A.current),[]),Mr();let K=i.useCallback(h=>{var C,I;return Ce.current===((C=N.current)==null?void 0:C.side)&&Ct(h,(I=N.current)==null?void 0:I.area)},[]);return(0,l.jsx)(it,{scope:e,searchRef:P,onItemEnter:i.useCallback(h=>{K(h)&&h.preventDefault()},[K]),onItemLeave:i.useCallback(h=>{var C;K(h)||((C=T.current)==null||C.focus(),J(null))},[K]),onTriggerLeave:i.useCallback(h=>{K(h)&&h.preventDefault()},[K]),pointerGraceTimerRef:V,onPointerGraceIntentChange:i.useCallback(h=>{N.current=h},[]),children:(0,l.jsx)(mr,{...hr,children:(0,l.jsx)(Dr,{asChild:!0,trapped:o,onMountAutoFocus:v(a,h=>{var C;h.preventDefault(),(C=T.current)==null||C.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,l.jsx)(jr,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:m,onDismiss:x,children:(0,l.jsx)(He,{asChild:!0,...b,dir:D.dir,orientation:"vertical",loop:r,currentTabStopId:U,onCurrentTabStopIdChange:J,onEntryFocus:v(p,h=>{D.isUsingKeyboardRef.current||h.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,l.jsx)(Fr,{role:"menu","aria-orientation":"vertical","data-state":gn(g.open),"data-radix-menu-content":"",dir:D.dir,..._,...R,ref:M,style:{outline:"none",...R.style},onKeyDown:v(R.onKeyDown,h=>{let C=h.target.closest("[data-radix-menu-content]")===h.currentTarget,I=h.ctrlKey||h.altKey||h.metaKey,ie=h.key.length===1;C&&(h.key==="Tab"&&h.preventDefault(),!I&&ie&&vr(h.key));let le=T.current;if(h.target!==le||!Qr.includes(h.key))return;h.preventDefault();let Q=q().filter(L=>!L.disabled).map(L=>L.ref.current);Ye.includes(h.key)&&Q.reverse(),yt(Q)}),onBlur:v(n.onBlur,h=>{h.currentTarget.contains(h.target)||(window.clearTimeout(A.current),P.current="")}),onPointerMove:v(n.onPointerMove,$(h=>{let C=h.target,I=se.current!==h.clientX;h.currentTarget.contains(C)&&I&&(Ce.current=h.clientX>se.current?"right":"left",se.current=h.clientX)}))})})})})})})});Qe.displayName=j;var dt="MenuGroup",ye=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n;return(0,l.jsx)(S.div,{role:"group",...r,ref:t})});ye.displayName=dt;var pt="MenuLabel",en=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n;return(0,l.jsx)(S.div,{...r,ref:t})});en.displayName=pt;var re="MenuItem",nn="menu.itemSelect",te=i.forwardRef((n,t)=>{let{disabled:e=!1,onSelect:r,...o}=n,a=i.useRef(null),s=W(re,n.__scopeMenu),u=ge(re,n.__scopeMenu),p=G(t,a),f=i.useRef(!1),d=()=>{let c=a.current;if(!e&&c){let m=new CustomEvent(nn,{bubbles:!0,cancelable:!0});c.addEventListener(nn,x=>r==null?void 0:r(x),{once:!0}),Er(c,m),m.defaultPrevented?f.current=!1:s.onClose()}};return(0,l.jsx)(rn,{...o,ref:p,disabled:e,onClick:v(n.onClick,d),onPointerDown:c=>{var m;(m=n.onPointerDown)==null||m.call(n,c),f.current=!0},onPointerUp:v(n.onPointerUp,c=>{var m;f.current||((m=c.currentTarget)==null||m.click())}),onKeyDown:v(n.onKeyDown,c=>{let m=u.searchRef.current!=="";e||m&&c.key===" "||me.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});te.displayName=re;var rn=i.forwardRef((n,t)=>{let{__scopeMenu:e,disabled:r=!1,textValue:o,...a}=n,s=ge(re,e),u=We(e),p=i.useRef(null),f=G(t,p),[d,c]=i.useState(!1),[m,x]=i.useState("");return i.useEffect(()=>{let w=p.current;w&&x((w.textContent??"").trim())},[a.children]),(0,l.jsx)(z.ItemSlot,{scope:e,disabled:r,textValue:o??m,children:(0,l.jsx)(ze,{asChild:!0,...u,focusable:!r,children:(0,l.jsx)(S.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:f,onPointerMove:v(n.onPointerMove,$(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:v(n.onPointerLeave,$(w=>s.onItemLeave(w))),onFocus:v(n.onFocus,()=>c(!0)),onBlur:v(n.onBlur,()=>c(!1))})})})}),ft="MenuCheckboxItem",tn=i.forwardRef((n,t)=>{let{checked:e=!1,onCheckedChange:r,...o}=n;return(0,l.jsx)(un,{scope:n.__scopeMenu,checked:e,children:(0,l.jsx)(te,{role:"menuitemcheckbox","aria-checked":oe(e)?"mixed":e,...o,ref:t,"data-state":Me(e),onSelect:v(o.onSelect,()=>r==null?void 0:r(oe(e)?!0:!e),{checkForDefaultPrevented:!1})})})});tn.displayName=ft;var on="MenuRadioGroup",[mt,ht]=F(on,{value:void 0,onValueChange:()=>{}}),an=i.forwardRef((n,t)=>{let{value:e,onValueChange:r,...o}=n,a=ee(r);return(0,l.jsx)(mt,{scope:n.__scopeMenu,value:e,onValueChange:a,children:(0,l.jsx)(ye,{...o,ref:t})})});an.displayName=on;var sn="MenuRadioItem",ln=i.forwardRef((n,t)=>{let{value:e,...r}=n,o=ht(sn,n.__scopeMenu),a=e===o.value;return(0,l.jsx)(un,{scope:n.__scopeMenu,checked:a,children:(0,l.jsx)(te,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Me(a),onSelect:v(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,e)},{checkForDefaultPrevented:!1})})})});ln.displayName=sn;var _e="MenuItemIndicator",[un,vt]=F(_e,{checked:!1}),cn=i.forwardRef((n,t)=>{let{__scopeMenu:e,forceMount:r,...o}=n,a=vt(_e,e);return(0,l.jsx)(ne,{present:r||oe(a.checked)||a.checked===!0,children:(0,l.jsx)(S.span,{...o,ref:t,"data-state":Me(a.checked)})})});cn.displayName=_e;var wt="MenuSeparator",dn=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n;return(0,l.jsx)(S.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});dn.displayName=wt;var gt="MenuArrow",pn=i.forwardRef((n,t)=>{let{__scopeMenu:e,...r}=n,o=Y(e);return(0,l.jsx)(Tr,{...o,...r,ref:t})});pn.displayName=gt;var be="MenuSub",[xt,fn]=F(be),mn=n=>{let{__scopeMenu:t,children:e,open:r=!1,onOpenChange:o}=n,a=E(be,t),s=Y(t),[u,p]=i.useState(null),[f,d]=i.useState(null),c=ee(o);return i.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),(0,l.jsx)(Oe,{...s,children:(0,l.jsx)(Ze,{scope:t,open:r,onOpenChange:c,content:f,onContentChange:d,children:(0,l.jsx)(xt,{scope:t,contentId:B(),triggerId:B(),trigger:u,onTriggerChange:p,children:e})})})};mn.displayName=be;var Z="MenuSubTrigger",hn=i.forwardRef((n,t)=>{let e=E(Z,n.__scopeMenu),r=W(Z,n.__scopeMenu),o=fn(Z,n.__scopeMenu),a=ge(Z,n.__scopeMenu),s=i.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:p}=a,f={__scopeMenu:n.__scopeMenu},d=i.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{let c=u.current;return()=>{window.clearTimeout(c),p(null)}},[u,p]),(0,l.jsx)(ve,{asChild:!0,...f,children:(0,l.jsx)(rn,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":e.open,"aria-controls":o.contentId,"data-state":gn(e.open),...n,ref:Ie(t,o.onTriggerChange),onClick:c=>{var m;(m=n.onClick)==null||m.call(n,c),!(n.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),e.open||e.onOpenChange(!0))},onPointerMove:v(n.onPointerMove,$(c=>{a.onItemEnter(c),!c.defaultPrevented&&!n.disabled&&!e.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{e.onOpenChange(!0),d()},100))})),onPointerLeave:v(n.onPointerLeave,$(c=>{var x,w;d();let m=(x=e.content)==null?void 0:x.getBoundingClientRect();if(m){let R=(w=e.content)==null?void 0:w.dataset.side,g=R==="right",D=g?-5:5,_=m[g?"left":"right"],b=m[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+D,y:c.clientY},{x:_,y:m.top},{x:b,y:m.top},{x:b,y:m.bottom},{x:_,y:m.bottom}],side:R}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:v(n.onKeyDown,c=>{var x;let m=a.searchRef.current!=="";n.disabled||m&&c.key===" "||et[r.dir].includes(c.key)&&(e.onOpenChange(!0),(x=e.content)==null||x.focus(),c.preventDefault())})})})});hn.displayName=Z;var vn="MenuSubContent",wn=i.forwardRef((n,t)=>{let e=qe(j,n.__scopeMenu),{forceMount:r=e.forceMount,...o}=n,a=E(j,n.__scopeMenu),s=W(j,n.__scopeMenu),u=fn(vn,n.__scopeMenu),p=i.useRef(null),f=G(t,p);return(0,l.jsx)(z.Provider,{scope:n.__scopeMenu,children:(0,l.jsx)(ne,{present:r||a.open,children:(0,l.jsx)(z.Slot,{scope:n.__scopeMenu,children:(0,l.jsx)(xe,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:f,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var c;s.isUsingKeyboardRef.current&&((c=p.current)==null||c.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:v(n.onFocusOutside,d=>{d.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:v(n.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:v(n.onKeyDown,d=>{var x;let c=d.currentTarget.contains(d.target),m=nt[s.dir].includes(d.key);c&&m&&(a.onOpenChange(!1),(x=u.trigger)==null||x.focus(),d.preventDefault())})})})})})});wn.displayName=vn;function gn(n){return n?"open":"closed"}function oe(n){return n==="indeterminate"}function Me(n){return oe(n)?"indeterminate":n?"checked":"unchecked"}function yt(n){let t=document.activeElement;for(let e of n)if(e===t||(e.focus(),document.activeElement!==t))return}function _t(n,t){return n.map((e,r)=>n[(t+r)%n.length])}function bt(n,t,e){let r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=e?n.indexOf(e):-1,a=_t(n,Math.max(o,0));r.length===1&&(a=a.filter(u=>u!==e));let s=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return s===e?void 0:s}function Mt(n,t){let{x:e,y:r}=n,o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){let u=t[a],p=t[s],f=u.x,d=u.y,c=p.x,m=p.y;d>r!=m>r&&e<(c-f)*(r-d)/(m-d)+f&&(o=!o)}return o}function Ct(n,t){return t?Mt({x:n.clientX,y:n.clientY},t):!1}function $(n){return t=>t.pointerType==="mouse"?n(t):void 0}var xn=$e,yn=ve,_n=Je,bn=Qe,Mn=ye,Cn=en,Dn=te,jn=tn,Rn=an,Nn=ln,In=cn,kn=dn,Sn=pn,En=mn,On=hn,Tn=wn,ae="DropdownMenu",[Dt,mo]=ue(ae,[he]),y=he(),[jt,Pn]=Dt(ae),Fn=n=>{let{__scopeDropdownMenu:t,children:e,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:u=!0}=n,p=y(t),f=i.useRef(null),[d,c]=ce({prop:o,defaultProp:a??!1,onChange:s,caller:ae});return(0,l.jsx)(jt,{scope:t,triggerId:B(),triggerRef:f,contentId:B(),open:d,onOpenChange:c,onOpenToggle:i.useCallback(()=>c(m=>!m),[c]),modal:u,children:(0,l.jsx)(xn,{...p,open:d,onOpenChange:c,dir:r,modal:u,children:e})})};Fn.displayName=ae;var An="DropdownMenuTrigger",Kn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,disabled:r=!1,...o}=n,a=Pn(An,e),s=y(e);return(0,l.jsx)(yn,{asChild:!0,...s,children:(0,l.jsx)(S.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ie(t,a.triggerRef),onPointerDown:v(n.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:v(n.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});Kn.displayName=An;var Rt="DropdownMenuPortal",Ln=n=>{let{__scopeDropdownMenu:t,...e}=n,r=y(t);return(0,l.jsx)(_n,{...r,...e})};Ln.displayName=Rt;var Gn="DropdownMenuContent",Un=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=Pn(Gn,e),a=y(e),s=i.useRef(!1);return(0,l.jsx)(bn,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:v(n.onCloseAutoFocus,u=>{var p;s.current||((p=o.triggerRef.current)==null||p.focus()),s.current=!1,u.preventDefault()}),onInteractOutside:v(n.onInteractOutside,u=>{let p=u.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,d=p.button===2||f;(!o.modal||d)&&(s.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Un.displayName=Gn;var Nt="DropdownMenuGroup",Vn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Mn,{...o,...r,ref:t})});Vn.displayName=Nt;var It="DropdownMenuLabel",Bn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Cn,{...o,...r,ref:t})});Bn.displayName=It;var kt="DropdownMenuItem",Xn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Dn,{...o,...r,ref:t})});Xn.displayName=kt;var St="DropdownMenuCheckboxItem",Hn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(jn,{...o,...r,ref:t})});Hn.displayName=St;var Et="DropdownMenuRadioGroup",Ot=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Rn,{...o,...r,ref:t})});Ot.displayName=Et;var Tt="DropdownMenuRadioItem",zn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Nn,{...o,...r,ref:t})});zn.displayName=Tt;var Pt="DropdownMenuItemIndicator",Yn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(In,{...o,...r,ref:t})});Yn.displayName=Pt;var Ft="DropdownMenuSeparator",Wn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(kn,{...o,...r,ref:t})});Wn.displayName=Ft;var At="DropdownMenuArrow",Kt=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Sn,{...o,...r,ref:t})});Kt.displayName=At;var Lt=n=>{let{__scopeDropdownMenu:t,children:e,open:r,onOpenChange:o,defaultOpen:a}=n,s=y(t),[u,p]=ce({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,l.jsx)(En,{...s,open:u,onOpenChange:p,children:e})},Gt="DropdownMenuSubTrigger",Zn=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(On,{...o,...r,ref:t})});Zn.displayName=Gt;var Ut="DropdownMenuSubContent",$n=i.forwardRef((n,t)=>{let{__scopeDropdownMenu:e,...r}=n,o=y(e);return(0,l.jsx)(Tn,{...o,...r,ref:t,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$n.displayName=Ut;var Vt=Fn,Bt=Kn,Xt=Ln,qn=Un,Ht=Vn,Jn=Bn,Qn=Xn,er=Hn,nr=zn,rr=Yn,tr=Wn,zt=Lt,or=Zn,ar=$n,O=gr(),Yt=Vt,Wt=Bt,Zt=Ht,sr=Ir(Xt),$t=Se(qn),qt=Se(ar),Jt=zt,ir=i.forwardRef((n,t)=>{let e=(0,O.c)(17),r,o,a,s,u;e[0]===n?(r=e[1],o=e[2],a=e[3],s=e[4],u=e[5]):({className:o,inset:a,showChevron:u,children:r,...s}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=u);let p=u===void 0?!0:u,f;e[6]!==o||e[7]!==a?(f=Kr({className:o,inset:a}),e[6]=o,e[7]=a,e[8]=f):f=e[8];let d;e[9]===p?d=e[10]:(d=p&&(0,l.jsx)(br,{className:"ml-auto h-4 w-4"}),e[9]=p,e[10]=d);let c;return e[11]!==r||e[12]!==s||e[13]!==t||e[14]!==f||e[15]!==d?(c=(0,l.jsxs)(or,{ref:t,className:f,...s,children:[r,d]}),e[11]=r,e[12]=s,e[13]=t,e[14]=f,e[15]=d,e[16]=c):c=e[16],c});ir.displayName=or.displayName;var lr=i.forwardRef((n,t)=>{let e=(0,O.c)(9),r,o;e[0]===n?(r=e[1],o=e[2]):({className:r,...o}=n,e[0]=n,e[1]=r,e[2]=o);let a;e[3]===r?a=e[4]:(a=ke(Ae({subcontent:!0}),"animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",r),e[3]=r,e[4]=a);let s;return e[5]!==o||e[6]!==t||e[7]!==a?(s=(0,l.jsx)(qt,{ref:t,className:a,...o}),e[5]=o,e[6]=t,e[7]=a,e[8]=s):s=e[8],s});lr.displayName=ar.displayName;var ur=i.forwardRef((n,t)=>{let e=(0,O.c)(17),r,o,a,s;e[0]===n?(r=e[1],o=e[2],a=e[3],s=e[4]):({className:r,scrollable:a,sideOffset:s,...o}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s);let u=a===void 0?!0:a,p=s===void 0?4:s,f;e[5]!==r||e[6]!==u?(f=ke(Ae(),"animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 print:hidden",u&&"overflow-auto",r),e[5]=r,e[6]=u,e[7]=f):f=e[7];let d=u?`calc(var(--radix-dropdown-menu-content-available-height) - ${Rr}px)`:void 0,c;e[8]!==o.style||e[9]!==d?(c={...o.style,maxHeight:d},e[8]=o.style,e[9]=d,e[10]=c):c=e[10];let m;return e[11]!==o||e[12]!==t||e[13]!==p||e[14]!==f||e[15]!==c?(m=(0,l.jsx)(sr,{children:(0,l.jsx)(Sr,{children:(0,l.jsx)($t,{ref:t,sideOffset:p,className:f,style:c,...o})})}),e[11]=o,e[12]=t,e[13]=p,e[14]=f,e[15]=c,e[16]=m):m=e[16],m});ur.displayName=qn.displayName;var cr=i.forwardRef((n,t)=>{let e=(0,O.c)(13),r,o,a,s;e[0]===n?(r=e[1],o=e[2],a=e[3],s=e[4]):({className:r,inset:o,variant:s,...a}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s);let u;e[5]!==r||e[6]!==o||e[7]!==s?(u=Gr({className:r,inset:o,variant:s}),e[5]=r,e[6]=o,e[7]=s,e[8]=u):u=e[8];let p;return e[9]!==a||e[10]!==t||e[11]!==u?(p=(0,l.jsx)(Qn,{ref:t,className:u,...a}),e[9]=a,e[10]=t,e[11]=u,e[12]=p):p=e[12],p});cr.displayName=Qn.displayName;var dr=i.forwardRef((n,t)=>{let e=(0,O.c)(15),r,o,a,s;e[0]===n?(r=e[1],o=e[2],a=e[3],s=e[4]):({className:a,children:o,checked:r,...s}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s);let u;e[5]===a?u=e[6]:(u=Te({className:a}),e[5]=a,e[6]=u);let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=Fe(),e[7]=p):p=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=(0,l.jsx)("span",{className:p,children:(0,l.jsx)(rr,{children:(0,l.jsx)(_r,{className:"h-4 w-4"})})}),e[8]=f):f=e[8];let d;return e[9]!==r||e[10]!==o||e[11]!==s||e[12]!==t||e[13]!==u?(d=(0,l.jsxs)(er,{ref:t,className:u,checked:r,...s,children:[f,o]}),e[9]=r,e[10]=o,e[11]=s,e[12]=t,e[13]=u,e[14]=d):d=e[14],d});dr.displayName=er.displayName;var Qt=i.forwardRef((n,t)=>{let e=(0,O.c)(13),r,o,a;e[0]===n?(r=e[1],o=e[2],a=e[3]):({className:o,children:r,...a}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a);let s;e[4]===o?s=e[5]:(s=Te({className:o}),e[4]=o,e[5]=s);let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=Fe(),e[6]=u):u=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)("span",{className:u,children:(0,l.jsx)(rr,{children:(0,l.jsx)(Le,{className:"h-2 w-2 fill-current"})})}),e[7]=p):p=e[7];let f;return e[8]!==r||e[9]!==a||e[10]!==t||e[11]!==s?(f=(0,l.jsxs)(nr,{ref:t,className:s,...a,children:[p,r]}),e[8]=r,e[9]=a,e[10]=t,e[11]=s,e[12]=f):f=e[12],f});Qt.displayName=nr.displayName;var pr=i.forwardRef((n,t)=>{let e=(0,O.c)(11),r,o,a;e[0]===n?(r=e[1],o=e[2],a=e[3]):({className:r,inset:o,...a}=n,e[0]=n,e[1]=r,e[2]=o,e[3]=a);let s;e[4]!==r||e[5]!==o?(s=Ur({className:r,inset:o}),e[4]=r,e[5]=o,e[6]=s):s=e[6];let u;return e[7]!==a||e[8]!==t||e[9]!==s?(u=(0,l.jsx)(Jn,{ref:t,className:s,...a}),e[7]=a,e[8]=t,e[9]=s,e[10]=u):u=e[10],u});pr.displayName=Jn.displayName;var fr=i.forwardRef((n,t)=>{let e=(0,O.c)(9),r,o;e[0]===n?(r=e[1],o=e[2]):({className:r,...o}=n,e[0]=n,e[1]=r,e[2]=o);let a;e[3]===r?a=e[4]:(a=Ar({className:r}),e[3]=r,e[4]=a);let s;return e[5]!==o||e[6]!==t||e[7]!==a?(s=(0,l.jsx)(tr,{ref:t,className:a,...o}),e[5]=o,e[6]=t,e[7]=a,e[8]=s):s=e[8],s});fr.displayName=tr.displayName;var eo=Lr;export{he as A,Rn as C,En as D,kn as E,He as M,fe as N,Tn as O,Le as P,_n as S,xn as T,bn as _,cr as a,In as b,fr as c,lr as d,ir as f,jn as g,Sn as h,Zt as i,ze as j,On as k,eo as l,yn as m,dr as n,pr as o,Wt as p,ur as r,sr as s,Yt as t,Jt as u,Mn as v,Nn as w,Cn as x,Dn as y};
import{t}from"./dtd-DnQAYfYi.js";export{t as dtd};
var a;function u(e,t){return a=t,e}function l(e,t){var n=e.next();if(n=="<"&&e.eat("!")){if(e.eatWhile(/[\-]/))return t.tokenize=s,s(e,t);if(e.eatWhile(/[\w]/))return u("keyword","doindent")}else{if(n=="<"&&e.eat("?"))return t.tokenize=o("meta","?>"),u("meta",n);if(n=="#"&&e.eatWhile(/[\w]/))return u("atom","tag");if(n=="|")return u("keyword","separator");if(n.match(/[\(\)\[\]\-\.,\+\?>]/))return u(null,n);if(n.match(/[\[\]]/))return u("rule",n);if(n=='"'||n=="'")return t.tokenize=c(n),t.tokenize(e,t);if(e.eatWhile(/[a-zA-Z\?\+\d]/)){var r=e.current();return r.substr(r.length-1,r.length).match(/\?|\+/)!==null&&e.backUp(1),u("tag","tag")}else return n=="%"||n=="*"?u("number","number"):(e.eatWhile(/[\w\\\-_%.{,]/),u(null,null))}}function s(e,t){for(var n=0,r;(r=e.next())!=null;){if(n>=2&&r==">"){t.tokenize=l;break}n=r=="-"?n+1:0}return u("comment","comment")}function c(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){n.tokenize=l;break}r=!r&&i=="\\"}return u("string","tag")}}function o(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=l;break}n.next()}return e}}const k={name:"dtd",startState:function(){return{tokenize:l,baseIndent:0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t),r=t.stack[t.stack.length-1];return e.current()=="["||a==="doindent"||a=="["?t.stack.push("rule"):a==="endtag"?t.stack[t.stack.length-1]="endtag":e.current()=="]"||a=="]"||a==">"&&r=="rule"?t.stack.pop():a=="["&&t.stack.push("["),n},indent:function(e,t,n){var r=e.stack.length;return t.charAt(0)==="]"?r--:t.substr(t.length-1,t.length)===">"&&(t.substr(0,1)==="<"||a=="doindent"&&t.length>1||(a=="doindent"?r--:a==">"&&t.length>1||a=="tag"&&t!==">"||(a=="tag"&&e.stack[e.stack.length-1]=="rule"?r--:a=="tag"?r++:t===">"&&e.stack[e.stack.length-1]=="rule"&&a===">"?r--:t===">"&&e.stack[e.stack.length-1]=="rule"||(t.substr(0,1)!=="<"&&t.substr(0,1)===">"?--r:t===">"||--r))),(a==null||a=="]")&&r--),e.baseIndent+r*n.unit},languageData:{indentOnInput:/^\s*[\]>]$/}};export{k as t};
const e=JSON.parse(`{"array_agg":{"description":"Returns a LIST containing all the values of a column.","example":"list(A)"},"array_aggr":{"description":"Executes the aggregate function name on the elements of list","example":"list_aggregate([1, 2, NULL], 'min')"},"array_aggregate":{"description":"Executes the aggregate function name on the elements of list","example":"list_aggregate([1, 2, NULL], 'min')"},"array_apply":{"description":"Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details","example":"list_transform([1, 2, 3], x -> x + 1)"},"array_cat":{"description":"Concatenates two lists.","example":"list_concat([2, 3], [4, 5, 6])"},"array_concat":{"description":"Concatenates two lists.","example":"list_concat([2, 3], [4, 5, 6])"},"array_contains":{"description":"Returns true if the list contains the element.","example":"list_contains([1, 2, NULL], 1)"},"array_cosine_distance":{"description":"Compute the cosine distance between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_cosine_distance([1, 2, 3], [1, 2, 3])"},"array_cosine_similarity":{"description":"Compute the cosine similarity between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_cosine_similarity([1, 2, 3], [1, 2, 3])"},"array_cross_product":{"description":"Compute the cross product of two arrays of size 3. The array elements can not be NULL.","example":"array_cross_product([1, 2, 3], [1, 2, 3])"},"array_distance":{"description":"Compute the distance between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_distance([1, 2, 3], [1, 2, 3])"},"array_distinct":{"description":"Removes all duplicates and NULLs from a list. Does not preserve the original order","example":"list_distinct([1, 1, NULL, -3, 1, 5])"},"array_dot_product":{"description":"Compute the inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_inner_product([1, 2, 3], [1, 2, 3])"},"array_extract":{"description":"Extract the indexth (1-based) value from the array.","example":"array_extract('DuckDB', 2)"},"array_filter":{"description":"Constructs a list from those elements of the input list for which the lambda function returns true","example":"list_filter([3, 4, 5], x -> x > 4)"},"array_grade_up":{"description":"Returns the index of their sorted position.","example":"list_grade_up([3, 6, 1, 2])"},"array_has":{"description":"Returns true if the list contains the element.","example":"list_contains([1, 2, NULL], 1)"},"array_has_all":{"description":"Returns true if all elements of l2 are in l1. NULLs are ignored.","example":"list_has_all([1, 2, 3], [2, 3])"},"array_has_any":{"description":"Returns true if the lists have any element in common. NULLs are ignored.","example":"list_has_any([1, 2, 3], [2, 3, 4])"},"array_indexof":{"description":"Returns the index of the element if the list contains the element. If the element is not found, it returns NULL.","example":"list_position([1, 2, NULL], 2)"},"array_inner_product":{"description":"Compute the inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_inner_product([1, 2, 3], [1, 2, 3])"},"array_length":{"description":"Returns the length of the \`list\`.","example":"array_length([1,2,3])"},"array_negative_dot_product":{"description":"Compute the negative inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_negative_inner_product([1, 2, 3], [1, 2, 3])"},"array_negative_inner_product":{"description":"Compute the negative inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_negative_inner_product([1, 2, 3], [1, 2, 3])"},"array_position":{"description":"Returns the index of the element if the list contains the element. If the element is not found, it returns NULL.","example":"list_position([1, 2, NULL], 2)"},"array_reduce":{"description":"Returns a single value that is the result of applying the lambda function to each element of the input list, starting with the first element and then repeatedly applying the lambda function to the result of the previous application and the next element of the list. When an initial value is provided, it is used as the first argument to the lambda function","example":"list_reduce([1, 2, 3], (x, y) -> x + y)"},"array_resize":{"description":"Resizes the list to contain size elements. Initializes new elements with value or NULL if value is not set.","example":"list_resize([1, 2, 3], 5, 0)"},"array_reverse_sort":{"description":"Sorts the elements of the list in reverse order","example":"list_reverse_sort([3, 6, 1, 2])"},"array_select":{"description":"Returns a list based on the elements selected by the index_list.","example":"list_select([10, 20, 30, 40], [1, 4])"},"array_slice":{"description":"list_slice with added step feature.","example":"list_slice([4, 5, 6], 2, 3)"},"array_sort":{"description":"Sorts the elements of the list","example":"list_sort([3, 6, 1, 2])"},"array_transform":{"description":"Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details","example":"list_transform([1, 2, 3], x -> x + 1)"},"array_unique":{"description":"Counts the unique elements of a list","example":"list_unique([1, 1, NULL, -3, 1, 5])"},"array_value":{"description":"Create an ARRAY containing the argument values.","example":"array_value(4, 5, 6)"},"array_where":{"description":"Returns a list with the BOOLEANs in mask_list applied as a mask to the value_list.","example":"list_where([10, 20, 30, 40], [true, false, false, true])"},"array_zip":{"description":"Zips k LISTs to a new LIST whose length will be that of the longest list. Its elements are structs of k elements from each list list_1, \u2026, list_k, missing elements are replaced with NULL. If truncate is set, all lists are truncated to the smallest list length.","example":"list_zip([1, 2], [3, 4], [5, 6])"},"cast_to_type":{"description":"Casts the first argument to the type of the second argument","example":"cast_to_type('42', NULL::INTEGER)"},"concat":{"description":"Concatenates many strings together.","example":"concat('Hello', ' ', 'World')"},"concat_ws":{"description":"Concatenates strings together separated by the specified separator.","example":"concat_ws(', ', 'Banana', 'Apple', 'Melon')"},"contains":{"description":"Returns true if the \`list\` contains the \`element\`.","example":"contains([1, 2, NULL], 1)"},"count":{"description":"Returns the number of non-null values in arg.","example":"count(A)"},"count_if":{"description":"Counts the total number of TRUE values for a boolean column","example":"count_if(A)"},"countif":{"description":"Counts the total number of TRUE values for a boolean column","example":"count_if(A)"},"date_diff":{"description":"The number of partition boundaries between the timestamps","example":"date_diff('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"date_part":{"description":"Get subfield (equivalent to extract)","example":"date_part('minute', TIMESTAMP '1992-09-20 20:38:40')"},"date_sub":{"description":"The number of complete partitions between the timestamps","example":"date_sub('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"date_trunc":{"description":"Truncate to specified precision","example":"date_trunc('hour', TIMESTAMPTZ '1992-09-20 20:38:40')"},"datediff":{"description":"The number of partition boundaries between the timestamps","example":"date_diff('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"datepart":{"description":"Get subfield (equivalent to extract)","example":"date_part('minute', TIMESTAMP '1992-09-20 20:38:40')"},"datesub":{"description":"The number of complete partitions between the timestamps","example":"date_sub('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"datetrunc":{"description":"Truncate to specified precision","example":"date_trunc('hour', TIMESTAMPTZ '1992-09-20 20:38:40')"},"day":{"description":"Extract the day component from a date or timestamp","example":"day(timestamp '2021-08-03 11:59:44.123456')"},"dayname":{"description":"The (English) name of the weekday","example":"dayname(TIMESTAMP '1992-03-22')"},"dayofmonth":{"description":"Extract the dayofmonth component from a date or timestamp","example":"dayofmonth(timestamp '2021-08-03 11:59:44.123456')"},"dayofweek":{"description":"Extract the dayofweek component from a date or timestamp","example":"dayofweek(timestamp '2021-08-03 11:59:44.123456')"},"dayofyear":{"description":"Extract the dayofyear component from a date or timestamp","example":"dayofyear(timestamp '2021-08-03 11:59:44.123456')"},"generate_series":{"description":"Create a list of values between start and stop - the stop parameter is inclusive","example":"generate_series(2, 5, 3)"},"histogram":{"description":"Returns a LIST of STRUCTs with the fields bucket and count.","example":"histogram(A)"},"histogram_exact":{"description":"Returns a LIST of STRUCTs with the fields bucket and count matching the buckets exactly.","example":"histogram_exact(A, [0, 1, 2])"},"string_agg":{"description":"Concatenates the column string values with an optional separator.","example":"string_agg(A, '-')"},"string_split":{"description":"Splits the \`string\` along the \`separator\`","example":"string_split('hello-world', '-')"},"string_split_regex":{"description":"Splits the \`string\` along the \`regex\`","example":"string_split_regex('hello world; 42', ';? ')"},"string_to_array":{"description":"Splits the \`string\` along the \`separator\`","example":"string_split('hello-world', '-')"},"struct_concat":{"description":"Merge the multiple STRUCTs into a single STRUCT.","example":"struct_concat(struct_pack(i := 4), struct_pack(s := 'string'))"},"struct_extract":{"description":"Extract the named entry from the STRUCT.","example":"struct_extract({'i': 3, 'v2': 3, 'v3': 0}, 'i')"},"struct_extract_at":{"description":"Extract the entry from the STRUCT by position (starts at 1!).","example":"struct_extract_at({'i': 3, 'v2': 3, 'v3': 0}, 2)"},"struct_insert":{"description":"Adds field(s)/value(s) to an existing STRUCT with the argument values. The entry name(s) will be the bound variable name(s)","example":"struct_insert({'a': 1}, b := 2)"},"struct_pack":{"description":"Create a STRUCT containing the argument values. The entry name will be the bound variable name.","example":"struct_pack(i := 4, s := 'string')"},"substring":{"description":"Extract substring of \`length\` characters starting from character \`start\`. Note that a start value of 1 refers to the first character of the \`string\`.","example":"substring('Hello', 2, 2)"},"substring_grapheme":{"description":"Extract substring of \`length\` grapheme clusters starting from character \`start\`. Note that a start value of 1 refers to the first character of the \`string\`.","example":"substring_grapheme('\u{1F986}\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F\u{1F926}\u{1F3FD}\u200D\u2640\uFE0F\u{1F986}', 3, 2)"},"to_base":{"description":"Converts a value to a string in the given base radix, optionally padding with leading zeros to the minimum length","example":"to_base(42, 16)"},"to_base64":{"description":"Converts a \`blob\` to a base64 encoded \`string\`.","example":"base64('A'::BLOB)"},"to_binary":{"description":"Converts the value to binary representation","example":"bin(42)"},"to_centuries":{"description":"Construct a century interval","example":"to_centuries(5)"},"to_days":{"description":"Construct a day interval","example":"to_days(5)"},"to_decades":{"description":"Construct a decade interval","example":"to_decades(5)"},"to_hex":{"description":"Converts the value to hexadecimal representation.","example":"hex(42)"},"to_hours":{"description":"Construct a hour interval","example":"to_hours(5)"},"to_microseconds":{"description":"Construct a microsecond interval","example":"to_microseconds(5)"},"to_millennia":{"description":"Construct a millennium interval","example":"to_millennia(1)"},"to_milliseconds":{"description":"Construct a millisecond interval","example":"to_milliseconds(5.5)"},"to_minutes":{"description":"Construct a minute interval","example":"to_minutes(5)"},"to_months":{"description":"Construct a month interval","example":"to_months(5)"},"to_quarters":{"description":"Construct a quarter interval","example":"to_quarters(5)"},"to_seconds":{"description":"Construct a second interval","example":"to_seconds(5.5)"},"to_timestamp":{"description":"Converts secs since epoch to a timestamp with time zone","example":"to_timestamp(1284352323.5)"},"to_weeks":{"description":"Construct a week interval","example":"to_weeks(5)"},"to_years":{"description":"Construct a year interval","example":"to_years(5)"},"trim":{"description":"Removes any spaces from either side of the string.","example":"trim('>>>>test<<', '><')"}}`);var t={keywords:e};export{t as default,e as keywords};
function p(e,n){for(var t=0;t<e.length;t++)n(e[t],t)}function k(e,n){for(var t=0;t<e.length;t++)if(n(e[t],t))return!0;return!1}var i={unnamedDefinition:["interface"],namedDefinition:["module","library","macro","C-struct","C-union","C-function","C-callable-wrapper"],typeParameterizedDefinition:["class","C-subtype","C-mapped-subtype"],otherParameterizedDefinition:["method","function","C-variable","C-address"],constantSimpleDefinition:["constant"],variableSimpleDefinition:["variable"],otherSimpleDefinition:["generic","domain","C-pointer-type","table"],statement:["if","block","begin","method","case","for","select","when","unless","until","while","iterate","profiling","dynamic-bind"],separator:["finally","exception","cleanup","else","elseif","afterwards"],other:["above","below","by","from","handler","in","instance","let","local","otherwise","slot","subclass","then","to","keyed-by","virtual"],signalingCalls:["signal","error","cerror","break","check-type","abort"]};i.otherDefinition=i.unnamedDefinition.concat(i.namedDefinition).concat(i.otherParameterizedDefinition),i.definition=i.typeParameterizedDefinition.concat(i.otherDefinition),i.parameterizedDefinition=i.typeParameterizedDefinition.concat(i.otherParameterizedDefinition),i.simpleDefinition=i.constantSimpleDefinition.concat(i.variableSimpleDefinition).concat(i.otherSimpleDefinition),i.keyword=i.statement.concat(i.separator).concat(i.other);var f="[-_a-zA-Z?!*@<>$%]+",x=RegExp("^"+f),l={symbolKeyword:f+":",symbolClass:"<"+f+">",symbolGlobal:"\\*"+f+"\\*",symbolConstant:"\\$"+f},D={symbolKeyword:"atom",symbolClass:"tag",symbolGlobal:"variableName.standard",symbolConstant:"variableName.constant"};for(var s in l)l.hasOwnProperty(s)&&(l[s]=RegExp("^"+l[s]));l.keyword=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var c={};c.keyword="keyword",c.definition="def",c.simpleDefinition="def",c.signalingCalls="builtin";var b={},h={};p(["keyword","definition","simpleDefinition","signalingCalls"],function(e){p(i[e],function(n){b[n]=e,h[n]=c[e]})});function u(e,n,t){return n.tokenize=t,t(e,n)}function m(e,n){var t=e.peek();if(t=="'"||t=='"')return e.next(),u(e,n,y(t,"string"));if(t=="/"){if(e.next(),e.eat("*"))return u(e,n,v);if(e.eat("/"))return e.skipToEnd(),"comment";e.backUp(1)}else if(/[+\-\d\.]/.test(t)){if(e.match(/^[+-]?[0-9]*\.[0-9]*([esdx][+-]?[0-9]+)?/i)||e.match(/^[+-]?[0-9]+([esdx][+-]?[0-9]+)/i)||e.match(/^[+-]?\d+/))return"number"}else{if(t=="#")return e.next(),t=e.peek(),t=='"'?(e.next(),u(e,n,y('"',"string"))):t=="b"?(e.next(),e.eatWhile(/[01]/),"number"):t=="x"?(e.next(),e.eatWhile(/[\da-f]/i),"number"):t=="o"?(e.next(),e.eatWhile(/[0-7]/),"number"):t=="#"?(e.next(),"punctuation"):t=="["||t=="("?(e.next(),"bracket"):e.match(/f|t|all-keys|include|key|next|rest/i)?"atom":(e.eatWhile(/[-a-zA-Z]/),"error");if(t=="~")return e.next(),t=e.peek(),t=="="&&(e.next(),t=e.peek(),t=="="&&e.next()),"operator";if(t==":"){if(e.next(),t=e.peek(),t=="=")return e.next(),"operator";if(t==":")return e.next(),"punctuation"}else{if("[](){}".indexOf(t)!=-1)return e.next(),"bracket";if(".,".indexOf(t)!=-1)return e.next(),"punctuation";if(e.match("end"))return"keyword"}}for(var o in l)if(l.hasOwnProperty(o)){var r=l[o];if(r instanceof Array&&k(r,function(a){return e.match(a)})||e.match(r))return D[o]}return/[+\-*\/^=<>&|]/.test(t)?(e.next(),"operator"):e.match("define")?"def":(e.eatWhile(/[\w\-]/),b.hasOwnProperty(e.current())?h[e.current()]:e.current().match(x)?"variable":(e.next(),"variableName.standard"))}function v(e,n){for(var t=!1,o=!1,r=0,a;a=e.next();){if(a=="/"&&t)if(r>0)r--;else{n.tokenize=m;break}else a=="*"&&o&&r++;t=a=="*",o=a=="/"}return"comment"}function y(e,n){return function(t,o){for(var r=!1,a,d=!1;(a=t.next())!=null;){if(a==e&&!r){d=!0;break}r=!r&&a=="\\"}return(d||!r)&&(o.tokenize=m),n}}const g={name:"dylan",startState:function(){return{tokenize:m,currentIndent:0}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},languageData:{commentTokens:{block:{open:"/*",close:"*/"}}}};export{g as t};
import{t as a}from"./dylan-DeXj1TAN.js";export{a as dylan};
var c={slash:0,parenthesis:1},a={comment:0,_string:1,characterClass:2};const r={name:"ebnf",startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(e,t){if(e){switch(t.stack.length===0&&(e.peek()=='"'||e.peek()=="'"?(t.stringType=e.peek(),e.next(),t.stack.unshift(a._string)):e.match("/*")?(t.stack.unshift(a.comment),t.commentType=c.slash):e.match("(*")&&(t.stack.unshift(a.comment),t.commentType=c.parenthesis)),t.stack[0]){case a._string:for(;t.stack[0]===a._string&&!e.eol();)e.peek()===t.stringType?(e.next(),t.stack.shift()):e.peek()==="\\"?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return t.lhs?"property":"string";case a.comment:for(;t.stack[0]===a.comment&&!e.eol();)t.commentType===c.slash&&e.match("*/")||t.commentType===c.parenthesis&&e.match("*)")?(t.stack.shift(),t.commentType=null):e.match(/^.[^\*]*/);return"comment";case a.characterClass:for(;t.stack[0]===a.characterClass&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(".")||t.stack.shift();return"operator"}var s=e.peek();switch(s){case"[":return e.next(),t.stack.unshift(a.characterClass),"bracket";case":":case"|":case";":return e.next(),"operator";case"%":if(e.match("%%"))return"header";if(e.match(/[%][A-Za-z]+/))return"keyword";if(e.match(/[%][}]/))return"bracket";break;case"/":if(e.match(/[\/][A-Za-z]+/))return"keyword";case"\\":if(e.match(/[\][a-z]+/))return"string.special";case".":if(e.match("."))return"atom";case"*":case"-":case"+":case"^":if(e.match(s))return"atom";case"$":if(e.match("$$"))return"builtin";if(e.match(/[$][0-9]+/))return"variableName.special";case"<":if(e.match(/<<[a-zA-Z_]+>>/))return"builtin"}return e.match("//")?(e.skipToEnd(),"comment"):e.match("return")?"operator":e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?e.match(/(?=[\(.])/)?"variable":e.match(/(?=[\s\n]*[:=])/)?"def":"variableName.special":["[","]","(",")"].indexOf(e.peek())==-1?(e.eatSpace()||e.next(),null):(e.next(),"bracket")}}};export{r as ebnf};
function s(e){for(var n={},t=e.split(" "),r=0;r<t.length;++r)n[t[r]]=!0;return n}function b(e,n){return n.startOfLine?(e.skipToEnd(),"meta"):!1}var v=s("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"),x=s("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),k=s("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"),m=s("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),w=s("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),l=s("catch class do else finally for if switch try while"),E=s("true false null"),f={"#":b},h=/[+\-*&%=<>!?|\/]/,o;function c(e,n){var t=e.next();if(f[t]){var r=f[t](e,n);if(r!==!1)return r}if(t=='"'||t=="'")return n.tokenize=I(t),n.tokenize(e,n);if(/[\[\]{}\(\),;\:\.]/.test(t))return o=t,null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(t=="/"){if(e.eat("*"))return n.tokenize=y,y(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(h.test(t))return e.eatWhile(h),"operator";e.eatWhile(/[\w\$_]/);var a=e.current().toLowerCase();if(v.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"keyword";if(x.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"variable";if(k.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"modifier";if(m.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"type";if(w.propertyIsEnumerable(a))return l.propertyIsEnumerable(a)&&(o="newstatement"),"builtin";for(var i=a.length-1;i>=0&&(!isNaN(a[i])||a[i]=="_");)--i;if(i>0){var d=a.substr(0,i+1);if(m.propertyIsEnumerable(d))return l.propertyIsEnumerable(d)&&(o="newstatement"),"type"}return E.propertyIsEnumerable(a)?"atom":null}function I(e){return function(n,t){for(var r=!1,a,i=!1;(a=n.next())!=null;){if(a==e&&!r){i=!0;break}r=!r&&a=="\\"}return(i||!r)&&(t.tokenize=c),"string"}}function y(e,n){for(var t=!1,r;r=e.next();){if(r=="/"&&t){n.tokenize=c;break}t=r=="*"}return"comment"}function g(e,n,t,r,a){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=a}function p(e,n,t){return e.context=new g(e.indented,n,t,null,e.context)}function u(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const z={name:"ecl",startState:function(e){return{tokenize:null,context:new g(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align??(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;o=null;var r=(n.tokenize||c)(e,n);if(r=="comment"||r=="meta")return r;if(t.align??(t.align=!0),(o==";"||o==":")&&t.type=="statement")u(n);else if(o=="{")p(n,e.column(),"}");else if(o=="[")p(n,e.column(),"]");else if(o=="(")p(n,e.column(),")");else if(o=="}"){for(;t.type=="statement";)t=u(n);for(t.type=="}"&&(t=u(n));t.type=="statement";)t=u(n)}else o==t.type?u(n):(t.type=="}"||t.type=="top"||t.type=="statement"&&o=="newstatement")&&p(n,e.column(),"statement");return n.startOfLine=!1,r},indent:function(e,n,t){if(e.tokenize!=c&&e.tokenize!=null)return 0;var r=e.context,a=n&&n.charAt(0);r.type=="statement"&&a=="}"&&(r=r.prev);var i=a==r.type;return r.type=="statement"?r.indented+(a=="{"?0:t.unit):r.align?r.column+(i?0:1):r.indented+(i?0:t.unit)},languageData:{indentOnInput:/^\s*[{}]$/}};export{z as t};
import{t as e}from"./ecl-B8-j0xrP.js";export{e as ecl};

Sorry, the diff of this file is too big to display

import{t as e}from"./eiffel-DdiJ6Uyn.js";export{e as eiffel};
function o(e){for(var r={},t=0,n=e.length;t<n;++t)r[e[t]]=!0;return r}var s=o("note.across.when.variant.until.unique.undefine.then.strip.select.retry.rescue.require.rename.reference.redefine.prefix.once.old.obsolete.loop.local.like.is.inspect.infix.include.if.frozen.from.external.export.ensure.end.elseif.else.do.creation.create.check.alias.agent.separate.invariant.inherit.indexing.feature.expanded.deferred.class.Void.True.Result.Precursor.False.Current.create.attached.detachable.as.and.implies.not.or".split(".")),u=o([":=","and then","and","or","<<",">>"]);function c(e,r,t){return t.tokenize.push(e),e(r,t)}function f(e,r){if(e.eatSpace())return null;var t=e.next();return t=='"'||t=="'"?c(p(t,"string"),e,r):t=="-"&&e.eat("-")?(e.skipToEnd(),"comment"):t==":"&&e.eat("=")?"operator":/[0-9]/.test(t)?(e.eatWhile(/[xXbBCc0-9\.]/),e.eat(/[\?\!]/),"variable"):/[a-zA-Z_0-9]/.test(t)?(e.eatWhile(/[a-zA-Z_0-9]/),e.eat(/[\?\!]/),"variable"):/[=+\-\/*^%<>~]/.test(t)?(e.eatWhile(/[=+\-\/*^%<>~]/),"operator"):null}function p(e,r,t){return function(n,l){for(var a=!1,i;(i=n.next())!=null;){if(i==e&&(t||!a)){l.tokenize.pop();break}a=!a&&i=="%"}return r}}const d={name:"eiffel",startState:function(){return{tokenize:[f]}},token:function(e,r){var t=r.tokenize[r.tokenize.length-1](e,r);if(t=="variable"){var n=e.current();t=s.propertyIsEnumerable(e.current())?"keyword":u.propertyIsEnumerable(e.current())?"operator":/^[A-Z][A-Z_0-9]*$/g.test(n)?"tag":/^0[bB][0-1]+$/g.test(n)||/^0[cC][0-7]+$/g.test(n)||/^0[xX][a-fA-F0-9]+$/g.test(n)||/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(n)||/^[0-9]+$/g.test(n)?"number":"variable"}return t},languageData:{commentTokens:{line:"--"}}};export{d as t};
import{t as c}from"./createLucideIcon-CnW3RofX.js";var r=c("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);export{r as t};
import{t as c}from"./createLucideIcon-CnW3RofX.js";var e=c("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);export{e as t};
import{t as e}from"./elm-CAmK9rmL.js";export{e as elm};
function o(t,e,r){return e(r),r(t,e)}var p=/[a-z]/,m=/[A-Z]/,u=/[a-zA-Z0-9_]/,a=/[0-9]/,g=/[0-9A-Fa-f]/,f=/[-&*+.\\/<>=?^|:]/,x=/[(),[\]{}]/,k=/[ \v\f]/;function n(){return function(t,e){if(t.eatWhile(k))return null;var r=t.next();if(x.test(r))return r==="{"&&t.eat("-")?o(t,e,s(1)):r==="["&&t.match("glsl|")?o(t,e,T):"builtin";if(r==="'")return o(t,e,v);if(r==='"')return t.eat('"')?t.eat('"')?o(t,e,d):"string":o(t,e,h);if(m.test(r))return t.eatWhile(u),"type";if(p.test(r)){var i=t.pos===1;return t.eatWhile(u),i?"def":"variable"}if(a.test(r)){if(r==="0"){if(t.eat(/[xX]/))return t.eatWhile(g),"number"}else t.eatWhile(a);return t.eat(".")&&t.eatWhile(a),t.eat(/[eE]/)&&(t.eat(/[-+]/),t.eatWhile(a)),"number"}return f.test(r)?r==="-"&&t.eat("-")?(t.skipToEnd(),"comment"):(t.eatWhile(f),"keyword"):r==="_"?"keyword":"error"}}function s(t){return t==0?n():function(e,r){for(;!e.eol();){var i=e.next();if(i=="{"&&e.eat("-"))++t;else if(i=="-"&&e.eat("}")&&(--t,t===0))return r(n()),"comment"}return r(s(t)),"comment"}}function d(t,e){for(;!t.eol();)if(t.next()==='"'&&t.eat('"')&&t.eat('"'))return e(n()),"string";return"string"}function h(t,e){for(;t.skipTo('\\"');)t.next(),t.next();return t.skipTo('"')?(t.next(),e(n()),"string"):(t.skipToEnd(),e(n()),"error")}function v(t,e){for(;t.skipTo("\\'");)t.next(),t.next();return t.skipTo("'")?(t.next(),e(n()),"string"):(t.skipToEnd(),e(n()),"error")}function T(t,e){for(;!t.eol();)if(t.next()==="|"&&t.eat("]"))return e(n()),"string";return"string"}var W={case:1,of:1,as:1,if:1,then:1,else:1,let:1,in:1,type:1,alias:1,module:1,where:1,import:1,exposing:1,port:1};const y={name:"elm",startState:function(){return{f:n()}},copyState:function(t){return{f:t.f}},token:function(t,e){var r=e.f(t,function(c){e.f=c}),i=t.current();return W.hasOwnProperty(i)?"keyword":r},languageData:{commentTokens:{line:"--"}}};export{y as t};
function i(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,n=i(function(e){return a.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});export{i as n,n as t};
import{s as d}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-BGmjiNul.js";import{t as h}from"./compiler-runtime-DeeZ7FnK.js";import{t as u}from"./jsx-runtime-ZmTK25f3.js";var N=h(),g=d(p(),1),c=d(u(),1);const j=f=>{let e=(0,N.c)(15),{title:i,description:x,icon:m,action:n}=f,t;e[0]===m?t=e[1]:(t=m&&g.cloneElement(m,{className:"text-accent-foreground flex-shrink-0"}),e[0]=m,e[1]=t);let s;e[2]===i?s=e[3]:(s=(0,c.jsx)("span",{className:"mt-1 text-accent-foreground",children:i}),e[2]=i,e[3]=s);let r;e[4]!==t||e[5]!==s?(r=(0,c.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[t,s]}),e[4]=t,e[5]=s,e[6]=r):r=e[6];let l;e[7]===x?l=e[8]:(l=(0,c.jsx)("span",{className:"text-muted-foreground text-sm",children:x}),e[7]=x,e[8]=l);let a;e[9]===n?a=e[10]:(a=n&&(0,c.jsx)("div",{className:"mt-2",children:n}),e[9]=n,e[10]=a);let o;return e[11]!==r||e[12]!==l||e[13]!==a?(o=(0,c.jsxs)("div",{className:"mx-6 my-6 flex flex-col gap-2",children:[r,l,a]}),e[11]=r,e[12]=l,e[13]=a,e[14]=o):o=e[14],o};export{j as t};
import{n as g,t as y}from"./toDate-CgbKQM5E.js";var b={};function v(){return b}function w(t){let a=y(t),e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),t-+e}function p(t,...a){let e=g.bind(null,t||a.find(n=>typeof n=="object"));return a.map(e)}var M={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const W=(t,a,e)=>{let n,i=M[t];return n=typeof i=="string"?i:a===1?i.one:i.other.replace("{{count}}",a.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function m(t){return(a={})=>{let e=a.width?String(a.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const P={date:m({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:m({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:m({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var k={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const S=(t,a,e,n)=>k[t];function d(t){return(a,e)=>{let n=e!=null&&e.context?String(e.context):"standalone",i;if(n==="formatting"&&t.formattingValues){let r=t.defaultFormattingWidth||t.defaultWidth,o=e!=null&&e.width?String(e.width):r;i=t.formattingValues[o]||t.formattingValues[r]}else{let r=t.defaultWidth,o=e!=null&&e.width?String(e.width):t.defaultWidth;i=t.values[o]||t.values[r]}let u=t.argumentCallback?t.argumentCallback(a):a;return i[u]}}const C={ordinalNumber:(t,a)=>{let e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:d({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:d({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:d({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:d({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:d({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function l(t){return(a,e={})=>{let n=e.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],u=a.match(i);if(!u)return null;let r=u[0],o=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(o)?A(o,h=>h.test(r)):j(o,h=>h.test(r)),s;s=t.valueCallback?t.valueCallback(c):c,s=e.valueCallback?e.valueCallback(s):s;let f=a.slice(r.length);return{value:s,rest:f}}}function j(t,a){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&a(t[e]))return e}function A(t,a){for(let e=0;e<t.length;e++)if(a(t[e]))return e}function T(t){return(a,e={})=>{let n=a.match(t.matchPattern);if(!n)return null;let i=n[0],u=a.match(t.parsePattern);if(!u)return null;let r=t.valueCallback?t.valueCallback(u[0]):u[0];r=e.valueCallback?e.valueCallback(r):r;let o=a.slice(i.length);return{value:r,rest:o}}}const x={code:"en-US",formatDistance:W,formatLong:P,formatRelative:S,localize:C,match:{ordinalNumber:T({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};export{v as i,p as n,w as r,x as t};
var $;import"./purify.es-DNVQZNFu.js";import{u as vt}from"./src-Cf4NnJCp.js";import{c as Dt,g as Lt}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as h,r as x,t as Mt}from"./src-BKLwm2RN.js";import{$ as wt,B as Bt,C as Ft,U as Yt,_ as Pt,a as zt,b as J,v as Gt,z as Kt}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as Ut}from"./channel-Ca5LuXyQ.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import{r as Zt,t as Wt}from"./chunk-N4CR4FBY-eo9CRI73.js";import{t as jt}from"./chunk-55IACEB6-SrR0J56d.js";import{t as Qt}from"./chunk-QN33PNHL-C_hHv997.js";var ut=(function(){var i=h(function(r,u,c,s){for(c||(c={}),s=r.length;s--;c[r[s]]=u);return c},"o"),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],o=[1,10],y=[1,11],l=[1,12],a=[1,13],_=[1,20],m=[1,21],E=[1,22],v=[1,23],D=[1,24],N=[1,19],L=[1,25],U=[1,26],M=[1,18],tt=[1,33],et=[1,34],it=[1,35],st=[1,36],nt=[1,37],yt=[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],S=[1,43],w=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],T=[1,58],P=[1,62],z=[1,64],Z=[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],dt=[63,64,65,66,67],pt=[1,81],_t=[1,80],mt=[1,78],gt=[1,79],bt=[6,10,42,47],I=[6,10,13,41,42,47,48,49],W=[1,89],j=[1,88],Q=[1,87],G=[19,56],ft=[1,98],Et=[1,97],rt=[19,56,58,60],at={trace:h(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:h(function(r,u,c,s,d,t,K){var e=t.length-1;switch(d){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:s.addEntity(t[e-4]),s.addEntity(t[e-2]),s.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:s.addEntity(t[e-8]),s.addEntity(t[e-4]),s.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),s.setClass([t[e-8]],t[e-6]),s.setClass([t[e-4]],t[e-2]);break;case 10:s.addEntity(t[e-6]),s.addEntity(t[e-2]),s.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),s.setClass([t[e-6]],t[e-4]);break;case 11:s.addEntity(t[e-6]),s.addEntity(t[e-4]),s.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),s.setClass([t[e-4]],t[e-2]);break;case 12:s.addEntity(t[e-3]),s.addAttributes(t[e-3],t[e-1]);break;case 13:s.addEntity(t[e-5]),s.addAttributes(t[e-5],t[e-1]),s.setClass([t[e-5]],t[e-3]);break;case 14:s.addEntity(t[e-2]);break;case 15:s.addEntity(t[e-4]),s.setClass([t[e-4]],t[e-2]);break;case 16:s.addEntity(t[e]);break;case 17:s.addEntity(t[e-2]),s.setClass([t[e-2]],t[e]);break;case 18:s.addEntity(t[e-6],t[e-4]),s.addAttributes(t[e-6],t[e-1]);break;case 19:s.addEntity(t[e-8],t[e-6]),s.addAttributes(t[e-8],t[e-1]),s.setClass([t[e-8]],t[e-3]);break;case 20:s.addEntity(t[e-5],t[e-3]);break;case 21:s.addEntity(t[e-7],t[e-5]),s.setClass([t[e-7]],t[e-2]);break;case 22:s.addEntity(t[e-3],t[e-1]);break;case 23:s.addEntity(t[e-5],t[e-3]),s.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),s.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),s.setAccDescription(this.$);break;case 32:s.setDirection("TB");break;case 33:s.setDirection("BT");break;case 34:s.setDirection("RL");break;case 35:s.setDirection("LR");break;case 36:this.$=t[e-3],s.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],s.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],s.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.$=s.Cardinality.ZERO_OR_ONE;break;case 70:this.$=s.Cardinality.ZERO_OR_MORE;break;case 71:this.$=s.Cardinality.ONE_OR_MORE;break;case 72:this.$=s.Cardinality.ONLY_ONE;break;case 73:this.$=s.Cardinality.MD_PARENT;break;case 74:this.$=s.Identification.NON_IDENTIFYING;break;case 75:this.$=s.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:y,26:l,28:a,29:14,30:15,31:16,32:17,33:_,34:m,35:E,36:v,37:D,40:N,43:L,44:U,50:M},i(n,[2,7],{1:[2,1]}),i(n,[2,3]),{9:27,11:9,22:o,24:y,26:l,28:a,29:14,30:15,31:16,32:17,33:_,34:m,35:E,36:v,37:D,40:N,43:L,44:U,50:M},i(n,[2,5]),i(n,[2,6]),i(n,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:tt,64:et,65:it,66:st,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},i(n,[2,27]),i(n,[2,28]),i(n,[2,29]),i(n,[2,30]),i(n,[2,31]),i(yt,[2,54]),i(yt,[2,55]),i(n,[2,32]),i(n,[2,33]),i(n,[2,34]),i(n,[2,35]),{16:41,40:O,41:S},{16:44,40:O,41:S},{16:45,40:O,41:S},i(n,[2,4]),{11:46,40:N,50:M},{16:47,40:O,41:S},{18:48,19:[1,49],51:50,52:51,56:w},{11:53,40:N,50:M},{62:54,68:[1,55],69:[1,56]},i(B,[2,69]),i(B,[2,70]),i(B,[2,71]),i(B,[2,72]),i(B,[2,73]),i(n,[2,24]),i(n,[2,25]),i(n,[2,26]),{13:F,38:57,41:Y,42:T,45:59,46:60,48:P,49:z},i(Z,[2,37]),i(Z,[2,38]),{16:65,40:O,41:S,42:T},{13:F,38:66,41:Y,42:T,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},i(n,[2,17],{61:32,12:69,17:[1,70],42:T,63:tt,64:et,65:it,66:st,67:nt}),{19:[1,71]},i(n,[2,14]),{18:72,19:[2,56],51:50,52:51,56:w},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:tt,64:et,65:it,66:st,67:nt},i(dt,[2,74]),i(dt,[2,75]),{6:pt,10:_t,39:77,42:mt,47:gt},{40:[1,82],41:[1,83]},i(bt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),i(I,[2,45]),i(I,[2,50]),i(I,[2,51]),i(I,[2,52]),i(I,[2,53]),i(n,[2,41],{42:T}),{6:pt,10:_t,39:85,42:mt,47:gt},{14:86,40:W,50:j,70:Q},{16:90,40:O,41:S},{11:91,40:N,50:M},{18:92,19:[1,93],51:50,52:51,56:w},i(n,[2,12]),{19:[2,57]},i(G,[2,58],{54:94,55:95,57:96,59:ft,60:Et}),i([19,56,59,60],[2,63]),i(n,[2,22],{15:[1,100],17:[1,99]}),i([40,50],[2,68]),i(n,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},i(n,[2,47]),i(n,[2,48]),i(n,[2,49]),i(Z,[2,39]),i(Z,[2,40]),i(I,[2,46]),i(n,[2,42]),i(n,[2,8]),i(n,[2,76]),i(n,[2,77]),i(n,[2,78]),{13:[1,102],42:T},{13:[1,104],15:[1,103]},{19:[1,105]},i(n,[2,15]),i(G,[2,59],{55:106,58:[1,107],60:Et}),i(G,[2,60]),i(rt,[2,64]),i(G,[2,67]),i(rt,[2,66]),{18:108,19:[1,109],51:50,52:51,56:w},{16:110,40:O,41:S},i(bt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:W,50:j,70:Q},{16:112,40:O,41:S},{14:113,40:W,50:j,70:Q},i(n,[2,13]),i(G,[2,61]),{57:114,59:ft},{19:[1,115]},i(n,[2,20]),i(n,[2,23],{17:[1,116],42:T}),i(n,[2,11]),{13:[1,117],42:T},i(n,[2,10]),i(rt,[2,65]),i(n,[2,18]),{18:118,19:[1,119],51:50,52:51,56:w},{14:120,40:W,50:j,70:Q},{19:[1,121]},i(n,[2,21]),i(n,[2,9]),i(n,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:h(function(r,u){if(u.recoverable)this.trace(r);else{var c=Error(r);throw c.hash=u,c}},"parseError"),parse:h(function(r){var u=this,c=[0],s=[],d=[null],t=[],K=this.table,e="",q=0,kt=0,Ot=0,It=2,St=1,Ct=t.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(A.yy[ct]=this.yy[ct]);p.setInput(r,A.yy),A.yy.lexer=p,A.yy.parser=this,p.yylloc===void 0&&(p.yylloc={});var ot=p.yylloc;t.push(ot);var xt=p.options&&p.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $t(f){c.length-=2*f,d.length-=f,t.length-=f}h($t,"popStack");function Tt(){var f=s.pop()||p.lex()||St;return typeof f!="number"&&(f instanceof Array&&(s=f,f=s.pop()),f=u.symbols_[f]||f),f}h(Tt,"lex");for(var g,lt,R,b,ht,C={},H,k,Nt,V;;){if(R=c[c.length-1],this.defaultActions[R]?b=this.defaultActions[R]:(g??(g=Tt()),b=K[R]&&K[R][g]),b===void 0||!b.length||!b[0]){var At="";for(H in V=[],K[R])this.terminals_[H]&&H>It&&V.push("'"+this.terminals_[H]+"'");At=p.showPosition?"Parse error on line "+(q+1)+`:
`+p.showPosition()+`
Expecting `+V.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(q+1)+": Unexpected "+(g==St?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(At,{text:p.match,token:this.terminals_[g]||g,line:p.yylineno,loc:ot,expected:V})}if(b[0]instanceof Array&&b.length>1)throw Error("Parse Error: multiple actions possible at state: "+R+", token: "+g);switch(b[0]){case 1:c.push(g),d.push(p.yytext),t.push(p.yylloc),c.push(b[1]),g=null,lt?(g=lt,lt=null):(kt=p.yyleng,e=p.yytext,q=p.yylineno,ot=p.yylloc,Ot>0&&Ot--);break;case 2:if(k=this.productions_[b[1]][1],C.$=d[d.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},xt&&(C._$.range=[t[t.length-(k||1)].range[0],t[t.length-1].range[1]]),ht=this.performAction.apply(C,[e,kt,q,A.yy,b[1],d,t].concat(Ct)),ht!==void 0)return ht;k&&(c=c.slice(0,-1*k*2),d=d.slice(0,-1*k),t=t.slice(0,-1*k)),c.push(this.productions_[b[1]][0]),d.push(C.$),t.push(C._$),Nt=K[c[c.length-2]][c[c.length-1]],c.push(Nt);break;case 3:return!0}}return!0},"parse")};at.lexer=(function(){return{EOF:1,parseError:h(function(r,u){if(this.yy.parser)this.yy.parser.parseError(r,u);else throw Error(r)},"parseError"),setInput:h(function(r,u){return this.yy=u||this.yy||{},this._input=r,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 r=this._input[0];return this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r,r.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:h(function(r){var u=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var s=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 d=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===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),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(r){this.unput(this.match.slice(r))},"less"),pastInput:h(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var r=this.pastInput(),u=Array(r.length+1).join("-");return r+this.upcomingInput()+`
`+u+"^"},"showPosition"),test_match:h(function(r,u){var c,s,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),s=r[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],c=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in d)this[t]=d[t];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,u,c,s;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),t=0;t<d.length;t++)if(c=this._input.match(this.rules[d[t]]),c&&(!u||c[0].length>u[0].length)){if(u=c,s=t,this.options.backtrack_lexer){if(r=this.test_match(c,d[t]),r!==!1)return r;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(r=this.test_match(u,d[s]),r===!1?!1:r):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(){return this.next()||this.lex()},"lex"),begin:h(function(r){this.conditionStack.push(r)},"begin"),popState:h(function(){return this.conditionStack.length-1>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(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},"topState"),pushState:h(function(r){this.begin(r)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(r,u,c,s){switch(c){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 u.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 u.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}}}})();function X(){this.yy={}}return h(X,"Parser"),X.prototype=at,at.Parser=X,new X})();ut.parser=ut;var Xt=ut,qt=($=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=Bt,this.getAccTitle=Gt,this.setAccDescription=Kt,this.getAccDescription=Pt,this.setDiagramTitle=Yt,this.getDiagramTitle=Ft,this.getConfig=h(()=>J().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(n,o=""){var y;return this.entities.has(n)?!((y=this.entities.get(n))!=null&&y.alias)&&o&&(this.entities.get(n).alias=o,x.info(`Add alias '${o}' to entity '${n}'`)):(this.entities.set(n,{id:`entity-${n}-${this.entities.size}`,label:n,attributes:[],alias:o,shape:"erBox",look:J().look??"default",cssClasses:"default",cssStyles:[]}),x.info("Added new entity :",n)),this.entities.get(n)}getEntity(n){return this.entities.get(n)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(n,o){let y=this.addEntity(n),l;for(l=o.length-1;l>=0;l--)o[l].keys||(o[l].keys=[]),o[l].comment||(o[l].comment=""),y.attributes.push(o[l]),x.debug("Added attribute ",o[l].name)}addRelationship(n,o,y,l){let a=this.entities.get(n),_=this.entities.get(y);if(!a||!_)return;let m={entityA:a.id,roleA:o,entityB:_.id,relSpec:l};this.relationships.push(m),x.debug("Added new relationship :",m)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(n){this.direction=n}getCompiledStyles(n){let o=[];for(let y of n){let l=this.classes.get(y);l!=null&&l.styles&&(o=[...o,...l.styles??[]].map(a=>a.trim())),l!=null&&l.textStyles&&(o=[...o,...l.textStyles??[]].map(a=>a.trim()))}return o}addCssStyles(n,o){for(let y of n){let l=this.entities.get(y);if(!o||!l)return;for(let a of o)l.cssStyles.push(a)}}addClass(n,o){n.forEach(y=>{let l=this.classes.get(y);l===void 0&&(l={id:y,styles:[],textStyles:[]},this.classes.set(y,l)),o&&o.forEach(function(a){if(/color/.exec(a)){let _=a.replace("fill","bgFill");l.textStyles.push(_)}l.styles.push(a)})})}setClass(n,o){for(let y of n){let l=this.entities.get(y);if(l)for(let a of o)l.cssClasses+=" "+a}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],zt()}getData(){let n=[],o=[],y=J();for(let a of this.entities.keys()){let _=this.entities.get(a);_&&(_.cssCompiledStyles=this.getCompiledStyles(_.cssClasses.split(" ")),n.push(_))}let l=0;for(let a of this.relationships){let _={id:Dt(a.entityA,a.entityB,{prefix:"id",counter:l++}),type:"normal",curve:"basis",start:a.entityA,end:a.entityB,label:a.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:a.relSpec.cardB.toLowerCase(),arrowTypeEnd:a.relSpec.cardA.toLowerCase(),pattern:a.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:y.look};o.push(_)}return{nodes:n,edges:o,other:{},config:y,direction:"TB"}}},h($,"ErDB"),$),Rt={};Mt(Rt,{draw:()=>Ht});var Ht=h(async function(i,n,o,y){x.info("REF0:"),x.info("Drawing er diagram (unified)",n);let{securityLevel:l,er:a,layout:_}=J(),m=y.db.getData(),E=jt(n,l);m.type=y.type,m.layoutAlgorithm=Wt(_),m.config.flowchart.nodeSpacing=(a==null?void 0:a.nodeSpacing)||140,m.config.flowchart.rankSpacing=(a==null?void 0:a.rankSpacing)||80,m.direction=y.db.getDirection(),m.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],m.diagramId=n,await Zt(m,E),m.layoutAlgorithm==="elk"&&E.select(".edges").lower();let v=E.selectAll('[id*="-background"]');Array.from(v).length>0&&v.each(function(){let D=vt(this),N=D.attr("id").replace("-background",""),L=E.select(`#${CSS.escape(N)}`);if(!L.empty()){let U=L.attr("transform");D.attr("transform",U)}}),Lt.insertTitle(E,"erDiagramTitleText",(a==null?void 0:a.titleTopMargin)??25,y.db.getDiagramTitle()),Qt(E,8,"erDiagram",(a==null?void 0:a.useMaxWidth)??!0)},"draw"),Vt=h((i,n)=>{let o=Ut;return wt(o(i,"r"),o(i,"g"),o(i,"b"),n)},"fade"),Jt={parser:Xt,get db(){return new qt},renderer:Rt,styles:h(i=>`
.entityBox {
fill: ${i.mainBkg};
stroke: ${i.nodeBorder};
}
.relationshipLabelBox {
fill: ${i.tertiaryColor};
opacity: 0.7;
background-color: ${i.tertiaryColor};
rect {
opacity: 0.5;
}
}
.labelBkg {
background-color: ${Vt(i.tertiaryColor,.5)};
}
.edgeLabel .label {
fill: ${i.nodeBorder};
font-size: 14px;
}
.label {
font-family: ${i.fontFamily};
color: ${i.nodeTextColor||i.textColor};
}
.edge-pattern-dashed {
stroke-dasharray: 8,8;
}
.node rect,
.node circle,
.node ellipse,
.node polygon
{
fill: ${i.mainBkg};
stroke: ${i.nodeBorder};
stroke-width: 1px;
}
.relationshipLine {
stroke: ${i.lineColor};
stroke-width: 1;
fill: none;
}
.marker {
fill: none !important;
stroke: ${i.lineColor} !important;
stroke-width: 1;
}
`,"getStyles")};export{Jt as diagram};
import{t as r}from"./erlang-hqy6gURy.js";export{r as erlang};
var S=["-type","-spec","-export_type","-opaque"],z=["after","begin","catch","case","cond","end","fun","if","let","of","query","receive","try","when"],W=/[\->,;]/,E=["->",";",","],U=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],A=/[\+\-\*\/<>=\|:!]/,Z=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],q=/[<\(\[\{]/,m=["<<","(","[","{"],D=/[>\)\]\}]/,k=["}","]",")",">>"],N="is_atom.is_binary.is_bitstring.is_boolean.is_float.is_function.is_integer.is_list.is_number.is_pid.is_port.is_record.is_reference.is_tuple.atom.binary.bitstring.boolean.function.integer.list.number.pid.port.record.reference.tuple".split("."),O="abs.adler32.adler32_combine.alive.apply.atom_to_binary.atom_to_list.binary_to_atom.binary_to_existing_atom.binary_to_list.binary_to_term.bit_size.bitstring_to_list.byte_size.check_process_code.contact_binary.crc32.crc32_combine.date.decode_packet.delete_module.disconnect_node.element.erase.exit.float.float_to_list.garbage_collect.get.get_keys.group_leader.halt.hd.integer_to_list.internal_bif.iolist_size.iolist_to_binary.is_alive.is_atom.is_binary.is_bitstring.is_boolean.is_float.is_function.is_integer.is_list.is_number.is_pid.is_port.is_process_alive.is_record.is_reference.is_tuple.length.link.list_to_atom.list_to_binary.list_to_bitstring.list_to_existing_atom.list_to_float.list_to_integer.list_to_pid.list_to_tuple.load_module.make_ref.module_loaded.monitor_node.node.node_link.node_unlink.nodes.notalive.now.open_port.pid_to_list.port_close.port_command.port_connect.port_control.pre_loaded.process_flag.process_info.processes.purge_module.put.register.registered.round.self.setelement.size.spawn.spawn_link.spawn_monitor.spawn_opt.split_binary.statistics.term_to_binary.time.throw.tl.trunc.tuple_size.tuple_to_list.unlink.unregister.whereis".split("."),f=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,j=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;function C(t,e){if(e.in_string)return e.in_string=!v(t),i(e,t,"string");if(e.in_atom)return e.in_atom=!b(t),i(e,t,"atom");if(t.eatSpace())return i(e,t,"whitespace");if(!_(e)&&t.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return a(t.current(),S)?i(e,t,"type"):i(e,t,"attribute");var n=t.next();if(n=="%")return t.skipToEnd(),i(e,t,"comment");if(n==":")return i(e,t,"colon");if(n=="?")return t.eatSpace(),t.eatWhile(f),i(e,t,"macro");if(n=="#")return t.eatSpace(),t.eatWhile(f),i(e,t,"record");if(n=="$")return t.next()=="\\"&&!t.match(j)?i(e,t,"error"):i(e,t,"number");if(n==".")return i(e,t,"dot");if(n=="'"){if(!(e.in_atom=!b(t))){if(t.match(/\s*\/\s*[0-9]/,!1))return t.match(/\s*\/\s*[0-9]/,!0),i(e,t,"fun");if(t.match(/\s*\(/,!1)||t.match(/\s*:/,!1))return i(e,t,"function")}return i(e,t,"atom")}if(n=='"')return e.in_string=!v(t),i(e,t,"string");if(/[A-Z_Ø-ÞÀ-Ö]/.test(n))return t.eatWhile(f),i(e,t,"variable");if(/[a-z_ß-öø-ÿ]/.test(n)){if(t.eatWhile(f),t.match(/\s*\/\s*[0-9]/,!1))return t.match(/\s*\/\s*[0-9]/,!0),i(e,t,"fun");var r=t.current();return a(r,z)?i(e,t,"keyword"):a(r,U)?i(e,t,"operator"):t.match(/\s*\(/,!1)?a(r,O)&&(_(e).token!=":"||_(e,2).token=="erlang")?i(e,t,"builtin"):a(r,N)?i(e,t,"guard"):i(e,t,"function"):F(t)==":"?r=="erlang"?i(e,t,"builtin"):i(e,t,"function"):a(r,["true","false"])?i(e,t,"boolean"):i(e,t,"atom")}var c=/[0-9]/;return c.test(n)?(t.eatWhile(c),t.eat("#")?t.eatWhile(/[0-9a-zA-Z]/)||t.backUp(1):t.eat(".")&&(t.eatWhile(c)?t.eat(/[eE]/)&&(t.eat(/[-+]/)?t.eatWhile(c)||t.backUp(2):t.eatWhile(c)||t.backUp(1)):t.backUp(1)),i(e,t,"number")):g(t,q,m)?i(e,t,"open_paren"):g(t,D,k)?i(e,t,"close_paren"):y(t,W,E)?i(e,t,"separator"):y(t,A,Z)?i(e,t,"operator"):i(e,t,null)}function g(t,e,n){if(t.current().length==1&&e.test(t.current())){for(t.backUp(1);e.test(t.peek());)if(t.next(),a(t.current(),n))return!0;t.backUp(t.current().length-1)}return!1}function y(t,e,n){if(t.current().length==1&&e.test(t.current())){for(;e.test(t.peek());)t.next();for(;0<t.current().length;){if(a(t.current(),n))return!0;t.backUp(1)}t.next()}return!1}function v(t){return w(t,'"',"\\")}function b(t){return w(t,"'","\\")}function w(t,e,n){for(;!t.eol();){var r=t.next();if(r==e)return!0;r==n&&t.next()}return!1}function F(t){var e=t.match(/^\s*([^\s%])/,!1);return e?e[1]:""}function a(t,e){return-1<e.indexOf(t)}function i(t,e,n){switch(M(t,I(n,e)),n){case"atom":return"atom";case"attribute":return"attribute";case"boolean":return"atom";case"builtin":return"builtin";case"close_paren":return null;case"colon":return null;case"comment":return"comment";case"dot":return null;case"error":return"error";case"fun":return"meta";case"function":return"tag";case"guard":return"property";case"keyword":return"keyword";case"macro":return"macroName";case"number":return"number";case"open_paren":return null;case"operator":return"operator";case"record":return"bracket";case"separator":return null;case"string":return"string";case"type":return"def";case"variable":return"variable";default:return null}}function x(t,e,n,r){return{token:t,column:e,indent:n,type:r}}function I(t,e){return x(e.current(),e.column(),e.indentation(),t)}function L(t){return x(t,0,0,t)}function _(t,e){var n=t.tokenStack.length,r=e||1;return n<r?!1:t.tokenStack[n-r]}function M(t,e){e.type=="comment"||e.type=="whitespace"||(t.tokenStack=P(t.tokenStack,e),t.tokenStack=R(t.tokenStack))}function P(t,e){var n=t.length-1;return 0<n&&t[n].type==="record"&&e.type==="dot"?t.pop():(0<n&&t[n].type==="group"&&t.pop(),t.push(e)),t}function R(t){if(!t.length)return t;var e=t.length-1;if(t[e].type==="dot")return[];if(e>1&&t[e].type==="fun"&&t[e-1].token==="fun")return t.slice(0,e-1);switch(t[e].token){case"}":return s(t,{g:["{"]});case"]":return s(t,{i:["["]});case")":return s(t,{i:["("]});case">>":return s(t,{i:["<<"]});case"end":return s(t,{i:["begin","case","fun","if","receive","try"]});case",":return s(t,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return s(t,{r:["when"],m:["try","if","case","receive"]});case";":return s(t,{E:["case","fun","if","receive","try","when"]});case"catch":return s(t,{e:["try"]});case"of":return s(t,{e:["case"]});case"after":return s(t,{e:["receive","try"]});default:return t}}function s(t,e){for(var n in e)for(var r=t.length-1,c=e[n],o=r-1;-1<o;o--)if(a(t[o].token,c)){var u=t.slice(0,o);switch(n){case"m":return u.concat(t[o]).concat(t[r]);case"r":return u.concat(t[r]);case"i":return u;case"g":return u.concat(L("group"));case"E":return u.concat(t[o]);case"e":return u.concat(t[o])}}return n=="E"?[]:t}function $(t,e,n){var r,c=B(e),o=_(t,1),u=_(t,2);return t.in_string||t.in_atom?null:u?o.token=="when"?o.column+n.unit:c==="when"&&u.type==="function"?u.indent+n.unit:c==="("&&o.token==="fun"?o.column+3:c==="catch"&&(r=d(t,["try"]))?r.column:a(c,["end","after","of"])?(r=d(t,["begin","case","fun","if","receive","try"]),r?r.column:null):a(c,k)?(r=d(t,m),r?r.column:null):a(o.token,[",","|","||"])||a(c,[",","|","||"])?(r=G(t),r?r.column+r.token.length:n.unit):o.token=="->"?a(u.token,["receive","case","if","try"])?u.column+n.unit+n.unit:u.column+n.unit:a(o.token,m)?o.column+o.token.length:(r=H(t),l(r)?r.column+n.unit:0):0}function B(t){var e=t.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return l(e)&&e.index===0?e[0]:""}function G(t){var e=t.tokenStack.slice(0,-1),n=p(e,"type",["open_paren"]);return l(e[n])?e[n]:!1}function H(t){var e=t.tokenStack,n=p(e,"type",["open_paren","separator","keyword"]),r=p(e,"type",["operator"]);return l(n)&&l(r)&&n<r?e[n+1]:l(n)?e[n]:!1}function d(t,e){var n=t.tokenStack,r=p(n,"token",e);return l(n[r])?n[r]:!1}function p(t,e,n){for(var r=t.length-1;-1<r;r--)if(a(t[r][e],n))return r;return!1}function l(t){return t!==!1&&t!=null}const J={name:"erlang",startState(){return{tokenStack:[],in_string:!1,in_atom:!1}},token:C,indent:$,languageData:{commentTokens:{line:"%"}}};export{J as t};
import{s as j}from"./chunk-LvLJmgfZ.js";import{t as y}from"./react-BGmjiNul.js";import{t as N}from"./compiler-runtime-DeeZ7FnK.js";import{d as _}from"./hotkeys-BHHWjLlp.js";import{t as C}from"./jsx-runtime-ZmTK25f3.js";import{n as S,t as O}from"./cn-BKtXLv3a.js";import{a as E,c as F,i as V,l as A,n as D,s as T,t as q}from"./alert-dialog-DwQffb13.js";import{r as z}from"./errors-2SszdW9t.js";var g=N(),B=j(y(),1),r=j(C(),1);const G=b=>{let e=(0,g.c)(23),{error:l,className:t,action:a}=b,[n,c]=(0,B.useState)(!1);if(!l)return null;_.error(l);let s;e[0]===l?s=e[1]:(s=z(l),e[0]=l,e[1]=s);let o=s,f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>c(!0),e[2]=f):f=e[2];let i;e[3]===o?i=e[4]:(i=(0,r.jsx)("span",{className:"line-clamp-4",children:o}),e[3]=o,e[4]=i);let d;e[5]===a?d=e[6]:(d=a&&(0,r.jsx)("div",{className:"flex justify-end",children:a}),e[5]=a,e[6]=d);let m;e[7]!==t||e[8]!==i||e[9]!==d?(m=(0,r.jsxs)(v,{kind:"danger",className:t,clickable:!0,onClick:f,children:[i,d]}),e[7]=t,e[8]=i,e[9]=d,e[10]=m):m=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=(0,r.jsx)(F,{children:(0,r.jsx)(A,{className:"text-error",children:"Error"})}),e[11]=k):k=e[11];let h;e[12]===o?h=e[13]:(h=(0,r.jsx)(E,{asChild:!0,className:"text-error text-sm p-2 font-mono overflow-auto whitespace-pre-wrap",children:(0,r.jsx)("pre",{children:o})}),e[12]=o,e[13]=h);let w;e[14]===Symbol.for("react.memo_cache_sentinel")?(w=(0,r.jsx)(T,{children:(0,r.jsx)(D,{autoFocus:!0,onClick:()=>c(!1),children:"Ok"})}),e[14]=w):w=e[14];let x;e[15]===h?x=e[16]:(x=(0,r.jsxs)(V,{className:"max-w-[80%] max-h-[80%] overflow-hidden flex flex-col",children:[k,h,w]}),e[15]=h,e[16]=x);let p;e[17]!==n||e[18]!==x?(p=(0,r.jsx)(q,{open:n,onOpenChange:c,children:x}),e[17]=n,e[18]=x,e[19]=p):p=e[19];let u;return e[20]!==p||e[21]!==m?(u=(0,r.jsxs)(r.Fragment,{children:[m,p]}),e[20]=p,e[21]=m,e[22]=u):u=e[22],u};var H=S("text-sm p-2 border whitespace-pre-wrap overflow-hidden",{variants:{kind:{danger:"text-error border-(--red-6) shadow-md-solid shadow-error bg-(--red-1)",info:"text-primary border-(--blue-6) shadow-md-solid shadow-accent bg-(--blue-1)",warn:"border-(--yellow-6) bg-(--yellow-2) dark:bg-(--yellow-4) text-(--yellow-11) dark:text-(--yellow-12)"},clickable:{true:"cursor-pointer"}},compoundVariants:[{clickable:!0,kind:"danger",className:"hover:bg-(--red-3)"},{clickable:!0,kind:"info",className:"hover:bg-(--blue-3)"},{clickable:!0,kind:"warn",className:"hover:bg-(--yellow-3)"}],defaultVariants:{kind:"info"}});const v=b=>{let e=(0,g.c)(14),l,t,a,n,c;e[0]===b?(l=e[1],t=e[2],a=e[3],n=e[4],c=e[5]):({kind:n,clickable:a,className:t,children:l,...c}=b,e[0]=b,e[1]=l,e[2]=t,e[3]=a,e[4]=n,e[5]=c);let s;e[6]!==t||e[7]!==a||e[8]!==n?(s=O(H({kind:n,clickable:a}),t),e[6]=t,e[7]=a,e[8]=n,e[9]=s):s=e[9];let o;return e[10]!==l||e[11]!==c||e[12]!==s?(o=(0,r.jsx)("div",{className:s,...c,children:l}),e[10]=l,e[11]=c,e[12]=s,e[13]=o):o=e[13],o};export{G as n,v as t};
import{s as i}from"./chunk-LvLJmgfZ.js";import"./useEvent-DO6uJBas.js";import{t as l}from"./react-BGmjiNul.js";import{D as a}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as s}from"./compiler-runtime-DeeZ7FnK.js";import"./config-CIrPQIbt.js";import{t as c}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{t as d}from"./createLucideIcon-CnW3RofX.js";import{t as h}from"./MarimoErrorOutput-5rudBbo3.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import"./Combination-CMPwuAmi.js";import{n as f}from"./cell-link-Bw5bzt4a.js";import{t as n}from"./empty-state-h8C2C6hZ.js";var x=d("party-popper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]),y=s();l();var r=i(c(),1),k=()=>{let t=(0,y.c)(5),e=a();if(e.length===0){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=(0,r.jsx)(n,{title:"No errors!",icon:(0,r.jsx)(x,{})}),t[0]=p):p=t[0],p}let o;t[1]===e?o=t[2]:(o=e.map(u),t[1]=e,t[2]=o);let m;return t[3]===o?m=t[4]:(m=(0,r.jsx)("div",{className:"flex flex-col h-full overflow-auto",children:o}),t[3]=o,t[4]=m),m};function u(t){return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs font-mono font-semibold bg-muted border-y px-2 py-1",children:(0,r.jsx)(f,{cellId:t.cellId})}),(0,r.jsx)("div",{className:"px-2",children:(0,r.jsx)(h,{errors:t.output.data,cellId:t.cellId},t.cellId)},t.cellId)]},t.cellId)}export{k as default};
import{s as h}from"./chunk-LvLJmgfZ.js";import{t as f}from"./react-BGmjiNul.js";import{t as y}from"./compiler-runtime-DeeZ7FnK.js";import{n as x}from"./constants-B6Cb__3x.js";import{t as E}from"./jsx-runtime-ZmTK25f3.js";import{t as g}from"./button-YC1gW_kJ.js";var i=h(f()),m=(0,i.createContext)(null),u={didCatch:!1,error:null},v=class extends i.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=u}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(e!==null){var r,t,o=[...arguments];(r=(t=this.props).onReset)==null||r.call(t,{args:o,reason:"imperative-api"}),this.setState(u)}}componentDidCatch(e,r){var t,o;(t=(o=this.props).onError)==null||t.call(o,e,r)}componentDidUpdate(e,r){let{didCatch:t}=this.state,{resetKeys:o}=this.props;if(t&&r.error!==null&&b(e.resetKeys,o)){var s,n;(s=(n=this.props).onReset)==null||s.call(n,{next:o,prev:e.resetKeys,reason:"keys"}),this.setState(u)}}render(){let{children:e,fallbackRender:r,FallbackComponent:t,fallback:o}=this.props,{didCatch:s,error:n}=this.state,a=e;if(s){let l={error:n,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")a=r(l);else if(t)a=(0,i.createElement)(t,l);else if(o!==void 0)a=o;else throw n}return(0,i.createElement)(m.Provider,{value:{didCatch:s,error:n,resetErrorBoundary:this.resetErrorBoundary}},a)}};function b(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==r.length||e.some((t,o)=>!Object.is(t,r[o]))}function B(e){if(e==null||typeof e.didCatch!="boolean"||typeof e.resetErrorBoundary!="function")throw Error("ErrorBoundaryContext not found")}function C(){let e=(0,i.useContext)(m);B(e);let[r,t]=(0,i.useState)({error:null,hasError:!1}),o=(0,i.useMemo)(()=>({resetBoundary:()=>{e.resetErrorBoundary(),t({error:null,hasError:!1})},showBoundary:s=>t({error:s,hasError:!0})}),[e.resetErrorBoundary]);if(r.hasError)throw r.error;return o}var p=y(),d=h(E(),1);const w=e=>{let r=(0,p.c)(2),t;return r[0]===e.children?t=r[1]:(t=(0,d.jsx)(v,{FallbackComponent:j,children:e.children}),r[0]=e.children,r[1]=t),t};var j=e=>{var c;let r=(0,p.c)(9),t;r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,d.jsx)("h1",{className:"text-2xl font-bold",children:"Something went wrong"}),r[0]=t):t=r[0];let o=(c=e.error)==null?void 0:c.message,s;r[1]===o?s=r[2]:(s=(0,d.jsx)("pre",{className:"text-xs bg-muted/40 border rounded-md p-4 max-w-[80%] whitespace-normal",children:o}),r[1]=o,r[2]=s);let n;r[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,d.jsxs)("div",{children:["If this is an issue with marimo, please report it on"," ",(0,d.jsx)("a",{href:x.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]}),r[3]=n):n=r[3];let a;r[4]===e.resetErrorBoundary?a=r[5]:(a=(0,d.jsx)(g,{"data-testid":"reset-error-boundary-button",onClick:e.resetErrorBoundary,variant:"outline",children:"Try again"}),r[4]=e.resetErrorBoundary,r[5]=a);let l;return r[6]!==s||r[7]!==a?(l=(0,d.jsxs)("div",{className:"flex-1 flex items-center justify-center flex-col space-y-4 max-w-2xl mx-auto px-6",children:[t,s,n,a]}),r[6]=s,r[7]=a,r[8]=l):l=r[8],l};export{C as n,w as t};
import{P as n,R as c}from"./zod-Cg4WLWh2.js";var s=n({detail:c()}),o=n({error:c()});function i(r){if(!r)return"Unknown error";if(r instanceof Error){let e=s.safeParse(r.cause);return e.success?e.data.detail:u(r.message)}if(typeof r=="object"){let e=s.safeParse(r);if(e.success)return e.data.detail;let t=o.safeParse(r);if(t.success)return t.data.error}try{return JSON.stringify(r)}catch{return String(r)}}function u(r){let e=l(r);if(!e)return r;let t=s.safeParse(e);if(t.success)return t.data.detail;let a=o.safeParse(e);return a.success?a.data.error:r}function l(r){try{return JSON.parse(r)}catch{return r}}var f=class extends Error{constructor(r="The cell containing this UI element has not been run yet. Please run the cell first."){super(r),this.name="CellNotInitializedError"}},d=class extends Error{constructor(r="Not yet connected to a kernel."){super(r),this.name="NoKernelConnectedError"}};export{d as n,i as r,f as t};
import{s as sa,t as ci}from"./chunk-LvLJmgfZ.js";import{t as ri}from"./react-BGmjiNul.js";import{t as si}from"./createLucideIcon-CnW3RofX.js";import{n as O}from"./Combination-CMPwuAmi.js";import{t as di}from"./prop-types-BiQYf0aU.js";var mi=si("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);function vi({path:a,delimiter:i,initialPath:t,restrictNavigation:n}){let e=a.match(/^[\dA-Za-z]+:\/\//),o=/^[A-Za-z]:\\/.test(a),m=e?e[0]:o?a.slice(0,3):"/",c=(o||e?a.slice(m.length):a).split(i).filter(Boolean),d=[];if(o)for(let f=c.length;f>=0;f--){let h=m+c.slice(0,f).join(i);d.push(h)}else{let f=m;for(let h=0;h<=c.length;h++){let j=f+c.slice(0,h).join(i);d.push(j),h<c.length&&!f.endsWith(i)&&(f+=i)}d.reverse()}return n&&(d=d.filter(f=>f.startsWith(t))),{protocol:m,parentDirectories:d}}function ui(a){let i=a.lastIndexOf(".");return[i>0?a.slice(0,i):a,i>0?a.slice(i):""]}const xi=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function S(a,i,t){let n=fi(a),{webkitRelativePath:e}=a,o=typeof i=="string"?i:typeof e=="string"&&e.length>0?e:`./${a.name}`;return typeof n.path!="string"&&Ia(n,"path",o),t!==void 0&&Object.defineProperty(n,"handle",{value:t,writable:!1,configurable:!1,enumerable:!0}),Ia(n,"relativePath",o),n}function fi(a){let{name:i}=a;if(i&&i.lastIndexOf(".")!==-1&&!a.type){let t=i.split(".").pop().toLowerCase(),n=xi.get(t);n&&Object.defineProperty(a,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return a}function Ia(a,i,t){Object.defineProperty(a,i,{value:t,writable:!1,configurable:!1,enumerable:!0})}var gi=[".DS_Store","Thumbs.db"];function bi(a){return O(this,void 0,void 0,function*(){return N(a)&&hi(a.dataTransfer)?ji(a.dataTransfer,a.type):yi(a)?wi(a):Array.isArray(a)&&a.every(i=>"getFile"in i&&typeof i.getFile=="function")?ki(a):[]})}function hi(a){return N(a)}function yi(a){return N(a)&&N(a.target)}function N(a){return typeof a=="object"&&!!a}function wi(a){return da(a.target.files).map(i=>S(i))}function ki(a){return O(this,void 0,void 0,function*(){return(yield Promise.all(a.map(i=>i.getFile()))).map(i=>S(i))})}function ji(a,i){return O(this,void 0,void 0,function*(){if(a.items){let t=da(a.items).filter(n=>n.kind==="file");return i==="drop"?Ta(Ma(yield Promise.all(t.map(zi)))):t}return Ta(da(a.files).map(t=>S(t)))})}function Ta(a){return a.filter(i=>gi.indexOf(i.name)===-1)}function da(a){if(a===null)return[];let i=[];for(let t=0;t<a.length;t++){let n=a[t];i.push(n)}return i}function zi(a){if(typeof a.webkitGetAsEntry!="function")return La(a);let i=a.webkitGetAsEntry();return i&&i.isDirectory?_a(i):La(a,i)}function Ma(a){return a.reduce((i,t)=>[...i,...Array.isArray(t)?Ma(t):[t]],[])}function La(a,i){return O(this,void 0,void 0,function*(){if(globalThis.isSecureContext&&typeof a.getAsFileSystemHandle=="function"){let n=yield a.getAsFileSystemHandle();if(n===null)throw Error(`${a} is not a File`);if(n!==void 0){let e=yield n.getFile();return e.handle=n,S(e)}}let t=a.getAsFile();if(!t)throw Error(`${a} is not a File`);return S(t,(i==null?void 0:i.fullPath)??void 0)})}function Di(a){return O(this,void 0,void 0,function*(){return a.isDirectory?_a(a):Oi(a)})}function _a(a){let i=a.createReader();return new Promise((t,n)=>{let e=[];function o(){i.readEntries(m=>O(this,void 0,void 0,function*(){if(m.length){let c=Promise.all(m.map(Di));e.push(c),o()}else try{t(yield Promise.all(e))}catch(c){n(c)}}),m=>{n(m)})}o()})}function Oi(a){return O(this,void 0,void 0,function*(){return new Promise((i,t)=>{a.file(n=>{i(S(n,a.fullPath))},n=>{t(n)})})})}var ma=sa(ci((a=>{a.__esModule=!0,a.default=function(i,t){if(i&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var e=i.name||"",o=(i.type||"").toLowerCase(),m=o.replace(/\/.*$/,"");return n.some(function(c){var d=c.trim().toLowerCase();return d.charAt(0)==="."?e.toLowerCase().endsWith(d):d.endsWith("/*")?m===d.replace(/\/.*$/,""):o===d})}return!0}}))());function $a(a){return Fi(a)||Ai(a)||Wa(a)||Ei()}function Ei(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ai(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Fi(a){if(Array.isArray(a))return va(a)}function Ba(a,i){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);i&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})),t.push.apply(t,n)}return t}function Ka(a){for(var i=1;i<arguments.length;i++){var t=arguments[i]==null?{}:arguments[i];i%2?Ba(Object(t),!0).forEach(function(n){Ha(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Ba(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function Ha(a,i,t){return i in a?Object.defineProperty(a,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[i]=t,a}function M(a,i){return Si(a)||Pi(a,i)||Wa(a,i)||qi()}function qi(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wa(a,i){if(a){if(typeof a=="string")return va(a,i);var t=Object.prototype.toString.call(a).slice(8,-1);if(t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set")return Array.from(a);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return va(a,i)}}function va(a,i){(i==null||i>a.length)&&(i=a.length);for(var t=0,n=Array(i);t<i;t++)n[t]=a[t];return n}function Pi(a,i){var t=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(t!=null){var n=[],e=!0,o=!1,m,c;try{for(t=t.call(a);!(e=(m=t.next()).done)&&(n.push(m.value),!(i&&n.length===i));e=!0);}catch(d){o=!0,c=d}finally{try{!e&&t.return!=null&&t.return()}finally{if(o)throw c}}return n}}function Si(a){if(Array.isArray(a))return a}var Ci=typeof ma.default=="function"?ma.default:ma.default.default,Ri="file-invalid-type",Ii="file-too-large",Ti="file-too-small",Mi="too-many-files",Li=function(){var a=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split(",");return{code:Ri,message:`File type must be ${a.length>1?`one of ${a.join(", ")}`:a[0]}`}},Na=function(a){return{code:Ii,message:`File is larger than ${a} ${a===1?"byte":"bytes"}`}},Ua=function(a){return{code:Ti,message:`File is smaller than ${a} ${a===1?"byte":"bytes"}`}},_i={code:Mi,message:"Too many files"};function Ga(a,i){var t=a.type==="application/x-moz-file"||Ci(a,i);return[t,t?null:Li(i)]}function Za(a,i,t){if(E(a.size))if(E(i)&&E(t)){if(a.size>t)return[!1,Na(t)];if(a.size<i)return[!1,Ua(i)]}else{if(E(i)&&a.size<i)return[!1,Ua(i)];if(E(t)&&a.size>t)return[!1,Na(t)]}return[!0,null]}function E(a){return a!=null}function $i(a){var i=a.files,t=a.accept,n=a.minSize,e=a.maxSize,o=a.multiple,m=a.maxFiles,c=a.validator;return!o&&i.length>1||o&&m>=1&&i.length>m?!1:i.every(function(d){var f=M(Ga(d,t),1)[0],h=M(Za(d,n,e),1)[0],j=c?c(d):null;return f&&h&&!j})}function U(a){return typeof a.isPropagationStopped=="function"?a.isPropagationStopped():a.cancelBubble===void 0?!1:a.cancelBubble}function G(a){return a.dataTransfer?Array.prototype.some.call(a.dataTransfer.types,function(i){return i==="Files"||i==="application/x-moz-file"}):!!a.target&&!!a.target.files}function Va(a){a.preventDefault()}function Bi(a){return a.indexOf("MSIE")!==-1||a.indexOf("Trident/")!==-1}function Ki(a){return a.indexOf("Edge/")!==-1}function Hi(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Bi(a)||Ki(a)}function k(){var a=[...arguments];return function(i){var t=[...arguments].slice(1);return a.some(function(n){return!U(i)&&n&&n.apply(void 0,[i].concat(t)),U(i)})}}function Wi(){return"showOpenFilePicker"in window}function Ni(a){return E(a)?[{description:"Files",accept:Object.entries(a).filter(function(i){var t=M(i,2),n=t[0],e=t[1],o=!0;return Ya(n)||(console.warn(`Skipped "${n}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),o=!1),(!Array.isArray(e)||!e.every(Ja))&&(console.warn(`Skipped "${n}" because an invalid file extension was provided.`),o=!1),o}).reduce(function(i,t){var n=M(t,2),e=n[0],o=n[1];return Ka(Ka({},i),{},Ha({},e,o))},{})}]:a}function Ui(a){if(E(a))return Object.entries(a).reduce(function(i,t){var n=M(t,2),e=n[0],o=n[1];return[].concat($a(i),[e],$a(o))},[]).filter(function(i){return Ya(i)||Ja(i)}).join(",")}function Gi(a){return a instanceof DOMException&&(a.name==="AbortError"||a.code===a.ABORT_ERR)}function Zi(a){return a instanceof DOMException&&(a.name==="SecurityError"||a.code===a.SECURITY_ERR)}function Ya(a){return a==="audio/*"||a==="video/*"||a==="image/*"||a==="text/*"||a==="application/*"||/\w+\/[-+.\w]+/g.test(a)}function Ja(a){return/^.*\.[\w]+$/.test(a)}var r=sa(ri()),s=sa(di()),Vi=["children"],Yi=["open"],Ji=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Qi=["refKey","onChange","onClick"];function Xi(a){return tt(a)||it(a)||Qa(a)||at()}function at(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function it(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function tt(a){if(Array.isArray(a))return xa(a)}function ua(a,i){return et(a)||pt(a,i)||Qa(a,i)||nt()}function nt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qa(a,i){if(a){if(typeof a=="string")return xa(a,i);var t=Object.prototype.toString.call(a).slice(8,-1);if(t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set")return Array.from(a);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xa(a,i)}}function xa(a,i){(i==null||i>a.length)&&(i=a.length);for(var t=0,n=Array(i);t<i;t++)n[t]=a[t];return n}function pt(a,i){var t=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(t!=null){var n=[],e=!0,o=!1,m,c;try{for(t=t.call(a);!(e=(m=t.next()).done)&&(n.push(m.value),!(i&&n.length===i));e=!0);}catch(d){o=!0,c=d}finally{try{!e&&t.return!=null&&t.return()}finally{if(o)throw c}}return n}}function et(a){if(Array.isArray(a))return a}function Xa(a,i){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);i&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})),t.push.apply(t,n)}return t}function v(a){for(var i=1;i<arguments.length;i++){var t=arguments[i]==null?{}:arguments[i];i%2?Xa(Object(t),!0).forEach(function(n){fa(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Xa(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function fa(a,i,t){return i in a?Object.defineProperty(a,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[i]=t,a}function Z(a,i){if(a==null)return{};var t=ot(a,i),n,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);for(e=0;e<o.length;e++)n=o[e],!(i.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(a,n)&&(t[n]=a[n])}return t}function ot(a,i){if(a==null)return{};var t={},n=Object.keys(a),e,o;for(o=0;o<n.length;o++)e=n[o],!(i.indexOf(e)>=0)&&(t[e]=a[e]);return t}var ga=(0,r.forwardRef)(function(a,i){var t=a.children,n=ii(Z(a,Vi)),e=n.open,o=Z(n,Yi);return(0,r.useImperativeHandle)(i,function(){return{open:e}},[e]),r.createElement(r.Fragment,null,t(v(v({},o),{},{open:e})))});ga.displayName="Dropzone";var ai={disabled:!1,getFilesFromEvent:bi,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ga.defaultProps=ai,ga.propTypes={children:s.default.func,accept:s.default.objectOf(s.default.arrayOf(s.default.string)),multiple:s.default.bool,preventDropOnDocument:s.default.bool,noClick:s.default.bool,noKeyboard:s.default.bool,noDrag:s.default.bool,noDragEventsBubbling:s.default.bool,minSize:s.default.number,maxSize:s.default.number,maxFiles:s.default.number,disabled:s.default.bool,getFilesFromEvent:s.default.func,onFileDialogCancel:s.default.func,onFileDialogOpen:s.default.func,useFsAccessApi:s.default.bool,autoFocus:s.default.bool,onDragEnter:s.default.func,onDragLeave:s.default.func,onDragOver:s.default.func,onDrop:s.default.func,onDropAccepted:s.default.func,onDropRejected:s.default.func,onError:s.default.func,validator:s.default.func};var ba={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ii(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=v(v({},ai),a),t=i.accept,n=i.disabled,e=i.getFilesFromEvent,o=i.maxSize,m=i.minSize,c=i.multiple,d=i.maxFiles,f=i.onDragEnter,h=i.onDragLeave,j=i.onDragOver,V=i.onDrop,Y=i.onDropAccepted,J=i.onDropRejected,Q=i.onFileDialogCancel,X=i.onFileDialogOpen,ha=i.useFsAccessApi,ya=i.autoFocus,aa=i.preventDropOnDocument,wa=i.noClick,ia=i.noKeyboard,ka=i.noDrag,z=i.noDragEventsBubbling,ta=i.onError,C=i.validator,R=(0,r.useMemo)(function(){return Ui(t)},[t]),ja=(0,r.useMemo)(function(){return Ni(t)},[t]),na=(0,r.useMemo)(function(){return typeof X=="function"?X:ti},[X]),L=(0,r.useMemo)(function(){return typeof Q=="function"?Q:ti},[Q]),g=(0,r.useRef)(null),y=(0,r.useRef)(null),za=ua((0,r.useReducer)(lt,ba),2),pa=za[0],b=za[1],ni=pa.isFocused,Da=pa.isFileDialogActive,_=(0,r.useRef)(typeof window<"u"&&window.isSecureContext&&ha&&Wi()),Oa=function(){!_.current&&Da&&setTimeout(function(){y.current&&(y.current.files.length||(b({type:"closeDialog"}),L()))},300)};(0,r.useEffect)(function(){return window.addEventListener("focus",Oa,!1),function(){window.removeEventListener("focus",Oa,!1)}},[y,Da,L,_]);var A=(0,r.useRef)([]),Ea=function(p){g.current&&g.current.contains(p.target)||(p.preventDefault(),A.current=[])};(0,r.useEffect)(function(){return aa&&(document.addEventListener("dragover",Va,!1),document.addEventListener("drop",Ea,!1)),function(){aa&&(document.removeEventListener("dragover",Va),document.removeEventListener("drop",Ea))}},[g,aa]),(0,r.useEffect)(function(){return!n&&ya&&g.current&&g.current.focus(),function(){}},[g,ya,n]);var D=(0,r.useCallback)(function(p){ta?ta(p):console.error(p)},[ta]),Aa=(0,r.useCallback)(function(p){p.preventDefault(),p.persist(),H(p),A.current=[].concat(Xi(A.current),[p.target]),G(p)&&Promise.resolve(e(p)).then(function(l){if(!(U(p)&&!z)){var u=l.length,x=u>0&&$i({files:l,accept:R,minSize:m,maxSize:o,multiple:c,maxFiles:d,validator:C});b({isDragAccept:x,isDragReject:u>0&&!x,isDragActive:!0,type:"setDraggedFiles"}),f&&f(p)}}).catch(function(l){return D(l)})},[e,f,D,z,R,m,o,c,d,C]),Fa=(0,r.useCallback)(function(p){p.preventDefault(),p.persist(),H(p);var l=G(p);if(l&&p.dataTransfer)try{p.dataTransfer.dropEffect="copy"}catch{}return l&&j&&j(p),!1},[j,z]),qa=(0,r.useCallback)(function(p){p.preventDefault(),p.persist(),H(p);var l=A.current.filter(function(x){return g.current&&g.current.contains(x)}),u=l.indexOf(p.target);u!==-1&&l.splice(u,1),A.current=l,!(l.length>0)&&(b({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),G(p)&&h&&h(p))},[g,h,z]),$=(0,r.useCallback)(function(p,l){var u=[],x=[];p.forEach(function(w){var P=ua(Ga(w,R),2),oa=P[0],la=P[1],W=ua(Za(w,m,o),2),ca=W[0],ra=W[1],I=C?C(w):null;if(oa&&ca&&!I)u.push(w);else{var T=[la,ra];I&&(T=T.concat(I)),x.push({file:w,errors:T.filter(function(li){return li})})}}),(!c&&u.length>1||c&&d>=1&&u.length>d)&&(u.forEach(function(w){x.push({file:w,errors:[_i]})}),u.splice(0)),b({acceptedFiles:u,fileRejections:x,isDragReject:x.length>0,type:"setFiles"}),V&&V(u,x,l),x.length>0&&J&&J(x,l),u.length>0&&Y&&Y(u,l)},[b,c,R,m,o,d,V,Y,J,C]),B=(0,r.useCallback)(function(p){p.preventDefault(),p.persist(),H(p),A.current=[],G(p)&&Promise.resolve(e(p)).then(function(l){U(p)&&!z||$(l,p)}).catch(function(l){return D(l)}),b({type:"reset"})},[e,$,D,z]),F=(0,r.useCallback)(function(){if(_.current){b({type:"openDialog"}),na();var p={multiple:c,types:ja};window.showOpenFilePicker(p).then(function(l){return e(l)}).then(function(l){$(l,null),b({type:"closeDialog"})}).catch(function(l){Gi(l)?(L(l),b({type:"closeDialog"})):Zi(l)?(_.current=!1,y.current?(y.current.value=null,y.current.click()):D(Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):D(l)});return}y.current&&(b({type:"openDialog"}),na(),y.current.value=null,y.current.click())},[b,na,L,ha,$,D,ja,c]),Pa=(0,r.useCallback)(function(p){!g.current||!g.current.isEqualNode(p.target)||(p.key===" "||p.key==="Enter"||p.keyCode===32||p.keyCode===13)&&(p.preventDefault(),F())},[g,F]),Sa=(0,r.useCallback)(function(){b({type:"focus"})},[]),Ca=(0,r.useCallback)(function(){b({type:"blur"})},[]),Ra=(0,r.useCallback)(function(){wa||(Hi()?setTimeout(F,0):F())},[wa,F]),q=function(p){return n?null:p},ea=function(p){return ia?null:q(p)},K=function(p){return ka?null:q(p)},H=function(p){z&&p.stopPropagation()},pi=(0,r.useMemo)(function(){return function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=p.refKey,u=l===void 0?"ref":l,x=p.role,w=p.onKeyDown,P=p.onFocus,oa=p.onBlur,la=p.onClick,W=p.onDragEnter,ca=p.onDragOver,ra=p.onDragLeave,I=p.onDrop,T=Z(p,Ji);return v(v(fa({onKeyDown:ea(k(w,Pa)),onFocus:ea(k(P,Sa)),onBlur:ea(k(oa,Ca)),onClick:q(k(la,Ra)),onDragEnter:K(k(W,Aa)),onDragOver:K(k(ca,Fa)),onDragLeave:K(k(ra,qa)),onDrop:K(k(I,B)),role:typeof x=="string"&&x!==""?x:"presentation"},u,g),!n&&!ia?{tabIndex:0}:{}),T)}},[g,Pa,Sa,Ca,Ra,Aa,Fa,qa,B,ia,ka,n]),ei=(0,r.useCallback)(function(p){p.stopPropagation()},[]),oi=(0,r.useMemo)(function(){return function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=p.refKey,u=l===void 0?"ref":l,x=p.onChange,w=p.onClick,P=Z(p,Qi);return v(v({},fa({accept:R,multiple:c,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:q(k(x,B)),onClick:q(k(w,ei)),tabIndex:-1},u,y)),P)}},[y,t,c,B,n]);return v(v({},pa),{},{isFocused:ni&&!n,getRootProps:pi,getInputProps:oi,rootRef:g,inputRef:y,open:q(F)})}function lt(a,i){switch(i.type){case"focus":return v(v({},a),{},{isFocused:!0});case"blur":return v(v({},a),{},{isFocused:!1});case"openDialog":return v(v({},ba),{},{isFileDialogActive:!0});case"closeDialog":return v(v({},a),{},{isFileDialogActive:!1});case"setDraggedFiles":return v(v({},a),{},{isDragActive:i.isDragActive,isDragAccept:i.isDragAccept,isDragReject:i.isDragReject});case"setFiles":return v(v({},a),{},{acceptedFiles:i.acceptedFiles,fileRejections:i.fileRejections,isDragReject:i.isDragReject});case"reset":return v({},ba);default:return a}}function ti(){}export{mi as i,ui as n,vi as r,ii as t};

Sorry, the diff of this file is too big to display

import{s as J}from"./chunk-LvLJmgfZ.js";import{t as lt}from"./react-BGmjiNul.js";import{t as ht}from"./jsx-runtime-ZmTK25f3.js";import{Bt as A,Dt as ut,E as dt,Et as mt,I as ft,J as e,P as pt,Pt as gt,St as j,V as P,_ as R,a as bt,at as b,bt as V,dt as vt,ft as q,m as St,pt as kt,qt as yt,vt as Ct,w as xt,wt,yt as Et}from"./dist-DBwNzi3C.js";import{C as Tt,_ as Q,g as X,i as Wt,l as Mt,r as Lt,y as Y}from"./dist-CtsanegT.js";import{a as Bt,c as Nt,i as Ht,r as Ot}from"./dist-ChS0Dc_R.js";import{t as Dt}from"./extends-B2LJnKU3.js";import{t as Kt}from"./objectWithoutPropertiesLoose-DaPAPabU.js";var Z=function(t){t===void 0&&(t={});var{crosshairCursor:i=!1}=t,a=[];t.closeBracketsKeymap!==!1&&(a=a.concat(Bt)),t.defaultKeymap!==!1&&(a=a.concat(X)),t.searchKeymap!==!1&&(a=a.concat(Wt)),t.historyKeymap!==!1&&(a=a.concat(Y)),t.foldKeymap!==!1&&(a=a.concat(dt)),t.completionKeymap!==!1&&(a=a.concat(Nt)),t.lintKeymap!==!1&&(a=a.concat(Mt));var o=[];return t.lineNumbers!==!1&&o.push(wt()),t.highlightActiveLineGutter!==!1&&o.push(Et()),t.highlightSpecialChars!==!1&&o.push(V()),t.history!==!1&&o.push(Q()),t.foldGutter!==!1&&o.push(xt()),t.drawSelection!==!1&&o.push(q()),t.dropCursor!==!1&&o.push(kt()),t.allowMultipleSelections!==!1&&o.push(A.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&o.push(pt()),t.syntaxHighlighting!==!1&&o.push(P(R,{fallback:!0})),t.bracketMatching!==!1&&o.push(St()),t.closeBrackets!==!1&&o.push(Ht()),t.autocompletion!==!1&&o.push(Ot()),t.rectangularSelection!==!1&&o.push(ut()),i!==!1&&o.push(vt()),t.highlightActiveLine!==!1&&o.push(Ct()),t.highlightSelectionMatches!==!1&&o.push(Lt()),t.tabSize&&typeof t.tabSize=="number"&&o.push(ft.of(" ".repeat(t.tabSize))),o.concat([j.of(a.flat())]).filter(Boolean)},zt=function(t){t===void 0&&(t={});var i=[];t.defaultKeymap!==!1&&(i=i.concat(X)),t.historyKeymap!==!1&&(i=i.concat(Y));var a=[];return t.highlightSpecialChars!==!1&&a.push(V()),t.history!==!1&&a.push(Q()),t.drawSelection!==!1&&a.push(q()),t.syntaxHighlighting!==!1&&a.push(P(R,{fallback:!0})),a.concat([j.of(i.flat())]).filter(Boolean)},At="#e5c07b",$="#e06c75",It="#56b6c2",Ft="#ffffff",I="#abb2bf",U="#7d8799",_t="#61afef",jt="#98c379",tt="#d19a66",Pt="#c678dd",Ut="#21252b",et="#2c313a",at="#282c34",G="#353a42",Gt="#3E4451",ot="#528bff",Jt=[b.theme({"&":{color:I,backgroundColor:at},".cm-content":{caretColor:ot},".cm-cursor, .cm-dropCursor":{borderLeftColor:ot},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Gt},".cm-panels":{backgroundColor:Ut,color:I},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:at,color:U,border:"none"},".cm-activeLineGutter":{backgroundColor:et},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:G},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:G,borderBottomColor:G},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:et,color:I}}},{dark:!0}),P(bt.define([{tag:e.keyword,color:Pt},{tag:[e.name,e.deleted,e.character,e.propertyName,e.macroName],color:$},{tag:[e.function(e.variableName),e.labelName],color:_t},{tag:[e.color,e.constant(e.name),e.standard(e.name)],color:tt},{tag:[e.definition(e.name),e.separator],color:I},{tag:[e.typeName,e.className,e.number,e.changed,e.annotation,e.modifier,e.self,e.namespace],color:At},{tag:[e.operator,e.operatorKeyword,e.url,e.escape,e.regexp,e.link,e.special(e.string)],color:It},{tag:[e.meta,e.comment],color:U},{tag:e.strong,fontWeight:"bold"},{tag:e.emphasis,fontStyle:"italic"},{tag:e.strikethrough,textDecoration:"line-through"},{tag:e.link,color:U,textDecoration:"underline"},{tag:e.heading,fontWeight:"bold",color:$},{tag:[e.atom,e.bool,e.special(e.variableName)],color:tt},{tag:[e.processingInstruction,e.string,e.inserted],color:jt},{tag:e.invalid,color:Ft}]))],Rt=b.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),it=function(t){t===void 0&&(t={});var{indentWithTab:i=!0,editable:a=!0,readOnly:o=!1,theme:f="light",placeholder:p="",basicSetup:l=!0}=t,n=[];switch(i&&n.unshift(j.of([Tt])),l&&(typeof l=="boolean"?n.unshift(Z()):n.unshift(Z(l))),p&&n.unshift(mt(p)),f){case"light":n.push(Rt);break;case"dark":n.push(Jt);break;case"none":break;default:n.push(f);break}return a===!1&&n.push(b.editable.of(!1)),o&&n.push(A.readOnly.of(!0)),[...n]},Vt=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(i=>t.state.sliceDoc(i.from,i.to)),selectedText:t.state.selection.ranges.some(i=>!i.empty)}),qt=class{constructor(t,i){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=i,this.timeoutMS=i,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(i=>{try{i()}catch(a){console.error("TimeoutLatch callback error:",a)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},rt=class{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},nt=null,Qt=()=>typeof window>"u"?new rt:(nt||(nt=new rt),nt),s=J(lt()),st=gt.define(),Xt=200,Yt=[];function Zt(t){var{value:i,selection:a,onChange:o,onStatistics:f,onCreateEditor:p,onUpdate:l,extensions:n=Yt,autoFocus:w,theme:E="light",height:T=null,minHeight:v=null,maxHeight:W=null,width:M=null,minWidth:L=null,maxWidth:B=null,placeholder:N="",editable:H=!0,readOnly:O=!1,indentWithTab:D=!0,basicSetup:K=!0,root:F,initialState:C}=t,[S,z]=(0,s.useState)(),[r,d]=(0,s.useState)(),[k,y]=(0,s.useState)(),c=(0,s.useState)(()=>({current:null}))[0],g=(0,s.useState)(()=>({current:null}))[0],_=b.theme({"&":{height:T,minHeight:v,maxHeight:W,width:M,minWidth:L,maxWidth:B},"& .cm-scroller":{height:"100% !important"}}),m=[b.updateListener.of(h=>{h.docChanged&&typeof o=="function"&&!h.transactions.some(u=>u.annotation(st))&&(c.current?c.current.reset():(c.current=new qt(()=>{if(g.current){var u=g.current;g.current=null,u()}c.current=null},Xt),Qt().add(c.current)),o(h.state.doc.toString(),h)),f&&f(Vt(h))}),_,...it({theme:E,editable:H,readOnly:O,placeholder:N,indentWithTab:D,basicSetup:K})];return l&&typeof l=="function"&&m.push(b.updateListener.of(l)),m=m.concat(n),(0,s.useLayoutEffect)(()=>{if(S&&!k){var h={doc:i,selection:a,extensions:m},u=C?A.fromJSON(C.json,h,C.fields):A.create(h);if(y(u),!r){var x=new b({state:u,parent:S,root:F});d(x),p&&p(x,u)}}return()=>{r&&(y(void 0),d(void 0))}},[S,k]),(0,s.useEffect)(()=>{t.container&&z(t.container)},[t.container]),(0,s.useEffect)(()=>()=>{r&&(r.destroy(),d(void 0)),c.current&&(c.current=(c.current.cancel(),null))},[r]),(0,s.useEffect)(()=>{w&&r&&r.focus()},[w,r]),(0,s.useEffect)(()=>{r&&r.dispatch({effects:yt.reconfigure.of(m)})},[E,n,T,v,W,M,L,B,N,H,O,D,K,o,l]),(0,s.useEffect)(()=>{if(i!==void 0){var h=r?r.state.doc.toString():"";if(r&&i!==h){var u=c.current&&!c.current.isDone,x=()=>{r&&i!==r.state.doc.toString()&&r.dispatch({changes:{from:0,to:r.state.doc.toString().length,insert:i||""},annotations:[st.of(!0)]})};u?g.current=x:x()}}},[i,r]),{state:k,setState:y,view:r,setView:d,container:S,setContainer:z}}var $t=J(ht()),te=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],ct=(0,s.forwardRef)((t,i)=>{var{className:a,value:o="",selection:f,extensions:p=[],onChange:l,onStatistics:n,onCreateEditor:w,onUpdate:E,autoFocus:T,theme:v="light",height:W,minHeight:M,maxHeight:L,width:B,minWidth:N,maxWidth:H,basicSetup:O,placeholder:D,indentWithTab:K,editable:F,readOnly:C,root:S,initialState:z}=t,r=Kt(t,te),d=(0,s.useRef)(null),{state:k,view:y,container:c,setContainer:g}=Zt({root:S,value:o,autoFocus:T,theme:v,height:W,minHeight:M,maxHeight:L,width:B,minWidth:N,maxWidth:H,basicSetup:O,placeholder:D,indentWithTab:K,editable:F,readOnly:C,selection:f,onChange:l,onStatistics:n,onCreateEditor:w,onUpdate:E,extensions:p,initialState:z});(0,s.useImperativeHandle)(i,()=>({editor:d.current,state:k,view:y}),[d,c,k,y]);var _=(0,s.useCallback)(m=>{d.current=m,g(m)},[g]);if(typeof o!="string")throw Error("value must be typeof string but got "+typeof o);return(0,$t.jsx)("div",Dt({ref:_,className:(typeof v=="string"?"cm-theme-"+v:"cm-theme")+(a?" "+a:"")},r))});ct.displayName="CodeMirror";var ee=ct;export{it as n,zt as r,ee as t};

Sorry, the diff of this file is too big to display

function t(){return t=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},t.apply(null,arguments)}export{t};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var e=a("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);export{e as t};
import{t as e}from"./simple-mode-BVXe8Gj5.js";const t=e({start:[{regex:/#?!.*/,token:"comment"},{regex:/"""/,token:"string",next:"string3"},{regex:/(STRING:)(\s)/,token:["keyword",null],next:"string2"},{regex:/\S*?"/,token:"string",next:"string"},{regex:/(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\-?\d+.?\d*)(?=\s)/,token:"number"},{regex:/((?:GENERIC)|\:?\:)(\s+)(\S+)(\s+)(\()/,token:["keyword",null,"def",null,"bracket"],next:"stack"},{regex:/(M\:)(\s+)(\S+)(\s+)(\S+)/,token:["keyword",null,"def",null,"tag"]},{regex:/USING\:/,token:"keyword",next:"vocabulary"},{regex:/(USE\:|IN\:)(\s+)(\S+)(?=\s|$)/,token:["keyword",null,"tag"]},{regex:/(\S+\:)(\s+)(\S+)(?=\s|$)/,token:["keyword",null,"def"]},{regex:/(?:;|\\|t|f|if|loop|while|until|do|PRIVATE>|<PRIVATE|\.|\S*\[|\]|\S*\{|\})(?=\s|$)/,token:"keyword"},{regex:/\S+[\)>\.\*\?]+(?=\s|$)/,token:"builtin"},{regex:/[\)><]+\S+(?=\s|$)/,token:"builtin"},{regex:/(?:[\+\-\=\/\*<>])(?=\s|$)/,token:"keyword"},{regex:/\S+/,token:"variable"},{regex:/\s+|./,token:null}],vocabulary:[{regex:/;/,token:"keyword",next:"start"},{regex:/\S+/,token:"tag"},{regex:/\s+|./,token:null}],string:[{regex:/(?:[^\\]|\\.)*?"/,token:"string",next:"start"},{regex:/.*/,token:"string"}],string2:[{regex:/^;/,token:"keyword",next:"start"},{regex:/.*/,token:"string"}],string3:[{regex:/(?:[^\\]|\\.)*?"""/,token:"string",next:"start"},{regex:/.*/,token:"string"}],stack:[{regex:/\)/,token:"bracket",next:"start"},{regex:/--/,token:"bracket"},{regex:/\S+/,token:"meta"},{regex:/\s+|./,token:null}],languageData:{name:"factor",dontIndentStates:["start","vocabulary","string","string3","stack"],commentTokens:{line:"!"}}});export{t};
import{t as o}from"./factor-Di_n0Vcb.js";export{o as factor};
var d={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},c={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},i={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},s={true:!0,false:!0,nan:!0,real:!0,min:!0,max:!0,cog:!0,cogs:!0},a=/[+\-*&^%:=<>!|\/]/;function u(e,n){var t=e.next();if(/[\d\.]/.test(t))return t=="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):t=="0"?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(t=="/"||t=="("){if(e.eat("*"))return n.tokenize=l,l(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(a.test(t))return e.eatWhile(a),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current().toLowerCase();return d.propertyIsEnumerable(r)||c.propertyIsEnumerable(r)||i.propertyIsEnumerable(r)?"keyword":s.propertyIsEnumerable(r)?"atom":"variable"}function l(e,n){for(var t=!1,r;r=e.next();){if((r=="/"||r==")")&&t){n.tokenize=u;break}t=r=="*"}return"comment"}function f(e,n,t,r,o){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=o}function m(e,n,t){return e.context=new f(e.indented,n,t,null,e.context)}function p(e){if(e.context.prev)return e.context.type=="end_block"&&(e.indented=e.context.indented),e.context=e.context.prev}const k={name:"fcl",startState:function(e){return{tokenize:null,context:new f(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align??(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;var r=(n.tokenize||u)(e,n);if(r=="comment")return r;t.align??(t.align=!0);var o=e.current().toLowerCase();return c.propertyIsEnumerable(o)?m(n,e.column(),"end_block"):i.propertyIsEnumerable(o)&&p(n),n.startOfLine=!1,r},indent:function(e,n,t){if(e.tokenize!=u&&e.tokenize!=null)return 0;var r=e.context,o=i.propertyIsEnumerable(n);return r.align?r.column+(o?0:1):r.indented+(o?0:t.unit)},languageData:{commentTokens:{line:"//",block:{open:"(*",close:"*)"}}}};export{k as fcl};
import{s as p}from"./chunk-LvLJmgfZ.js";import{t as x}from"./compiler-runtime-DeeZ7FnK.js";import{t as g}from"./jsx-runtime-ZmTK25f3.js";import{n as u,t as l}from"./cn-BKtXLv3a.js";import{u as v}from"./select-V5IdpNiR.js";import{Q as b,f as h,l as N,m as w,y as j}from"./input-pAun1m1X.js";var d=x(),m=p(g(),1),y=u(["text-sm font-medium leading-none","data-disabled:cursor-not-allowed data-disabled:opacity-70","group-data-invalid:text-destructive"]),k=i=>{let t=(0,d.c)(8),a,s;t[0]===i?(a=t[1],s=t[2]):({className:a,...s}=i,t[0]=i,t[1]=a,t[2]=s);let e;t[3]===a?e=t[4]:(e=l(y(),a),t[3]=a,t[4]=e);let r;return t[5]!==s||t[6]!==e?(r=(0,m.jsx)(j,{className:e,...s}),t[5]=s,t[6]=e,t[7]=r):r=t[7],r},Q=i=>{let t=(0,d.c)(8),a,s;t[0]===i?(a=t[1],s=t[2]):({className:a,...s}=i,t[0]=i,t[1]=a,t[2]=s);let e;t[3]===a?e=t[4]:(e=l("text-sm text-muted-foreground",a),t[3]=a,t[4]=e);let r;return t[5]!==s||t[6]!==e?(r=(0,m.jsx)(w,{className:e,...s,slot:"description"}),t[5]=s,t[6]=e,t[7]=r):r=t[7],r},V=i=>{let t=(0,d.c)(8),a,s;t[0]===i?(a=t[1],s=t[2]):({className:a,...s}=i,t[0]=i,t[1]=a,t[2]=s);let e;t[3]===a?e=t[4]:(e=l("text-sm font-medium text-destructive",a),t[3]=a,t[4]=e);let r;return t[5]!==s||t[6]!==e?(r=(0,m.jsx)(h,{className:e,...s}),t[5]=s,t[6]=e,t[7]=r):r=t[7],r},c=u("",{variants:{variant:{default:["relative flex w-full items-center overflow-hidden rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",v(),"data-focus-within:outline-hidden data-focus-within:ring-2 data-focus-within:ring-ring data-focus-within:ring-offset-2","data-disabled:opacity-50"],ghost:""}},defaultVariants:{variant:"default"}}),_=i=>{let t=(0,d.c)(12),a,s,e;t[0]===i?(a=t[1],s=t[2],e=t[3]):({className:a,variant:e,...s}=i,t[0]=i,t[1]=a,t[2]=s,t[3]=e);let r;t[4]===e?r=t[5]:(r=f=>l(c({variant:e}),f),t[4]=e,t[5]=r);let o;t[6]!==a||t[7]!==r?(o=b(a,r),t[6]=a,t[7]=r,t[8]=o):o=t[8];let n;return t[9]!==s||t[10]!==o?(n=(0,m.jsx)(N,{className:o,...s}),t[9]=s,t[10]=o,t[11]=n):n=t[11],n};export{c as a,k as i,_ as n,Q as r,V as t};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var e=a("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);export{e as t};
var Te=Object.defineProperty;var Be=(t,e,i)=>e in t?Te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var R=(t,e,i)=>Be(t,typeof e!="symbol"?e+"":e,i);import{s as ge}from"./chunk-LvLJmgfZ.js";import{i as $e,l as ce,n as A,p as ye,u as ae}from"./useEvent-DO6uJBas.js";import{t as qe}from"./react-BGmjiNul.js";import{Jr as Ve,Rt as he,Xn as Le,Zr as Ue,_n as Ke,w as Ze}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as ie}from"./compiler-runtime-DeeZ7FnK.js";import"./tooltip-BGrCWNss.js";import{d as Je,f as Xe}from"./hotkeys-BHHWjLlp.js";import{t as Ye}from"./invariant-CAG_dYON.js";import{p as Ge,u as ve}from"./utils-DXvhzCGS.js";import{j as re}from"./config-CIrPQIbt.js";import{t as Qe}from"./jsx-runtime-ZmTK25f3.js";import{n as et,t as I}from"./button-YC1gW_kJ.js";import{t as me}from"./cn-BKtXLv3a.js";import{St as tt,at}from"./dist-DBwNzi3C.js";import{a as it,c as rt,i as nt,o as st,s as lt}from"./JsonOutput-CknFTI_u.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{n as ot,r as pe}from"./requests-BsVD4CdD.js";import{t as K}from"./createLucideIcon-CnW3RofX.js";import{t as dt}from"./arrow-left-Cb_73j1f.js";import{n as ct,t as ht}from"./LazyAnyLanguageCodeMirror-yzHjsVJt.js";import{_ as mt}from"./select-V5IdpNiR.js";import{i as pt,r as be}from"./download-BhCZMKuQ.js";import{t as ft}from"./chevron-right-DwagBitu.js";import{f as fe}from"./maps-t9yNKYA8.js";import{n as xt}from"./markdown-renderer-DhMlG2dP.js";import{a as D,c as Z,p as ut,r as jt,t as gt}from"./dropdown-menu-B-6unW-7.js";import{t as we}from"./copy-CQ15EONK.js";import{t as ke}from"./download-B9SUL40m.js";import{t as yt}from"./ellipsis-vertical-C7jYiLCo.js";import{t as vt}from"./eye-off-BhExYOph.js";import{n as Fe,r as bt,t as wt}from"./types-DuQOSW7G.js";import{t as Ce}from"./file-plus-corner-Da9I6dgU.js";import{t as kt}from"./spinner-DaIKav-i.js";import{t as Ft}from"./refresh-ccw-DLEiQDS3.js";import{t as Ct}from"./refresh-cw-CQd-1kjx.js";import{t as Nt}from"./save-PMHbdtqc.js";import{t as Dt}from"./trash-2-CyqGun26.js";import{t as St}from"./triangle-alert-B65rDESJ.js";import{i as _t,n as Pt,t as Ot}from"./es-D8BOePqo.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{t as W}from"./use-toast-rmUWldD_.js";import{r as zt}from"./useTheme-DUdVAZI8.js";import"./Combination-CMPwuAmi.js";import{t as M}from"./tooltip-CEc2ajau.js";import"./dates-Dhn1r-h6.js";import{o as Mt}from"./alert-dialog-DwQffb13.js";import"./popover-Gz-GJzym.js";import{n as Ne}from"./ImperativeModal-CUbWEBci.js";import{r as Rt}from"./errors-2SszdW9t.js";import"./vega-loader.browser-CRZ52CKf.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import{t as ne}from"./copy-Bv2DBpIS.js";import"./purify.es-DNVQZNFu.js";import{a as At,i as Wt,n as xe,r as It,t as Et}from"./tree-B1vM35Zj.js";import{n as Ht,t as Tt}from"./alert-BrGyZf9c.js";import{n as De}from"./error-banner-DUzsIXtq.js";import{n as Se}from"./useAsyncData-C4XRy1BE.js";import"./chunk-5FQGJX7Z-CVUXBqX6.js";import"./katex-Dc8yG8NU.js";import"./html-to-image-DjukyIj4.js";import{o as Bt}from"./focus-D51fcwZX.js";import{a as $t}from"./renderShortcut-DEwfrKeS.js";import{n as qt}from"./blob-CuXvdYPX.js";import{t as Vt}from"./bundle.esm-2AjO7UK5.js";import{t as Lt}from"./links-C-GGaW8R.js";import{t as Ut}from"./icon-32x32-ClOCJ7rj.js";import{t as J}from"./Inputs-D2Xn4HON.js";var Kt=K("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),_e=K("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),Pe=K("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]),Zt=K("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Jt=K("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),Xt=K("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),Oe=ie(),F=ge(qe(),1),a=ge(Qe(),1),ze=(0,F.createContext)(null);function Yt(){return(0,F.useContext)(ze)??void 0}var Gt=t=>{let e=(0,Oe.c)(3),{children:i}=t,n=Wt(),s;return e[0]!==i||e[1]!==n?(s=(0,a.jsx)(ze.Provider,{value:n,children:i}),e[0]=i,e[1]=n,e[2]=s):s=e[2],s};const Qt=t=>{let e=(0,Oe.c)(5),{children:i}=t,[n,s]=(0,F.useState)(null),r;e[0]!==i||e[1]!==n?(r=n&&(0,a.jsx)(At,{backend:It,options:{rootElement:n},children:(0,a.jsx)(Gt,{children:i})}),e[0]=i,e[1]=n,e[2]=r):r=e[2];let d;return e[3]===r?d=e[4]:(d=(0,a.jsx)("div",{ref:s,className:"contents",children:r}),e[3]=r,e[4]=d),d};var ue=new Map;const ea=({file:t,onOpenNotebook:e})=>{let{theme:i}=zt(),{sendFileDetails:n,sendUpdateFile:s}=pe(),r=ae(Ge),d=ae(ve),f=ae(Ve),[h,m]=(0,F.useState)(""),{data:l,isPending:u,error:v,setData:g,refetch:c}=Se(async()=>{let o=await n({path:t.path}),j=o.contents||"";return m(ue.get(t.path)||j),o},[t.path]),y=async()=>{h!==(l==null?void 0:l.contents)&&await s({path:t.path,contents:h}).then(o=>{o.success&&(g(j=>({...j,contents:h})),m(h))})},C=(0,F.useRef)(h);if(C.current=h,(0,F.useEffect)(()=>()=>{if(!(l!=null&&l.contents))return;let o=C.current;o===l.contents?ue.delete(t.path):ue.set(t.path,o)},[t.path,l==null?void 0:l.contents]),v)return(0,a.jsx)(De,{error:v});if(u||!l)return null;let x=l.mimeType||"text/plain",S=x in je,k=f&&l.file.isMarimoFile&&(t.path===f||t.path.endsWith(`/${f}`));if(!l.contents&&!S)return(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-6",children:[(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Name"}),(0,a.jsx)("div",{children:l.file.name}),(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Type"}),(0,a.jsx)("div",{children:x})]});let b=(0,a.jsxs)("div",{className:"text-xs text-muted-foreground p-1 flex justify-end gap-2 border-b",children:[(0,a.jsx)(M,{content:"Refresh",children:(0,a.jsx)(J,{size:"small",onClick:c,children:(0,a.jsx)(Ct,{})})}),t.isMarimoFile&&!re()&&(0,a.jsx)(M,{content:"Open notebook",children:(0,a.jsx)(J,{size:"small",onClick:o=>e(o),children:(0,a.jsx)(fe,{})})}),!d&&(0,a.jsx)(M,{content:"Download",children:(0,a.jsx)(J,{size:"small",onClick:()=>{if(Me(x)){pt(xt(l.contents,x),l.file.name);return}be(new Blob([l.contents||h],{type:x}),l.file.name)},children:(0,a.jsx)(ke,{})})}),!Me(x)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M,{content:"Copy contents to clipboard",children:(0,a.jsx)(J,{size:"small",onClick:async()=>{await ne(h)},children:(0,a.jsx)(we,{})})}),(0,a.jsx)(M,{content:$t("global.save"),children:(0,a.jsx)(J,{size:"small",color:h===l.contents?void 0:"green",onClick:y,disabled:h===l.contents,children:(0,a.jsx)(Nt,{})})})]})]});return x.startsWith("image/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(st,{base64:l.contents,mime:x})})]}):x==="text/csv"&&l.contents?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(it,{contents:l.contents})})]}):x.startsWith("audio/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(nt,{base64:l.contents,mime:x})})]}):x.startsWith("video/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(rt,{base64:l.contents,mime:x})})]}):x.startsWith("application/pdf")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(lt,{base64:l.contents,mime:x})})]}):(0,a.jsxs)(a.Fragment,{children:[b,k&&(0,a.jsxs)(Tt,{variant:"warning",className:"rounded-none",children:[(0,a.jsx)(St,{className:"h-4 w-4"}),(0,a.jsx)(Ht,{children:"Editing the notebook file directly while running in marimo's editor may cause unintended changes. Please use with caution."})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:(0,a.jsx)(F.Suspense,{children:(0,a.jsx)(ht,{theme:i==="dark"?"dark":"light",language:je[x]||je.default,className:"border-b",extensions:[at.lineWrapping,tt.of([{key:r.getHotkey("global.save").key,stopPropagation:!0,run:()=>h===l.contents?!1:(y(),!0)}])],value:h,onChange:m})})})]})};var Me=t=>t?t.startsWith("image/")||t.startsWith("audio/")||t.startsWith("video/")||t.startsWith("application/pdf"):!1,je={"application/javascript":"javascript","text/markdown":"markdown","text/html":"html","text/css":"css","text/x-python":"python","application/json":"json","application/xml":"xml","text/x-yaml":"yaml","text/csv":"markdown","text/plain":"markdown",default:"markdown"},ta=class{constructor(t){R(this,"delegate",new xe([]));R(this,"rootPath","");R(this,"onChange",Xe.NOOP);R(this,"path",new he("/"));R(this,"initialize",async t=>{if(this.onChange=t,this.delegate.data.length===0)try{let e=await this.callbacks.listFiles({path:this.rootPath});this.delegate=new xe(e.files),this.rootPath=e.root,this.path=he.guessDeliminator(e.root)}catch(e){W({title:"Failed",description:Rt(e)})}this.onChange(this.delegate.data)});R(this,"refreshAll",async t=>{let e=[this.rootPath,...t.map(n=>{var s;return(s=this.delegate.find(n))==null?void 0:s.data.path})].filter(Boolean),i=await Promise.all(e.map(n=>this.callbacks.listFiles({path:n}).catch(()=>({files:[]}))));for(let[n,s]of e.entries()){let r=i[n];s===this.rootPath?this.delegate=new xe(r.files):this.delegate.update({id:s,changes:{children:r.files}})}this.onChange(this.delegate.data)});R(this,"relativeFromRoot",t=>{let e=this.rootPath.endsWith(this.path.deliminator)?this.rootPath:`${this.rootPath}${this.path.deliminator}`;return t.startsWith(e)?t.slice(e.length):t});R(this,"handleResponse",t=>t.success?t:(W({title:"Failed",description:t.message}),null));this.callbacks=t}async expand(t){let e=this.delegate.find(t);if(!e||!e.data.isDirectory)return!1;if(e.children&&e.children.length>0)return!0;let i=await this.callbacks.listFiles({path:e.data.path});return this.delegate.update({id:t,changes:{children:i.files}}),this.onChange(this.delegate.data),!0}async rename(t,e){let i=this.delegate.find(t);if(!i)return;let n=i.data.path,s=this.path.join(this.path.dirname(n),e);await this.callbacks.renameFileOrFolder({path:n,newPath:s}).then(this.handleResponse),this.delegate.update({id:t,changes:{name:e,path:s}}),this.onChange(this.delegate.data),await this.refreshAll([s])}async move(t,e){var n;let i=e?((n=this.delegate.find(e))==null?void 0:n.data.path)??e:this.rootPath;await Promise.all(t.map(s=>{this.delegate.move({id:s,parentId:e,index:0});let r=this.delegate.find(s);if(!r)return Promise.resolve();let d=this.path.join(i,this.path.basename(r.data.path));return this.delegate.update({id:s,changes:{path:d}}),this.callbacks.renameFileOrFolder({path:r.data.path,newPath:d}).then(this.handleResponse)})),this.onChange(this.delegate.data),await this.refreshAll([i])}async createFile(t,e){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,n=await this.callbacks.createFileOrFolder({path:i,type:"file",name:t}).then(this.handleResponse);n!=null&&n.info&&(this.delegate.create({parentId:e,index:0,data:n.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async createFolder(t,e){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,n=await this.callbacks.createFileOrFolder({path:i,type:"directory",name:t}).then(this.handleResponse);n!=null&&n.info&&(this.delegate.create({parentId:e,index:0,data:n.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async delete(t){let e=this.delegate.find(t);e&&(await this.callbacks.deleteFileOrFolder({path:e.data.path}).then(this.handleResponse),this.delegate.drop({id:t}),this.onChange(this.delegate.data))}};const Re=ye(t=>{let e=t(ot);return Ye(e,"no requestClientAtom set"),new ta({listFiles:e.sendListFiles,createFileOrFolder:e.sendCreateFileOrFolder,deleteFileOrFolder:e.sendDeleteFileOrFolder,renameFileOrFolder:e.sendRenameFileOrFolder})}),aa=ye({});async function ia(){await $e.get(Re).refreshAll([])}var ra=ie(),na=1024*1024*100;function Ae(t){let e=(0,ra.c)(7),i;e[0]===t?i=e[1]:(i=t===void 0?{}:t,e[0]=t,e[1]=i);let n=i,{sendCreateFileOrFolder:s}=pe(),r;e[2]===s?r=e[3]:(r=async f=>{for(let h of f){let m=ha(ca(h)),l="";m&&(l=he.guessDeliminator(m).dirname(m));let u=(await qt(h)).split(",")[1];await s({path:l,type:"file",name:h.name,contents:u})}await ia()},e[2]=s,e[3]=r);let d;return e[4]!==n||e[5]!==r?(d={multiple:!0,maxSize:na,onError:da,onDropRejected:sa,onDrop:r,...n},e[4]=n,e[5]=r,e[6]=d):d=e[6],Ot(d)}function sa(t){W({title:"File upload failed",description:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:t.map(la)}),variant:"danger"})}function la(t){return(0,a.jsxs)("div",{children:[t.file.name," (",t.errors.map(oa).join(", "),")"]},t.file.name)}function oa(t){return t.message}function da(t){Je.error(t),W({title:"File upload failed",description:t.message,variant:"danger"})}function ca(t){if(t.webkitRelativePath)return t.webkitRelativePath;if("path"in t&&typeof t.path=="string")return t.path;if("relativePath"in t&&typeof t.relativePath=="string")return t.relativePath}function ha(t){if(t)return t.replace(/^\/+/,"")}var X=ie(),ma=Ue("marimo:showHiddenFiles",!0,Ke,{getOnInit:!0}),We=F.createContext(null);const pa=t=>{let e=(0,X.c)(68),{height:i}=t,n=(0,F.useRef)(null),s=Yt(),[r]=ce(Re),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];let[f,h]=(0,F.useState)(d),[m,l]=(0,F.useState)(null),[u,v]=ce(ma),{openPrompt:g}=Ne(),[c,y]=ce(aa),C;e[1]===r?C=e[2]:(C=()=>r.initialize(h),e[1]=r,e[2]=C);let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=[],e[3]=x):x=e[3];let{isPending:S,error:k}=Se(C,x),b;e[4]!==c||e[5]!==r?(b=()=>{r.refreshAll(Object.keys(c).filter(p=>c[p]))},e[4]=c,e[5]=r,e[6]=b):b=e[6];let o=A(b),j;e[7]!==v||e[8]!==u?(j=()=>{v(!u)},e[7]=v,e[8]=u,e[9]=j):j=e[9];let _=A(j),P;e[10]!==g||e[11]!==r?(P=async()=>{g({title:"Folder name",onConfirm:async p=>{r.createFolder(p,null)}})},e[10]=g,e[11]=r,e[12]=P):P=e[12];let N=A(P),O;e[13]!==g||e[14]!==r?(O=async()=>{g({title:"File name",onConfirm:async p=>{r.createFile(p,null)}})},e[13]=g,e[14]=r,e[15]=O):O=e[15];let se=A(O),Y;e[16]===y?Y=e[17]:(Y=()=>{var p;(p=n.current)==null||p.closeAll(),y({})},e[16]=y,e[17]=Y);let le=A(Y),G;e[18]!==f||e[19]!==u?(G=Ee(f,u),e[18]=f,e[19]=u,e[20]=G):G=e[20];let oe=G;if(S){let p;return e[21]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(kt,{size:"medium",centered:!0}),e[21]=p):p=e[21],p}if(k){let p;return e[22]===k?p=e[23]:(p=(0,a.jsx)(De,{error:k}),e[22]=k,e[23]=p),p}if(m){let p;e[24]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(null),e[24]=p):p=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(I,{onClick:p,"data-testid":"file-explorer-back-button",variant:"text",size:"xs",className:"mb-0",children:(0,a.jsx)(dt,{size:16})}),e[25]=w):w=e[25];let z;e[26]===m.name?z=e[27]:(z=(0,a.jsxs)("div",{className:"flex items-center pl-1 pr-3 shrink-0 border-b justify-between",children:[w,(0,a.jsx)("span",{className:"font-bold",children:m.name})]}),e[26]=m.name,e[27]=z);let L;e[28]!==m.path||e[29]!==r?(L=He=>Ie(He,r.relativeFromRoot(m.path)),e[28]=m.path,e[29]=r,e[30]=L):L=e[30];let U;e[31]!==m||e[32]!==L?(U=(0,a.jsx)(F.Suspense,{children:(0,a.jsx)(ea,{onOpenNotebook:L,file:m})}),e[31]=m,e[32]=L,e[33]=U):U=e[33];let te;return e[34]!==z||e[35]!==U?(te=(0,a.jsxs)(a.Fragment,{children:[z,U]}),e[34]=z,e[35]=U,e[36]=te):te=e[36],te}let E;e[37]!==le||e[38]!==se||e[39]!==N||e[40]!==_||e[41]!==o||e[42]!==r?(E=(0,a.jsx)(xa,{onRefresh:o,onHidden:_,onCreateFile:se,onCreateFolder:N,onCollapseAll:le,tree:r}),e[37]=le,e[38]=se,e[39]=N,e[40]=_,e[41]=o,e[42]=r,e[43]=E):E=e[43];let de=i-33,H,T,B;e[44]===r?(H=e[45],T=e[46],B=e[47]):(H=async p=>{let{ids:w}=p;for(let z of w)await r.delete(z)},T=async p=>{let{id:w,name:z}=p;await r.rename(w,z)},B=async p=>{let{dragIds:w,parentId:z}=p;await r.move(w,z)},e[44]=r,e[45]=H,e[46]=T,e[47]=B);let Q;e[48]===Symbol.for("react.memo_cache_sentinel")?(Q=p=>{let w=p[0];w&&(w.data.isDirectory||l(w.data))},e[48]=Q):Q=e[48];let $;e[49]!==c||e[50]!==y||e[51]!==r?($=async p=>{if(await r.expand(p)){let w=c[p]??!1;y({...c,[p]:!w})}},e[49]=c,e[50]=y,e[51]=r,e[52]=$):$=e[52];let q;e[53]!==s||e[54]!==c||e[55]!==de||e[56]!==H||e[57]!==T||e[58]!==B||e[59]!==$||e[60]!==oe?(q=(0,a.jsx)(Et,{width:"100%",ref:n,height:de,className:"h-full",data:oe,initialOpenState:c,openByDefault:!1,dndManager:s,renderCursor:ba,disableDrop:wa,onDelete:H,onRename:T,onMove:B,onSelect:Q,onToggle:$,padding:15,rowHeight:30,indent:fa,overscanCount:1e3,disableMultiSelection:!0,children:ga}),e[53]=s,e[54]=c,e[55]=de,e[56]=H,e[57]=T,e[58]=B,e[59]=$,e[60]=oe,e[61]=q):q=e[61];let V;e[62]!==q||e[63]!==r?(V=(0,a.jsx)(We,{value:r,children:q}),e[62]=q,e[63]=r,e[64]=V):V=e[64];let ee;return e[65]!==E||e[66]!==V?(ee=(0,a.jsxs)(a.Fragment,{children:[E,V]}),e[65]=E,e[66]=V,e[67]=ee):ee=e[67],ee};var fa=15,xa=t=>{let e=(0,X.c)(34),{onRefresh:i,onHidden:n,onCreateFile:s,onCreateFolder:r,onCollapseAll:d}=t,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={noDrag:!0,noDragEventsBubbling:!0},e[0]=f):f=e[0];let{getRootProps:h,getInputProps:m}=Ae(f),l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Ce,{size:16}),e[1]=l):l=e[1];let u;e[2]===s?u=e[3]:(u=(0,a.jsx)(M,{content:"Add file",children:(0,a.jsx)(I,{"data-testid":"file-explorer-add-file-button",onClick:s,variant:"text",size:"xs",children:l})}),e[2]=s,e[3]=u);let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(_e,{size:16}),e[4]=v):v=e[4];let g;e[5]===r?g=e[6]:(g=(0,a.jsx)(M,{content:"Add folder",children:(0,a.jsx)(I,{"data-testid":"file-explorer-add-folder-button",onClick:r,variant:"text",size:"xs",children:v})}),e[5]=r,e[6]=g);let c;e[7]===h?c=e[8]:(c=h({}),e[7]=h,e[8]=c);let y,C;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=et({variant:"text",size:"xs"}),C=(0,a.jsx)(_t,{size:16}),e[9]=y,e[10]=C):(y=e[9],C=e[10]);let x;e[11]===c?x=e[12]:(x=(0,a.jsx)(M,{content:"Upload file",children:(0,a.jsx)("button",{"data-testid":"file-explorer-upload-button",...c,className:y,children:C})}),e[11]=c,e[12]=x);let S;e[13]===m?S=e[14]:(S=m({}),e[13]=m,e[14]=S);let k;e[15]===S?k=e[16]:(k=(0,a.jsx)("input",{...S,type:"file"}),e[15]=S,e[16]=k);let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsx)(Ft,{size:16}),e[17]=b):b=e[17];let o;e[18]===i?o=e[19]:(o=(0,a.jsx)(M,{content:"Refresh",children:(0,a.jsx)(I,{"data-testid":"file-explorer-refresh-button",onClick:i,variant:"text",size:"xs",children:b})}),e[18]=i,e[19]=o);let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(vt,{size:16}),e[20]=j):j=e[20];let _;e[21]===n?_=e[22]:(_=(0,a.jsx)(M,{content:"Toggle hidden files",children:(0,a.jsx)(I,{"data-testid":"file-explorer-hidden-files-button",onClick:n,variant:"text",size:"xs",children:j})}),e[21]=n,e[22]=_);let P;e[23]===Symbol.for("react.memo_cache_sentinel")?(P=(0,a.jsx)(Kt,{size:16}),e[23]=P):P=e[23];let N;e[24]===d?N=e[25]:(N=(0,a.jsx)(M,{content:"Collapse all folders",children:(0,a.jsx)(I,{"data-testid":"file-explorer-collapse-button",onClick:d,variant:"text",size:"xs",children:P})}),e[24]=d,e[25]=N);let O;return e[26]!==k||e[27]!==o||e[28]!==_||e[29]!==N||e[30]!==u||e[31]!==g||e[32]!==x?(O=(0,a.jsxs)("div",{className:"flex items-center justify-end px-2 shrink-0 border-b",children:[u,g,x,k,o,_,N]}),e[26]=k,e[27]=o,e[28]=_,e[29]=N,e[30]=u,e[31]=g,e[32]=x,e[33]=O):O=e[33],O},ua=t=>{let e=(0,X.c)(9),{node:i,onOpenMarimoFile:n}=t,s;e[0]===i?s=e[1]:(s=f=>{i.data.isDirectory||(f.stopPropagation(),i.select())},e[0]=i,e[1]=s);let r;e[2]!==i.data.isMarimoFile||e[3]!==n?(r=i.data.isMarimoFile&&!re()&&(0,a.jsxs)("span",{className:"shrink-0 ml-2 text-sm hidden group-hover:inline hover:underline",onClick:n,children:["open ",(0,a.jsx)(fe,{className:"inline ml-1",size:12})]}),e[2]=i.data.isMarimoFile,e[3]=n,e[4]=r):r=e[4];let d;return e[5]!==i.data.name||e[6]!==s||e[7]!==r?(d=(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",onClick:s,children:[i.data.name,r]}),e[5]=i.data.name,e[6]=s,e[7]=r,e[8]=d):d=e[8],d},ja=t=>{let e=(0,X.c)(10),{node:i}=t,n=(0,F.useRef)(null),s,r;e[0]===i.data.name?(s=e[1],r=e[2]):(s=()=>{var m,l;(m=n.current)==null||m.focus(),(l=n.current)==null||l.setSelectionRange(0,i.data.name.lastIndexOf("."))},r=[i.data.name],e[0]=i.data.name,e[1]=s,e[2]=r),(0,F.useEffect)(s,r);let d,f;e[3]===i?(d=e[4],f=e[5]):(d=()=>i.reset(),f=m=>{m.key==="Escape"&&i.reset(),m.key==="Enter"&&i.submit(m.currentTarget.value)},e[3]=i,e[4]=d,e[5]=f);let h;return e[6]!==i.data.name||e[7]!==d||e[8]!==f?(h=(0,a.jsx)("input",{ref:n,className:"flex-1 bg-transparent border border-border text-muted-foreground",defaultValue:i.data.name,onClick:ka,onBlur:d,onKeyDown:f}),e[6]=i.data.name,e[7]=d,e[8]=f,e[9]=h):h=e[9],h},ga=({node:t,style:e,dragHandle:i})=>{let{openFile:n,sendCreateFileOrFolder:s,sendFileDetails:r}=pe(),d=ae(ve),f=t.data.isDirectory?"directory":bt(t.data.name),h=wt[f],{openConfirm:m,openPrompt:l}=Ne(),{createNewCell:u}=Ze(),v=Bt(),g=o=>{u({code:o,before:!1,cellId:v??"__end__"})},c=(0,F.use)(We),y=async o=>{Ie(o,c?c.relativeFromRoot(t.data.path):t.data.path)},C=async o=>{o.stopPropagation(),o.preventDefault(),m({title:"Delete file",description:`Are you sure you want to delete ${t.data.name}?`,confirmAction:(0,a.jsx)(Mt,{onClick:async()=>{await t.tree.delete(t.id)},"aria-label":"Confirm",children:"Delete"})})},x=A(async()=>{t.open(),l({title:"Folder name",onConfirm:async o=>{c==null||c.createFolder(o,t.id)}})}),S=A(async()=>{t.open(),l({title:"File name",onConfirm:async o=>{c==null||c.createFile(o,t.id)}})}),k=A(async()=>{var P;if(!c||t.data.isDirectory)return;let[o,j]=Pt(t.data.name),_=`${o}_copy${j}`;try{let N=await r({path:t.data.path}),O=((P=t.parent)==null?void 0:P.data.path)||"";await s({path:O,type:"file",name:_,contents:N.contents?btoa(N.contents):void 0}),await c.refreshAll([O])}catch{W({title:"Failed to duplicate file",description:"Unable to create a duplicate of the file",variant:"danger"})}}),b=()=>{let o={size:14,strokeWidth:1.5,className:"mr-2"};return(0,a.jsxs)(jt,{align:"end",className:"print:hidden w-[220px]",onClick:j=>j.stopPropagation(),onCloseAutoFocus:j=>j.preventDefault(),children:[!t.data.isDirectory&&(0,a.jsxs)(D,{onSelect:()=>t.select(),children:[(0,a.jsx)(Xt,{...o}),"Open file"]}),!t.data.isDirectory&&!re()&&(0,a.jsxs)(D,{onSelect:()=>{n({path:t.data.path})},children:[(0,a.jsx)(fe,{...o}),"Open file in external editor"]}),t.data.isDirectory&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(D,{onSelect:()=>S(),children:[(0,a.jsx)(Ce,{...o}),"Create file"]}),(0,a.jsxs)(D,{onSelect:()=>x(),children:[(0,a.jsx)(_e,{...o}),"Create folder"]}),(0,a.jsx)(Z,{})]}),(0,a.jsxs)(D,{onSelect:()=>t.edit(),children:[(0,a.jsx)(Zt,{...o}),"Rename"]}),!t.data.isDirectory&&(0,a.jsxs)(D,{onSelect:k,children:[(0,a.jsx)(we,{...o}),"Duplicate"]}),(0,a.jsxs)(D,{onSelect:async()=>{await ne(t.data.path),W({title:"Copied to clipboard"})},children:[(0,a.jsx)(Pe,{...o}),"Copy path"]}),c&&(0,a.jsxs)(D,{onSelect:async()=>{await ne(c.relativeFromRoot(t.data.path)),W({title:"Copied to clipboard"})},children:[(0,a.jsx)(Pe,{...o}),"Copy relative path"]}),(0,a.jsx)(Z,{}),(0,a.jsxs)(D,{onSelect:()=>{let{path:j}=t.data;g(Fe[f](j))},children:[(0,a.jsx)(ct,{...o}),"Insert snippet for reading file"]}),(0,a.jsxs)(D,{onSelect:async()=>{W({title:"Copied to clipboard",description:"Code to open the file has been copied to your clipboard. You can also drag and drop this file into the editor"});let{path:j}=t.data;await ne(Fe[f](j))},children:[(0,a.jsx)(Le,{...o}),"Copy snippet for reading file"]}),t.data.isMarimoFile&&!re()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Z,{}),(0,a.jsxs)(D,{onSelect:y,children:[(0,a.jsx)(Jt,{...o}),"Open notebook"]})]}),(0,a.jsx)(Z,{}),!t.data.isDirectory&&!d&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(D,{onSelect:async()=>{let j=(await r({path:t.data.path})).contents||"";be(new Blob([j]),t.data.name)},children:[(0,a.jsx)(ke,{...o}),"Download"]}),(0,a.jsx)(Z,{})]}),(0,a.jsxs)(D,{onSelect:C,variant:"danger",children:[(0,a.jsx)(Dt,{...o}),"Delete"]})]})};return(0,a.jsxs)("div",{style:e,ref:i,className:me("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group"),draggable:!0,onClick:o=>{o.stopPropagation(),t.data.isDirectory&&t.toggle()},children:[(0,a.jsx)(ya,{node:t}),(0,a.jsxs)("span",{className:me("flex items-center pl-1 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden group",t.willReceiveDrop&&t.data.isDirectory&&"bg-accent/80 hover:bg-accent/80 text-accent-foreground"),children:[t.data.isMarimoFile?(0,a.jsx)("img",{src:Ut,className:"w-5 h-5 shrink-0 mr-2 filter grayscale",alt:"Marimo"}):(0,a.jsx)(h,{className:"w-5 h-5 shrink-0 mr-2",strokeWidth:1.5}),t.isEditing?(0,a.jsx)(ja,{node:t}):(0,a.jsx)(ua,{node:t,onOpenMarimoFile:y}),(0,a.jsxs)(gt,{modal:!1,children:[(0,a.jsx)(ut,{asChild:!0,tabIndex:-1,onClick:o=>o.stopPropagation(),children:(0,a.jsx)(I,{"data-testid":"file-explorer-more-button",variant:"text",tabIndex:-1,size:"xs",className:"mb-0","aria-label":"More options",children:(0,a.jsx)(yt,{strokeWidth:2,className:"w-5 h-5 hidden group-hover:block"})})}),b()]})]})]})},ya=t=>{let e=(0,X.c)(3),{node:i}=t;if(!i.data.isDirectory){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)("span",{className:"w-5 h-5 shrink-0"}),e[0]=s):s=e[0],s}let n;return e[1]===i.isOpen?n=e[2]:(n=i.isOpen?(0,a.jsx)(mt,{className:"w-5 h-5 shrink-0"}):(0,a.jsx)(ft,{className:"w-5 h-5 shrink-0"}),e[1]=i.isOpen,e[2]=n),n};function Ie(t,e){t.stopPropagation(),t.preventDefault(),Lt(e)}function Ee(t,e){if(e)return t;let i=[];for(let n of t){if(va(n.name))continue;let s=n;if(n.children){let r=Ee(n.children,e);r!==n.children&&(s={...n,children:r})}i.push(s)}return i}function va(t){return!!t.startsWith(".")}function ba(){return null}function wa(t){let{parentNode:e}=t;return!e.data.isDirectory}function ka(t){return t.stopPropagation()}var Fa=ie(),Ca=()=>{let t=(0,Fa.c)(20),{ref:e,height:i}=Vt(),n=i===void 0?1:i,s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={noClick:!0,noKeyboard:!0},t[0]=s):s=t[0];let{getRootProps:r,getInputProps:d,isDragActive:f}=Ae(s),h;t[1]===r?h=t[2]:(h=r(),t[1]=r,t[2]=h);let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=me("flex flex-col flex-1 overflow-hidden relative"),t[3]=m):m=t[3];let l;t[4]===d?l=t[5]:(l=d(),t[4]=d,t[5]=l);let u;t[6]===l?u=t[7]:(u=(0,a.jsx)("input",{...l}),t[6]=l,t[7]=u);let v;t[8]===f?v=t[9]:(v=f&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center uppercase justify-center text-xl font-bold text-primary/90 bg-accent/85 z-10 border-2 border-dashed border-primary/90 rounded-lg pointer-events-none",children:"Drop files here"}),t[8]=f,t[9]=v);let g;t[10]===n?g=t[11]:(g=(0,a.jsx)(pa,{height:n}),t[10]=n,t[11]=g);let c;t[12]!==e||t[13]!==g?(c=(0,a.jsx)("div",{ref:e,className:"flex flex-col flex-1 overflow-hidden",children:g}),t[12]=e,t[13]=g,t[14]=c):c=t[14];let y;return t[15]!==h||t[16]!==u||t[17]!==v||t[18]!==c?(y=(0,a.jsx)(Qt,{children:(0,a.jsxs)("div",{...h,className:m,children:[u,v,c]})}),t[15]=h,t[16]=u,t[17]=v,t[18]=c,t[19]=y):y=t[19],y};export{Ca as default};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]);export{t};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var e=a("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),h=a("file-headphone",[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",key:"1vfytu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",key:"1etmh7"}]]),t=a("file-image",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]),v=a("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);export{e as i,t as n,h as r,v as t};
import{s as I}from"./chunk-LvLJmgfZ.js";import{u as j}from"./useEvent-DO6uJBas.js";import{t as M}from"./react-BGmjiNul.js";import{nt as O,x as H}from"./cells-BpZ7g6ok.js";import{t as S}from"./compiler-runtime-DeeZ7FnK.js";import{d as k}from"./hotkeys-BHHWjLlp.js";import{t as $}from"./jsx-runtime-ZmTK25f3.js";import{t as x}from"./cn-BKtXLv3a.js";import{t as B}from"./mode-DX8pdI-l.js";var D=S(),h=I(M(),1);function L(){return B()==="edit"?document.getElementById("App"):void 0}function _(t){let e=(0,D.c)(7),[r,o]=(0,h.useState)(void 0),[i,s]=(0,h.useState)(void 0),l=(0,h.useRef)(null),n=(0,h.useRef)(null),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=new Map,e[0]=f):f=e[0];let u=(0,h.useRef)(f),a,m;e[1]===t?(a=e[2],m=e[3]):(a=()=>t.length===0?void 0:(l.current=new IntersectionObserver(d=>{let v=!1;if(d.forEach(p=>{let b=p.target;p.isIntersecting?(!n.current||b.getBoundingClientRect().top<n.current.getBoundingClientRect().top)&&(n.current=b,v=!0):b===n.current&&(n.current=null,v=!0)}),v&&n.current){let p=O(n.current);o("id"in p?p.id:p.path),s(u.current.get(n.current))}},{root:L(),rootMargin:"0px",threshold:0}),t.forEach(d=>{var v;if(d){let p=O(d[0]),b=t.map(T).filter(w=>"id"in p?w.id===p.id:w.textContent===d[0].textContent).indexOf(d[0]);u.current.set(d[0],b),(v=l.current)==null||v.observe(d[0])}}),()=>{l.current&&l.current.disconnect(),n.current=null}),m=[t],e[1]=t,e[2]=a,e[3]=m),(0,h.useEffect)(a,m);let c;return e[4]!==r||e[5]!==i?(c={activeHeaderId:r,activeOccurrences:i},e[4]=r,e[5]=i,e[6]=c):c=e[6],c}function T(t){let[e]=t;return e}function C(t){if(t.length===0)return[];let e=new Map;return t.map(r=>{let o="id"in r.by?r.by.id:r.by.path,i=e.get(o)??0;e.set(o,i+1);let s=N(r,i);return s?[s,o]:null}).filter(Boolean)}function E(t,e){let r=N(t,e);if(!r){k.warn("Could not find element for outline item",t);return}r.scrollIntoView({behavior:"smooth",block:"start"}),r.classList.add("outline-item-highlight"),setTimeout(()=>{r.classList.remove("outline-item-highlight")},3e3)}function N(t,e){return"id"in t.by?document.querySelectorAll(`[id="${CSS.escape(t.by.id)}"]`)[e]:document.evaluate(t.by.path,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}var y=S(),g=I($(),1);const A=()=>{let t=(0,y.c)(19),{items:e}=j(H),r;t[0]===e?r=t[1]:(r=C(e),t[0]=e,t[1]=r);let{activeHeaderId:o,activeOccurrences:i}=_(r),[s,l]=h.useState(!1);if(e.length<2)return null;let n,f,u;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>l(!0),f=()=>l(!1),u=x("fixed top-[25vh] right-8 z-10000","hidden md:block"),t[2]=n,t[3]=f,t[4]=u):(n=t[2],f=t[3],u=t[4]);let a=s?"-left-[280px] opacity-100":"left-[300px] opacity-0",m;t[5]===a?m=t[6]:(m=x("-top-4 max-h-[70vh] bg-background rounded-lg shadow-lg absolute overflow-auto transition-all duration-300 w-[300px] border",a),t[5]=a,t[6]=m);let c;t[7]!==o||t[8]!==i||t[9]!==e||t[10]!==m?(c=(0,g.jsx)(R,{className:m,items:e,activeHeaderId:o,activeOccurrences:i}),t[7]=o,t[8]=i,t[9]=e,t[10]=m,t[11]=c):c=t[11];let d;t[12]!==o||t[13]!==i||t[14]!==e?(d=(0,g.jsx)(P,{items:e,activeHeaderId:o,activeOccurrences:i}),t[12]=o,t[13]=i,t[14]=e,t[15]=d):d=t[15];let v;return t[16]!==c||t[17]!==d?(v=(0,g.jsxs)("div",{onMouseEnter:n,onMouseLeave:f,className:u,children:[c,d]}),t[16]=c,t[17]=d,t[18]=v):v=t[18],v},P=t=>{let e=(0,y.c)(8),{items:r,activeHeaderId:o,activeOccurrences:i}=t,s,l;if(e[0]!==o||e[1]!==i||e[2]!==r){let f=new Map;s="flex flex-col gap-4 items-end max-h-[70vh] overflow-hidden",l=r.map((u,a)=>{let m="id"in u.by?u.by.id:u.by.path,c=f.get(m)??0;return f.set(m,c+1),(0,g.jsx)("div",{className:x("h-[2px] bg-muted-foreground/60",u.level===1&&"w-5",u.level===2&&"w-4",u.level===3&&"w-3",u.level===4&&"w-2",c===i&&o===m&&"bg-foreground"),onClick:()=>E(u,c)},`${m}-${a}`)}),e[0]=o,e[1]=i,e[2]=r,e[3]=s,e[4]=l}else s=e[3],l=e[4];let n;return e[5]!==s||e[6]!==l?(n=(0,g.jsx)("div",{className:s,children:l}),e[5]=s,e[6]=l,e[7]=n):n=e[7],n},R=t=>{let e=(0,y.c)(11),{items:r,activeHeaderId:o,activeOccurrences:i,className:s}=t,l,n;if(e[0]!==o||e[1]!==i||e[2]!==s||e[3]!==r){let u=new Map;e[6]===s?l=e[7]:(l=x("flex flex-col overflow-auto py-4 pl-2",s),e[6]=s,e[7]=l),n=r.map((a,m)=>{let c="id"in a.by?a.by.id:a.by.path,d=u.get(c)??0;return u.set(c,d+1),(0,g.jsx)("div",{className:x("px-2 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l",a.level===1&&"font-semibold",a.level===2&&"ml-3",a.level===3&&"ml-6",a.level===4&&"ml-9",d===i&&o===c&&"text-accent-foreground"),onClick:()=>E(a,d),children:a.name},`${c}-${m}`)}),e[0]=o,e[1]=i,e[2]=s,e[3]=r,e[4]=l,e[5]=n}else l=e[4],n=e[5];let f;return e[8]!==l||e[9]!==n?(f=(0,g.jsx)("div",{className:l,children:n}),e[8]=l,e[9]=n,e[10]=f):f=e[10],f};export{_ as i,R as n,C as r,A as t};
var P1;import"./purify.es-DNVQZNFu.js";import{u as m1}from"./src-Cf4NnJCp.js";import{c as et,g as st}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as k,r as Z}from"./src-BKLwm2RN.js";import{$ as Yt,B as Ht,C as Xt,H as Mt,U as qt,_ as Qt,a as Zt,b as p1,s as Jt,u as te,v as ee,z as se}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as ie}from"./channel-Ca5LuXyQ.js";import{n as re,t as ue}from"./chunk-MI3HLSF2-Csy17Fj5.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import{o as ne}from"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import{r as oe,t as ae}from"./chunk-N4CR4FBY-eo9CRI73.js";import{t as le}from"./chunk-FMBD7UC4-Cn7KHL11.js";import{t as ce}from"./chunk-55IACEB6-SrR0J56d.js";import{t as he}from"./chunk-QN33PNHL-C_hHv997.js";var de="flowchart-",pe=(P1=class{constructor(){this.vertexCounter=0,this.config=p1(),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=Ht,this.setAccDescription=se,this.setDiagramTitle=qt,this.getAccTitle=ee,this.getAccDescription=Qt,this.getDiagramTitle=Xt,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 Jt.sanitizeText(i,this.config)}lookUpDomId(i){for(let r of this.vertices.values())if(r.id===i)return r.domId;return i}addVertex(i,r,u,o,n,g,p={},c){var z,f;if(!i||i.trim().length===0)return;let a;if(c!==void 0){let d;d=c.includes(`
`)?c+`
`:`{
`+c+`
}`,a=re(d,{schema:ue})}let y=this.edges.find(d=>d.id===i);if(y){let d=a;(d==null?void 0:d.animate)!==void 0&&(y.animate=d.animate),(d==null?void 0:d.animation)!==void 0&&(y.animation=d.animation),(d==null?void 0:d.curve)!==void 0&&(y.interpolate=d.curve);return}let T,A=this.vertices.get(i);if(A===void 0&&(A={id:i,labelType:"text",domId:de+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,A)),this.vertexCounter++,r===void 0?A.text===void 0&&(A.text=i):(this.config=p1(),T=this.sanitizeText(r.text.trim()),A.labelType=r.type,T.startsWith('"')&&T.endsWith('"')&&(T=T.substring(1,T.length-1)),A.text=T),u!==void 0&&(A.type=u),o==null||o.forEach(d=>{A.styles.push(d)}),n==null||n.forEach(d=>{A.classes.push(d)}),g!==void 0&&(A.dir=g),A.props===void 0?A.props=p:p!==void 0&&Object.assign(A.props,p),a!==void 0){if(a.shape){if(a.shape!==a.shape.toLowerCase()||a.shape.includes("_"))throw Error(`No such shape: ${a.shape}. Shape names should be lowercase.`);if(!ne(a.shape))throw Error(`No such shape: ${a.shape}.`);A.type=a==null?void 0:a.shape}a!=null&&a.label&&(A.text=a==null?void 0:a.label),a!=null&&a.icon&&(A.icon=a==null?void 0:a.icon,!((z=a.label)!=null&&z.trim())&&A.text===i&&(A.text="")),a!=null&&a.form&&(A.form=a==null?void 0:a.form),a!=null&&a.pos&&(A.pos=a==null?void 0:a.pos),a!=null&&a.img&&(A.img=a==null?void 0:a.img,!((f=a.label)!=null&&f.trim())&&A.text===i&&(A.text="")),a!=null&&a.constraint&&(A.constraint=a.constraint),a.w&&(A.assetWidth=Number(a.w)),a.h&&(A.assetHeight=Number(a.h))}}addSingleLink(i,r,u,o){let n={start:i,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};Z.info("abc78 Got edge...",n);let g=u.text;if(g!==void 0&&(n.text=this.sanitizeText(g.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=g.type),u!==void 0&&(n.type=u.type,n.stroke=u.stroke,n.length=u.length>10?10:u.length),o&&!this.edges.some(p=>p.id===o))n.id=o,n.isUserDefinedId=!0;else{let p=this.edges.filter(c=>c.start===n.start&&c.end===n.end);p.length===0?n.id=et(n.start,n.end,{counter:0,prefix:"L"}):n.id=et(n.start,n.end,{counter:p.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))Z.info("Pushing edge..."),this.edges.push(n);else throw 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 typeof i=="object"&&!!i&&"id"in i&&typeof i.id=="string"}addLink(i,r,u){let o=this.isLinkData(u)?u.id.replace("@",""):void 0;Z.info("addLink",i,r,o);for(let n of i)for(let g of r){let p=n===i[i.length-1],c=g===r[0];p&&c?this.addSingleLink(n,g,u,o):this.addSingleLink(n,g,u,void 0)}}updateLinkInterpolate(i,r){i.forEach(u=>{u==="default"?this.edges.defaultInterpolate=r:this.edges[u].interpolate=r})}updateLink(i,r){i.forEach(u=>{var o,n,g,p,c,a;if(typeof u=="number"&&u>=this.edges.length)throw Error(`The index ${u} 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.)`);u==="default"?this.edges.defaultStyle=r:(this.edges[u].style=r,(((n=(o=this.edges[u])==null?void 0:o.style)==null?void 0:n.length)??0)>0&&!((p=(g=this.edges[u])==null?void 0:g.style)!=null&&p.some(y=>y==null?void 0:y.startsWith("fill")))&&((a=(c=this.edges[u])==null?void 0:c.style)==null||a.push("fill:none")))})}addClass(i,r){let u=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(o=>{let n=this.classes.get(o);n===void 0&&(n={id:o,styles:[],textStyles:[]},this.classes.set(o,n)),u==null||u.forEach(g=>{if(/color/.exec(g)){let p=g.replace("fill","bgFill");n.textStyles.push(p)}n.styles.push(g)})})}setDirection(i){this.direction=i.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,r){for(let u of i.split(",")){let o=this.vertices.get(u);o&&o.classes.push(r);let n=this.edges.find(p=>p.id===u);n&&n.classes.push(r);let g=this.subGraphLookup.get(u);g&&g.classes.push(r)}}setTooltip(i,r){if(r!==void 0){r=this.sanitizeText(r);for(let u of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(u):u,r)}}setClickFun(i,r,u){let o=this.lookUpDomId(i);if(p1().securityLevel!=="loose"||r===void 0)return;let n=[];if(typeof u=="string"){n=u.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let p=0;p<n.length;p++){let c=n[p].trim();c.startsWith('"')&&c.endsWith('"')&&(c=c.substr(1,c.length-2)),n[p]=c}}n.length===0&&n.push(i);let g=this.vertices.get(i);g&&(g.haveCallback=!0,this.funs.push(()=>{let p=document.querySelector(`[id="${o}"]`);p!==null&&p.addEventListener("click",()=>{st.runFunc(r,...n)},!1)}))}setLink(i,r,u){i.split(",").forEach(o=>{let n=this.vertices.get(o);n!==void 0&&(n.link=st.formatUrl(r,this.config),n.linkTarget=u)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,r,u){i.split(",").forEach(o=>{this.setClickFun(o,r,u)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(r=>{r(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 r=m1(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=m1("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),m1(i).select("svg").selectAll("g.node").on("mouseover",u=>{var g;let o=m1(u.currentTarget);if(o.attr("title")===null)return;let n=(g=u.currentTarget)==null?void 0:g.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),r.html(r.html().replace(/&lt;br\/&gt;/g,"<br/>")),o.classed("hover",!0)}).on("mouseout",u=>{r.transition().duration(500).style("opacity",0),m1(u.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=p1(),Zt()}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,r,u){let o=i.text.trim(),n=u.text;i===u&&/\s/.exec(u.text)&&(o=void 0);let g=k(T=>{let A={boolean:{},number:{},string:{}},z=[],f;return{nodeList:T.filter(function(d){let K=typeof d;return d.stmt&&d.stmt==="dir"?(f=d.value,!1):d.trim()===""?!1:K in A?A[K].hasOwnProperty(d)?!1:A[K][d]=!0:z.includes(d)?!1:z.push(d)}),dir:f}},"uniq")(r.flat()),p=g.nodeList,c=g.dir,a=p1().flowchart??{};if(c??(c=a.inheritDir?this.getDirection()??p1().direction??void 0:void 0),this.version==="gen-1")for(let T=0;T<p.length;T++)p[T]=this.lookUpDomId(p[T]);o??(o="subGraph"+this.subCount),n||(n=""),n=this.sanitizeText(n),this.subCount+=1;let y={id:o,nodes:p,title:n.trim(),classes:[],dir:c,labelType:u.type};return Z.info("Adding",y.id,y.nodes,y.dir),y.nodes=this.makeUniq(y,this.subGraphs).nodes,this.subGraphs.push(y),this.subGraphLookup.set(o,y),o}getPosForId(i){for(let[r,u]of this.subGraphs.entries())if(u.id===i)return r;return-1}indexNodes2(i,r){let u=this.subGraphs[r].nodes;if(this.secCount+=1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===i)return{result:!0,count:0};let o=0,n=1;for(;o<u.length;){let g=this.getPosForId(u[o]);if(g>=0){let p=this.indexNodes2(i,g);if(p.result)return{result:!0,count:n+p.count};n+=p.count}o+=1}return{result:!1,count:n}}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 r=i.trim(),u="arrow_open";switch(r[0]){case"<":u="arrow_point",r=r.slice(1);break;case"x":u="arrow_cross",r=r.slice(1);break;case"o":u="arrow_circle",r=r.slice(1);break}let o="normal";return r.includes("=")&&(o="thick"),r.includes(".")&&(o="dotted"),{type:u,stroke:o}}countChar(i,r){let u=r.length,o=0;for(let n=0;n<u;++n)r[n]===i&&++o;return o}destructEndLink(i){let r=i.trim(),u=r.slice(0,-1),o="arrow_open";switch(r.slice(-1)){case"x":o="arrow_cross",r.startsWith("x")&&(o="double_"+o,u=u.slice(1));break;case">":o="arrow_point",r.startsWith("<")&&(o="double_"+o,u=u.slice(1));break;case"o":o="arrow_circle",r.startsWith("o")&&(o="double_"+o,u=u.slice(1));break}let n="normal",g=u.length-1;u.startsWith("=")&&(n="thick"),u.startsWith("~")&&(n="invisible");let p=this.countChar(".",u);return p&&(n="dotted",g=p),{type:o,stroke:n,length:g}}destructLink(i,r){let u=this.destructEndLink(i),o;if(r){if(o=this.destructStartLink(r),o.stroke!==u.stroke)return{type:"INVALID",stroke:"INVALID"};if(o.type==="arrow_open")o.type=u.type;else{if(o.type!==u.type)return{type:"INVALID",stroke:"INVALID"};o.type="double_"+o.type}return o.type==="double_arrow"&&(o.type="double_arrow_point"),o.length=u.length,o}return u}exists(i,r){for(let u of i)if(u.nodes.includes(r))return!0;return!1}makeUniq(i,r){let u=[];return i.nodes.forEach((o,n)=>{this.exists(r,o)||u.push(i.nodes[n])}),{nodes:u}}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,r){return i.find(u=>u.id===r)}destructEdgeType(i){let r="none",u="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":u=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=i.replace("double_",""),u=r;break}return{arrowTypeStart:r,arrowTypeEnd:u}}addNodeFromVertex(i,r,u,o,n,g){var y;let p=u.get(i.id),c=o.get(i.id)??!1,a=this.findNode(r,i.id);if(a)a.cssStyles=i.styles,a.cssCompiledStyles=this.getCompiledStyles(i.classes),a.cssClasses=i.classes.join(" ");else{let T={id:i.id,label:i.text,labelStyle:"",parentId:p,padding:((y=n.flowchart)==null?void 0:y.padding)||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:g,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};c?r.push({...T,isGroup:!0,shape:"rect"}):r.push({...T,isGroup:!1,shape:this.getTypeFromVertex(i)})}}getCompiledStyles(i){let r=[];for(let u of i){let o=this.classes.get(u);o!=null&&o.styles&&(r=[...r,...o.styles??[]].map(n=>n.trim())),o!=null&&o.textStyles&&(r=[...r,...o.textStyles??[]].map(n=>n.trim()))}return r}getData(){let i=p1(),r=[],u=[],o=this.getSubGraphs(),n=new Map,g=new Map;for(let c=o.length-1;c>=0;c--){let a=o[c];a.nodes.length>0&&g.set(a.id,!0);for(let y of a.nodes)n.set(y,a.id)}for(let c=o.length-1;c>=0;c--){let a=o[c];r.push({id:a.id,label:a.title,labelStyle:"",parentId:n.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(" "),shape:"rect",dir:a.dir,isGroup:!0,look:i.look})}this.getVertices().forEach(c=>{this.addNodeFromVertex(c,r,n,g,i,i.look||"classic")});let p=this.getEdges();return p.forEach((c,a)=>{var f;let{arrowTypeStart:y,arrowTypeEnd:T}=this.destructEdgeType(c.type),A=[...p.defaultStyle??[]];c.style&&A.push(...c.style);let z={id:et(c.start,c.end,{counter:a,prefix:"L"},c.id),isUserDefinedId:c.isUserDefinedId,start:c.start,end:c.end,type:c.type??"normal",label:c.text,labelpos:"c",thickness:c.stroke,minlen:c.length,classes:(c==null?void 0:c.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(c==null?void 0:c.stroke)==="invisible"||(c==null?void 0:c.type)==="arrow_open"?"none":y,arrowTypeEnd:(c==null?void 0:c.stroke)==="invisible"||(c==null?void 0:c.type)==="arrow_open"?"none":T,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(c.classes),labelStyle:A,style:A,pattern:c.stroke,look:i.look,animate:c.animate,animation:c.animation,curve:c.interpolate||this.edges.defaultInterpolate||((f=i.flowchart)==null?void 0:f.curve)};u.push(z)}),{nodes:r,edges:u,other:{},config:i}}defaultConfig(){return te.flowchart}},k(P1,"FlowDB"),P1),ge={getClasses:k(function(s,i){return i.db.getClasses()},"getClasses"),draw:k(async function(s,i,r,u){var z;Z.info("REF0:"),Z.info("Drawing state diagram (v2)",i);let{securityLevel:o,flowchart:n,layout:g}=p1(),p;o==="sandbox"&&(p=m1("#i"+i));let c=o==="sandbox"?p.nodes()[0].contentDocument:document;Z.debug("Before getData: ");let a=u.db.getData();Z.debug("Data: ",a);let y=ce(i,o),T=u.db.getDirection();a.type=u.type,a.layoutAlgorithm=ae(g),a.layoutAlgorithm==="dagre"&&g==="elk"&&Z.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."),a.direction=T,a.nodeSpacing=(n==null?void 0:n.nodeSpacing)||50,a.rankSpacing=(n==null?void 0:n.rankSpacing)||50,a.markers=["point","circle","cross"],a.diagramId=i,Z.debug("REF1:",a),await oe(a,y);let A=((z=a.config.flowchart)==null?void 0:z.diagramPadding)??8;st.insertTitle(y,"flowchartTitleText",(n==null?void 0:n.titleTopMargin)||0,u.db.getDiagramTitle()),he(y,A,"flowchart",(n==null?void 0:n.useMaxWidth)||!1);for(let f of a.nodes){let d=m1(`#${i} [id="${f.id}"]`);if(!d||!f.link)continue;let K=c.createElementNS("http://www.w3.org/2000/svg","a");K.setAttributeNS("http://www.w3.org/2000/svg","class",f.cssClasses),K.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),o==="sandbox"?K.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):f.linkTarget&&K.setAttributeNS("http://www.w3.org/2000/svg","target",f.linkTarget);let g1=d.insert(function(){return K},":first-child"),A1=d.select(".label-container");A1&&g1.append(function(){return A1.node()});let b1=d.select(".label");b1&&g1.append(function(){return b1.node()})}},"draw")},it=(function(){var s=k(function(h,D,b,l){for(b||(b={}),l=h.length;l--;b[h[l]]=D);return b},"o"),i=[1,4],r=[1,3],u=[1,5],o=[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],n=[2,2],g=[1,13],p=[1,14],c=[1,15],a=[1,16],y=[1,23],T=[1,25],A=[1,26],z=[1,27],f=[1,49],d=[1,48],K=[1,29],g1=[1,30],A1=[1,31],b1=[1,32],O1=[1,33],$=[1,44],L=[1,46],w=[1,42],I=[1,47],N=[1,43],R=[1,50],P=[1,45],G=[1,51],O=[1,52],M1=[1,34],U1=[1,35],V1=[1,36],W1=[1,37],h1=[1,57],S=[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],J=[1,61],t1=[1,60],e1=[1,62],E1=[8,9,11,75,77,78],rt=[1,78],C1=[1,91],x1=[1,96],D1=[1,95],T1=[1,92],S1=[1,88],F1=[1,94],_1=[1,90],B1=[1,97],v1=[1,93],$1=[1,98],L1=[1,89],k1=[8,9,10,11,40,75,77,78],U=[8,9,10,11,40,46,75,77,78],j=[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],ut=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],w1=[44,60,89,102,105,106,109,111,114,115,116],nt=[1,121],ot=[1,122],z1=[1,124],K1=[1,123],at=[44,60,62,74,89,102,105,106,109,111,114,115,116],lt=[1,133],ct=[1,147],ht=[1,148],dt=[1,149],pt=[1,150],gt=[1,135],At=[1,137],bt=[1,141],kt=[1,142],ft=[1,143],yt=[1,144],mt=[1,145],Et=[1,146],Ct=[1,151],xt=[1,152],Dt=[1,131],Tt=[1,132],St=[1,139],Ft=[1,134],_t=[1,138],Bt=[1,136],X1=[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],vt=[1,154],$t=[1,156],_=[8,9,11],Y=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],m=[1,176],V=[1,172],W=[1,173],E=[1,177],C=[1,174],x=[1,175],I1=[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],Lt=[10,106],d1=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],s1=[1,247],i1=[1,245],r1=[1,249],u1=[1,243],n1=[1,244],o1=[1,246],a1=[1,248],l1=[1,250],N1=[1,268],wt=[8,9,11,106],Q=[8,9,10,11,60,84,105,106,109,110,111,112],q1={trace:k(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:k(function(h,D,b,l,B,t,G1){var e=t.length-1;switch(B){case 2:this.$=[];break;case 3:(!Array.isArray(t[e])||t[e].length>0)&&t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 183:this.$=t[e];break;case 11:l.setDirection("TB"),this.$="TB";break;case 12:l.setDirection(t[e-1]),this.$=t[e-1];break;case 27:this.$=t[e-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=l.addSubGraph(t[e-6],t[e-1],t[e-4]);break;case 34:this.$=l.addSubGraph(t[e-3],t[e-1],t[e-3]);break;case 35:this.$=l.addSubGraph(void 0,t[e-1],void 0);break;case 37:this.$=t[e].trim(),l.setAccTitle(this.$);break;case 38:case 39:this.$=t[e].trim(),l.setAccDescription(this.$);break;case 43:this.$=t[e-1]+t[e];break;case 44:this.$=t[e];break;case 45:l.addVertex(t[e-1][t[e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e]),l.addLink(t[e-3].stmt,t[e-1],t[e-2]),this.$={stmt:t[e-1],nodes:t[e-1].concat(t[e-3].nodes)};break;case 46:l.addLink(t[e-2].stmt,t[e],t[e-1]),this.$={stmt:t[e],nodes:t[e].concat(t[e-2].nodes)};break;case 47:l.addLink(t[e-3].stmt,t[e-1],t[e-2]),this.$={stmt:t[e-1],nodes:t[e-1].concat(t[e-3].nodes)};break;case 48:this.$={stmt:t[e-1],nodes:t[e-1]};break;case 49:l.addVertex(t[e-1][t[e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e]),this.$={stmt:t[e-1],nodes:t[e-1],shapeData:t[e]};break;case 50:this.$={stmt:t[e],nodes:t[e]};break;case 51:this.$=[t[e]];break;case 52:l.addVertex(t[e-5][t[e-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e-4]),this.$=t[e-5].concat(t[e]);break;case 53:this.$=t[e-4].concat(t[e]);break;case 54:this.$=t[e];break;case 55:this.$=t[e-2],l.setClass(t[e-2],t[e]);break;case 56:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"square");break;case 57:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"doublecircle");break;case 58:this.$=t[e-5],l.addVertex(t[e-5],t[e-2],"circle");break;case 59:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"ellipse");break;case 60:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"stadium");break;case 61:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"subroutine");break;case 62:this.$=t[e-7],l.addVertex(t[e-7],t[e-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[e-5],t[e-3]]]));break;case 63:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"cylinder");break;case 64:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"round");break;case 65:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"diamond");break;case 66:this.$=t[e-5],l.addVertex(t[e-5],t[e-2],"hexagon");break;case 67:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"odd");break;case 68:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"trapezoid");break;case 69:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"inv_trapezoid");break;case 70:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"lean_right");break;case 71:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"lean_left");break;case 72:this.$=t[e],l.addVertex(t[e]);break;case 73:t[e-1].text=t[e],this.$=t[e-1];break;case 74:case 75:t[e-2].text=t[e-1],this.$=t[e-2];break;case 76:this.$=t[e];break;case 77:var v=l.destructLink(t[e],t[e-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:t[e-1]};break;case 78:var v=l.destructLink(t[e],t[e-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:t[e-1],id:t[e-3]};break;case 79:this.$={text:t[e],type:"text"};break;case 80:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 81:this.$={text:t[e],type:"string"};break;case 82:this.$={text:t[e],type:"markdown"};break;case 83:var v=l.destructLink(t[e]);this.$={type:v.type,stroke:v.stroke,length:v.length};break;case 84:var v=l.destructLink(t[e]);this.$={type:v.type,stroke:v.stroke,length:v.length,id:t[e-1]};break;case 85:this.$=t[e-1];break;case 86:this.$={text:t[e],type:"text"};break;case 87:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 88:this.$={text:t[e],type:"string"};break;case 89:case 104:this.$={text:t[e],type:"markdown"};break;case 101:this.$={text:t[e],type:"text"};break;case 102:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 103:this.$={text:t[e],type:"text"};break;case 105:this.$=t[e-4],l.addClass(t[e-2],t[e]);break;case 106:this.$=t[e-4],l.setClass(t[e-2],t[e]);break;case 107:case 115:this.$=t[e-1],l.setClickEvent(t[e-1],t[e]);break;case 108:case 116:this.$=t[e-3],l.setClickEvent(t[e-3],t[e-2]),l.setTooltip(t[e-3],t[e]);break;case 109:this.$=t[e-2],l.setClickEvent(t[e-2],t[e-1],t[e]);break;case 110:this.$=t[e-4],l.setClickEvent(t[e-4],t[e-3],t[e-2]),l.setTooltip(t[e-4],t[e]);break;case 111:this.$=t[e-2],l.setLink(t[e-2],t[e]);break;case 112:this.$=t[e-4],l.setLink(t[e-4],t[e-2]),l.setTooltip(t[e-4],t[e]);break;case 113:this.$=t[e-4],l.setLink(t[e-4],t[e-2],t[e]);break;case 114:this.$=t[e-6],l.setLink(t[e-6],t[e-4],t[e]),l.setTooltip(t[e-6],t[e-2]);break;case 117:this.$=t[e-1],l.setLink(t[e-1],t[e]);break;case 118:this.$=t[e-3],l.setLink(t[e-3],t[e-2]),l.setTooltip(t[e-3],t[e]);break;case 119:this.$=t[e-3],l.setLink(t[e-3],t[e-2],t[e]);break;case 120:this.$=t[e-5],l.setLink(t[e-5],t[e-4],t[e]),l.setTooltip(t[e-5],t[e-2]);break;case 121:this.$=t[e-4],l.addVertex(t[e-2],void 0,void 0,t[e]);break;case 122:this.$=t[e-4],l.updateLink([t[e-2]],t[e]);break;case 123:this.$=t[e-4],l.updateLink(t[e-2],t[e]);break;case 124:this.$=t[e-8],l.updateLinkInterpolate([t[e-6]],t[e-2]),l.updateLink([t[e-6]],t[e]);break;case 125:this.$=t[e-8],l.updateLinkInterpolate(t[e-6],t[e-2]),l.updateLink(t[e-6],t[e]);break;case 126:this.$=t[e-6],l.updateLinkInterpolate([t[e-4]],t[e]);break;case 127:this.$=t[e-6],l.updateLinkInterpolate(t[e-4],t[e]);break;case 128:case 130:this.$=[t[e]];break;case 129:case 131:t[e-2].push(t[e]),this.$=t[e-2];break;case 133:this.$=t[e-1]+t[e];break;case 181:this.$=t[e];break;case 182:this.$=t[e-1]+""+t[e];break;case 184:this.$=t[e-1]+""+t[e];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:r,12:u},{1:[3]},s(o,n,{5:6}),{4:7,9:i,10:r,12:u},{4:8,9:i,10:r,12:u},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:g,9:p,10:c,11:a,20:17,22:18,23:19,24:20,25:21,26:22,27:y,33:24,34:T,36:A,38:z,42:28,43:38,44:f,45:39,47:40,60:d,84:K,85:g1,86:A1,87:b1,88:O1,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O,121:M1,122:U1,123:V1,124:W1},s(o,[2,9]),s(o,[2,10]),s(o,[2,11]),{8:[1,54],9:[1,55],10:h1,15:53,18:56},s(S,[2,3]),s(S,[2,4]),s(S,[2,5]),s(S,[2,6]),s(S,[2,7]),s(S,[2,8]),{8:J,9:t1,11:e1,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:J,9:t1,11:e1,21:67},{8:J,9:t1,11:e1,21:68},{8:J,9:t1,11:e1,21:69},{8:J,9:t1,11:e1,21:70},{8:J,9:t1,11:e1,21:71},{8:J,9:t1,10:[1,72],11:e1,21:73},s(S,[2,36]),{35:[1,74]},{37:[1,75]},s(S,[2,39]),s(E1,[2,50],{18:76,39:77,10:h1,40:rt}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:C1,44:x1,60:D1,80:[1,86],89:T1,95:[1,83],97:[1,84],101:85,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1,120:87},s(S,[2,185]),s(S,[2,186]),s(S,[2,187]),s(S,[2,188]),s(k1,[2,51]),s(k1,[2,54],{46:[1,99]}),s(U,[2,72],{113:112,29:[1,100],44:f,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:d,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:$,102:L,105:w,106:I,109:N,111:R,114:P,115:G,116:O}),s(j,[2,181]),s(j,[2,142]),s(j,[2,143]),s(j,[2,144]),s(j,[2,145]),s(j,[2,146]),s(j,[2,147]),s(j,[2,148]),s(j,[2,149]),s(j,[2,150]),s(j,[2,151]),s(j,[2,152]),s(o,[2,12]),s(o,[2,18]),s(o,[2,19]),{9:[1,113]},s(ut,[2,26],{18:114,10:h1}),s(S,[2,27]),{42:115,43:38,44:f,45:39,47:40,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},s(S,[2,40]),s(S,[2,41]),s(S,[2,42]),s(w1,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:nt,81:ot,116:z1,119:K1},{75:[1,125],77:[1,126]},s(at,[2,83]),s(S,[2,28]),s(S,[2,29]),s(S,[2,30]),s(S,[2,31]),s(S,[2,32]),{10:lt,12:ct,14:ht,27:dt,28:127,32:pt,44:gt,60:At,75:bt,80:[1,129],81:[1,130],83:140,84:kt,85:ft,86:yt,87:mt,88:Et,89:Ct,90:xt,91:128,105:Dt,109:Tt,111:St,114:Ft,115:_t,116:Bt},s(X1,n,{5:153}),s(S,[2,37]),s(S,[2,38]),s(E1,[2,48],{44:vt}),s(E1,[2,49],{18:155,10:h1,40:$t}),s(k1,[2,44]),{44:f,47:157,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},{102:[1,158],103:159,105:[1,160]},{44:f,47:161,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},{44:f,47:162,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},s(_,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},s(_,[2,115],{120:167,10:[1,166],14:C1,44:x1,60:D1,89:T1,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1}),s(_,[2,117],{10:[1,168]}),s(Y,[2,183]),s(Y,[2,170]),s(Y,[2,171]),s(Y,[2,172]),s(Y,[2,173]),s(Y,[2,174]),s(Y,[2,175]),s(Y,[2,176]),s(Y,[2,177]),s(Y,[2,178]),s(Y,[2,179]),s(Y,[2,180]),{44:f,47:169,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},{30:170,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:178,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:180,50:[1,179],67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:181,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:182,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:183,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{109:[1,184]},{30:185,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:186,65:[1,187],67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:188,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:189,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{30:190,67:m,80:V,81:W,82:171,116:E,117:C,118:x},s(j,[2,182]),s(o,[2,20]),s(ut,[2,25]),s(E1,[2,46],{39:191,18:192,10:h1,40:rt}),s(w1,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{77:[1,196],79:197,116:z1,119:K1},s(I1,[2,79]),s(I1,[2,81]),s(I1,[2,82]),s(I1,[2,168]),s(I1,[2,169]),{76:198,79:120,80:nt,81:ot,116:z1,119:K1},s(at,[2,84]),{8:J,9:t1,10:lt,11:e1,12:ct,14:ht,21:200,27:dt,29:[1,199],32:pt,44:gt,60:At,75:bt,83:140,84:kt,85:ft,86:yt,87:mt,88:Et,89:Ct,90:xt,91:201,105:Dt,109:Tt,111:St,114:Ft,115:_t,116:Bt},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:g,9:p,10:c,11:a,20:17,22:18,23:19,24:20,25:21,26:22,27:y,32:[1,202],33:24,34:T,36:A,38:z,42:28,43:38,44:f,45:39,47:40,60:d,84:K,85:g1,86:A1,87:b1,88:O1,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O,121:M1,122:U1,123:V1,124:W1},{10:h1,18:203},{44:[1,204]},s(k1,[2,43]),{10:[1,205],44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:112,114:P,115:G,116:O},{10:[1,206]},{10:[1,207],106:[1,208]},s(Lt,[2,128]),{10:[1,209],44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:112,114:P,115:G,116:O},{10:[1,210],44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:112,114:P,115:G,116:O},{80:[1,211]},s(_,[2,109],{10:[1,212]}),s(_,[2,111],{10:[1,213]}),{80:[1,214]},s(Y,[2,184]),{80:[1,215],98:[1,216]},s(k1,[2,55],{113:112,44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,114:P,115:G,116:O}),{31:[1,217],67:m,82:218,116:E,117:C,118:x},s(d1,[2,86]),s(d1,[2,88]),s(d1,[2,89]),s(d1,[2,153]),s(d1,[2,154]),s(d1,[2,155]),s(d1,[2,156]),{49:[1,219],67:m,82:218,116:E,117:C,118:x},{30:220,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{51:[1,221],67:m,82:218,116:E,117:C,118:x},{53:[1,222],67:m,82:218,116:E,117:C,118:x},{55:[1,223],67:m,82:218,116:E,117:C,118:x},{57:[1,224],67:m,82:218,116:E,117:C,118:x},{60:[1,225]},{64:[1,226],67:m,82:218,116:E,117:C,118:x},{66:[1,227],67:m,82:218,116:E,117:C,118:x},{30:228,67:m,80:V,81:W,82:171,116:E,117:C,118:x},{31:[1,229],67:m,82:218,116:E,117:C,118:x},{67:m,69:[1,230],71:[1,231],82:218,116:E,117:C,118:x},{67:m,69:[1,233],71:[1,232],82:218,116:E,117:C,118:x},s(E1,[2,45],{18:155,10:h1,40:$t}),s(E1,[2,47],{44:vt}),s(w1,[2,75]),s(w1,[2,74]),{62:[1,234],67:m,82:218,116:E,117:C,118:x},s(w1,[2,77]),s(I1,[2,80]),{77:[1,235],79:197,116:z1,119:K1},{30:236,67:m,80:V,81:W,82:171,116:E,117:C,118:x},s(X1,n,{5:237}),s(F,[2,102]),s(S,[2,35]),{43:238,44:f,45:39,47:40,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},{10:h1,18:239},{10:s1,60:i1,84:r1,92:240,105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{10:s1,60:i1,84:r1,92:251,104:[1,252],105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{10:s1,60:i1,84:r1,92:253,104:[1,254],105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{105:[1,255]},{10:s1,60:i1,84:r1,92:256,105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{44:f,47:257,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},s(_,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},s(_,[2,116]),s(_,[2,118],{10:[1,261]}),s(_,[2,119]),s(U,[2,56]),s(d1,[2,87]),s(U,[2,57]),{51:[1,262],67:m,82:218,116:E,117:C,118:x},s(U,[2,64]),s(U,[2,59]),s(U,[2,60]),s(U,[2,61]),{109:[1,263]},s(U,[2,63]),s(U,[2,65]),{66:[1,264],67:m,82:218,116:E,117:C,118:x},s(U,[2,67]),s(U,[2,68]),s(U,[2,70]),s(U,[2,69]),s(U,[2,71]),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),s(w1,[2,78]),{31:[1,265],67:m,82:218,116:E,117:C,118:x},{6:11,7:12,8:g,9:p,10:c,11:a,20:17,22:18,23:19,24:20,25:21,26:22,27:y,32:[1,266],33:24,34:T,36:A,38:z,42:28,43:38,44:f,45:39,47:40,60:d,84:K,85:g1,86:A1,87:b1,88:O1,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O,121:M1,122:U1,123:V1,124:W1},s(k1,[2,53]),{43:267,44:f,45:39,47:40,60:d,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O},s(_,[2,121],{106:N1}),s(wt,[2,130],{108:269,10:s1,60:i1,84:r1,105:u1,109:n1,110:o1,111:a1,112:l1}),s(Q,[2,132]),s(Q,[2,134]),s(Q,[2,135]),s(Q,[2,136]),s(Q,[2,137]),s(Q,[2,138]),s(Q,[2,139]),s(Q,[2,140]),s(Q,[2,141]),s(_,[2,122],{106:N1}),{10:[1,270]},s(_,[2,123],{106:N1}),{10:[1,271]},s(Lt,[2,129]),s(_,[2,105],{106:N1}),s(_,[2,106],{113:112,44:f,60:d,89:$,102:L,105:w,106:I,109:N,111:R,114:P,115:G,116:O}),s(_,[2,110]),s(_,[2,112],{10:[1,272]}),s(_,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:J,9:t1,11:e1,21:277},s(S,[2,34]),s(k1,[2,52]),{10:s1,60:i1,84:r1,105:u1,107:278,108:242,109:n1,110:o1,111:a1,112:l1},s(Q,[2,133]),{14:C1,44:x1,60:D1,89:T1,101:279,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1,120:87},{14:C1,44:x1,60:D1,89:T1,101:280,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1,120:87},{98:[1,281]},s(_,[2,120]),s(U,[2,58]),{30:282,67:m,80:V,81:W,82:171,116:E,117:C,118:x},s(U,[2,66]),s(X1,n,{5:283}),s(wt,[2,131],{108:269,10:s1,60:i1,84:r1,105:u1,109:n1,110:o1,111:a1,112:l1}),s(_,[2,126],{120:167,10:[1,284],14:C1,44:x1,60:D1,89:T1,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1}),s(_,[2,127],{120:167,10:[1,285],14:C1,44:x1,60:D1,89:T1,105:S1,106:F1,109:_1,111:B1,114:v1,115:$1,116:L1}),s(_,[2,114]),{31:[1,286],67:m,82:218,116:E,117:C,118:x},{6:11,7:12,8:g,9:p,10:c,11:a,20:17,22:18,23:19,24:20,25:21,26:22,27:y,32:[1,287],33:24,34:T,36:A,38:z,42:28,43:38,44:f,45:39,47:40,60:d,84:K,85:g1,86:A1,87:b1,88:O1,89:$,102:L,105:w,106:I,109:N,111:R,113:41,114:P,115:G,116:O,121:M1,122:U1,123:V1,124:W1},{10:s1,60:i1,84:r1,92:288,105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},{10:s1,60:i1,84:r1,92:289,105:u1,107:241,108:242,109:n1,110:o1,111:a1,112:l1},s(U,[2,62]),s(S,[2,33]),s(_,[2,124],{106:N1}),s(_,[2,125],{106:N1})],defaultActions:{},parseError:k(function(h,D){if(D.recoverable)this.trace(h);else{var b=Error(h);throw b.hash=D,b}},"parseError"),parse:k(function(h){var D=this,b=[0],l=[],B=[null],t=[],G1=this.table,e="",v=0,It=0,Nt=0,Wt=2,Rt=1,zt=t.slice.call(arguments,1),M=Object.create(this.lexer),f1={yy:{}};for(var Q1 in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q1)&&(f1.yy[Q1]=this.yy[Q1]);M.setInput(h,f1.yy),f1.yy.lexer=M,f1.yy.parser=this,M.yylloc===void 0&&(M.yylloc={});var Z1=M.yylloc;t.push(Z1);var Kt=M.options&&M.options.ranges;typeof f1.yy.parseError=="function"?this.parseError=f1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(q){b.length-=2*q,B.length-=q,t.length-=q}k(jt,"popStack");function Pt(){var q=l.pop()||M.lex()||Rt;return typeof q!="number"&&(q instanceof Array&&(l=q,q=l.pop()),q=D.symbols_[q]||q),q}k(Pt,"lex");for(var H,J1,y1,X,tt,R1={},Y1,c1,Gt,H1;;){if(y1=b[b.length-1],this.defaultActions[y1]?X=this.defaultActions[y1]:(H??(H=Pt()),X=G1[y1]&&G1[y1][H]),X===void 0||!X.length||!X[0]){var Ot="";for(Y1 in H1=[],G1[y1])this.terminals_[Y1]&&Y1>Wt&&H1.push("'"+this.terminals_[Y1]+"'");Ot=M.showPosition?"Parse error on line "+(v+1)+`:
`+M.showPosition()+`
Expecting `+H1.join(", ")+", got '"+(this.terminals_[H]||H)+"'":"Parse error on line "+(v+1)+": Unexpected "+(H==Rt?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(Ot,{text:M.match,token:this.terminals_[H]||H,line:M.yylineno,loc:Z1,expected:H1})}if(X[0]instanceof Array&&X.length>1)throw Error("Parse Error: multiple actions possible at state: "+y1+", token: "+H);switch(X[0]){case 1:b.push(H),B.push(M.yytext),t.push(M.yylloc),b.push(X[1]),H=null,J1?(H=J1,J1=null):(It=M.yyleng,e=M.yytext,v=M.yylineno,Z1=M.yylloc,Nt>0&&Nt--);break;case 2:if(c1=this.productions_[X[1]][1],R1.$=B[B.length-c1],R1._$={first_line:t[t.length-(c1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(c1||1)].first_column,last_column:t[t.length-1].last_column},Kt&&(R1._$.range=[t[t.length-(c1||1)].range[0],t[t.length-1].range[1]]),tt=this.performAction.apply(R1,[e,It,v,f1.yy,X[1],B,t].concat(zt)),tt!==void 0)return tt;c1&&(b=b.slice(0,-1*c1*2),B=B.slice(0,-1*c1),t=t.slice(0,-1*c1)),b.push(this.productions_[X[1]][0]),B.push(R1.$),t.push(R1._$),Gt=G1[b[b.length-2]][b[b.length-1]],b.push(Gt);break;case 3:return!0}}return!0},"parse")};q1.lexer=(function(){return{EOF:1,parseError:k(function(h,D){if(this.yy.parser)this.yy.parser.parseError(h,D);else throw Error(h)},"parseError"),setInput:k(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:k(function(){var h=this._input[0];return this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h,h.match(/(?:\r\n?|\n).*/g)?(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:k(function(h){var D=h.length,b=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 l=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),b.length-1&&(this.yylineno-=b.length-1);var B=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:b?(b.length===l.length?this.yylloc.first_column:0)+l[l.length-b.length].length-b[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},"unput"),more:k(function(){return this._more=!0,this},"more"),reject:k(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:k(function(h){this.unput(this.match.slice(h))},"less"),pastInput:k(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:k(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:k(function(){var h=this.pastInput(),D=Array(h.length+1).join("-");return h+this.upcomingInput()+`
`+D+"^"},"showPosition"),test_match:k(function(h,D){var b,l,B;if(this.options.backtrack_lexer&&(B={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&&(B.yylloc.range=this.yylloc.range.slice(0))),l=h[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.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],b=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var t in B)this[t]=B[t];return!1}return!1},"test_match"),next:k(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,D,b,l;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),t=0;t<B.length;t++)if(b=this._input.match(this.rules[B[t]]),b&&(!D||b[0].length>D[0].length)){if(D=b,l=t,this.options.backtrack_lexer){if(h=this.test_match(b,B[t]),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,B[l]),h===!1?!1:h):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:k(function(){return this.next()||this.lex()},"lex"),begin:k(function(h){this.conditionStack.push(h)},"begin"),popState:k(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:k(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:k(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:k(function(h){this.begin(h)},"pushState"),stateStackSize:k(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:k(function(h,D,b,l){switch(b){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"),D.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return D.yytext=D.yytext.replace(/\n\s*/g,"<br/>"),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 h.lex.firstGraph()&&this.begin("dir"),12;case 36:return h.lex.firstGraph()&&this.begin("dir"),12;case 37:return h.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}}}})();function j1(){this.yy={}}return k(j1,"Parser"),j1.prototype=q1,q1.Parser=j1,new j1})();it.parser=it;var Ut=it,Vt=Object.assign({},Ut);Vt.parse=s=>{let i=s.replace(/}\s*\n/g,`}
`);return Ut.parse(i)};var Ae=Vt,be=k((s,i)=>{let r=ie;return Yt(r(s,"r"),r(s,"g"),r(s,"b"),i)},"fade"),ke={parser:Ae,get db(){return new pe},renderer:ge,styles:k(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: ${be(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;
}
${le()}
`,"getStyles"),init:k(s=>{s.flowchart||(s.flowchart={}),s.layout&&Mt({layout:s.layout}),s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,Mt({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{ke as diagram};
import{p as s,u as C}from"./useEvent-DO6uJBas.js";import{y as d}from"./cells-BpZ7g6ok.js";import{t as m}from"./createReducer-Dnna-AUO.js";function p(){return{focusedCellId:null,lastFocusedCellId:null}}var{reducer:V,createActions:b,valueAtom:a,useActions:g}=m(p,{focusCell:(l,e)=>({...l,focusedCellId:e.cellId,lastFocusedCellId:e.cellId}),toggleCell:(l,e)=>l.focusedCellId===e.cellId?{...l,focusedCellId:null}:{...l,focusedCellId:e.cellId,lastFocusedCellId:e.cellId},blurCell:l=>({...l,focusedCellId:null})});const c=s(l=>l(a).lastFocusedCellId);function F(){return C(c)}const _=s(l=>{let e=l(c);return!e||e==="__scratch__"?null:r(e,l(d))});function h(l){return s(e=>r(l,e(d)))}function r(l,e){var o;let{cellData:i,cellHandles:f,cellRuntime:I}=e,u=i[l],t=I[l],n=(o=f[l])==null?void 0:o.current;return!u||!n?null:{cellId:l,name:u.name,config:u.config,status:t?t.status:"idle",getEditorView:()=>n.editorView,hasOutput:(t==null?void 0:t.output)!=null,hasConsoleOutput:(t==null?void 0:t.consoleOutputs)!=null}}export{g as a,c as i,h as n,F as o,_ as r,a as t};
import{s as Me}from"./chunk-LvLJmgfZ.js";import{t as yr}from"./react-BGmjiNul.js";import{G as ze,Jn as wr,St as Nr}from"./cells-BpZ7g6ok.js";import{_ as Te,c as Cr,d as ke,f as Se,g as kr,h as _e,l as Sr,m as _r,o as Rr,p as le,s as Or,t as Re,u as Je,y as Oe}from"./zod-Cg4WLWh2.js";import{t as fe}from"./compiler-runtime-DeeZ7FnK.js";import{a as Ar,d as Vr,f as Er}from"./hotkeys-BHHWjLlp.js";import{r as Ae}from"./useEventListener-DIUKKfEy.js";import{t as Pr}from"./jsx-runtime-ZmTK25f3.js";import{r as Lr,t as Be}from"./button-YC1gW_kJ.js";import{t as I}from"./cn-BKtXLv3a.js";import{t as $r}from"./check-DdfN0k2d.js";import{_ as Ir,c as qr,i as Ke,l as Fr,m as Dr,n as Gr,r as Mr,s as zr,t as Tr}from"./select-V5IdpNiR.js";import{M as Jr,N as Ue,P as Br,j as Kr}from"./dropdown-menu-B-6unW-7.js";import{t as Ur}from"./plus-BD5o34_i.js";import{t as Zr}from"./refresh-ccw-DLEiQDS3.js";import{n as Hr,t as Ve}from"./input-pAun1m1X.js";import{a as V,c as R,d as E,h as Wr,l as P,m as Xr,o as A,r as Ze,u as S,y as Qr}from"./textarea-DBO30D7K.js";import{t as Yr}from"./trash-2-CyqGun26.js";import{t as ea}from"./badge-Ce8wRjuQ.js";import{E as He,S as Ee,_ as xe,w as Pe,x as ra}from"./Combination-CMPwuAmi.js";import{l as aa}from"./dist-uzvC4uAK.js";import{t as ta}from"./tooltip-CEc2ajau.js";import{u as sa}from"./menu-items-CJhvWPOk.js";import{i as na,r as la,t as oa}from"./popover-Gz-GJzym.js";import{a as ia,o as ca,r as da,s as ua,t as ma}from"./command-DhzFN2CJ.js";import{t as pa}from"./label-Be1daUcS.js";import{t as ha}from"./toggle-jWKnIArU.js";var We=fe(),w=Me(yr(),1),a=Me(Pr(),1);const Xe=(0,w.createContext)({isSelected:()=>!1,onSelect:Er.NOOP}),Le=t=>{let e=(0,We.c)(94),r,n,l,o,i,d,p,s,c,u,h,f,m,j,x,g,v,y,N,C,O;e[0]===t?(r=e[1],n=e[2],l=e[3],o=e[4],i=e[5],d=e[6],p=e[7],s=e[8],c=e[9],u=e[10],h=e[11],f=e[12],m=e[13],j=e[14],x=e[15],g=e[16],v=e[17],y=e[18],N=e[19],C=e[20],O=e[21]):({children:r,displayValue:d,className:l,placeholder:m,value:O,defaultValue:i,onValueChange:h,multiple:g,shouldFilter:v,filterFn:p,open:f,defaultOpen:o,onOpenChange:c,inputPlaceholder:y,search:x,onSearchChange:u,emptyState:N,chips:C,chipsClassName:n,keepPopoverOpenOnSelect:s,...j}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=i,e[6]=d,e[7]=p,e[8]=s,e[9]=c,e[10]=u,e[11]=h,e[12]=f,e[13]=m,e[14]=j,e[15]=x,e[16]=g,e[17]=v,e[18]=y,e[19]=N,e[20]=C,e[21]=O);let k=g===void 0?!1:g,q=v===void 0?!0:v,F=y===void 0?"Search...":y,ne=N===void 0?"Nothing found.":N,$=C===void 0?!1:C,ye=o??!1,oe;e[22]!==c||e[23]!==f||e[24]!==ye?(oe={prop:f,defaultProp:ye,onChange:c},e[22]=c,e[23]=f,e[24]=ye,e[25]=oe):oe=e[25];let[De,M]=Ee(oe),z=De===void 0?!1:De,T;e[26]===h?T=e[27]:(T=_=>{h==null||h(_)},e[26]=h,e[27]=T);let ie;e[28]!==i||e[29]!==T||e[30]!==O?(ie={prop:O,defaultProp:i,onChange:T},e[28]=i,e[29]=T,e[30]=O,e[31]=ie):ie=e[31];let[b,we]=Ee(ie),ce;e[32]===b?ce=e[33]:(ce=_=>Array.isArray(b)?b.includes(_):b===_,e[32]=b,e[33]=ce);let Ne=ce,de;e[34]!==s||e[35]!==k||e[36]!==M||e[37]!==we||e[38]!==b?(de=_=>{let D=_;if(k)if(Array.isArray(b))if(b.includes(D)){let Ge=b.filter(br=>br!==_);D=Ge.length>0?Ge:[]}else D=[...b,D];else D=[D];else b===_&&(D=null);we(D),(s??k)||M(!1)},e[34]=s,e[35]=k,e[36]=M,e[37]=we,e[38]=b,e[39]=de):de=e[39];let J=de,ue;e[40]!==$||e[41]!==d||e[42]!==k||e[43]!==m||e[44]!==b?(ue=()=>k&&$&&m?m:b==null?m??"--":Array.isArray(b)?b.length===0?m??"--":b.length===1&&d!==void 0?d(b[0]):`${b.length} selected`:d===void 0?m??"--":d(b),e[40]=$,e[41]=d,e[42]=k,e[43]=m,e[44]=b,e[45]=ue):ue=e[45];let Ce=ue,me;e[46]===Symbol.for("react.memo_cache_sentinel")?(me=I("relative"),e[46]=me):me=e[46];let B;e[47]===l?B=e[48]:(B=I("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50",l),e[47]=l,e[48]=B);let K;e[49]===Ce?K=e[50]:(K=Ce(),e[49]=Ce,e[50]=K);let U;e[51]===K?U=e[52]:(U=(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:K}),e[51]=K,e[52]=U);let pe;e[53]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,a.jsx)(Ir,{className:"ml-3 w-4 h-4 opacity-50 shrink-0"}),e[53]=pe):pe=e[53];let Z;e[54]!==z||e[55]!==B||e[56]!==U?(Z=(0,a.jsx)(na,{asChild:!0,children:(0,a.jsxs)("div",{className:B,"aria-expanded":z,children:[U,pe]})}),e[54]=z,e[55]=B,e[56]=U,e[57]=Z):Z=e[57];let H;e[58]!==F||e[59]!==u||e[60]!==x?(H=(0,a.jsx)(ia,{placeholder:F,rootClassName:"px-1 h-8",autoFocus:!0,value:x,onValueChange:u}),e[58]=F,e[59]=u,e[60]=x,e[61]=H):H=e[61];let W;e[62]===ne?W=e[63]:(W=(0,a.jsx)(da,{children:ne}),e[62]=ne,e[63]=W);let X;e[64]!==J||e[65]!==Ne?(X={isSelected:Ne,onSelect:J},e[64]=J,e[65]=Ne,e[66]=X):X=e[66];let Q;e[67]!==r||e[68]!==X?(Q=(0,a.jsx)(Xe,{value:X,children:r}),e[67]=r,e[68]=X,e[69]=Q):Q=e[69];let Y;e[70]!==W||e[71]!==Q?(Y=(0,a.jsxs)(ua,{className:"max-h-60 py-.5",children:[W,Q]}),e[70]=W,e[71]=Q,e[72]=Y):Y=e[72];let ee;e[73]!==p||e[74]!==q||e[75]!==H||e[76]!==Y?(ee=(0,a.jsx)(la,{className:"w-full min-w-(--radix-popover-trigger-width) p-0",align:"start",children:(0,a.jsxs)(ma,{filter:p,shouldFilter:q,children:[H,Y]})}),e[73]=p,e[74]=q,e[75]=H,e[76]=Y,e[77]=ee):ee=e[77];let re;e[78]!==z||e[79]!==M||e[80]!==Z||e[81]!==ee?(re=(0,a.jsxs)(oa,{open:z,onOpenChange:M,children:[Z,ee]}),e[78]=z,e[79]=M,e[80]=Z,e[81]=ee,e[82]=re):re=e[82];let ae;e[83]!==$||e[84]!==n||e[85]!==d||e[86]!==J||e[87]!==k||e[88]!==b?(ae=k&&$&&(0,a.jsx)("div",{className:I("flex flex-col gap-1 items-start",n),children:Array.isArray(b)&&b.map(_=>_==null?null:(0,a.jsxs)(ea,{variant:"secondary",children:[(d==null?void 0:d(_))??String(_),(0,a.jsx)(wr,{onClick:()=>{J(_)},className:"w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"})]},String(_)))}),e[83]=$,e[84]=n,e[85]=d,e[86]=J,e[87]=k,e[88]=b,e[89]=ae):ae=e[89];let he;return e[90]!==j||e[91]!==re||e[92]!==ae?(he=(0,a.jsxs)("div",{className:me,...j,children:[re,ae]}),e[90]=j,e[91]=re,e[92]=ae,e[93]=he):he=e[93],he},je=w.forwardRef((t,e)=>{let r=(0,We.c)(17),{children:n,className:l,value:o,onSelect:i,disabled:d}=t,p=typeof o=="object"&&"value"in o?o.value:String(o),s=w.use(Xe),c;r[0]===l?c=r[1]:(c=I("pl-6 m-1 py-1",l),r[0]=l,r[1]=c);let u;r[2]!==s||r[3]!==i||r[4]!==o?(u=()=>{s.onSelect(o),i==null||i(o)},r[2]=s,r[3]=i,r[4]=o,r[5]=u):u=r[5];let h;r[6]!==s||r[7]!==o?(h=s.isSelected(o)&&(0,a.jsx)($r,{className:"absolute left-1 h-4 w-4"}),r[6]=s,r[7]=o,r[8]=h):h=r[8];let f;return r[9]!==n||r[10]!==d||r[11]!==e||r[12]!==c||r[13]!==u||r[14]!==h||r[15]!==p?(f=(0,a.jsxs)(ca,{ref:e,className:c,role:"option",value:p,disabled:d,onSelect:u,children:[h,n]}),r[9]=n,r[10]=d,r[11]=e,r[12]=c,r[13]=u,r[14]=h,r[15]=p,r[16]=f):f=r[16],f});je.displayName="ComboboxItem";const G={of(t){return JSON.stringify(t)},parse(t){if(!t)return{};try{return JSON.parse(t)}catch{return{label:t}}}};function Qe(){return Math.floor(Math.random()*1e5)}var $e="Radio",[fa,Ye]=He($e),[xa,ja]=fa($e),er=w.forwardRef((t,e)=>{let{__scopeRadio:r,name:n,checked:l=!1,required:o,disabled:i,value:d="on",onCheck:p,form:s,...c}=t,[u,h]=w.useState(null),f=Ae(e,x=>h(x)),m=w.useRef(!1),j=u?s||!!u.closest("form"):!0;return(0,a.jsxs)(xa,{scope:r,checked:l,disabled:i,children:[(0,a.jsx)(xe.button,{type:"button",role:"radio","aria-checked":l,"data-state":sr(l),"data-disabled":i?"":void 0,disabled:i,value:d,...c,ref:f,onClick:Pe(t.onClick,x=>{l||(p==null||p()),j&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),j&&(0,a.jsx)(tr,{control:u,bubbles:!m.current,name:n,value:d,checked:l,required:o,disabled:i,form:s,style:{transform:"translateX(-100%)"}})]})});er.displayName=$e;var rr="RadioIndicator",ar=w.forwardRef((t,e)=>{let{__scopeRadio:r,forceMount:n,...l}=t,o=ja(rr,r);return(0,a.jsx)(ra,{present:n||o.checked,children:(0,a.jsx)(xe.span,{"data-state":sr(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:e})})});ar.displayName=rr;var va="RadioBubbleInput",tr=w.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:n=!0,...l},o)=>{let i=w.useRef(null),d=Ae(i,o),p=Dr(r),s=aa(e);return w.useEffect(()=>{let c=i.current;if(!c)return;let u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(p!==r&&h){let f=new Event("click",{bubbles:n});h.call(c,r),c.dispatchEvent(f)}},[p,r,n]),(0,a.jsx)(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});tr.displayName=va;function sr(t){return t?"checked":"unchecked"}var ga=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ve="RadioGroup",[ba,mt]=He(ve,[Ue,Ye]),nr=Ue(),lr=Ye(),[ya,wa]=ba(ve),or=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,name:n,defaultValue:l,value:o,required:i=!1,disabled:d=!1,orientation:p,dir:s,loop:c=!0,onValueChange:u,...h}=t,f=nr(r),m=sa(s),[j,x]=Ee({prop:o,defaultProp:l??null,onChange:u,caller:ve});return(0,a.jsx)(ya,{scope:r,name:n,required:i,disabled:d,value:j,onValueChange:x,children:(0,a.jsx)(Jr,{asChild:!0,...f,orientation:p,dir:m,loop:c,children:(0,a.jsx)(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":d?"":void 0,dir:m,...h,ref:e})})})});or.displayName=ve;var ir="RadioGroupItem",cr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,disabled:n,...l}=t,o=wa(ir,r),i=o.disabled||n,d=nr(r),p=lr(r),s=w.useRef(null),c=Ae(e,s),u=o.value===l.value,h=w.useRef(!1);return w.useEffect(()=>{let f=j=>{ga.includes(j.key)&&(h.current=!0)},m=()=>h.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",m)}},[]),(0,a.jsx)(Kr,{asChild:!0,...d,focusable:!i,active:u,children:(0,a.jsx)(er,{disabled:i,required:o.required,checked:u,...p,...l,name:o.name,ref:c,onCheck:()=>o.onValueChange(l.value),onKeyDown:Pe(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:Pe(l.onFocus,()=>{var f;h.current&&((f=s.current)==null||f.click())})})})});cr.displayName=ir;var Na="RadioGroupIndicator",dr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,...n}=t;return(0,a.jsx)(ar,{...lr(r),...n,ref:e})});dr.displayName=Na;var ur=or,mr=cr,Ca=dr,pr=fe(),Ie=w.forwardRef((t,e)=>{let r=(0,pr.c)(9),n,l;r[0]===t?(n=r[1],l=r[2]):({className:n,...l}=t,r[0]=t,r[1]=n,r[2]=l);let o;r[3]===n?o=r[4]:(o=I("grid gap-2",n),r[3]=n,r[4]=o);let i;return r[5]!==l||r[6]!==e||r[7]!==o?(i=(0,a.jsx)(ur,{className:o,...l,ref:e}),r[5]=l,r[6]=e,r[7]=o,r[8]=i):i=r[8],i});Ie.displayName=ur.displayName;var qe=w.forwardRef((t,e)=>{let r=(0,pr.c)(10),n,l;if(r[0]!==t){let{className:p,children:s,...c}=t;n=p,l=c,r[0]=t,r[1]=n,r[2]=l}else n=r[1],l=r[2];let o;r[3]===n?o=r[4]:(o=I("h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xs-solid rounded-full border border-input text-primary ring-offset-background focus:outline-hidden focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",n),r[3]=n,r[4]=o);let i;r[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(Ca,{className:"flex items-center justify-center",children:(0,a.jsx)(Br,{className:"h-[10px] w-[10px] fill-primary text-current"})}),r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==e||r[8]!==o?(d=(0,a.jsx)(mr,{ref:e,className:o,...l,children:i}),r[6]=l,r[7]=e,r[8]=o,r[9]=d):d=r[9],d});qe.displayName=mr.displayName;function ka(t){return t instanceof Re.ZodArray}function hr(t){return t instanceof Re.ZodPipe}function Sa(t){return t instanceof Re.ZodTuple}function fr(t){return"unwrap"in t?t.unwrap():t}function ge(t){let e=r=>{if(r instanceof le){let n=[...r.values];return r.values.size===1?n[0]:n}if(r instanceof Je){let n=r.def.defaultValue;return typeof n=="function"?n():n}if(hr(r))return e(r.in);if(Sa(r))return r.def.items.map(n=>e(n));if("unwrap"in r)return e(fr(r))};return t instanceof Oe||t instanceof ke?e(t.options[0]):ka(t)?_a(t)?[ge(t.element)]:[]:t instanceof Te?"":t instanceof Se?t.options[0]:t instanceof _e?Object.fromEntries(Object.entries(t.shape).map(([r,n])=>[r,e(n)])):e(t)}function te(t){if(t instanceof le)return t;if(t instanceof _e){let e=t.shape.type;if(e instanceof le)return e;throw Error("Invalid schema")}if(t instanceof Oe||t instanceof ke)return te(t.options[0]);throw Vr.warn(t),Error("Invalid schema")}function _a(t){return!t.safeParse([]).success}var xr=fe(),jr=`
`;const vr=t=>{let e=(0,xr.c)(24),{value:r,options:n,onChange:l,className:o,placeholder:i,textAreaClassName:d,comboBoxClassName:p}=t,[s,c]=(0,w.useState)(!1),u;e[0]===r?u=e[1]:(u=be(r),e[0]=r,e[1]=u);let h=u,f;e[2]!==p||e[3]!==l||e[4]!==n||e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==h?(f=()=>s?(0,a.jsx)(Fe,{value:h,className:d,onChange:l,placeholder:i?`${i}: one per line`:"One value per line"}):(0,a.jsx)(Le,{placeholder:i,displayValue:Ra,className:I("w-full max-w-[400px]",p),multiple:!0,value:h,onValueChange:l,keepPopoverOpenOnSelect:!0,chips:!0,chipsClassName:"flex-row flex-wrap min-w-[210px]",children:n.map(Oa)}),e[2]=p,e[3]=l,e[4]=n,e[5]=i,e[6]=s,e[7]=d,e[8]=h,e[9]=f):f=e[9];let m=f,j;e[10]===o?j=e[11]:(j=I("flex gap-1",o),e[10]=o,e[11]=j);let x;e[12]===m?x=e[13]:(x=m(),e[12]=m,e[13]=x);let g=s?"Switch to multi-select":"Switch to textarea",v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(Qr,{className:"w-3 h-3"}),e[14]=v):v=e[14];let y;e[15]===s?y=e[16]:(y=(0,a.jsx)(ha,{size:"xs",onPressedChange:c,pressed:s,children:v}),e[15]=s,e[16]=y);let N;e[17]!==g||e[18]!==y?(N=(0,a.jsx)(ta,{content:g,children:y}),e[17]=g,e[18]=y,e[19]=N):N=e[19];let C;return e[20]!==j||e[21]!==x||e[22]!==N?(C=(0,a.jsxs)("div",{className:j,children:[x,N]}),e[20]=j,e[21]=x,e[22]=N,e[23]=C):C=e[23],C},Fe=t=>{let e=(0,xr.c)(11),{className:r,value:n,onChange:l,placeholder:o}=t,i,d;if(e[0]!==n){let u=be(n);i=Ze,d=u.join(jr),e[0]=n,e[1]=i,e[2]=d}else i=e[1],d=e[2];let p;e[3]===l?p=e[4]:(p=u=>{if(u.target.value===""){l([]);return}l(u.target.value.split(jr))},e[3]=l,e[4]=p);let s=o?`${o}: one per line`:"One value per line",c;return e[5]!==i||e[6]!==r||e[7]!==d||e[8]!==p||e[9]!==s?(c=(0,a.jsx)(i,{value:d,className:r,rows:4,onChange:p,placeholder:s}),e[5]=i,e[6]=r,e[7]=d,e[8]=p,e[9]=s,e[10]=c):c=e[10],c};function be(t){return t==null?[]:Array.isArray(t)?t:[t].filter(e=>e!=null||e!=="")}function Ra(t){return t}function Oa(t){return(0,a.jsx)(je,{value:t,children:t},t)}var se=fe();const Aa=t=>{let e=(0,se.c)(11),{schema:r,form:n,path:l,renderers:o,children:i}=t,d=l===void 0?"":l,p;e[0]===o?p=e[1]:(p=o===void 0?[]:o,e[0]=o,e[1]=p);let s=p,c;e[2]!==n||e[3]!==d||e[4]!==s||e[5]!==r?(c=L(r,n,d,s),e[2]=n,e[3]=d,e[4]=s,e[5]=r,e[6]=c):c=e[6];let u;return e[7]!==i||e[8]!==n||e[9]!==c?(u=(0,a.jsxs)(Xr,{...n,children:[i,c]}),e[7]=i,e[8]=n,e[9]=c,e[10]=u):u=e[10],u};function L(t,e,r,n){for(let s of n){let{isMatch:c,Component:u}=s;if(c(t))return(0,a.jsx)(u,{schema:t,form:e,path:r})}let{label:l,description:o,special:i,direction:d="column",minLength:p}=G.parse(t.description||"");if(t instanceof Je){let s=t.unwrap();return s=!s.description&&t.description?s.describe(t.description):s,L(s,e,r,n)}if(t instanceof kr){let s=t.unwrap();return s=!s.description&&t.description?s.describe(t.description):s,L(s,e,r,n)}if(t instanceof _e)return(0,a.jsxs)("div",{className:I("flex",d==="row"?"flex-row gap-6 items-start":d==="two-columns"?"grid grid-cols-2 gap-y-6":"flex-col gap-6"),children:[(0,a.jsx)(S,{children:l}),Ar.entries(t.shape).map(([s,c])=>{let u=c instanceof le,h=L(c,e,$a(r,s),n);return u?(0,a.jsx)(w.Fragment,{children:h},s):(0,a.jsx)("div",{className:"flex flex-row align-start",children:h},s)})]});if(t instanceof Te)return i==="time"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...s,onValueChange:s.onChange,type:"time",className:"my-0"})}),(0,a.jsx)(E,{})]})}):(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Cr)return(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsxs)("div",{className:"flex flex-row items-start space-x-2",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Nr,{"data-testid":"marimo-plugin-data-frames-boolean-checkbox",checked:s.value,onCheckedChange:s.onChange})})]}),(0,a.jsx)(E,{})]})});if(t instanceof _r)return i==="random_number_button"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-random-number-button",variant:"secondary",onClick:()=>{s.onChange(Qe())},children:[(0,a.jsx)(Zr,{className:"w-3.5 h-3.5 mr-1"}),l]})}):(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Hr,{...s,className:"my-0",onValueChange:s.onChange})}),(0,a.jsx)(E,{})]})});if(t instanceof Sr){let s=i==="datetime"?"datetime-local":i==="time"?"time":"date";return(0,a.jsx)(R,{control:e.control,name:r,render:({field:c})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...c,onValueChange:c.onChange,type:s,className:"my-0"})}),(0,a.jsx)(E,{})]})})}if(t instanceof Rr)return(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Se)return(0,a.jsx)(Pa,{schema:t,form:e,path:r,options:t.options.map(s=>s.toString())});if(t instanceof Or){if(i==="text_area_multiline")return(0,a.jsx)(Ea,{schema:t,form:e,path:r});let s=t.element;return s instanceof Se?(0,a.jsx)(La,{schema:t,form:e,path:r,itemLabel:l,options:s.options.map(c=>c.toString())}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(pa,{children:l}),(0,a.jsx)(Va,{schema:t.element,form:e,path:r,minLength:p,renderers:n},r)]})}if(t instanceof ke){let s=t.def,c=s.options,u=s.discriminator,h=f=>c.find(m=>te(m).value===f);return(0,a.jsx)(R,{control:e.control,name:r,render:({field:f})=>{let m=f.value,j=c.map(v=>te(v).value),x=m&&typeof m=="object"&&u in m?m[u]:j[0],g=h(x);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)("div",{className:"flex border-b mb-4 -mt-2",children:j.map(v=>(0,a.jsx)("button",{type:"button",className:`px-4 py-2 ${x===v?"border-b-2 border-primary font-medium":"text-muted-foreground"}`,onClick:()=>{let y=h(v);y?f.onChange(ge(y)):f.onChange({[u]:v})},children:v},v))}),(0,a.jsx)("div",{className:"flex flex-col",children:g&&L(g,e,r,n)},x)]})}})}return t instanceof Oe?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>{let c=t.options,u=s.value,h=c.map(m=>te(m).value);u||(u=h[0]);let f=c.find(m=>te(m).value===u);return(0,a.jsxs)("div",{className:"flex flex-col mb-4 gap-1",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(Fr,{"data-testid":"marimo-plugin-data-frames-union-select",...s,children:h.map(m=>(0,a.jsx)("option",{value:m,children:m},m))}),f&&L(f,e,r,n)]})}}):t instanceof le?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsx)("input",{...s,type:"hidden",value:String([...t.values][0]??"")})}):"unwrap"in t?L(fr(t),e,r,n):hr(t)?L(t.in,e,r,n):(0,a.jsxs)("div",{children:["Unknown schema type"," ",t==null?r:JSON.stringify(t.type??t)]})}var Va=t=>{let e=(0,se.c)(39),{schema:r,form:n,path:l,minLength:o,renderers:i}=t,d;e[0]===r.description?d=e[1]:(d=G.parse(r.description||""),e[0]=r.description,e[1]=d);let{label:p,description:s}=d,c=n.control,u;e[2]!==c||e[3]!==l?(u={control:c,name:l},e[2]=c,e[3]=l,e[4]=u):u=e[4];let{fields:h,append:f,remove:m}=Wr(u),j=o!=null&&h.length<o,x=o==null||h.length>o,g;e[5]===p?g=e[6]:(g=(0,a.jsx)(S,{children:p}),e[5]=p,e[6]=g);let v;e[7]===s?v=e[8]:(v=(0,a.jsx)(A,{children:s}),e[7]=s,e[8]=v);let y;if(e[9]!==x||e[10]!==h||e[11]!==n||e[12]!==l||e[13]!==m||e[14]!==i||e[15]!==r){let F;e[17]!==x||e[18]!==n||e[19]!==l||e[20]!==m||e[21]!==i||e[22]!==r?(F=(ne,$)=>(0,a.jsxs)("div",{className:"flex flex-row pl-2 ml-2 border-l-2 border-disabled hover-actions-parent relative pr-5 pt-1 items-center w-fit",onKeyDown:Lr.onEnter(Ia),children:[L(r,n,`${l}[${$}]`,i),x&&(0,a.jsx)(Yr,{className:"w-4 h-4 ml-2 my-1 text-muted-foreground hover:text-destructive cursor-pointer absolute right-0 top-5",onClick:()=>{m($)}})]},ne.id),e[17]=x,e[18]=n,e[19]=l,e[20]=m,e[21]=i,e[22]=r,e[23]=F):F=e[23],y=h.map(F),e[9]=x,e[10]=h,e[11]=n,e[12]=l,e[13]=m,e[14]=i,e[15]=r,e[16]=y}else y=e[16];let N;e[24]!==j||e[25]!==o?(N=j&&(0,a.jsx)("div",{className:"text-destructive text-xs font-semibold",children:(0,a.jsxs)("div",{children:["At least ",o," required."]})}),e[24]=j,e[25]=o,e[26]=N):N=e[26];let C;e[27]!==f||e[28]!==r?(C=()=>{f(ge(r))},e[27]=f,e[28]=r,e[29]=C):C=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(Ur,{className:"w-3.5 h-3.5 mr-1"}),e[30]=O):O=e[30];let k;e[31]===C?k=e[32]:(k=(0,a.jsx)("div",{children:(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-add-array-item",variant:"text",className:"hover:text-accent-foreground",onClick:C,children:[O,"Add"]})}),e[31]=C,e[32]=k);let q;return e[33]!==g||e[34]!==v||e[35]!==y||e[36]!==N||e[37]!==k?(q=(0,a.jsxs)("div",{className:"flex flex-col gap-2 min-w-[220px]",children:[g,v,y,N,k]}),e[33]=g,e[34]=v,e[35]=y,e[36]=N,e[37]=k,e[38]=q):q=e[38],q},gr=t=>{let e=(0,se.c)(21),{schema:r,form:n,path:l}=t,o;e[0]===r.description?o=e[1]:(o=G.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p,disabled:s,inputType:c}=o;if(c==="textarea"){let f;e[2]!==d||e[3]!==s||e[4]!==i||e[5]!==p?(f=j=>{let{field:x}=j;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Ze,{...x,value:x.value,onChange:x.onChange,className:"my-0",placeholder:p,disabled:s})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=s,e[4]=i,e[5]=p,e[6]=f):f=e[6];let m;return e[7]!==n.control||e[8]!==l||e[9]!==f?(m=(0,a.jsx)(R,{control:n.control,name:l,render:f}),e[7]=n.control,e[8]=l,e[9]=f,e[10]=m):m=e[10],m}let u;e[11]!==d||e[12]!==s||e[13]!==c||e[14]!==i||e[15]!==p?(u=f=>{let{field:m}=f;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...m,type:c,value:m.value,onValueChange:m.onChange,className:"my-0",placeholder:p,disabled:s})}),(0,a.jsx)(E,{})]})},e[11]=d,e[12]=s,e[13]=c,e[14]=i,e[15]=p,e[16]=u):u=e[16];let h;return e[17]!==n.control||e[18]!==l||e[19]!==u?(h=(0,a.jsx)(R,{control:n.control,name:l,render:u}),e[17]=n.control,e[18]=l,e[19]=u,e[20]=h):h=e[20],h},Ea=t=>{let e=(0,se.c)(10),{schema:r,form:n,path:l}=t,o;e[0]===r.description?o=e[1]:(o=G.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p}=o,s;e[2]!==d||e[3]!==i||e[4]!==p?(s=u=>{let{field:h}=u;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Fe,{...h,placeholder:p})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=i,e[4]=p,e[5]=s):s=e[5];let c;return e[6]!==n.control||e[7]!==l||e[8]!==s?(c=(0,a.jsx)(R,{control:n.control,name:l,render:s}),e[6]=n.control,e[7]=l,e[8]=s,e[9]=c):c=e[9],c},Pa=t=>{let e=(0,se.c)(22),{schema:r,form:n,path:l,options:o,textTransform:i}=t,d;e[0]===r.description?d=e[1]:(d=G.parse(r.description),e[0]=r.description,e[1]=d);let{label:p,description:s,disabled:c,special:u}=d;if(u==="radio_group"){let m;e[2]!==s||e[3]!==p||e[4]!==o||e[5]!==l?(m=x=>{let{field:g}=x;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:p}),(0,a.jsx)(A,{children:s}),(0,a.jsx)(V,{children:(0,a.jsx)(Ie,{className:"flex flex-row gap-2 pt-1 items-center",value:g.value,onValueChange:g.onChange,children:o.map(v=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(qe,{value:v,id:`${l}-${v}`},v),(0,a.jsx)(S,{className:"whitespace-pre",htmlFor:`${l}-${v}`,children:ze.startCase(v)})]},v))})}),(0,a.jsx)(E,{})]})},e[2]=s,e[3]=p,e[4]=o,e[5]=l,e[6]=m):m=e[6];let j;return e[7]!==c||e[8]!==n.control||e[9]!==l||e[10]!==m?(j=(0,a.jsx)(R,{control:n.control,name:l,disabled:c,render:m}),e[7]=c,e[8]=n.control,e[9]=l,e[10]=m,e[11]=j):j=e[11],j}let h;e[12]!==s||e[13]!==p||e[14]!==o||e[15]!==i?(h=m=>{let{field:j}=m;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:p}),(0,a.jsx)(A,{children:s}),(0,a.jsx)(V,{children:(0,a.jsxs)(Tr,{"data-testid":"marimo-plugin-data-frames-select",value:j.value,onValueChange:j.onChange,children:[(0,a.jsx)(zr,{className:"min-w-[180px]",children:(0,a.jsx)(qr,{placeholder:"--"})}),(0,a.jsx)(Gr,{children:(0,a.jsxs)(Mr,{children:[o.map(x=>(0,a.jsx)(Ke,{value:x,children:(i==null?void 0:i(x))??x},x)),o.length===0&&(0,a.jsx)(Ke,{disabled:!0,value:"--",children:"No options"})]})})]})}),(0,a.jsx)(E,{})]})},e[12]=s,e[13]=p,e[14]=o,e[15]=i,e[16]=h):h=e[16];let f;return e[17]!==c||e[18]!==n.control||e[19]!==l||e[20]!==h?(f=(0,a.jsx)(R,{control:n.control,name:l,disabled:c,render:h}),e[17]=c,e[18]=n.control,e[19]=l,e[20]=h,e[21]=f):f=e[21],f},La=t=>{let e=(0,se.c)(15),{schema:r,form:n,path:l,options:o,itemLabel:i,showSwitchable:d}=t,p;e[0]===r.description?p=e[1]:(p=G.parse(r.description),e[0]=r.description,e[1]=p);let{label:s,description:c,placeholder:u}=p,h;e[2]!==i||e[3]!==u?(h=u??(i?`Select ${i==null?void 0:i.toLowerCase()}`:void 0),e[2]=i,e[3]=u,e[4]=h):h=e[4];let f=h,m;e[5]!==c||e[6]!==s||e[7]!==o||e[8]!==f||e[9]!==d?(m=x=>{let{field:g}=x,v=be(g.value);return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:s}),(0,a.jsx)(A,{children:c}),(0,a.jsx)(V,{children:d?(0,a.jsx)(vr,{...g,value:v,options:o,placeholder:f}):(0,a.jsx)(Le,{className:"min-w-[180px]",placeholder:f,displayValue:qa,multiple:!0,chips:!0,keepPopoverOpenOnSelect:!0,value:v,onValueChange:g.onChange,children:o.map(Fa)})}),(0,a.jsx)(E,{})]})},e[5]=c,e[6]=s,e[7]=o,e[8]=f,e[9]=d,e[10]=m):m=e[10];let j;return e[11]!==n.control||e[12]!==l||e[13]!==m?(j=(0,a.jsx)(R,{control:n.control,name:l,render:m}),e[11]=n.control,e[12]=l,e[13]=m,e[14]=j):j=e[14],j};function $a(...t){return t.filter(e=>e!=="").join(".")}function Ia(t){return t.preventDefault()}function qa(t){return ze.startCase(t)}function Fa(t){return(0,a.jsx)(je,{value:t,children:t},t)}export{be as a,Ie as c,Qe as d,Le as f,Fe as i,qe as l,L as n,ge as o,je as p,vr as r,te as s,Aa as t,G as u};
import{o as a}from"./tooltip-BGrCWNss.js";function o(r){function n(t){return!!(t!=null&&t.schema)&&Array.isArray(t.schema.fields)&&typeof t.toArray=="function"}return(n(r)?r:f(r)).toArray()}o.responseType="arrayBuffer";function f(r,n){return a(r,n??{useProxy:!0})}export{o as t};
import{t as o}from"./forth-CsaVBHm8.js";export{o as forth};
function r(t){var R=[];return t.split(" ").forEach(function(E){R.push({name:E})}),R}var T=r("INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL"),n=r("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");function O(t,R){var E;for(E=t.length-1;E>=0;E--)if(t[E].name===R.toUpperCase())return t[E]}const S={name:"forth",startState:function(){return{state:"",base:10,coreWordList:T,immediateWordList:n,wordList:[]}},token:function(t,R){var E;if(t.eatSpace())return null;if(R.state===""){if(t.match(/^(\]|:NONAME)(\s|$)/i))return R.state=" compilation","builtin";if(E=t.match(/^(\:)\s+(\S+)(\s|$)+/),E)return R.wordList.push({name:E[2].toUpperCase()}),R.state=" compilation","def";if(E=t.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i),E)return R.wordList.push({name:E[2].toUpperCase()}),"def";if(E=t.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/),E)return"builtin"}else{if(t.match(/^(\;|\[)(\s)/))return R.state="",t.backUp(1),"builtin";if(t.match(/^(\;|\[)($)/))return R.state="","builtin";if(t.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}if(E=t.match(/^(\S+)(\s+|$)/),E)return O(R.wordList,E[1])===void 0?E[1]==="\\"?(t.skipToEnd(),"comment"):O(R.coreWordList,E[1])===void 0?O(R.immediateWordList,E[1])===void 0?E[1]==="("?(t.eatWhile(function(i){return i!==")"}),t.eat(")"),"comment"):E[1]===".("?(t.eatWhile(function(i){return i!==")"}),t.eat(")"),"string"):E[1]==='S"'||E[1]==='."'||E[1]==='C"'?(t.eatWhile(function(i){return i!=='"'}),t.eat('"'),"string"):E[1]-68719476735?"number":"atom":"keyword":"builtin":"variable"}};export{S as t};
import{t as r}from"./fortran-DGNsp41i.js";export{r as fortran};
function r(e){for(var n={},t=0;t<e.length;++t)n[e[t]]=!0;return n}var s=r("abstract.accept.allocatable.allocate.array.assign.asynchronous.backspace.bind.block.byte.call.case.class.close.common.contains.continue.cycle.data.deallocate.decode.deferred.dimension.do.elemental.else.encode.end.endif.entry.enumerator.equivalence.exit.external.extrinsic.final.forall.format.function.generic.go.goto.if.implicit.import.include.inquire.intent.interface.intrinsic.module.namelist.non_intrinsic.non_overridable.none.nopass.nullify.open.optional.options.parameter.pass.pause.pointer.print.private.program.protected.public.pure.read.recursive.result.return.rewind.save.select.sequence.stop.subroutine.target.then.to.type.use.value.volatile.where.while.write".split(".")),l=r("abort.abs.access.achar.acos.adjustl.adjustr.aimag.aint.alarm.all.allocated.alog.amax.amin.amod.and.anint.any.asin.associated.atan.besj.besjn.besy.besyn.bit_size.btest.cabs.ccos.ceiling.cexp.char.chdir.chmod.clog.cmplx.command_argument_count.complex.conjg.cos.cosh.count.cpu_time.cshift.csin.csqrt.ctime.c_funloc.c_loc.c_associated.c_null_ptr.c_null_funptr.c_f_pointer.c_null_char.c_alert.c_backspace.c_form_feed.c_new_line.c_carriage_return.c_horizontal_tab.c_vertical_tab.dabs.dacos.dasin.datan.date_and_time.dbesj.dbesj.dbesjn.dbesy.dbesy.dbesyn.dble.dcos.dcosh.ddim.derf.derfc.dexp.digits.dim.dint.dlog.dlog.dmax.dmin.dmod.dnint.dot_product.dprod.dsign.dsinh.dsin.dsqrt.dtanh.dtan.dtime.eoshift.epsilon.erf.erfc.etime.exit.exp.exponent.extends_type_of.fdate.fget.fgetc.float.floor.flush.fnum.fputc.fput.fraction.fseek.fstat.ftell.gerror.getarg.get_command.get_command_argument.get_environment_variable.getcwd.getenv.getgid.getlog.getpid.getuid.gmtime.hostnm.huge.iabs.iachar.iand.iargc.ibclr.ibits.ibset.ichar.idate.idim.idint.idnint.ieor.ierrno.ifix.imag.imagpart.index.int.ior.irand.isatty.ishft.ishftc.isign.iso_c_binding.is_iostat_end.is_iostat_eor.itime.kill.kind.lbound.len.len_trim.lge.lgt.link.lle.llt.lnblnk.loc.log.logical.long.lshift.lstat.ltime.matmul.max.maxexponent.maxloc.maxval.mclock.merge.move_alloc.min.minexponent.minloc.minval.mod.modulo.mvbits.nearest.new_line.nint.not.or.pack.perror.precision.present.product.radix.rand.random_number.random_seed.range.real.realpart.rename.repeat.reshape.rrspacing.rshift.same_type_as.scale.scan.second.selected_int_kind.selected_real_kind.set_exponent.shape.short.sign.signal.sinh.sin.sleep.sngl.spacing.spread.sqrt.srand.stat.sum.symlnk.system.system_clock.tan.tanh.time.tiny.transfer.transpose.trim.ttynam.ubound.umask.unlink.unpack.verify.xor.zabs.zcos.zexp.zlog.zsin.zsqrt".split(".")),_=r("c_bool.c_char.c_double.c_double_complex.c_float.c_float_complex.c_funptr.c_int.c_int16_t.c_int32_t.c_int64_t.c_int8_t.c_int_fast16_t.c_int_fast32_t.c_int_fast64_t.c_int_fast8_t.c_int_least16_t.c_int_least32_t.c_int_least64_t.c_int_least8_t.c_intmax_t.c_intptr_t.c_long.c_long_double.c_long_double_complex.c_long_long.c_ptr.c_short.c_signed_char.c_size_t.character.complex.double.integer.logical.real".split(".")),o=/[+\-*&=<>\/\:]/,d=/^\.(and|or|eq|lt|le|gt|ge|ne|not|eqv|neqv)\./i;function m(e,n){if(e.match(d))return"operator";var t=e.next();if(t=="!")return e.skipToEnd(),"comment";if(t=='"'||t=="'")return n.tokenize=u(t),n.tokenize(e,n);if(/[\[\]\(\),]/.test(t))return null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(o.test(t))return e.eatWhile(o),"operator";e.eatWhile(/[\w\$_]/);var i=e.current().toLowerCase();return s.hasOwnProperty(i)?"keyword":l.hasOwnProperty(i)||_.hasOwnProperty(i)?"builtin":"variable"}function u(e){return function(n,t){for(var i=!1,a,c=!1;(a=n.next())!=null;){if(a==e&&!i){c=!0;break}i=!i&&a=="\\"}return(c||!i)&&(t.tokenize=null),"string"}}const p={name:"fortran",startState:function(){return{tokenize:null}},token:function(e,n){return e.eatSpace()?null:(n.tokenize||m)(e,n)}};export{p as t};
import{s as ct,t as vt}from"./chunk-LvLJmgfZ.js";import{t as me}from"./linear-DjglEiG4.js";import{n as ye,o as ke,s as pe}from"./time-lLuPpFd-.js";import"./defaultLocale-D_rSvXvJ.js";import{C as Zt,N as Ut,T as qt,c as Xt,d as ge,f as be,g as ve,h as Te,m as xe,p as we,t as Qt,u as $e,v as Jt,x as Kt}from"./defaultLocale-C92Rrpmf.js";import"./purify.es-DNVQZNFu.js";import{o as _e}from"./timer-ffBO1paY.js";import{u as Dt}from"./src-Cf4NnJCp.js";import{g as De}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{a as te,n as u,r as st}from"./src-BKLwm2RN.js";import{B as Se,C as Me,U as Ce,_ as Ee,a as Ye,b as lt,c as Ae,s as Ie,v as Le,z as Fe}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as Oe}from"./dist-C04_12Dz.js";function We(t){return t}var Tt=1,St=2,Mt=3,xt=4,ee=1e-6;function Pe(t){return"translate("+t+",0)"}function ze(t){return"translate(0,"+t+")"}function He(t){return i=>+t(i)}function Ne(t,i){return i=Math.max(0,t.bandwidth()-i*2)/2,t.round()&&(i=Math.round(i)),r=>+t(r)+i}function Be(){return!this.__axis}function ie(t,i){var r=[],n=null,o=null,d=6,k=6,M=3,I=typeof window<"u"&&window.devicePixelRatio>1?0:.5,D=t===Tt||t===xt?-1:1,x=t===xt||t===St?"x":"y",F=t===Tt||t===Mt?Pe:ze;function w($){var z=n??(i.ticks?i.ticks.apply(i,r):i.domain()),Y=o??(i.tickFormat?i.tickFormat.apply(i,r):We),v=Math.max(d,0)+M,C=i.range(),L=+C[0]+I,O=+C[C.length-1]+I,H=(i.bandwidth?Ne:He)(i.copy(),I),N=$.selection?$.selection():$,A=N.selectAll(".domain").data([null]),p=N.selectAll(".tick").data(z,i).order(),m=p.exit(),h=p.enter().append("g").attr("class","tick"),g=p.select("line"),y=p.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(h),g=g.merge(h.append("line").attr("stroke","currentColor").attr(x+"2",D*d)),y=y.merge(h.append("text").attr("fill","currentColor").attr(x,D*v).attr("dy",t===Tt?"0em":t===Mt?"0.71em":"0.32em")),$!==N&&(A=A.transition($),p=p.transition($),g=g.transition($),y=y.transition($),m=m.transition($).attr("opacity",ee).attr("transform",function(s){return isFinite(s=H(s))?F(s+I):this.getAttribute("transform")}),h.attr("opacity",ee).attr("transform",function(s){var c=this.parentNode.__axis;return F((c&&isFinite(c=c(s))?c:H(s))+I)})),m.remove(),A.attr("d",t===xt||t===St?k?"M"+D*k+","+L+"H"+I+"V"+O+"H"+D*k:"M"+I+","+L+"V"+O:k?"M"+L+","+D*k+"V"+I+"H"+O+"V"+D*k:"M"+L+","+I+"H"+O),p.attr("opacity",1).attr("transform",function(s){return F(H(s)+I)}),g.attr(x+"2",D*d),y.attr(x,D*v).text(Y),N.filter(Be).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===St?"start":t===xt?"end":"middle"),N.each(function(){this.__axis=H})}return w.scale=function($){return arguments.length?(i=$,w):i},w.ticks=function(){return r=Array.from(arguments),w},w.tickArguments=function($){return arguments.length?(r=$==null?[]:Array.from($),w):r.slice()},w.tickValues=function($){return arguments.length?(n=$==null?null:Array.from($),w):n&&n.slice()},w.tickFormat=function($){return arguments.length?(o=$,w):o},w.tickSize=function($){return arguments.length?(d=k=+$,w):d},w.tickSizeInner=function($){return arguments.length?(d=+$,w):d},w.tickSizeOuter=function($){return arguments.length?(k=+$,w):k},w.tickPadding=function($){return arguments.length?(M=+$,w):M},w.offset=function($){return arguments.length?(I=+$,w):I},w}function je(t){return ie(Tt,t)}function Ge(t){return ie(Mt,t)}var Ve=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_isoWeek=n()})(t,(function(){var r="day";return function(n,o,d){var k=function(D){return D.add(4-D.isoWeekday(),r)},M=o.prototype;M.isoWeekYear=function(){return k(this).year()},M.isoWeek=function(D){if(!this.$utils().u(D))return this.add(7*(D-this.isoWeek()),r);var x,F,w,$,z=k(this),Y=(x=this.isoWeekYear(),F=this.$u,w=(F?d.utc:d)().year(x).startOf("year"),$=4-w.isoWeekday(),w.isoWeekday()>4&&($+=7),w.add($,r));return z.diff(Y,"week")+1},M.isoWeekday=function(D){return this.$utils().u(D)?this.day()||7:this.day(this.day()%7?D:D-7)};var I=M.startOf;M.startOf=function(D,x){var F=this.$utils(),w=!!F.u(x)||x;return F.p(D)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):I.bind(this)(D,x)}}}))})),Re=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_customParseFormat=n()})(t,(function(){var r={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"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,d=/\d\d/,k=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,I={},D=function(v){return(v=+v)+(v>68?1900:2e3)},x=function(v){return function(C){this[v]=+C}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var L=C.match(/([+-]|\d\d)/g),O=60*L[1]+(+L[2]||0);return O===0?0:L[0]==="+"?-O:O})(v)}],w=function(v){var C=I[v];return C&&(C.indexOf?C:C.s.concat(C.f))},$=function(v,C){var L,O=I.meridiem;if(O){for(var H=1;H<=24;H+=1)if(v.indexOf(O(H,0,C))>-1){L=H>12;break}}else L=v===(C?"pm":"PM");return L},z={A:[M,function(v){this.afternoon=$(v,!1)}],a:[M,function(v){this.afternoon=$(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*v}],SS:[d,function(v){this.milliseconds=10*v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[k,x("seconds")],ss:[k,x("seconds")],m:[k,x("minutes")],mm:[k,x("minutes")],H:[k,x("hours")],h:[k,x("hours")],HH:[k,x("hours")],hh:[k,x("hours")],D:[k,x("day")],DD:[d,x("day")],Do:[M,function(v){var C=I.ordinal;if(this.day=v.match(/\d+/)[0],C)for(var L=1;L<=31;L+=1)C(L).replace(/\[|\]/g,"")===v&&(this.day=L)}],w:[k,x("week")],ww:[d,x("week")],M:[k,x("month")],MM:[d,x("month")],MMM:[M,function(v){var C=w("months"),L=(w("monthsShort")||C.map((function(O){return O.slice(0,3)}))).indexOf(v)+1;if(L<1)throw Error();this.month=L%12||L}],MMMM:[M,function(v){var C=w("months").indexOf(v)+1;if(C<1)throw Error();this.month=C%12||C}],Y:[/[+-]?\d+/,x("year")],YY:[d,function(v){this.year=D(v)}],YYYY:[/\d{4}/,x("year")],Z:F,ZZ:F};function Y(v){for(var C=v,L=I&&I.formats,O=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(g,y,s){var c=s&&s.toUpperCase();return y||L[s]||r[s]||L[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(f,l,b){return l||b.slice(1)}))}))).match(n),H=O.length,N=0;N<H;N+=1){var A=O[N],p=z[A],m=p&&p[0],h=p&&p[1];O[N]=h?{regex:m,parser:h}:A.replace(/^\[|\]$/g,"")}return function(g){for(var y={},s=0,c=0;s<H;s+=1){var f=O[s];if(typeof f=="string")c+=f.length;else{var l=f.regex,b=f.parser,a=g.slice(c),_=l.exec(a)[0];b.call(y,_),g=g.replace(_,"")}}return(function(e){var T=e.afternoon;if(T!==void 0){var S=e.hours;T?S<12&&(e.hours+=12):S===12&&(e.hours=0),delete e.afternoon}})(y),y}}return function(v,C,L){L.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(D=v.parseTwoDigitYear);var O=C.prototype,H=O.parse;O.parse=function(N){var A=N.date,p=N.utc,m=N.args;this.$u=p;var h=m[1];if(typeof h=="string"){var g=m[2]===!0,y=m[3]===!0,s=g||y,c=m[2];y&&(c=m[2]),I=this.$locale(),!g&&c&&(I=L.Ls[c]),this.$d=(function(a,_,e,T){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*a);var S=Y(_)(a),E=S.year,W=S.month,P=S.day,j=S.hours,B=S.minutes,X=S.seconds,ht=S.milliseconds,at=S.zone,gt=S.week,ft=new Date,ot=P||(E||W?1:ft.getDate()),V=E||ft.getFullYear(),et=0;E&&!W||(et=W>0?W-1:ft.getMonth());var Z,R=j||0,nt=B||0,Q=X||0,it=ht||0;return at?new Date(Date.UTC(V,et,ot,R,nt,Q,it+60*at.offset*1e3)):e?new Date(Date.UTC(V,et,ot,R,nt,Q,it)):(Z=new Date(V,et,ot,R,nt,Q,it),gt&&(Z=T(Z).week(gt).toDate()),Z)}catch{return new Date("")}})(A,h,p,L),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),s&&A!=this.format(h)&&(this.$d=new Date("")),I={}}else if(h instanceof Array)for(var f=h.length,l=1;l<=f;l+=1){m[1]=h[l-1];var b=L.apply(this,m);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}l===f&&(this.$d=new Date(""))}else H.call(this,N)}}}))})),Ze=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_advancedFormat=n()})(t,(function(){return function(r,n){var o=n.prototype,d=o.format;o.format=function(k){var M=this,I=this.$locale();if(!this.isValid())return d.bind(this)(k);var D=this.$utils(),x=(k||"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(F){switch(F){case"Q":return Math.ceil((M.$M+1)/3);case"Do":return I.ordinal(M.$D);case"gggg":return M.weekYear();case"GGGG":return M.isoWeekYear();case"wo":return I.ordinal(M.week(),"W");case"w":case"ww":return D.s(M.week(),F==="w"?1:2,"0");case"W":case"WW":return D.s(M.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return D.s(String(M.$H===0?24:M.$H),F==="k"?1:2,"0");case"X":return Math.floor(M.$d.getTime()/1e3);case"x":return M.$d.getTime();case"z":return"["+M.offsetName()+"]";case"zzz":return"["+M.offsetName("long")+"]";default:return F}}));return d.bind(this)(x)}}}))})),Ue=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_duration=n()})(t,(function(){var r,n,o=1e3,d=6e4,k=36e5,M=864e5,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D=31536e6,x=2628e6,F=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,w={years:D,months:x,days:M,hours:k,minutes:d,seconds:o,milliseconds:1,weeks:6048e5},$=function(A){return A instanceof H},z=function(A,p,m){return new H(A,m,p.$l)},Y=function(A){return n.p(A)+"s"},v=function(A){return A<0},C=function(A){return v(A)?Math.ceil(A):Math.floor(A)},L=function(A){return Math.abs(A)},O=function(A,p){return A?v(A)?{negative:!0,format:""+L(A)+p}:{negative:!1,format:""+A+p}:{negative:!1,format:""}},H=(function(){function A(m,h,g){var y=this;if(this.$d={},this.$l=g,m===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return z(m*w[Y(h)],this);if(typeof m=="number")return this.$ms=m,this.parseFromMilliseconds(),this;if(typeof m=="object")return Object.keys(m).forEach((function(f){y.$d[Y(f)]=m[f]})),this.calMilliseconds(),this;if(typeof m=="string"){var s=m.match(F);if(s){var c=s.slice(2).map((function(f){return f==null?0:Number(f)}));return this.$d.years=c[0],this.$d.months=c[1],this.$d.weeks=c[2],this.$d.days=c[3],this.$d.hours=c[4],this.$d.minutes=c[5],this.$d.seconds=c[6],this.calMilliseconds(),this}}return this}var p=A.prototype;return p.calMilliseconds=function(){var m=this;this.$ms=Object.keys(this.$d).reduce((function(h,g){return h+(m.$d[g]||0)*w[g]}),0)},p.parseFromMilliseconds=function(){var m=this.$ms;this.$d.years=C(m/D),m%=D,this.$d.months=C(m/x),m%=x,this.$d.days=C(m/M),m%=M,this.$d.hours=C(m/k),m%=k,this.$d.minutes=C(m/d),m%=d,this.$d.seconds=C(m/o),m%=o,this.$d.milliseconds=m},p.toISOString=function(){var m=O(this.$d.years,"Y"),h=O(this.$d.months,"M"),g=+this.$d.days||0;this.$d.weeks&&(g+=7*this.$d.weeks);var y=O(g,"D"),s=O(this.$d.hours,"H"),c=O(this.$d.minutes,"M"),f=this.$d.seconds||0;this.$d.milliseconds&&(f+=this.$d.milliseconds/1e3,f=Math.round(1e3*f)/1e3);var l=O(f,"S"),b=m.negative||h.negative||y.negative||s.negative||c.negative||l.negative,a=s.format||c.format||l.format?"T":"",_=(b?"-":"")+"P"+m.format+h.format+y.format+a+s.format+c.format+l.format;return _==="P"||_==="-P"?"P0D":_},p.toJSON=function(){return this.toISOString()},p.format=function(m){var h=m||"YYYY-MM-DDTHH:mm:ss",g={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return h.replace(I,(function(y,s){return s||String(g[y])}))},p.as=function(m){return this.$ms/w[Y(m)]},p.get=function(m){var h=this.$ms,g=Y(m);return g==="milliseconds"?h%=1e3:h=g==="weeks"?C(h/w[g]):this.$d[g],h||0},p.add=function(m,h,g){var y;return y=h?m*w[Y(h)]:$(m)?m.$ms:z(m,this).$ms,z(this.$ms+y*(g?-1:1),this)},p.subtract=function(m,h){return this.add(m,h,!0)},p.locale=function(m){var h=this.clone();return h.$l=m,h},p.clone=function(){return z(this.$ms,this)},p.humanize=function(m){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!m)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},A})(),N=function(A,p,m){return A.add(p.years()*m,"y").add(p.months()*m,"M").add(p.days()*m,"d").add(p.hours()*m,"h").add(p.minutes()*m,"m").add(p.seconds()*m,"s").add(p.milliseconds()*m,"ms")};return function(A,p,m){r=m,n=m().$utils(),m.duration=function(y,s){return z(y,{$l:m.locale()},s)},m.isDuration=$;var h=p.prototype.add,g=p.prototype.subtract;p.prototype.add=function(y,s){return $(y)?N(this,y,1):h.bind(this)(y,s)},p.prototype.subtract=function(y,s){return $(y)?N(this,y,-1):g.bind(this)(y,s)}}}))})),qe=Oe(),q=ct(te(),1),Xe=ct(Ve(),1),Qe=ct(Re(),1),Je=ct(Ze(),1),mt=ct(te(),1),Ke=ct(Ue(),1),Ct=(function(){var t=u(function(s,c,f,l){for(f||(f={}),l=s.length;l--;f[s[l]]=c);return f},"o"),i=[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],r=[1,26],n=[1,27],o=[1,28],d=[1,29],k=[1,30],M=[1,31],I=[1,32],D=[1,33],x=[1,34],F=[1,9],w=[1,10],$=[1,11],z=[1,12],Y=[1,13],v=[1,14],C=[1,15],L=[1,16],O=[1,19],H=[1,20],N=[1,21],A=[1,22],p=[1,23],m=[1,25],h=[1,35],g={trace:u(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:u(function(s,c,f,l,b,a,_){var e=a.length-1;switch(b){case 1:return a[e-1];case 2:this.$=[];break;case 3:a[e-1].push(a[e]),this.$=a[e-1];break;case 4:case 5:this.$=a[e];break;case 6:case 7:this.$=[];break;case 8:l.setWeekday("monday");break;case 9:l.setWeekday("tuesday");break;case 10:l.setWeekday("wednesday");break;case 11:l.setWeekday("thursday");break;case 12:l.setWeekday("friday");break;case 13:l.setWeekday("saturday");break;case 14:l.setWeekday("sunday");break;case 15:l.setWeekend("friday");break;case 16:l.setWeekend("saturday");break;case 17:l.setDateFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 18:l.enableInclusiveEndDates(),this.$=a[e].substr(18);break;case 19:l.TopAxis(),this.$=a[e].substr(8);break;case 20:l.setAxisFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 21:l.setTickInterval(a[e].substr(13)),this.$=a[e].substr(13);break;case 22:l.setExcludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 23:l.setIncludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 24:l.setTodayMarker(a[e].substr(12)),this.$=a[e].substr(12);break;case 27:l.setDiagramTitle(a[e].substr(6)),this.$=a[e].substr(6);break;case 28:this.$=a[e].trim(),l.setAccTitle(this.$);break;case 29:case 30:this.$=a[e].trim(),l.setAccDescription(this.$);break;case 31:l.addSection(a[e].substr(8)),this.$=a[e].substr(8);break;case 33:l.addTask(a[e-1],a[e]),this.$="task";break;case 34:this.$=a[e-1],l.setClickEvent(a[e-1],a[e],null);break;case 35:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],a[e]);break;case 36:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],null),l.setLink(a[e-2],a[e]);break;case 37:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-2],a[e-1]),l.setLink(a[e-3],a[e]);break;case 38:this.$=a[e-2],l.setClickEvent(a[e-2],a[e],null),l.setLink(a[e-2],a[e-1]);break;case 39:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-1],a[e]),l.setLink(a[e-3],a[e-2]);break;case 40:this.$=a[e-1],l.setLink(a[e-1],a[e]);break;case 41:case 47:this.$=a[e-1]+" "+a[e];break;case 42:case 43:case 45:this.$=a[e-2]+" "+a[e-1]+" "+a[e];break;case 44:case 46:this.$=a[e-3]+" "+a[e-2]+" "+a[e-1]+" "+a[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:36,11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,5]),t(i,[2,6]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),t(i,[2,23]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),t(i,[2,27]),{32:[1,37]},{34:[1,38]},t(i,[2,30]),t(i,[2,31]),t(i,[2,32]),{39:[1,39]},t(i,[2,8]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),{41:[1,40],43:[1,41]},t(i,[2,4]),t(i,[2,28]),t(i,[2,29]),t(i,[2,33]),t(i,[2,34],{42:[1,42],43:[1,43]}),t(i,[2,40],{41:[1,44]}),t(i,[2,35],{43:[1,45]}),t(i,[2,36]),t(i,[2,38],{42:[1,46]}),t(i,[2,37]),t(i,[2,39])],defaultActions:{},parseError:u(function(s,c){if(c.recoverable)this.trace(s);else{var f=Error(s);throw f.hash=c,f}},"parseError"),parse:u(function(s){var c=this,f=[0],l=[],b=[null],a=[],_=this.table,e="",T=0,S=0,E=0,W=2,P=1,j=a.slice.call(arguments,1),B=Object.create(this.lexer),X={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(X.yy[ht]=this.yy[ht]);B.setInput(s,X.yy),X.yy.lexer=B,X.yy.parser=this,B.yylloc===void 0&&(B.yylloc={});var at=B.yylloc;a.push(at);var gt=B.options&&B.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(U){f.length-=2*U,b.length-=U,a.length-=U}u(ft,"popStack");function ot(){var U=l.pop()||B.lex()||P;return typeof U!="number"&&(U instanceof Array&&(l=U,U=l.pop()),U=c.symbols_[U]||U),U}u(ot,"lex");for(var V,et,Z,R,nt,Q={},it,K,Vt,bt;;){if(Z=f[f.length-1],this.defaultActions[Z]?R=this.defaultActions[Z]:(V??(V=ot()),R=_[Z]&&_[Z][V]),R===void 0||!R.length||!R[0]){var Rt="";for(it in bt=[],_[Z])this.terminals_[it]&&it>W&&bt.push("'"+this.terminals_[it]+"'");Rt=B.showPosition?"Parse error on line "+(T+1)+`:
`+B.showPosition()+`
Expecting `+bt.join(", ")+", got '"+(this.terminals_[V]||V)+"'":"Parse error on line "+(T+1)+": Unexpected "+(V==P?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(Rt,{text:B.match,token:this.terminals_[V]||V,line:B.yylineno,loc:at,expected:bt})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+Z+", token: "+V);switch(R[0]){case 1:f.push(V),b.push(B.yytext),a.push(B.yylloc),f.push(R[1]),V=null,et?(V=et,et=null):(S=B.yyleng,e=B.yytext,T=B.yylineno,at=B.yylloc,E>0&&E--);break;case 2:if(K=this.productions_[R[1]][1],Q.$=b[b.length-K],Q._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},gt&&(Q._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),nt=this.performAction.apply(Q,[e,S,T,X.yy,R[1],b,a].concat(j)),nt!==void 0)return nt;K&&(f=f.slice(0,-1*K*2),b=b.slice(0,-1*K),a=a.slice(0,-1*K)),f.push(this.productions_[R[1]][0]),b.push(Q.$),a.push(Q._$),Vt=_[f[f.length-2]][f[f.length-1]],f.push(Vt);break;case 3:return!0}}return!0},"parse")};g.lexer=(function(){return{EOF:1,parseError:u(function(s,c){if(this.yy.parser)this.yy.parser.parseError(s,c);else throw Error(s)},"parseError"),setInput:u(function(s,c){return this.yy=c||this.yy||{},this._input=s,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 s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:u(function(s){var c=s.length,f=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var l=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),f.length-1&&(this.yylineno-=f.length-1);var b=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:f?(f.length===l.length?this.yylloc.first_column:0)+l[l.length-f.length].length-f[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-c]),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(s){this.unput(this.match.slice(s))},"less"),pastInput:u(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var s=this.pastInput(),c=Array(s.length+1).join("-");return s+this.upcomingInput()+`
`+c+"^"},"showPosition"),test_match:u(function(s,c){var f,l,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),l=s[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],f=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var a in b)this[a]=b[a];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,c,f,l;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),a=0;a<b.length;a++)if(f=this._input.match(this.rules[b[a]]),f&&(!c||f[0].length>c[0].length)){if(c=f,l=a,this.options.backtrack_lexer){if(s=this.test_match(f,b[a]),s!==!1)return s;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(s=this.test_match(c,b[l]),s===!1?!1:s):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(){return this.next()||this.lex()},"lex"),begin:u(function(s){this.conditionStack.push(s)},"begin"),popState:u(function(){return this.conditionStack.length-1>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(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:u(function(s){this.begin(s)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(s,c,f,l){switch(f){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}}}})();function y(){this.yy={}}return u(y,"Parser"),y.prototype=g,g.Parser=y,new y})();Ct.parser=Ct;var ti=Ct;q.default.extend(Xe.default),q.default.extend(Qe.default),q.default.extend(Je.default);var ne={friday:5,saturday:6},J="",Et="",Yt=void 0,At="",yt=[],kt=[],It=new Map,Lt=[],wt=[],ut="",Ft="",se=["active","done","crit","milestone","vert"],Ot=[],pt=!1,Wt=!1,Pt="sunday",$t="saturday",zt=0,ei=u(function(){Lt=[],wt=[],ut="",Ot=[],Nt=0,Bt=void 0,_t=void 0,G=[],J="",Et="",Ft="",Yt=void 0,At="",yt=[],kt=[],pt=!1,Wt=!1,zt=0,It=new Map,Ye(),Pt="sunday",$t="saturday"},"clear"),ii=u(function(t){Et=t},"setAxisFormat"),ni=u(function(){return Et},"getAxisFormat"),si=u(function(t){Yt=t},"setTickInterval"),ri=u(function(){return Yt},"getTickInterval"),ai=u(function(t){At=t},"setTodayMarker"),oi=u(function(){return At},"getTodayMarker"),ci=u(function(t){J=t},"setDateFormat"),li=u(function(){pt=!0},"enableInclusiveEndDates"),ui=u(function(){return pt},"endDatesAreInclusive"),di=u(function(){Wt=!0},"enableTopAxis"),hi=u(function(){return Wt},"topAxisEnabled"),fi=u(function(t){Ft=t},"setDisplayMode"),mi=u(function(){return Ft},"getDisplayMode"),yi=u(function(){return J},"getDateFormat"),ki=u(function(t){yt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),pi=u(function(){return yt},"getIncludes"),gi=u(function(t){kt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),bi=u(function(){return kt},"getExcludes"),vi=u(function(){return It},"getLinks"),Ti=u(function(t){ut=t,Lt.push(t)},"addSection"),xi=u(function(){return Lt},"getSections"),wi=u(function(){let t=ue(),i=0;for(;!t&&i<10;)t=ue(),i++;return wt=G,wt},"getTasks"),re=u(function(t,i,r,n){let o=t.format(i.trim()),d=t.format("YYYY-MM-DD");return n.includes(o)||n.includes(d)?!1:r.includes("weekends")&&(t.isoWeekday()===ne[$t]||t.isoWeekday()===ne[$t]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(o)||r.includes(d)},"isInvalidDate"),$i=u(function(t){Pt=t},"setWeekday"),_i=u(function(){return Pt},"getWeekday"),Di=u(function(t){$t=t},"setWeekend"),ae=u(function(t,i,r,n){if(!r.length||t.manualEndTime)return;let o;o=t.startTime instanceof Date?(0,q.default)(t.startTime):(0,q.default)(t.startTime,i,!0),o=o.add(1,"d");let d;d=t.endTime instanceof Date?(0,q.default)(t.endTime):(0,q.default)(t.endTime,i,!0);let[k,M]=Si(o,d,i,r,n);t.endTime=k.toDate(),t.renderEndTime=M},"checkTaskDates"),Si=u(function(t,i,r,n,o){let d=!1,k=null;for(;t<=i;)d||(k=i.toDate()),d=re(t,r,n,o),d&&(i=i.add(1,"d")),t=t.add(1,"d");return[i,k]},"fixTaskDates"),Ht=u(function(t,i,r){if(r=r.trim(),u(d=>{let k=d.trim();return k==="x"||k==="X"},"isTimestampFormat")(i)&&/^\d+$/.test(r))return new Date(Number(r));let n=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(n!==null){let d=null;for(let M of n.groups.ids.split(" ")){let I=rt(M);I!==void 0&&(!d||I.endTime>d.endTime)&&(d=I)}if(d)return d.endTime;let k=new Date;return k.setHours(0,0,0,0),k}let o=(0,q.default)(r,i.trim(),!0);if(o.isValid())return o.toDate();{st.debug("Invalid date:"+r),st.debug("With date format:"+i.trim());let d=new Date(r);if(d===void 0||isNaN(d.getTime())||d.getFullYear()<-1e4||d.getFullYear()>1e4)throw Error("Invalid date:"+r);return d}},"getStartDate"),oe=u(function(t){let i=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return i===null?[NaN,"ms"]:[Number.parseFloat(i[1]),i[2]]},"parseDuration"),ce=u(function(t,i,r,n=!1){r=r.trim();let o=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(o!==null){let D=null;for(let F of o.groups.ids.split(" ")){let w=rt(F);w!==void 0&&(!D||w.startTime<D.startTime)&&(D=w)}if(D)return D.startTime;let x=new Date;return x.setHours(0,0,0,0),x}let d=(0,q.default)(r,i.trim(),!0);if(d.isValid())return n&&(d=d.add(1,"d")),d.toDate();let k=(0,q.default)(t),[M,I]=oe(r);if(!Number.isNaN(M)){let D=k.add(M,I);D.isValid()&&(k=D)}return k.toDate()},"getEndDate"),Nt=0,dt=u(function(t){return t===void 0?(Nt+=1,"task"+Nt):t},"parseId"),Mi=u(function(t,i){let r;r=i.substr(0,1)===":"?i.substr(1,i.length):i;let n=r.split(","),o={};jt(n,o,se);for(let k=0;k<n.length;k++)n[k]=n[k].trim();let d="";switch(n.length){case 1:o.id=dt(),o.startTime=t.endTime,d=n[0];break;case 2:o.id=dt(),o.startTime=Ht(void 0,J,n[0]),d=n[1];break;case 3:o.id=dt(n[0]),o.startTime=Ht(void 0,J,n[1]),d=n[2];break;default:}return d&&(o.endTime=ce(o.startTime,J,d,pt),o.manualEndTime=(0,q.default)(d,"YYYY-MM-DD",!0).isValid(),ae(o,J,kt,yt)),o},"compileData"),Ci=u(function(t,i){let r;r=i.substr(0,1)===":"?i.substr(1,i.length):i;let n=r.split(","),o={};jt(n,o,se);for(let d=0;d<n.length;d++)n[d]=n[d].trim();switch(n.length){case 1:o.id=dt(),o.startTime={type:"prevTaskEnd",id:t},o.endTime={data:n[0]};break;case 2:o.id=dt(),o.startTime={type:"getStartDate",startData:n[0]},o.endTime={data:n[1]};break;case 3:o.id=dt(n[0]),o.startTime={type:"getStartDate",startData:n[1]},o.endTime={data:n[2]};break;default:}return o},"parseData"),Bt,_t,G=[],le={},Ei=u(function(t,i){let r={section:ut,type:ut,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:i},task:t,classes:[]},n=Ci(_t,i);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=_t,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,r.order=zt,zt++;let o=G.push(r);_t=r.id,le[r.id]=o-1},"addTask"),rt=u(function(t){let i=le[t];return G[i]},"findTaskById"),Yi=u(function(t,i){let r={section:ut,type:ut,description:t,task:t,classes:[]},n=Mi(Bt,i);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,Bt=r,wt.push(r)},"addTaskOrg"),ue=u(function(){let t=u(function(r){let n=G[r],o="";switch(G[r].raw.startTime.type){case"prevTaskEnd":n.startTime=rt(n.prevTaskId).endTime;break;case"getStartDate":o=Ht(void 0,J,G[r].raw.startTime.startData),o&&(G[r].startTime=o);break}return G[r].startTime&&(G[r].endTime=ce(G[r].startTime,J,G[r].raw.endTime.data,pt),G[r].endTime&&(G[r].processed=!0,G[r].manualEndTime=(0,q.default)(G[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),ae(G[r],J,kt,yt))),G[r].processed},"compileTask"),i=!0;for(let[r,n]of G.entries())t(r),i&&(i=n.processed);return i},"compileTasks"),Ai=u(function(t,i){let r=i;lt().securityLevel!=="loose"&&(r=(0,qe.sanitizeUrl)(i)),t.split(",").forEach(function(n){rt(n)!==void 0&&(he(n,()=>{window.open(r,"_self")}),It.set(n,r))}),de(t,"clickable")},"setLink"),de=u(function(t,i){t.split(",").forEach(function(r){let n=rt(r);n!==void 0&&n.classes.push(i)})},"setClass"),Ii=u(function(t,i,r){if(lt().securityLevel!=="loose"||i===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<n.length;o++){let d=n[o].trim();d.startsWith('"')&&d.endsWith('"')&&(d=d.substr(1,d.length-2)),n[o]=d}}n.length===0&&n.push(t),rt(t)!==void 0&&he(t,()=>{De.runFunc(i,...n)})},"setClickFun"),he=u(function(t,i){Ot.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){i()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){i()})})},"pushFun"),Li={getConfig:u(()=>lt().gantt,"getConfig"),clear:ei,setDateFormat:ci,getDateFormat:yi,enableInclusiveEndDates:li,endDatesAreInclusive:ui,enableTopAxis:di,topAxisEnabled:hi,setAxisFormat:ii,getAxisFormat:ni,setTickInterval:si,getTickInterval:ri,setTodayMarker:ai,getTodayMarker:oi,setAccTitle:Se,getAccTitle:Le,setDiagramTitle:Ce,getDiagramTitle:Me,setDisplayMode:fi,getDisplayMode:mi,setAccDescription:Fe,getAccDescription:Ee,addSection:Ti,getSections:xi,getTasks:wi,addTask:Ei,findTaskById:rt,addTaskOrg:Yi,setIncludes:ki,getIncludes:pi,setExcludes:gi,getExcludes:bi,setClickEvent:u(function(t,i,r){t.split(",").forEach(function(n){Ii(n,i,r)}),de(t,"clickable")},"setClickEvent"),setLink:Ai,getLinks:vi,bindFunctions:u(function(t){Ot.forEach(function(i){i(t)})},"bindFunctions"),parseDuration:oe,isInvalidDate:re,setWeekday:$i,getWeekday:_i,setWeekend:Di};function jt(t,i,r){let n=!0;for(;n;)n=!1,r.forEach(function(o){let d="^\\s*"+o+"\\s*$",k=new RegExp(d);t[0].match(k)&&(i[o]=!0,t.shift(1),n=!0)})}u(jt,"getTaskTags"),mt.default.extend(Ke.default);var Fi=u(function(){st.debug("Something is calling, setConf, remove the call")},"setConf"),fe={monday:ge,tuesday:Te,wednesday:ve,thursday:xe,friday:$e,saturday:be,sunday:we},Oi=u((t,i)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((d,k)=>d.startTime-k.startTime||d.order-k.order),o=0;for(let d of n)for(let k=0;k<r.length;k++)if(d.startTime>=r[k]){r[k]=d.endTime,d.order=k+i,k>o&&(o=k);break}return o},"getMaxIntersections"),tt,Gt=1e4,Wi={parser:ti,db:Li,renderer:{setConf:Fi,draw:u(function(t,i,r,n){let o=lt().gantt,d=lt().securityLevel,k;d==="sandbox"&&(k=Dt("#i"+i));let M=Dt(d==="sandbox"?k.nodes()[0].contentDocument.body:"body"),I=d==="sandbox"?k.nodes()[0].contentDocument:document,D=I.getElementById(i);tt=D.parentElement.offsetWidth,tt===void 0&&(tt=1200),o.useWidth!==void 0&&(tt=o.useWidth);let x=n.db.getTasks(),F=[];for(let h of x)F.push(h.type);F=m(F);let w={},$=2*o.topPadding;if(n.db.getDisplayMode()==="compact"||o.displayMode==="compact"){let h={};for(let y of x)h[y.section]===void 0?h[y.section]=[y]:h[y.section].push(y);let g=0;for(let y of Object.keys(h)){let s=Oi(h[y],g)+1;g+=s,$+=s*(o.barHeight+o.barGap),w[y]=s}}else{$+=x.length*(o.barHeight+o.barGap);for(let h of F)w[h]=x.filter(g=>g.type===h).length}D.setAttribute("viewBox","0 0 "+tt+" "+$);let z=M.select(`[id="${i}"]`),Y=ye().domain([ke(x,function(h){return h.startTime}),pe(x,function(h){return h.endTime})]).rangeRound([0,tt-o.leftPadding-o.rightPadding]);function v(h,g){let y=h.startTime,s=g.startTime,c=0;return y>s?c=1:y<s&&(c=-1),c}u(v,"taskCompare"),x.sort(v),C(x,tt,$),Ae(z,$,tt,o.useMaxWidth),z.append("text").text(n.db.getDiagramTitle()).attr("x",tt/2).attr("y",o.titleTopMargin).attr("class","titleText");function C(h,g,y){let s=o.barHeight,c=s+o.barGap,f=o.topPadding,l=o.leftPadding,b=me().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(_e);O(c,f,l,g,y,h,n.db.getExcludes(),n.db.getIncludes()),N(l,f,g,y),L(h,c,f,l,s,b,g,y),A(c,f,l,s,b),p(l,f,g,y)}u(C,"makeGantt");function L(h,g,y,s,c,f,l){h.sort((e,T)=>e.vert===T.vert?0:e.vert?1:-1);let b=[...new Set(h.map(e=>e.order))].map(e=>h.find(T=>T.order===e));z.append("g").selectAll("rect").data(b).enter().append("rect").attr("x",0).attr("y",function(e,T){return T=e.order,T*g+y-2}).attr("width",function(){return l-o.rightPadding/2}).attr("height",g).attr("class",function(e){for(let[T,S]of F.entries())if(e.type===S)return"section section"+T%o.numberSectionStyles;return"section section0"}).enter();let a=z.append("g").selectAll("rect").data(h).enter(),_=n.db.getLinks();if(a.append("rect").attr("id",function(e){return e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?Y(e.startTime)+s+.5*(Y(e.endTime)-Y(e.startTime))-.5*c:Y(e.startTime)+s}).attr("y",function(e,T){return T=e.order,e.vert?o.gridLineStartPadding:T*g+y}).attr("width",function(e){return e.milestone?c:e.vert?.08*c:Y(e.renderEndTime||e.endTime)-Y(e.startTime)}).attr("height",function(e){return e.vert?x.length*(o.barHeight+o.barGap)+o.barHeight*2:c}).attr("transform-origin",function(e,T){return T=e.order,(Y(e.startTime)+s+.5*(Y(e.endTime)-Y(e.startTime))).toString()+"px "+(T*g+y+.5*c).toString()+"px"}).attr("class",function(e){let T="";e.classes.length>0&&(T=e.classes.join(" "));let S=0;for(let[W,P]of F.entries())e.type===P&&(S=W%o.numberSectionStyles);let E="";return e.active?e.crit?E+=" activeCrit":E=" active":e.done?E=e.crit?" doneCrit":" done":e.crit&&(E+=" crit"),E.length===0&&(E=" task"),e.milestone&&(E=" milestone "+E),e.vert&&(E=" vert "+E),E+=S,E+=" "+T,"task"+E}),a.append("text").attr("id",function(e){return e.id+"-text"}).text(function(e){return e.task}).attr("font-size",o.fontSize).attr("x",function(e){let T=Y(e.startTime),S=Y(e.renderEndTime||e.endTime);if(e.milestone&&(T+=.5*(Y(e.endTime)-Y(e.startTime))-.5*c,S=T+c),e.vert)return Y(e.startTime)+s;let E=this.getBBox().width;return E>S-T?S+E+1.5*o.leftPadding>l?T+s-5:S+s+5:(S-T)/2+T+s}).attr("y",function(e,T){return e.vert?o.gridLineStartPadding+x.length*(o.barHeight+o.barGap)+60:(T=e.order,T*g+o.barHeight/2+(o.fontSize/2-2)+y)}).attr("text-height",c).attr("class",function(e){let T=Y(e.startTime),S=Y(e.endTime);e.milestone&&(S=T+c);let E=this.getBBox().width,W="";e.classes.length>0&&(W=e.classes.join(" "));let P=0;for(let[B,X]of F.entries())e.type===X&&(P=B%o.numberSectionStyles);let j="";return e.active&&(j=e.crit?"activeCritText"+P:"activeText"+P),e.done?j=e.crit?j+" doneCritText"+P:j+" doneText"+P:e.crit&&(j=j+" critText"+P),e.milestone&&(j+=" milestoneText"),e.vert&&(j+=" vertText"),E>S-T?S+E+1.5*o.leftPadding>l?W+" taskTextOutsideLeft taskTextOutside"+P+" "+j:W+" taskTextOutsideRight taskTextOutside"+P+" "+j+" width-"+E:W+" taskText taskText"+P+" "+j+" width-"+E}),lt().securityLevel==="sandbox"){let e;e=Dt("#i"+i);let T=e.nodes()[0].contentDocument;a.filter(function(S){return _.has(S.id)}).each(function(S){var E=T.querySelector("#"+S.id),W=T.querySelector("#"+S.id+"-text");let P=E.parentNode;var j=T.createElement("a");j.setAttribute("xlink:href",_.get(S.id)),j.setAttribute("target","_top"),P.appendChild(j),j.appendChild(E),j.appendChild(W)})}}u(L,"drawRects");function O(h,g,y,s,c,f,l,b){if(l.length===0&&b.length===0)return;let a,_;for(let{startTime:W,endTime:P}of f)(a===void 0||W<a)&&(a=W),(_===void 0||P>_)&&(_=P);if(!a||!_)return;if((0,mt.default)(_).diff((0,mt.default)(a),"year")>5){st.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let e=n.db.getDateFormat(),T=[],S=null,E=(0,mt.default)(a);for(;E.valueOf()<=_;)n.db.isInvalidDate(E,e,l,b)?S?S.end=E:S={start:E,end:E}:S&&(S=(T.push(S),null)),E=E.add(1,"d");z.append("g").selectAll("rect").data(T).enter().append("rect").attr("id",W=>"exclude-"+W.start.format("YYYY-MM-DD")).attr("x",W=>Y(W.start.startOf("day"))+y).attr("y",o.gridLineStartPadding).attr("width",W=>Y(W.end.endOf("day"))-Y(W.start.startOf("day"))).attr("height",c-g-o.gridLineStartPadding).attr("transform-origin",function(W,P){return(Y(W.start)+y+.5*(Y(W.end)-Y(W.start))).toString()+"px "+(P*h+.5*c).toString()+"px"}).attr("class","exclude-range")}u(O,"drawExcludeDays");function H(h,g,y,s){if(y<=0||h>g)return 1/0;let c=g-h,f=mt.default.duration({[s??"day"]:y}).asMilliseconds();return f<=0?1/0:Math.ceil(c/f)}u(H,"getEstimatedTickCount");function N(h,g,y,s){let c=n.db.getDateFormat(),f=n.db.getAxisFormat(),l;l=f||(c==="D"?"%d":o.axisFormat??"%Y-%m-%d");let b=Ge(Y).tickSize(-s+g+o.gridLineStartPadding).tickFormat(Qt(l)),a=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||o.tickInterval);if(a!==null){let _=parseInt(a[1],10);if(isNaN(_)||_<=0)st.warn(`Invalid tick interval value: "${a[1]}". Skipping custom tick interval.`);else{let e=a[2],T=n.db.getWeekday()||o.weekday,S=Y.domain(),E=S[0],W=S[1],P=H(E,W,_,e);if(P>Gt)st.warn(`The tick interval "${_}${e}" would generate ${P} ticks, which exceeds the maximum allowed (${Gt}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":b.ticks(Ut.every(_));break;case"second":b.ticks(qt.every(_));break;case"minute":b.ticks(Zt.every(_));break;case"hour":b.ticks(Kt.every(_));break;case"day":b.ticks(Jt.every(_));break;case"week":b.ticks(fe[T].every(_));break;case"month":b.ticks(Xt.every(_));break}}}if(z.append("g").attr("class","grid").attr("transform","translate("+h+", "+(s-50)+")").call(b).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||o.topAxis){let _=je(Y).tickSize(-s+g+o.gridLineStartPadding).tickFormat(Qt(l));if(a!==null){let e=parseInt(a[1],10);if(isNaN(e)||e<=0)st.warn(`Invalid tick interval value: "${a[1]}". Skipping custom tick interval.`);else{let T=a[2],S=n.db.getWeekday()||o.weekday,E=Y.domain(),W=E[0],P=E[1];if(H(W,P,e,T)<=Gt)switch(T){case"millisecond":_.ticks(Ut.every(e));break;case"second":_.ticks(qt.every(e));break;case"minute":_.ticks(Zt.every(e));break;case"hour":_.ticks(Kt.every(e));break;case"day":_.ticks(Jt.every(e));break;case"week":_.ticks(fe[S].every(e));break;case"month":_.ticks(Xt.every(e));break}}}z.append("g").attr("class","grid").attr("transform","translate("+h+", "+g+")").call(_).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}u(N,"makeGrid");function A(h,g){let y=0,s=Object.keys(w).map(c=>[c,w[c]]);z.append("g").selectAll("text").data(s).enter().append(function(c){let f=c[0].split(Ie.lineBreakRegex),l=-(f.length-1)/2,b=I.createElementNS("http://www.w3.org/2000/svg","text");b.setAttribute("dy",l+"em");for(let[a,_]of f.entries()){let e=I.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),a>0&&e.setAttribute("dy","1em"),e.textContent=_,b.appendChild(e)}return b}).attr("x",10).attr("y",function(c,f){if(f>0)for(let l=0;l<f;l++)return y+=s[f-1][1],c[1]*h/2+y*h+g;else return c[1]*h/2+g}).attr("font-size",o.sectionFontSize).attr("class",function(c){for(let[f,l]of F.entries())if(c[0]===l)return"sectionTitle sectionTitle"+f%o.numberSectionStyles;return"sectionTitle"})}u(A,"vertLabels");function p(h,g,y,s){let c=n.db.getTodayMarker();if(c==="off")return;let f=z.append("g").attr("class","today"),l=new Date,b=f.append("line");b.attr("x1",Y(l)+h).attr("x2",Y(l)+h).attr("y1",o.titleTopMargin).attr("y2",s-o.titleTopMargin).attr("class","today"),c!==""&&b.attr("style",c.replace(/,/g,";"))}u(p,"drawToday");function m(h){let g={},y=[];for(let s=0,c=h.length;s<c;++s)Object.prototype.hasOwnProperty.call(g,h[s])||(g[h[s]]=!0,y.push(h[s]));return y}u(m,"checkUnique")},"draw")},styles:u(t=>`
.mermaid-main-font {
font-family: ${t.fontFamily};
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: ${t.fontFamily};
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: ${t.fontFamily};
}
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
font-family: ${t.fontFamily};
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.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: ${t.taskTextDarkColor} !important;
}
.vert {
stroke: ${t.vertLineColor};
}
.vertText {
font-size: 15px;
text-anchor: middle;
fill: ${t.vertLineColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.titleColor||t.textColor};
font-family: ${t.fontFamily};
}
`,"getStyles")};export{Wi as diagram};
function v(r){var u=[],b="",c={".abort":"builtin",".align":"builtin",".altmacro":"builtin",".ascii":"builtin",".asciz":"builtin",".balign":"builtin",".balignw":"builtin",".balignl":"builtin",".bundle_align_mode":"builtin",".bundle_lock":"builtin",".bundle_unlock":"builtin",".byte":"builtin",".cfi_startproc":"builtin",".comm":"builtin",".data":"builtin",".def":"builtin",".desc":"builtin",".dim":"builtin",".double":"builtin",".eject":"builtin",".else":"builtin",".elseif":"builtin",".end":"builtin",".endef":"builtin",".endfunc":"builtin",".endif":"builtin",".equ":"builtin",".equiv":"builtin",".eqv":"builtin",".err":"builtin",".error":"builtin",".exitm":"builtin",".extern":"builtin",".fail":"builtin",".file":"builtin",".fill":"builtin",".float":"builtin",".func":"builtin",".global":"builtin",".gnu_attribute":"builtin",".hidden":"builtin",".hword":"builtin",".ident":"builtin",".if":"builtin",".incbin":"builtin",".include":"builtin",".int":"builtin",".internal":"builtin",".irp":"builtin",".irpc":"builtin",".lcomm":"builtin",".lflags":"builtin",".line":"builtin",".linkonce":"builtin",".list":"builtin",".ln":"builtin",".loc":"builtin",".loc_mark_labels":"builtin",".local":"builtin",".long":"builtin",".macro":"builtin",".mri":"builtin",".noaltmacro":"builtin",".nolist":"builtin",".octa":"builtin",".offset":"builtin",".org":"builtin",".p2align":"builtin",".popsection":"builtin",".previous":"builtin",".print":"builtin",".protected":"builtin",".psize":"builtin",".purgem":"builtin",".pushsection":"builtin",".quad":"builtin",".reloc":"builtin",".rept":"builtin",".sbttl":"builtin",".scl":"builtin",".section":"builtin",".set":"builtin",".short":"builtin",".single":"builtin",".size":"builtin",".skip":"builtin",".sleb128":"builtin",".space":"builtin",".stab":"builtin",".string":"builtin",".struct":"builtin",".subsection":"builtin",".symver":"builtin",".tag":"builtin",".text":"builtin",".title":"builtin",".type":"builtin",".uleb128":"builtin",".val":"builtin",".version":"builtin",".vtable_entry":"builtin",".vtable_inherit":"builtin",".warning":"builtin",".weak":"builtin",".weakref":"builtin",".word":"builtin"},i={};function p(){b="#",i.al="variable",i.ah="variable",i.ax="variable",i.eax="variableName.special",i.rax="variableName.special",i.bl="variable",i.bh="variable",i.bx="variable",i.ebx="variableName.special",i.rbx="variableName.special",i.cl="variable",i.ch="variable",i.cx="variable",i.ecx="variableName.special",i.rcx="variableName.special",i.dl="variable",i.dh="variable",i.dx="variable",i.edx="variableName.special",i.rdx="variableName.special",i.si="variable",i.esi="variableName.special",i.rsi="variableName.special",i.di="variable",i.edi="variableName.special",i.rdi="variableName.special",i.sp="variable",i.esp="variableName.special",i.rsp="variableName.special",i.bp="variable",i.ebp="variableName.special",i.rbp="variableName.special",i.ip="variable",i.eip="variableName.special",i.rip="variableName.special",i.cs="keyword",i.ds="keyword",i.ss="keyword",i.es="keyword",i.fs="keyword",i.gs="keyword"}function m(){b="@",c.syntax="builtin",i.r0="variable",i.r1="variable",i.r2="variable",i.r3="variable",i.r4="variable",i.r5="variable",i.r6="variable",i.r7="variable",i.r8="variable",i.r9="variable",i.r10="variable",i.r11="variable",i.r12="variable",i.sp="variableName.special",i.lr="variableName.special",i.pc="variableName.special",i.r13=i.sp,i.r14=i.lr,i.r15=i.pc,u.push(function(l,t){if(l==="#")return t.eatWhile(/\w/),"number"})}r==="x86"?p():(r==="arm"||r==="armv6")&&m();function f(l,t){for(var e=!1,a;(a=l.next())!=null;){if(a===t&&!e)return!1;e=!e&&a==="\\"}return e}function o(l,t){for(var e=!1,a;(a=l.next())!=null;){if(a==="/"&&e){t.tokenize=null;break}e=a==="*"}return"comment"}return{name:"gas",startState:function(){return{tokenize:null}},token:function(l,t){if(t.tokenize)return t.tokenize(l,t);if(l.eatSpace())return null;var e,a,n=l.next();if(n==="/"&&l.eat("*"))return t.tokenize=o,o(l,t);if(n===b)return l.skipToEnd(),"comment";if(n==='"')return f(l,'"'),"string";if(n===".")return l.eatWhile(/\w/),a=l.current().toLowerCase(),e=c[a],e||null;if(n==="=")return l.eatWhile(/\w/),"tag";if(n==="{"||n==="}")return"bracket";if(/\d/.test(n))return n==="0"&&l.eat("x")?(l.eatWhile(/[0-9a-fA-F]/),"number"):(l.eatWhile(/\d/),"number");if(/\w/.test(n))return l.eatWhile(/\w/),l.eat(":")?"tag":(a=l.current().toLowerCase(),e=i[a],e||null);for(var s=0;s<u.length;s++)if(e=u[s](n,l,t),e)return e},languageData:{commentTokens:{line:b,block:{open:"/*",close:"*/"}}}}}const d=v("x86"),g=v("arm");export{g as n,d as t};
import{n as a,t as s}from"./gas-BX8xjNNw.js";export{s as gas,a as gasArm};
const n={name:"gherkin",startState:function(){return{lineNumber:0,tableHeaderLine:!1,allowFeature:!0,allowBackground:!1,allowScenario:!1,allowSteps:!1,allowPlaceholders:!1,allowMultilineArgument:!1,inMultilineString:!1,inMultilineTable:!1,inKeywordLine:!1}},token:function(e,a){if(e.sol()&&(a.lineNumber++,a.inKeywordLine=!1,a.inMultilineTable&&(a.tableHeaderLine=!1,e.match(/\s*\|/,!1)||(a.allowMultilineArgument=!1,a.inMultilineTable=!1))),e.eatSpace(),a.allowMultilineArgument){if(a.inMultilineString)return e.match('"""')?(a.inMultilineString=!1,a.allowMultilineArgument=!1):e.match(/.*/),"string";if(a.inMultilineTable)return e.match(/\|\s*/)?"bracket":(e.match(/[^\|]*/),a.tableHeaderLine?"header":"string");if(e.match('"""'))return a.inMultilineString=!0,"string";if(e.match("|"))return a.inMultilineTable=!0,a.tableHeaderLine=!0,"bracket"}return e.match(/#.*/)?"comment":!a.inKeywordLine&&e.match(/@\S+/)?"tag":!a.inKeywordLine&&a.allowFeature&&e.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)?(a.allowScenario=!0,a.allowBackground=!0,a.allowPlaceholders=!1,a.allowSteps=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowBackground&&e.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)?(a.allowPlaceholders=!0,a.allowSteps=!0,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):a.allowScenario&&e.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowSteps&&e.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)?(a.inStep=!0,a.allowPlaceholders=!0,a.allowMultilineArgument=!0,a.inKeywordLine=!0,"keyword"):e.match(/"[^"]*"?/)?"string":a.allowPlaceholders&&e.match(/<[^>]*>?/)?"variable":(e.next(),e.eatWhile(/[^@"<#]/),null)}};export{n as t};
import{t as r}from"./gherkin--u9ojH5d.js";export{r as gherkin};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as r}from"./chunk-S6J4BHB3-B5AsdTT7.js";export{r as createGitGraphServices};
var J;import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DNVQZNFu.js";import{u as Q}from"./src-Cf4NnJCp.js";import{g as X,i as Z,m as tt}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as h,r as u}from"./src-BKLwm2RN.js";import{B as rt,C as et,K as at,U as ot,_ as it,a as st,b as ct,d as nt,s as k,v as dt,y as ht,z as mt}from"./chunk-ABZYJK2D-t8l6Viza.js";import"./dist-C04_12Dz.js";import"./chunk-O7ZBX7Z2-CsMGWxKA.js";import"./chunk-S6J4BHB3-B5AsdTT7.js";import"./chunk-LBM3YZW2-DNY-0NiJ.js";import"./chunk-76Q3JFCE-CC_RB1qp.js";import"./chunk-T53DSG4Q-td6bRJ2x.js";import"./chunk-LHMN2FUI-xvIevmTh.js";import"./chunk-FWNWRKHM-D3c3qJTG.js";import{t as lt}from"./chunk-4BX2VUAB-BpI4ekYZ.js";import{t as $t}from"./mermaid-parser.core-BQwQ8Y_u.js";import{t as yt}from"./chunk-QZHKN3VN-bGLTeFnj.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},gt=nt.gitGraph,A=h(()=>Z({...gt,...ht().gitGraph}),"getConfig"),n=new yt(()=>{let r=A(),t=r.mainBranchName,a=r.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:a}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function z(){return tt({length:7})}h(z,"getID");function j(r,t){let a=Object.create(null);return r.reduce((i,e)=>{let o=t(e);return a[o]||(a[o]=!0,i.push(e)),i},[])}h(j,"uniqBy");var pt=h(function(r){n.records.direction=r},"setDirection"),xt=h(function(r){u.debug("options str",r),r=r==null?void 0:r.trim(),r||(r="{}");try{n.records.options=JSON.parse(r)}catch(t){u.error("error while parsing gitGraph options",t.message)}},"setOptions"),ft=h(function(){return n.records.options},"getOptions"),ut=h(function(r){let t=r.msg,a=r.id,i=r.type,e=r.tags;u.info("commit",t,a,i,e),u.debug("Entering commit:",t,a,i,e);let o=A();a=k.sanitizeText(a,o),t=k.sanitizeText(t,o),e=e==null?void 0:e.map(s=>k.sanitizeText(s,o));let c={id:a||n.records.seq+"-"+z(),message:t,seq:n.records.seq++,type:i??p.NORMAL,tags:e??[],parents:n.records.head==null?[]:[n.records.head.id],branch:n.records.currBranch};n.records.head=c,u.info("main branch",o.mainBranchName),n.records.commits.has(c.id)&&u.warn(`Commit ID ${c.id} already exists`),n.records.commits.set(c.id,c),n.records.branches.set(n.records.currBranch,c.id),u.debug("in pushCommit "+c.id)},"commit"),bt=h(function(r){let t=r.name,a=r.order;if(t=k.sanitizeText(t,A()),n.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);n.records.branches.set(t,n.records.head==null?null:n.records.head.id),n.records.branchConfig.set(t,{name:t,order:a}),_(t),u.debug("in createBranch")},"branch"),wt=h(r=>{let t=r.branch,a=r.id,i=r.type,e=r.tags,o=A();t=k.sanitizeText(t,o),a&&(a=k.sanitizeText(a,o));let c=n.records.branches.get(n.records.currBranch),s=n.records.branches.get(t),m=c?n.records.commits.get(c):void 0,$=s?n.records.commits.get(s):void 0;if(m&&$&&m.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(n.records.currBranch===t){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(m===void 0||!m){let d=Error(`Incorrect usage of "merge". Current branch (${n.records.currBranch})has no commits`);throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},d}if(!n.records.branches.has(t)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},d}if($===void 0||!$){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},d}if(m===$){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(a&&n.records.commits.has(a)){let d=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,token:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${t} ${a}_UNIQUE ${i} ${e==null?void 0:e.join(" ")}`]},d}let l=s||"",y={id:a||`${n.records.seq}-${z()}`,message:`merged branch ${t} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,l],branch:n.records.currBranch,type:p.MERGE,customType:i,customId:!!a,tags:e??[]};n.records.head=y,n.records.commits.set(y.id,y),n.records.branches.set(n.records.currBranch,y.id),u.debug(n.records.branches),u.debug("in mergeBranch")},"merge"),Bt=h(function(r){let t=r.id,a=r.targetId,i=r.tags,e=r.parent;u.debug("Entering cherryPick:",t,a,i);let o=A();if(t=k.sanitizeText(t,o),a=k.sanitizeText(a,o),i=i==null?void 0:i.map(m=>k.sanitizeText(m,o)),e=k.sanitizeText(e,o),!t||!n.records.commits.has(t)){let m=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},m}let c=n.records.commits.get(t);if(c===void 0||!c)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=c.branch;if(c.type===p.MERGE&&!e)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!n.records.commits.has(a)){if(s===n.records.currBranch){let y=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let m=n.records.branches.get(n.records.currBranch);if(m===void 0||!m){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let $=n.records.commits.get(m);if($===void 0||!$){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let l={id:n.records.seq+"-"+z(),message:`cherry-picked ${c==null?void 0:c.message} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,c.id],branch:n.records.currBranch,type:p.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${e}`:""}`]};n.records.head=l,n.records.commits.set(l.id,l),n.records.branches.set(n.records.currBranch,l.id),u.debug(n.records.branches),u.debug("in cherryPick")}},"cherryPick"),_=h(function(r){if(r=k.sanitizeText(r,A()),n.records.branches.has(r)){n.records.currBranch=r;let t=n.records.branches.get(n.records.currBranch);t===void 0||!t?n.records.head=null:n.records.head=n.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw t.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},t}},"checkout");function D(r,t,a){let i=r.indexOf(t);i===-1?r.push(a):r.splice(i,1,a)}h(D,"upsert");function N(r){let t=r.reduce((e,o)=>e.seq>o.seq?e:o,r[0]),a="";r.forEach(function(e){e===t?a+=" *":a+=" |"});let i=[a,t.id,t.seq];for(let e in n.records.branches)n.records.branches.get(e)===t.id&&i.push(e);if(u.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let e=n.records.commits.get(t.parents[0]);D(r,t,e),t.parents[1]&&r.push(n.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let e=n.records.commits.get(t.parents[0]);D(r,t,e)}}r=j(r,e=>e.id),N(r)}h(N,"prettyPrintCommitHistory");var Et=h(function(){u.debug(n.records.commits);let r=K()[0];N([r])},"prettyPrint"),Ct=h(function(){n.reset(),st()},"clear"),kt=h(function(){return[...n.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Lt=h(function(){return n.records.branches},"getBranches"),Tt=h(function(){return n.records.commits},"getCommits"),K=h(function(){let r=[...n.records.commits.values()];return r.forEach(function(t){u.debug(t.id)}),r.sort((t,a)=>t.seq-a.seq),r},"getCommitsArray"),F={commitType:p,getConfig:A,setDirection:pt,setOptions:xt,getOptions:ft,commit:ut,branch:bt,merge:wt,cherryPick:Bt,checkout:_,prettyPrint:Et,clear:Ct,getBranchesAsObjArray:kt,getBranches:Lt,getCommits:Tt,getCommitsArray:K,getCurrentBranch:h(function(){return n.records.currBranch},"getCurrentBranch"),getDirection:h(function(){return n.records.direction},"getDirection"),getHead:h(function(){return n.records.head},"getHead"),setAccTitle:rt,getAccTitle:dt,getAccDescription:it,setAccDescription:mt,setDiagramTitle:ot,getDiagramTitle:et},Mt=h((r,t)=>{lt(r,t),r.dir&&t.setDirection(r.dir);for(let a of r.statements)vt(a,t)},"populate"),vt=h((r,t)=>{let a={Commit:h(i=>t.commit(Pt(i)),"Commit"),Branch:h(i=>t.branch(Rt(i)),"Branch"),Merge:h(i=>t.merge(At(i)),"Merge"),Checkout:h(i=>t.checkout(Gt(i)),"Checkout"),CherryPicking:h(i=>t.cherryPick(Ot(i)),"CherryPicking")}[r.$type];a?a(r):u.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),Pt=h(r=>({id:r.id,msg:r.message??"",type:r.type===void 0?p.NORMAL:p[r.type],tags:r.tags??void 0}),"parseCommit"),Rt=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),At=h(r=>({branch:r.branch,id:r.id??"",type:r.type===void 0?void 0:p[r.type],tags:r.tags??void 0}),"parseMerge"),Gt=h(r=>r.branch,"parseCheckout"),Ot=h(r=>{var t;return{id:r.id,targetId:"",tags:((t=r.tags)==null?void 0:t.length)===0?void 0:r.tags,parent:r.parent}},"parseCherryPicking"),It={parse:h(async r=>{let t=await $t("gitGraph",r);u.debug(t),Mt(t,F)},"parse")},f=(J=ct())==null?void 0:J.gitGraph,v=10,P=40,L=4,T=2,G=8,E=new Map,C=new Map,H=30,I=new Map,S=[],R=0,g="LR",qt=h(()=>{E.clear(),C.clear(),I.clear(),R=0,S=[],g="LR"},"clear"),Y=h(r=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(a=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=a.trim(),t.appendChild(i)}),t},"drawText"),U=h(r=>{let t,a,i;return g==="BT"?(a=h((e,o)=>e<=o,"comparisonFunc"),i=1/0):(a=h((e,o)=>e>=o,"comparisonFunc"),i=0),r.forEach(e=>{var c,s;let o=g==="TB"||g=="BT"?(c=C.get(e))==null?void 0:c.y:(s=C.get(e))==null?void 0:s.x;o!==void 0&&a(o,i)&&(t=e,i=o)}),t},"findClosestParent"),zt=h(r=>{let t="",a=1/0;return r.forEach(i=>{let e=C.get(i).y;e<=a&&(t=i,a=e)}),t||void 0},"findClosestParentBT"),Ht=h((r,t,a)=>{let i=a,e=a,o=[];r.forEach(c=>{let s=t.get(c);if(!s)throw Error(`Commit not found for key ${c}`);s.parents.length?(i=Dt(s),e=Math.max(i,e)):o.push(s),Nt(s,i)}),i=e,o.forEach(c=>{Wt(c,i,a)}),r.forEach(c=>{let s=t.get(c);if(s!=null&&s.parents.length){let m=zt(s.parents);i=C.get(m).y-P,i<=e&&(e=i);let $=E.get(s.branch).pos,l=i-v;C.set(s.id,{x:$,y:l})}})},"setParallelBTPos"),St=h(r=>{var i;let t=U(r.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${r.id}`);let a=(i=C.get(t))==null?void 0:i.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${r.id}`);return a},"findClosestParentPos"),Dt=h(r=>St(r)+P,"calculateCommitPosition"),Nt=h((r,t)=>{let a=E.get(r.branch);if(!a)throw Error(`Branch not found for commit ${r.id}`);let i=a.pos,e=t+v;return C.set(r.id,{x:i,y:e}),{x:i,y:e}},"setCommitPosition"),Wt=h((r,t,a)=>{let i=E.get(r.branch);if(!i)throw Error(`Branch not found for commit ${r.id}`);let e=t+a,o=i.pos;C.set(r.id,{x:o,y:e})},"setRootPosition"),jt=h((r,t,a,i,e,o)=>{if(o===p.HIGHLIGHT)r.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${e%G} ${i}-outer`),r.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${e%G} ${i}-inner`);else if(o===p.CHERRY_PICK)r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.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 ${t.id} ${i}`),r.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 ${t.id} ${i}`);else{let c=r.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${e%G}`),o===p.MERGE){let s=r.append("circle");s.attr("cx",a.x),s.attr("cy",a.y),s.attr("r",6),s.attr("class",`commit ${i} ${t.id} commit${e%G}`)}o===p.REVERSE&&r.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 ${i} ${t.id} commit${e%G}`)}},"drawCommitBullet"),_t=h((r,t,a,i)=>{var e;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){let o=r.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),s=o.append("text").attr("x",i).attr("y",a.y+25).attr("class","commit-label").text(t.id),m=(e=s.node())==null?void 0:e.getBBox();if(m&&(c.attr("x",a.posWithOffset-m.width/2-T).attr("y",a.y+13.5).attr("width",m.width+2*T).attr("height",m.height+2*T),g==="TB"||g==="BT"?(c.attr("x",a.x-(m.width+4*L+5)).attr("y",a.y-12),s.attr("x",a.x-(m.width+4*L)).attr("y",a.y+m.height-12)):s.attr("x",a.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let $=-7.5-(m.width+10)/25*9.5,l=10+m.width/25*8.5;o.attr("transform","translate("+$+", "+l+") rotate(-45, "+i+", "+a.y+")")}}},"drawCommitLabel"),Kt=h((r,t,a,i)=>{var e;if(t.tags.length>0){let o=0,c=0,s=0,m=[];for(let $ of t.tags.reverse()){let l=r.insert("polygon"),y=r.append("circle"),d=r.append("text").attr("y",a.y-16-o).attr("class","tag-label").text($),x=(e=d.node())==null?void 0:e.getBBox();if(!x)throw Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),d.attr("x",a.posWithOffset-x.width/2),m.push({tag:d,hole:y,rect:l,yOffset:o}),o+=20}for(let{tag:$,hole:l,rect:y,yOffset:d}of m){let x=s/2,b=a.y-19.2-d;if(y.attr("class","tag-label-bkg").attr("points",`
${i-c/2-L/2},${b+T}
${i-c/2-L/2},${b-T}
${a.posWithOffset-c/2-L},${b-x-T}
${a.posWithOffset+c/2+L},${b-x-T}
${a.posWithOffset+c/2+L},${b+x+T}
${a.posWithOffset-c/2-L},${b+x+T}`),l.attr("cy",b).attr("cx",i-c/2+L/2).attr("r",1.5).attr("class","tag-hole"),g==="TB"||g==="BT"){let w=i+d;y.attr("class","tag-label-bkg").attr("points",`
${a.x},${w+2}
${a.x},${w-2}
${a.x+v},${w-x-2}
${a.x+v+c+4},${w-x-2}
${a.x+v+c+4},${w+x+2}
${a.x+v},${w+x+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+i+")"),l.attr("cx",a.x+L/2).attr("cy",w).attr("transform","translate(12,12) rotate(45, "+a.x+","+i+")"),$.attr("x",a.x+5).attr("y",w+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+i+")")}}}},"drawCommitTags"),Ft=h(r=>{switch(r.customType??r.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Yt=h((r,t,a,i)=>{let e={x:0,y:0};if(r.parents.length>0){let o=U(r.parents);if(o){let c=i.get(o)??e;return t==="TB"?c.y+P:t==="BT"?(i.get(r.id)??e).y-P:c.x+P}}else return t==="TB"?H:t==="BT"?(i.get(r.id)??e).y-P:0;return 0},"calculatePosition"),Ut=h((r,t,a)=>{var c,s;let i=g==="BT"&&a?t:t+v,e=g==="TB"||g==="BT"?i:(c=E.get(r.branch))==null?void 0:c.pos,o=g==="TB"||g==="BT"?(s=E.get(r.branch))==null?void 0:s.pos:i;if(o===void 0||e===void 0)throw Error(`Position were undefined for commit ${r.id}`);return{x:o,y:e,posWithOffset:i}},"getCommitPosition"),V=h((r,t,a)=>{if(!f)throw Error("GitGraph config not found");let i=r.append("g").attr("class","commit-bullets"),e=r.append("g").attr("class","commit-labels"),o=g==="TB"||g==="BT"?H:0,c=[...t.keys()],s=(f==null?void 0:f.parallelCommits)??!1,m=h((l,y)=>{var b,w;let d=(b=t.get(l))==null?void 0:b.seq,x=(w=t.get(y))==null?void 0:w.seq;return d!==void 0&&x!==void 0?d-x:0},"sortKeys"),$=c.sort(m);g==="BT"&&(s&&Ht($,t,o),$=$.reverse()),$.forEach(l=>{var x;let y=t.get(l);if(!y)throw Error(`Commit not found for key ${l}`);s&&(o=Yt(y,g,o,C));let d=Ut(y,o,s);if(a){let b=Ft(y),w=y.customType??y.type;jt(i,y,d,b,((x=E.get(y.branch))==null?void 0:x.index)??0,w),_t(e,y,d,o),Kt(e,y,d,o)}g==="TB"||g==="BT"?C.set(y.id,{x:d.x,y:d.posWithOffset}):C.set(y.id,{x:d.posWithOffset,y:d.y}),o=g==="BT"&&s?o+P:o+P+v,o>R&&(R=o)})},"drawCommits"),Vt=h((r,t,a,i,e)=>{let o=(g==="TB"||g==="BT"?a.x<i.x:a.y<i.y)?t.branch:r.branch,c=h(m=>m.branch===o,"isOnBranchToGetCurve"),s=h(m=>m.seq>r.seq&&m.seq<t.seq,"isBetweenCommits");return[...e.values()].some(m=>s(m)&&c(m))},"shouldRerouteArrow"),q=h((r,t,a=0)=>{let i=r+Math.abs(r-t)/2;return a>5?i:S.every(e=>Math.abs(e-i)>=10)?(S.push(i),i):q(r,t-Math.abs(r-t)/5,a+1)},"findLane"),Jt=h((r,t,a,i)=>{var x,b,w,O,W;let e=C.get(t.id),o=C.get(a.id);if(e===void 0||o===void 0)throw Error(`Commit positions not found for commits ${t.id} and ${a.id}`);let c=Vt(t,a,e,o,i),s="",m="",$=0,l=0,y=(x=E.get(a.branch))==null?void 0:x.index;a.type===p.MERGE&&t.id!==a.parents[0]&&(y=(b=E.get(t.branch))==null?void 0:b.index);let d;if(c){s="A 10 10, 0, 0, 0,",m="A 10 10, 0, 0, 1,",$=10,l=10;let M=e.y<o.y?q(e.y,o.y):q(o.y,e.y),B=e.x<o.x?q(e.x,o.x):q(o.x,e.x);g==="TB"?e.x<o.x?d=`M ${e.x} ${e.y} L ${B-$} ${e.y} ${m} ${B} ${e.y+l} L ${B} ${o.y-$} ${s} ${B+l} ${o.y} L ${o.x} ${o.y}`:(y=(w=E.get(t.branch))==null?void 0:w.index,d=`M ${e.x} ${e.y} L ${B+$} ${e.y} ${s} ${B} ${e.y+l} L ${B} ${o.y-$} ${m} ${B-l} ${o.y} L ${o.x} ${o.y}`):g==="BT"?e.x<o.x?d=`M ${e.x} ${e.y} L ${B-$} ${e.y} ${s} ${B} ${e.y-l} L ${B} ${o.y+$} ${m} ${B+l} ${o.y} L ${o.x} ${o.y}`:(y=(O=E.get(t.branch))==null?void 0:O.index,d=`M ${e.x} ${e.y} L ${B+$} ${e.y} ${m} ${B} ${e.y-l} L ${B} ${o.y+$} ${s} ${B-l} ${o.y} L ${o.x} ${o.y}`):e.y<o.y?d=`M ${e.x} ${e.y} L ${e.x} ${M-$} ${s} ${e.x+l} ${M} L ${o.x-$} ${M} ${m} ${o.x} ${M+l} L ${o.x} ${o.y}`:(y=(W=E.get(t.branch))==null?void 0:W.index,d=`M ${e.x} ${e.y} L ${e.x} ${M+$} ${m} ${e.x+l} ${M} L ${o.x-$} ${M} ${s} ${o.x} ${M-l} L ${o.x} ${o.y}`)}else s="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",$=20,l=20,g==="TB"?(e.x<o.x&&(d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${e.x} ${o.y-$} ${s} ${e.x+l} ${o.y} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${m} ${o.x} ${e.y+l} L ${o.x} ${o.y}`),e.x>o.x&&(s="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",$=20,l=20,d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${e.x} ${o.y-$} ${m} ${e.x-l} ${o.y} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${o.x+$} ${e.y} ${s} ${o.x} ${e.y+l} L ${o.x} ${o.y}`),e.x===o.x&&(d=`M ${e.x} ${e.y} L ${o.x} ${o.y}`)):g==="BT"?(e.x<o.x&&(d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${e.x} ${o.y+$} ${m} ${e.x+l} ${o.y} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${s} ${o.x} ${e.y-l} L ${o.x} ${o.y}`),e.x>o.x&&(s="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",$=20,l=20,d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${e.x} ${o.y+$} ${s} ${e.x-l} ${o.y} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${s} ${o.x} ${e.y-l} L ${o.x} ${o.y}`),e.x===o.x&&(d=`M ${e.x} ${e.y} L ${o.x} ${o.y}`)):(e.y<o.y&&(d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${m} ${o.x} ${e.y+l} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${e.x} ${o.y-$} ${s} ${e.x+l} ${o.y} L ${o.x} ${o.y}`),e.y>o.y&&(d=a.type===p.MERGE&&t.id!==a.parents[0]?`M ${e.x} ${e.y} L ${o.x-$} ${e.y} ${s} ${o.x} ${e.y-l} L ${o.x} ${o.y}`:`M ${e.x} ${e.y} L ${e.x} ${o.y+$} ${m} ${e.x+l} ${o.y} L ${o.x} ${o.y}`),e.y===o.y&&(d=`M ${e.x} ${e.y} L ${o.x} ${o.y}`));if(d===void 0)throw Error("Line definition not found");r.append("path").attr("d",d).attr("class","arrow arrow"+y%G)},"drawArrow"),Qt=h((r,t)=>{let a=r.append("g").attr("class","commit-arrows");[...t.keys()].forEach(i=>{let e=t.get(i);e.parents&&e.parents.length>0&&e.parents.forEach(o=>{Jt(a,t.get(o),e,t)})})},"drawArrows"),Xt=h((r,t)=>{let a=r.append("g");t.forEach((i,e)=>{var x;let o=e%G,c=(x=E.get(i.name))==null?void 0:x.pos;if(c===void 0)throw Error(`Position not found for branch ${i.name}`);let s=a.append("line");s.attr("x1",0),s.attr("y1",c),s.attr("x2",R),s.attr("y2",c),s.attr("class","branch branch"+o),g==="TB"?(s.attr("y1",H),s.attr("x1",c),s.attr("y2",R),s.attr("x2",c)):g==="BT"&&(s.attr("y1",R),s.attr("x1",c),s.attr("y2",H),s.attr("x2",c)),S.push(c);let m=i.name,$=Y(m),l=a.insert("rect"),y=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+o);y.node().appendChild($);let d=$.getBBox();l.attr("class","branchLabelBkg label"+o).attr("rx",4).attr("ry",4).attr("x",-d.width-4-((f==null?void 0:f.rotateCommitLabel)===!0?30:0)).attr("y",-d.height/2+8).attr("width",d.width+18).attr("height",d.height+4),y.attr("transform","translate("+(-d.width-14-((f==null?void 0:f.rotateCommitLabel)===!0?30:0))+", "+(c-d.height/2-1)+")"),g==="TB"?(l.attr("x",c-d.width/2-10).attr("y",0),y.attr("transform","translate("+(c-d.width/2-5)+", 0)")):g==="BT"?(l.attr("x",c-d.width/2-10).attr("y",R),y.attr("transform","translate("+(c-d.width/2-5)+", "+R+")")):l.attr("transform","translate(-19, "+(c-d.height/2)+")")})},"drawBranches"),Zt=h(function(r,t,a,i,e){return E.set(r,{pos:t,index:a}),t+=50+(e?40:0)+(g==="TB"||g==="BT"?i.width/2:0),t},"setBranchPosition"),tr={parser:It,db:F,renderer:{draw:h(function(r,t,a,i){if(qt(),u.debug("in gitgraph renderer",r+`
`,"id:",t,a),!f)throw Error("GitGraph config not found");let e=f.rotateCommitLabel??!1,o=i.db;I=o.getCommits();let c=o.getBranchesAsObjArray();g=o.getDirection();let s=Q(`[id="${t}"]`),m=0;c.forEach(($,l)=>{var O;let y=Y($.name),d=s.append("g"),x=d.insert("g").attr("class","branchLabel"),b=x.insert("g").attr("class","label branch-label");(O=b.node())==null||O.appendChild(y);let w=y.getBBox();m=Zt($.name,m,l,w,e),b.remove(),x.remove(),d.remove()}),V(s,I,!1),f.showBranches&&Xt(s,c),Qt(s,I),V(s,I,!0),X.insertTitle(s,"gitTitleText",f.titleTopMargin??0,o.getDiagramTitle()),at(void 0,s,f.diagramPadding,f.useMaxWidth)},"draw")},styles:h(r=>`
.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(t=>`
.branch-label${t} { fill: ${r["gitBranchLabel"+t]}; }
.commit${t} { stroke: ${r["git"+t]}; fill: ${r["git"+t]}; }
.commit-highlight${t} { stroke: ${r["gitInv"+t]}; fill: ${r["gitInv"+t]}; }
.label${t} { fill: ${r["git"+t]}; }
.arrow${t} { stroke: ${r["git"+t]}; }
`).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${r.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
.commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
.tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
.tag-hole { fill: ${r.textColor}; }
.commit-merge {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
}
.commit-reverse {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
.gitTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${r.textColor};
}
`,"getStyles")};export{tr as diagram};

Sorry, the diff of this file is too big to display

import{i as r}from"./useEvent-DO6uJBas.js";import{l as o}from"./switch-8sn_4qbh.js";const m=()=>r.get(o),n=()=>{let e=document.querySelector("marimo-code");if(!e)return;let t=e.innerHTML;return decodeURIComponent(t).trim()};export{m as n,n as t};
function c(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var b=c("abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws trait transient try void volatile while"),g=c("catch class def do else enum finally for if interface switch trait try while"),w=c("return break continue"),z=c("null true false this"),i;function m(e,t){var n=e.next();if(n=='"'||n=="'")return h(n,e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return i=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),e.eat(/eE/)&&(e.eat(/\+\-/),e.eatWhile(/\d/)),"number";if(n=="/"){if(e.eat("*"))return t.tokenize.push(y),y(e,t);if(e.eat("/"))return e.skipToEnd(),"comment";if(k(t.lastToken,!1))return h(n,e,t)}if(n=="-"&&e.eat(">"))return i="->",null;if(/[+\-*&%=<>!?|\/~]/.test(n))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),n=="@")return e.eatWhile(/[\w\$_\.]/),"meta";if(t.lastToken==".")return"property";if(e.eat(":"))return i="proplabel","property";var r=e.current();return z.propertyIsEnumerable(r)?"atom":b.propertyIsEnumerable(r)?(g.propertyIsEnumerable(r)?i="newstatement":w.propertyIsEnumerable(r)&&(i="standalone"),"keyword"):"variable"}m.isBase=!0;function h(e,t,n){var r=!1;if(e!="/"&&t.eat(e))if(t.eat(e))r=!0;else return"string";function a(o,p){for(var l=!1,u,d=!r;(u=o.next())!=null;){if(u==e&&!l){if(!r)break;if(o.match(e+e)){d=!0;break}}if(e=='"'&&u=="$"&&!l){if(o.eat("{"))return p.tokenize.push(x()),"string";if(o.match(/^\w/,!1))return p.tokenize.push(T),"string"}l=!l&&u=="\\"}return d&&p.tokenize.pop(),"string"}return n.tokenize.push(a),a(t,n)}function x(){var e=1;function t(n,r){if(n.peek()=="}"){if(e--,e==0)return r.tokenize.pop(),r.tokenize[r.tokenize.length-1](n,r)}else n.peek()=="{"&&e++;return m(n,r)}return t.isBase=!0,t}function T(e,t){var n=e.match(/^(\.|[\w\$_]+)/);return(!n||!e.match(n[0]=="."?/^[\w$_]/:/^\./))&&t.tokenize.pop(),n?n[0]=="."?null:"variable":t.tokenize[t.tokenize.length-1](e,t)}function y(e,t){for(var n=!1,r;r=e.next();){if(r=="/"&&n){t.tokenize.pop();break}n=r=="*"}return"comment"}function k(e,t){return!e||e=="operator"||e=="->"||/[\.\[\{\(,;:]/.test(e)||e=="newstatement"||e=="keyword"||e=="proplabel"||e=="standalone"&&!t}function v(e,t,n,r,a){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=a}function f(e,t,n){return e.context=new v(e.indented,t,n,null,e.context)}function s(e){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const E={name:"groovy",startState:function(e){return{tokenize:[m],context:new v(-e,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(n.align??(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,n.type=="statement"&&!k(t.lastToken,!0)&&(s(t),n=t.context)),e.eatSpace())return null;i=null;var r=t.tokenize[t.tokenize.length-1](e,t);if(r=="comment")return r;if(n.align??(n.align=!0),(i==";"||i==":")&&n.type=="statement")s(t);else if(i=="->"&&n.type=="statement"&&n.prev.type=="}")s(t),t.context.align=!1;else if(i=="{")f(t,e.column(),"}");else if(i=="[")f(t,e.column(),"]");else if(i=="(")f(t,e.column(),")");else if(i=="}"){for(;n.type=="statement";)n=s(t);for(n.type=="}"&&(n=s(t));n.type=="statement";)n=s(t)}else i==n.type?s(t):(n.type=="}"||n.type=="top"||n.type=="statement"&&i=="newstatement")&&f(t,e.column(),"statement");return t.startOfLine=!1,t.lastToken=i||r,r},indent:function(e,t,n){if(!e.tokenize[e.tokenize.length-1].isBase)return null;var r=t&&t.charAt(0),a=e.context;a.type=="statement"&&!k(e.lastToken,!0)&&(a=a.prev);var o=r==a.type;return a.type=="statement"?a.indented+(r=="{"?0:n.unit):a.align?a.column+(o?0:1):a.indented+(o?0:n.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}};export{E as t};
import{t as o}from"./groovy-Drg0Cp0-.js";export{o as groovy};
function o(e,r,t){return r(t),t(e,r)}var p=/[a-z_]/,g=/[A-Z]/,l=/\d/,v=/[0-9A-Fa-f]/,F=/[0-7]/,u=/[a-z_A-Z0-9'\xa1-\uffff]/,s=/[-!#$%&*+.\/<=>?@\\^|~:]/,w=/[(),;[\]`{}]/,c=/[ \t\v\f]/;function i(e,r){if(e.eatWhile(c))return null;var t=e.next();if(w.test(t)){if(t=="{"&&e.eat("-")){var n="comment";return e.eat("#")&&(n="meta"),o(e,r,d(n,1))}return null}if(t=="'")return e.eat("\\"),e.next(),e.eat("'")?"string":"error";if(t=='"')return o(e,r,m);if(g.test(t))return e.eatWhile(u),e.eat(".")?"qualifier":"type";if(p.test(t))return e.eatWhile(u),"variable";if(l.test(t)){if(t=="0"){if(e.eat(/[xX]/))return e.eatWhile(v),"integer";if(e.eat(/[oO]/))return e.eatWhile(F),"number"}e.eatWhile(l);var n="number";return e.match(/^\.\d+/)&&(n="number"),e.eat(/[eE]/)&&(n="number",e.eat(/[-+]/),e.eatWhile(l)),n}return t=="."&&e.eat(".")?"keyword":s.test(t)?t=="-"&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(s))?(e.skipToEnd(),"comment"):(e.eatWhile(s),"variable"):"error"}function d(e,r){return r==0?i:function(t,n){for(var a=r;!t.eol();){var f=t.next();if(f=="{"&&t.eat("-"))++a;else if(f=="-"&&t.eat("}")&&(--a,a==0))return n(i),e}return n(d(e,a)),e}}function m(e,r){for(;!e.eol();){var t=e.next();if(t=='"')return r(i),"string";if(t=="\\"){if(e.eol()||e.eat(c))return r(x),"string";e.eat("&")||e.next()}}return r(i),"error"}function x(e,r){return e.eat("\\")?o(e,r,m):(e.next(),r(i),"error")}var h=(function(){var e={};function r(t){return function(){for(var n=0;n<arguments.length;n++)e[arguments[n]]=t}}return r("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_"),r("keyword")("..",":","::","=","\\","<-","->","@","~","=>"),r("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),r("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),r("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3"),e})();const b={name:"haskell",startState:function(){return{f:i}},copyState:function(e){return{f:e.f}},token:function(e,r){var t=r.f(e,function(a){r.f=a}),n=e.current();return h.hasOwnProperty(n)?h[n]:t},languageData:{commentTokens:{line:"--",block:{open:"{-",close:"-}"}}}};export{b as t};
import{t as a}from"./haskell-D96A8Bg_.js";export{a as haskell};
function l(t){return{type:t,style:"keyword"}}var _=l("keyword a"),z=l("keyword b"),k=l("keyword c"),M=l("operator"),T={type:"atom",style:"atom"},g={type:"attribute",style:"attribute"},f=l("typedef"),I={if:_,while:_,else:z,do:z,try:z,return:k,break:k,continue:k,new:k,throw:k,var:l("var"),inline:g,static:g,using:l("import"),public:g,private:g,cast:l("cast"),import:l("import"),macro:l("macro"),function:l("function"),catch:l("catch"),untyped:l("untyped"),callback:l("cb"),for:l("for"),switch:l("switch"),case:l("case"),default:l("default"),in:M,never:l("property_access"),trace:l("trace"),class:f,abstract:f,enum:f,interface:f,typedef:f,extends:f,implements:f,dynamic:f,true:T,false:T,null:T},E=/[+\-*&%=<>!?|]/;function N(t,n,r){return n.tokenize=r,r(t,n)}function $(t,n){for(var r=!1,a;(a=t.next())!=null;){if(a==n&&!r)return!0;r=!r&&a=="\\"}}var f,B;function d(t,n,r){return f=t,B=r,n}function w(t,n){var r=t.next();if(r=='"'||r=="'")return N(t,n,Q(r));if(/[\[\]{}\(\),;\:\.]/.test(r))return d(r);if(r=="0"&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),d("number","number");if(/\d/.test(r)||r=="-"&&t.eat(/\d/))return t.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/),d("number","number");if(n.reAllowed&&r=="~"&&t.eat(/\//))return $(t,"/"),t.eatWhile(/[gimsu]/),d("regexp","string.special");if(r=="/")return t.eat("*")?N(t,n,R):t.eat("/")?(t.skipToEnd(),d("comment","comment")):(t.eatWhile(E),d("operator",null,t.current()));if(r=="#")return t.skipToEnd(),d("conditional","meta");if(r=="@")return t.eat(/:/),t.eatWhile(/[\w_]/),d("metadata","meta");if(E.test(r))return t.eatWhile(E),d("operator",null,t.current());var a;if(/[A-Z]/.test(r))return t.eatWhile(/[\w_<>]/),a=t.current(),d("type","type",a);t.eatWhile(/[\w_]/);var a=t.current(),i=I.propertyIsEnumerable(a)&&I[a];return i&&n.kwAllowed?d(i.type,i.style,a):d("variable","variable",a)}function Q(t){return function(n,r){return $(n,t)&&(r.tokenize=w),d("string","string")}}function R(t,n){for(var r=!1,a;a=t.next();){if(a=="/"&&r){n.tokenize=w;break}r=a=="*"}return d("comment","comment")}var F={atom:!0,number:!0,variable:!0,string:!0,regexp:!0};function j(t,n,r,a,i,s){this.indented=t,this.column=n,this.type=r,this.prev=i,this.info=s,a!=null&&(this.align=a)}function U(t,n){for(var r=t.localVars;r;r=r.next)if(r.name==n)return!0}function X(t,n,r,a,i){var s=t.cc;for(o.state=t,o.stream=i,o.marked=null,o.cc=s,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((s.length?s.pop():y)(r,a)){for(;s.length&&s[s.length-1].lex;)s.pop()();return o.marked?o.marked:r=="variable"&&U(t,a)?"variableName.local":r=="variable"&&Y(t,a)?"variableName.special":n}}function Y(t,n){if(/[a-z]/.test(n.charAt(0)))return!1;for(var r=t.importedtypes.length,a=0;a<r;a++)if(t.importedtypes[a]==n)return!0}function q(t){for(var n=o.state,r=n.importedtypes;r;r=r.next)if(r.name==t)return;n.importedtypes={name:t,next:n.importedtypes}}var o={state:null,column:null,marked:null,cc:null};function v(){for(var t=arguments.length-1;t>=0;t--)o.cc.push(arguments[t])}function e(){return v.apply(null,arguments),!0}function C(t,n){for(var r=n;r;r=r.next)if(r.name==t)return!0;return!1}function A(t){var n=o.state;if(n.context){if(o.marked="def",C(t,n.localVars))return;n.localVars={name:t,next:n.localVars}}else if(n.globalVars){if(C(t,n.globalVars))return;n.globalVars={name:t,next:n.globalVars}}}var tt={name:"this",next:null};function D(){o.state.context||(o.state.localVars=tt),o.state.context={prev:o.state.context,vars:o.state.localVars}}function V(){o.state.localVars=o.state.context.vars,o.state.context=o.state.context.prev}V.lex=!0;function c(t,n){var r=function(){var a=o.state;a.lexical=new j(a.indented,o.stream.column(),t,null,a.lexical,n)};return r.lex=!0,r}function u(){var t=o.state;t.lexical.prev&&(t.lexical.type==")"&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}u.lex=!0;function p(t){function n(r){return r==t?e():t==";"?v():e(n)}return n}function y(t){return t=="@"?e(H):t=="var"?e(c("vardef"),P,p(";"),u):t=="keyword a"?e(c("form"),m,y,u):t=="keyword b"?e(c("form"),y,u):t=="{"?e(c("}"),D,Z,u,V):t==";"?e():t=="attribute"?e(G):t=="function"?e(x):t=="for"?e(c("form"),p("("),c(")"),ot,p(")"),u,y,u):t=="variable"?e(c("stat"),et):t=="switch"?e(c("form"),m,c("}","switch"),p("{"),Z,u,u):t=="case"?e(m,p(":")):t=="default"?e(p(":")):t=="catch"?e(c("form"),D,p("("),L,p(")"),y,u,V):t=="import"?e(J,p(";")):t=="typedef"?e(rt):v(c("stat"),m,p(";"),u)}function m(t){return F.hasOwnProperty(t)||t=="type"?e(b):t=="function"?e(x):t=="keyword c"?e(O):t=="("?e(c(")"),O,p(")"),u,b):t=="operator"?e(m):t=="["?e(c("]"),h(O,"]"),u,b):t=="{"?e(c("}"),h(it,"}"),u,b):e()}function O(t){return t.match(/[;\}\)\],]/)?v():v(m)}function b(t,n){if(t=="operator"&&/\+\+|--/.test(n))return e(b);if(t=="operator"||t==":")return e(m);if(t!=";"){if(t=="(")return e(c(")"),h(m,")"),u,b);if(t==".")return e(at,b);if(t=="[")return e(c("]"),m,p("]"),u,b)}}function G(t){if(t=="attribute")return e(G);if(t=="function")return e(x);if(t=="var")return e(P)}function H(t){if(t==":"||t=="variable")return e(H);if(t=="(")return e(c(")"),h(nt,")"),u,y)}function nt(t){if(t=="variable")return e()}function J(t,n){if(t=="variable"&&/[A-Z]/.test(n.charAt(0)))return q(n),e();if(t=="variable"||t=="property"||t=="."||n=="*")return e(J)}function rt(t,n){if(t=="variable"&&/[A-Z]/.test(n.charAt(0)))return q(n),e();if(t=="type"&&/[A-Z]/.test(n.charAt(0)))return e()}function et(t){return t==":"?e(u,y):v(b,p(";"),u)}function at(t){if(t=="variable")return o.marked="property",e()}function it(t){if(t=="variable"&&(o.marked="property"),F.hasOwnProperty(t))return e(p(":"),m)}function h(t,n){function r(a){return a==","?e(t,r):a==n?e():e(p(n))}return function(a){return a==n?e():v(t,r)}}function Z(t){return t=="}"?e():v(y,Z)}function P(t,n){return t=="variable"?(A(n),e(S,K)):e()}function K(t,n){if(n=="=")return e(m,K);if(t==",")return e(P)}function ot(t,n){return t=="variable"?(A(n),e(ut,m)):v()}function ut(t,n){if(n=="in")return e()}function x(t,n){if(t=="variable"||t=="type")return A(n),e(x);if(n=="new")return e(x);if(t=="(")return e(c(")"),D,h(L,")"),u,S,y,V)}function S(t){if(t==":")return e(lt)}function lt(t){if(t=="type"||t=="variable")return e();if(t=="{")return e(c("}"),h(ct,"}"),u)}function ct(t){if(t=="variable")return e(S)}function L(t,n){if(t=="variable")return A(n),e(S)}const ft={name:"haxe",startState:function(t){return{tokenize:w,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new j(-t,0,"block",!1),importedtypes:["Int","Float","String","Void","Std","Bool","Dynamic","Array"],context:null,indented:0}},token:function(t,n){if(t.sol()&&(n.lexical.hasOwnProperty("align")||(n.lexical.align=!1),n.indented=t.indentation()),t.eatSpace())return null;var r=n.tokenize(t,n);return f=="comment"?r:(n.reAllowed=!!(f=="operator"||f=="keyword c"||f.match(/^[\[{}\(,;:]$/)),n.kwAllowed=f!=".",X(n,r,f,B,t))},indent:function(t,n,r){if(t.tokenize!=w)return 0;var a=n&&n.charAt(0),i=t.lexical;i.type=="stat"&&a=="}"&&(i=i.prev);var s=i.type,W=a==s;return s=="vardef"?i.indented+4:s=="form"&&a=="{"?i.indented:s=="stat"||s=="form"?i.indented+r.unit:i.info=="switch"&&!W?i.indented+(/^(?:case|default)\b/.test(n)?r.unit:2*r.unit):i.align?i.column+(W?0:1):i.indented+(W?0:r.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}},st={name:"hxml",startState:function(){return{define:!1,inString:!1}},token:function(t,n){var i=t.peek(),r=t.sol();if(i=="#")return t.skipToEnd(),"comment";if(r&&i=="-"){var a="variable-2";return t.eat(/-/),t.peek()=="-"&&(t.eat(/-/),a="keyword a"),t.peek()=="D"&&(t.eat(/[D]/),a="keyword c",n.define=!0),t.eatWhile(/[A-Z]/i),a}var i=t.peek();return n.inString==0&&i=="'"&&(n.inString=!0,t.next()),n.inString==1?(t.skipTo("'")||t.skipToEnd(),t.peek()=="'"&&(t.next(),n.inString=!1),"string"):(t.next(),null)},languageData:{commentTokens:{line:"#"}}};export{st as n,ft as t};
import{n as a,t as e}from"./haxe-B_4sGLdj.js";export{e as haxe,a as hxml};
import{s as X}from"./chunk-LvLJmgfZ.js";import{d as xe,l as ee}from"./useEvent-DO6uJBas.js";import{t as ge}from"./react-BGmjiNul.js";import{$n as ye,Gn as je,St as be,Un as te,Zr as re,_n as ae,er as ve,pi as ke,qn as we,zt as se}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as oe}from"./compiler-runtime-DeeZ7FnK.js";import{a as Ne,f as _e}from"./hotkeys-BHHWjLlp.js";import{n as R}from"./constants-B6Cb__3x.js";import{c as Se,f as ze,m as ie,s as Ce}from"./config-CIrPQIbt.js";import{t as Me}from"./ErrorBoundary-ChCiwl15.js";import{t as Ie}from"./jsx-runtime-ZmTK25f3.js";import{t as H}from"./button-YC1gW_kJ.js";import{t as De}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{r as V}from"./requests-BsVD4CdD.js";import{t as W}from"./createLucideIcon-CnW3RofX.js";import{t as Pe}from"./chart-no-axes-column-W42b2ZIs.js";import{_ as Oe}from"./select-V5IdpNiR.js";import{t as Te}from"./chevron-right-DwagBitu.js";import{f as E,p as Ae,r as Re,t as le}from"./maps-t9yNKYA8.js";import{t as We}from"./circle-play-BuOtSgid.js";import{a as Fe,p as $e,r as Le,t as Ue}from"./dropdown-menu-B-6unW-7.js";import{r as He,t as Ve}from"./types-DuQOSW7G.js";import{t as qe}from"./file-Cs1JbsV6.js";import{i as Ye,n as Be,r as Ee,t as Ge}from"./youtube-8p26v8EM.js";import{t as Je}from"./link-BsTPF7B0.js";import{t as G}from"./spinner-DaIKav-i.js";import{n as Qe,r as Ze,t as Ke}from"./app-config-button-d7RvqO40.js";import{t as Xe}from"./refresh-ccw-DLEiQDS3.js";import{lt as et,r as tt}from"./input-pAun1m1X.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{t as rt}from"./use-toast-rmUWldD_.js";import"./Combination-CMPwuAmi.js";import{t as at}from"./tooltip-CEc2ajau.js";import{i as st}from"./dates-Dhn1r-h6.js";import{o as ot}from"./alert-dialog-DwQffb13.js";import{t as it}from"./context-JwD-oSsl.js";import"./popover-Gz-GJzym.js";import{n as lt}from"./ImperativeModal-CUbWEBci.js";import{r as nt}from"./errors-2SszdW9t.js";import{t as ct}from"./tree-B1vM35Zj.js";import{t as ne}from"./error-banner-DUzsIXtq.js";import{n as J,t as mt}from"./useAsyncData-C4XRy1BE.js";import{t as dt}from"./label-Be1daUcS.js";import{t as Q}from"./icons-BhEXrzsb.js";import{t as ht}from"./links-C-GGaW8R.js";import"./Inputs-D2Xn4HON.js";import{t as pt}from"./useInterval-Cu9ChZf-.js";var ft=W("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),ut=W("book-text",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]]),xt=W("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]),gt=W("orbit",[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]]),yt=W("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]),T=X(ge(),1),Z=oe(),a=X(Ie(),1),jt={intro:["Introduction",ft,"Get started with marimo basics"],dataflow:["Dataflow",ve,"Learn how cells interact with each other"],ui:["UI Elements",yt,"Create interactive UI components"],markdown:["Markdown",te,"Format text with parameterized markdown"],plots:["Plots",Pe,"Create interactive visualizations"],sql:["SQL",je,"Query databases directly in marimo"],layout:["Layout",Ee,"Customize the layout of your cells' output"],fileformat:["File format",qe,"Understand marimo's pure-Python file format"],"for-jupyter-users":["For Jupyter users",gt,"Transiting from Jupyter to marimo"],"markdown-format":["Markdown format",Q,"Using marimo to edit markdown files"]};const bt=()=>{let e=(0,Z.c)(6),{openTutorial:t}=V(),r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(xt,{className:"w-4 h-4 mr-2"}),e[0]=r):r=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsx)($e,{asChild:!0,children:(0,a.jsxs)(H,{"data-testid":"open-tutorial-button",size:"xs",variant:"outline",children:[r,"Tutorials",(0,a.jsx)(Re,{className:"w-3 h-3 ml-1"})]})}),e[1]=o):o=e[1];let s;e[2]===t?s=e[3]:(s=Ne.entries(jt).map(i=>{let[m,d]=i,[c,h,p]=d;return(0,a.jsxs)(Fe,{onSelect:async()=>{let n=await t({tutorialId:m});n&&ht(n.path)},children:[(0,a.jsx)(h,{strokeWidth:1.5,className:"w-4 h-4 mr-3 self-start mt-1.5 text-muted-foreground"}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{children:c}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground pr-1",children:p})]})})]},m)}),e[2]=t,e[3]=s);let l;return e[4]===s?l=e[5]:(l=(0,a.jsxs)(Ue,{children:[o,(0,a.jsx)(Le,{side:"bottom",align:"end",className:"print:hidden",children:s})]}),e[4]=s,e[5]=l),l};var vt=[{title:"Documentation",description:"Official marimo documentation and API reference",icon:ye,url:R.docsPage},{title:"GitHub",description:"View source code, report issues, or contribute",icon:Ye,url:R.githubPage},{title:"Community",description:"Join the marimo Discord community",icon:Be,url:R.discordLink},{title:"YouTube",description:"Watch tutorials and demos",icon:Ge,url:R.youtube},{title:"Changelog",description:"See what's new in marimo",icon:te,url:R.releasesPage}];const kt=()=>{let e=(0,Z.c)(2),t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)(q,{Icon:Je,children:"Resources"}),e[0]=t):t=e[0];let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[t,(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:vt.map(wt)})]}),e[1]=r):r=e[1],r},q=e=>{let t=(0,Z.c)(8),{Icon:r,control:o,children:s}=e,l;t[0]===r?l=t[1]:(l=(0,a.jsx)(r,{className:"h-5 w-5"}),t[0]=r,t[1]=l);let i;t[2]!==s||t[3]!==l?(i=(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-xl font-semibold text-muted-foreground select-none",children:[l,s]}),t[2]=s,t[3]=l,t[4]=i):i=t[4];let m;return t[5]!==o||t[6]!==i?(m=(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[i,o]}),t[5]=o,t[6]=i,t[7]=m):m=t[7],m};function wt(e){return(0,a.jsxs)("a",{href:e.url,target:"_blank",className:"flex items-start gap-3 py-3 px-3 rounded-lg border hover:bg-accent/20 transition-colors shadow-xs",children:[(0,a.jsx)(e.icon,{className:"w-5 h-5 mt-1.5 text-primary"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-medium",children:e.title}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:e.description})]})]},e.title)}const ce=T.createContext({runningNotebooks:new Map,setRunningNotebooks:_e.NOOP}),me=T.createContext(""),Nt=re("marimo:home:include-markdown",!1,ae,{getOnInit:!0}),de=re("marimo:home:expanded-folders",{},ae,{getOnInit:!0});var P=oe();function he(e){return`${Ce()}-${encodeURIComponent(e)}`}var _t=()=>{let e=(0,P.c)(56),[t,r]=(0,T.useState)(0),{getRecentFiles:o,getRunningNotebooks:s}=V(),l;e[0]===o?l=e[1]:(l=()=>o(),e[0]=o,e[1]=l);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[2]=i):i=e[2];let m=J(l,i),d,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{r(Tt)},c={delayMs:1e4,whenVisible:!0},e[3]=d,e[4]=c):(d=e[3],c=e[4]),pt(d,c);let h;e[5]===s?h=e[6]:(h=async()=>{let A=await s();return le.keyBy(A.files,At)},e[5]=s,e[6]=h);let p;e[7]===t?p=e[8]:(p=[t],e[7]=t,e[8]=p);let n=J(h,p),f,x,u,g,k,y,b,v,w,N,_,z,S;if(e[9]!==m||e[10]!==n){w=Symbol.for("react.early_return_sentinel");e:{let A=mt(m,n);if(A.error)throw A.error;let K=A.data;if(!K){let U;e[24]===Symbol.for("react.memo_cache_sentinel")?(U=(0,a.jsx)(G,{centered:!0,size:"xlarge"}),e[24]=U):U=e[24],w=U;break e}let[ue,Y]=K;g=ue,u=T.Suspense,x=ce,b={runningNotebooks:Y,setRunningNotebooks:n.setData};let $,L;e[25]===Symbol.for("react.memo_cache_sentinel")?($=(0,a.jsx)(bt,{}),L=(0,a.jsx)(Ke,{showAppConfig:!1}),e[25]=$,e[26]=L):($=e[25],L=e[26]);let B=`This will shutdown the notebook server and terminate all running notebooks (${Y.size}). You'll lose all data that's in memory.`;e[27]===B?v=e[28]:(v=(0,a.jsxs)("div",{className:"absolute top-3 right-5 flex gap-3 z-50",children:[$,L,(0,a.jsx)(Qe,{description:B})]}),e[27]=B,e[28]=v),z="flex flex-col gap-6 max-w-6xl container pt-5 pb-20 z-10",e[29]===Symbol.for("react.memo_cache_sentinel")?(S=(0,a.jsx)("img",{src:"logo.png",alt:"marimo logo",className:"w-48 mb-2"}),k=(0,a.jsx)(Pt,{}),y=(0,a.jsx)(kt,{}),e[29]=k,e[30]=y,e[31]=S):(k=e[29],y=e[30],S=e[31]),f=pe,e[32]===Symbol.for("react.memo_cache_sentinel")?(N=(0,a.jsx)(q,{Icon:We,children:"Running notebooks"}),e[32]=N):N=e[32],_=[...Y.values()]}e[9]=m,e[10]=n,e[11]=f,e[12]=x,e[13]=u,e[14]=g,e[15]=k,e[16]=y,e[17]=b,e[18]=v,e[19]=w,e[20]=N,e[21]=_,e[22]=z,e[23]=S}else f=e[11],x=e[12],u=e[13],g=e[14],k=e[15],y=e[16],b=e[17],v=e[18],w=e[19],N=e[20],_=e[21],z=e[22],S=e[23];if(w!==Symbol.for("react.early_return_sentinel"))return w;let C;e[33]!==f||e[34]!==N||e[35]!==_?(C=(0,a.jsx)(f,{header:N,files:_}),e[33]=f,e[34]=N,e[35]=_,e[36]=C):C=e[36];let I;e[37]===Symbol.for("react.memo_cache_sentinel")?(I=(0,a.jsx)(q,{Icon:we,children:"Recent notebooks"}),e[37]=I):I=e[37];let M;e[38]===g.files?M=e[39]:(M=(0,a.jsx)(pe,{header:I,files:g.files}),e[38]=g.files,e[39]=M);let O;e[40]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(Me,{children:(0,a.jsx)(St,{})}),e[40]=O):O=e[40];let j;e[41]!==k||e[42]!==y||e[43]!==C||e[44]!==M||e[45]!==z||e[46]!==S?(j=(0,a.jsxs)("div",{className:z,children:[S,k,y,C,M,O]}),e[41]=k,e[42]=y,e[43]=C,e[44]=M,e[45]=z,e[46]=S,e[47]=j):j=e[47];let D;e[48]!==x||e[49]!==b||e[50]!==v||e[51]!==j?(D=(0,a.jsxs)(x,{value:b,children:[v,j]}),e[48]=x,e[49]=b,e[50]=v,e[51]=j,e[52]=D):D=e[52];let F;return e[53]!==u||e[54]!==D?(F=(0,a.jsx)(u,{children:D}),e[53]=u,e[54]=D,e[55]=F):F=e[55],F},St=()=>{let e=(0,P.c)(48),{getWorkspaceFiles:t}=V(),[r,o]=ee(Nt),[s,l]=(0,T.useState)(""),i;e[0]!==t||e[1]!==r?(i=()=>t({includeMarkdown:r}),e[0]=t,e[1]=r,e[2]=i):i=e[2];let m;e[3]===r?m=e[4]:(m=[r],e[3]=r,e[4]=m);let{isPending:d,data:c,error:h,isFetching:p,refetch:n}=J(i,m);if(d){let j;return e[5]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(G,{centered:!0,size:"xlarge",className:"mt-6"}),e[5]=j):j=e[5],j}if(h){let j;e[6]===h?j=e[7]:(j=nt(h),e[6]=h,e[7]=j);let D;return e[8]===j?D=e[9]:(D=(0,a.jsx)(ne,{kind:"danger",className:"rounded p-4",children:j}),e[8]=j,e[9]=D),D}let f;e[10]!==c.fileCount||e[11]!==c.hasMore?(f=c.hasMore&&(0,a.jsxs)(ne,{kind:"warn",className:"rounded p-4",children:["Showing first ",c.fileCount," files. Your workspace has more files."]}),e[10]=c.fileCount,e[11]=c.hasMore,e[12]=f):f=e[12];let x,u;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsx)(et,{size:13}),u=j=>l(j.target.value),e[13]=x,e[14]=u):(x=e[13],u=e[14]);let g;e[15]===s?g=e[16]:(g=(0,a.jsx)(tt,{id:"search",value:s,icon:x,onChange:u,placeholder:"Search",className:"mb-0 border-border"}),e[15]=s,e[16]=g);let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsx)(zt,{}),e[17]=k):k=e[17];let y;e[18]===o?y=e[19]:(y=j=>o(!!j),e[18]=o,e[19]=y);let b;e[20]!==r||e[21]!==y?(b=(0,a.jsx)(be,{"data-testid":"include-markdown-checkbox",id:"include-markdown",checked:r,onCheckedChange:y}),e[20]=r,e[21]=y,e[22]=b):b=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(dt,{htmlFor:"include-markdown",children:"Include markdown"}),e[23]=v):v=e[23];let w;e[24]!==g||e[25]!==b?(w=(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[g,k,b,v]}),e[24]=g,e[25]=b,e[26]=w):w=e[26];let N;e[27]===n?N=e[28]:(N=()=>n(),e[27]=n,e[28]=N);let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=(0,a.jsx)(Xe,{className:"w-4 h-4"}),e[29]=_):_=e[29];let z;e[30]===N?z=e[31]:(z=(0,a.jsx)(H,{variant:"text",size:"icon",className:"w-4 h-4 ml-1 p-0 opacity-70 hover:opacity-100",onClick:N,"aria-label":"Refresh workspace",children:_}),e[30]=N,e[31]=z);let S;e[32]===p?S=e[33]:(S=p&&(0,a.jsx)(G,{size:"small"}),e[32]=p,e[33]=S);let C;e[34]!==w||e[35]!==z||e[36]!==S?(C=(0,a.jsxs)(q,{Icon:ut,control:w,children:["Workspace",z,S]}),e[34]=w,e[35]=z,e[36]=S,e[37]=C):C=e[37];let I;e[38]!==s||e[39]!==c.files?(I=(0,a.jsx)("div",{className:"flex flex-col divide-y divide-(--slate-3) border rounded overflow-hidden max-h-192 overflow-y-auto shadow-sm bg-background",children:(0,a.jsx)(Ct,{searchText:s,files:c.files})}),e[38]=s,e[39]=c.files,e[40]=I):I=e[40];let M;e[41]!==C||e[42]!==I||e[43]!==f?(M=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f,C,I]}),e[41]=C,e[42]=I,e[43]=f,e[44]=M):M=e[44];let O;return e[45]!==M||e[46]!==c.root?(O=(0,a.jsx)(me,{value:c.root,children:M}),e[45]=M,e[46]=c.root,e[47]=O):O=e[47],O},zt=()=>{let e=(0,P.c)(5),t=xe(de),r;e[0]===t?r=e[1]:(r=()=>{t({})},e[0]=t,e[1]=r);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsx)(Ae,{className:"w-4 h-4 mr-1"}),e[2]=o):o=e[2];let s;return e[3]===r?s=e[4]:(s=(0,a.jsxs)(H,{variant:"text",size:"sm",className:"h-fit hidden sm:flex",onClick:r,children:[o,"Collapse all"]}),e[3]=r,e[4]=s),s},Ct=e=>{let t=(0,P.c)(12),{files:r,searchText:o}=e,[s,l]=ee(de),i=Object.keys(s).length===0,m=(0,T.useRef)(void 0),d,c;if(t[0]===i?(d=t[1],c=t[2]):(d=()=>{var n;i&&((n=m.current)==null||n.closeAll())},c=[i],t[0]=i,t[1]=d,t[2]=c),(0,T.useEffect)(d,c),r.length===0){let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)("div",{className:"flex flex-col px-5 py-10 items-center justify-center",children:(0,a.jsx)("p",{className:"text-center text-muted-foreground",children:"No files in this workspace"})}),t[3]=n):n=t[3],n}let h;t[4]!==s||t[5]!==l?(h=async n=>{let f=s[n]??!1;l({...s,[n]:!f})},t[4]=s,t[5]=l,t[6]=h):h=t[6];let p;return t[7]!==r||t[8]!==s||t[9]!==o||t[10]!==h?(p=(0,a.jsx)(ct,{ref:m,width:"100%",height:500,searchTerm:o,className:"h-full",idAccessor:Rt,data:r,openByDefault:!1,initialOpenState:s,onToggle:h,padding:5,rowHeight:35,indent:15,overscanCount:1e3,renderCursor:Wt,disableDrop:!0,disableDrag:!0,disableEdit:!0,disableMultiSelection:!0,children:Mt}),t[7]=r,t[8]=s,t[9]=o,t[10]=h,t[11]=p):p=t[11],p},Mt=e=>{let t=(0,P.c)(19),{node:r,style:o}=e,s=Ve[r.data.isDirectory?"directory":He(r.data.name)],l;t[0]===s?l=t[1]:(l=(0,a.jsx)(s,{className:"w-5 h-5 shrink-0",strokeWidth:1.5}),t[0]=s,t[1]=l);let i=l,m=(0,T.use)(me),d;t[2]!==i||t[3]!==r.data.isDirectory||t[4]!==r.data.name||t[5]!==r.data.path||t[6]!==m?(d=()=>{if(r.data.isDirectory)return(0,a.jsxs)("span",{className:"flex items-center pl-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden h-full pr-3 gap-2",children:[i,r.data.name]});let u=r.data.path.startsWith(m)&&se.isAbsolute(r.data.path)?se.rest(r.data.path,m):r.data.path,g=u.endsWith(".md")||u.endsWith(".qmd");return(0,a.jsxs)("a",{className:"flex items-center pl-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden h-full pr-3 gap-2",href:ie(`?file=${u}`).toString(),target:he(u),children:[i,(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",children:[r.data.name,g&&(0,a.jsx)(Q,{className:"ml-2 inline opacity-80"})]}),(0,a.jsx)(fe,{filePath:u}),(0,a.jsx)(E,{size:20,className:"group-hover:opacity-100 opacity-0 text-primary"})]})},t[2]=i,t[3]=r.data.isDirectory,t[4]=r.data.name,t[5]=r.data.path,t[6]=m,t[7]=d):d=t[7];let c=d,h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h=De("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group h-full"),t[8]=h):h=t[8];let p,n;t[9]===r?(p=t[10],n=t[11]):(p=u=>{u.stopPropagation(),r.data.isDirectory&&r.toggle()},n=(0,a.jsx)(It,{node:r}),t[9]=r,t[10]=p,t[11]=n);let f;t[12]===c?f=t[13]:(f=c(),t[12]=c,t[13]=f);let x;return t[14]!==o||t[15]!==p||t[16]!==n||t[17]!==f?(x=(0,a.jsxs)("div",{style:o,className:h,onClick:p,children:[n,f]}),t[14]=o,t[15]=p,t[16]=n,t[17]=f,t[18]=x):x=t[18],x},It=e=>{let t=(0,P.c)(3),{node:r}=e;if(!r.data.isDirectory){let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)("span",{className:"w-5 h-5 shrink-0"}),t[0]=s):s=t[0],s}let o;return t[1]===r.isOpen?o=t[2]:(o=r.isOpen?(0,a.jsx)(Oe,{className:"w-5 h-5 shrink-0"}):(0,a.jsx)(Te,{className:"w-5 h-5 shrink-0"}),t[1]=r.isOpen,t[2]=o),o},pe=e=>{let t=(0,P.c)(7),{header:r,files:o}=e;if(o.length===0)return null;let s;t[0]===o?s=t[1]:(s=o.map(Ft),t[0]=o,t[1]=s);let l;t[2]===s?l=t[3]:(l=(0,a.jsx)("div",{className:"flex flex-col divide-y divide-(--slate-3) border rounded overflow-hidden max-h-192 overflow-y-auto shadow-sm bg-background",children:s}),t[2]=s,t[3]=l);let i;return t[4]!==r||t[5]!==l?(i=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[r,l]}),t[4]=r,t[5]=l,t[6]=i):i=t[6],i},Dt=e=>{let t=(0,P.c)(41),{file:r}=e,{locale:o}=it(),s;t[0]===r.path?s=t[1]:(s=Se(r.path),t[0]=r.path,t[1]=s);let l=s,i,m,d,c;if(t[2]!==r.initializationId||t[3]!==r.path||t[4]!==l){let N=ie(l?`?file=${r.initializationId}&session_id=${r.path}`:`?file=${r.path}`),_;t[9]===r.path?_=t[10]:(_=r.path.endsWith(".md"),t[9]=r.path,t[10]=_),i=_,m="py-1.5 px-4 hover:bg-(--blue-2) hover:text-primary transition-all duration-300 cursor-pointer group relative flex gap-4 items-center",d=r.path,c=N.toString(),t[2]=r.initializationId,t[3]=r.path,t[4]=l,t[5]=i,t[6]=m,t[7]=d,t[8]=c}else i=t[5],m=t[6],d=t[7],c=t[8];let h=r.initializationId||r.path,p;t[11]===h?p=t[12]:(p=he(h),t[11]=h,t[12]=p);let n;t[13]===i?n=t[14]:(n=i&&(0,a.jsx)("span",{className:"opacity-80",children:(0,a.jsx)(Q,{})}),t[13]=i,t[14]=n);let f;t[15]!==r.name||t[16]!==n?(f=(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[r.name,n]}),t[15]=r.name,t[16]=n,t[17]=f):f=t[17];let x;t[18]===r.path?x=t[19]:(x=(0,a.jsx)("p",{title:r.path,className:"text-sm text-muted-foreground overflow-hidden whitespace-nowrap text-ellipsis",children:r.path}),t[18]=r.path,t[19]=x);let u;t[20]!==f||t[21]!==x?(u=(0,a.jsxs)("div",{className:"flex flex-col justify-between flex-1",children:[f,x]}),t[20]=f,t[21]=x,t[22]=u):u=t[22];let g;t[23]===r.path?g=t[24]:(g=(0,a.jsx)("div",{children:(0,a.jsx)(fe,{filePath:r.path})}),t[23]=r.path,t[24]=g);let k;t[25]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsx)(E,{size:20,className:"group-hover:opacity-100 opacity-0 transition-all duration-300 text-primary"}),t[25]=k):k=t[25];let y;t[26]===g?y=t[27]:(y=(0,a.jsxs)("div",{className:"flex gap-3 items-center",children:[g,k]}),t[26]=g,t[27]=y);let b;t[28]!==r.lastModified||t[29]!==o?(b=!!r.lastModified&&(0,a.jsx)("div",{className:"text-xs text-muted-foreground opacity-80",children:st(r.lastModified*1e3,o)}),t[28]=r.lastModified,t[29]=o,t[30]=b):b=t[30];let v;t[31]!==y||t[32]!==b?(v=(0,a.jsxs)("div",{className:"flex flex-col gap-1 items-end",children:[y,b]}),t[31]=y,t[32]=b,t[33]=v):v=t[33];let w;return t[34]!==u||t[35]!==v||t[36]!==m||t[37]!==d||t[38]!==c||t[39]!==p?(w=(0,a.jsxs)("a",{className:m,href:c,target:p,children:[u,v]},d),t[34]=u,t[35]=v,t[36]=m,t[37]=d,t[38]=c,t[39]=p,t[40]=w):w=t[40],w},fe=e=>{let t=(0,P.c)(10),{filePath:r}=e,{openConfirm:o,closeModal:s}=lt(),{shutdownSession:l}=V(),{runningNotebooks:i,setRunningNotebooks:m}=(0,T.use)(ce);if(!i.has(r))return null;let d;t[0]!==s||t[1]!==r||t[2]!==o||t[3]!==i||t[4]!==m||t[5]!==l?(d=p=>{p.stopPropagation(),p.preventDefault(),o({title:"Shutdown",description:"This will terminate the Python kernel. You'll lose all data that's in memory.",variant:"destructive",confirmAction:(0,a.jsx)(ot,{onClick:()=>{let n=i.get(r);ke(n==null?void 0:n.sessionId),l({sessionId:n.sessionId}).then(f=>{m(le.keyBy(f.files,$t))}),s(),rt({description:"Notebook has been shutdown."})},"aria-label":"Confirm Shutdown",children:"Shutdown"})})},t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=m,t[5]=l,t[6]=d):d=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)(Ze,{size:14}),t[7]=c):c=t[7];let h;return t[8]===d?h=t[9]:(h=(0,a.jsx)(at,{content:"Shutdown",children:(0,a.jsx)(H,{size:"icon",variant:"outline",className:"opacity-80 hover:opacity-100 hover:bg-accent text-destructive border-destructive hover:border-destructive hover:text-destructive bg-background hover:bg-(--red-1)",onClick:d,children:c})}),t[8]=d,t[9]=h),h},Pt=()=>{let e=(0,P.c)(3),t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=ze(),e[0]=t):t=e[0];let r=t,o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Create a new notebook"}),e[1]=o):o=e[1];let s;return e[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)("a",{className:`relative rounded-lg p-6 group
text-primary hover:bg-(--blue-2) shadow-md-solid shadow-accent border bg-(--blue-1)
transition-all duration-300 cursor-pointer
`,href:r,target:"_blank",rel:"noreferrer",children:[o,(0,a.jsx)("div",{className:"group-hover:opacity-100 opacity-0 absolute right-5 top-0 bottom-0 rounded-lg flex items-center justify-center transition-all duration-300",children:(0,a.jsx)(E,{size:24})})]}),e[2]=s):s=e[2],s},Ot=_t;function Tt(e){return e+1}function At(e){return e.path}function Rt(e){return e.path}function Wt(){return null}function Ft(e){return(0,a.jsx)(Dt,{file:e},e.path)}function $t(e){return e.path}export{Ot as default};
var O=Object.defineProperty;var V=(t,e,i)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var b=(t,e,i)=>V(t,typeof e!="symbol"?e+"":e,i);import{u as I}from"./useEvent-DO6uJBas.js";import{o as j}from"./cells-BpZ7g6ok.js";import{t as T}from"./compiler-runtime-DeeZ7FnK.js";import{a as k,d as E}from"./hotkeys-BHHWjLlp.js";import{i as N}from"./utils-DXvhzCGS.js";import{A as P,w as _}from"./config-CIrPQIbt.js";import{r as z}from"./requests-BsVD4CdD.js";import{f as D}from"./layout-B1RE_FQ4.js";import{s as $,u as B}from"./download-BhCZMKuQ.js";import{t as H}from"./Deferred-CrO5-0RA.js";import{t as L}from"./use-toast-rmUWldD_.js";import{t as M}from"./useInterval-Cu9ChZf-.js";var R=class{constructor(){b(this,"capturedInputs",new Map);b(this,"inFlight",new Map)}cancelEntry(t){t.controller.abort(),t.deferred.status==="pending"&&t.deferred.resolve(void 0)}needsCapture(t,e){if(this.capturedInputs.get(t)===e)return!1;let i=this.inFlight.get(t);return!(i&&i.inputValue===e)}waitForInFlight(t,e){let i=this.inFlight.get(t);return i&&i.inputValue===e?i.deferred.promise:null}startCapture(t,e){let i=this.inFlight.get(t);i&&this.cancelEntry(i);let n=new AbortController,l=new H,u={controller:n,inputValue:e,deferred:l};return this.inFlight.set(t,u),{signal:n.signal,markCaptured:p=>{this.inFlight.get(t)===u&&(l.resolve(p),this.capturedInputs.set(t,e),this.inFlight.delete(t))},markFailed:()=>{this.inFlight.get(t)===u&&(l.resolve(void 0),this.inFlight.delete(t))}}}prune(t){for(let e of this.capturedInputs.keys())t.has(e)||this.capturedInputs.delete(e);for(let[e,i]of this.inFlight)t.has(e)||(this.cancelEntry(i),this.inFlight.delete(e))}get isCapturing(){return this.inFlight.size>0}abort(){for(let t of this.inFlight.values())this.cancelEntry(t);this.inFlight.clear()}reset(){this.abort(),this.capturedInputs.clear()}},Y=T(),S=5e3;function q(){let t=(0,Y.c)(14),e=I(N),{state:i}=I(_),n=e.auto_download.includes("markdown"),l=e.auto_download.includes("html"),u=e.auto_download.includes("ipynb"),p=i===P.OPEN,m=!n||!p,d=!l||!p,h=!u||!p,{autoExportAsHTML:a,autoExportAsIPYNB:s,autoExportAsMarkdown:r,updateCellOutputs:o}=z(),c=x(),f;t[0]===r?f=t[1]:(f=async()=>{await r({download:!1})},t[0]=r,t[1]=f);let g;t[2]===m?g=t[3]:(g={delayMs:S,whenVisible:!0,disabled:m},t[2]=m,t[3]=g),M(f,g);let w;t[4]===a?w=t[5]:(w=async()=>{await a({download:!1,includeCode:!0,files:D.INSTANCE.filenames()})},t[4]=a,t[5]=w);let v;t[6]===d?v=t[7]:(v={delayMs:S,whenVisible:!0,disabled:d},t[6]=d,t[7]=v),M(w,v);let F;t[8]!==s||t[9]!==c||t[10]!==o?(F=async()=>{await A({takeScreenshots:()=>c({progress:B.indeterminate()}),updateCellOutputs:o}),await s({download:!1})},t[8]=s,t[9]=c,t[10]=o,t[11]=F):F=t[11];let y;t[12]===h?y=t[13]:(y={delayMs:S,whenVisible:!0,disabled:h,skipIfRunning:!0},t[12]=h,t[13]=y),M(F,y)}var G=new Set(["text/html","application/vnd.vegalite.v5+json","application/vnd.vega.v5+json","application/vnd.vegalite.v6+json","application/vnd.vega.v6+json"]);const C=new R;function x(){let t=I(j);return async e=>{var d,h;let{progress:i}=e,n=new Set(k.keys(t));C.prune(n);let l=[],u=[];for(let[a,s]of k.entries(t)){let r=(d=s.output)==null?void 0:d.data;if((h=s.output)!=null&&h.mimetype&&G.has(s.output.mimetype)&&r)if(C.needsCapture(a,r))l.push([a,r]);else{let o=C.waitForInFlight(a,r);o&&u.push({cellId:a,promise:o})}}if(l.length===0&&u.length===0)return{};l.length>0&&i.addTotal(l.length);let p={};for(let[a,s]of l){let r=C.startCapture(a,s);try{let o=await $(a);if(r.signal.aborted)continue;if(!o){E.error(`Failed to capture screenshot for cell ${a}`),r.markFailed();continue}let c=["image/png",o];p[a]=c,r.markCaptured(c)}catch(o){E.error(`Error screenshotting cell ${a}:`,o),r.markFailed()}finally{i.increment(1)}}let m=await Promise.allSettled(u.map(({promise:a})=>a));for(let[a,{cellId:s}]of u.entries()){let r=m[a];r.status==="fulfilled"&&r.value&&(p[s]=r.value)}return p}}async function A(t){let{takeScreenshots:e,updateCellOutputs:i}=t;try{let n=await e();k.size(n)>0&&await i({cellIdsToOutput:n})}catch(n){E.error("Error updating cell outputs with screenshots:",n),L({title:"Failed to capture cell outputs",description:"Some outputs may not appear in the PDF. Continuing with export.",variant:"danger"})}}export{q as n,x as r,A as t};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var e=a("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),t=a("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);export{e as n,t};
import{i as B}from"./useEvent-DO6uJBas.js";import{bn as G,ri as v,y as Q}from"./cells-BpZ7g6ok.js";import{d as $}from"./hotkeys-BHHWjLlp.js";import{t as R}from"./requests-BsVD4CdD.js";function I({moduleName:e,variableName:t,onAddImport:r,appStore:n=B}){if(t in n.get(G))return!1;let{cellData:i,cellIds:o}=n.get(Q),a=RegExp(`import[ ]+${e}[ ]+as[ ]+${t}`,"g");for(let l of o.inOrderIds)if(a.test(i[l].code))return!1;return r(`import ${e} as ${t}`),!0}function X({autoInstantiate:e,createNewCell:t,fromCellId:r,before:n}){let i=R(),o=null;return I({moduleName:"marimo",variableName:"mo",onAddImport:a=>{o=v.create(),t({cellId:r??"__end__",before:n??!1,code:a,lastCodeRun:e?a:void 0,newCellId:o,skipIfCodeExists:!0,autoFocus:!1}),e&&i.sendRun({cellIds:[o],codes:[a]})}})?o:null}function J({autoInstantiate:e,createNewCell:t,fromCellId:r}){let n=R(),i=null;return I({moduleName:"altair",variableName:"alt",onAddImport:o=>{i=v.create(),t({cellId:r??"__end__",before:!1,code:o,lastCodeRun:e?o:void 0,newCellId:i,skipIfCodeExists:!0,autoFocus:!1}),e&&n.sendRun({cellIds:[i],codes:[o]})}})?i:null}function K(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let r=document.implementation.createHTMLDocument(),n=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(i),t&&(n.href=t),i.href=e,i.href}const Y=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function d(e){let t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}var g=null;function k(e={}){return g||(e.includeStyleProperties?(g=e.includeStyleProperties,g):(g=d(window.getComputedStyle(document.documentElement)),g))}function p(e,t){let r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function Z(e){let t=p(e,"border-left-width"),r=p(e,"border-right-width");return e.clientWidth+t+r}function ee(e){let t=p(e,"border-top-width"),r=p(e,"border-bottom-width");return e.clientHeight+t+r}function P(e,t={}){return{width:t.width||Z(e),height:t.height||ee(e)}}function te(){let e,t;try{t=process}catch{}let r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var c=16384;function re(e){(e.width>c||e.height>c)&&(e.width>c&&e.height>c?e.width>e.height?(e.height*=c/e.width,e.width=c):(e.width*=c/e.height,e.height=c):e.width>c?(e.height*=c/e.width,e.width=c):(e.width*=c/e.height,e.height=c))}function w(e){return new Promise((t,r)=>{let n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function ne(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function ie(e,t,r){let n="http://www.w3.org/2000/svg",i=document.createElementNS(n,"svg"),o=document.createElementNS(n,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${t} ${r}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),i.appendChild(o),o.appendChild(e),ne(i)}const u=(e,t)=>{if(e instanceof t)return!0;let r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||u(r,t)};function oe(e){let t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function ae(e,t){return k(t).map(r=>`${r}: ${e.getPropertyValue(r)}${e.getPropertyPriority(r)?" !important":""};`).join(" ")}function le(e,t,r,n){let i=`.${e}:${t}`,o=r.cssText?oe(r):ae(r,n);return document.createTextNode(`${i}{${o}}`)}function N(e,t,r,n){let i=window.getComputedStyle(e,r),o=i.getPropertyValue("content");if(o===""||o==="none")return;let a=Y();try{t.className=`${t.className} ${a}`}catch{return}let l=document.createElement("style");l.appendChild(le(a,r,i,n)),t.appendChild(l)}function se(e,t,r){N(e,t,":before",r),N(e,t,":after",r)}var T="application/font-woff",A="image/jpeg",ce={woff:T,woff2:T,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:A,jpeg:A,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ue(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function x(e){return ce[ue(e).toLowerCase()]||""}function de(e){return e.split(/,/)[1]}function E(e){return e.search(/^(data:)/)!==-1}function L(e,t){return`data:${t};base64,${e}`}async function H(e,t,r){let n=await fetch(e,t);if(n.status===404)throw Error(`Resource "${n.url}" not found`);let i=await n.blob();return new Promise((o,a)=>{let l=new FileReader;l.onerror=a,l.onloadend=()=>{try{o(r({res:n,result:l.result}))}catch(s){a(s)}},l.readAsDataURL(i)})}var S={};function fe(e,t,r){let n=e.replace(/\?.*/,"");return r&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function C(e,t,r){let n=fe(e,t,r.includeQueryParams);if(S[n]!=null)return S[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{i=L(await H(e,r.fetchRequestInit,({res:o,result:a})=>(t||(t=o.headers.get("Content-Type")||""),de(a))),t)}catch(o){i=r.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;o&&(a=typeof o=="string"?o:o.message),a&&console.warn(a)}return S[n]=i,i}async function he(e){let t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):w(t)}async function me(e,t){if(e.currentSrc){let n=document.createElement("canvas"),i=n.getContext("2d");return n.width=e.clientWidth,n.height=e.clientHeight,i==null||i.drawImage(e,0,0,n.width,n.height),w(n.toDataURL())}let r=e.poster;return w(await C(r,x(r),t))}async function ge(e,t){var r;try{if((r=e==null?void 0:e.contentDocument)!=null&&r.body)return await y(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function pe(e,t){return u(e,HTMLCanvasElement)?he(e):u(e,HTMLVideoElement)?me(e,t):u(e,HTMLIFrameElement)?ge(e,t):e.cloneNode(F(e))}var we=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",F=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ye(e,t,r){if(F(t))return t;let n=[];return n=we(e)&&e.assignedNodes?d(e.assignedNodes()):d((e.shadowRoot??e).childNodes),n.length===0||u(e,HTMLVideoElement)||await n.reduce((i,o)=>i.then(()=>y(o,r)).then(a=>{a&&t.appendChild(a)}),Promise.resolve()),t}function be(e,t,r){let n=t.style;if(!n)return;let i=window.getComputedStyle(e);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):k(r).forEach(o=>{let a=i.getPropertyValue(o);o==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),u(e,HTMLIFrameElement)&&o==="display"&&a==="inline"&&(a="block"),o==="d"&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(o,a,i.getPropertyPriority(o))})}function xe(e,t){u(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),u(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ee(e,t){if(u(e,HTMLSelectElement)){let r=t,n=Array.from(r.children).find(i=>e.value===i.getAttribute("value"));n&&n.setAttribute("selected","")}}function Se(e,t,r){return u(t,Element)&&(be(e,t,r),se(e,t,r),xe(e,t),Ee(e,t)),t}async function Ce(e,t){let r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;let n={};for(let o=0;o<r.length;o++){let a=r[o].getAttribute("xlink:href");if(a){let l=e.querySelector(a),s=document.querySelector(a);!l&&s&&!n[a]&&(n[a]=await y(s,t,!0))}}let i=Object.values(n);if(i.length){let o="http://www.w3.org/1999/xhtml",a=document.createElementNS(o,"svg");a.setAttribute("xmlns",o),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";let l=document.createElementNS(o,"defs");a.appendChild(l);for(let s=0;s<i.length;s++)l.appendChild(i[s]);e.appendChild(a)}return e}async function y(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>pe(n,t)).then(n=>ye(e,n,t)).then(n=>Se(e,n,t)).then(n=>Ce(n,t))}var M=/url\((['"]?)([^'"]+?)\1\)/g,ve=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,$e=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Re(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Ie(e){let t=[];return e.replace(M,(r,n,i)=>(t.push(i),r)),t.filter(r=>!E(r))}async function ke(e,t,r,n,i){try{let o=r?K(t,r):t,a=x(t),l;return l=i?L(await i(o),a):await C(o,a,n),e.replace(Re(t),`$1${l}$3`)}catch{}return e}function Pe(e,{preferredFontFormat:t}){return t?e.replace($e,r=>{for(;;){let[n,,i]=ve.exec(r)||[];if(!i)return"";if(i===t)return`src: ${n};`}}):e}function V(e){return e.search(M)!==-1}async function j(e,t,r){if(!V(e))return e;let n=Pe(e,r);return Ie(n).reduce((i,o)=>i.then(a=>ke(a,o,t,r)),Promise.resolve(n))}async function h(e,t,r){var i;let n=(i=t.style)==null?void 0:i.getPropertyValue(e);if(n){let o=await j(n,null,r);return t.style.setProperty(e,o,t.style.getPropertyPriority(e)),!0}return!1}async function Ne(e,t){await h("background",e,t)||await h("background-image",e,t),await h("mask",e,t)||await h("-webkit-mask",e,t)||await h("mask-image",e,t)||await h("-webkit-mask-image",e,t)}async function Te(e,t){let r=u(e,HTMLImageElement);if(!(r&&!E(e.src))&&!(u(e,SVGImageElement)&&!E(e.href.baseVal)))return;let n=r?e.src:e.href.baseVal,i=await C(n,x(n),t);await new Promise((o,a)=>{e.onload=o,e.onerror=t.onImageErrorHandler?(...s)=>{try{o(t.onImageErrorHandler(...s))}catch(f){a(f)}}:a;let l=e;l.decode&&(l.decode=o),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=i):e.href.baseVal=i})}async function Ae(e,t){let r=d(e.childNodes).map(n=>D(n,t));await Promise.all(r).then(()=>e)}async function D(e,t){u(e,Element)&&(await Ne(e,t),await Te(e,t),await Ae(e,t))}function Le(e,t){let{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);let n=t.style;return n!=null&&Object.keys(n).forEach(i=>{r[i]=n[i]}),e}var O={};async function _(e){let t=O[e];return t??(t={url:e,cssText:await(await fetch(e)).text()},O[e]=t,t)}async function z(e,t){let r=e.cssText,n=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let a=o.replace(n,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),H(a,t.fetchRequestInit,({result:l})=>(r=r.replace(o,`url(${l})`),[o,l]))});return Promise.all(i).then(()=>r)}function U(e){if(e==null)return[];let t=[],r=e.replace(/(\/\*[\s\S]*?\*\/)/gi,""),n=RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let a=n.exec(r);if(a===null)break;t.push(a[0])}r=r.replace(n,"");let i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let a=i.exec(r);if(a===null){if(a=o.exec(r),a===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(a[0])}return t}async function He(e,t){let r=[],n=[];return e.forEach(i=>{if("cssRules"in i)try{d(i.cssRules||[]).forEach((o,a)=>{if(o.type===CSSRule.IMPORT_RULE){let l=a+1,s=o.href,f=_(s).then(m=>z(m,t)).then(m=>U(m).forEach(b=>{try{i.insertRule(b,b.startsWith("@import")?l+=1:i.cssRules.length)}catch(W){console.error("Error inserting rule from remote css",{rule:b,error:W})}})).catch(m=>{console.error("Error loading remote css",m.toString())});n.push(f)}})}catch(o){let a=e.find(l=>l.href==null)||document.styleSheets[0];i.href!=null&&n.push(_(i.href).then(l=>z(l,t)).then(l=>U(l).forEach(s=>{a.insertRule(s,a.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",o)}}),Promise.all(n).then(()=>(e.forEach(i=>{if("cssRules"in i)try{d(i.cssRules||[]).forEach(o=>{r.push(o)})}catch(o){console.error(`Error while reading CSS rules from ${i.href}`,o)}}),r))}function Fe(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>V(t.style.getPropertyValue("src")))}async function Me(e,t){if(e.ownerDocument==null)throw Error("Provided element is not within a Document");return Fe(await He(d(e.ownerDocument.styleSheets),t))}function q(e){return e.trim().replace(/["']/g,"")}function Ve(e){let t=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(i=>{t.add(q(i))}),Array.from(n.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function je(e,t){let r=await Me(e,t),n=Ve(e);return(await Promise.all(r.filter(i=>n.has(q(i.style.fontFamily))).map(i=>{let o=i.parentStyleSheet?i.parentStyleSheet.href:null;return j(i.cssText,o,t)}))).join(`
`)}async function De(e,t){let r=t.fontEmbedCSS==null?t.skipFonts?null:await je(e,t):t.fontEmbedCSS,n=t.extraStyleContent==null?r:t.extraStyleContent.concat(r||"");if(n){let i=document.createElement("style"),o=document.createTextNode(n);i.appendChild(o),e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i)}}async function Oe(e,t={}){let{width:r,height:n}=P(e,t),i=await y(e,t,!0);return await De(i,t),await D(i,t),Le(i,t),await ie(i,r,n)}async function _e(e,t={}){let{width:r,height:n}=P(e,t),i=await w(await Oe(e,t)),o=document.createElement("canvas"),a=o.getContext("2d"),l=t.pixelRatio||te(),s=t.canvasWidth||r,f=t.canvasHeight||n;return o.width=s*l,o.height=f*l,t.skipAutoScale||re(o),o.style.width=`${s}`,o.style.height=`${f}`,t.backgroundColor&&(a.fillStyle=t.backgroundColor,a.fillRect(0,0,o.width,o.height)),a.drawImage(i,0,0,o.width,o.height),o}async function ze(e,t={}){return(await _e(e,t)).toDataURL()}const Ue={filter:e=>{try{if("classList"in e){let t=e.classList;if(t.contains("mpl-toolbar")||t.contains("print:hidden"))return!1}return!0}catch(t){return $.error("Error filtering node:",t),!0}},onImageErrorHandler:e=>{$.error("Error loading image:",e)},includeStyleProperties:"width.height.min-width.min-height.max-width.max-height.box-sizing.aspect-ratio.display.position.top.left.bottom.right.z-index.float.clear.flex.flex-direction.flex-wrap.flex-grow.flex-shrink.flex-basis.align-items.align-self.justify-content.gap.order.grid-template-columns.grid-template-rows.grid-column.grid-row.row-gap.column-gap.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.font.font-family.font-size.font-weight.font-style.line-height.letter-spacing.word-spacing.text-align.text-decoration.text-transform.text-indent.text-shadow.white-space.text-wrap.word-break.text-overflow.vertical-align.color.background.background-color.background-image.background-size.background-position.background-repeat.background-clip.border.border-width.border-style.border-color.border-top.border-right.border-bottom.border-left.border-radius.outline.box-shadow.text-shadow.opacity.filter.backdrop-filter.mix-blend-mode.transform.clip-path.overflow.overflow-x.overflow-y.visibility.fill.stroke.stroke-width.object-fit.object-position.list-style.list-style-type.border-collapse.border-spacing.content.cursor".split(".")};async function qe(e,t){return ze(e,{...Ue,...t})}export{J as n,X as r,qe as t};
function c(r,n){return r.skipToEnd(),n.cur=u,"error"}function i(r,n){return r.match(/^HTTP\/\d\.\d/)?(n.cur=a,"keyword"):r.match(/^[A-Z]+/)&&/[ \t]/.test(r.peek())?(n.cur=d,"keyword"):c(r,n)}function a(r,n){var t=r.match(/^\d+/);if(!t)return c(r,n);n.cur=s;var o=Number(t[0]);return o>=100&&o<400?"atom":"error"}function s(r,n){return r.skipToEnd(),n.cur=u,null}function d(r,n){return r.eatWhile(/\S/),n.cur=f,"string.special"}function f(r,n){return r.match(/^HTTP\/\d\.\d$/)?(n.cur=u,"keyword"):c(r,n)}function u(r){return r.sol()&&!r.eat(/[ \t]/)?r.match(/^.*?:/)?"atom":(r.skipToEnd(),"error"):(r.skipToEnd(),"string")}function e(r){return r.skipToEnd(),null}const k={name:"http",token:function(r,n){var t=n.cur;return t!=u&&t!=e&&r.eatSpace()?null:t(r,n)},blankLine:function(r){r.cur=e},startState:function(){return{cur:i}}};export{k as http};
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABtlJREFUWEetV21QlNcVfs67y67KV/EjJIRdBIxJrB9BotFqAtERTIKkk8SxNiGt7Ipa46DsxvjR0rVTKuKKJFYTE1SIxmhFbR0Kwc4YNSraqmNswhSFIrBUBD8QVGTZfU/nvrDLroqQ4Pm179nnnvvc5557zr2EXlj05hSfhgvO10AUB/A4AOHEFMCADOJrBFQx0zki+ajkkA9eyslr6kVYBUIPA8ZaLOr/ttQtYJKXgRHSy6B2EBVKwMZqa+6hnsZ0S2DY8jlD2uxSIYDxPQVx/S+CSZIEpyx3rI5wXIZsslm3neouxoMJMEhvNv6JwcvcwYkw8kk9xoZFYOjgYAT2HwBZlnH99i1UNtbj9KVKVDZcho9KhX4+GtgdDrQ52sVwGYQcbduAFRUbNrTdS+R+AhaLpL9Vu4kZ8wTYV6vFrydNxTsTY/Bk0KCHinHxymVsP/E1vjz1jRvXSQIEOqGxO39esWFbo2cQbwIzZ6r0QwPSWUa6APlp++GgyYLgwCB8dqQEs8a/iEF+/j3uSPW1RqTt2orTVRfBHmgCyjQaObZidRcJLwJPL032b3XSEQaixMqTJr6s7GlDcxNOVpZj13wz9IOG9EhAABxOJ5buyUfB6RNeeCKU+vnpYsssFrvXKYhImzvcQfJXDISH/GQg5kyeiqzifYh5eiSss+ZgoK9fryb2BMnMeG/HZhR+e/peEmtqrFuU/OpQwGKRdC21pSLjJZKwMuEtZBbtw6ujx+LDXxohfD/WWu12JH6UgfL6OncIAtpVKh5VlbW1XCGgMxlnA7xT/H4zeiLO26oVCUtMv1cyuq/2na0aMz7KcB/PzjO6rdaam6wQ0JuNx5h5EhFhybQZyD54AJuS5iNhzPN9nds9fsXeHdhRetgz3m2nv+ox6ig4qnqAped04UqWn6utwr/SrVBLKmWAkPHClS4Jw4c8jsbmmzheUYaA/r6YPjJKUcp24yqOlH8PiQgvDv8pQj2Obf3NG5i8erlSH9wmcTyFmQ2vyQxR8ZASE48vTh7BlGdGYWOSUgYU+76uBtPXW9zfyZOnYnvpYbQ7nYovSh+BJXGvY27en13FB1ofH+Qlp2LyUyPc4xZ/uQX7zohUcxmvJJ05OQ1M64TrMf9ANLTcxOK4RKTFJXZLQKxQZLin9ffRoLVdOVluGxsWib8tWun+/uZCGd7+NNsTkk+hJkMOAanCK2S8225HeuIsGF+a1i2B0KDBGB4cgkP/Oe/GaNRqxI14DkcvlqG59Y7iF/Eurv7EjRGKjU5Pxe22uy7fYdKZjflgfteT1gevvIGFU1/tlsCnv1qIV0ZFY8If30dd0zUFN2PMOGxKWoDMogJsPFSk+IRS1Wu3eKky6+O1KK0sV3xEKBdNZzszv+OJSvpZLDLe6HLdmwP5hsWY8uxoxK5ZoTQiYTOfn4TsXxiw/h8HkF3y124JLCv4HDtPHu2YjtBIOpNhI4DfeBKIDovE/kXLu1WgLwQy/74Xm74udsVuIr3JsJSBNZ4EREs9tyoH/v36K+5HqUBG4R5sPlzSqQDZSG8yTmPwQReBwX7+uHqrBetnG5Sq+KgJpO7Mxf6zJztzgI5TsDnJV8PaRoCV5Y4bOkyp2888EYqChR8owLob15TG5LJ5sdMxIkSHjMK/oKH5puIeHzEcb0+IwVffnUXx+TOuCZAz2+iVhFOyfoeKhsudKUAbOkuxoYAZbwqvODqvR43H7n8ew/73liN6aKRXgL58VDbU4+Ws37pDSISEDgL3bIOQvvjfZ/FsSCj2LlymHKdHYaZdW7Gn835AwBU//2a9KzLpTMYTAE8QE4kJxfWr9vpVrEyYiXmx8X2ev+j8GSzY/gm4s4ISsaXGunWVe2mh5pQXiJ3i+uLV/EVD+vjd+YgfGfWjSYjtFN2w3dnZiAg2lZ9z1CVLXpOXtnqzIZMZHZnnYYLEkvhEpMTEQav26TWR/zVdxx8O7IZYvYexxJRQnZ2rlEsvAuIhUtliKwK4qxF4jBStetqIMYgKi0TEkGA8ERiEwf4BGKDRulFCYtHOd586hr1nSt3d0QUgolU11lx3a70vu8TF9I5MxWBM8qT9eEAQ1CoJthsdtd9LIfEWUPsouWN3OnC3XXkP3G+E7FrrFjPQdVl+YHqHWFIGqG/J+cz8lmcUX41WSU5R/12vn17uRxskMtWuzRVl38sedr5It3TuPJI5k5kDe5yIqAqACoyBAHtcoamE4EyrWbet7MGi9BA5PNUY7FDjfYCTAQT1SKQDcAmMQiLKq1mX65WBP0QBL+ywRYu0dk3rSwx+AUAkCEFg8eLCHWJcYeYaSVKXOyT527qsXFsvieL/FjzLIPLjeMUAAAAASUVORK5CYII=";export{A as t};
import{s}from"./chunk-LvLJmgfZ.js";import{t as n}from"./compiler-runtime-DeeZ7FnK.js";import{t as i}from"./jsx-runtime-ZmTK25f3.js";var l=n(),h=s(i(),1);const m=r=>{let t=(0,l.c)(4),c,e;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,h.jsx)("title",{children:"Python Logo"}),e=(0,h.jsx)("path",{d:"M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"}),t[0]=c,t[1]=e):(c=t[0],e=t[1]);let o;return t[2]===r?o=t[3]:(o=(0,h.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 448 512",...r,children:[c,e]}),t[2]=r,t[3]=o),o},v=r=>{let t=(0,l.c)(4),c,e;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,h.jsx)("title",{children:"Markdown Icon"}),e=(0,h.jsx)("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"}),t[0]=c,t[1]=e):(c=t[0],e=t[1]);let o;return t[2]===r?o=t[3]:(o=(0,h.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 640 512",fill:"currentColor",...r,children:[c,e]}),t[2]=r,t[3]=o),o};export{m as n,v as t};
function t(e){return RegExp("^(("+e.join(")|(")+"))\\b","i")}var r="a_correlate.abs.acos.adapt_hist_equal.alog.alog2.alog10.amoeba.annotate.app_user_dir.app_user_dir_query.arg_present.array_equal.array_indices.arrow.ascii_template.asin.assoc.atan.axis.axis.bandpass_filter.bandreject_filter.barplot.bar_plot.beseli.beselj.beselk.besely.beta.biginteger.bilinear.bin_date.binary_template.bindgen.binomial.bit_ffs.bit_population.blas_axpy.blk_con.boolarr.boolean.boxplot.box_cursor.breakpoint.broyden.bubbleplot.butterworth.bytarr.byte.byteorder.bytscl.c_correlate.calendar.caldat.call_external.call_function.call_method.call_procedure.canny.catch.cd.cdf.ceil.chebyshev.check_math.chisqr_cvf.chisqr_pdf.choldc.cholsol.cindgen.cir_3pnt.clipboard.close.clust_wts.cluster.cluster_tree.cmyk_convert.code_coverage.color_convert.color_exchange.color_quan.color_range_map.colorbar.colorize_sample.colormap_applicable.colormap_gradient.colormap_rotation.colortable.comfit.command_line_args.common.compile_opt.complex.complexarr.complexround.compute_mesh_normals.cond.congrid.conj.constrained_min.contour.contour.convert_coord.convol.convol_fft.coord2to3.copy_lun.correlate.cos.cosh.cpu.cramer.createboxplotdata.create_cursor.create_struct.create_view.crossp.crvlength.ct_luminance.cti_test.cursor.curvefit.cv_coord.cvttobm.cw_animate.cw_animate_getp.cw_animate_load.cw_animate_run.cw_arcball.cw_bgroup.cw_clr_index.cw_colorsel.cw_defroi.cw_field.cw_filesel.cw_form.cw_fslider.cw_light_editor.cw_light_editor_get.cw_light_editor_set.cw_orient.cw_palette_editor.cw_palette_editor_get.cw_palette_editor_set.cw_pdmenu.cw_rgbslider.cw_tmpl.cw_zoom.db_exists.dblarr.dcindgen.dcomplex.dcomplexarr.define_key.define_msgblk.define_msgblk_from_file.defroi.defsysv.delvar.dendro_plot.dendrogram.deriv.derivsig.determ.device.dfpmin.diag_matrix.dialog_dbconnect.dialog_message.dialog_pickfile.dialog_printersetup.dialog_printjob.dialog_read_image.dialog_write_image.dictionary.digital_filter.dilate.dindgen.dissolve.dist.distance_measure.dlm_load.dlm_register.doc_library.double.draw_roi.edge_dog.efont.eigenql.eigenvec.ellipse.elmhes.emboss.empty.enable_sysrtn.eof.eos.erase.erf.erfc.erfcx.erode.errorplot.errplot.estimator_filter.execute.exit.exp.expand.expand_path.expint.extract.extract_slice.f_cvf.f_pdf.factorial.fft.file_basename.file_chmod.file_copy.file_delete.file_dirname.file_expand_path.file_gunzip.file_gzip.file_info.file_lines.file_link.file_mkdir.file_move.file_poll_input.file_readlink.file_same.file_search.file_tar.file_test.file_untar.file_unzip.file_which.file_zip.filepath.findgen.finite.fix.flick.float.floor.flow3.fltarr.flush.format_axis_values.forward_function.free_lun.fstat.fulstr.funct.function.fv_test.fx_root.fz_roots.gamma.gamma_ct.gauss_cvf.gauss_pdf.gauss_smooth.gauss2dfit.gaussfit.gaussian_function.gaussint.get_drive_list.get_dxf_objects.get_kbrd.get_login_info.get_lun.get_screen_size.getenv.getwindows.greg2jul.grib.grid_input.grid_tps.grid3.griddata.gs_iter.h_eq_ct.h_eq_int.hanning.hash.hdf.hdf5.heap_free.heap_gc.heap_nosave.heap_refcount.heap_save.help.hilbert.hist_2d.hist_equal.histogram.hls.hough.hqr.hsv.i18n_multibytetoutf8.i18n_multibytetowidechar.i18n_utf8tomultibyte.i18n_widechartomultibyte.ibeta.icontour.iconvertcoord.idelete.identity.idl_base64.idl_container.idl_validname.idlexbr_assistant.idlitsys_createtool.idlunit.iellipse.igamma.igetcurrent.igetdata.igetid.igetproperty.iimage.image.image_cont.image_statistics.image_threshold.imaginary.imap.indgen.int_2d.int_3d.int_tabulated.intarr.interpol.interpolate.interval_volume.invert.ioctl.iopen.ir_filter.iplot.ipolygon.ipolyline.iputdata.iregister.ireset.iresolve.irotate.isa.isave.iscale.isetcurrent.isetproperty.ishft.isocontour.isosurface.isurface.itext.itranslate.ivector.ivolume.izoom.journal.json_parse.json_serialize.jul2greg.julday.keyword_set.krig2d.kurtosis.kw_test.l64indgen.la_choldc.la_cholmprove.la_cholsol.la_determ.la_eigenproblem.la_eigenql.la_eigenvec.la_elmhes.la_gm_linear_model.la_hqr.la_invert.la_least_square_equality.la_least_squares.la_linear_equation.la_ludc.la_lumprove.la_lusol.la_svd.la_tridc.la_trimprove.la_triql.la_trired.la_trisol.label_date.label_region.ladfit.laguerre.lambda.lambdap.lambertw.laplacian.least_squares_filter.leefilt.legend.legendre.linbcg.lindgen.linfit.linkimage.list.ll_arc_distance.lmfit.lmgr.lngamma.lnp_test.loadct.locale_get.logical_and.logical_or.logical_true.lon64arr.lonarr.long.long64.lsode.lu_complex.ludc.lumprove.lusol.m_correlate.machar.make_array.make_dll.make_rt.map.mapcontinents.mapgrid.map_2points.map_continents.map_grid.map_image.map_patch.map_proj_forward.map_proj_image.map_proj_info.map_proj_init.map_proj_inverse.map_set.matrix_multiply.matrix_power.max.md_test.mean.meanabsdev.mean_filter.median.memory.mesh_clip.mesh_decimate.mesh_issolid.mesh_merge.mesh_numtriangles.mesh_obj.mesh_smooth.mesh_surfacearea.mesh_validate.mesh_volume.message.min.min_curve_surf.mk_html_help.modifyct.moment.morph_close.morph_distance.morph_gradient.morph_hitormiss.morph_open.morph_thin.morph_tophat.multi.n_elements.n_params.n_tags.ncdf.newton.noise_hurl.noise_pick.noise_scatter.noise_slur.norm.obj_class.obj_destroy.obj_hasmethod.obj_isa.obj_new.obj_valid.objarr.on_error.on_ioerror.online_help.openr.openu.openw.oplot.oploterr.orderedhash.p_correlate.parse_url.particle_trace.path_cache.path_sep.pcomp.plot.plot3d.plot.plot_3dbox.plot_field.ploterr.plots.polar_contour.polar_surface.polyfill.polyshade.pnt_line.point_lun.polarplot.poly.poly_2d.poly_area.poly_fit.polyfillv.polygon.polyline.polywarp.popd.powell.pref_commit.pref_get.pref_set.prewitt.primes.print.printf.printd.pro.product.profile.profiler.profiles.project_vol.ps_show_fonts.psafm.pseudo.ptr_free.ptr_new.ptr_valid.ptrarr.pushd.qgrid3.qhull.qromb.qromo.qsimp.query_*.query_ascii.query_bmp.query_csv.query_dicom.query_gif.query_image.query_jpeg.query_jpeg2000.query_mrsid.query_pict.query_png.query_ppm.query_srf.query_tiff.query_video.query_wav.r_correlate.r_test.radon.randomn.randomu.ranks.rdpix.read.readf.read_ascii.read_binary.read_bmp.read_csv.read_dicom.read_gif.read_image.read_interfile.read_jpeg.read_jpeg2000.read_mrsid.read_pict.read_png.read_ppm.read_spr.read_srf.read_sylk.read_tiff.read_video.read_wav.read_wave.read_x11_bitmap.read_xwd.reads.readu.real_part.rebin.recall_commands.recon3.reduce_colors.reform.region_grow.register_cursor.regress.replicate.replicate_inplace.resolve_all.resolve_routine.restore.retall.return.reverse.rk4.roberts.rot.rotate.round.routine_filepath.routine_info.rs_test.s_test.save.savgol.scale3.scale3d.scatterplot.scatterplot3d.scope_level.scope_traceback.scope_varfetch.scope_varname.search2d.search3d.sem_create.sem_delete.sem_lock.sem_release.set_plot.set_shading.setenv.sfit.shade_surf.shade_surf_irr.shade_volume.shift.shift_diff.shmdebug.shmmap.shmunmap.shmvar.show3.showfont.signum.simplex.sin.sindgen.sinh.size.skewness.skip_lun.slicer3.slide_image.smooth.sobel.socket.sort.spawn.sph_4pnt.sph_scat.spher_harm.spl_init.spl_interp.spline.spline_p.sprsab.sprsax.sprsin.sprstp.sqrt.standardize.stddev.stop.strarr.strcmp.strcompress.streamline.streamline.stregex.stretch.string.strjoin.strlen.strlowcase.strmatch.strmessage.strmid.strpos.strput.strsplit.strtrim.struct_assign.struct_hide.strupcase.surface.surface.surfr.svdc.svdfit.svsol.swap_endian.swap_endian_inplace.symbol.systime.t_cvf.t_pdf.t3d.tag_names.tan.tanh.tek_color.temporary.terminal_size.tetra_clip.tetra_surface.tetra_volume.text.thin.thread.threed.tic.time_test2.timegen.timer.timestamp.timestamptovalues.tm_test.toc.total.trace.transpose.tri_surf.triangulate.trigrid.triql.trired.trisol.truncate_lun.ts_coef.ts_diff.ts_fcast.ts_smooth.tv.tvcrs.tvlct.tvrd.tvscl.typename.uindgen.uint.uintarr.ul64indgen.ulindgen.ulon64arr.ulonarr.ulong.ulong64.uniq.unsharp_mask.usersym.value_locate.variance.vector.vector_field.vel.velovect.vert_t3d.voigt.volume.voronoi.voxel_proj.wait.warp_tri.watershed.wdelete.wf_draw.where.widget_base.widget_button.widget_combobox.widget_control.widget_displaycontextmenu.widget_draw.widget_droplist.widget_event.widget_info.widget_label.widget_list.widget_propertysheet.widget_slider.widget_tab.widget_table.widget_text.widget_tree.widget_tree_move.widget_window.wiener_filter.window.window.write_bmp.write_csv.write_gif.write_image.write_jpeg.write_jpeg2000.write_nrif.write_pict.write_png.write_ppm.write_spr.write_srf.write_sylk.write_tiff.write_video.write_wav.write_wave.writeu.wset.wshow.wtn.wv_applet.wv_cwt.wv_cw_wavelet.wv_denoise.wv_dwt.wv_fn_coiflet.wv_fn_daubechies.wv_fn_gaussian.wv_fn_haar.wv_fn_morlet.wv_fn_paul.wv_fn_symlet.wv_import_data.wv_import_wavelet.wv_plot3d_wps.wv_plot_multires.wv_pwt.wv_tool_denoise.xbm_edit.xdisplayfile.xdxf.xfont.xinteranimate.xloadct.xmanager.xmng_tmpl.xmtool.xobjview.xobjview_rotate.xobjview_write_image.xpalette.xpcolor.xplot3d.xregistered.xroi.xsq_test.xsurface.xvaredit.xvolume.xvolume_rotate.xvolume_write_image.xyouts.zlib_compress.zlib_uncompress.zoom.zoom_24".split("."),a=t(r),i=["begin","end","endcase","endfor","endwhile","endif","endrep","endforeach","break","case","continue","for","foreach","goto","if","then","else","repeat","until","switch","while","do","pro","function"],_=t(i),o=RegExp("^[_a-z\xA1-\uFFFF][_a-z0-9\xA1-\uFFFF]*","i"),l=/[+\-*&=<>\/@#~$]/,s=RegExp("(and|or|eq|lt|le|gt|ge|ne|not)","i");function n(e){return e.eatSpace()?null:e.match(";")?(e.skipToEnd(),"comment"):e.match(/^[0-9\.+-]/,!1)&&(e.match(/^[+-]?0x[0-9a-fA-F]+/)||e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":e.match(/^"([^"]|(""))*"/)||e.match(/^'([^']|(''))*'/)?"string":e.match(_)?"keyword":e.match(a)?"builtin":e.match(o)?"variable":e.match(l)||e.match(s)?"operator":(e.next(),null)}const c={name:"idl",token:function(e){return n(e)},languageData:{autocomplete:r.concat(i)}};export{c as t};
import{t as o}from"./idl-CA47OCO3.js";export{o as idl};
import{s as x,t as b}from"./chunk-LvLJmgfZ.js";import{t as y}from"./react-BGmjiNul.js";import{t as E}from"./compiler-runtime-DeeZ7FnK.js";import{t as S}from"./jsx-runtime-ZmTK25f3.js";var T=b((()=>{(()=>{var v={792:(l,r,e)=>{e.d(r,{Z:()=>h});var n=e(609),d=e.n(n)()((function(m){return m[1]}));d.push([l.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);let h=d},609:l=>{l.exports=function(r){var e=[];return e.toString=function(){return this.map((function(n){var d=r(n);return n[2]?`@media ${n[2]} {${d}}`:d})).join("")},e.i=function(n,d,h){typeof n=="string"&&(n=[[null,n,""]]);var m={};if(h)for(var f=0;f<this.length;f++){var u=this[f][0];u!=null&&(m[u]=!0)}for(var t=0;t<n.length;t++){var o=[].concat(n[t]);h&&m[o[0]]||(d&&(o[2]?o[2]=`${d} and ${o[2]}`:o[2]=d),e.push(o))}},e}}},s={};function c(l){var r=s[l];if(r!==void 0)return r.exports;var e=s[l]={id:l,exports:{}};return v[l](e,e.exports,c),e.exports}c.n=l=>{var r=l&&l.__esModule?()=>l.default:()=>l;return c.d(r,{a:r}),r},c.d=(l,r)=>{for(var e in r)c.o(r,e)&&!c.o(l,e)&&Object.defineProperty(l,e,{enumerable:!0,get:r[e]})},c.o=(l,r)=>Object.prototype.hasOwnProperty.call(l,r),(()=>{var l=c(792);let r="rendered",e=(t,o)=>{let i=t.getBoundingClientRect(),a,p;return o.type==="mousedown"?(a=o.clientX,p=o.clientY):(a=o.touches[0].clientX,p=o.touches[0].clientY),a>=i.x&&a<=i.x+i.width&&p>=i.y&&p<=i.y+i.height},n,d={ArrowLeft:-1,ArrowRight:1},h=["horizontal","vertical"],m=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),f=t=>({x:t.pageX,y:t.pageY}),u=typeof window<"u"&&(window==null?void 0:window.HTMLElement);typeof window<"u"&&(window.document&&(n=document.createElement("template"),n.innerHTML='<div class="second" id="second"> <slot name="second"><slot name="before"></slot></slot> </div> <div class="first" id="first"> <div class="first-overlay"> <div class="first-overlay-container" id="firstImageContainer"> <slot name="first"><slot name="after"></slot></slot> </div> </div> <div class="handle-container"> <div class="divider"></div> <div class="handle" id="handle"> <slot name="handle"> <svg xmlns="http://www.w3.org/2000/svg" class="default-handle" viewBox="-8 -3 16 6"> <path d="M -5 -2 L -7 0 L -5 2 M 5 -2 L 7 0 L 5 2" fill="none" vector-effect="non-scaling-stroke"/> </svg> </slot> </div> </div> </div> '),window.customElements.define("img-comparison-slider",class extends u{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=i=>{if(this.isMouseDown||this.slideOnHover){let a=f(i);this.slideToPage(a)}},this.bodyUserSelectStyle="",this.bodyWebkitUserSelectStyle="",this.onMouseDown=i=>{if(this.slideOnHover||this.handle&&!e(this.handleElement,i))return;i.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();let a=f(i);this.slideToPage(a),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,this.bodyWebkitUserSelectStyle=window.document.body.style.webkitUserSelect,window.document.body.style.userSelect="none",window.document.body.style.webkitUserSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.document.body.style.webkitUserSelect=this.bodyWebkitUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=i=>{this.dragByHandle&&!e(this.handleElement,i)||(this.touchStartPoint=m(i),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=i=>{if(this.touchStartPoint===null)return;let a=m(i);if(this.isTouchComparing)return this.slideToPage(a),i.preventDefault(),!1;if(!this.hasTouchMoved){let p=Math.abs(a.y-this.touchStartPoint.y),w=Math.abs(a.x-this.touchStartPoint.x);if(this.slideDirection==="horizontal"&&p<w||this.slideDirection==="vertical"&&p>w)return this.isTouchComparing=!0,this.focus(),this.slideToPage(a),i.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=i=>{if(this.keyboard==="disabled")return;let a=d[i.key];this.animationDirection!==a&&a!==void 0&&(this.animationDirection=a,this.startSlideAnimation())},this.onKeyUp=i=>{if(this.keyboard==="disabled")return;let a=d[i.key];a!==void 0&&this.animationDirection===a&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};let t=this.attachShadow({mode:"open"}),o=document.createElement("style");o.innerHTML=l.Z,this.getAttribute("nonce")&&o.setAttribute("nonce",this.getAttribute("nonce")),t.appendChild(o),t.appendChild(n.content.cloneNode(!0)),this.firstElement=t.getElementById("first"),this.handleElement=t.getElementById("handle")}set handle(t){this.dragByHandle=t.toString().toLowerCase()!=="false"}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(t){let o=parseFloat(t);o!==this.exposure&&(this.exposure=o,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover=t.toString().toLowerCase()!=="false",this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...h),h.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&this.getAttribute("keyboard")==="disabled"?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle")?this.getAttribute("handle"):this.dragByHandle,this.hover=this.hasAttribute("hover")?this.getAttribute("hover"):this.slideOnHover,this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):this.slideDirection,this.resetDimensions(),this.classList.contains(r)||this.classList.add(r)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,o,i){t==="hover"&&(this.hover=i),t==="direction"&&(this.direction=i),t==="keyboard"&&(this.keyboard=i==="disabled"?"disabled":"enabled")}setExposure(t=0){var o;this.exposure=(o=this.exposure+t)<0?0:o>100?100:o,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(t=0){this.setExposure(t);let o=new Event("slide");this.dispatchEvent(o)}slideToPage(t){this.slideDirection==="horizontal"&&this.slideToPageX(t.x),this.slideDirection==="vertical"&&this.slideToPageY(t.y)}slideToPageX(t){this.exposure=(t-this.getBoundingClientRect().left-window.scrollX)/this.imageWidth*100,this.slide(0)}slideToPageY(t){this.exposure=(t-this.getBoundingClientRect().top-window.scrollY)/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,o=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");let i=a=>{if(this.animationDirection===0||o!==this.animationDirection)return;t===null&&(t=a);let p=(a-t)/16.666666666666668*this.animationDirection;this.slide(p),setTimeout((()=>window.requestAnimationFrame(i)),0),t=a};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}))})()})()})),M=b((v=>{var s=v&&v.__createBinding||(Object.create?(function(e,n,d,h){h===void 0&&(h=d),Object.defineProperty(e,h,{enumerable:!0,get:function(){return n[d]}})}):(function(e,n,d,h){h===void 0&&(h=d),e[h]=n[d]})),c=v&&v.__setModuleDefault||(Object.create?(function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}):function(e,n){e.default=n}),l=v&&v.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var d in e)d!=="default"&&Object.prototype.hasOwnProperty.call(e,d)&&s(n,e,d);return c(n,e),n};Object.defineProperty(v,"__esModule",{value:!0}),v.ImgComparisonSlider=void 0;var r=y();typeof document<"u"&&Promise.resolve().then(()=>l(T())),v.ImgComparisonSlider=(0,r.forwardRef)(({children:e,onSlide:n,value:d,className:h,...m},f)=>{let u=(0,r.useRef)();return(0,r.useEffect)(()=>{d!==void 0&&(u.current.value=parseFloat(d.toString()))},[d,u]),(0,r.useEffect)(()=>{n&&u.current.addEventListener("slide",n)},[]),(0,r.useImperativeHandle)(f,()=>u.current,[u]),(0,r.createElement)("img-comparison-slider",Object.assign({class:h?`${h} rendered`:"rendered",tabIndex:0,ref:u},m),e)})})),D=E(),k=M();y();var g=x(S(),1),L=v=>{let s=(0,D.c)(15),{beforeSrc:c,afterSrc:l,value:r,direction:e,width:n,height:d}=v,h=n||"100%",m=d||(e==="vertical"?"400px":"auto"),f;s[0]!==h||s[1]!==m?(f={width:h,height:m,maxWidth:"100%"},s[0]=h,s[1]=m,s[2]=f):f=s[2];let u=f,t;s[3]===c?t=s[4]:(t=(0,g.jsx)("img",{slot:"first",src:c,alt:"Before",width:"100%"}),s[3]=c,s[4]=t);let o;s[5]===l?o=s[6]:(o=(0,g.jsx)("img",{slot:"second",src:l,alt:"After",width:"100%"}),s[5]=l,s[6]=o);let i;s[7]!==e||s[8]!==t||s[9]!==o||s[10]!==r?(i=(0,g.jsxs)(k.ImgComparisonSlider,{value:r,direction:e,children:[t,o]}),s[7]=e,s[8]=t,s[9]=o,s[10]=r,s[11]=i):i=s[11];let a;return s[12]!==u||s[13]!==i?(a=(0,g.jsx)("div",{style:u,children:i}),s[12]=u,s[13]=i,s[14]=a):a=s[14],a};export{L as default};
import{s as h}from"./chunk-LvLJmgfZ.js";import{t as f}from"./react-BGmjiNul.js";import{t as C}from"./compiler-runtime-DeeZ7FnK.js";import{t as M}from"./jsx-runtime-ZmTK25f3.js";import{t as v}from"./button-YC1gW_kJ.js";import{r as k}from"./input-pAun1m1X.js";import{a as m,c as p,i,l as u,n as g,r as x,s as a,t as c}from"./alert-dialog-DwQffb13.js";import{t as O}from"./dialog-CxGKN4C_.js";var b=C(),d=h(f(),1),e=h(M(),1),j=d.createContext({modal:null,setModal:()=>{}});const y=t=>{let r=(0,b.c)(6),[s,o]=d.useState(null),l;r[0]===s?l=r[1]:(l={modal:s,setModal:o},r[0]=s,r[1]=l);let n;return r[2]!==s||r[3]!==t.children||r[4]!==l?(n=(0,e.jsxs)(j,{value:l,children:[s,t.children]}),r[2]=s,r[3]=t.children,r[4]=l,r[5]=n):n=r[5],n};function w(){let t=d.use(j);if(t===void 0)throw Error("useModal must be used within a ModalProvider");let r=()=>{t.setModal(null)};return{openModal:s=>{t.setModal((0,e.jsx)(O,{open:!0,onOpenChange:o=>{o||r()},children:s}))},openAlert:s=>{t.setModal((0,e.jsx)(c,{open:!0,onOpenChange:o=>{o||r()},children:(0,e.jsxs)(i,{children:[s,(0,e.jsx)(a,{children:(0,e.jsx)(g,{autoFocus:!0,onClick:r,children:"Ok"})})]})}))},openPrompt:s=>{t.setModal((0,e.jsx)(c,{open:!0,onOpenChange:o=>{o||r()},children:(0,e.jsx)(i,{children:(0,e.jsxs)("form",{onSubmit:o=>{o.preventDefault(),s.onConfirm(o.currentTarget.prompt.value),r()},children:[(0,e.jsxs)(p,{children:[(0,e.jsx)(u,{children:s.title}),(0,e.jsx)(m,{children:s.description}),(0,e.jsx)(k,{spellCheck:s.spellCheck,defaultValue:s.defaultValue,className:"my-4 h-8",name:"prompt",required:!0,autoFocus:!0,autoComplete:"off"})]}),(0,e.jsxs)(a,{children:[(0,e.jsx)(x,{onClick:r,children:"Cancel"}),(0,e.jsx)(v,{type:"submit",children:s.confirmText??"Ok"})]})]})})}))},openConfirm:s=>{t.setModal((0,e.jsx)(c,{open:!0,onOpenChange:o=>{o||r()},children:(0,e.jsxs)(i,{children:[(0,e.jsxs)(p,{children:[(0,e.jsx)(u,{className:s.variant==="destructive"?"text-destructive":"",children:s.title}),(0,e.jsx)(m,{children:s.description})]}),(0,e.jsxs)(a,{children:[(0,e.jsx)(x,{onClick:r,children:"Cancel"}),s.confirmAction]})]})}))},closeModal:r}}export{w as n,y as t};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as r}from"./chunk-LBM3YZW2-DNY-0NiJ.js";export{r as createInfoServices};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import{t as m}from"./chunk-XAJISQIX-Bus-Z8i1.js";import{n as o,r as e}from"./src-BKLwm2RN.js";import{c as p}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as s}from"./chunk-EXTU4WIE-CyW9PraH.js";import"./chunk-O7ZBX7Z2-CsMGWxKA.js";import"./chunk-S6J4BHB3-B5AsdTT7.js";import"./chunk-LBM3YZW2-DNY-0NiJ.js";import"./chunk-76Q3JFCE-CC_RB1qp.js";import"./chunk-T53DSG4Q-td6bRJ2x.js";import"./chunk-LHMN2FUI-xvIevmTh.js";import"./chunk-FWNWRKHM-D3c3qJTG.js";import{t as n}from"./mermaid-parser.core-BQwQ8Y_u.js";var d={parse:o(async r=>{let t=await n("info",r);e.debug(t)},"parse")},f={version:m.version+""},g={parser:d,db:{getVersion:o(()=>f.version,"getVersion")},renderer:{draw:o((r,t,a)=>{e.debug(`rendering info diagram
`+r);let i=s(t);p(i,100,400,!0),i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${a}`)},"draw")}};export{g as diagram};
function a(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function n(t,e){switch(arguments.length){case 0:break;case 1:typeof t=="function"?this.interpolator(t):this.range(t);break;default:this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}return this}export{a as n,n as t};
import{s as mt}from"./chunk-LvLJmgfZ.js";import{t as zr}from"./react-BGmjiNul.js";import{t as ft}from"./compiler-runtime-DeeZ7FnK.js";import{t as Kr}from"./jsx-runtime-ZmTK25f3.js";import{r as Gr}from"./button-YC1gW_kJ.js";import{t as R}from"./cn-BKtXLv3a.js";import{t as qr}from"./createLucideIcon-CnW3RofX.js";import{_ as Zr,g as Yr,h as Xr}from"./select-V5IdpNiR.js";import{S as Jr}from"./Combination-CMPwuAmi.js";import{A as re,C as Qr,D as pt,E as ei,F as ti,I as vt,L as B,N as O,O as V,P as H,R as _,a as ai,d as ri,f as ii,i as bt,j as ht,k as gt,m as ni,o as yt,p as Se,r as oi,t as li,w as si,y as ui,z as Et}from"./usePress-Bup4EGrp.js";import{t as di}from"./SSRProvider-CEHRCdjA.js";import{t as Fe}from"./context-JwD-oSsl.js";import{n as Me,t as Pt}from"./useNumberFormatter-c6GXymzg.js";import{t as ci}from"./numbers-iQunIAXf.js";import{t as wt}from"./useDebounce-D5NcotGm.js";var Lt=qr("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);function mi(...e){return e.length===1&&e[0]?e[0]:a=>{let t=!1,r=e.map(i=>{let n=xt(i,a);return t||(t=typeof n=="function"),n});if(t)return()=>{r.forEach((i,n)=>{typeof i=="function"?i():xt(e[n],null)})}}}function xt(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}var fi=new Set(["id"]),pi=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),vi=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),bi=new Set(["dir","lang","hidden","inert","translate"]),Ct=new Set("onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart".split(".")),hi=/^(data-.*)$/;function z(e,a={}){let{labelable:t,isLink:r,global:i,events:n=i,propNames:o}=a,s={};for(let u in e)Object.prototype.hasOwnProperty.call(e,u)&&(fi.has(u)||t&&pi.has(u)||r&&vi.has(u)||i&&bi.has(u)||n&&Ct.has(u)||u.endsWith("Capture")&&Ct.has(u.slice(0,-7))||o!=null&&o.has(u)||hi.test(u))&&(s[u]=e[u]);return s}function Dt(e,a){let{id:t,"aria-label":r,"aria-labelledby":i}=e;return t=B(t),i&&r?i=[...new Set([t,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&a&&(r=a),{id:t,"aria-label":r,"aria-labelledby":i}}var l=mt(zr(),1);function Nt(e){let a=(0,l.useRef)(null),t=(0,l.useRef)(void 0),r=(0,l.useCallback)(i=>{if(typeof e=="function"){let n=e,o=n(i);return()=>{typeof o=="function"?o():n(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return(0,l.useMemo)(()=>({get current(){return a.current},set current(i){a.current=i,t.current&&(t.current=(t.current(),void 0)),i!=null&&(t.current=r(i))}}),[r])}function St(e,a,t,r){let i=_(t),n=t==null;(0,l.useEffect)(()=>{if(n||!e.current)return;let o=e.current;return o.addEventListener(a,i,r),()=>{o.removeEventListener(a,i,r)}},[e,a,r,n,i])}function Te(e,a,t){let r=_(()=>{t&&t(a)});(0,l.useEffect)(()=>{var n;let i=(n=e==null?void 0:e.current)==null?void 0:n.form;return i==null||i.addEventListener("reset",r),()=>{i==null||i.removeEventListener("reset",r)}},[e,r])}function Ve(e,a,t){let[r,i]=(0,l.useState)(e||a),n=(0,l.useRef)(e!==void 0),o=e!==void 0;(0,l.useEffect)(()=>{n.current,n.current=o},[o]);let s=o?e:r,u=(0,l.useCallback)((d,...f)=>{let c=(m,...v)=>{t&&(Object.is(s,m)||t(m,...v)),o||(s=m)};typeof d=="function"?i((m,...v)=>{let b=d(o?s:m,...v);return c(b,...f),o?m:b}):(o||i(d),c(d,...f))},[o,s,t]);return[s,u]}function de(e,a=-1/0,t=1/0){return Math.min(Math.max(e,a),t)}function ce(e,a){let t=e,r=0,i=a.toString(),n=i.toLowerCase().indexOf("e-");if(n>0)r=Math.abs(Math.floor(Math.log10(Math.abs(a))))+n;else{let o=i.indexOf(".");o>=0&&(r=i.length-o)}if(r>0){let o=10**r;t=Math.round(t*o)/o}return t}function j(e,a,t,r){a=Number(a),t=Number(t);let i=(e-(isNaN(a)?0:a))%r,n=ce(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return isNaN(a)?!isNaN(t)&&n>t&&(n=Math.floor(ce(t/r,r))*r):n<a?n=a:!isNaN(t)&&n>t&&(n=a+Math.floor(ce((t-a)/r,r))*r),n=ce(n,r),n}var Ft=Symbol("default");function Mt({values:e,children:a}){for(let[t,r]of e)a=l.createElement(t.Provider,{value:r},a);return a}function Z(e){let{className:a,style:t,children:r,defaultClassName:i,defaultChildren:n,defaultStyle:o,values:s}=e;return(0,l.useMemo)(()=>{let u,d,f;return u=typeof a=="function"?a({...s,defaultClassName:i}):a,d=typeof t=="function"?t({...s,defaultStyle:o||{}}):t,f=typeof r=="function"?r({...s,defaultChildren:n}):r??n,{className:u??i,style:d||o?{...o,...d}:void 0,children:f??n,"data-rac":""}},[a,t,r,i,n,o,s])}function gi(e,a){return t=>a(typeof e=="function"?e(t):e,t)}function $e(e,a){let t=(0,l.useContext)(e);if(a===null)return null;if(t&&typeof t=="object"&&"slots"in t&&t.slots){let r=a||Ft;if(!t.slots[r]){let i=new Intl.ListFormat().format(Object.keys(t.slots).map(o=>`"${o}"`)),n=a?`Invalid slot "${a}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${i}.`)}return t.slots[r]}return t}function K(e,a,t){let{ref:r,...i}=$e(t,e.slot)||{},n=Nt((0,l.useMemo)(()=>mi(a,r),[a,r])),o=V(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?o.style=s=>{let u=typeof i.style=="function"?i.style(s):i.style,d={...s.defaultStyle,...u},f=typeof e.style=="function"?e.style({...s,defaultStyle:d}):e.style;return{...d,...f}}:o.style={...i.style,...e.style}),[o,n]}function Tt(e=!0){let[a,t]=(0,l.useState)(e),r=(0,l.useRef)(!1),i=(0,l.useCallback)(n=>{r.current=!0,t(!!n)},[]);return Et(()=>{r.current||t(!1)},[]),[i,a]}function Vt(e){let a=/^(data-.*)$/,t={};for(let r in e)a.test(r)||(t[r]=e[r]);return t}var $t=7e3,k=null;function ke(e,a="assertive",t=$t){k?k.announce(e,a,t):(k=new Ei,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?k.announce(e,a,t):setTimeout(()=>{k!=null&&k.isAttached()&&(k==null||k.announce(e,a,t))},100))}function yi(e){k&&k.clear(e)}var Ei=class{isAttached(){var e;return(e=this.node)==null?void 0:e.isConnected}createLog(e){let a=document.createElement("div");return a.setAttribute("role","log"),a.setAttribute("aria-live",e),a.setAttribute("aria-relevant","additions"),a}destroy(){this.node&&(this.node=(document.body.removeChild(this.node),null))}announce(e,a="assertive",t=$t){var r,i;if(!this.node)return;let n=document.createElement("div");typeof e=="object"?(n.setAttribute("role","img"),n.setAttribute("aria-labelledby",e["aria-labelledby"])):n.textContent=e,a==="assertive"?(r=this.assertiveLog)==null||r.appendChild(n):(i=this.politeLog)==null||i.appendChild(n),e!==""&&setTimeout(()=>{n.remove()},t)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}},Pi=Symbol.for("react-aria.i18n.locale"),wi=Symbol.for("react-aria.i18n.strings"),Y=void 0,Ie=class Ir{getStringForLocale(a,t){let r=this.getStringsForLocale(t)[a];if(!r)throw Error(`Could not find intl message ${a} in ${t} locale`);return r}getStringsForLocale(a){let t=this.strings[a];return t||(t=Li(a,this.strings,this.defaultLocale),this.strings[a]=t),t}static getGlobalDictionaryForPackage(a){if(typeof window>"u")return null;let t=window[Pi];if(Y===void 0){let i=window[wi];if(!i)return null;for(let n in Y={},i)Y[n]=new Ir({[t]:i[n]},t)}let r=Y==null?void 0:Y[a];if(!r)throw Error(`Strings for package "${a}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(a,t="en-US"){this.strings=Object.fromEntries(Object.entries(a).filter(([,r])=>r)),this.defaultLocale=t}};function Li(e,a,t="en-US"){if(a[e])return a[e];let r=xi(e);if(a[r])return a[r];for(let i in a)if(i.startsWith(r+"-"))return a[i];return a[t]}function xi(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}var kt=new Map,It=new Map,Rt=class{format(e,a){let t=this.strings.getStringForLocale(e,this.locale);return typeof t=="function"?t(a,this):t}plural(e,a,t="cardinal"){let r=a["="+e];if(r)return typeof r=="function"?r():r;let i=this.locale+":"+t,n=kt.get(i);return n||(n=new Intl.PluralRules(this.locale,{type:t}),kt.set(i,n)),r=a[n.select(e)]||a.other,typeof r=="function"?r():r}number(e){let a=It.get(this.locale);return a||(a=new Intl.NumberFormat(this.locale),It.set(this.locale,a)),a.format(e)}select(e,a){let t=e[a]||e.other;return typeof t=="function"?t():t}constructor(e,a){this.locale=e,this.strings=a}},jt=new WeakMap;function Ci(e){let a=jt.get(e);return a||(a=new Ie(e),jt.set(e,a)),a}function At(e,a){return a&&Ie.getGlobalDictionaryForPackage(a)||Ci(e)}function Re(e,a){let{locale:t}=Fe(),r=At(e,a);return(0,l.useMemo)(()=>new Rt(t,r),[t,r])}var Di=RegExp("^.*\\(.*\\).*$"),Ni=["latn","arab","hanidec","deva","beng","fullwide"],je=class{parse(e){return Ae(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,a,t){return Ae(this.locale,this.options,e).isValidPartialNumber(e,a,t)}getNumberingSystem(e){return Ae(this.locale,this.options,e).options.numberingSystem}constructor(e,a={}){this.locale=e,this.options=a}},Bt=new Map;function Ae(e,a,t){let r=Ot(e,a);if(!e.includes("-nu-")&&!r.isValidPartialNumber(t)){for(let i of Ni)if(i!==r.options.numberingSystem){let n=Ot(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,a);if(n.isValidPartialNumber(t))return n}}return r}function Ot(e,a){let t=e+(a?Object.entries(a).sort((i,n)=>i[0]<n[0]?-1:1).join():""),r=Bt.get(t);return r||(r=new Si(e,a),Bt.set(t,r)),r}var Si=class{parse(e){let a=this.sanitize(e);if(this.symbols.group&&(a=X(a,this.symbols.group,"")),this.symbols.decimal&&(a=a.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(a=a.replace(this.symbols.minusSign,"-")),a=a.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let r=a.indexOf("-");a=a.replace("-",""),a=a.replace("+","");let i=a.indexOf(".");i===-1&&(i=a.length),a=a.replace(".",""),a=i-2==0?`0.${a}`:i-2==-1?`0.0${a}`:i-2==-2?"0.00":`${a.slice(0,i-2)}.${a.slice(i-2)}`,r>-1&&(a=`-${a}`)}let t=a?+a:NaN;if(isNaN(t))return NaN;if(this.options.style==="percent"){let r={...this.options,style:"decimal",minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new je(this.locale,r).parse(new Me(this.locale,r).format(t))}return this.options.currencySign==="accounting"&&Di.test(e)&&(t=-1*t),t}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("\u060C",this.symbols.decimal)),this.symbols.group&&(e=X(e,".",this.symbols.group))),this.symbols.group==="\u2019"&&e.includes("'")&&(e=X(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=X(e," ",this.symbols.group),e=X(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,a=-1/0,t=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&a<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&t>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=X(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,a={}){this.locale=e,a.roundingIncrement!==1&&a.roundingIncrement!=null&&(a.maximumFractionDigits==null&&a.minimumFractionDigits==null?(a.maximumFractionDigits=0,a.minimumFractionDigits=0):a.maximumFractionDigits==null?a.maximumFractionDigits=a.minimumFractionDigits:a.minimumFractionDigits??(a.minimumFractionDigits=a.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,a),this.options=this.formatter.resolvedOptions(),this.symbols=Mi(e,this.formatter,this.options,a),this.options.style==="percent"&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}},Ht=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),Fi=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Mi(e,a,t,r){var C,w,N,x;let i=new Intl.NumberFormat(e,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),n=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=Fi.map(y=>i.formatToParts(y)),u=((C=n.find(y=>y.type==="minusSign"))==null?void 0:C.value)??"-",d=(w=o.find(y=>y.type==="plusSign"))==null?void 0:w.value;!d&&((r==null?void 0:r.signDisplay)==="exceptZero"||(r==null?void 0:r.signDisplay)==="always")&&(d="+");let f=(N=new Intl.NumberFormat(e,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(y=>y.type==="decimal"))==null?void 0:N.value,c=(x=n.find(y=>y.type==="group"))==null?void 0:x.value,m=n.filter(y=>!Ht.has(y.type)).map(y=>_t(y.value)),v=s.flatMap(y=>y.filter(P=>!Ht.has(P.type)).map(P=>_t(P.value))),b=[...new Set([...m,...v])].sort((y,P)=>P.length-y.length),p=b.length===0?RegExp("[\\p{White_Space}]","gu"):RegExp(`${b.join("|")}|[\\p{White_Space}]`,"gu"),h=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(9876543210)].reverse(),g=new Map(h.map((y,P)=>[y,P])),E=RegExp(`[${h.join("")}]`,"g");return{minusSign:u,plusSign:d,decimal:f,group:c,literals:p,numeral:E,index:y=>String(g.get(y))}}function X(e,a,t){return e.replaceAll?e.replaceAll(a,t):e.split(a).join(t)}function _t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var A=null,ie=new Set,ne=new Map,G=!1,Be=!1,Ti={Tab:!0,Escape:!0};function me(e,a){for(let t of ie)t(e,a)}function Vi(e){return!(e.metaKey||!Qr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function fe(e){G=!0,Vi(e)&&(A="keyboard",me("keyboard",e))}function J(e){A="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(G=!0,me("pointer",e))}function Wt(e){ri(e)&&(G=!0,A="virtual")}function Ut(e){e.target===window||e.target===document||yt||!e.isTrusted||(!G&&!Be&&(A="virtual",me("virtual",e)),G=!1,Be=!1)}function zt(){yt||(G=!1,Be=!0)}function pe(e){if(typeof window>"u"||typeof document>"u"||ne.get(H(e)))return;let a=H(e),t=O(e),r=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){G=!0,r.apply(this,arguments)},t.addEventListener("keydown",fe,!0),t.addEventListener("keyup",fe,!0),t.addEventListener("click",Wt,!0),a.addEventListener("focus",Ut,!0),a.addEventListener("blur",zt,!1),typeof PointerEvent<"u"&&(t.addEventListener("pointerdown",J,!0),t.addEventListener("pointermove",J,!0),t.addEventListener("pointerup",J,!0)),a.addEventListener("beforeunload",()=>{Kt(e)},{once:!0}),ne.set(a,{focus:r})}var Kt=(e,a)=>{let t=H(e),r=O(e);a&&r.removeEventListener("DOMContentLoaded",a),ne.has(t)&&(t.HTMLElement.prototype.focus=ne.get(t).focus,r.removeEventListener("keydown",fe,!0),r.removeEventListener("keyup",fe,!0),r.removeEventListener("click",Wt,!0),t.removeEventListener("focus",Ut,!0),t.removeEventListener("blur",zt,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",J,!0),r.removeEventListener("pointermove",J,!0),r.removeEventListener("pointerup",J,!0)),ne.delete(t))};function $i(e){let a=O(e),t;return a.readyState==="loading"?(t=()=>{pe(e)},a.addEventListener("DOMContentLoaded",t)):pe(e),()=>Kt(e,t)}typeof document<"u"&&$i();function Oe(){return A!=="pointer"}function Gt(){return A}function qt(e){A=e,me(e,null)}function ki(){pe();let[e,a]=(0,l.useState)(A);return(0,l.useEffect)(()=>{let t=()=>{a(A)};return ie.add(t),()=>{ie.delete(t)}},[]),di()?null:e}var Ii=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ri(e,a,t){let r=O(t==null?void 0:t.target),i=typeof window<"u"?H(t==null?void 0:t.target).HTMLInputElement:HTMLInputElement,n=typeof window<"u"?H(t==null?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?H(t==null?void 0:t.target).HTMLElement:HTMLElement,s=typeof window<"u"?H(t==null?void 0:t.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!Ii.has(r.activeElement.type)||r.activeElement instanceof n||r.activeElement instanceof o&&r.activeElement.isContentEditable,!(e&&a==="keyboard"&&t instanceof s&&!Ti[t.key])}function ji(e,a,t){pe(),(0,l.useEffect)(()=>{let r=(i,n)=>{Ri(!!(t!=null&&t.isTextInput),i,n)&&e(Oe())};return ie.add(r),()=>{ie.delete(r)}},a)}function Zt(e){let a=O(e),t=re(a);if(Gt()==="virtual"){let r=t;ni(()=>{re(a)===r&&e.isConnected&&pt(e)})}else pt(e)}function He(e){let{isDisabled:a,onFocus:t,onBlur:r,onFocusChange:i}=e,n=(0,l.useCallback)(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),o=bt(n),s=(0,l.useCallback)(u=>{let d=O(u.target),f=d?re(d):re();u.target===u.currentTarget&&f===ht(u.nativeEvent)&&(t&&t(u),i&&i(!0),o(u))},[i,t,o]);return{focusProps:{onFocus:!a&&(t||i||r)?s:void 0,onBlur:!a&&(r||i)?n:void 0}}}function Yt(e){if(!e)return;let a=!0;return t=>{e({...t,preventDefault(){t.preventDefault()},isDefaultPrevented(){return t.isDefaultPrevented()},stopPropagation(){a=!0},continuePropagation(){a=!1},isPropagationStopped(){return a}}),a&&t.stopPropagation()}}function Xt(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Yt(e.onKeyDown),onKeyUp:Yt(e.onKeyUp)}}}var Jt=l.createContext(null);function Ai(e){let a=(0,l.useContext)(Jt)||{};ii(a,e);let{ref:t,...r}=a;return r}function Qt(e,a){let{focusProps:t}=He(e),{keyboardProps:r}=Xt(e),i=V(t,r),n=Ai(a),o=e.isDisabled?{}:n,s=(0,l.useRef)(e.autoFocus);(0,l.useEffect)(()=>{s.current&&a.current&&Zt(a.current),s.current=!1},[a]);let u=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(u=void 0),{focusableProps:V({...i,tabIndex:u},o)}}function _e(e){let{isDisabled:a,onBlurWithin:t,onFocusWithin:r,onFocusWithinChange:i}=e,n=(0,l.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=Se(),u=(0,l.useCallback)(c=>{c.currentTarget.contains(c.target)&&n.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(n.current.isFocusWithin=!1,s(),t&&t(c),i&&i(!1))},[t,i,n,s]),d=bt(u),f=(0,l.useCallback)(c=>{if(!c.currentTarget.contains(c.target))return;let m=O(c.target),v=re(m);if(!n.current.isFocusWithin&&v===ht(c.nativeEvent)){r&&r(c),i&&i(!0),n.current.isFocusWithin=!0,d(c);let b=c.currentTarget;o(m,"focus",p=>{if(n.current.isFocusWithin&&!gt(b,p.target)){let h=new m.defaultView.FocusEvent("blur",{relatedTarget:p.target});ai(h,b),u(oi(h))}},{capture:!0})}},[r,i,d,o,u]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:f,onBlur:u}}}var We=!1,ve=0;function Bi(){We=!0,setTimeout(()=>{We=!1},50)}function ea(e){e.pointerType==="touch"&&Bi()}function Oi(){if(!(typeof document>"u"))return ve===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",ea),ve++,()=>{ve--,!(ve>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",ea)}}function be(e){let{onHoverStart:a,onHoverChange:t,onHoverEnd:r,isDisabled:i}=e,[n,o]=(0,l.useState)(!1),s=(0,l.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,l.useEffect)(Oi,[]);let{addGlobalListener:u,removeAllGlobalListeners:d}=Se(),{hoverProps:f,triggerHoverEnd:c}=(0,l.useMemo)(()=>{let m=(p,h)=>{if(s.pointerType=h,i||h==="touch"||s.isHovered||!p.currentTarget.contains(p.target))return;s.isHovered=!0;let g=p.currentTarget;s.target=g,u(O(p.target),"pointerover",E=>{s.isHovered&&s.target&&!gt(s.target,E.target)&&v(E,E.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:g,pointerType:h}),t&&t(!0),o(!0)},v=(p,h)=>{let g=s.target;s.pointerType="",s.target=null,!(h==="touch"||!s.isHovered||!g)&&(s.isHovered=!1,d(),r&&r({type:"hoverend",target:g,pointerType:h}),t&&t(!1),o(!1))},b={};return typeof PointerEvent<"u"&&(b.onPointerEnter=p=>{We&&p.pointerType==="mouse"||m(p,p.pointerType)},b.onPointerLeave=p=>{!i&&p.currentTarget.contains(p.target)&&v(p,p.pointerType)}),{hoverProps:b,triggerHoverEnd:v}},[a,t,r,i,s,u,d]);return(0,l.useEffect)(()=>{i&&c({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:f,isHovered:n}}function Hi(e,a){let{onScroll:t,isDisabled:r}=e,i=(0,l.useCallback)(n=>{n.ctrlKey||(n.preventDefault(),n.stopPropagation(),t&&t({deltaX:n.deltaX,deltaY:n.deltaY}))},[t]);St(a,"wheel",r?void 0:i)}function he(e={}){let{autoFocus:a=!1,isTextInput:t,within:r}=e,i=(0,l.useRef)({isFocused:!1,isFocusVisible:a||Oe()}),[n,o]=(0,l.useState)(!1),[s,u]=(0,l.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),d=(0,l.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),f=(0,l.useCallback)(v=>{i.current.isFocused=v,o(v),d()},[d]);ji(v=>{i.current.isFocusVisible=v,d()},[],{isTextInput:t});let{focusProps:c}=He({isDisabled:r,onFocusChange:f}),{focusWithinProps:m}=_e({isDisabled:!r,onFocusWithinChange:f});return{isFocused:n,isFocusVisible:s,focusProps:r?m:c}}function ta(e){let{id:a,label:t,"aria-labelledby":r,"aria-label":i,labelElementType:n="label"}=e;a=B(a);let o=B(),s={};t&&(r=r?`${o} ${r}`:o,s={id:o,htmlFor:n==="label"?a:void 0});let u=Dt({id:a,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:u}}function aa(e){let{description:a,errorMessage:t,isInvalid:r,validationState:i}=e,{labelProps:n,fieldProps:o}=ta(e),s=vt([!!a,!!t,r,i]),u=vt([!!a,!!t,r,i]);return o=V(o,{"aria-describedby":[s,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:n,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:u}}}var ge={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},ra={...ge,customError:!0,valid:!1},Q={isInvalid:!1,validationDetails:ge,validationErrors:[]},_i=(0,l.createContext)({}),ye="__formValidationState"+Date.now();function Ue(e){if(e[ye]){let{realtimeValidation:a,displayValidation:t,updateValidation:r,resetValidation:i,commitValidation:n}=e[ye];return{realtimeValidation:a,displayValidation:t,updateValidation:r,resetValidation:i,commitValidation:n}}return Wi(e)}function Wi(e){let{isInvalid:a,validationState:t,name:r,value:i,builtinValidation:n,validate:o,validationBehavior:s="aria"}=e;t&&(a||(a=t==="invalid"));let u=a===void 0?null:{isInvalid:a,validationErrors:[],validationDetails:ra},d=(0,l.useMemo)(()=>!o||i==null?null:ia(Ui(o,i)),[o,i]);n!=null&&n.validationDetails.valid&&(n=void 0);let f=(0,l.useContext)(_i),c=(0,l.useMemo)(()=>r?Array.isArray(r)?r.flatMap(P=>ze(f[P])):ze(f[r]):[],[f,r]),[m,v]=(0,l.useState)(f),[b,p]=(0,l.useState)(!1);f!==m&&(v(f),p(!1));let h=(0,l.useMemo)(()=>ia(b?[]:c),[b,c]),g=(0,l.useRef)(Q),[E,C]=(0,l.useState)(Q),w=(0,l.useRef)(Q),N=()=>{if(!x)return;y(!1);let P=d||n||g.current;Ke(P,w.current)||(w.current=P,C(P))},[x,y]=(0,l.useState)(!1);return(0,l.useEffect)(N),{realtimeValidation:u||h||d||n||Q,displayValidation:s==="native"?u||h||E:u||h||d||n||E,updateValidation(P){s==="aria"&&!Ke(E,P)?C(P):g.current=P},resetValidation(){let P=Q;Ke(P,w.current)||(w.current=P,C(P)),s==="native"&&y(!1),p(!0)},commitValidation(){s==="native"&&y(!0),p(!0)}}}function ze(e){return e?Array.isArray(e)?e:[e]:[]}function Ui(e,a){if(typeof e=="function"){let t=e(a);if(t&&typeof t!="boolean")return ze(t)}return[]}function ia(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:ra}:null}function Ke(e,a){return e===a?!0:!!e&&!!a&&e.isInvalid===a.isInvalid&&e.validationErrors.length===a.validationErrors.length&&e.validationErrors.every((t,r)=>t===a.validationErrors[r])&&Object.entries(e.validationDetails).every(([t,r])=>a.validationDetails[t]===r)}function zi(...e){let a=new Set,t=!1,r={...ge};for(let o of e){var i,n;for(let s of o.validationErrors)a.add(s);for(let s in t||(t=o.isInvalid),r)(i=r)[n=s]||(i[n]=o.validationDetails[s])}return r.valid=!t,{isInvalid:t,validationErrors:[...a],validationDetails:r}}function na(e,a,t){let{validationBehavior:r,focus:i}=e;Et(()=>{if(r==="native"&&(t!=null&&t.current)&&!t.current.disabled){let d=a.realtimeValidation.isInvalid?a.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(d),t.current.hasAttribute("title")||(t.current.title=""),a.realtimeValidation.isInvalid||a.updateValidation(Gi(t.current))}});let n=(0,l.useRef)(!1),o=_(()=>{n.current||a.resetValidation()}),s=_(d=>{var m;a.displayValidation.isInvalid||a.commitValidation();let f=(m=t==null?void 0:t.current)==null?void 0:m.form;if(!d.defaultPrevented&&t&&f&&qi(f)===t.current){var c;i?i():(c=t.current)==null||c.focus(),qt("keyboard")}d.preventDefault()}),u=_(()=>{a.commitValidation()});(0,l.useEffect)(()=>{let d=t==null?void 0:t.current;if(!d)return;let f=d.form,c=f==null?void 0:f.reset;return f&&(f.reset=()=>{n.current=!window.event||window.event.type==="message"&&window.event.target instanceof MessagePort,c==null||c.call(f),n.current=!1}),d.addEventListener("invalid",s),d.addEventListener("change",u),f==null||f.addEventListener("reset",o),()=>{d.removeEventListener("invalid",s),d.removeEventListener("change",u),f==null||f.removeEventListener("reset",o),f&&(f.reset=c)}},[t,s,u,o,r])}function Ki(e){let a=e.validity;return{badInput:a.badInput,customError:a.customError,patternMismatch:a.patternMismatch,rangeOverflow:a.rangeOverflow,rangeUnderflow:a.rangeUnderflow,stepMismatch:a.stepMismatch,tooLong:a.tooLong,tooShort:a.tooShort,typeMismatch:a.typeMismatch,valueMissing:a.valueMissing,valid:a.valid}}function Gi(e){return{isInvalid:!e.validity.valid,validationDetails:Ki(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function qi(e){for(let a=0;a<e.elements.length;a++){let t=e.elements[a];if(!t.validity.valid)return t}return null}function Zi(e,a){let{inputElementType:t="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:n=!1,type:o="text",validationBehavior:s="aria"}=e,[u,d]=Ve(e.value,e.defaultValue||"",e.onChange),{focusableProps:f}=Qt(e,a),c=Ue({...e,value:u}),{isInvalid:m,validationErrors:v,validationDetails:b}=c.displayValidation,{labelProps:p,fieldProps:h,descriptionProps:g,errorMessageProps:E}=aa({...e,isInvalid:m,errorMessage:e.errorMessage||v}),C=z(e,{labelable:!0}),w={type:o,pattern:e.pattern},[N]=(0,l.useState)(u);return Te(a,e.defaultValue??N,d),na(e,c,a),(0,l.useEffect)(()=>{if(a.current instanceof H(a.current).HTMLTextAreaElement){let x=a.current;Object.defineProperty(x,"defaultValue",{get:()=>x.value,set:()=>{},configurable:!0})}},[a]),{labelProps:p,inputProps:V(C,t==="input"?w:void 0,{disabled:r,readOnly:n,required:i&&s==="native","aria-required":i&&s==="aria"||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:u,onChange:x=>d(x.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,enterKeyHint:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...f,...h}),descriptionProps:g,errorMessageProps:E,isInvalid:m,validationErrors:v,validationDetails:b}}function oa(){return typeof window<"u"&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"}function Yi(e,a,t){let r=_(c=>{let m=t.current;if(!m)return;let v=null;switch(c.inputType){case"historyUndo":case"historyRedo":return;case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":v=m.value.slice(0,m.selectionStart)+m.value.slice(m.selectionEnd);break;case"deleteContentForward":v=m.selectionEnd===m.selectionStart?m.value.slice(0,m.selectionStart)+m.value.slice(m.selectionEnd+1):m.value.slice(0,m.selectionStart)+m.value.slice(m.selectionEnd);break;case"deleteContentBackward":v=m.selectionEnd===m.selectionStart?m.value.slice(0,m.selectionStart-1)+m.value.slice(m.selectionStart):m.value.slice(0,m.selectionStart)+m.value.slice(m.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":v=m.value.slice(m.selectionStart);break;default:c.data!=null&&(v=m.value.slice(0,m.selectionStart)+c.data+m.value.slice(m.selectionEnd));break}(v==null||!a.validate(v))&&c.preventDefault()});(0,l.useEffect)(()=>{if(!oa()||!t.current)return;let c=t.current;return c.addEventListener("beforeinput",r,!1),()=>{c.removeEventListener("beforeinput",r,!1)}},[t,r]);let i=oa()?null:c=>{let m=c.target.value.slice(0,c.target.selectionStart)+c.data+c.target.value.slice(c.target.selectionEnd);a.validate(m)||c.preventDefault()},{labelProps:n,inputProps:o,descriptionProps:s,errorMessageProps:u,...d}=Zi(e,t),f=(0,l.useRef)(null);return{inputProps:V(o,{onBeforeInput:i,onCompositionStart(){let{value:c,selectionStart:m,selectionEnd:v}=t.current;f.current={value:c,selectionStart:m,selectionEnd:v}},onCompositionEnd(){if(t.current&&!a.validate(t.current.value)){let{value:c,selectionStart:m,selectionEnd:v}=f.current;t.current.value=c,t.current.setSelectionRange(m,v),a.setInputValue(c)}}}),labelProps:n,descriptionProps:s,errorMessageProps:u,...d}}if(typeof HTMLTemplateElement<"u"){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}var Ee=(0,l.createContext)(!1);function Xi(e){if((0,l.useContext)(Ee))return l.createElement(l.Fragment,null,e.children);let a=l.createElement(Ee.Provider,{value:!0},e.children);return l.createElement("template",{"data-react-aria-hidden":!0},a)}function Ge(e){let a=(t,r)=>(0,l.useContext)(Ee)?null:e(t,r);return a.displayName=e.displayName||e.name,(0,l.forwardRef)(a)}function Ji(){return(0,l.useContext)(Ee)}function la(e,a){let{elementType:t="button",isDisabled:r,onPress:i,onPressStart:n,onPressEnd:o,onPressUp:s,onPressChange:u,preventFocusOnPress:d,allowFocusWhenDisabled:f,onClick:c,href:m,target:v,rel:b,type:p="button"}=e,h;h=t==="button"?{type:p,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:t==="a"&&!r?m:void 0,target:t==="a"?v:void 0,type:t==="input"?p:void 0,disabled:t==="input"?r:void 0,"aria-disabled":!r||t==="input"?void 0:r,rel:t==="a"?b:void 0};let{pressProps:g,isPressed:E}=li({onPressStart:n,onPressEnd:o,onPressChange:u,onPress:i,onPressUp:s,onClick:c,isDisabled:r,preventFocusOnPress:d,ref:a}),{focusableProps:C}=Qt(e,a);f&&(C.tabIndex=r?-1:C.tabIndex);let w=V(C,g,z(e,{labelable:!0}));return{isPressed:E,buttonProps:V(h,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}function Qi(e){let{minValue:a,maxValue:t,step:r,formatOptions:i,value:n,defaultValue:o=NaN,onChange:s,locale:u,isDisabled:d,isReadOnly:f}=e;n===null&&(n=NaN),n!==void 0&&!isNaN(n)&&(n=r!==void 0&&!isNaN(r)?j(n,a,t,r):de(n,a,t)),isNaN(o)||(o=r!==void 0&&!isNaN(r)?j(o,a,t,r):de(o,a,t));let[c,m]=Ve(n,isNaN(o)?NaN:o,s),[v]=(0,l.useState)(c),[b,p]=(0,l.useState)(()=>isNaN(c)?"":new Me(u,i).format(c)),h=(0,l.useMemo)(()=>new je(u,i),[u,i]),g=(0,l.useMemo)(()=>h.getNumberingSystem(b),[h,b]),E=(0,l.useMemo)(()=>new Me(u,{...i,numberingSystem:g}),[u,i,g]),C=(0,l.useMemo)(()=>E.resolvedOptions(),[E]),w=(0,l.useCallback)(D=>isNaN(D)||D===null?"":E.format(D),[E]),N=Ue({...e,value:c}),x=r!==void 0&&!isNaN(r)?r:1;C.style==="percent"&&(r===void 0||isNaN(r))&&(x=.01);let[y,P]=(0,l.useState)(c),[M,$]=(0,l.useState)(u),[L,I]=(0,l.useState)(i);(!Object.is(c,y)||u!==M||i!==L)&&(p(w(c)),P(c),$(u),I(i));let S=(0,l.useMemo)(()=>h.parse(b),[h,b]),oe=()=>{if(!b.length){m(NaN),p(n===void 0?"":w(c));return}if(isNaN(S)){p(w(c));return}let D;D=r===void 0||isNaN(r)?de(S,a,t):j(S,a,t,r),D=h.parse(w(D)),m(D),p(w(n===void 0?D:c)),N.commitValidation()},q=(D,ue=0)=>{let W=S;if(isNaN(W))return j(isNaN(ue)?0:ue,a,t,x);{let te=j(W,a,t,x);return D==="+"&&te>W||D==="-"&&te<W?te:j(qe(D,W,x),a,t,x)}},ee=()=>{let D=q("+",a);D===c&&p(w(D)),m(D),N.commitValidation()},xe=()=>{let D=q("-",t);D===c&&p(w(D)),m(D),N.commitValidation()},le=()=>{t!=null&&(m(j(t,a,t,x)),N.commitValidation())},Ce=()=>{a!=null&&(m(a),N.commitValidation())},se=(0,l.useMemo)(()=>!d&&!f&&(isNaN(S)||t===void 0||isNaN(t)||j(S,a,t,x)>S||qe("+",S,x)<=t),[d,f,a,t,x,S]),De=(0,l.useMemo)(()=>!d&&!f&&(isNaN(S)||a===void 0||isNaN(a)||j(S,a,t,x)<S||qe("-",S,x)>=a),[d,f,a,t,x,S]);return{...N,validate:D=>h.isValidPartialNumber(D,a,t),increment:ee,incrementToMax:le,decrement:xe,decrementToMin:Ce,canIncrement:se,canDecrement:De,minValue:a,maxValue:t,numberValue:S,defaultNumberValue:isNaN(o)?v:o,setNumberValue:m,setInputValue:p,inputValue:b,commit:oe}}function qe(e,a,t){let r=e==="+"?a+t:a-t;if(a%1!=0||t%1!=0){let i=a.toString().split("."),n=t.toString().split("."),o=i[1]&&i[1].length||0,s=n[1]&&n[1].length||0,u=10**Math.max(o,s);a=Math.round(a*u),t=Math.round(t*u),r=e==="+"?a+t:a-t,r/=u}return r}var sa={};sa={Empty:"\u0641\u0627\u0631\u063A"};var ua={};ua={Empty:"\u0418\u0437\u043F\u0440\u0430\u0437\u043D\u0438"};var da={};da={Empty:"Pr\xE1zdn\xE9"};var ca={};ca={Empty:"Tom"};var ma={};ma={Empty:"Leer"};var fa={};fa={Empty:"\u0386\u03B4\u03B5\u03B9\u03BF"};var pa={};pa={Empty:"Empty"};var va={};va={Empty:"Vac\xEDo"};var ba={};ba={Empty:"T\xFChjenda"};var ha={};ha={Empty:"Tyhj\xE4"};var ga={};ga={Empty:"Vide"};var ya={};ya={Empty:"\u05E8\u05D9\u05E7"};var Ea={};Ea={Empty:"Prazno"};var Pa={};Pa={Empty:"\xDCres"};var wa={};wa={Empty:"Vuoto"};var La={};La={Empty:"\u7A7A"};var xa={};xa={Empty:"\uBE44\uC5B4 \uC788\uC74C"};var Ca={};Ca={Empty:"Tu\u0161\u010Dias"};var Da={};Da={Empty:"Tuk\u0161s"};var Na={};Na={Empty:"Tom"};var Sa={};Sa={Empty:"Leeg"};var Fa={};Fa={Empty:"Pusty"};var Ma={};Ma={Empty:"Vazio"};var Ta={};Ta={Empty:"Vazio"};var Va={};Va={Empty:"Gol"};var $a={};$a={Empty:"\u041D\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043E"};var ka={};ka={Empty:"Pr\xE1zdne"};var Ia={};Ia={Empty:"Prazen"};var Ra={};Ra={Empty:"Prazno"};var ja={};ja={Empty:"Tomt"};var Aa={};Aa={Empty:"Bo\u015F"};var Ba={};Ba={Empty:"\u041F\u0443\u0441\u0442\u043E"};var Oa={};Oa={Empty:"\u7A7A"};var Ha={};Ha={Empty:"\u7A7A\u767D"};var _a={};_a={"ar-AE":sa,"bg-BG":ua,"cs-CZ":da,"da-DK":ca,"de-DE":ma,"el-GR":fa,"en-US":pa,"es-ES":va,"et-EE":ba,"fi-FI":ha,"fr-FR":ga,"he-IL":ya,"hr-HR":Ea,"hu-HU":Pa,"it-IT":wa,"ja-JP":La,"ko-KR":xa,"lt-LT":Ca,"lv-LV":Da,"nb-NO":Na,"nl-NL":Sa,"pl-PL":Fa,"pt-BR":Ma,"pt-PT":Ta,"ro-RO":Va,"ru-RU":$a,"sk-SK":ka,"sl-SI":Ia,"sr-SP":Ra,"sv-SE":ja,"tr-TR":Aa,"uk-UA":Ba,"zh-CN":Oa,"zh-TW":Ha};function en(e){return e&&e.__esModule?e.default:e}function Wa(e){let a=(0,l.useRef)(void 0),{value:t,textValue:r,minValue:i,maxValue:n,isDisabled:o,isReadOnly:s,isRequired:u,onIncrement:d,onIncrementPage:f,onDecrement:c,onDecrementPage:m,onDecrementToMin:v,onIncrementToMax:b}=e,p=Re(en(_a),"@react-aria/spinbutton"),h=()=>clearTimeout(a.current);(0,l.useEffect)(()=>()=>h(),[]);let g=L=>{if(!(L.ctrlKey||L.metaKey||L.shiftKey||L.altKey||s||L.nativeEvent.isComposing))switch(L.key){case"PageUp":if(f){L.preventDefault(),f==null||f();break}case"ArrowUp":case"Up":d&&(L.preventDefault(),d==null||d());break;case"PageDown":if(m){L.preventDefault(),m==null||m();break}case"ArrowDown":case"Down":c&&(L.preventDefault(),c==null||c());break;case"Home":v&&(L.preventDefault(),v==null||v());break;case"End":b&&(L.preventDefault(),b==null||b());break}},E=(0,l.useRef)(!1),C=()=>{E.current=!0},w=()=>{E.current=!1},N=r===""?p.format("Empty"):(r||`${t}`).replace("-","\u2212");(0,l.useEffect)(()=>{E.current&&(yi("assertive"),ke(N,"assertive"))},[N]);let x=_(L=>{h(),d==null||d(),a.current=window.setTimeout(()=>{(n===void 0||isNaN(n)||t===void 0||isNaN(t)||t<n)&&x(60)},L)}),y=_(L=>{h(),c==null||c(),a.current=window.setTimeout(()=>{(i===void 0||isNaN(i)||t===void 0||isNaN(t)||t>i)&&y(60)},L)}),P=L=>{L.preventDefault()},{addGlobalListener:M,removeAllGlobalListeners:$}=Se();return{spinButtonProps:{role:"spinbutton","aria-valuenow":t!==void 0&&!isNaN(t)?t:void 0,"aria-valuetext":N,"aria-valuemin":i,"aria-valuemax":n,"aria-disabled":o||void 0,"aria-readonly":s||void 0,"aria-required":u||void 0,onKeyDown:g,onFocus:C,onBlur:w},incrementButtonProps:{onPressStart:()=>{x(400),M(window,"contextmenu",P)},onPressEnd:()=>{h(),$()},onFocus:C,onBlur:w},decrementButtonProps:{onPressStart:()=>{y(400),M(window,"contextmenu",P)},onPressEnd:()=>{h(),$()},onFocus:C,onBlur:w}}}var Ua={};Ua={decrease:e=>`\u062E\u0641\u0636 ${e.fieldLabel}`,increase:e=>`\u0632\u064A\u0627\u062F\u0629 ${e.fieldLabel}`,numberField:"\u062D\u0642\u0644 \u0631\u0642\u0645\u064A"};var za={};za={decrease:e=>`\u041D\u0430\u043C\u0430\u043B\u044F\u0432\u0430\u043D\u0435 ${e.fieldLabel}`,increase:e=>`\u0423\u0441\u0438\u043B\u0432\u0430\u043D\u0435 ${e.fieldLabel}`,numberField:"\u041D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043F\u043E\u043B\u0435\u0442\u043E"};var Ka={};Ka={decrease:e=>`Sn\xED\u017Eit ${e.fieldLabel}`,increase:e=>`Zv\xFD\u0161it ${e.fieldLabel}`,numberField:"\u010C\xEDseln\xE9 pole"};var Ga={};Ga={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xD8g ${e.fieldLabel}`,numberField:"Talfelt"};var qa={};qa={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xF6hen`,numberField:"Nummernfeld"};var Za={};Za={decrease:e=>`\u039C\u03B5\u03AF\u03C9\u03C3\u03B7 ${e.fieldLabel}`,increase:e=>`\u0391\u03CD\u03BE\u03B7\u03C3\u03B7 ${e.fieldLabel}`,numberField:"\u03A0\u03B5\u03B4\u03AF\u03BF \u03B1\u03C1\u03B9\u03B8\u03BC\u03BF\u03CD"};var Ya={};Ya={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var Xa={};Xa={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xFAmero"};var Ja={};Ja={decrease:e=>`V\xE4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xE4li"};var Qa={};Qa={decrease:e=>`V\xE4henn\xE4 ${e.fieldLabel}`,increase:e=>`Lis\xE4\xE4 ${e.fieldLabel}`,numberField:"Numerokentt\xE4"};var er={};er={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var tr={};tr={decrease:e=>`\u05D4\u05E7\u05D8\u05DF ${e.fieldLabel}`,increase:e=>`\u05D4\u05D2\u05D3\u05DC ${e.fieldLabel}`,numberField:"\u05E9\u05D3\u05D4 \u05DE\u05E1\u05E4\u05E8"};var ar={};ar={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u0107aj ${e.fieldLabel}`,numberField:"Polje broja"};var rr={};rr={decrease:e=>`${e.fieldLabel} cs\xF6kkent\xE9se`,increase:e=>`${e.fieldLabel} n\xF6vel\xE9se`,numberField:"Sz\xE1mmez\u0151"};var ir={};ir={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var nr={};nr={decrease:e=>`${e.fieldLabel}\u3092\u7E2E\u5C0F`,increase:e=>`${e.fieldLabel}\u3092\u62E1\u5927`,numberField:"\u6570\u5024\u30D5\u30A3\u30FC\u30EB\u30C9"};var or={};or={decrease:e=>`${e.fieldLabel} \uAC10\uC18C`,increase:e=>`${e.fieldLabel} \uC99D\uAC00`,numberField:"\uBC88\uD638 \uD544\uB4DC"};var lr={};lr={decrease:e=>`Suma\u017Einti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var sr={};sr={decrease:e=>`Samazin\u0101\u0161ana ${e.fieldLabel}`,increase:e=>`Palielin\u0101\u0161ana ${e.fieldLabel}`,numberField:"Skait\u013Cu lauks"};var ur={};ur={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xD8k ${e.fieldLabel}`,numberField:"Tallfelt"};var dr={};dr={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var cr={};cr={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u0119ksz ${e.fieldLabel}`,numberField:"Pole numeru"};var mr={};mr={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xFAmero"};var fr={};fr={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xE9rico"};var pr={};pr={decrease:e=>`Sc\u0103dere ${e.fieldLabel}`,increase:e=>`Cre\u0219tere ${e.fieldLabel}`,numberField:"C\xE2mp numeric"};var vr={};vr={decrease:e=>`\u0423\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0438\u0435 ${e.fieldLabel}`,increase:e=>`\u0423\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u0435 ${e.fieldLabel}`,numberField:"\u0427\u0438\u0441\u043B\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435"};var br={};br={decrease:e=>`Zn\xED\u017Ei\u0165 ${e.fieldLabel}`,increase:e=>`Zv\xFD\u0161i\u0165 ${e.fieldLabel}`,numberField:"\u010C\xEDseln\xE9 pole"};var hr={};hr={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u010Dajte ${e.fieldLabel}`,numberField:"\u0160tevil\u010Dno polje"};var gr={};gr={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u0107aj ${e.fieldLabel}`,numberField:"Polje broja"};var yr={};yr={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xD6ka ${e.fieldLabel}`,numberField:"Nummerf\xE4lt"};var Er={};Er={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u0131r`,numberField:"Say\u0131 alan\u0131"};var Pr={};Pr={decrease:e=>`\u0417\u043C\u0435\u043D\u0448\u0438\u0442\u0438 ${e.fieldLabel}`,increase:e=>`\u0417\u0431\u0456\u043B\u044C\u0448\u0438\u0442\u0438 ${e.fieldLabel}`,numberField:"\u041F\u043E\u043B\u0435 \u043D\u043E\u043C\u0435\u0440\u0430"};var wr={};wr={decrease:e=>`\u964D\u4F4E ${e.fieldLabel}`,increase:e=>`\u63D0\u9AD8 ${e.fieldLabel}`,numberField:"\u6570\u5B57\u5B57\u6BB5"};var Lr={};Lr={decrease:e=>`\u7E2E\u5C0F ${e.fieldLabel}`,increase:e=>`\u653E\u5927 ${e.fieldLabel}`,numberField:"\u6578\u5B57\u6B04\u4F4D"};var xr={};xr={"ar-AE":Ua,"bg-BG":za,"cs-CZ":Ka,"da-DK":Ga,"de-DE":qa,"el-GR":Za,"en-US":Ya,"es-ES":Xa,"et-EE":Ja,"fi-FI":Qa,"fr-FR":er,"he-IL":tr,"hr-HR":ar,"hu-HU":rr,"it-IT":ir,"ja-JP":nr,"ko-KR":or,"lt-LT":lr,"lv-LV":sr,"nb-NO":ur,"nl-NL":dr,"pl-PL":cr,"pt-BR":mr,"pt-PT":fr,"ro-RO":pr,"ru-RU":vr,"sk-SK":br,"sl-SI":hr,"sr-SP":gr,"sv-SE":yr,"tr-TR":Er,"uk-UA":Pr,"zh-CN":wr,"zh-TW":Lr};function tn(e){return e&&e.__esModule?e.default:e}function an(e,a,t){let{id:r,decrementAriaLabel:i,incrementAriaLabel:n,isDisabled:o,isReadOnly:s,isRequired:u,minValue:d,maxValue:f,autoFocus:c,label:m,formatOptions:v,onBlur:b=()=>{},onFocus:p,onFocusChange:h,onKeyDown:g,onKeyUp:E,description:C,errorMessage:w,isWheelDisabled:N,...x}=e,{increment:y,incrementToMax:P,decrement:M,decrementToMin:$,numberValue:L,inputValue:I,commit:S,commitValidation:oe}=a,q=Re(tn(xr),"@react-aria/numberfield"),ee=B(r),{focusProps:xe}=He({onBlur(){S()}}),le=Pt(v),Ce=(0,l.useMemo)(()=>le.resolvedOptions(),[le]),se=Pt({...v,currencySign:void 0}),{spinButtonProps:De,incrementButtonProps:tt,decrementButtonProps:D}=Wa({isDisabled:o,isReadOnly:s,isRequired:u,maxValue:f,minValue:d,onIncrement:y,onIncrementToMax:P,onDecrement:M,onDecrementToMin:$,value:L,textValue:(0,l.useMemo)(()=>isNaN(L)?"":se.format(L),[se,L])}),[ue,W]=(0,l.useState)(!1),{focusWithinProps:te}=_e({isDisabled:o,onFocusWithinChange:W});Hi({onScroll:(0,l.useCallback)(T=>{Math.abs(T.deltaY)<=Math.abs(T.deltaX)||(T.deltaY>0?y():T.deltaY<0&&M())},[M,y]),isDisabled:N||o||s||!ue},t);let at=(Ce.maximumFractionDigits??0)>0,rt=a.minValue===void 0||isNaN(a.minValue)||a.minValue<0,ae="numeric";ui()?rt?ae="text":at&&(ae="decimal"):si()&&(rt?ae="numeric":at&&(ae="decimal"));let Rr=T=>{a.validate(T)&&a.setInputValue(T)},jr=z(e),it=(0,l.useCallback)(T=>{T.nativeEvent.isComposing||(T.key==="Enter"?(S(),oe()):T.continuePropagation())},[S,oe]),{isInvalid:nt,validationErrors:Ar,validationDetails:Br}=a.displayValidation,{labelProps:ot,inputProps:Or,descriptionProps:Hr,errorMessageProps:_r}=Yi({...x,...jr,name:void 0,form:void 0,label:m,autoFocus:c,isDisabled:o,isReadOnly:s,isRequired:u,validate:void 0,[ye]:a,value:I,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:ee,type:"text",inputMode:ae,onChange:Rr,onBlur:b,onFocus:p,onFocusChange:h,onKeyDown:(0,l.useMemo)(()=>ti(it,g),[it,g]),onKeyUp:E,description:C,errorMessage:w},a,t);Te(t,a.defaultNumberValue,a.setNumberValue);let lt=V(De,xe,Or,{role:null,"aria-roledescription":ei()?null:q.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});e.validationBehavior==="native"&&(lt["aria-required"]=void 0);let st=T=>{var ct;document.activeElement!==t.current&&(T.pointerType==="mouse"?(ct=t.current)==null||ct.focus():T.target.focus())},Ne=e["aria-label"]||(typeof e.label=="string"?e.label:""),U;Ne||(U=e.label==null?e["aria-labelledby"]:ot.id);let ut=B(),dt=B(),Wr=V(tt,{"aria-label":n||q.format("increase",{fieldLabel:Ne}).trim(),id:U&&!n?ut:null,"aria-labelledby":U&&!n?`${ut} ${U}`:null,"aria-controls":ee,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!a.canIncrement,onPressStart:st}),Ur=V(D,{"aria-label":i||q.format("decrease",{fieldLabel:Ne}).trim(),id:U&&!i?dt:null,"aria-labelledby":U&&!i?`${dt} ${U}`:null,"aria-controls":ee,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!a.canDecrement,onPressStart:st});return{groupProps:{...te,role:"group","aria-disabled":o,"aria-invalid":nt?"true":void 0},labelProps:ot,inputProps:lt,incrementButtonProps:Wr,decrementButtonProps:Ur,errorMessageProps:_r,descriptionProps:Hr,isInvalid:nt,validationErrors:Ar,validationDetails:Br}}var Ze=(0,l.createContext)({}),rn=Ge(function(e,a){[e,a]=K(e,a,Ze);let{elementType:t="label",...r}=e;return l.createElement(t,{className:"react-aria-Label",...r,ref:a})}),nn=(0,l.createContext)(null),Ye=(0,l.createContext)({}),Cr=Ge(function(e,a){[e,a]=K(e,a,Ye);let t=e,{isPending:r}=t,{buttonProps:i,isPressed:n}=la(e,a);i=on(i,r);let{focusProps:o,isFocused:s,isFocusVisible:u}=he(e),{hoverProps:d,isHovered:f}=be({...e,isDisabled:e.isDisabled||r}),c={isHovered:f,isPressed:(t.isPressed||n)&&!r,isFocused:s,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:r??!1},m=Z({...e,values:c,defaultClassName:"react-aria-Button"}),v=B(i.id),b=B(),p=i["aria-labelledby"];r&&(p?p=`${p} ${b}`:i["aria-label"]&&(p=`${v} ${b}`));let h=(0,l.useRef)(r);(0,l.useEffect)(()=>{let E={"aria-labelledby":p||v};(!h.current&&s&&r||h.current&&s&&!r)&&ke(E,"assertive"),h.current=r},[r,s,p,v]);let g=z(e,{global:!0});return delete g.onClick,l.createElement("button",{...V(g,m,i,o,d),type:i.type==="submit"&&r?"button":i.type,id:v,ref:a,"aria-labelledby":p,slot:e.slot||void 0,"aria-disabled":r?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":c.isPressed||void 0,"data-hovered":f||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":u||void 0},l.createElement(nn.Provider,{value:{id:b}},m.children))});function on(e,a){if(a){for(let t in e)t.startsWith("on")&&!(t.includes("Focus")||t.includes("Blur"))&&(e[t]=void 0);e.href=void 0,e.target=void 0}return e}var Xe=(0,l.createContext)({}),Dr=(0,l.forwardRef)(function(e,a){[e,a]=K(e,a,Xe);let{elementType:t="span",...r}=e;return l.createElement(t,{className:"react-aria-Text",...r,ref:a})}),Pe=(0,l.createContext)(null),ln=(0,l.forwardRef)(function(e,a){var t;return(t=(0,l.useContext)(Pe))!=null&&t.isInvalid?l.createElement(sn,{...e,ref:a}):null}),sn=(0,l.forwardRef)((e,a)=>{let t=(0,l.useContext)(Pe),r=z(e,{global:!0}),i=Z({...e,defaultClassName:"react-aria-FieldError",defaultChildren:t.validationErrors.length===0?void 0:t.validationErrors.join(" "),values:t});return i.children==null?null:l.createElement(Dr,{slot:"errorMessage",...r,...i,ref:a})}),Nr=(0,l.createContext)(null),Je=(0,l.createContext)({}),un=(0,l.forwardRef)(function(e,a){[e,a]=K(e,a,Je);let{isDisabled:t,isInvalid:r,isReadOnly:i,onHoverStart:n,onHoverChange:o,onHoverEnd:s,...u}=e,{hoverProps:d,isHovered:f}=be({onHoverStart:n,onHoverChange:o,onHoverEnd:s,isDisabled:t}),{isFocused:c,isFocusVisible:m,focusProps:v}=he({within:!0});t??(t=!!e["aria-disabled"]&&e["aria-disabled"]!=="false"),r??(r=!!e["aria-invalid"]&&e["aria-invalid"]!=="false");let b=Z({...e,values:{isHovered:f,isFocusWithin:c,isFocusVisible:m,isDisabled:t,isInvalid:r},defaultClassName:"react-aria-Group"});return l.createElement("div",{...V(u,v,d),...b,ref:a,role:e.role??"group",slot:e.slot??void 0,"data-focus-within":c||void 0,"data-hovered":f||void 0,"data-focus-visible":m||void 0,"data-disabled":t||void 0,"data-invalid":r||void 0,"data-readonly":i||void 0},b.children)}),Qe=(0,l.createContext)({}),dn=e=>{let{onHoverStart:a,onHoverChange:t,onHoverEnd:r,...i}=e;return i},Sr=Ge(function(e,a){[e,a]=K(e,a,Qe);let{hoverProps:t,isHovered:r}=be(e),{isFocused:i,isFocusVisible:n,focusProps:o}=he({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",u=Z({...e,values:{isHovered:r,isFocused:i,isFocusVisible:n,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return l.createElement("input",{...V(dn(e),o,t),...u,ref:a,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":n||void 0,"data-invalid":s||void 0})}),cn=(0,l.createContext)(null),mn=(0,l.createContext)(null),fn=(0,l.forwardRef)(function(e,a){[e,a]=K(e,a,cn);let{validationBehavior:t}=$e(Nr)||{},r=e.validationBehavior??t??"native",{locale:i}=Fe(),n=Qi({...e,locale:i,validationBehavior:r}),o=(0,l.useRef)(null),[s,u]=Tt(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:c,incrementButtonProps:m,decrementButtonProps:v,descriptionProps:b,errorMessageProps:p,...h}=an({...Vt(e),label:u,validationBehavior:r},n,o),g=Z({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:h.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),E=z(e,{global:!0});return delete E.id,l.createElement(Mt,{values:[[mn,n],[Je,f],[Qe,{...c,ref:o}],[Ze,{...d,ref:s}],[Ye,{slots:{increment:m,decrement:v}}],[Xe,{slots:{description:b,errorMessage:p}}],[Pe,h]]},l.createElement("div",{...E,...g,ref:a,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":h.isInvalid||void 0}),e.name&&l.createElement("input",{type:"hidden",name:e.name,form:e.form,value:isNaN(n.numberValue)?"":n.numberValue,disabled:e.isDisabled||void 0}))}),Fr=ft(),F=mt(Kr(),1);const et=l.forwardRef((e,a)=>{let t=(0,Fr.c)(40),{placeholder:r,variant:i,...n}=e,o=i===void 0?"default":i,{locale:s}=Fe(),u=fn,d;t[0]===s?d=t[1]:(d=ci(s),t[0]=s,t[1]=d);let f;t[2]===d?f=t[3]:(f={minimumFractionDigits:0,maximumFractionDigits:d},t[2]=d,t[3]=f);let c=R("shadow-xs-solid hover:shadow-sm-solid hover:focus-within:shadow-md-solid","flex overflow-hidden rounded-sm border border-input bg-background text-sm font-code ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-xs-solid","focus-within:shadow-md-solid focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring focus-within:border-primary",o==="default"?"h-6 w-full mb-1":"h-4 w-full mb-0.5",o==="xs"&&"text-xs",n.className),m=n.isDisabled,v=o==="default"?"px-1.5":"px-1",b;t[4]===v?b=t[5]:(b=R("flex-1","w-full","placeholder:text-muted-foreground","outline-hidden","disabled:cursor-not-allowed disabled:opacity-50",v),t[4]=v,t[5]=b);let p;t[6]!==r||t[7]!==n.isDisabled||t[8]!==a||t[9]!==b?(p=(0,F.jsx)(Sr,{ref:a,disabled:m,placeholder:r,onKeyDown:pn,className:b}),t[6]=r,t[7]=n.isDisabled,t[8]=a,t[9]=b,t[10]=p):p=t[10];let h=n.isDisabled,g=o==="xs"&&"w-2 h-2",E;t[11]===g?E=t[12]:(E=R("w-3 h-3 -mb-px",g),t[11]=g,t[12]=E);let C;t[13]===E?C=t[14]:(C=(0,F.jsx)(Yr,{"aria-hidden":!0,className:E}),t[13]=E,t[14]=C);let w;t[15]!==n.isDisabled||t[16]!==C||t[17]!==o?(w=(0,F.jsx)(Mr,{slot:"increment",isDisabled:h,variant:o,children:C}),t[15]=n.isDisabled,t[16]=C,t[17]=o,t[18]=w):w=t[18];let N;t[19]===Symbol.for("react.memo_cache_sentinel")?(N=(0,F.jsx)("div",{className:"h-px shrink-0 divider bg-border z-10"}),t[19]=N):N=t[19];let x=n.isDisabled,y=o==="xs"&&"w-2 h-2",P;t[20]===y?P=t[21]:(P=R("w-3 h-3 -mt-px",y),t[20]=y,t[21]=P);let M;t[22]===P?M=t[23]:(M=(0,F.jsx)(Zr,{"aria-hidden":!0,className:P}),t[22]=P,t[23]=M);let $;t[24]!==n.isDisabled||t[25]!==M||t[26]!==o?($=(0,F.jsx)(Mr,{slot:"decrement",isDisabled:x,variant:o,children:M}),t[24]=n.isDisabled,t[25]=M,t[26]=o,t[27]=$):$=t[27];let L;t[28]!==w||t[29]!==$?(L=(0,F.jsxs)("div",{className:"flex flex-col border-s-2",children:[w,N,$]}),t[28]=w,t[29]=$,t[30]=L):L=t[30];let I;t[31]!==L||t[32]!==c||t[33]!==p?(I=(0,F.jsxs)("div",{className:c,children:[p,L]}),t[31]=L,t[32]=c,t[33]=p,t[34]=I):I=t[34];let S;return t[35]!==u||t[36]!==n||t[37]!==I||t[38]!==f?(S=(0,F.jsx)(u,{...n,formatOptions:f,children:I}),t[35]=u,t[36]=n,t[37]=I,t[38]=f,t[39]=S):S=t[39],S});et.displayName="NumberField";var Mr=e=>{let a=(0,Fr.c)(6),t=!e.isDisabled&&"hover:text-primary hover:bg-muted",r=e.variant==="default"?"px-0.5":"px-0.25",i;a[0]!==t||a[1]!==r?(i=R("cursor-default text-muted-foreground pressed:bg-muted-foreground group-disabled:text-disabled-foreground outline-hidden focus-visible:text-primary","disabled:cursor-not-allowed disabled:opacity-50",t,r),a[0]=t,a[1]=r,a[2]=i):i=a[2];let n;return a[3]!==e||a[4]!==i?(n=(0,F.jsx)(Cr,{...e,className:i}),a[3]=e,a[4]=i,a[5]=n):n=a[5],n};function pn(e){(e.key==="ArrowUp"||e.key==="ArrowDown")&&e.stopPropagation()}var we=ft(),Le=l.forwardRef((e,a)=>{let t=(0,we.c)(28),r,i,n,o,s,u,d;if(t[0]!==a||t[1]!==e){u=Symbol.for("react.early_return_sentinel");e:{if({className:r,type:d,endAdornment:i,...o}=e,n=o.icon,d==="hidden"){u=(0,F.jsx)("input",{type:"hidden",ref:a,...o});break e}s=R("relative",o.rootClassName)}t[0]=a,t[1]=e,t[2]=r,t[3]=i,t[4]=n,t[5]=o,t[6]=s,t[7]=u,t[8]=d}else r=t[2],i=t[3],n=t[4],o=t[5],s=t[6],u=t[7],d=t[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let f;t[9]===n?f=t[10]:(f=n&&(0,F.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-[6px] pointer-events-none text-muted-foreground",children:n}),t[9]=n,t[10]=f);let c=n&&"pl-7",m=i&&"pr-10",v;t[11]!==r||t[12]!==c||t[13]!==m?(v=R("shadow-xs-solid hover:shadow-sm-solid disabled:shadow-xs-solid focus-visible:shadow-md-solid","flex h-6 w-full mb-1 rounded-sm border border-input bg-background px-1.5 py-1 text-sm font-code ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50",c,m,r),t[11]=r,t[12]=c,t[13]=m,t[14]=v):v=t[14];let b;t[15]===Symbol.for("react.memo_cache_sentinel")?(b=Gr.stopPropagation(),t[15]=b):b=t[15];let p;t[16]!==o||t[17]!==a||t[18]!==v||t[19]!==d?(p=(0,F.jsx)("input",{type:d,className:v,ref:a,onClick:b,...o}),t[16]=o,t[17]=a,t[18]=v,t[19]=d,t[20]=p):p=t[20];let h;t[21]===i?h=t[22]:(h=i&&(0,F.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-[6px] text-muted-foreground h-6",children:i}),t[21]=i,t[22]=h);let g;return t[23]!==s||t[24]!==f||t[25]!==p||t[26]!==h?(g=(0,F.jsxs)("div",{className:s,children:[f,p,h]}),t[23]=s,t[24]=f,t[25]=p,t[26]=h,t[27]=g):g=t[27],g});Le.displayName="Input";const Tr=l.forwardRef((e,a)=>{let t=(0,we.c)(16),r,i,n;t[0]===e?(r=t[1],i=t[2],n=t[3]):({className:r,onValueChange:i,...n}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=n);let o;t[4]!==i||t[5]!==n.delay||t[6]!==n.value?(o={initialValue:n.value,delay:n.delay,onChange:i},t[4]=i,t[5]=n.delay,t[6]=n.value,t[7]=o):o=t[7];let{value:s,onChange:u}=wt(o),d;t[8]===u?d=t[9]:(d=c=>u(c.target.value),t[8]=u,t[9]=d);let f;return t[10]!==r||t[11]!==n||t[12]!==a||t[13]!==d||t[14]!==s?(f=(0,F.jsx)(Le,{ref:a,className:r,...n,onChange:d,value:s}),t[10]=r,t[11]=n,t[12]=a,t[13]=d,t[14]=s,t[15]=f):f=t[15],f});Tr.displayName="DebouncedInput";const Vr=l.forwardRef((e,a)=>{let t=(0,we.c)(13),r,i,n;t[0]===e?(r=t[1],i=t[2],n=t[3]):({className:r,onValueChange:i,...n}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=n);let o;t[4]!==i||t[5]!==n.value?(o={initialValue:n.value,delay:200,onChange:i},t[4]=i,t[5]=n.value,t[6]=o):o=t[6];let{value:s,onChange:u}=wt(o),d;return t[7]!==r||t[8]!==u||t[9]!==n||t[10]!==a||t[11]!==s?(d=(0,F.jsx)(et,{ref:a,className:r,...n,onChange:u,value:s}),t[7]=r,t[8]=u,t[9]=n,t[10]=a,t[11]=s,t[12]=d):d=t[12],d});Vr.displayName="DebouncedNumberInput";const $r=l.forwardRef(({className:e,rootClassName:a,icon:t=(0,F.jsx)(Lt,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),clearable:r=!0,...i},n)=>{let o=l.useId(),s=i.id||o;return(0,F.jsxs)("div",{className:R("flex items-center border-b px-3",a),children:[t,(0,F.jsx)("input",{id:s,ref:n,className:R("placeholder:text-foreground-muted flex h-7 m-1 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...i}),r&&i.value&&(0,F.jsx)("span",{onPointerDown:u=>{var f;u.preventDefault(),u.stopPropagation();let d=document.getElementById(s);d&&d instanceof HTMLInputElement&&(d.focus(),d.value="",(f=i.onChange)==null||f.call(i,{...u,target:d,currentTarget:d,type:"change"}))},children:(0,F.jsx)(Xr,{className:"h-4 w-4 opacity-50 hover:opacity-90 cursor-pointer"})})]})});$r.displayName="SearchInput";const kr=l.forwardRef((e,a)=>{let t=(0,we.c)(23),r,i,n;t[0]===e?(r=t[1],i=t[2],n=t[3]):({className:r,onValueChange:i,...n}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=n);let[o,s]=l.useState(n.value),u;t[4]!==o||t[5]!==i||t[6]!==n.value?(u={prop:n.value,defaultProp:o,onChange:i},t[4]=o,t[5]=i,t[6]=n.value,t[7]=u):u=t[7];let[d,f]=Jr(u),c,m;t[8]===d?(c=t[9],m=t[10]):(c=()=>{s(d||"")},m=[d],t[8]=d,t[9]=c,t[10]=m),l.useEffect(c,m);let v;t[11]===Symbol.for("react.memo_cache_sentinel")?(v=g=>s(g.target.value),t[11]=v):v=t[11];let b,p;t[12]!==o||t[13]!==f?(b=()=>f(o||""),p=g=>{g.key==="Enter"&&f(o||"")},t[12]=o,t[13]=f,t[14]=b,t[15]=p):(b=t[14],p=t[15]);let h;return t[16]!==r||t[17]!==o||t[18]!==n||t[19]!==a||t[20]!==b||t[21]!==p?(h=(0,F.jsx)(Le,{ref:a,className:r,...n,value:o,onChange:v,onBlur:b,onKeyDown:p}),t[16]=r,t[17]=o,t[18]=n,t[19]=a,t[20]=b,t[21]=p,t[22]=h):h=t[22],h});kr.displayName="OnBlurredInput";export{Ft as $,aa as A,ki as B,Ji as C,ge as D,ye as E,Jt as F,Rt as G,je as H,Xt as I,Mt as J,Ie as K,Zt as L,he as M,be as N,Q as O,_e as P,gi as Q,Gt as R,Xi as S,zi as T,At as U,Oe as V,Re as W,Z as X,K as Y,Tt as Z,Cr as _,$r as a,St as at,Wa as b,Sr as c,z as ct,Nr as d,Vt as et,ln as f,Ye as g,Xe as h,kr as i,Te as it,ta as j,Ue as k,un as l,Lt as lt,Dr as m,Vr as n,de as nt,et as o,Nt as ot,Pe as p,ke as q,Le as r,Ve as rt,Qe as s,Dt as st,Tr as t,$e as tt,Je as u,Ze as v,na as w,la as x,rn as y,qt as z};
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as b}from"./react-BGmjiNul.js";import{t as g}from"./compiler-runtime-DeeZ7FnK.js";import{t as w}from"./jsx-runtime-ZmTK25f3.js";import{n as c}from"./clsx-D8GwTfvk.js";import{n as p}from"./cn-BKtXLv3a.js";const y=p("flex items-center justify-center m-0 leading-none font-medium border border-foreground/10 shadow-xs-solid active:shadow-none dark:border-border text-sm",{variants:{color:{gray:"mo-button gray",white:"mo-button white",green:"mo-button green",red:"mo-button red",yellow:"mo-button yellow","hint-green":"mo-button hint-green",disabled:"mo-button disabled active:shadow-xs-solid"},shape:{rectangle:"rounded",circle:"rounded-full"},size:{small:"",medium:""}},compoundVariants:[{size:"small",shape:"circle",class:"h-[24px] w-[24px] px-[5.5px] py-[5.5px]"},{size:"medium",shape:"circle",class:"px-2 py-2"},{size:"small",shape:"rectangle",class:"px-1 py-1 h-[24px] w-[24px]"},{size:"medium",shape:"rectangle",class:"px-3 py-2"}],defaultVariants:{color:"gray",size:"medium",shape:"rectangle"}}),z=p("font-mono w-full flex-1 inline-flex items-center justify-center rounded px-2.5 text-foreground/60 h-[36px] hover:shadow-md hover:cursor-pointer focus:shadow-md focus:outline-hidden text-[hsl(0, 0%, 43.5%)] bg-transparent hover:bg-background focus:bg-background");var u=g(),f=m(b(),1),h=m(w(),1);const x=f.forwardRef((a,n)=>{let e=(0,u.c)(15),r,s,o,t,l;e[0]===a?(r=e[1],s=e[2],o=e[3],t=e[4],l=e[5]):({color:s,shape:t,size:l,className:r,...o}=a,e[0]=a,e[1]=r,e[2]=s,e[3]=o,e[4]=t,e[5]=l);let i;e[6]!==r||e[7]!==s||e[8]!==t||e[9]!==l?(i=c(y({color:s,shape:t,size:l}),r),e[6]=r,e[7]=s,e[8]=t,e[9]=l,e[10]=i):i=e[10];let d;return e[11]!==o||e[12]!==n||e[13]!==i?(d=(0,h.jsx)("button",{ref:n,className:i,...o,children:o.children}),e[11]=o,e[12]=n,e[13]=i,e[14]=d):d=e[14],d});x.displayName="Button";const v=f.forwardRef((a,n)=>{let e=(0,u.c)(9),r,s;e[0]===a?(r=e[1],s=e[2]):({className:r,...s}=a,e[0]=a,e[1]=r,e[2]=s);let o;e[3]===r?o=e[4]:(o=c(z(),r),e[3]=r,e[4]=o);let t;return e[5]!==s||e[6]!==n||e[7]!==o?(t=(0,h.jsx)("input",{ref:n,className:o,...s}),e[5]=s,e[6]=n,e[7]=o,e[8]=t):t=e[8],t});v.displayName="Input";export{x as t};
import{t as o}from"./toDate-CgbKQM5E.js";function e(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function r(t){return!(!e(t)&&typeof t!="number"||isNaN(+o(t)))}export{r as t};
import{i as s,n as a,r,t}from"./javascript-i8I6A_gg.js";export{t as javascript,a as json,r as jsonld,s as typescript};
function ar(b){var kr=b.statementIndent,ir=b.jsonld,yr=b.json||ir,p=b.typescript,K=b.wordCharacters||/[\w$\xa1-\uffff]/,vr=(function(){function r(x){return{type:x,style:"keyword"}}var e=r("keyword a"),n=r("keyword b"),i=r("keyword c"),u=r("keyword d"),l=r("operator"),m={type:"atom",style:"atom"};return{if:r("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:u,break:u,continue:u,new:r("new"),delete:i,void:i,throw:i,debugger:r("debugger"),var:r("var"),const:r("var"),let:r("var"),function:r("function"),catch:r("catch"),for:r("for"),switch:r("switch"),case:r("case"),default:r("default"),in:l,typeof:l,instanceof:l,true:m,false:m,null:m,undefined:m,NaN:m,Infinity:m,this:r("this"),class:r("class"),super:r("atom"),yield:i,export:r("export"),import:r("import"),extends:i,await:i}})(),wr=/[+\-*&%=<>!?|~^@]/,Ir=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function Sr(r){for(var e=!1,n,i=!1;(n=r.next())!=null;){if(!e){if(n=="/"&&!i)return;n=="["?i=!0:i&&n=="]"&&(i=!1)}e=!e&&n=="\\"}}var D,L;function y(r,e,n){return D=r,L=n,e}function O(r,e){var n=r.next();if(n=='"'||n=="'")return e.tokenize=Nr(n),e.tokenize(r,e);if(n=="."&&r.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return y("number","number");if(n=="."&&r.match(".."))return y("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return y(n);if(n=="="&&r.eat(">"))return y("=>","operator");if(n=="0"&&r.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return y("number","number");if(/\d/.test(n))return r.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),y("number","number");if(n=="/")return r.eat("*")?(e.tokenize=M,M(r,e)):r.eat("/")?(r.skipToEnd(),y("comment","comment")):le(r,e,1)?(Sr(r),r.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),y("regexp","string.special")):(r.eat("="),y("operator","operator",r.current()));if(n=="`")return e.tokenize=F,F(r,e);if(n=="#"&&r.peek()=="!")return r.skipToEnd(),y("meta","meta");if(n=="#"&&r.eatWhile(K))return y("variable","property");if(n=="<"&&r.match("!--")||n=="-"&&r.match("->")&&!/\S/.test(r.string.slice(0,r.start)))return r.skipToEnd(),y("comment","comment");if(wr.test(n))return(n!=">"||!e.lexical||e.lexical.type!=">")&&(r.eat("=")?(n=="!"||n=="=")&&r.eat("="):/[<>*+\-|&?]/.test(n)&&(r.eat(n),n==">"&&r.eat(n))),n=="?"&&r.eat(".")?y("."):y("operator","operator",r.current());if(K.test(n)){r.eatWhile(K);var i=r.current();if(e.lastType!="."){if(vr.propertyIsEnumerable(i)){var u=vr[i];return y(u.type,u.style,i)}if(i=="async"&&r.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return y("async","keyword",i)}return y("variable","variable",i)}}function Nr(r){return function(e,n){var i=!1,u;if(ir&&e.peek()=="@"&&e.match(Ir))return n.tokenize=O,y("jsonld-keyword","meta");for(;(u=e.next())!=null&&!(u==r&&!i);)i=!i&&u=="\\";return i||(n.tokenize=O),y("string","string")}}function M(r,e){for(var n=!1,i;i=r.next();){if(i=="/"&&n){e.tokenize=O;break}n=i=="*"}return y("comment","comment")}function F(r,e){for(var n=!1,i;(i=r.next())!=null;){if(!n&&(i=="`"||i=="$"&&r.eat("{"))){e.tokenize=O;break}n=!n&&i=="\\"}return y("quasi","string.special",r.current())}var Pr="([{}])";function ur(r,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=r.string.indexOf("=>",r.start);if(!(n<0)){if(p){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(r.string.slice(r.start,n));i&&(n=i.index)}for(var u=0,l=!1,m=n-1;m>=0;--m){var x=r.string.charAt(m),g=Pr.indexOf(x);if(g>=0&&g<3){if(!u){++m;break}if(--u==0){x=="("&&(l=!0);break}}else if(g>=3&&g<6)++u;else if(K.test(x))l=!0;else if(/["'\/`]/.test(x))for(;;--m){if(m==0)return;if(r.string.charAt(m-1)==x&&r.string.charAt(m-2)!="\\"){m--;break}}else if(l&&!u){++m;break}}l&&!u&&(e.fatArrowAt=m)}}var Cr={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function br(r,e,n,i,u,l){this.indented=r,this.column=e,this.type=n,this.prev=u,this.info=l,i!=null&&(this.align=i)}function Wr(r,e){for(var n=r.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=r.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==e)return!0}function Br(r,e,n,i,u){var l=r.cc;for(a.state=r,a.stream=u,a.marked=null,a.cc=l,a.style=e,r.lexical.hasOwnProperty("align")||(r.lexical.align=!0);;)if((l.length?l.pop():yr?k:v)(n,i)){for(;l.length&&l[l.length-1].lex;)l.pop()();return a.marked?a.marked:n=="variable"&&Wr(r,i)?"variableName.local":e}}var a={state:null,column:null,marked:null,cc:null};function f(){for(var r=arguments.length-1;r>=0;r--)a.cc.push(arguments[r])}function t(){return f.apply(null,arguments),!0}function or(r,e){for(var n=e;n;n=n.next)if(n.name==r)return!0;return!1}function S(r){var e=a.state;if(a.marked="def",e.context){if(e.lexical.info=="var"&&e.context&&e.context.block){var n=hr(r,e.context);if(n!=null){e.context=n;return}}else if(!or(r,e.localVars)){e.localVars=new G(r,e.localVars);return}}b.globalVars&&!or(r,e.globalVars)&&(e.globalVars=new G(r,e.globalVars))}function hr(r,e){if(e)if(e.block){var n=hr(r,e.prev);return n?n==e.prev?e:new U(n,e.vars,!0):null}else return or(r,e.vars)?e:new U(e.prev,new G(r,e.vars),!1);else return null}function Q(r){return r=="public"||r=="private"||r=="protected"||r=="abstract"||r=="readonly"}function U(r,e,n){this.prev=r,this.vars=e,this.block=n}function G(r,e){this.name=r,this.next=e}var Dr=new G("this",new G("arguments",null));function _(){a.state.context=new U(a.state.context,a.state.localVars,!1),a.state.localVars=Dr}function R(){a.state.context=new U(a.state.context,a.state.localVars,!0),a.state.localVars=null}_.lex=R.lex=!0;function V(){a.state.localVars=a.state.context.vars,a.state.context=a.state.context.prev}V.lex=!0;function s(r,e){var n=function(){var i=a.state,u=i.indented;if(i.lexical.type=="stat")u=i.lexical.indented;else for(var l=i.lexical;l&&l.type==")"&&l.align;l=l.prev)u=l.indented;i.lexical=new br(u,a.stream.column(),r,null,i.lexical,e)};return n.lex=!0,n}function o(){var r=a.state;r.lexical.prev&&(r.lexical.type==")"&&(r.indented=r.lexical.indented),r.lexical=r.lexical.prev)}o.lex=!0;function c(r){function e(n){return n==r?t():r==";"||n=="}"||n==")"||n=="]"?f():t(e)}return e}function v(r,e){return r=="var"?t(s("vardef",e),dr,c(";"),o):r=="keyword a"?t(s("form"),fr,v,o):r=="keyword b"?t(s("form"),v,o):r=="keyword d"?a.stream.match(/^\s*$/,!1)?t():t(s("stat"),N,c(";"),o):r=="debugger"?t(c(";")):r=="{"?t(s("}"),R,Z,o,V):r==";"?t():r=="if"?(a.state.lexical.info=="else"&&a.state.cc[a.state.cc.length-1]==o&&a.state.cc.pop()(),t(s("form"),fr,v,o,Tr)):r=="function"?t($):r=="for"?t(s("form"),R,jr,v,V,o):r=="class"||p&&e=="interface"?(a.marked="keyword",t(s("form",r=="class"?r:e),Or,o)):r=="variable"?p&&e=="declare"?(a.marked="keyword",t(v)):p&&(e=="module"||e=="enum"||e=="type")&&a.stream.match(/^\s*\w/,!1)?(a.marked="keyword",e=="enum"?t(Er):e=="type"?t($r,c("operator"),d,c(";")):t(s("form"),z,c("{"),s("}"),Z,o,o)):p&&e=="namespace"?(a.marked="keyword",t(s("form"),k,v,o)):p&&e=="abstract"?(a.marked="keyword",t(v)):t(s("stat"),Kr):r=="switch"?t(s("form"),fr,c("{"),s("}","switch"),R,Z,o,o,V):r=="case"?t(k,c(":")):r=="default"?t(c(":")):r=="catch"?t(s("form"),_,Fr,v,o,V):r=="export"?t(s("stat"),ie,o):r=="import"?t(s("stat"),ue,o):r=="async"?t(v):e=="@"?t(k,v):f(s("stat"),k,c(";"),o)}function Fr(r){if(r=="(")return t(I,c(")"))}function k(r,e){return xr(r,e,!1)}function h(r,e){return xr(r,e,!0)}function fr(r){return r=="("?t(s(")"),N,c(")"),o):f()}function xr(r,e,n){if(a.state.fatArrowAt==a.stream.start){var i=n?Vr:gr;if(r=="(")return t(_,s(")"),w(I,")"),o,c("=>"),i,V);if(r=="variable")return f(_,z,c("=>"),i,V)}var u=n?P:q;return Cr.hasOwnProperty(r)?t(u):r=="function"?t($,u):r=="class"||p&&e=="interface"?(a.marked="keyword",t(s("form"),ae,o)):r=="keyword c"||r=="async"?t(n?h:k):r=="("?t(s(")"),N,c(")"),o,u):r=="operator"||r=="spread"?t(n?h:k):r=="["?t(s("]"),fe,o,u):r=="{"?H(Y,"}",null,u):r=="quasi"?f(X,u):r=="new"?t(Gr(n)):t()}function N(r){return r.match(/[;\}\)\],]/)?f():f(k)}function q(r,e){return r==","?t(N):P(r,e,!1)}function P(r,e,n){var i=n==0?q:P,u=n==0?k:h;if(r=="=>")return t(_,n?Vr:gr,V);if(r=="operator")return/\+\+|--/.test(e)||p&&e=="!"?t(i):p&&e=="<"&&a.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?t(s(">"),w(d,">"),o,i):e=="?"?t(k,c(":"),u):t(u);if(r=="quasi")return f(X,i);if(r!=";"){if(r=="(")return H(h,")","call",i);if(r==".")return t(Lr,i);if(r=="[")return t(s("]"),N,c("]"),o,i);if(p&&e=="as")return a.marked="keyword",t(d,i);if(r=="regexp")return a.state.lastType=a.marked="operator",a.stream.backUp(a.stream.pos-a.stream.start-1),t(u)}}function X(r,e){return r=="quasi"?e.slice(e.length-2)=="${"?t(N,Ur):t(X):f()}function Ur(r){if(r=="}")return a.marked="string.special",a.state.tokenize=F,t(X)}function gr(r){return ur(a.stream,a.state),f(r=="{"?v:k)}function Vr(r){return ur(a.stream,a.state),f(r=="{"?v:h)}function Gr(r){return function(e){return e=="."?t(r?Jr:Hr):e=="variable"&&p?t(Zr,r?P:q):f(r?h:k)}}function Hr(r,e){if(e=="target")return a.marked="keyword",t(q)}function Jr(r,e){if(e=="target")return a.marked="keyword",t(P)}function Kr(r){return r==":"?t(o,v):f(q,c(";"),o)}function Lr(r){if(r=="variable")return a.marked="property",t()}function Y(r,e){if(r=="async")return a.marked="property",t(Y);if(r=="variable"||a.style=="keyword"){if(a.marked="property",e=="get"||e=="set")return t(Mr);var n;return p&&a.state.fatArrowAt==a.stream.start&&(n=a.stream.match(/^\s*:\s*/,!1))&&(a.state.fatArrowAt=a.stream.pos+n[0].length),t(E)}else{if(r=="number"||r=="string")return a.marked=ir?"property":a.style+" property",t(E);if(r=="jsonld-keyword")return t(E);if(p&&Q(e))return a.marked="keyword",t(Y);if(r=="[")return t(k,C,c("]"),E);if(r=="spread")return t(h,E);if(e=="*")return a.marked="keyword",t(Y);if(r==":")return f(E)}}function Mr(r){return r=="variable"?(a.marked="property",t($)):f(E)}function E(r){if(r==":")return t(h);if(r=="(")return f($)}function w(r,e,n){function i(u,l){if(n?n.indexOf(u)>-1:u==","){var m=a.state.lexical;return m.info=="call"&&(m.pos=(m.pos||0)+1),t(function(x,g){return x==e||g==e?f():f(r)},i)}return u==e||l==e?t():n&&n.indexOf(";")>-1?f(r):t(c(e))}return function(u,l){return u==e||l==e?t():f(r,i)}}function H(r,e,n){for(var i=3;i<arguments.length;i++)a.cc.push(arguments[i]);return t(s(e,n),w(r,e),o)}function Z(r){return r=="}"?t():f(v,Z)}function C(r,e){if(p){if(r==":")return t(d);if(e=="?")return t(C)}}function Qr(r,e){if(p&&(r==":"||e=="in"))return t(d)}function zr(r){if(p&&r==":")return a.stream.match(/^\s*\w+\s+is\b/,!1)?t(k,Rr,d):t(d)}function Rr(r,e){if(e=="is")return a.marked="keyword",t()}function d(r,e){if(e=="keyof"||e=="typeof"||e=="infer"||e=="readonly")return a.marked="keyword",t(e=="typeof"?h:d);if(r=="variable"||e=="void")return a.marked="type",t(A);if(e=="|"||e=="&")return t(d);if(r=="string"||r=="number"||r=="atom")return t(A);if(r=="[")return t(s("]"),w(d,"]",","),o,A);if(r=="{")return t(s("}"),sr,o,A);if(r=="(")return t(w(lr,")"),Xr,A);if(r=="<")return t(w(d,">"),d);if(r=="quasi")return f(cr,A)}function Xr(r){if(r=="=>")return t(d)}function sr(r){return r.match(/[\}\)\]]/)?t():r==","||r==";"?t(sr):f(J,sr)}function J(r,e){if(r=="variable"||a.style=="keyword")return a.marked="property",t(J);if(e=="?"||r=="number"||r=="string")return t(J);if(r==":")return t(d);if(r=="[")return t(c("variable"),Qr,c("]"),J);if(r=="(")return f(B,J);if(!r.match(/[;\}\)\],]/))return t()}function cr(r,e){return r=="quasi"?e.slice(e.length-2)=="${"?t(d,Yr):t(cr):f()}function Yr(r){if(r=="}")return a.marked="string.special",a.state.tokenize=F,t(cr)}function lr(r,e){return r=="variable"&&a.stream.match(/^\s*[?:]/,!1)||e=="?"?t(lr):r==":"?t(d):r=="spread"?t(lr):f(d)}function A(r,e){if(e=="<")return t(s(">"),w(d,">"),o,A);if(e=="|"||r=="."||e=="&")return t(d);if(r=="[")return t(d,c("]"),A);if(e=="extends"||e=="implements")return a.marked="keyword",t(d);if(e=="?")return t(d,c(":"),d)}function Zr(r,e){if(e=="<")return t(s(">"),w(d,">"),o,A)}function rr(){return f(d,re)}function re(r,e){if(e=="=")return t(d)}function dr(r,e){return e=="enum"?(a.marked="keyword",t(Er)):f(z,C,j,te)}function z(r,e){if(p&&Q(e))return a.marked="keyword",t(z);if(r=="variable")return S(e),t();if(r=="spread")return t(z);if(r=="[")return H(ee,"]");if(r=="{")return H(Ar,"}")}function Ar(r,e){return r=="variable"&&!a.stream.match(/^\s*:/,!1)?(S(e),t(j)):(r=="variable"&&(a.marked="property"),r=="spread"?t(z):r=="}"?f():r=="["?t(k,c("]"),c(":"),Ar):t(c(":"),z,j))}function ee(){return f(z,j)}function j(r,e){if(e=="=")return t(h)}function te(r){if(r==",")return t(dr)}function Tr(r,e){if(r=="keyword b"&&e=="else")return t(s("form","else"),v,o)}function jr(r,e){if(e=="await")return t(jr);if(r=="(")return t(s(")"),ne,o)}function ne(r){return r=="var"?t(dr,W):r=="variable"?t(W):f(W)}function W(r,e){return r==")"?t():r==";"?t(W):e=="in"||e=="of"?(a.marked="keyword",t(k,W)):f(k,W)}function $(r,e){if(e=="*")return a.marked="keyword",t($);if(r=="variable")return S(e),t($);if(r=="(")return t(_,s(")"),w(I,")"),o,zr,v,V);if(p&&e=="<")return t(s(">"),w(rr,">"),o,$)}function B(r,e){if(e=="*")return a.marked="keyword",t(B);if(r=="variable")return S(e),t(B);if(r=="(")return t(_,s(")"),w(I,")"),o,zr,V);if(p&&e=="<")return t(s(">"),w(rr,">"),o,B)}function $r(r,e){if(r=="keyword"||r=="variable")return a.marked="type",t($r);if(e=="<")return t(s(">"),w(rr,">"),o)}function I(r,e){return e=="@"&&t(k,I),r=="spread"?t(I):p&&Q(e)?(a.marked="keyword",t(I)):p&&r=="this"?t(C,j):f(z,C,j)}function ae(r,e){return r=="variable"?Or(r,e):er(r,e)}function Or(r,e){if(r=="variable")return S(e),t(er)}function er(r,e){if(e=="<")return t(s(">"),w(rr,">"),o,er);if(e=="extends"||e=="implements"||p&&r==",")return e=="implements"&&(a.marked="keyword"),t(p?d:k,er);if(r=="{")return t(s("}"),T,o)}function T(r,e){if(r=="async"||r=="variable"&&(e=="static"||e=="get"||e=="set"||p&&Q(e))&&a.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return a.marked="keyword",t(T);if(r=="variable"||a.style=="keyword")return a.marked="property",t(tr,T);if(r=="number"||r=="string")return t(tr,T);if(r=="[")return t(k,C,c("]"),tr,T);if(e=="*")return a.marked="keyword",t(T);if(p&&r=="(")return f(B,T);if(r==";"||r==",")return t(T);if(r=="}")return t();if(e=="@")return t(k,T)}function tr(r,e){if(e=="!"||e=="?")return t(tr);if(r==":")return t(d,j);if(e=="=")return t(h);var n=a.state.lexical.prev;return f(n&&n.info=="interface"?B:$)}function ie(r,e){return e=="*"?(a.marked="keyword",t(mr,c(";"))):e=="default"?(a.marked="keyword",t(k,c(";"))):r=="{"?t(w(_r,"}"),mr,c(";")):f(v)}function _r(r,e){if(e=="as")return a.marked="keyword",t(c("variable"));if(r=="variable")return f(h,_r)}function ue(r){return r=="string"?t():r=="("?f(k):r=="."?f(q):f(nr,qr,mr)}function nr(r,e){return r=="{"?H(nr,"}"):(r=="variable"&&S(e),e=="*"&&(a.marked="keyword"),t(oe))}function qr(r){if(r==",")return t(nr,qr)}function oe(r,e){if(e=="as")return a.marked="keyword",t(nr)}function mr(r,e){if(e=="from")return a.marked="keyword",t(k)}function fe(r){return r=="]"?t():f(w(h,"]"))}function Er(){return f(s("form"),z,c("{"),s("}"),w(se,"}"),o,o)}function se(){return f(z,j)}function ce(r,e){return r.lastType=="operator"||r.lastType==","||wr.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function le(r,e,n){return e.tokenize==O&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||e.lastType=="quasi"&&/\{\s*$/.test(r.string.slice(0,r.pos-(n||0)))}return{name:b.name,startState:function(r){var e={tokenize:O,lastType:"sof",cc:[],lexical:new br(-r,0,"block",!1),localVars:b.localVars,context:b.localVars&&new U(null,null,!1),indented:0};return b.globalVars&&typeof b.globalVars=="object"&&(e.globalVars=b.globalVars),e},token:function(r,e){if(r.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=r.indentation(),ur(r,e)),e.tokenize!=M&&r.eatSpace())return null;var n=e.tokenize(r,e);return D=="comment"?n:(e.lastType=D=="operator"&&(L=="++"||L=="--")?"incdec":D,Br(e,n,D,L,r))},indent:function(r,e,n){if(r.tokenize==M||r.tokenize==F)return null;if(r.tokenize!=O)return 0;var i=e&&e.charAt(0),u=r.lexical,l;if(!/^\s*else\b/.test(e))for(var m=r.cc.length-1;m>=0;--m){var x=r.cc[m];if(x==o)u=u.prev;else if(x!=Tr&&x!=V)break}for(;(u.type=="stat"||u.type=="form")&&(i=="}"||(l=r.cc[r.cc.length-1])&&(l==q||l==P)&&!/^[,\.=+\-*:?[\(]/.test(e));)u=u.prev;kr&&u.type==")"&&u.prev.type=="stat"&&(u=u.prev);var g=u.type,pr=i==g;return g=="vardef"?u.indented+(r.lastType=="operator"||r.lastType==","?u.info.length+1:0):g=="form"&&i=="{"?u.indented:g=="form"?u.indented+n.unit:g=="stat"?u.indented+(ce(r,e)?kr||n.unit:0):u.info=="switch"&&!pr&&b.doubleIndentSwitch!=0?u.indented+(/^(?:case|default)\b/.test(e)?n.unit:2*n.unit):u.align?u.column+(pr?0:1):u.indented+(pr?0:n.unit)},languageData:{indentOnInput:/^\s*(?:case .*?:|default:|\{|\})$/,commentTokens:yr?void 0:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]},wordChars:"$"}}}const de=ar({name:"javascript"}),me=ar({name:"json",json:!0}),pe=ar({name:"json",jsonld:!0}),ke=ar({name:"typescript",typescript:!0});export{ke as i,me as n,pe as r,de as t};
import"./purify.es-DNVQZNFu.js";import{u as tt}from"./src-Cf4NnJCp.js";import{t as et}from"./arc-3DY1fURi.js";import{n as r}from"./src-BKLwm2RN.js";import{B as gt,C as mt,U as xt,_ as kt,a as _t,b as j,c as bt,v as vt,z as $t}from"./chunk-ABZYJK2D-t8l6Viza.js";import"./dist-C04_12Dz.js";import{t as wt}from"./chunk-FMBD7UC4-Cn7KHL11.js";import{a as Mt,i as Tt,o as it,t as Ct}from"./chunk-TZMSLE5B-DFEUz811.js";var X=(function(){var t=r(function(i,n,l,u){for(l||(l={}),u=i.length;u--;l[i[u]]=n);return l},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],o=[1,10],s=[1,11],h=[1,12],y=[1,13],p=[1,14],f={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:r(function(i,n,l,u,d,c,x){var m=c.length-1;switch(d){case 1:return c[m-1];case 2:this.$=[];break;case 3:c[m-1].push(c[m]),this.$=c[m-1];break;case 4:case 5:this.$=c[m];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(c[m].substr(6)),this.$=c[m].substr(6);break;case 9:this.$=c[m].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=c[m].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(c[m].substr(8)),this.$=c[m].substr(8);break;case 13:u.addTask(c[m-1],c[m]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:o,14:s,16:h,17:y,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:o,14:s,16:h,17:y,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:r(function(i,n){if(n.recoverable)this.trace(i);else{var l=Error(i);throw l.hash=n,l}},"parseError"),parse:r(function(i){var n=this,l=[0],u=[],d=[null],c=[],x=this.table,m="",b=0,B=0,A=0,pt=2,Z=1,yt=c.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(I.yy[D]=this.yy[D]);k.setInput(i,I.yy),I.yy.lexer=k,I.yy.parser=this,k.yylloc===void 0&&(k.yylloc={});var Y=k.yylloc;c.push(Y);var dt=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft($){l.length-=2*$,d.length-=$,c.length-=$}r(ft,"popStack");function J(){var $=u.pop()||k.lex()||Z;return typeof $!="number"&&($ instanceof Array&&(u=$,$=u.pop()),$=n.symbols_[$]||$),$}r(J,"lex");for(var _,W,S,v,q,P={},N,T,K,O;;){if(S=l[l.length-1],this.defaultActions[S]?v=this.defaultActions[S]:(_??(_=J()),v=x[S]&&x[S][_]),v===void 0||!v.length||!v[0]){var Q="";for(N in O=[],x[S])this.terminals_[N]&&N>pt&&O.push("'"+this.terminals_[N]+"'");Q=k.showPosition?"Parse error on line "+(b+1)+`:
`+k.showPosition()+`
Expecting `+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(b+1)+": Unexpected "+(_==Z?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Q,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:Y,expected:O})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+S+", token: "+_);switch(v[0]){case 1:l.push(_),d.push(k.yytext),c.push(k.yylloc),l.push(v[1]),_=null,W?(_=W,W=null):(B=k.yyleng,m=k.yytext,b=k.yylineno,Y=k.yylloc,A>0&&A--);break;case 2:if(T=this.productions_[v[1]][1],P.$=d[d.length-T],P._$={first_line:c[c.length-(T||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(T||1)].first_column,last_column:c[c.length-1].last_column},dt&&(P._$.range=[c[c.length-(T||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(P,[m,B,b,I.yy,v[1],d,c].concat(yt)),q!==void 0)return q;T&&(l=l.slice(0,-1*T*2),d=d.slice(0,-1*T),c=c.slice(0,-1*T)),l.push(this.productions_[v[1]][0]),d.push(P.$),c.push(P._$),K=x[l[l.length-2]][l[l.length-1]],l.push(K);break;case 3:return!0}}return!0},"parse")};f.lexer=(function(){return{EOF:1,parseError:r(function(i,n){if(this.yy.parser)this.yy.parser.parseError(i,n);else throw Error(i)},"parseError"),setInput:r(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:r(function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:r(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var u=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),l.length-1&&(this.yylineno-=l.length-1);var d=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:l?(l.length===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(i){this.unput(this.match.slice(i))},"less"),pastInput:r(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var i=this.pastInput(),n=Array(i.length+1).join("-");return i+this.upcomingInput()+`
`+n+"^"},"showPosition"),test_match:r(function(i,n){var l,u,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),u=i[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var c in d)this[c]=d[c];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,l,u;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),c=0;c<d.length;c++)if(l=this._input.match(this.rules[d[c]]),l&&(!n||l[0].length>n[0].length)){if(n=l,u=c,this.options.backtrack_lexer){if(i=this.test_match(l,d[c]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,d[u]),i===!1?!1:i):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:r(function(){return this.next()||this.lex()},"lex"),begin:r(function(i){this.conditionStack.push(i)},"begin"),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:r(function(i){this.begin(i)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(i,n,l,u){switch(l){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}})();function g(){this.yy={}}return r(g,"Parser"),g.prototype=f,f.Parser=g,new g})();X.parser=X;var Et=X,F="",G=[],V=[],L=[],It=r(function(){G.length=0,V.length=0,F="",L.length=0,_t()},"clear"),St=r(function(t){F=t,G.push(t)},"addSection"),At=r(function(){return G},"getSections"),Pt=r(function(){let t=nt(),e=0;for(;!t&&e<100;)t=nt(),e++;return V.push(...L),V},"getTasks"),jt=r(function(){let t=[];return V.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),Ft=r(function(t,e){let a=e.substr(1).split(":"),o=0,s=[];a.length===1?(o=Number(a[0]),s=[]):(o=Number(a[0]),s=a[1].split(","));let h=s.map(p=>p.trim()),y={section:F,type:F,people:h,task:t,score:o};L.push(y)},"addTask"),Bt=r(function(t){let e={section:F,type:F,description:t,task:t,classes:[]};V.push(e)},"addTaskOrg"),nt=r(function(){let t=r(function(a){return L[a].processed},"compileTask"),e=!0;for(let[a,o]of L.entries())t(a),e&&(e=o.processed);return e},"compileTasks"),st={getConfig:r(()=>j().journey,"getConfig"),clear:It,setDiagramTitle:xt,getDiagramTitle:mt,setAccTitle:gt,getAccTitle:vt,setAccDescription:$t,getAccDescription:kt,addSection:St,getSections:At,getTasks:Pt,addTask:Ft,addTaskOrg:Bt,getActors:r(function(){return jt()},"getActors")},Vt=r(t=>`.label {
font-family: ${t.fontFamily};
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
font-family: ${t.fontFamily};
}
.label text {
fill: #333;
}
.label {
color: ${t.textColor}
}
.face {
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
stroke: #999;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 1.5px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
}
text-align: center;
}
.cluster rect {
}
.cluster text {
fill: ${t.titleColor};
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.task-type-0, .section-type-0 {
${t.fillType0?`fill: ${t.fillType0}`:""};
}
.task-type-1, .section-type-1 {
${t.fillType0?`fill: ${t.fillType1}`:""};
}
.task-type-2, .section-type-2 {
${t.fillType0?`fill: ${t.fillType2}`:""};
}
.task-type-3, .section-type-3 {
${t.fillType0?`fill: ${t.fillType3}`:""};
}
.task-type-4, .section-type-4 {
${t.fillType0?`fill: ${t.fillType4}`:""};
}
.task-type-5, .section-type-5 {
${t.fillType0?`fill: ${t.fillType5}`:""};
}
.task-type-6, .section-type-6 {
${t.fillType0?`fill: ${t.fillType6}`:""};
}
.task-type-7, .section-type-7 {
${t.fillType0?`fill: ${t.fillType7}`:""};
}
.actor-0 {
${t.actor0?`fill: ${t.actor0}`:""};
}
.actor-1 {
${t.actor1?`fill: ${t.actor1}`:""};
}
.actor-2 {
${t.actor2?`fill: ${t.actor2}`:""};
}
.actor-3 {
${t.actor3?`fill: ${t.actor3}`:""};
}
.actor-4 {
${t.actor4?`fill: ${t.actor4}`:""};
}
.actor-5 {
${t.actor5?`fill: ${t.actor5}`:""};
}
${wt()}
`,"getStyles"),U=r(function(t,e){return Tt(t,e)},"drawRect"),Lt=r(function(t,e){let a=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),o=t.append("g");o.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(p){let f=et().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);p.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}r(s,"smile");function h(p){let f=et().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);p.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}r(h,"sad");function y(p){p.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r(y,"ambivalent"),e.score>3?s(o):e.score<3?h(o):y(o),a},"drawFace"),rt=r(function(t,e){let a=t.append("circle");return a.attr("cx",e.cx),a.attr("cy",e.cy),a.attr("class","actor-"+e.pos),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("r",e.r),a.class!==void 0&&a.attr("class",a.class),e.title!==void 0&&a.append("title").text(e.title),a},"drawCircle"),at=r(function(t,e){return Mt(t,e)},"drawText"),Rt=r(function(t,e){function a(s,h,y,p,f){return s+","+h+" "+(s+y)+","+h+" "+(s+y)+","+(h+p-f)+" "+(s+y-f*1.2)+","+(h+p)+" "+s+","+(h+p)}r(a,"genPoints");let o=t.append("polygon");o.attr("points",a(e.x,e.y,50,20,7)),o.attr("class","labelBox"),e.y+=e.labelMargin,e.x+=.5*e.labelMargin,at(t,e)},"drawLabel"),Nt=r(function(t,e,a){let o=t.append("g"),s=it();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=a.width*e.taskCount+a.diagramMarginX*(e.taskCount-1),s.height=a.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,U(o,s),lt(a)(e.text,o,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},a,e.colour)},"drawSection"),ot=-1,Ot=r(function(t,e,a){let o=e.x+a.width/2,s=t.append("g");ot++,s.append("line").attr("id","task"+ot).attr("x1",o).attr("y1",e.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lt(s,{cx:o,cy:300+(5-e.score)*30,score:e.score});let h=it();h.x=e.x,h.y=e.y,h.fill=e.fill,h.width=a.width,h.height=a.height,h.class="task task-type-"+e.num,h.rx=3,h.ry=3,U(s,h);let y=e.x+14;e.people.forEach(p=>{let f=e.actors[p].color;rt(s,{cx:y,cy:e.y,r:7,fill:f,stroke:"#000",title:p,pos:e.actors[p].position}),y+=10}),lt(a)(e.task,s,h.x,h.y,h.width,h.height,{class:"task"},a,e.colour)},"drawTask"),zt=r(function(t,e){Ct(t,e)},"drawBackgroundRect"),lt=(function(){function t(s,h,y,p,f,g,i,n){o(h.append("text").attr("x",y+f/2).attr("y",p+g/2+5).style("font-color",n).style("text-anchor","middle").text(s),i)}r(t,"byText");function e(s,h,y,p,f,g,i,n,l){let{taskFontSize:u,taskFontFamily:d}=n,c=s.split(/<br\s*\/?>/gi);for(let x=0;x<c.length;x++){let m=x*u-u*(c.length-1)/2,b=h.append("text").attr("x",y+f/2).attr("y",p).attr("fill",l).style("text-anchor","middle").style("font-size",u).style("font-family",d);b.append("tspan").attr("x",y+f/2).attr("dy",m).text(c[x]),b.attr("y",p+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),o(b,i)}}r(e,"byTspan");function a(s,h,y,p,f,g,i,n){let l=h.append("switch"),u=l.append("foreignObject").attr("x",y).attr("y",p).attr("width",f).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,l,y,p,f,g,i,n),o(u,i)}r(a,"byFo");function o(s,h){for(let y in h)y in h&&s.attr(y,h[y])}return r(o,"_setTextAttrs"),function(s){return s.textPlacement==="fo"?a:s.textPlacement==="old"?t:e}})(),R={drawRect:U,drawCircle:rt,drawSection:Nt,drawText:at,drawLabel:Rt,drawTask:Ot,drawBackgroundRect:zt,initGraphics:r(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},Dt=r(function(t){Object.keys(t).forEach(function(e){M[e]=t[e]})},"setConf"),C={},z=0;function ct(t){let e=j().journey,a=e.maxLabelWidth;z=0;let o=60;Object.keys(C).forEach(s=>{let h=C[s].color,y={cx:20,cy:o,r:7,fill:h,stroke:"#000",pos:C[s].position};R.drawCircle(t,y);let p=t.append("text").attr("visibility","hidden").text(s),f=p.node().getBoundingClientRect().width;p.remove();let g=[];if(f<=a)g=[s];else{let i=s.split(" "),n="";p=t.append("text").attr("visibility","hidden"),i.forEach(l=>{let u=n?`${n} ${l}`:l;if(p.text(u),p.node().getBoundingClientRect().width>a){if(n&&g.push(n),n=l,p.text(l),p.node().getBoundingClientRect().width>a){let d="";for(let c of l)d+=c,p.text(d+"-"),p.node().getBoundingClientRect().width>a&&(g.push(d.slice(0,-1)+"-"),d=c);n=d}}else n=u}),n&&g.push(n),p.remove()}g.forEach((i,n)=>{let l={x:40,y:o+7+n*20,fill:"#666",text:i,textMargin:e.boxTextMargin??5},u=R.drawText(t,l).node().getBoundingClientRect().width;u>z&&u>e.leftMargin-u&&(z=u)}),o+=Math.max(20,g.length*20)})}r(ct,"drawActorLegend");var M=j().journey,E=0,Yt=r(function(t,e,a,o){let s=j(),h=s.journey.titleColor,y=s.journey.titleFontSize,p=s.journey.titleFontFamily,f=s.securityLevel,g;f==="sandbox"&&(g=tt("#i"+e));let i=tt(f==="sandbox"?g.nodes()[0].contentDocument.body:"body");w.init();let n=i.select("#"+e);R.initGraphics(n);let l=o.db.getTasks(),u=o.db.getDiagramTitle(),d=o.db.getActors();for(let A in C)delete C[A];let c=0;d.forEach(A=>{C[A]={color:M.actorColours[c%M.actorColours.length],position:c},c++}),ct(n),E=M.leftMargin+z,w.insert(0,0,E,Object.keys(C).length*50),Wt(n,l,0);let x=w.getBounds();u&&n.append("text").text(u).attr("x",E).attr("font-size",y).attr("font-weight","bold").attr("y",25).attr("fill",h).attr("font-family",p);let m=x.stopy-x.starty+2*M.diagramMarginY,b=E+x.stopx+2*M.diagramMarginX;bt(n,m,b,M.useMaxWidth),n.append("line").attr("x1",E).attr("y1",M.height*4).attr("x2",b-E-4).attr("y2",M.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let B=u?70:0;n.attr("viewBox",`${x.startx} -25 ${b} ${m+B}`),n.attr("preserveAspectRatio","xMinYMin meet"),n.attr("height",m+B+25)},"draw"),w={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:r(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:r(function(t,e,a,o){t[e]===void 0?t[e]=a:t[e]=o(a,t[e])},"updateVal"),updateBounds:r(function(t,e,a,o){let s=j().journey,h=this,y=0;function p(f){return r(function(g){y++;let i=h.sequenceItems.length-y+1;h.updateVal(g,"starty",e-i*s.boxMargin,Math.min),h.updateVal(g,"stopy",o+i*s.boxMargin,Math.max),h.updateVal(w.data,"startx",t-i*s.boxMargin,Math.min),h.updateVal(w.data,"stopx",a+i*s.boxMargin,Math.max),f!=="activation"&&(h.updateVal(g,"startx",t-i*s.boxMargin,Math.min),h.updateVal(g,"stopx",a+i*s.boxMargin,Math.max),h.updateVal(w.data,"starty",e-i*s.boxMargin,Math.min),h.updateVal(w.data,"stopy",o+i*s.boxMargin,Math.max))},"updateItemBounds")}r(p,"updateFn"),this.sequenceItems.forEach(p())},"updateBounds"),insert:r(function(t,e,a,o){let s=Math.min(t,a),h=Math.max(t,a),y=Math.min(e,o),p=Math.max(e,o);this.updateVal(w.data,"startx",s,Math.min),this.updateVal(w.data,"starty",y,Math.min),this.updateVal(w.data,"stopx",h,Math.max),this.updateVal(w.data,"stopy",p,Math.max),this.updateBounds(s,y,h,p)},"insert"),bumpVerticalPos:r(function(t){this.verticalPos+=t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:r(function(){return this.verticalPos},"getVerticalPos"),getBounds:r(function(){return this.data},"getBounds")},H=M.sectionFills,ht=M.sectionColours,Wt=r(function(t,e,a){let o=j().journey,s="",h=a+(o.height*2+o.diagramMarginY),y=0,p="#CCC",f="black",g=0;for(let[i,n]of e.entries()){if(s!==n.section){p=H[y%H.length],g=y%H.length,f=ht[y%ht.length];let u=0,d=n.section;for(let x=i;x<e.length&&e[x].section==d;x++)u+=1;let c={x:i*o.taskMargin+i*o.width+E,y:50,text:n.section,fill:p,num:g,colour:f,taskCount:u};R.drawSection(t,c,o),s=n.section,y++}let l=n.people.reduce((u,d)=>(C[d]&&(u[d]=C[d]),u),{});n.x=i*o.taskMargin+i*o.width+E,n.y=h,n.width=o.diagramMarginX,n.height=o.diagramMarginY,n.colour=f,n.fill=p,n.num=g,n.actors=l,R.drawTask(t,n,o),w.insert(n.x,n.y,n.x+n.width+o.taskMargin,450)}},"drawTasks"),ut={setConf:Dt,draw:Yt},qt={parser:Et,db:st,renderer:ut,styles:Vt,init:r(t=>{ut.setConf(t.journey),st.clear()},"init")};export{qt as diagram};

Sorry, the diff of this file is too big to display

import{t as a}from"./julia-DYuDt1xN.js";export{a as julia};
function a(n,e,t){return t===void 0&&(t=""),e===void 0&&(e="\\b"),RegExp("^"+t+"(("+n.join(")|(")+"))"+e)}var d="\\\\[0-7]{1,3}",F="\\\\x[A-Fa-f0-9]{1,2}",k=`\\\\[abefnrtv0%?'"\\\\]`,b="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",o=["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","\\.{2,3}","[\\.\\\\%*+\\-<>!\\/^|&]=?","\\?","\\$","~",":"],v=a("[<>]:,[<>=]=,[!=]==,<<=?,>>>?=?,=>?,--?>,<--[->]?,\\/\\/,[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?,\\?,\\$,~,:,\\u00D7,\\u2208,\\u2209,\\u220B,\\u220C,\\u2218,\\u221A,\\u221B,\\u2229,\\u222A,\\u2260,\\u2264,\\u2265,\\u2286,\\u2288,\\u228A,\\u22C5,\\b(in|isa)\\b(?!.?\\()".split(","),""),g=/^[;,()[\]{}]/,x=/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,A=a([d,F,k,b],"'"),z=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],y=["end","else","elseif","catch","finally"],c="if.else.elseif.while.for.begin.let.end.do.try.catch.finally.return.break.continue.global.local.const.export.import.importall.using.function.where.macro.module.baremodule.struct.type.mutable.immutable.quote.typealias.abstract.primitive.bitstype".split("."),m=["true","false","nothing","NaN","Inf"],E=a(z),_=a(y),D=a(c),T=a(m),C=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,w=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,P=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,B=a(o,"","@"),$=a(o,"",":");function l(n){return n.nestedArrays>0}function G(n){return n.nestedGenerators>0}function f(n,e){return e===void 0&&(e=0),n.scopes.length<=e?null:n.scopes[n.scopes.length-(e+1)]}function u(n,e){if(n.match("#=",!1))return e.tokenize=Z,e.tokenize(n,e);var t=e.leavingExpr;if(n.sol()&&(t=!1),e.leavingExpr=!1,t&&n.match(/^'+/))return"operator";if(n.match(/\.{4,}/))return"error";if(n.match(/\.{1,3}/))return"operator";if(n.eatSpace())return null;var r=n.peek();if(r==="#")return n.skipToEnd(),"comment";if(r==="["&&(e.scopes.push("["),e.nestedArrays++),r==="("&&(e.scopes.push("("),e.nestedGenerators++),l(e)&&r==="]"){for(;e.scopes.length&&f(e)!=="[";)e.scopes.pop();e.scopes.pop(),e.nestedArrays--,e.leavingExpr=!0}if(G(e)&&r===")"){for(;e.scopes.length&&f(e)!=="(";)e.scopes.pop();e.scopes.pop(),e.nestedGenerators--,e.leavingExpr=!0}if(l(e)){if(e.lastToken=="end"&&n.match(":"))return"operator";if(n.match("end"))return"number"}var i;if((i=n.match(E,!1))&&e.scopes.push(i[0]),n.match(_,!1)&&e.scopes.pop(),n.match(/^::(?![:\$])/))return e.tokenize=I,e.tokenize(n,e);if(!t&&(n.match(w)||n.match($)))return"builtin";if(n.match(v))return"operator";if(n.match(/^\.?\d/,!1)){var p=RegExp(/^im\b/),s=!1;if(n.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(s=!0),n.match(/^0x[0-9a-f_]+/i)&&(s=!0),n.match(/^0b[01_]+/i)&&(s=!0),n.match(/^0o[0-7_]+/i)&&(s=!0),n.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(s=!0),n.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(s=!0),s)return n.match(p),e.leavingExpr=!0,"number"}if(n.match("'"))return e.tokenize=j,e.tokenize(n,e);if(n.match(P))return e.tokenize=S(n.current()),e.tokenize(n,e);if(n.match(C)||n.match(B))return"meta";if(n.match(g))return null;if(n.match(D))return"keyword";if(n.match(T))return"builtin";var h=e.isDefinition||e.lastToken=="function"||e.lastToken=="macro"||e.lastToken=="type"||e.lastToken=="struct"||e.lastToken=="immutable";return n.match(x)?h?n.peek()==="."?(e.isDefinition=!0,"variable"):(e.isDefinition=!1,"def"):(e.leavingExpr=!0,"variable"):(n.next(),"error")}function I(n,e){return n.match(/.*?(?=[,;{}()=\s]|$)/),n.match("{")?e.nestedParameters++:n.match("}")&&e.nestedParameters>0&&e.nestedParameters--,e.nestedParameters>0?n.match(/.*?(?={|})/)||n.next():e.nestedParameters==0&&(e.tokenize=u),"builtin"}function Z(n,e){return n.match("#=")&&e.nestedComments++,n.match(/.*?(?=(#=|=#))/)||n.skipToEnd(),n.match("=#")&&(e.nestedComments--,e.nestedComments==0&&(e.tokenize=u)),"comment"}function j(n,e){var t=!1,r;if(n.match(A))t=!0;else if(r=n.match(/\\u([a-f0-9]{1,4})(?=')/i)){var i=parseInt(r[1],16);(i<=55295||i>=57344)&&(t=!0,n.next())}else if(r=n.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var i=parseInt(r[1],16);i<=1114111&&(t=!0,n.next())}return t?(e.leavingExpr=!0,e.tokenize=u,"string"):(n.match(/^[^']+(?=')/)||n.skipToEnd(),n.match("'")&&(e.tokenize=u),"error")}function S(n){n.substr(-3)==='"""'?n='"""':n.substr(-1)==='"'&&(n='"');function e(t,r){if(t.eat("\\"))t.next();else{if(t.match(n))return r.tokenize=u,r.leavingExpr=!0,"string";t.eat(/[`"]/)}return t.eatWhile(/[^\\`"]/),"string"}return e}const q={name:"julia",startState:function(){return{tokenize:u,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(n,e){var t=e.tokenize(n,e),r=n.current();return r&&t&&(e.lastToken=r),t},indent:function(n,e,t){var r=0;return(e==="]"||e===")"||/^end\b/.test(e)||/^else/.test(e)||/^catch\b/.test(e)||/^elseif\b/.test(e)||/^finally/.test(e))&&(r=-1),(n.scopes.length+r)*t.unit},languageData:{indentOnInput:/^\s*(end|else|catch|finally)\b$/,commentTokens:{line:"#",block:{open:"#=",close:"=#"}},closeBrackets:{brackets:["(","[","{",'"']},autocomplete:c.concat(m)}};export{q as t};
import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as o,r as q}from"./src-BKLwm2RN.js";import{G as yt,I as B,Q as ft,X as lt,Z as ct,b as j,d as z}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as mt}from"./chunk-EXTU4WIE-CyW9PraH.js";import{n as bt,t as _t}from"./chunk-MI3HLSF2-Csy17Fj5.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import{a as Et,c as kt,i as St}from"./chunk-JZLCHNYA-cYgsW1_e.js";import{t as Nt}from"./chunk-FMBD7UC4-Cn7KHL11.js";var J=(function(){var i=o(function(t,c,a,r){for(a||(a={}),r=t.length;r--;a[t[r]]=c);return a},"o"),u=[1,4],p=[1,13],s=[1,12],d=[1,15],y=[1,16],_=[1,20],h=[1,19],D=[6,7,8],C=[1,26],L=[1,24],A=[1,25],n=[6,7,11],G=[1,31],O=[6,7,11,24],F=[1,6,13,16,17,20,23],U=[1,35],M=[1,36],$=[1,6,7,11,13,16,17,20,23],b=[1,38],I={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(t,c,a,r,g,e,R){var l=e.length-1;switch(g){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",e[l-1].id),r.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:r.getLogger().info("Node: ",e[l].id),r.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:r.getLogger().trace("Icon: ",e[l]),r.decorateNode({icon:e[l]});break;case 18:case 23:r.decorateNode({class:e[l]});break;case 19:r.getLogger().trace("SPACELIST");break;case 20:r.getLogger().trace("Node: ",e[l-1].id),r.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:r.getLogger().trace("Node: ",e[l].id),r.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:r.decorateNode({icon:e[l]});break;case 27:r.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:r.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:r.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:r.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:y,18:17,19:18,20:_,23:h},i(D,[2,3]),{1:[2,2]},i(D,[2,4]),i(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:y,18:17,19:18,20:_,23:h},{6:p,9:22,12:11,13:s,14:14,16:d,17:y,18:17,19:18,20:_,23:h},{6:C,7:L,10:23,11:A},i(n,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:_,23:h}),i(n,[2,19]),i(n,[2,21],{15:30,24:G}),i(n,[2,22]),i(n,[2,23]),i(O,[2,25]),i(O,[2,26]),i(O,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:L,10:34,11:A},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:y,18:17,19:18,20:_,23:h},i(F,[2,14],{7:U,11:M}),i($,[2,8]),i($,[2,9]),i($,[2,10]),i(n,[2,16],{15:37,24:G}),i(n,[2,17]),i(n,[2,18]),i(n,[2,20],{24:b}),i(O,[2,31]),{21:[1,39]},{22:[1,40]},i(F,[2,13],{7:U,11:M}),i($,[2,11]),i($,[2,12]),i(n,[2,15],{24:b}),i(O,[2,30]),{22:[1,41]},i(O,[2,27]),i(O,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,c){if(c.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=c,a}},"parseError"),parse:o(function(t){var c=this,a=[0],r=[],g=[null],e=[],R=this.table,l="",H=0,it=0,nt=0,gt=2,st=1,ut=e.slice.call(arguments,1),m=Object.create(this.lexer),w={yy:{}};for(var K in this.yy)Object.prototype.hasOwnProperty.call(this.yy,K)&&(w.yy[K]=this.yy[K]);m.setInput(t,w.yy),w.yy.lexer=m,w.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var Q=m.yylloc;e.push(Q);var dt=m.options&&m.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(N){a.length-=2*N,g.length-=N,e.length-=N}o(pt,"popStack");function rt(){var N=r.pop()||m.lex()||st;return typeof N!="number"&&(N instanceof Array&&(r=N,N=r.pop()),N=c.symbols_[N]||N),N}o(rt,"lex");for(var E,Y,T,S,Z,P={},W,v,ot,X;;){if(T=a[a.length-1],this.defaultActions[T]?S=this.defaultActions[T]:(E??(E=rt()),S=R[T]&&R[T][E]),S===void 0||!S.length||!S[0]){var at="";for(W in X=[],R[T])this.terminals_[W]&&W>gt&&X.push("'"+this.terminals_[W]+"'");at=m.showPosition?"Parse error on line "+(H+1)+`:
`+m.showPosition()+`
Expecting `+X.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(H+1)+": Unexpected "+(E==st?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(at,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:Q,expected:X})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+T+", token: "+E);switch(S[0]){case 1:a.push(E),g.push(m.yytext),e.push(m.yylloc),a.push(S[1]),E=null,Y?(E=Y,Y=null):(it=m.yyleng,l=m.yytext,H=m.yylineno,Q=m.yylloc,nt>0&&nt--);break;case 2:if(v=this.productions_[S[1]][1],P.$=g[g.length-v],P._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},dt&&(P._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),Z=this.performAction.apply(P,[l,it,H,w.yy,S[1],g,e].concat(ut)),Z!==void 0)return Z;v&&(a=a.slice(0,-1*v*2),g=g.slice(0,-1*v),e=e.slice(0,-1*v)),a.push(this.productions_[S[1]][0]),g.push(P.$),e.push(P._$),ot=R[a[a.length-2]][a[a.length-1]],a.push(ot);break;case 3:return!0}}return!0},"parse")};I.lexer=(function(){return{EOF:1,parseError:o(function(t,c){if(this.yy.parser)this.yy.parser.parseError(t,c);else throw Error(t)},"parseError"),setInput:o(function(t,c){return this.yy=c||this.yy||{},this._input=t,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:o(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var c=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;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),a.length-1&&(this.yylineno-=a.length-1);var g=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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),c=Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+c+"^"},"showPosition"),test_match:o(function(t,c){var a,r,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),r=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var e in g)this[e]=g[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,c,a,r;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),e=0;e<g.length;e++)if(a=this._input.match(this.rules[g[e]]),a&&(!c||a[0].length>c[0].length)){if(c=a,r=e,this.options.backtrack_lexer){if(t=this.test_match(a,g[e]),t!==!1)return t;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(t=this.test_match(c,g[r]),t===!1?!1:t):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:o(function(){return this.next()||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(t,c,a,r){switch(a){case 0:return this.pushState("shapeData"),c.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return c.yytext=c.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return t.getLogger().trace("Found comment",c.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",c.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",c.yytext),"NODE_DEND";case 36:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 41:return t.getLogger().trace("Long description:",c.yytext),21;case 42:return t.getLogger().trace("Long description:",c.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function k(){this.yy={}}return o(k,"Parser"),k.prototype=I,I.Parser=k,new k})();J.parser=J;var xt=J,x=[],V=[],tt=0,et={},Dt=o(()=>{x=[],V=[],tt=0,et={}},"clear"),Lt=o(i=>{if(x.length===0)return null;let u=x[0].level,p=null;for(let s=x.length-1;s>=0;s--)if(x[s].level===u&&!p&&(p=x[s]),x[s].level<u)throw Error('Items without section detected, found section ("'+x[s].label+'")');return i===(p==null?void 0:p.level)?null:p},"getSection"),ht=o(function(){return V},"getSections"),Ot=o(function(){let i=[],u=[],p=ht(),s=j();for(let d of p){let y={id:d.id,label:B(d.label??"",s),isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:s.look};u.push(y);let _=x.filter(h=>h.parentId===d.id);for(let h of _){let D={id:h.id,parentId:d.id,label:B(h.label??"",s),isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};u.push(D)}}return{nodes:u,edges:i,other:{},config:j()}},"getData"),It=o((i,u,p,s,d)=>{var C,L;let y=j(),_=((C=y.mindmap)==null?void 0:C.padding)??z.mindmap.padding;switch(s){case f.ROUNDED_RECT:case f.RECT:case f.HEXAGON:_*=2}let h={id:B(u,y)||"kbn"+tt++,level:i,label:B(p,y),width:((L=y.mindmap)==null?void 0:L.maxNodeWidth)??z.mindmap.maxNodeWidth,padding:_,isGroup:!1};if(d!==void 0){let A;A=d.includes(`
`)?d+`
`:`{
`+d+`
}`;let n=bt(A,{schema:_t});if(n.shape&&(n.shape!==n.shape.toLowerCase()||n.shape.includes("_")))throw Error(`No such shape: ${n.shape}. Shape names should be lowercase.`);n!=null&&n.shape&&n.shape==="kanbanItem"&&(h.shape=n==null?void 0:n.shape),n!=null&&n.label&&(h.label=n==null?void 0:n.label),n!=null&&n.icon&&(h.icon=n==null?void 0:n.icon.toString()),n!=null&&n.assigned&&(h.assigned=n==null?void 0:n.assigned.toString()),n!=null&&n.ticket&&(h.ticket=n==null?void 0:n.ticket.toString()),n!=null&&n.priority&&(h.priority=n==null?void 0:n.priority)}let D=Lt(i);D?h.parentId=D.id||"kbn"+tt++:V.push(h),x.push(h)},"addNode"),f={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},vt={clear:Dt,addNode:It,getSections:ht,getData:Ot,nodeType:f,getType:o((i,u)=>{switch(q.debug("In get type",i,u),i){case"[":return f.RECT;case"(":return u===")"?f.ROUNDED_RECT:f.CLOUD;case"((":return f.CIRCLE;case")":return f.CLOUD;case"))":return f.BANG;case"{{":return f.HEXAGON;default:return f.DEFAULT}},"getType"),setElementForId:o((i,u)=>{et[i]=u},"setElementForId"),decorateNode:o(i=>{if(!i)return;let u=j(),p=x[x.length-1];i.icon&&(p.icon=B(i.icon,u)),i.class&&(p.cssClasses=B(i.class,u))},"decorateNode"),type2Str:o(i=>{switch(i){case f.DEFAULT:return"no-border";case f.RECT:return"rect";case f.ROUNDED_RECT:return"rounded-rect";case f.CIRCLE:return"circle";case f.CLOUD:return"cloud";case f.BANG:return"bang";case f.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:o(()=>q,"getLogger"),getElementById:o(i=>et[i],"getElementById")},Ct={draw:o(async(i,u,p,s)=>{var O,F,U,M,$;q.debug(`Rendering kanban diagram
`+i);let d=s.db.getData(),y=j();y.htmlLabels=!1;let _=mt(u),h=_.append("g");h.attr("class","sections");let D=_.append("g");D.attr("class","items");let C=d.nodes.filter(b=>b.isGroup),L=0,A=[],n=25;for(let b of C){let I=((O=y==null?void 0:y.kanban)==null?void 0:O.sectionWidth)||200;L+=1,b.x=I*L+(L-1)*10/2,b.width=I,b.y=0,b.height=I*3,b.rx=5,b.ry=5,b.cssClasses=b.cssClasses+" section-"+L;let k=await St(h,b);n=Math.max(n,(F=k==null?void 0:k.labelBBox)==null?void 0:F.height),A.push(k)}let G=0;for(let b of C){let I=A[G];G+=1;let k=((U=y==null?void 0:y.kanban)==null?void 0:U.sectionWidth)||200,t=-k*3/2+n,c=t,a=d.nodes.filter(e=>e.parentId===b.id);for(let e of a){if(e.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");e.x=b.x,e.width=k-1.5*10;let R=(await Et(D,e,{config:y})).node().getBBox();e.y=c+R.height/2,await kt(e),c=e.y+R.height/2+10/2}let r=I.cluster.select("rect"),g=Math.max(c-t+30,50)+(n-25);r.attr("height",g)}yt(void 0,_,((M=y.mindmap)==null?void 0:M.padding)??z.kanban.padding,(($=y.mindmap)==null?void 0:$.useMaxWidth)??z.kanban.useMaxWidth)},"draw")},At=o(i=>{let u="";for(let s=0;s<i.THEME_COLOR_LIMIT;s++)i["lineColor"+s]=i["lineColor"+s]||i["cScaleInv"+s],ft(i["lineColor"+s])?i["lineColor"+s]=ct(i["lineColor"+s],20):i["lineColor"+s]=lt(i["lineColor"+s],20);let p=o((s,d)=>i.darkMode?lt(s,d):ct(s,d),"adjuster");for(let s=0;s<i.THEME_COLOR_LIMIT;s++){let d=""+(17-3*s);u+=`
.section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
fill: ${p(i["cScale"+s],10)};
stroke: ${p(i["cScale"+s],10)};
}
.section-${s-1} text {
fill: ${i["cScaleLabel"+s]};
}
.node-icon-${s-1} {
font-size: 40px;
color: ${i["cScaleLabel"+s]};
}
.section-edge-${s-1}{
stroke: ${i["cScale"+s]};
}
.edge-depth-${s-1}{
stroke-width: ${d};
}
.section-${s-1} line {
stroke: ${i["cScaleInv"+s]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${i.background};
stroke: ${i.nodeBorder};
stroke-width: 1px;
}
.kanban-ticket-link {
fill: ${i.background};
stroke: ${i.nodeBorder};
text-decoration: underline;
}
`}return u},"genSections"),$t={db:vt,renderer:Ct,parser:xt,styles:o(i=>`
.edge {
stroke-width: 3;
}
${At(i)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${i.git0};
}
.section-root text {
fill: ${i.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.cluster-label, .label {
color: ${i.textColor};
fill: ${i.textColor};
}
.kanban-label {
dy: 1em;
alignment-baseline: middle;
text-anchor: middle;
dominant-baseline: middle;
text-align: center;
}
${Nt()}
`,"getStyles")};export{$t as diagram};
import{c as a}from"./katex-Dc8yG8NU.js";export{a as default};

Sorry, the diff of this file is too big to display

import{s}from"./chunk-LvLJmgfZ.js";import{t as a}from"./compiler-runtime-DeeZ7FnK.js";import{t as m}from"./jsx-runtime-ZmTK25f3.js";import{n}from"./clsx-D8GwTfvk.js";var d=a(),c=s(m(),1);const l=e=>{let r=(0,d.c)(5),o;r[0]===e.className?o=r[1]:(o=n(e.className,"rounded-md bg-muted/40 px-2 text-[0.75rem] font-prose center border border-foreground/20 text-muted-foreground block whitespace-nowrap"),r[0]=e.className,r[1]=o);let t;return r[2]!==e.children||r[3]!==o?(t=(0,c.jsx)("kbd",{className:o,children:e.children}),r[2]=e.children,r[3]=o,r[4]=t):t=r[4],t};export{l as t};
import{u as n}from"./useEvent-DO6uJBas.js";import{r as e}from"./mode-DX8pdI-l.js";const l=r=>{let{children:t}=r;return n(e)?null:t},o=r=>{let{children:t}=r;return n(e)?t:null};export{o as n,l as t};
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as u}from"./react-BGmjiNul.js";import{t as c}from"./compiler-runtime-DeeZ7FnK.js";import{t as b}from"./jsx-runtime-ZmTK25f3.js";import{n as w,t as x}from"./cn-BKtXLv3a.js";import{t as N}from"./dist-CdxIjAOP.js";var i=m(u(),1),n=m(b(),1),v="Label",d=i.forwardRef((r,s)=>(0,n.jsx)(N.label,{...r,ref:s,onMouseDown:e=>{var a;e.target.closest("button, input, select, textarea")||((a=r.onMouseDown)==null||a.call(r,e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));d.displayName=v;var f=d,y=c(),D=w("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),p=i.forwardRef((r,s)=>{let e=(0,y.c)(9),a,o;e[0]===r?(a=e[1],o=e[2]):({className:a,...o}=r,e[0]=r,e[1]=a,e[2]=o);let t;e[3]===a?t=e[4]:(t=x(D(),a),e[3]=a,e[4]=t);let l;return e[5]!==o||e[6]!==s||e[7]!==t?(l=(0,n.jsx)(f,{ref:s,className:t,...o}),e[5]=o,e[6]=s,e[7]=t,e[8]=l):l=e[8],l});p.displayName=f.displayName;export{p as t};

Sorry, the diff of this file is too big to display

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./any-language-editor-BMlwpEZ4.js","./copy-icon-BhONVREY.js","./button-YC1gW_kJ.js","./hotkeys-BHHWjLlp.js","./useEventListener-DIUKKfEy.js","./compiler-runtime-DeeZ7FnK.js","./react-BGmjiNul.js","./chunk-LvLJmgfZ.js","./cn-BKtXLv3a.js","./clsx-D8GwTfvk.js","./jsx-runtime-ZmTK25f3.js","./tooltip-CEc2ajau.js","./Combination-CMPwuAmi.js","./react-dom-C9fstfnp.js","./dist-uzvC4uAK.js","./use-toast-rmUWldD_.js","./copy-Bv2DBpIS.js","./check-DdfN0k2d.js","./createLucideIcon-CnW3RofX.js","./copy-CQ15EONK.js","./error-banner-DUzsIXtq.js","./alert-dialog-DwQffb13.js","./errors-2SszdW9t.js","./zod-Cg4WLWh2.js","./dist-C9XNJlLJ.js","./dist-DBwNzi3C.js","./dist-BIKFl48f.js","./dist-fsvXrTzp.js","./dist-ChS0Dc_R.js","./dist-TiFCI16_.js","./dist-B0VqT_4z.js","./dist-6cIjG-FS.js","./dist-CldbmzwA.js","./dist-Cayq-K1c.js","./dist-OM63llNV.js","./dist-BYyu59D8.js","./dist-BmvOPdv_.js","./dist-DDGPBuw4.js","./dist-C4h-1T2Q.js","./dist-D_XLVesh.js","./esm-DpMp6qko.js","./extends-B2LJnKU3.js","./objectWithoutPropertiesLoose-DaPAPabU.js","./dist-CtsanegT.js","./esm-l4kcybiY.js","./dist-kdxmhWbv.js","./dist-BtWo0SNF.js","./dist-BVyBw1BD.js","./dist-Gqv0jSNr.js","./dist-BZY_uvFb.js","./dist-CS67iP1P.js","./apl-DVWF09P_.js","./asciiarmor-l0ikukqg.js","./asn1-CsdiW8T7.js","./brainfuck-C66TQVgP.js","./clike-Cc3gZvM_.js","./clojure-kT8c8jnq.js","./cmake-B3S-FpMv.js","./cobol-BrIP6mPV.js","./coffeescript-ByxLkrBT.js","./commonlisp-BjIOT_KK.js","./crystal-CQtLRTna.js","./css-CU1K_XUx.js","./cypher-An7BGqKu.js","./d-fbf-n02o.js","./diff-DbzsqZEz.js","./dtd-DnQAYfYi.js","./dylan-DeXj1TAN.js","./ecl-B8-j0xrP.js","./eiffel-DdiJ6Uyn.js","./elm-CAmK9rmL.js","./erlang-hqy6gURy.js","./factor-Di_n0Vcb.js","./simple-mode-BVXe8Gj5.js","./forth-CsaVBHm8.js","./fortran-DGNsp41i.js","./gas-BX8xjNNw.js","./gherkin--u9ojH5d.js","./groovy-Drg0Cp0-.js","./haskell-D96A8Bg_.js","./haxe-B_4sGLdj.js","./idl-CA47OCO3.js","./javascript-i8I6A_gg.js","./julia-DYuDt1xN.js","./livescript-C72Fe_WX.js","./lua-CrUucAvm.js","./mathematica-GLtAlQgr.js","./mbox-DsldZPOv.js","./mirc-Dpq184o1.js","./mllike-eEM7KiC0.js","./modelica-BKRVU7Ex.js","./mscgen-LPWHVNeM.js","./mumps-46YgImgy.js","./nsis-Bh7CNuij.js","./ntriples-CABx3n6p.js","./octave-ChjrzDtA.js","./oz-BZ0G7oQI.js","./pascal-BDWWzmkf.js","./perl-C1twkBDg.js","./pig-CKZ-JUXx.js","./powershell-BmnkAUC8.js","./properties-B3qF4Ofl.js","./protobuf-CdWFIAi_.js","./pug-DEhrk7ZA.js","./puppet-oVG7sgNi.js","./python-GCb3koKb.js","./q-CylRV6ad.js","./r-BV8FQxo8.js","./rpm-0QmIraaR.js","./ruby-h-bI2J_W.js","./sas-BvwZbLPG.js","./scheme-BPuaxh6y.js","./shell-DmziZNbR.js","./sieve-DT4D9aeW.js","./smalltalk-lAY6r45k.js","./sparql-nFvL3z3l.js","./stex-CtmkcLz7.js","./stylus-BawZsgUJ.js","./swift-CdaDqiGL.js","./tcl-D5FopUjH.js","./textile-Cum4VLew.js","./toml-5si8PWt8.js","./troff-qCd7sECP.js","./ttcn-cfg-BlUyan1P.js","./ttcn-BZC1oJG1.js","./turtle-BGa4pyfx.js","./vb-G28CZ46r.js","./vbscript-DOr4ZYtx.js","./velocity-DRewaasJ.js","./verilog-DmcGbw8B.js","./vhdl-C6ktucee.js","./webidl-DHu7cr9_.js","./xquery-BuvyHzVJ.js","./yacas-C_HpkPlV.js","./z80-BDlRltlF.js"])))=>i.map(i=>d[i]);
import{s as e}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-BGmjiNul.js";import{t as o}from"./createLucideIcon-CnW3RofX.js";import{t as m}from"./preload-helper-DItdS47A.js";let r,a,s=(async()=>{r=o("between-horizontal-start",[["rect",{width:"13",height:"7",x:"8",y:"3",rx:"1",key:"pkso9a"}],["path",{d:"m2 9 3 3-3 3",key:"1agib5"}],["rect",{width:"13",height:"7",x:"8",y:"14",rx:"1",key:"1q5fc1"}]]),a=(0,e(i(),1).lazy)(()=>m(()=>import("./any-language-editor-BMlwpEZ4.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,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,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,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134]),import.meta.url))})();export{s as __tla,r as n,a as t};
import{r as o,t as y}from"./path-BMloFSsK.js";import{t as s}from"./array-BF0shS9G.js";import{v as x}from"./step-COhf-b0R.js";function d(t){return t[0]}function h(t){return t[1]}function E(t,u){var a=o(!0),i=null,l=x,e=null,v=y(r);t=typeof t=="function"?t:t===void 0?d:o(t),u=typeof u=="function"?u:u===void 0?h:o(u);function r(n){var f,m=(n=s(n)).length,p,c=!1,g;for(i??(e=l(g=v())),f=0;f<=m;++f)!(f<m&&a(p=n[f],f,n))===c&&((c=!c)?e.lineStart():e.lineEnd()),c&&e.point(+t(p,f,n),+u(p,f,n));if(g)return e=null,g+""||null}return r.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),r):t},r.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),r):u},r.defined=function(n){return arguments.length?(a=typeof n=="function"?n:o(!!n),r):a},r.curve=function(n){return arguments.length?(l=n,i!=null&&(e=l(i)),r):l},r.context=function(n){return arguments.length?(n==null?i=e=null:e=l(i=n),r):i},r}export{d as n,h as r,E as t};
import{a as E,c as F,i as O,n as P,o as R,r as S,s as g,t as T}from"./precisionRound-BMPhtTJQ.js";import{i as _,n as q,t as z}from"./defaultLocale-D_rSvXvJ.js";import{d as B,p as G,u as H}from"./timer-ffBO1paY.js";import{n as I}from"./init-AtRnKt23.js";function v(n){return n===null?NaN:+n}function*J(n,t){if(t===void 0)for(let a of n)a!=null&&(a=+a)>=a&&(yield a);else{let a=-1;for(let r of n)(r=t(r,++a,n))!=null&&(r=+r)>=r&&(yield r)}}var M=g(F);const N=M.right,K=M.left;g(v).center;var y=N;function L(n){return function(){return n}}function d(n){return+n}var k=[0,1];function h(n){return n}function p(n,t){return(t-=n=+n)?function(a){return(a-n)/t}:L(isNaN(t)?NaN:.5)}function Q(n,t){var a;return n>t&&(a=n,n=t,t=a),function(r){return Math.max(n,Math.min(t,r))}}function U(n,t,a){var r=n[0],s=n[1],u=t[0],e=t[1];return s<r?(r=p(s,r),u=a(e,u)):(r=p(r,s),u=a(u,e)),function(c){return u(r(c))}}function V(n,t,a){var r=Math.min(n.length,t.length)-1,s=Array(r),u=Array(r),e=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++e<r;)s[e]=p(n[e],n[e+1]),u[e]=a(t[e],t[e+1]);return function(c){var l=y(n,c,1,r)-1;return u[l](s[l](c))}}function b(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function A(){var n=k,t=k,a=B,r,s,u,e=h,c,l,o;function m(){var i=Math.min(n.length,t.length);return e!==h&&(e=Q(n[0],n[i-1])),c=i>2?V:U,l=o=null,f}function f(i){return i==null||isNaN(i=+i)?u:(l||(l=c(n.map(r),t,a)))(r(e(i)))}return f.invert=function(i){return e(s((o||(o=c(t,n.map(r),G)))(i)))},f.domain=function(i){return arguments.length?(n=Array.from(i,d),m()):n.slice()},f.range=function(i){return arguments.length?(t=Array.from(i),m()):t.slice()},f.rangeRound=function(i){return t=Array.from(i),a=H,m()},f.clamp=function(i){return arguments.length?(e=i?!0:h,m()):e!==h},f.interpolate=function(i){return arguments.length?(a=i,m()):a},f.unknown=function(i){return arguments.length?(u=i,f):u},function(i,D){return r=i,s=D,m()}}function w(){return A()(h,h)}function x(n,t,a,r){var s=E(n,t,a),u;switch(r=_(r??",f"),r.type){case"s":var e=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(u=P(s,e))&&(r.precision=u),q(r,e);case"":case"e":case"g":case"p":case"r":r.precision==null&&!isNaN(u=T(s,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=u-(r.type==="e"));break;case"f":case"%":r.precision==null&&!isNaN(u=S(s))&&(r.precision=u-(r.type==="%")*2);break}return z(r)}function j(n){var t=n.domain;return n.ticks=function(a){var r=t();return R(r[0],r[r.length-1],a??10)},n.tickFormat=function(a,r){var s=t();return x(s[0],s[s.length-1],a??10,r)},n.nice=function(a){a??(a=10);var r=t(),s=0,u=r.length-1,e=r[s],c=r[u],l,o,m=10;for(c<e&&(o=e,e=c,c=o,o=s,s=u,u=o);m-- >0;){if(o=O(e,c,a),o===l)return r[s]=e,r[u]=c,t(r);if(o>0)e=Math.floor(e/o)*o,c=Math.ceil(c/o)*o;else if(o<0)e=Math.ceil(e*o)/o,c=Math.floor(c*o)/o;else break;l=o}return n},n}function C(){var n=w();return n.copy=function(){return b(n,C())},I.apply(n,arguments),j(n)}export{b as a,d as c,y as d,v as f,w as i,K as l,j as n,h as o,J as p,x as r,A as s,C as t,N as u};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);export{t};
import{m as n}from"./config-CIrPQIbt.js";function t(o){window.open(n(`?file=${o}`).toString(),"_blank")}export{t};
import{s as o}from"./chunk-LvLJmgfZ.js";import{t as i}from"./compiler-runtime-DeeZ7FnK.js";import{t as s}from"./jsx-runtime-ZmTK25f3.js";var l=i(),m=o(s(),1);const c=n=>{let r=(0,l.c)(3),{href:e,children:a}=n,t;return r[0]!==a||r[1]!==e?(t=(0,m.jsx)("a",{href:e,target:"_blank",className:"text-link hover:underline",children:a}),r[0]=a,r[1]=e,r[2]=t):t=r[2],t};export{c as t};
var m=function(e,t){var r=t.next||"start";if(r){t.next=t.next;var k=a[r];if(k.splice){for(var l=0;l<k.length;++l){var n=k[l];if(n.regex&&e.match(n.regex))return t.next=n.next||t.next,n.token}return e.next(),"error"}if(e.match(n=a[r]))return n.regex&&e.match(n.regex)?(t.next=n.next,n.token):(e.next(),"error")}return e.next(),"error"},g="(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*",p=RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+g+")?))\\s*$"),o="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",x={token:"string",regex:".+"},a={start:[{token:"docComment",regex:"/\\*",next:"comment"},{token:"comment",regex:"#.*"},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)"+o},{token:"atom",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+o},{token:"invalid",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+o},{token:"className.standard",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+o},{token:"variableName.function.standard",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+o},{token:"variableName.standard",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+o},{token:"variableName",regex:g+"\\s*:(?![:=])"},{token:"variableName",regex:g},{token:"operatorKeyword",regex:"(?:\\.{3}|\\s+\\?)"},{token:"keyword",regex:"(?:@+|::|\\.\\.)",next:"key"},{token:"operatorKeyword",regex:"\\.\\s*",next:"key"},{token:"string",regex:"\\\\\\S[^\\s,;)}\\]]*"},{token:"docString",regex:"'''",next:"qdoc"},{token:"docString",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string",regex:"<\\[",next:"words"},{token:"regexp",regex:"//",next:"heregex"},{token:"regexp",regex:"\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",next:"key"},{token:"number",regex:"(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"},{token:"paren",regex:"[({[]"},{token:"paren",regex:"[)}\\]]",next:"key"},{token:"operatorKeyword",regex:"\\S+"},{token:"content",regex:"\\s+"}],heregex:[{token:"regexp",regex:".*?//[gimy$?]{0,4}",next:"start"},{token:"regexp",regex:"\\s*#{"},{token:"comment",regex:"\\s+(?:#.*)?"},{token:"regexp",regex:"\\S+"}],key:[{token:"operatorKeyword",regex:"[.?@!]+"},{token:"variableName",regex:g,next:"start"},{token:"content",regex:"",next:"start"}],comment:[{token:"docComment",regex:".*?\\*/",next:"start"},{token:"docComment",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},x],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},x],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},x],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},x],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},x],words:[{token:"string",regex:".*?\\]>",next:"key"},x]};for(var d in a){var s=a[d];if(s.splice)for(var i=0,y=s.length;i<y;++i){var c=s[i];typeof c.regex=="string"&&(a[d][i].regex=RegExp("^"+c.regex))}else typeof c.regex=="string"&&(a[d].regex=RegExp("^"+s.regex))}const f={name:"livescript",startState:function(){return{next:"start",lastToken:{style:null,indent:0,content:""}}},token:function(e,t){for(;e.pos==e.start;)var r=m(e,t);return t.lastToken={style:r,indent:e.indentation(),content:e.current()},r.replace(/\./g," ")},indent:function(e){var t=e.lastToken.indent;return e.lastToken.content.match(p)&&(t+=2),t}};export{f as t};
import{t as r}from"./livescript-C72Fe_WX.js";export{r as liveScript};
import{s as x}from"./chunk-LvLJmgfZ.js";import"./useEvent-DO6uJBas.js";import{t as f}from"./react-BGmjiNul.js";import{A as h,Un as g,W as u,w as j}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as y}from"./compiler-runtime-DeeZ7FnK.js";import"./config-CIrPQIbt.js";import{t as v}from"./jsx-runtime-ZmTK25f3.js";import{t as m}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import"./Combination-CMPwuAmi.js";import{t as N}from"./cell-link-Bw5bzt4a.js";import{t as b}from"./empty-state-h8C2C6hZ.js";import{t as w}from"./clear-button-BZQ4dSdG.js";var n=y();f();var s=x(v(),1),_=()=>{let r=(0,n.c)(9),e=h(),{clearLogs:i}=j();if(e.length===0){let o;r[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("code",{className:"border rounded px-1",children:"stdout"}),r[0]=o):o=r[0];let l;return r[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)(b,{title:"No logs",description:(0,s.jsxs)("span",{children:[o," and"," ",(0,s.jsx)("code",{className:"border rounded px-1",children:"stderr"})," logs will appear here."]}),icon:(0,s.jsx)(g,{})}),r[1]=l):l=r[1],l}let a;r[2]===i?a=r[3]:(a=(0,s.jsx)("div",{className:"flex flex-row justify-start px-2 py-1",children:(0,s.jsx)(w,{dataTestId:"clear-logs-button",onClick:i})}),r[2]=i,r[3]=a);let t;r[4]===e?t=r[5]:(t=(0,s.jsx)(d,{logs:e,className:"min-w-[300px]"}),r[4]=e,r[5]=t);let c;return r[6]!==a||r[7]!==t?(c=(0,s.jsxs)("div",{className:"flex flex-col h-full overflow-auto",children:[a,t]}),r[6]=a,r[7]=t,r[8]=c):c=r[8],c};const d=r=>{let e=(0,n.c)(10),{logs:i,className:a}=r,t;e[0]===a?t=e[1]:(t=m("flex flex-col",a),e[0]=a,e[1]=t);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={whiteSpace:"pre-wrap"},e[2]=c):c=e[2];let o;e[3]===i?o=e[4]:(o=i.map(I),e[3]=i,e[4]=o);let l;e[5]===o?l=e[6]:(l=(0,s.jsx)("pre",{className:"grid text-xs font-mono gap-1 whitespace-break-spaces font-semibold align-left",children:(0,s.jsx)("div",{className:"grid grid-cols-[30px_1fr]",style:c,children:o})}),e[5]=o,e[6]=l);let p;return e[7]!==t||e[8]!==l?(p=(0,s.jsx)("div",{className:t,children:l}),e[7]=t,e[8]=l,e[9]=p):p=e[9],p};function k(r){let e=u(r.timestamp),i=S[r.level],a=r.level.toUpperCase();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"shrink-0 text-(--gray-10) dark:text-(--gray-11)",children:["[",e,"]"]}),(0,s.jsx)("span",{className:m("shrink-0",i),children:a}),(0,s.jsxs)("span",{className:"shrink-0 text-(--gray-10)",children:["(",(0,s.jsx)(N,{cellId:r.cellId}),")"]}),r.message]})}var S={stdout:"text-(--grass-9)",stderr:"text-(--red-9)"};function I(r,e){return(0,s.jsxs)("div",{className:"contents group",children:[(0,s.jsx)("span",{className:m("opacity-70 group-hover:bg-(--gray-3) group-hover:opacity-100","text-right col-span-1 py-1 pr-1"),children:e+1}),(0,s.jsx)("span",{className:m("opacity-70 group-hover:bg-(--gray-3) group-hover:opacity-100","px-2 flex gap-x-1.5 py-1 flex-wrap"),children:k(r)})]},e)}export{d as LogViewer,_ as default};
import{$ as a,$a as s,$i as o,$n as e,$r as r,$t as t,A as l,Aa as _,Ai as n,An as i,Ar as d,At as c,B as m,Ba as g,Bi as p,Bn as u,Br as b,Bt as w,C as h,Ca as v,Ci as x,Cn as f,Cr as C,Ct as S,D as A,Da as O,Di as y,Dn as I,Dr as N,Dt as D,E as J,Ea as k,Ei as V,En as E,Er as L,Et as P,F as T,Fa as F,Fi as U,Fn as M,Fr as B,Ft as R,G as W,Ga as H,Gi as z,Gn as j,Gr as q,Gt as G,H as K,Ha as Q,Hi as X,Hn as Y,Hr as Z,Ht as $,I as aa,Ia as sa,Ii as oa,In as ea,Ir as ra,It as ta,J as la,Ja as _a,Ji as na,Jn as ia,Jr as da,Jt as ca,K as ma,Ka as ga,Ki as pa,Kn as ua,Kr as ba,Kt as wa,L as ha,La as va,Li as xa,Ln as fa,Lr as Ca,Lt as Sa,M as Aa,Ma as Oa,Mi as ya,Mn as Ia,Mr as Na,Mt as Da,N as Ja,Na as ka,Ni as Va,Nn as Ea,Nr as La,Nt as Pa,O as Ta,Oa as Fa,Oi as Ua,On as Ma,Or as Ba,Ot as Ra,P as Wa,Pa as Ha,Pi as za,Pn as ja,Pr as qa,Pt as Ga,Q as Ka,Qa,Qi as Xa,Qn as Ya,Qr as Za,Qt as $a,R as as,Ra as ss,Ri as os,Rn as es,Rr as rs,Rt as ts,S as ls,Sa as _s,Si as ns,Sn as is,Sr as ds,St as cs,T as ms,Ta as gs,Ti as ps,Tn as us,Tr as bs,Tt as ws,U as hs,Ua as vs,Ui as xs,Un as fs,Ur as Cs,Ut as Ss,V as As,Va as Os,Vi as ys,Vn as Is,Vr as Ns,Vt as Ds,W as Js,Wa as ks,Wi as Vs,Wn as Es,Wr as Ls,Wt as Ps,X as Ts,Xa as Fs,Xi as Us,Xn as Ms,Xr as Bs,Xt as Rs,Y as Ws,Ya as Hs,Yi as zs,Yn as js,Yr as qs,Yt as Gs,Z as Ks,Za as Qs,Zi as Xs,Zn as Ys,Zr as Zs,Zt as $s,_ as ao,_a as so,_i as oo,_n as eo,_r as ro,_t as to,a as lo,aa as _o,ai as no,an as io,ao as co,ar as mo,at as go,b as po,ba as uo,bi as bo,bn as wo,br as ho,bt as vo,c as xo,ca as fo,ci as Co,cn as So,cr as Ao,ct as Oo,d as yo,da as Io,di as No,dn as Do,dr as Jo,dt as ko,ea as Vo,ei as Eo,en as Lo,eo as Po,er as To,et as Fo,f as Uo,fa as Mo,fi as Bo,fn as Ro,fr as Wo,g as Ho,ga as zo,gi as jo,gn as qo,gr as Go,gt as Ko,h as Qo,ha as Xo,hi as Yo,hn as Zo,hr as $o,ht as ae,i as se,ia as oe,ii as ee,in as re,io as te,ir as le,it as _e,j as ne,ja as ie,ji as de,jn as ce,jr as me,jt as ge,k as pe,ka as ue,ki as be,kn as we,kr as he,kt as ve,l as xe,la as fe,li as Ce,ln as Se,lr as Ae,lt as Oe,m as ye,ma as Ie,mi as Ne,mn as De,mr as Je,mt as ke,n as Ve,na as Ee,ni as Le,nn as Pe,no as Te,nr as Fe,nt as Ue,o as Me,oa as Be,oi as Re,on as We,or as He,ot as ze,p as je,pa as qe,pi as Ge,pn as Ke,pr as Qe,pt as Xe,q as Ye,qa as Ze,qi as $e,qn as ar,qr as sr,qt as or,r as er,ra as rr,ri as tr,rn as lr,ro as _r,rr as nr,rt as ir,s as dr,sa as cr,si as mr,sn as gr,sr as pr,st as ur,t as br,ta as wr,ti as hr,tn as vr,to as xr,tr as fr,tt as Cr,u as Sr,ua as Ar,ui as Or,un as yr,ur as Ir,ut as Nr,v as Dr,va as Jr,vi as kr,vn as Vr,vr as Er,vt as Lr,w as Pr,wa as Tr,wi as Fr,wn as Ur,wr as Mr,wt as Br,x as Rr,xa as Wr,xi as Hr,xn as zr,xr as jr,xt as qr,y as Gr,ya as Kr,yi as Qr,yn as Xr,yr as Yr,yt as Zr,z as $r,za as at,zi as st,zn as ot,zr as et,zt as rt,__tla as tt}from"./loro_wasm_bg-CDxXoyfI.js";let lt=Promise.all([(()=>{try{return tt}catch{}})()]).then(async()=>{});export{br as LORO_VERSION,Ve as __externref_drop_slice,er as __externref_table_alloc,se as __externref_table_dealloc,lt as __tla,lo as __wbg_awarenesswasm_free,Me as __wbg_changemodifier_free,dr as __wbg_cursor_free,xo as __wbg_ephemeralstorewasm_free,xe as __wbg_lorocounter_free,Sr as __wbg_lorodoc_free,yo as __wbg_lorolist_free,Uo as __wbg_loromap_free,je as __wbg_loromovablelist_free,ye as __wbg_lorotext_free,Qo as __wbg_lorotree_free,Ho as __wbg_lorotreenode_free,ao as __wbg_undomanager_free,Dr as __wbg_versionvector_free,Gr as __wbindgen_exn_store,po as __wbindgen_export_4,Rr as __wbindgen_export_6,ls as __wbindgen_free,h as __wbindgen_malloc,Pr as __wbindgen_realloc,ms as __wbindgen_start,J as _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2222385ed10d04df,A as awarenesswasm_apply,Ta as awarenesswasm_encode,pe as awarenesswasm_encodeAll,l as awarenesswasm_getAllStates,ne as awarenesswasm_getState,Aa as awarenesswasm_getTimestamp,Ja as awarenesswasm_isEmpty,Wa as awarenesswasm_length,T as awarenesswasm_new,aa as awarenesswasm_peer,ha as awarenesswasm_peers,as as awarenesswasm_removeOutdated,$r as awarenesswasm_setLocalState,m as callPendingEvents,As as changemodifier_setMessage,K as changemodifier_setTimestamp,hs as closure9_externref_shim,Js as cursor_containerId,W as cursor_decode,ma as cursor_encode,Ye as cursor_kind,la as cursor_pos,Ws as cursor_side,Ts as decodeFrontiers,Ks as decodeImportBlobMeta,Ka as encodeFrontiers,a as ephemeralstorewasm_apply,Fo as ephemeralstorewasm_delete,Cr as ephemeralstorewasm_encode,Ue as ephemeralstorewasm_encodeAll,ir as ephemeralstorewasm_get,_e as ephemeralstorewasm_getAllStates,go as ephemeralstorewasm_isEmpty,ze as ephemeralstorewasm_keys,ur as ephemeralstorewasm_new,Oo as ephemeralstorewasm_removeOutdated,Oe as ephemeralstorewasm_set,Nr as ephemeralstorewasm_subscribe,ko as ephemeralstorewasm_subscribeLocalUpdates,Xe as lorocounter_decrement,ke as lorocounter_getAttached,ae as lorocounter_getShallowValue,Ko as lorocounter_id,to as lorocounter_increment,Lr as lorocounter_isAttached,Zr as lorocounter_kind,vo as lorocounter_new,qr as lorocounter_parent,cs as lorocounter_subscribe,S as lorocounter_toJSON,Br as lorocounter_value,ws as lorodoc_JSONPath,P as lorodoc_applyDiff,D as lorodoc_attach,Ra as lorodoc_changeCount,ve as lorodoc_checkout,c as lorodoc_checkoutToLatest,ge as lorodoc_clearNextCommitOptions,Da as lorodoc_cmpFrontiers,Pa as lorodoc_cmpWithFrontiers,Ga as lorodoc_commit,R as lorodoc_configDefaultTextStyle,ta as lorodoc_configTextStyle,Sa as lorodoc_debugHistory,ts as lorodoc_deleteRootContainer,rt as lorodoc_detach,w as lorodoc_diff,Ds as lorodoc_export,$ as lorodoc_exportJsonInIdSpan,Ss as lorodoc_exportJsonUpdates,Ps as lorodoc_findIdSpansBetween,G as lorodoc_fork,wa as lorodoc_forkAt,or as lorodoc_fromSnapshot,ca as lorodoc_frontiers,Gs as lorodoc_frontiersToVV,Rs as lorodoc_getAllChanges,$s as lorodoc_getByPath,$a as lorodoc_getChangeAt,t as lorodoc_getChangeAtLamport,Lo as lorodoc_getChangedContainersIn,vr as lorodoc_getContainerById,Pe as lorodoc_getCounter,lr as lorodoc_getCursorPos,re as lorodoc_getDeepValueWithID,io as lorodoc_getList,We as lorodoc_getMap,gr as lorodoc_getMovableList,So as lorodoc_getOpsInChange,Se as lorodoc_getPathToContainer,yr as lorodoc_getPendingTxnLength,Do as lorodoc_getShallowValue,Ro as lorodoc_getText,Ke as lorodoc_getTree,De as lorodoc_getUncommittedOpsAsJson,Zo as lorodoc_hasContainer,qo as lorodoc_import,eo as lorodoc_importBatch,Vr as lorodoc_importJsonUpdates,Xr as lorodoc_importUpdateBatch,wo as lorodoc_isDetached,zr as lorodoc_isDetachedEditingEnabled,is as lorodoc_isShallow,f as lorodoc_new,Ur as lorodoc_opCount,us as lorodoc_oplogFrontiers,E as lorodoc_oplogVersion,I as lorodoc_peerId,Ma as lorodoc_peerIdStr,we as lorodoc_revertTo,i as lorodoc_setChangeMergeInterval,ce as lorodoc_setDetachedEditing,Ia as lorodoc_setHideEmptyRootContainers,Ea as lorodoc_setNextCommitMessage,ja as lorodoc_setNextCommitOptions,M as lorodoc_setNextCommitOrigin,ea as lorodoc_setNextCommitTimestamp,fa as lorodoc_setPeerId,es as lorodoc_setRecordTimestamp,ot as lorodoc_shallowSinceFrontiers,u as lorodoc_shallowSinceVV,Is as lorodoc_subscribe,Y as lorodoc_subscribeFirstCommitFromPeer,fs as lorodoc_subscribeJsonpath,Es as lorodoc_subscribeLocalUpdates,j as lorodoc_subscribePreCommit,ua as lorodoc_toJSON,ar as lorodoc_travelChangeAncestors,ia as lorodoc_version,js as lorodoc_vvToFrontiers,Ms as lorolist_clear,Ys as lorolist_delete,Ya as lorolist_get,e as lorolist_getAttached,To as lorolist_getCursor,fr as lorolist_getIdAt,Fe as lorolist_getShallowValue,nr as lorolist_id,le as lorolist_insert,mo as lorolist_insertContainer,He as lorolist_isAttached,pr as lorolist_isDeleted,Ao as lorolist_kind,Ae as lorolist_length,Ir as lorolist_new,Jo as lorolist_parent,Wo as lorolist_pop,Qe as lorolist_push,Je as lorolist_pushContainer,$o as lorolist_subscribe,Go as lorolist_toArray,ro as lorolist_toJSON,Er as loromap_clear,Yr as loromap_delete,ho as loromap_entries,jr as loromap_get,ds as loromap_getAttached,C as loromap_getLastEditor,Mr as loromap_getOrCreateContainer,bs as loromap_getShallowValue,L as loromap_id,N as loromap_isAttached,Ba as loromap_isDeleted,he as loromap_keys,d as loromap_kind,me as loromap_new,Na as loromap_parent,La as loromap_set,qa as loromap_setContainer,B as loromap_size,ra as loromap_subscribe,Ca as loromap_toJSON,rs as loromap_values,et as loromovablelist_clear,b as loromovablelist_delete,Ns as loromovablelist_get,Z as loromovablelist_getAttached,Cs as loromovablelist_getCreatorAt,Ls as loromovablelist_getCursor,q as loromovablelist_getLastEditorAt,ba as loromovablelist_getLastMoverAt,sr as loromovablelist_getShallowValue,da as loromovablelist_id,qs as loromovablelist_insert,Bs as loromovablelist_insertContainer,Zs as loromovablelist_isAttached,Za as loromovablelist_isDeleted,r as loromovablelist_kind,Eo as loromovablelist_length,hr as loromovablelist_move,Le as loromovablelist_new,tr as loromovablelist_parent,ee as loromovablelist_pop,no as loromovablelist_push,Re as loromovablelist_pushContainer,mr as loromovablelist_set,Co as loromovablelist_setContainer,Ce as loromovablelist_subscribe,Or as loromovablelist_toArray,No as loromovablelist_toJSON,Bo as lorotext_applyDelta,Ge as lorotext_charAt,Ne as lorotext_convertPos,Yo as lorotext_delete,jo as lorotext_deleteUtf8,oo as lorotext_getAttached,kr as lorotext_getCursor,Qr as lorotext_getEditorOf,bo as lorotext_getShallowValue,Hr as lorotext_id,ns as lorotext_insert,x as lorotext_insertUtf8,Fr as lorotext_isAttached,ps as lorotext_isDeleted,V as lorotext_iter,y as lorotext_kind,Ua as lorotext_length,be as lorotext_mark,n as lorotext_new,de as lorotext_parent,ya as lorotext_push,Va as lorotext_slice,za as lorotext_sliceDelta,U as lorotext_sliceDeltaUtf8,oa as lorotext_splice,xa as lorotext_subscribe,os as lorotext_toDelta,st as lorotext_toJSON,p as lorotext_toString,ys as lorotext_unmark,X as lorotext_update,xs as lorotext_updateByLine,Vs as lorotree_createNode,z as lorotree_delete,pa as lorotree_disableFractionalIndex,$e as lorotree_enableFractionalIndex,na as lorotree_getAttached,zs as lorotree_getNodeByID,Us as lorotree_getNodes,Xs as lorotree_getShallowValue,Xa as lorotree_has,o as lorotree_id,Vo as lorotree_isAttached,wr as lorotree_isDeleted,Ee as lorotree_isFractionalIndexEnabled,rr as lorotree_isNodeDeleted,oe as lorotree_kind,_o as lorotree_move,Be as lorotree_new,cr as lorotree_nodes,fo as lorotree_parent,fe as lorotree_roots,Ar as lorotree_subscribe,Io as lorotree_toArray,Mo as lorotree_toJSON,qe as lorotreenode___getClassname,Ie as lorotreenode_children,Xo as lorotreenode_createNode,zo as lorotreenode_creationId,so as lorotreenode_creator,Jr as lorotreenode_data,Kr as lorotreenode_fractionalIndex,uo as lorotreenode_getLastMoveId,Wr as lorotreenode_id,_s as lorotreenode_index,v as lorotreenode_isDeleted,Tr as lorotreenode_move,gs as lorotreenode_moveAfter,k as lorotreenode_moveBefore,O as lorotreenode_parent,Fa as lorotreenode_toJSON,ue as memory,_ as redactJsonUpdates,ie as run,Oa as setDebug,ka as undomanager_addExcludeOriginPrefix,Ha as undomanager_canRedo,F as undomanager_canUndo,sa as undomanager_clear,va as undomanager_groupEnd,ss as undomanager_groupStart,at as undomanager_new,g as undomanager_peer,Os as undomanager_redo,Q as undomanager_setMaxUndoSteps,vs as undomanager_setMergeInterval,ks as undomanager_setOnPop,H as undomanager_setOnPush,ga as undomanager_topRedoValue,Ze as undomanager_topUndoValue,_a as undomanager_undo,Hs as versionvector_compare,Fs as versionvector_decode,Qs as versionvector_encode,Qa as versionvector_get,s as versionvector_length,Po as versionvector_new,xr as versionvector_parseJSON,Te as versionvector_remove,_r as versionvector_setEnd,te as versionvector_setLast,co as versionvector_toJSON};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

function c(e){return RegExp("^(?:"+e.join("|")+")","i")}function i(e){return RegExp("^(?:"+e.join("|")+")$","i")}var g=i("_G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,module,next,pairs,pcall,print,rawequal,rawget,rawset,require,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine.create,coroutine.resume,coroutine.running,coroutine.status,coroutine.wrap,coroutine.yield,debug.debug,debug.getfenv,debug.gethook,debug.getinfo,debug.getlocal,debug.getmetatable,debug.getregistry,debug.getupvalue,debug.setfenv,debug.sethook,debug.setlocal,debug.setmetatable,debug.setupvalue,debug.traceback,close,flush,lines,read,seek,setvbuf,write,io.close,io.flush,io.input,io.lines,io.open,io.output,io.popen,io.read,io.stderr,io.stdin,io.stdout,io.tmpfile,io.type,io.write,math.abs,math.acos,math.asin,math.atan,math.atan2,math.ceil,math.cos,math.cosh,math.deg,math.exp,math.floor,math.fmod,math.frexp,math.huge,math.ldexp,math.log,math.log10,math.max,math.min,math.modf,math.pi,math.pow,math.rad,math.random,math.randomseed,math.sin,math.sinh,math.sqrt,math.tan,math.tanh,os.clock,os.date,os.difftime,os.execute,os.exit,os.getenv,os.remove,os.rename,os.setlocale,os.time,os.tmpname,package.cpath,package.loaded,package.loaders,package.loadlib,package.path,package.preload,package.seeall,string.byte,string.char,string.dump,string.find,string.format,string.gmatch,string.gsub,string.len,string.lower,string.match,string.rep,string.reverse,string.sub,string.upper,table.concat,table.insert,table.maxn,table.remove,table.sort".split(",")),m=i(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),d=i(["function","if","repeat","do","\\(","{"]),p=i(["end","until","\\)","}"]),h=c(["end","until","\\)","}","else","elseif"]);function l(e){for(var t=0;e.eat("=");)++t;return e.eat("["),t}function s(e,t){var n=e.next();return n=="-"&&e.eat("-")?e.eat("[")&&e.eat("[")?(t.cur=u(l(e),"comment"))(e,t):(e.skipToEnd(),"comment"):n=='"'||n=="'"?(t.cur=f(n))(e,t):n=="["&&/[\[=]/.test(e.peek())?(t.cur=u(l(e),"string"))(e,t):/\d/.test(n)?(e.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(n)?(e.eatWhile(/[\w\\\-_.]/),"variable"):null}function u(e,t){return function(n,a){for(var r=null,o;(o=n.next())!=null;)if(r==null)o=="]"&&(r=0);else if(o=="=")++r;else if(o=="]"&&r==e){a.cur=s;break}else r=null;return t}}function f(e){return function(t,n){for(var a=!1,r;(r=t.next())!=null&&!(r==e&&!a);)a=!a&&r=="\\";return a||(n.cur=s),"string"}}const b={name:"lua",startState:function(){return{basecol:0,indentDepth:0,cur:s}},token:function(e,t){if(e.eatSpace())return null;var n=t.cur(e,t),a=e.current();return n=="variable"&&(m.test(a)?n="keyword":g.test(a)&&(n="builtin")),n!="comment"&&n!="string"&&(d.test(a)?++t.indentDepth:p.test(a)&&--t.indentDepth),n},indent:function(e,t,n){var a=h.test(t);return e.basecol+n.unit*(e.indentDepth-(a?1:0))},languageData:{indentOnInput:/^\s*(?:end|until|else|\)|\})$/,commentTokens:{line:"--",block:{open:"--[[",close:"]]--"}}}};export{b as t};
import{t as a}from"./lua-CrUucAvm.js";export{a as lua};
import{s as f}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-BGmjiNul.js";import{d as w}from"./hotkeys-BHHWjLlp.js";import{t as d}from"./createLucideIcon-CnW3RofX.js";var C=d("chevrons-down-up",[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]]),s=d("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),l=f(h());function i(r,o){if(r==null)return{};var e={},t=Object.keys(r),n,a;for(a=0;a<t.length;a++)n=t[a],!(o.indexOf(n)>=0)&&(e[n]=r[n]);return e}var v=["color"],g=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,v);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25H14C14.4142 0.25 14.75 0.585786 14.75 1V14C14.75 14.4142 14.4142 14.75 14 14.75H1C0.585786 14.75 0.25 14.4142 0.25 14V1ZM1.75 1.75V13.25H13.25V1.75H1.75Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}),(0,l.createElement)("rect",{x:"7",y:"5",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"7",y:"3",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"7",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"5",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"3",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"9",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"11",y:"7",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"7",y:"9",width:"1",height:"1",rx:".5",fill:t}),(0,l.createElement)("rect",{x:"7",y:"11",width:"1",height:"1",rx:".5",fill:t}))}),u=["color"],m=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,u);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),p=["color"],L=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,p);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M12.5 3L2.5 3.00002C1.67157 3.00002 1 3.6716 1 4.50002V9.50003C1 10.3285 1.67157 11 2.5 11H7.50003C7.63264 11 7.75982 11.0527 7.85358 11.1465L10 13.2929V11.5C10 11.2239 10.2239 11 10.5 11H12.5C13.3284 11 14 10.3285 14 9.50003V4.5C14 3.67157 13.3284 3 12.5 3ZM2.49999 2.00002L12.5 2C13.8807 2 15 3.11929 15 4.5V9.50003C15 10.8807 13.8807 12 12.5 12H11V14.5C11 14.7022 10.8782 14.8845 10.6913 14.9619C10.5045 15.0393 10.2894 14.9965 10.1464 14.8536L7.29292 12H2.5C1.11929 12 0 10.8807 0 9.50003V4.50002C0 3.11931 1.11928 2.00003 2.49999 2.00002Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),x=["color"],E=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,x);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),R=["color"],y=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,R);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),M=["color"],Z=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,M);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),O=["color"],V=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,O);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),b=["color"],j=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,b);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:t}))}),B=["color"],k=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,B);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M2.05005 13.5C2.05005 13.7485 2.25152 13.95 2.50005 13.95C2.74858 13.95 2.95005 13.7485 2.95005 13.5L2.95005 1.49995C2.95005 1.25142 2.74858 1.04995 2.50005 1.04995C2.25152 1.04995 2.05005 1.25142 2.05005 1.49995L2.05005 13.5ZM8.4317 11.0681C8.60743 11.2439 8.89236 11.2439 9.06809 11.0681C9.24383 10.8924 9.24383 10.6075 9.06809 10.4317L6.58629 7.94993L14.5 7.94993C14.7485 7.94993 14.95 7.74846 14.95 7.49993C14.95 7.2514 14.7485 7.04993 14.5 7.04993L6.58629 7.04993L9.06809 4.56813C9.24383 4.39239 9.24383 4.10746 9.06809 3.93173C8.89236 3.75599 8.60743 3.75599 8.4317 3.93173L5.1817 7.18173C5.00596 7.35746 5.00596 7.64239 5.1817 7.81812L8.4317 11.0681Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))}),H=["color"],q=(0,l.forwardRef)(function(r,o){var e=r.color,t=e===void 0?"currentColor":e,n=i(r,H);return(0,l.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:o}),(0,l.createElement)("path",{d:"M12.95 1.50005C12.95 1.25152 12.7485 1.05005 12.5 1.05005C12.2514 1.05005 12.05 1.25152 12.05 1.50005L12.05 13.5C12.05 13.7486 12.2514 13.95 12.5 13.95C12.7485 13.95 12.95 13.7486 12.95 13.5L12.95 1.50005ZM6.5683 3.93188C6.39257 3.75614 6.10764 3.75614 5.93191 3.93188C5.75617 4.10761 5.75617 4.39254 5.93191 4.56827L8.41371 7.05007L0.499984 7.05007C0.251456 7.05007 0.0499847 7.25155 0.0499847 7.50007C0.0499846 7.7486 0.251457 7.95007 0.499984 7.95007L8.41371 7.95007L5.93191 10.4319C5.75617 10.6076 5.75617 10.8925 5.93191 11.0683C6.10764 11.244 6.39257 11.244 6.56831 11.0683L9.8183 7.81827C9.99404 7.64254 9.99404 7.35761 9.8183 7.18188L6.5683 3.93188Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"}))});const c={keyBy(r,o){let e=new Map,t=new Set;for(let n of r){let a=o(n);e.has(a)&&t.add(a),e.set(a,n)}return t.size>0&&w.trace(`Duplicate keys: ${[...t].join(", ")}`),e},collect(r,o,e){return c.mapValues(c.keyBy(r,o),e)},filterMap(r,o){let e=new Map;for(let[t,n]of r)o(n,t)&&e.set(t,n);return e},mapValues(r,o){let e=new Map;for(let[t,n]of r)e.set(t,o(n,t));return e}};export{E as a,V as c,q as d,s as f,L as i,j as l,g as n,y as o,C as p,m as r,Z as s,c as t,k as u};
import{s as Z}from"./chunk-LvLJmgfZ.js";import{d as ye,f as ve,l as Ne,u as be}from"./useEvent-DO6uJBas.js";import{t as we}from"./react-BGmjiNul.js";import{Br as G,J as ke,Zr as Ie,_n as $e,ln as _e,w as Fe,y as Ae,zn as Te,zr as Ce}from"./cells-BpZ7g6ok.js";import{t as E}from"./compiler-runtime-DeeZ7FnK.js";import{t as Se}from"./invariant-CAG_dYON.js";import{r as ze}from"./utils-DXvhzCGS.js";import{t as Me}from"./jsx-runtime-ZmTK25f3.js";import{r as K,t as $}from"./button-YC1gW_kJ.js";import{t as X}from"./cn-BKtXLv3a.js";import{t as H}from"./createLucideIcon-CnW3RofX.js";import{_ as qe}from"./select-V5IdpNiR.js";import{a as Ee,p as Pe,r as Le,t as We}from"./dropdown-menu-B-6unW-7.js";import{a as Be,n as Ve}from"./state-BfXVTTtD.js";import{c as Y,n as Qe}from"./datasource-B0OJBphG.js";import{a as De}from"./dist-BYyu59D8.js";import{t as ee}from"./tooltip-CEc2ajau.js";import{a as Oe,i as He,n as Ue,r as Je}from"./multi-map-C8GlnP-4.js";import{t as te}from"./kbd-C3JY7O_u.js";import{t as A}from"./links-DHZUhGz-.js";import{r as Re,t as Ze}from"./alert-BrGyZf9c.js";import{o as Ge,t as Ke}from"./useInstallPackage-Bdnnp5fe.js";import{n as b}from"./cell-link-Bw5bzt4a.js";var Xe=H("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),T=H("square-arrow-out-up-right",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]),re=H("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);function Ye(r){let e=null,s=r.cursor();do s.name==="ExpressionStatement"&&(e=s.node);while(s.next());return e}function et(r){let e=r.split(`
`),s=" ",n=Ye(De.parse(r));if(!n)return["def _():",...U(e,s),`${s}return`,"","","_()"].join(`
`);let i=r.slice(0,n.from).trim(),l=r.slice(n.from).trim(),a=i.split(`
`),c=l.split(`
`);return["def _():",...U(a,s),`${s}return ${c[0]}`,...U(c.slice(1),s),"","","_()"].join(`
`)}function U(r,e){if(r.length===1&&r[0]==="")return[];let s=[];for(let n of r)n===""?s.push(""):s.push(e+n);return s}function tt(r,e){var s;if(r.type==="multiple-defs")return[{title:"Fix: Wrap in a function",description:"Make this cell's variables local by wrapping the cell in a function.",fixType:"manual",onFix:async n=>{Se(n.editor,"Editor is null");let i=et(n.editor.state.doc.toString());n.editor.dispatch({changes:{from:0,to:n.editor.state.doc.length,insert:i}})}}];if(r.type==="exception"&&r.exception_type==="NameError"){let n=(s=r.msg.match(/name '(.+)' is not defined/))==null?void 0:s[1];if(!n||!(n in se))return[];let i=rt(n);return[{title:`Fix: Add '${i}'`,description:"Add a new cell for the missing import",fixType:"manual",onFix:async l=>{l.addCodeBelow(i)}}]}return r.type==="sql-error"&&e.aiEnabled?[{title:"Fix with AI",description:"Fix the SQL statement",fixType:"ai",onFix:async n=>{var a;let i=Qe(n.cellId),l=`Fix the SQL statement: ${r.msg}.`;i&&(l+=`
Database schema: ${i}`),(a=n.aiFix)==null||a.setAiCompletionCell({cellId:n.cellId,initialPrompt:l,triggerImmediately:n.aiFix.triggerFix})}}]:[]}function rt(r){let e=se[r];return e===r?`import ${e}`:`import ${e} as ${r}`}var se={mo:"marimo",alt:"altair",bokeh:"bokeh",dask:"dask",np:"numpy",pd:"pandas",pl:"polars",plotly:"plotly",plt:"matplotlib.pyplot",px:"plotly.express",scipy:"scipy",sk:"sklearn",sns:"seaborn",stats:"scipy.stats",tf:"tensorflow",torch:"torch",xr:"xarray",dt:"datetime",json:"json",math:"math",os:"os",re:"re",sys:"sys"},st=E(),nt=Ie("marimo:ai-autofix-mode","autofix",$e);function lt(){let r=(0,st.c)(3),[e,s]=Ne(nt),n;return r[0]!==e||r[1]!==s?(n={fixMode:e,setFixMode:s},r[0]=e,r[1]=s,r[2]=n):n=r[2],n}var J=E(),t=Z(Me(),1);const N=r=>{let e=(0,J.c)(21),{errors:s,cellId:n,className:i}=r,l=ve(),{createNewCell:a}=Fe(),c=be(ze),o;if(e[0]!==c||e[1]!==s){let x;e[3]===c?x=e[4]:(x=y=>tt(y,{aiEnabled:c}),e[3]=c,e[4]=x),o=s.flatMap(x),e[0]=c,e[1]=s,e[2]=o}else o=e[2];let m=o,p=ye(Ve);if(m.length===0)return null;let d=m[0],f;e[5]!==n||e[6]!==a||e[7]!==d||e[8]!==p||e[9]!==l?(f=x=>{var w;let y=(w=l.get(Ae).cellHandles[n].current)==null?void 0:w.editorView;d.onFix({addCodeBelow:_=>{a({cellId:n,autoFocus:!1,before:!1,code:_})},editor:y,cellId:n,aiFix:{setAiCompletionCell:p,triggerFix:x}}),y==null||y.focus()},e[5]=n,e[6]=a,e[7]=d,e[8]=p,e[9]=l,e[10]=f):f=e[10];let u=f,j;e[11]===i?j=e[12]:(j=X("my-2",i),e[11]=i,e[12]=j);let h;e[13]!==d.description||e[14]!==d.fixType||e[15]!==d.title||e[16]!==u?(h=d.fixType==="ai"?(0,t.jsx)(oe,{tooltip:d.description,openPrompt:()=>u(!1),applyAutofix:()=>u(!0)}):(0,t.jsx)(ee,{content:d.description,align:"start",children:(0,t.jsxs)($,{size:"xs",variant:"outline",className:"font-normal",onClick:()=>u(!1),children:[(0,t.jsx)(Y,{className:"h-3 w-3 mr-2"}),d.title]})}),e[13]=d.description,e[14]=d.fixType,e[15]=d.title,e[16]=u,e[17]=h):h=e[17];let g;return e[18]!==j||e[19]!==h?(g=(0,t.jsx)("div",{className:j,children:h}),e[18]=j,e[19]=h,e[20]=g):g=e[20],g};var ne=Be,le=Y,ie="Suggest a prompt",ae="Fix with AI";const oe=r=>{let e=(0,J.c)(21),{tooltip:s,openPrompt:n,applyAutofix:i}=r,{fixMode:l,setFixMode:a}=lt(),c=l==="prompt"?n:i,o;e[0]===l?o=e[1]:(o=l==="prompt"?(0,t.jsx)(ne,{className:"h-3 w-3 mr-2 mb-0.5"}):(0,t.jsx)(le,{className:"h-3 w-3 mr-2 mb-0.5"}),e[0]=l,e[1]=o);let m=l==="prompt"?ie:ae,p;e[2]!==c||e[3]!==o||e[4]!==m?(p=(0,t.jsxs)($,{size:"xs",variant:"outline",className:"font-normal rounded-r-none border-r-0",onClick:c,children:[o,m]}),e[2]=c,e[3]=o,e[4]=m,e[5]=p):p=e[5];let d;e[6]!==p||e[7]!==s?(d=(0,t.jsx)(ee,{content:s,align:"start",children:p}),e[6]=p,e[7]=s,e[8]=d):d=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(Pe,{asChild:!0,children:(0,t.jsx)($,{size:"xs",variant:"outline",className:"rounded-l-none px-2","aria-label":"Fix options",children:(0,t.jsx)(qe,{className:"h-3 w-3"})})}),e[9]=f):f=e[9];let u;e[10]!==l||e[11]!==a?(u=()=>{a(l==="prompt"?"autofix":"prompt")},e[10]=l,e[11]=a,e[12]=u):u=e[12];let j=l==="prompt"?"autofix":"prompt",h;e[13]===j?h=e[14]:(h=(0,t.jsx)(it,{mode:j}),e[13]=j,e[14]=h);let g;e[15]!==u||e[16]!==h?(g=(0,t.jsxs)(We,{children:[f,(0,t.jsx)(Le,{align:"end",className:"w-56",children:(0,t.jsx)(Ee,{className:"flex items-center gap-2",onClick:u,children:h})})]}),e[15]=u,e[16]=h,e[17]=g):g=e[17];let x;return e[18]!==g||e[19]!==d?(x=(0,t.jsxs)("div",{className:"flex",children:[d,g]}),e[18]=g,e[19]=d,e[20]=x):x=e[20],x};var it=r=>{let e=(0,J.c)(12),{mode:s}=r,n;e[0]===s?n=e[1]:(n=s==="prompt"?(0,t.jsx)(ne,{className:"h-4 w-4"}):(0,t.jsx)(le,{className:"h-4 w-4"}),e[0]=s,e[1]=n);let i=n,l=s==="prompt"?ie:ae,a=s==="prompt"?"Edit the prompt before applying":"Apply AI fixes automatically",c;e[2]===l?c=e[3]:(c=(0,t.jsx)("span",{className:"font-medium",children:l}),e[2]=l,e[3]=c);let o;e[4]===a?o=e[5]:(o=(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a}),e[4]=a,e[5]=o);let m;e[6]!==c||e[7]!==o?(m=(0,t.jsxs)("div",{className:"flex flex-col",children:[c,o]}),e[6]=c,e[7]=o,e[8]=m):m=e[8];let p;return e[9]!==i||e[10]!==m?(p=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i,m]}),e[9]=i,e[10]=m,e[11]=p):p=e[11],p},ce=/(https?:\/\/\S+)/,at=/\.(png|jpe?g|gif|webp|svg|ico)(\?.*)?$/i,de=/^data:image\//i,ot=["avatars.githubusercontent.com"];function me(r){return de.test(r)?[{type:"image",url:r}]:r.split(ce).filter(e=>e.trim()!=="").map(e=>ce.test(e)?at.test(e)||de.test(e)||ot.some(s=>e.includes(s))?{type:"image",url:e}:{type:"url",url:e}:{type:"text",value:e})}var pe=E(),P=Z(we(),1),ct=new ke;const R=r=>{let e=RegExp("\x1B\\[[0-9;]*m","g");return r.replaceAll(e,"")};var ue=/(pip\s+install|uv\s+add|uv\s+pip\s+install)\s+/gi;function dt(r){ue.lastIndex=0;let e=ue.exec(r);if(!e)return null;let s=e.index+e[0].length,n=r.slice(s).split(/\s+/),i="",l=0;for(let c of n){let o=c.trim();if(!o)continue;if(o.startsWith("-")){l+=o.length+1;continue}let m=o.match(/^[\w,.[\]-]+/);if(m){i=m[0];break}break}if(!i)return null;let a=s+l+i.length;return{package:i,endIndex:a}}function k(r,e=""){if(!r)return null;if(!/https?:\/\//.test(r))return r;let s=me(r);return s.length===1&&s[0].type==="text"?r:(0,t.jsx)(t.Fragment,{children:s.map((n,i)=>{let l=e?`${e}-${i}`:i;if(n.type==="url"){let a=R(n.url);return(0,t.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",onClick:K.stopPropagation(),className:"text-link hover:underline",children:a},l)}if(n.type==="image"){let a=R(n.url);return(0,t.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",onClick:K.stopPropagation(),className:"text-link hover:underline",children:a},l)}return(0,t.jsx)(P.Fragment,{children:n.value},l)})})}var mt=r=>{let e=(0,pe.c)(6),{packages:s,children:n}=r,{handleInstallPackages:i}=Ke(),l;e[0]!==i||e[1]!==s?(l=c=>{i(s),c.preventDefault()},e[0]=i,e[1]=s,e[2]=l):l=e[2];let a;return e[3]!==n||e[4]!==l?(a=(0,t.jsx)("button",{onClick:l,className:"text-link hover:underline",type:"button",children:n}),e[3]=n,e[4]=l,e[5]=a):a=e[5],a};const pt=r=>{if(!(r instanceof G.Text))return;let e=R(r.data);if(!/(pip\s+install|uv\s+add|uv\s+pip\s+install)/i.test(e))return;let s=[],n=/(pip\s+install|uv\s+add|uv\s+pip\s+install)\s+/gi,i;for(;(i=n.exec(e))!==null;){let c=i.index,o=dt(e.slice(c));o&&s.push({match:i,result:o})}if(s.length===0)return;let l=[],a=0;if(s.forEach((c,o)=>{let{match:m,result:p}=c,d=m.index,f=d+p.endIndex;if(a<d){let j=e.slice(a,d);l.push((0,t.jsx)(P.Fragment,{children:k(j,`before-${o}`)},`before-${o}`))}let u=e.slice(d,f);l.push((0,t.jsx)(mt,{packages:[p.package],children:u},`install-${o}`)),a=f}),a<e.length){let c=e.slice(a);l.push((0,t.jsx)(P.Fragment,{children:k(c,"after")},"after"))}return(0,t.jsx)(t.Fragment,{children:l})},ut=r=>{if(!(r instanceof G.Text))return;let e=r.data;if(!/https?:\/\//.test(e))return;let s=k(e);if(typeof s!="string")return(0,t.jsx)(t.Fragment,{children:s})},ht=(...r)=>e=>{for(let s of r){let n=s(e);if(n!==void 0)return n}},xt=(r,e)=>(0,t.jsx)("span",{children:Ce(ct.ansi_to_html(r),{replace:s=>e(s)})}),ft=r=>{let e=(0,pe.c)(4),{text:s}=r,n;e[0]===s?n=e[1]:(n=xt(s,ht(pt,ut)),e[0]=s,e[1]=n);let i=n,l;return e[2]===i?l=e[3]:(l=(0,t.jsx)(t.Fragment,{children:i}),e[2]=i,e[3]=l),l};var he=E(),I=r=>{let e=(0,he.c)(10),s=r.title??"Tip",n;e[0]===s?n=e[1]:(n=(0,t.jsx)(Oe,{className:"pt-2 pb-2 font-normal",children:s}),e[0]=s,e[1]=n);let i;e[2]===r.children?i=e[3]:(i=(0,t.jsx)(Je,{className:"mr-24 text-[0.84375rem]",children:r.children}),e[2]=r.children,e[3]=i);let l;e[4]!==n||e[5]!==i?(l=(0,t.jsxs)(He,{value:"item-1",className:"text-muted-foreground",children:[n,i]}),e[4]=n,e[5]=i,e[6]=l):l=e[6];let a;return e[7]!==r.className||e[8]!==l?(a=(0,t.jsx)(Ue,{type:"single",collapsible:!0,className:r.className,children:l}),e[7]=r.className,e[8]=l,e[9]=a):a=e[9],a};const jt=r=>{let e=(0,he.c)(31),{errors:s,cellId:n,className:i}=r,l=_e(),a="This cell wasn't run because it has errors",c="destructive",o="text-error";if(s.some(gt))a="Interrupted";else if(s.some(yt))a="An internal error occurred";else if(s.some(vt))a="Ancestor prevented from running",c="default",o="text-secondary-foreground";else if(s.some(Nt))a="Ancestor stopped",c="default",o="text-secondary-foreground";else if(s.some(bt))a="SQL error";else{let x;e[0]===s?x=e[1]:(x=s.find(wt),e[0]=s,e[1]=x);let y=x;y&&"exception_type"in y&&(a=y.exception_type)}let m,p,d,f,u,j;if(e[2]!==c||e[3]!==n||e[4]!==l||e[5]!==i||e[6]!==s||e[7]!==o||e[8]!==a){let x=s.filter(kt),y=s.filter(It),w=s.filter($t),_=s.filter(_t),L=s.filter(Ft),C=s.filter(At),S=s.filter(Tt),W=s.filter(Ct),B=s.filter(St),V=s.filter(zt),F=s.filter(Mt),Q=s.filter(qt),D=s.filter(Et),z;e[15]===l?z=e[16]:(z=()=>{l.openApplication("scratchpad")},e[15]=l,e[16]=z);let xe=z,fe=()=>{let v=[];if(F.length>0||Q.length>0){let q=F.some(Pt),ge=!q&&F.some(Lt);v.push((0,t.jsxs)("div",{children:[F.map(Wt),Q.map(Bt),q&&(0,t.jsxs)($,{size:"xs",variant:"outline",className:"mt-2 font-normal",onClick:()=>Ge(l),children:[(0,t.jsx)(Xe,{className:"h-3.5 w-3.5 mr-1.5 mb-0.5"}),(0,t.jsx)("span",{children:"Open package manager"})]}),ge&&(0,t.jsxs)($,{size:"xs",variant:"outline",className:"mt-2 font-normal",onClick:()=>l.openApplication("terminal"),children:[(0,t.jsx)(re,{className:"h-3.5 w-3.5 mr-1.5"}),(0,t.jsx)("span",{children:"Open terminal"})]}),n&&(0,t.jsx)(N,{errors:[...F,...Q],cellId:n})]},"syntax-unknown"))}if(x.length>0&&v.push((0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground font-medium",children:"The setup cell cannot be run because it has references."}),(0,t.jsx)("ul",{className:"list-disc",children:x.flatMap(Vt)}),n&&(0,t.jsx)(N,{errors:x,cellId:n}),(0,t.jsxs)(I,{title:"Why can't the setup cell have references?",className:"mb-2",children:[(0,t.jsx)("p",{className:"pb-2",children:"The setup cell contains logic that must be run before any other cell runs, including top-level imports used by top-level functions. For this reason, it can't refer to other cells' variables."}),(0,t.jsx)("p",{className:"py-2",children:"Try simplifying the setup cell to only contain only necessary variables."}),(0,t.jsxs)("p",{className:"py-2",children:[(0,t.jsxs)(A,{href:"https://links.marimo.app/errors-setup",children:["Learn more at our docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),"."]})]})]},"setup-refs")),y.length>0&&v.push((0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground font-medium",children:"This cell is in a cycle."}),(0,t.jsx)("ul",{className:"list-disc",children:y.flatMap(Qt)}),n&&(0,t.jsx)(N,{errors:y,cellId:n}),(0,t.jsxs)(I,{title:"What are cycles and how do I resolve them?",className:"mb-2",children:[(0,t.jsx)("p",{className:"pb-2",children:"An example of a cycle is if one cell declares a variable 'a' and reads 'b', and another cell declares 'b' and and reads 'a'. Cycles like this make it impossible for marimo to know how to run your cells, and generally suggest that your code has a bug."}),(0,t.jsx)("p",{className:"py-2",children:"Try merging these cells into a single cell to eliminate the cycle."}),(0,t.jsxs)("p",{className:"py-2",children:[(0,t.jsxs)(A,{href:"https://links.marimo.app/errors-cycles",children:["Learn more at our docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),"."]})]})]},"cycle")),w.length>0){let q=w[0].name;v.push((0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground font-medium",children:"This cell redefines variables from other cells."}),w.map(Ot),n&&(0,t.jsx)(N,{errors:w,cellId:n}),(0,t.jsxs)(I,{title:"Why can't I redefine variables?",children:[(0,t.jsx)("p",{className:"pb-2",children:"marimo requires that each variable is defined in just one cell. This constraint enables reactive and reproducible execution, arbitrary cell reordering, seamless UI elements, execution as a script, and more."}),(0,t.jsxs)("p",{className:"py-2",children:["Try merging this cell with the mentioned cells or wrapping it in a function. Alternatively, prefix variables with an underscore (e.g., ",(0,t.jsxs)(te,{className:"inline",children:["_",q]}),"). to make them private to this cell."]}),(0,t.jsxs)("p",{className:"py-2",children:[(0,t.jsxs)(A,{href:"https://links.marimo.app/errors-multiple-definitions",children:["Learn more at our docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),"."]})]}),(0,t.jsx)(I,{title:"Need a scratchpad?",children:(0,t.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[(0,t.jsxs)($,{size:"xs",variant:"link",className:"my-2 font-normal mx-0 px-0",onClick:xe,children:[(0,t.jsx)(Te,{className:"h-3"}),(0,t.jsx)("span",{children:"Try the scratchpad"})]}),(0,t.jsx)("span",{children:"to experiment without restrictions on variable names."})]})})]},"multiple-defs"))}return _.length>0&&v.push((0,t.jsxs)("div",{children:[_.map(Ht),n&&(0,t.jsx)(N,{errors:_,cellId:n}),(0,t.jsxs)(I,{title:"Why can't I use `import *`?",children:[(0,t.jsx)("p",{className:"pb-2",children:"Star imports are incompatible with marimo's git-friendly file format and reproducible reactive execution."}),(0,t.jsx)("p",{className:"py-2",children:"marimo's Python file format stores code in functions, so notebooks can be imported as regular Python modules without executing all their code. But Python disallows `import *` everywhere except at the top-level of a module."}),(0,t.jsx)("p",{className:"py-2",children:"Star imports would also silently add names to globals, which would be incompatible with reactive execution."}),(0,t.jsxs)("p",{className:"py-2",children:[(0,t.jsxs)(A,{href:"https://links.marimo.app/errors-import-star",children:["Learn more at our docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),"."]})]})]},"import-star")),L.length>0&&v.push((0,t.jsxs)("div",{children:[L.map(Ut),n&&(0,t.jsx)(N,{errors:L,cellId:n})]},"interruption")),C.length>0&&v.push((0,t.jsxs)("ul",{children:[C.map(Jt),C.some(Rt)&&(0,t.jsx)(I,{children:"Fix the error in the mentioned cells, or handle the exceptions with try/except blocks."}),n&&(0,t.jsx)(N,{errors:C,cellId:n})]},"exception")),S.length>0&&v.push((0,t.jsxs)("ul",{children:[S.map(Zt),n&&(0,t.jsx)(N,{errors:S,cellId:n}),(0,t.jsx)(I,{children:S.some(Gt)?"Ensure that the referenced cells define the required variables, or turn off strict execution.":"Something is wrong with your declarations. Fix any discrepancies, or turn off strict execution."})]},"strict-exception")),W.length>0&&v.push((0,t.jsxs)("div",{children:[W.map(Kt),n&&(0,t.jsx)(N,{errors:W,cellId:n})]},"internal")),B.length>0&&v.push((0,t.jsxs)("div",{children:[B.map(Xt),n&&(0,t.jsx)(N,{errors:B,cellId:n})]},"ancestor-prevented")),V.length>0&&v.push((0,t.jsxs)("div",{children:[V.map(Yt),n&&(0,t.jsx)(N,{errors:V,cellId:n})]},"ancestor-stopped")),D.length>0&&v.push((0,t.jsxs)("div",{children:[D.map(er),n&&(0,t.jsx)(N,{errors:D,cellId:n,className:"mt-2.5"})]},"sql-errors")),v},O=`font-code font-medium tracking-wide ${o}`,M;e[17]!==O||e[18]!==a?(M=(0,t.jsx)(Re,{className:O,children:a}),e[17]=O,e[18]=a,e[19]=M):M=e[19];let je=M;m=Ze,f=c,e[20]===i?u=e[21]:(u=X("border-none font-code text-sm text-[0.84375rem] px-0 text-muted-foreground normal [&:has(svg)]:pl-0 space-y-4",i),e[20]=i,e[21]=u),j=je,p="flex flex-col gap-8",d=fe(),e[2]=c,e[3]=n,e[4]=l,e[5]=i,e[6]=s,e[7]=o,e[8]=a,e[9]=m,e[10]=p,e[11]=d,e[12]=f,e[13]=u,e[14]=j}else m=e[9],p=e[10],d=e[11],f=e[12],u=e[13],j=e[14];let h;e[22]!==p||e[23]!==d?(h=(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:p,children:d})}),e[22]=p,e[23]=d,e[24]=h):h=e[24];let g;return e[25]!==m||e[26]!==f||e[27]!==u||e[28]!==j||e[29]!==h?(g=(0,t.jsxs)(m,{variant:f,className:u,children:[j,h]}),e[25]=m,e[26]=f,e[27]=u,e[28]=j,e[29]=h,e[30]=g):g=e[30],g};function gt(r){return r.type==="interruption"}function yt(r){return r.type==="internal"}function vt(r){return r.type==="ancestor-prevented"}function Nt(r){return r.type==="ancestor-stopped"}function bt(r){return r.type==="sql-error"}function wt(r){return r.type==="exception"}function kt(r){return r.type==="setup-refs"}function It(r){return r.type==="cycle"}function $t(r){return r.type==="multiple-defs"}function _t(r){return r.type==="import-star"}function Ft(r){return r.type==="interruption"}function At(r){return r.type==="exception"}function Tt(r){return r.type==="strict-exception"}function Ct(r){return r.type==="internal"}function St(r){return r.type==="ancestor-prevented"}function zt(r){return r.type==="ancestor-stopped"}function Mt(r){return r.type==="syntax"}function qt(r){return r.type==="unknown"}function Et(r){return r.type==="sql-error"}function Pt(r){return r.msg.includes("!pip")}function Lt(r){return r.msg.includes("use os.subprocess")}function Wt(r,e){return(0,t.jsx)("pre",{children:k(r.msg,`syntax-${e}`)},`syntax-${e}`)}function Bt(r,e){return(0,t.jsx)("pre",{children:k(r.msg,`unknown-${e}`)},`unknown-${e}`)}function Vt(r,e){return r.edges_with_vars.map((s,n)=>(0,t.jsxs)("li",{className:"my-0.5 ml-8 text-muted-foreground/40",children:[(0,t.jsx)(b,{cellId:s[0]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[": "," ",s[1].length===1?s[1][0]:s[1].join(", ")]})]},`setup-refs-${e}-${n}`))}function Qt(r,e){return r.edges_with_vars.map((s,n)=>(0,t.jsxs)("li",{className:"my-0.5 ml-8 text-muted-foreground/40",children:[(0,t.jsx)(b,{cellId:s[0]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" -> ",s[1].length===1?s[1][0]:s[1].join(", ")," -> "]}),(0,t.jsx)(b,{cellId:s[2]})]},`cycle-${e}-${n}`))}function Dt(r,e){return(0,t.jsx)("li",{className:"my-0.5 ml-8 text-muted-foreground/40",children:(0,t.jsx)(b,{cellId:r})},`cell-${e}`)}function Ot(r,e){return(0,t.jsxs)(P.Fragment,{children:[(0,t.jsx)("p",{className:"text-muted-foreground mt-2",children:`'${r.name}' was also defined by:`}),(0,t.jsx)("ul",{className:"list-disc",children:r.cells.map(Dt)})]},`multiple-defs-${e}`)}function Ht(r,e){return(0,t.jsx)("p",{className:"text-muted-foreground",children:r.msg},`import-star-${e}`)}function Ut(r,e){return(0,t.jsx)("p",{children:"This cell was interrupted and needs to be re-run."},`interruption-${e}`)}function Jt(r,e){return r.exception_type==="NameError"&&r.msg.startsWith("name 'mo'")?(0,t.jsx)("li",{className:"my-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:"name 'mo' is not defined."}),(0,t.jsxs)("p",{className:"text-muted-foreground mt-2",children:["The marimo module (imported as"," ",(0,t.jsx)(te,{className:"inline",children:"mo"}),") is required for Markdown, SQL, and UI elements."]})]})},`exception-${e}`):r.exception_type==="NameError"&&r.msg.startsWith("name '_")?(0,t.jsx)("li",{className:"my-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:r.msg}),(0,t.jsxs)("p",{className:"text-muted-foreground mt-2",children:["Variables prefixed with an underscore are local to a cell"," ","(",(0,t.jsxs)(A,{href:"https://links.marimo.app/local-variables",children:["docs"," ",(0,t.jsx)(T,{size:"0.75rem",className:"inline"})]}),")."]}),(0,t.jsx)("div",{className:"text-muted-foreground mt-2",children:"See the console area for a traceback."})]})},`exception-${e}`):(0,t.jsx)("li",{className:"my-2",children:r.raising_cell==null?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:k(r.msg,`exception-${e}`)}),(0,t.jsx)("div",{className:"text-muted-foreground mt-2",children:"See the console area for a traceback."})]}):(0,t.jsxs)("div",{children:[k(r.msg,`exception-${e}`),(0,t.jsx)(b,{cellId:r.raising_cell})]})},`exception-${e}`)}function Rt(r){return r.raising_cell!=null}function Zt(r,e){return(0,t.jsx)("li",{className:"my-2",children:r.blamed_cell==null?(0,t.jsx)("p",{children:r.msg}):(0,t.jsxs)("div",{children:[r.msg,(0,t.jsx)(b,{cellId:r.blamed_cell})]})},`strict-exception-${e}`)}function Gt(r){return r.blamed_cell!=null}function Kt(r,e){return(0,t.jsx)("p",{children:r.msg},`internal-${e}`)}function Xt(r,e){return(0,t.jsxs)("div",{children:[r.msg,r.blamed_cell==null?(0,t.jsxs)("span",{children:["(",(0,t.jsx)(b,{cellId:r.raising_cell}),")"]}):(0,t.jsxs)("span",{children:["(",(0,t.jsx)(b,{cellId:r.raising_cell}),"\xA0blames\xA0",(0,t.jsx)(b,{cellId:r.blamed_cell}),")"]})]},`ancestor-prevented-${e}`)}function Yt(r,e){return(0,t.jsxs)("div",{children:[r.msg,(0,t.jsx)(b,{cellId:r.raising_cell})]},`ancestor-stopped-${e}`)}function er(r,e){return(0,t.jsx)("div",{className:"space-y-2 mt-2",children:(0,t.jsx)("p",{className:"text-muted-foreground whitespace-pre-wrap",children:r.msg})},`sql-error-${e}`)}export{re as a,oe as i,ft as n,me as r,jt as t};
import{s as A}from"./chunk-LvLJmgfZ.js";import{u as ne}from"./useEvent-DO6uJBas.js";import{t as re}from"./react-BGmjiNul.js";import{jt as ae,w as ie,wt as oe}from"./cells-BpZ7g6ok.js";import{t as q}from"./compiler-runtime-DeeZ7FnK.js";import{o as le}from"./utils-DXvhzCGS.js";import{t as se}from"./jsx-runtime-ZmTK25f3.js";import{t as D}from"./button-YC1gW_kJ.js";import{at as ue}from"./dist-DBwNzi3C.js";import{t as ce}from"./createLucideIcon-CnW3RofX.js";import{n as he,t as me}from"./LazyAnyLanguageCodeMirror-yzHjsVJt.js";import{r as pe}from"./useTheme-DUdVAZI8.js";import{t as fe}from"./copy-Bv2DBpIS.js";import{c as v,d as de,f as ge,g as xe,h as ye,l as we,m as T,o as ve,p as ke,s as N}from"./chunk-5FQGJX7Z-CVUXBqX6.js";import{c as P}from"./katex-Dc8yG8NU.js";import{r as be}from"./html-to-image-DjukyIj4.js";import{o as Fe}from"./focus-D51fcwZX.js";var Ne=ce("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Ce=q(),b=A(re(),1),I={};function Te(e){let t=(0,Ce.c)(5),[r,n]=(0,b.useState)(I[e]??!1),a;t[0]===e?a=t[1]:(a=o=>{n(o),I[e]=o},t[0]=e,t[1]=a);let i;return t[2]!==r||t[3]!==a?(i=[r,a],t[2]=r,t[3]=a,t[4]=i):i=t[4],i}function Ee(e){return e==null||e.data==null||e.data===""}function Se(e,t){return`data:${t};base64,${e}`}function je(e){return e.startsWith("data:")&&e.includes(";base64,")}function $e(e){return e.split(",")[1]}function _(e){let t=window.atob(e);return Uint8Array.from(t,r=>r.charCodeAt(0))}function z(e){let t=_(e);return new DataView(t.buffer)}function Me(e){let t=Array.from(e,r=>String.fromCharCode(r));return window.btoa(t.join(""))}function Ae(e){return Me(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function qe(e){return(e.buffers??[]).map(z)}function De(e,t){return B(e,t||{})||{type:"root",children:[]}}function B(e,t){let r=Pe(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function Pe(e,t){switch(e.nodeType){case 1:return Be(e,t);case 3:return _e(e);case 8:return ze(e);case 9:return O(e,t);case 10:return Ie();case 11:return O(e,t);default:return}}function O(e,t){return{type:"root",children:V(e,t)}}function Ie(){return{type:"doctype"}}function _e(e){return{type:"text",value:e.nodeValue||""}}function ze(e){return{type:"comment",value:e.nodeValue||""}}function Be(e,t){let r=e.namespaceURI,n=r===T.svg?xe:ye,a=r===T.html?e.tagName.toLowerCase():e.tagName,i=r===T.html&&a==="template"?e.content:e,o=e.getAttributeNames(),s={},l=-1;for(;++l<o.length;)s[o[l]]=e.getAttribute(o[l])||"";return n(a,s,V(i,t))}function V(e,t){let r=e.childNodes,n=[],a=-1;for(;++a<r.length;){let i=B(r[a],t);i!==void 0&&n.push(i)}return n}var Oe=new DOMParser;function Ve(e,t){return De(t!=null&&t.fragment?Le(e):Oe.parseFromString(e,"text/html"))}function Le(e){let t=document.createElement("template");return t.innerHTML=e,t.content}const L=(function(e,t,r){let n=ke(r);if(!e||!e.type||!e.children)throw Error("Expected parent node");if(typeof t=="number"){if(t<0||t===1/0)throw Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]}),k=(function(e){if(e==null)return We;if(typeof e=="string")return Ue(e);if(typeof e=="object")return Re(e);if(typeof e=="function")return E(e);throw Error("Expected function, string, or array as `test`")});function Re(e){let t=[],r=-1;for(;++r<e.length;)t[r]=k(e[r]);return E(n);function n(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Ue(e){return E(t);function t(r){return r.tagName===e}}function E(e){return t;function t(r,n,a){return!!(He(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function We(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function He(e){return typeof e=="object"&&!!e&&"type"in e&&"tagName"in e}var R=/\n/g,U=/[\t ]+/g,S=k("br"),W=k(et),Ke=k("p"),H=k("tr"),Qe=k(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Ze,tt]),K=k("address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp".split("."));function Xe(e,t){let r=t||{},n="children"in e?e.children:[],a=K(e),i=G(e,{whitespace:r.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...X(e,{whitespace:i,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<n.length;)o.push(...Q(n[s],e,{whitespace:i,breakBefore:s?void 0:a,breakAfter:s<n.length-1?S(n[s+1]):a}));let l=[],h;for(s=-1;++s<o.length;){let m=o[s];typeof m=="number"?h!==void 0&&m>h&&(h=m):m&&(h!==void 0&&h>-1&&l.push(`
`.repeat(h)||" "),h=-1,l.push(m))}return l.join("")}function Q(e,t,r){return e.type==="element"?Ge(e,t,r):e.type==="text"?r.whitespace==="normal"?X(e,r):Je(e):[]}function Ge(e,t,r){let n=G(e,r),a=e.children||[],i=-1,o=[];if(Qe(e))return o;let s,l;for(S(e)||H(e)&&L(t,e,H)?l=`
`:Ke(e)?(s=2,l=2):K(e)&&(s=1,l=1);++i<a.length;)o=o.concat(Q(a[i],e,{whitespace:n,breakBefore:i?void 0:s,breakAfter:i<a.length-1?S(a[i+1]):l}));return W(e)&&L(t,e,W)&&o.push(" "),s&&o.unshift(s),l&&o.push(l),o}function X(e,t){let r=String(e.value),n=[],a=[],i=0;for(;i<=r.length;){R.lastIndex=i;let l=R.exec(r),h=l&&"index"in l?l.index:r.length;n.push(Ye(r.slice(i,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),i===0?t.breakBefore:!0,h===r.length?t.breakAfter:!0)),i=h+1}let o=-1,s;for(;++o<n.length;)n[o].charCodeAt(n[o].length-1)===8203||o<n.length-1&&n[o+1].charCodeAt(0)===8203?(a.push(n[o]),s=void 0):n[o]?(typeof s=="number"&&a.push(s),a.push(n[o]),s=0):(o===0||o===n.length-1)&&a.push(0);return a}function Je(e){return[String(e.value)]}function Ye(e,t,r){let n=[],a=0,i;for(;a<e.length;){U.lastIndex=a;let o=U.exec(e);i=o?o.index:e.length,!a&&!i&&o&&!t&&n.push(""),a!==i&&n.push(e.slice(a,i)),a=o?i+o[0].length:i}return a!==i&&!r&&n.push(""),n.join(" ")}function G(e,t){if(e.type==="element"){let r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap";default:}}return t.whitespace}function Ze(e){return!!(e.properties||{}).hidden}function et(e){return e.tagName==="td"||e.tagName==="th"}function tt(e){return e.tagName==="dialog"&&!(e.properties||{}).open}var nt={},rt=[];function at(e){let t=e||nt;return function(r,n){ge(r,"element",function(a,i){let o=Array.isArray(a.properties.className)?a.properties.className:rt,s=o.includes("language-math"),l=o.includes("math-display"),h=o.includes("math-inline"),m=l;if(!s&&!l&&!h)return;let p=i[i.length-1],d=a;if(a.tagName==="code"&&s&&p&&p.type==="element"&&p.tagName==="pre"&&(d=p,p=i[i.length-2],m=!0),!p)return;let f=Xe(d,{whitespace:"pre"}),u;try{u=P.renderToString(f,{...t,displayMode:m,throwOnError:!0})}catch(w){let F=w,c=F.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...i,a],cause:F,place:a.position,ruleId:c,source:"rehype-katex"});try{u=P.renderToString(f,{...t,displayMode:m,strict:"ignore",throwOnError:!1})}catch{u=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(w)},children:[{type:"text",value:f}]}]}}typeof u=="string"&&(u=Ve(u,{fragment:!0}).children);let g=p.children.indexOf(d);return p.children.splice(g,1,...u),de})}}function it(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:i},exit:{mathFlow:a,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:s,mathText:o,mathTextData:s}};function e(l){this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]}]}},l)}function t(){this.buffer()}function r(){let l=this.resume(),h=this.stack[this.stack.length-1];h.type,h.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(l){let h=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),m=this.stack[this.stack.length-1];m.type,this.exit(l),m.value=h;let p=m.data.hChildren[0];p.type,p.tagName,p.children.push({type:"text",value:h}),this.data.mathFlowInside=void 0}function i(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function o(l){let h=this.resume(),m=this.stack[this.stack.length-1];m.type,this.exit(l),m.value=h,m.data.hChildren.push({type:"text",value:h})}function s(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function ot(e){let t=(e||{}).singleDollarTextMath;return t??(t=!0),n.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(i,o,s,l){let h=i.value||"",m=s.createTracker(l),p="$".repeat(Math.max(we(h,"$")+1,2)),d=s.enter("mathFlow"),f=m.move(p);if(i.meta){let u=s.enter("mathFlowMeta");f+=m.move(s.safe(i.meta,{after:`
`,before:f,encode:["$"],...m.current()})),u()}return f+=m.move(`
`),h&&(f+=m.move(h+`
`)),f+=m.move(p),d(),f}function n(i,o,s){let l=i.value||"",h=1;for(t||h++;RegExp("(^|[^$])"+"\\$".repeat(h)+"([^$]|$)").test(l);)h++;let m="$".repeat(h);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let p=-1;for(;++p<s.unsafe.length;){let d=s.unsafe[p];if(!d.atBreak)continue;let f=s.compilePattern(d),u;for(;u=f.exec(l);){let g=u.index;l.codePointAt(g)===10&&l.codePointAt(g-1)===13&&g--,l=l.slice(0,g)+" "+l.slice(u.index+1)}}return m+l+m}function a(){return"$"}}const lt={tokenize:st,concrete:!0,name:"mathFlow"};var J={tokenize:ut,partial:!0};function st(e,t,r){let n=this,a=n.events[n.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return s;function s(c){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(c)}function l(c){return c===36?(e.consume(c),o++,l):o<2?r(c):(e.exit("mathFlowFenceSequence"),N(e,h,"whitespace")(c))}function h(c){return c===null||v(c)?p(c):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(c))}function m(c){return c===null||v(c)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),p(c)):c===36?r(c):(e.consume(c),m)}function p(c){return e.exit("mathFlowFence"),n.interrupt?t(c):e.attempt(J,d,w)(c)}function d(c){return e.attempt({tokenize:F,partial:!0},w,f)(c)}function f(c){return(i?N(e,u,"linePrefix",i+1):u)(c)}function u(c){return c===null?w(c):v(c)?e.attempt(J,d,w)(c):(e.enter("mathFlowValue"),g(c))}function g(c){return c===null||v(c)?(e.exit("mathFlowValue"),u(c)):(e.consume(c),g)}function w(c){return e.exit("mathFlow"),t(c)}function F(c,Z,j){let $=0;return N(c,ee,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function ee(y){return c.enter("mathFlowFence"),c.enter("mathFlowFenceSequence"),M(y)}function M(y){return y===36?($++,c.consume(y),M):$<o?j(y):(c.exit("mathFlowFenceSequence"),N(c,te,"whitespace")(y))}function te(y){return y===null||v(y)?(c.exit("mathFlowFence"),Z(y)):j(y)}}}function ut(e,t,r){let n=this;return a;function a(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function ct(e){let t=(e||{}).singleDollarTextMath;return t??(t=!0),{tokenize:r,resolve:ht,previous:mt,name:"mathText"};function r(n,a,i){let o=0,s,l;return h;function h(u){return n.enter("mathText"),n.enter("mathTextSequence"),m(u)}function m(u){return u===36?(n.consume(u),o++,m):o<2&&!t?i(u):(n.exit("mathTextSequence"),p(u))}function p(u){return u===null?i(u):u===36?(l=n.enter("mathTextSequence"),s=0,f(u)):u===32?(n.enter("space"),n.consume(u),n.exit("space"),p):v(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),p):(n.enter("mathTextData"),d(u))}function d(u){return u===null||u===32||u===36||v(u)?(n.exit("mathTextData"),p(u)):(n.consume(u),d)}function f(u){return u===36?(n.consume(u),s++,f):s===o?(n.exit("mathTextSequence"),n.exit("mathText"),a(u)):(l.type="mathTextData",d(u))}}}function ht(e){let t=e.length-4,r=3,n,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)a===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(a=n):(n===t||e[n][1].type==="lineEnding")&&(e[a][1].type="mathTextData",n!==a+2&&(e[a][1].end=e[n-1][1].end,e.splice(a+2,n-a-2),t-=n-a-2,n=a+2),a=void 0);return e}function mt(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function pt(e){return{flow:{36:lt},text:{36:ct(e)}}}var ft={};function dt(e){let t=this,r=e||ft,n=t.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push(pt(r)),i.push(it()),o.push(ot(r))}function gt(e={}){return{name:"katex",type:"math",remarkPlugin:[dt,{singleDollarTextMath:e.singleDollarTextMath??!1}],rehypePlugin:[at,{errorColor:e.errorColor??"var(--color-muted-foreground)"}],getStyles(){return"katex/dist/katex.min.css"}}}var xt=gt(),C=q(),x=A(se(),1),yt=[ue.lineWrapping],wt=new Set(["python","markdown","sql","json","yaml","toml","shell","javascript","typescript","jsx","tsx","css","html"]);function vt(e,t){return e?e==="python"?{language:e,code:t}:e==="sql"?{language:"python",code:oe.fromQuery(t)}:e==="markdown"?{language:"python",code:ae.fromMarkdown(t)}:e==="shell"||e==="bash"?{language:"python",code:`import subprocess
subprocess.run("${t}")`}:{language:"python",code:`_${e} = """
${t}
"""`}:{language:"python",code:t}}var kt=e=>{let t=(0,C.c)(9),{code:r,language:n}=e,{createNewCell:a}=ie(),i=Fe(),o=ne(le),s;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==i?(s=()=>{let p=vt(n,r);n==="sql"&&be({autoInstantiate:o,createNewCell:a,fromCellId:i}),a({code:p.code,before:!1,cellId:i??"__end__"})},t[0]=o,t[1]=r,t[2]=a,t[3]=n,t[4]=i,t[5]=s):s=t[5];let l=s,h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,x.jsx)(he,{className:"ml-2 h-4 w-4"}),t[6]=h):h=t[6];let m;return t[7]===l?m=t[8]:(m=(0,x.jsxs)(D,{size:"xs",variant:"outline",onClick:l,children:["Add to Notebook",h]}),t[7]=l,t[8]=m),m},bt=e=>{let t=(0,C.c)(17),{code:r,language:n}=e,{theme:a}=pe(),[i,o]=(0,b.useState)(r);i!==r&&o(r);let s;t[0]===i?s=t[1]:(s=async()=>{await fe(i)},t[0]=i,t[1]=s);let l=s,h=a==="dark"?"dark":"light",m=n&&wt.has(n)?n:void 0,p;t[2]!==h||t[3]!==m||t[4]!==i?(p=(0,x.jsx)(b.Suspense,{children:(0,x.jsx)(me,{theme:h,language:m,className:"cm border rounded overflow-hidden",extensions:yt,value:i,onChange:o})}),t[2]=h,t[3]=m,t[4]=i,t[5]=p):p=t[5];let d;t[6]===l?d=t[7]:(d=(0,x.jsx)(Ft,{size:"xs",variant:"outline",onClick:l,children:"Copy"}),t[6]=l,t[7]=d);let f;t[8]!==n||t[9]!==i?(f=(0,x.jsx)(kt,{code:i,language:n}),t[8]=n,t[9]=i,t[10]=f):f=t[10];let u;t[11]!==d||t[12]!==f?(u=(0,x.jsxs)("div",{className:"flex justify-end mt-2 space-x-2",children:[d,f]}),t[11]=d,t[12]=f,t[13]=u):u=t[13];let g;return t[14]!==p||t[15]!==u?(g=(0,x.jsxs)("div",{className:"relative",children:[p,u]}),t[14]=p,t[15]=u,t[16]=g):g=t[16],g},Ft=e=>{let t=(0,C.c)(9),r,n;t[0]===e?(r=t[1],n=t[2]):({onClick:r,...n}=e,t[0]=e,t[1]=r,t[2]=n);let[a,i]=(0,b.useState)(!1),o;t[3]===r?o=t[4]:(o=h=>{r==null||r(h),i(!0),setTimeout(()=>i(!1),1e3)},t[3]=r,t[4]=o);let s=a?"Copied":"Copy",l;return t[5]!==n||t[6]!==o||t[7]!==s?(l=(0,x.jsx)(D,{...n,onClick:o,children:s}),t[5]=n,t[6]=o,t[7]=s,t[8]=l):l=t[8],l},Nt={code:({children:e,className:t})=>{let r=t==null?void 0:t.replace("language-","");if(r&&typeof e=="string"){let n=e.trim();return(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"text-xs text-muted-foreground pl-1",children:r}),(0,x.jsx)(bt,{code:n,language:r})]})}return(0,x.jsx)("code",{className:t,children:e})}};const Y=(0,b.memo)(e=>{let t=(0,C.c)(3),{content:r}=e,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={math:xt},t[0]=n):n=t[0];let a;return t[1]===r?a=t[2]:(a=(0,x.jsx)(ve,{components:Nt,plugins:n,className:"mo-markdown-renderer",children:r}),t[1]=r,t[2]=a),a});Y.displayName="MarkdownRenderer";export{Ae as a,qe as c,Ne as d,_ as i,Ee as l,Se as n,$e as o,z as r,je as s,Y as t,Te as u};
const n=Math.abs,h=Math.atan2,M=Math.cos,o=Math.max,r=Math.min,c=Math.sin,i=Math.sqrt,u=1e-12,s=Math.PI,t=s/2,f=2*s;function d(a){return a>1?0:a<-1?s:Math.acos(a)}function l(a){return a>=1?t:a<=-1?-t:Math.asin(a)}export{M as a,o as c,c as d,i as f,h as i,r as l,d as n,u as o,f as p,l as r,t as s,n as t,s as u};
import{t as a}from"./mathematica-GLtAlQgr.js";export{a as mathematica};
var o="[a-zA-Z\\$][a-zA-Z0-9\\$]*",A="(?:\\d+)",z="(?:\\.\\d+|\\d+\\.\\d*|\\d+)",Z="(?:\\.\\w+|\\w+\\.\\w*|\\w+)",r="(?:`(?:`?"+z+")?)",$=RegExp("(?:"+A+"(?:\\^\\^"+Z+r+"?(?:\\*\\^[+-]?\\d+)?))"),l=RegExp("(?:"+z+r+"?(?:\\*\\^[+-]?\\d+)?)"),i=RegExp("(?:`?)(?:"+o+")(?:`(?:"+o+"))*(?:`?)");function m(a,t){var e=a.next();return e==='"'?(t.tokenize=u,t.tokenize(a,t)):e==="("&&a.eat("*")?(t.commentLevel++,t.tokenize=h,t.tokenize(a,t)):(a.backUp(1),a.match($,!0,!1)||a.match(l,!0,!1)?"number":a.match(/(?:In|Out)\[[0-9]*\]/,!0,!1)?"atom":a.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/,!0,!1)?"meta":a.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,!0,!1)?"string.special":a.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)||a.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)||a.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)||a.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variableName.special":a.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)?"character":a.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":a.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)?"variableName.constant":a.match(i,!0,!1)?"keyword":a.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(a.next(),"error"))}function u(a,t){for(var e,n=!1,c=!1;(e=a.next())!=null;){if(e==='"'&&!c){n=!0;break}c=!c&&e==="\\"}return n&&!c&&(t.tokenize=m),"string"}function h(a,t){for(var e,n;t.commentLevel>0&&(n=a.next())!=null;)e==="("&&n==="*"&&t.commentLevel++,e==="*"&&n===")"&&t.commentLevel--,e=n;return t.commentLevel<=0&&(t.tokenize=m),"comment"}const k={name:"mathematica",startState:function(){return{tokenize:m,commentLevel:0}},token:function(a,t){return a.eatSpace()?null:t.tokenize(a,t)},languageData:{commentTokens:{block:{open:"(*",close:"*)"}}}};export{k as t};
import{t as o}from"./mbox-DsldZPOv.js";export{o as mbox};
var i=["From","Sender","Reply-To","To","Cc","Bcc","Message-ID","In-Reply-To","References","Resent-From","Resent-Sender","Resent-To","Resent-Cc","Resent-Bcc","Resent-Message-ID","Return-Path","Received"],o=["Date","Subject","Comments","Keywords","Resent-Date"],d=/^[ \t]/,s=/^From /,c=RegExp("^("+i.join("|")+"): "),m=RegExp("^("+o.join("|")+"): "),u=/^[^:]+:/,l=/^[^ ]+@[^ ]+/,h=/^.*?(?=[^ ]+?@[^ ]+)/,p=/^<.*?>/,R=/^.*?(?=<.*>)/;function H(e){return e==="Subject"?"header":"string"}function f(e,n){if(e.sol()){if(n.inSeparator=!1,n.inHeader&&e.match(d))return null;if(n.inHeader=!1,n.header=null,e.match(s))return n.inHeaders=!0,n.inSeparator=!0,"atom";var r,t=!1;return(r=e.match(m))||(t=!0)&&(r=e.match(c))?(n.inHeaders=!0,n.inHeader=!0,n.emailPermitted=t,n.header=r[1],"atom"):n.inHeaders&&(r=e.match(u))?(n.inHeader=!0,n.emailPermitted=!0,n.header=r[1],"atom"):(n.inHeaders=!1,e.skipToEnd(),null)}if(n.inSeparator)return e.match(l)?"link":(e.match(h)||e.skipToEnd(),"atom");if(n.inHeader){var a=H(n.header);if(n.emailPermitted){if(e.match(p))return a+" link";if(e.match(R))return a}return e.skipToEnd(),a}return e.skipToEnd(),null}const S={name:"mbox",startState:function(){return{inSeparator:!1,inHeader:!1,emailPermitted:!1,header:null,inHeaders:!1}},token:f,blankLine:function(e){e.inHeaders=e.inSeparator=e.inHeader=!1},languageData:{autocomplete:i.concat(o)}};export{S as t};
import{s as M}from"./chunk-LvLJmgfZ.js";import{t as O}from"./react-BGmjiNul.js";import{t as P}from"./compiler-runtime-DeeZ7FnK.js";import{r as S}from"./useEventListener-DIUKKfEy.js";import{t as _}from"./jsx-runtime-ZmTK25f3.js";import{n as u,t as v}from"./cn-BKtXLv3a.js";import{E as q,y as N}from"./Combination-CMPwuAmi.js";var a=M(O(),1),p=M(_(),1);function z(t){let e=t+"CollectionProvider",[o,n]=q(e),[s,l]=o(e,{collectionRef:{current:null},itemMap:new Map}),h=d=>{let{scope:r,children:c}=d,i=a.useRef(null),m=a.useRef(new Map).current;return(0,p.jsx)(s,{scope:r,itemMap:m,collectionRef:i,children:c})};h.displayName=e;let x=t+"CollectionSlot",A=N(x),y=a.forwardRef((d,r)=>{let{scope:c,children:i}=d;return(0,p.jsx)(A,{ref:S(r,l(x,c).collectionRef),children:i})});y.displayName=x;let g=t+"CollectionItemSlot",w="data-radix-collection-item",k=N(g),R=a.forwardRef((d,r)=>{let{scope:c,children:i,...m}=d,f=a.useRef(null),I=S(r,f),C=l(g,c);return a.useEffect(()=>(C.itemMap.set(f,{ref:f,...m}),()=>{C.itemMap.delete(f)})),(0,p.jsx)(k,{[w]:"",ref:I,children:i})});R.displayName=g;function E(d){let r=l(t+"CollectionConsumer",d);return a.useCallback(()=>{let c=r.collectionRef.current;if(!c)return[];let i=Array.from(c.querySelectorAll(`[${w}]`));return Array.from(r.itemMap.values()).sort((m,f)=>i.indexOf(m.ref.current)-i.indexOf(f.ref.current))},[r.collectionRef,r.itemMap])}return[{Provider:h,Slot:y,ItemSlot:R},E,n]}var V=a.createContext(void 0);function $(t){let e=a.useContext(V);return t||e||"ltr"}var B=P();const D=u("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",{variants:{subcontent:{true:"shadow-lg"}}}),F=u("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",{variants:{inset:{true:"pl-8"}}}),b="data-disabled:pointer-events-none data-disabled:opacity-50",G=u(v("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground",b),{variants:{}}),H=u("absolute left-2 flex h-3.5 w-3.5 items-center justify-center",{variants:{}}),J=u("px-2 py-1.5 text-sm font-semibold",{variants:{inset:{true:"pl-8"}}}),K=u(v("menu-item relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden",b),{variants:{inset:{true:"pl-8"},variant:{default:"focus:bg-accent focus:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",danger:"focus:bg-(--red-5) focus:text-(--red-12) aria-selected:bg-(--red-5) aria-selected:text-(--red-12)",muted:"focus:bg-muted/70 focus:text-muted-foreground aria-selected:bg-muted/70 aria-selected:text-muted-foreground",success:"focus:bg-(--grass-3) focus:text-(--grass-11) aria-selected:bg-(--grass-3) aria-selected:text-(--grass-11)",disabled:"text-muted-foreground"}},defaultVariants:{variant:"default"}}),L=u("-mx-1 my-1 h-px bg-border last:hidden",{variants:{}}),j=t=>{let e=(0,B.c)(8),o,n;e[0]===t?(o=e[1],n=e[2]):({className:o,...n}=t,e[0]=t,e[1]=o,e[2]=n);let s;e[3]===o?s=e[4]:(s=v("ml-auto text-xs tracking-widest opacity-60",o),e[3]=o,e[4]=s);let l;return e[5]!==n||e[6]!==s?(l=(0,p.jsx)("span",{className:s,...n}),e[5]=n,e[6]=s,e[7]=l):l=e[7],l};j.displayName="MenuShortcut";export{G as a,L as c,z as d,H as i,F as l,j as n,K as o,D as r,J as s,b as t,$ as u};
import"./react-BGmjiNul.js";import"./jsx-runtime-ZmTK25f3.js";import"./cjs-CH5Rj0g8.js";import{a as r}from"./chunk-5FQGJX7Z-CVUXBqX6.js";export{r as Mermaid};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./c4Diagram-YG6GDRKO-Dl34pnAp.js","./dist-C04_12Dz.js","./chunk-LvLJmgfZ.js","./src-BKLwm2RN.js","./src-Cf4NnJCp.js","./timer-ffBO1paY.js","./chunk-S3R3BYOJ-DgPGJLrA.js","./step-COhf-b0R.js","./math-BIeW4iGV.js","./chunk-ABZYJK2D-t8l6Viza.js","./preload-helper-DItdS47A.js","./purify.es-DNVQZNFu.js","./merge-BBX6ug-N.js","./_Uint8Array-BGESiCQL.js","./_baseFor-Duhs3RiJ.js","./memoize-BCOZVFBt.js","./chunk-TZMSLE5B-DFEUz811.js","./flowDiagram-NV44I4VS-Cl0HZ_gT.js","./chunk-JA3XYJ7Z-CaauVIYw.js","./channel-Ca5LuXyQ.js","./chunk-55IACEB6-SrR0J56d.js","./chunk-ATLVNIR6-VxibvAOV.js","./chunk-CVBHYZKI-CsebuiSO.js","./chunk-FMBD7UC4-Cn7KHL11.js","./chunk-HN2XXSSU-Bw_9WyjM.js","./chunk-JZLCHNYA-cYgsW1_e.js","./chunk-MI3HLSF2-Csy17Fj5.js","./chunk-N4CR4FBY-eo9CRI73.js","./chunk-QXUST7PY-CUUVFKsm.js","./line-BCZzhM6G.js","./path-BMloFSsK.js","./array-BF0shS9G.js","./chunk-QN33PNHL-C_hHv997.js","./erDiagram-Q2GNP2WA-C1xdmPJj.js","./gitGraphDiagram-NY62KEGX-D649tm7F.js","./chunk-FPAJGGOC-DOBSZjU2.js","./reduce-CaioMeUx.js","./_baseIsEqual-B9N9Mw_N.js","./_arrayReduce-TT0iOGKY.js","./_baseEach-BhAgFun2.js","./get-6uJrSKbw.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./hasIn-CycJImp8.js","./_baseProperty-NKyJO2oh.js","./_baseUniq-BP3iN0f3.js","./min-Ci3LzCQg.js","./_baseMap-D3aN2j3O.js","./_baseFlatten-CUZNxU8H.js","./flatten-D-7VEN0q.js","./isEmpty-CgX_-6Mt.js","./main-U5Goe76G.js","./chunk-76Q3JFCE-CC_RB1qp.js","./chunk-FWNWRKHM-D3c3qJTG.js","./chunk-LBM3YZW2-DNY-0NiJ.js","./chunk-LHMN2FUI-xvIevmTh.js","./chunk-O7ZBX7Z2-CsMGWxKA.js","./chunk-S6J4BHB3-B5AsdTT7.js","./chunk-T53DSG4Q-td6bRJ2x.js","./mermaid-parser.core-BQwQ8Y_u.js","./chunk-4BX2VUAB-BpI4ekYZ.js","./chunk-QZHKN3VN-bGLTeFnj.js","./ganttDiagram-JELNMOA3-BpE9RPjJ.js","./linear-DjglEiG4.js","./precisionRound-BMPhtTJQ.js","./defaultLocale-D_rSvXvJ.js","./init-AtRnKt23.js","./time-lLuPpFd-.js","./defaultLocale-C92Rrpmf.js","./infoDiagram-WHAUD3N6-CEIds0YG.js","./chunk-EXTU4WIE-CyW9PraH.js","./chunk-XAJISQIX-Bus-Z8i1.js","./pieDiagram-ADFJNKIX-DnzHEEdh.js","./ordinal-DTOdb5Da.js","./arc-3DY1fURi.js","./quadrantDiagram-AYHSOK5B-B6T0wyQJ.js","./xychartDiagram-PRI3JC2R-HVlMJ22G.js","./range-Bc7-zhbC.js","./requirementDiagram-UZGBJVZJ-BL1cpcB7.js","./sequenceDiagram-WL72ISMW-DX-71FKf.js","./classDiagram-2ON5EDUG-Dw6g8LWZ.js","./chunk-B4BG7PRW-Dm0tRCOk.js","./classDiagram-v2-WZHVMYZB-BOkOSYqg.js","./stateDiagram-FKZM4ZOC-DiTrx4-Q.js","./dagre-DFula7I5.js","./graphlib-B4SLw_H3.js","./sortBy-CGfmqUg5.js","./pick-B_6Qi5aM.js","./_baseSet-5Rdwpmr3.js","./range-D2UKkEg-.js","./toInteger-CDcO32Gx.js","./now-6sUe0ZdD.js","./_hasUnicode-CWqKLxBC.js","./isString-DtNk7ov1.js","./chunk-DI55MBZ5-BNViV6Iv.js","./stateDiagram-v2-4FDKWEC3-CfbYvNgS.js","./journeyDiagram-XKPGCS4Q-BOKoLZRY.js","./timeline-definition-IT6M3QCI-BuvaeqF7.js","./mindmap-definition-VGOIOE7T-CfwhT5_2.js","./kanban-definition-3W4ZIXB7-PPWsqDVb.js","./sankeyDiagram-TZEHDZUN-DqWtGnca.js","./colors-C3_wIR8c.js","./diagram-S2PKOQOG-BBYN_e8t.js","./diagram-QEK2KX5R-B1m8kE9K.js","./blockDiagram-VD42YOAC-BqCwBNes.js","./clone-bEECh4rs.js","./architectureDiagram-VXUJARFQ-CbY--qni.js","./cytoscape.esm-DRpjbKu_.js","./diagram-PSM6KHXK-CoEONPpr.js","./treemap-DqSsE4KM.js"])))=>i.map(i=>d[i]);
import{s as Et}from"./chunk-LvLJmgfZ.js";import"./useEvent-DO6uJBas.js";import{t as ma}from"./react-BGmjiNul.js";import{t as ua}from"./compiler-runtime-DeeZ7FnK.js";import{t as xt}from"./isEmpty-CgX_-6Mt.js";import{d as ga}from"./hotkeys-BHHWjLlp.js";import{t as pa}from"./jsx-runtime-ZmTK25f3.js";import{t as u}from"./preload-helper-DItdS47A.js";import{r as fa}from"./useTheme-DUdVAZI8.js";import{t as ya}from"./purify.es-DNVQZNFu.js";import{n as ha}from"./useAsyncData-C4XRy1BE.js";import{u as V}from"./src-Cf4NnJCp.js";import{a as wa,f as vt,g as B,h as _a,i as ba,o as Ea}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{t as Dt}from"./chunk-XAJISQIX-Bus-Z8i1.js";import{i as Tt,n as i,r as w}from"./src-BKLwm2RN.js";import{J as me,M as ue,P as K,R as xa,S as va,V as Da,W as Ta,Y as La,c as Aa,f as Lt,g as ka,h as Ra,j as ee,l as At,n as Ia,p as ge,q as Pa,r as Oa,t as Ma,w as kt,x as pe,y as G,__tla as Va}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as Sa}from"./chunk-EXTU4WIE-CyW9PraH.js";import{n as Fa,t as $a}from"./chunk-MI3HLSF2-Csy17Fj5.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import{i as za,s as ja}from"./chunk-JA3XYJ7Z-CaauVIYw.js";import"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import{n as qa,__tla as Ca}from"./chunk-N4CR4FBY-eo9CRI73.js";let Rt,Ha=Promise.all([(()=>{try{return Va}catch{}})(),(()=>{try{return Ca}catch{}})()]).then(async()=>{var F;var fe="comm",ye="rule",he="decl",It="@import",Pt="@namespace",Ot="@keyframes",Mt="@layer",we=Math.abs,te=String.fromCharCode;function _e(e){return e.trim()}function N(e,t,r){return e.replace(t,r)}function Vt(e,t,r){return e.indexOf(t,r)}function z(e,t){return e.charCodeAt(t)|0}function j(e,t,r){return e.slice(t,r)}function k(e){return e.length}function St(e){return e.length}function Y(e,t){return t.push(e),e}var U=1,q=1,be=0,E=0,y=0,C="";function re(e,t,r,a,n,o,s,l){return{value:e,root:t,parent:r,type:a,props:n,children:o,line:U,column:q,length:s,return:"",siblings:l}}function Ft(){return y}function $t(){return y=E>0?z(C,--E):0,q--,y===10&&(q=1,U--),y}function D(){return y=E<be?z(C,E++):0,q++,y===10&&(q=1,U++),y}function M(){return z(C,E)}function W(){return E}function J(e,t){return j(C,e,t)}function H(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zt(e){return U=q=1,be=k(C=e),E=0,[]}function jt(e){return C="",e}function ae(e){return _e(J(E-1,ie(e===91?e+2:e===40?e+1:e)))}function qt(e){for(;(y=M())&&y<33;)D();return H(e)>2||H(y)>3?"":" "}function Ct(e,t){for(;--t&&D()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return J(e,W()+(t<6&&M()==32&&D()==32))}function ie(e){for(;D();)switch(y){case e:return E;case 34:case 39:e!==34&&e!==39&&ie(y);break;case 40:e===41&&ie(e);break;case 92:D();break}return E}function Ht(e,t){for(;D()&&e+y!==57&&!(e+y===84&&M()===47););return"/*"+J(t,E-1)+"*"+te(e===47?e:D())}function Bt(e){for(;!H(M());)D();return J(e,E)}function Gt(e){return jt(Q("",null,null,null,[""],e=zt(e),0,[0],e))}function Q(e,t,r,a,n,o,s,l,d){for(var g=0,f=0,c=s,_=0,x=0,T=0,p=1,P=1,L=1,h=0,A="",O=n,R=o,v=a,m=A;P;)switch(T=h,h=D()){case 40:if(T!=108&&z(m,c-1)==58){Vt(m+=N(ae(h),"&","&\f"),"&\f",we(g?l[g-1]:0))!=-1&&(L=-1);break}case 34:case 39:case 91:m+=ae(h);break;case 9:case 10:case 13:case 32:m+=qt(T);break;case 92:m+=Ct(W()-1,7);continue;case 47:switch(M()){case 42:case 47:Y(Nt(Ht(D(),W()),t,r,d),d),(H(T||1)==5||H(M()||1)==5)&&k(m)&&j(m,-1,void 0)!==" "&&(m+=" ");break;default:m+="/"}break;case 123*p:l[g++]=k(m)*L;case 125*p:case 59:case 0:switch(h){case 0:case 125:P=0;case 59+f:L==-1&&(m=N(m,/\f/g,"")),x>0&&(k(m)-c||p===0&&T===47)&&Y(x>32?xe(m+";",a,r,c-1,d):xe(N(m," ","")+";",a,r,c-2,d),d);break;case 59:m+=";";default:if(Y(v=Ee(m,t,r,g,f,n,l,A,O=[],R=[],c,o),o),h===123)if(f===0)Q(m,t,v,v,O,o,c,l,R);else{switch(_){case 99:if(z(m,3)===110)break;case 108:if(z(m,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Q(e,v,v,a&&Y(Ee(e,v,v,0,0,n,l,A,n,O=[],c,R),R),n,R,c,l,a?O:R):Q(m,v,v,v,[""],R,0,l,R)}}g=f=x=0,p=L=1,A=m="",c=s;break;case 58:c=1+k(m),x=T;default:if(p<1){if(h==123)--p;else if(h==125&&p++==0&&$t()==125)continue}switch(m+=te(h),h*p){case 38:L=f>0?1:(m+="\f",-1);break;case 44:l[g++]=(k(m)-1)*L,L=1;break;case 64:M()===45&&(m+=ae(D())),_=M(),f=c=k(A=m+=Bt(W())),h++;break;case 45:T===45&&k(m)==2&&(p=0)}}return o}function Ee(e,t,r,a,n,o,s,l,d,g,f,c){for(var _=n-1,x=n===0?o:[""],T=St(x),p=0,P=0,L=0;p<a;++p)for(var h=0,A=j(e,_+1,_=we(P=s[p])),O=e;h<T;++h)(O=_e(P>0?x[h]+" "+A:N(A,/&\f/g,x[h])))&&(d[L++]=O);return re(e,t,r,n===0?ye:l,d,g,f,c)}function Nt(e,t,r,a){return re(e,t,r,fe,te(Ft()),j(e,2,-2),0,a)}function xe(e,t,r,a,n){return re(e,t,r,he,j(e,0,a),j(e,a+1,-1),a,n)}function ne(e,t){for(var r="",a=0;a<e.length;a++)r+=t(e[a],a,e,t)||"";return r}function Yt(e,t,r,a){switch(e.type){case Mt:if(e.children.length)break;case It:case Pt:case he:return e.return=e.return||e.value;case fe:return"";case Ot:return e.return=e.value+"{"+ne(e.children,a)+"}";case ye:if(!k(e.value=e.props.join(",")))return""}return k(r=ne(e.children,a))?e.return=e.value+"{"+r+"}":""}var Ut=ua(),ve="c4",Wt={id:ve,detector:i(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./c4Diagram-YG6GDRKO-Dl34pnAp.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url);return{id:ve,diagram:e}},"loader")},De="flowchart",Jt={id:De,detector:i((e,t)=>{var r,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./flowDiagram-NV44I4VS-Cl0HZ_gT.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([17,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url);return{id:De,diagram:e}},"loader")},Te="flowchart-v2",Qt={id:Te,detector:i((e,t)=>{var r,a,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./flowDiagram-NV44I4VS-Cl0HZ_gT.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([17,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url);return{id:Te,diagram:e}},"loader")},Le="er",Xt={id:Le,detector:i(e=>/^\s*erDiagram/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./erDiagram-Q2GNP2WA-C1xdmPJj.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([33,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,24,25,27,28,29,30,31,32]),import.meta.url);return{id:Le,diagram:e}},"loader")},Ae="gitGraph",Zt={id:Ae,detector:i(e=>/^\s*gitGraph/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./gitGraphDiagram-NY62KEGX-D649tm7F.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([34,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,6,7,8,9,11,12,60,61]),import.meta.url);return{id:Ae,diagram:e}},"loader")},ke="gantt",Kt={id:ke,detector:i(e=>/^\s*gantt/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./ganttDiagram-JELNMOA3-BpE9RPjJ.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([62,1,2,63,64,65,5,66,67,68,3,4,6,7,8,9,10,11,12,13,14,15]),import.meta.url);return{id:ke,diagram:e}},"loader")},Re="info",er={id:Re,detector:i(e=>/^\s*info/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./infoDiagram-WHAUD3N6-CEIds0YG.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([69,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,2,52,53,54,55,56,57,58,59,10,3,4,5,11,9,70,71]),import.meta.url);return{id:Re,diagram:e}},"loader")},Ie="pie",tr={id:Ie,detector:i(e=>/^\s*pie/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./pieDiagram-ADFJNKIX-DnzHEEdh.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([72,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,30,73,66,74,8,31,6,7,9,11,12,60,70]),import.meta.url);return{id:Ie,diagram:e}},"loader")},Pe="quadrantChart",rr={id:Pe,detector:i(e=>/^\s*quadrantChart/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-B6T0wyQJ.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([75,63,64,65,5,2,66,3,4,11,9,10]),import.meta.url);return{id:Pe,diagram:e}},"loader")},Oe="xychart",ar={id:Oe,detector:i(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./xychartDiagram-PRI3JC2R-HVlMJ22G.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([76,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,63,64,65,66,77,73,29,30,31,70]),import.meta.url);return{id:Oe,diagram:e}},"loader")},Me="requirement",ir={id:Me,detector:i(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-BL1cpcB7.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([78,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,22,24,25,27,28,29,30,31,32]),import.meta.url);return{id:Me,diagram:e}},"loader")},Ve="sequence",nr={id:Ve,detector:i(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./sequenceDiagram-WL72ISMW-DX-71FKf.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([79,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26,61,16]),import.meta.url);return{id:Ve,diagram:e}},"loader")},Se="class",or={id:Se,detector:i((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./classDiagram-2ON5EDUG-Dw6g8LWZ.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([80,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,81,23,27,25,22,28,29,30,31,24,32]),import.meta.url);return{id:Se,diagram:e}},"loader")},Fe="classDiagram",sr={id:Fe,detector:i((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-BOkOSYqg.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([82,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,81,23,27,25,22,28,29,30,31,24,32]),import.meta.url);return{id:Fe,diagram:e}},"loader")},$e="state",dr={id:$e,detector:i((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./stateDiagram-FKZM4ZOC-DiTrx4-Q.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([83,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,29,30,31,84,85,37,36,38,39,40,41,42,43,44,45,48,50,46,47,86,87,88,49,89,90,91,92,93,20,21,22,94,27,25,28,24,32]),import.meta.url);return{id:$e,diagram:e}},"loader")},ze="stateDiagram",lr={id:ze,detector:i((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-CfbYvNgS.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([95,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,22,94,27,25,28,29,30,31,24,32]),import.meta.url);return{id:ze,diagram:e}},"loader")},je="journey",cr={id:je,detector:i(e=>/^\s*journey/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-BOKoLZRY.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([96,1,2,3,4,5,74,30,8,11,9,10,23,16]),import.meta.url);return{id:je,diagram:e}},"loader")},qe={draw:i((e,t,r)=>{w.debug(`rendering svg for syntax error
`);let a=Sa(t),n=a.append("g");a.attr("viewBox","0 0 2412 512"),Aa(a,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},mr=qe,ur={db:{},renderer:qe,parser:{parse:i(()=>{},"parse")}},Ce="flowchart-elk",gr={id:Ce,detector:i((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./flowDiagram-NV44I4VS-Cl0HZ_gT.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([17,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url);return{id:Ce,diagram:e}},"loader")},He="timeline",pr={id:He,detector:i(e=>/^\s*timeline/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./timeline-definition-IT6M3QCI-BuvaeqF7.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([97,3,2,4,5,74,30,8,11,9,10]),import.meta.url);return{id:He,diagram:e}},"loader")},Be="mindmap",fr={id:Be,detector:i(e=>/^\s*mindmap/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./mindmap-definition-VGOIOE7T-CfwhT5_2.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([98,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,22,24,25,27,28,29,30,31,32]),import.meta.url);return{id:Be,diagram:e}},"loader")},Ge="kanban",yr={id:Ge,detector:i(e=>/^\s*kanban/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./kanban-definition-3W4ZIXB7-PPWsqDVb.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([99,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,21,22,70,23,25,26]),import.meta.url);return{id:Ge,diagram:e}},"loader")},Ne="sankey",hr={id:Ne,detector:i(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-DqWtGnca.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([100,3,2,4,5,101,73,66,11,9,10]),import.meta.url);return{id:Ne,diagram:e}},"loader")},Ye="packet",wr={id:Ye,detector:i(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./diagram-S2PKOQOG-BBYN_e8t.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([102,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,6,7,8,9,11,12,60,70]),import.meta.url);return{id:Ye,diagram:e}},"loader")},Ue="radar",_r={id:Ue,detector:i(e=>/^\s*radar-beta/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./diagram-QEK2KX5R-B1m8kE9K.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([103,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,6,7,8,9,11,12,60,70]),import.meta.url);return{id:Ue,diagram:e}},"loader")},We="block",br={id:We,detector:i(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./blockDiagram-VD42YOAC-BqCwBNes.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([104,1,2,18,3,4,5,6,7,8,9,10,11,12,13,14,15,29,30,31,85,37,36,38,39,40,41,42,43,44,45,48,50,19,105,22,23,24]),import.meta.url);return{id:We,diagram:e}},"loader")},Je="architecture",Er={id:Je,detector:i(e=>/^\s*architecture/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./architectureDiagram-VXUJARFQ-CbY--qni.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([106,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,18,3,4,5,6,7,8,9,10,11,12,52,53,54,55,56,57,58,59,107,60,70]),import.meta.url);return{id:Je,diagram:e}},"loader")},Qe="treemap",xr={id:Qe,detector:i(e=>/^\s*treemap/.test(e),"detector"),loader:i(async()=>{let{diagram:e}=await u(async()=>{let{diagram:t}=await import("./diagram-PSM6KHXK-CoEONPpr.js").then(async r=>(await r.__tla,r));return{diagram:t}},__vite__mapDeps([108,1,2,35,36,37,13,38,39,14,40,41,42,15,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,10,3,4,5,65,109,73,66,6,7,8,9,11,12,60,21,70,32]),import.meta.url);return{id:Qe,diagram:e}},"loader")},Xe=!1,X=i(()=>{Xe||(Xe=!0,ee("error",ur,e=>e.toLowerCase().trim()==="error"),ee("---",{db:{clear:i(()=>{},"clear")},styles:{},renderer:{draw:i(()=>{},"draw")},parser:{parse:i(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:i(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ue(gr,fr,Er),ue(Wt,yr,sr,or,Xt,Kt,er,tr,ir,nr,Qt,Jt,pr,Zt,lr,dr,cr,rr,hr,wr,ar,br,_r,xr))},"addDiagrams"),vr=i(async()=>{w.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(ge).map(async([t,{detector:r,loader:a}])=>{if(a)try{pe(t)}catch{try{let{diagram:n,id:o}=await a();ee(o,n,r)}catch(n){throw w.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete ge[t],n}}}))).filter(t=>t.status==="rejected");if(e.length>0){w.error(`Failed to load ${e.length} external diagrams`);for(let t of e)w.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),Dr="graphics-document document";function Ze(e,t){e.attr("role",Dr),t!==""&&e.attr("aria-roledescription",t)}i(Ze,"setA11yDiagramInfo");function Ke(e,t,r,a){if(e.insert!==void 0){if(r){let n=`chart-desc-${a}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){let n=`chart-title-${a}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}i(Ke,"addSVGa11yTitleDescription");var oe=(F=class{constructor(t,r,a,n,o){this.type=t,this.text=r,this.db=a,this.parser=n,this.renderer=o}static async fromText(t,r={}){var g,f;let a=G(),n=Lt(t,a);t=Ea(t)+`
`;try{pe(n)}catch{let c=va(n);if(!c)throw new Ma(`Diagram ${n} not found.`);let{id:_,diagram:x}=await c();ee(_,x)}let{db:o,parser:s,renderer:l,init:d}=pe(n);return s.parser&&(s.parser.yy=o),(g=o.clear)==null||g.call(o),d==null||d(a),r.title&&((f=o.setDiagramTitle)==null||f.call(o,r.title)),await s.parse(t),new F(n,t,o,s,l)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},i(F,"Diagram"),F),et=[],Tr=i(()=>{et.forEach(e=>{e()}),et=[]},"attachFunctions"),Lr=i(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function tt(e){let t=e.match(ka);if(!t)return{text:e,metadata:{}};let r=Fa(t[1],{schema:$a})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let a={};return r.displayMode&&(a.displayMode=r.displayMode.toString()),r.title&&(a.title=r.title.toString()),r.config&&(a.config=r.config),{text:e.slice(t[0].length),metadata:a}}i(tt,"extractFrontMatter");var Ar=i(e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,r,a)=>"<"+r+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),kr=i(e=>{let{text:t,metadata:r}=tt(e),{displayMode:a,title:n,config:o={}}=r;return a&&(o.gantt||(o.gantt={}),o.gantt.displayMode=a),{title:n,config:o,text:t}},"processFrontmatter"),Rr=i(e=>{let t=B.detectInit(e)??{},r=B.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:a})=>a==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:_a(e),directive:t}},"processDirectives");function se(e){let t=kr(Ar(e)),r=Rr(t.text),a=ba(t.config,r.directive);return e=Lr(r.text),{code:e,title:t.title,config:a}}i(se,"preprocessDiagram");function rt(e){let t=new TextEncoder().encode(e),r=Array.from(t,a=>String.fromCodePoint(a)).join("");return btoa(r)}i(rt,"toBase64");var Ir=5e4,Pr="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Or="sandbox",Mr="loose",Vr="http://www.w3.org/2000/svg",Sr="http://www.w3.org/1999/xlink",Fr="http://www.w3.org/1999/xhtml",$r="100%",zr="100%",jr="border:0;margin:0;",qr="margin:0",Cr="allow-top-navigation-by-user-activation allow-popups",Hr='The "iframe" tag is not supported by your browser.',Br=["foreignobject"],Gr=["dominant-baseline"];function de(e){let t=se(e);return K(),Ia(t.config??{}),t}i(de,"processAndSetConfigs");async function at(e,t){X();try{let{code:r,config:a}=de(e);return{diagramType:(await st(r)).type,config:a}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}i(at,"parse");var it=i((e,t,r=[])=>`
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Nr=i((e,t=new Map)=>{var a;let r="";if(e.themeCSS!==void 0&&(r+=`
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let n=e.htmlLabels??((a=e.flowchart)==null?void 0:a.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{xt(o.styles)||n.forEach(s=>{r+=it(o.id,s,o.styles)}),xt(o.textStyles)||(r+=it(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(s=>s.replace("color","fill"))))})}return r},"createCssStyles"),Yr=i((e,t,r,a)=>ne(Gt(`${a}{${Pa(t,Nr(e,r),e.themeVariables)}}`),Yt),"createUserStyles"),Ur=i((e="",t,r)=>{let a=e;return!r&&!t&&(a=a.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),a=wa(a),a=a.replace(/<br>/g,"<br/>"),a},"cleanUpSvgCode"),Wr=i((e="",t)=>{var r,a;return`<iframe style="width:${$r};height:${(a=(r=t==null?void 0:t.viewBox)==null?void 0:r.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":zr};${jr}" src="data:text/html;charset=UTF-8;base64,${rt(`<body style="${qr}">${e}</body>`)}" sandbox="${Cr}">
${Hr}
</iframe>`},"putIntoIFrame"),nt=i((e,t,r,a,n)=>{let o=e.append("div");o.attr("id",r),a&&o.attr("style",a);let s=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Vr);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function le(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}i(le,"sandboxedIframe");var Jr=i((e,t,r,a)=>{var n,o,s;(n=e.getElementById(t))==null||n.remove(),(o=e.getElementById(r))==null||o.remove(),(s=e.getElementById(a))==null||s.remove()},"removeExistingElements"),Qr=i(async function(e,t,r){var ft,yt,ht,wt,_t,bt;X();let a=de(t);t=a.code;let n=G();w.debug(n),t.length>((n==null?void 0:n.maxTextSize)??Ir)&&(t=Pr);let o="#"+e,s="i"+e,l="#"+s,d="d"+e,g="#"+d,f=i(()=>{let I=V(_?l:g).node();I&&"remove"in I&&I.remove()},"removeTempElements"),c=V("body"),_=n.securityLevel===Or,x=n.securityLevel===Mr,T=n.fontFamily;r===void 0?(Jr(document,e,d,s),_?(c=V(le(V("body"),s).nodes()[0].contentDocument.body),c.node().style.margin=0):c=V("body"),nt(c,e,d)):(r&&(r.innerHTML=""),_?(c=V(le(V(r),s).nodes()[0].contentDocument.body),c.node().style.margin=0):c=V(r),nt(c,e,d,`font-family: ${T}`,Sr));let p,P;try{p=await oe.fromText(t,{title:a.title})}catch(I){if(n.suppressErrorRendering)throw f(),I;p=await oe.fromText("error"),P=I}let L=c.select(g).node(),h=p.type,A=L.firstChild,O=A.firstChild,R=(yt=(ft=p.renderer).getClasses)==null?void 0:yt.call(ft,t,p),v=Yr(n,h,R,o),m=document.createElement("style");m.innerHTML=v,A.insertBefore(m,O);try{await p.renderer.draw(t,e,Dt.version,p)}catch(I){throw n.suppressErrorRendering?f():mr.draw(t,e,Dt.version),I}let da=c.select(`${g} svg`),la=(wt=(ht=p.db).getAccTitle)==null?void 0:wt.call(ht),ca=(bt=(_t=p.db).getAccDescription)==null?void 0:bt.call(_t);dt(h,da,la,ca),c.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Fr);let $=c.select(g).node().innerHTML;if(w.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),$=Ur($,_,Ra(n.arrowMarkerAbsolute)),_){let I=c.select(g+" svg").node();$=Wr($,I)}else x||($=ya.sanitize($,{ADD_TAGS:Br,ADD_ATTR:Gr,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Tr(),P)throw P;return f(),{diagramType:h,svg:$,bindFunctions:p.db.bindFunctions}},"render");function ot(e={}){var r;let t=Oa({},e);t!=null&&t.fontFamily&&!((r=t.themeVariables)!=null&&r.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),xa(t),t!=null&&t.theme&&t.theme in me?t.themeVariables=me[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=me.default.getThemeVariables(t.themeVariables)),Tt((typeof t=="object"?Ta(t):kt()).logLevel),X()}i(ot,"initialize");var st=i((e,t={})=>{let{code:r}=se(e);return oe.fromText(r,t)},"getDiagramFromText");function dt(e,t,r,a){Ze(t,e),Ke(t,r,a,t.attr("id"))}i(dt,"addA11yInfo");var S=Object.freeze({render:Qr,parse:at,getDiagramFromText:st,initialize:ot,getConfig:G,setConfig:Da,getSiteConfig:kt,updateSiteConfig:La,reset:i(()=>{K()},"reset"),globalReset:i(()=>{K(At)},"globalReset"),defaultConfig:At});Tt(G().logLevel),K(G());var Xr=i((e,t,r)=>{w.warn(e),vt(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),lt=i(async function(e={querySelector:".mermaid"}){try{await Zr(e)}catch(t){if(vt(t)&&w.error(t.str),b.parseError&&b.parseError(t),!e.suppressErrors)throw w.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Zr=i(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let a=S.getConfig();w.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw Error("Nodes and querySelector are both undefined");w.debug(`Found ${n.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(w.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),S.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));let o=new B.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed),s,l=[];for(let d of Array.from(n)){if(w.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");let g=`mermaid-${o.next()}`;s=d.innerHTML,s=ja(B.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");let f=B.detectInit(s);f&&w.debug("Detected early reinit: ",f);try{let{svg:c,bindFunctions:_}=await gt(g,s,d);d.innerHTML=c,e&&await e(g),_&&_(d)}catch(c){Xr(c,l,b.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),ct=i(function(e){S.initialize(e)},"initialize"),Kr=i(async function(e,t,r){w.warn("mermaid.init is deprecated. Please use run instead."),e&&ct(e);let a={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?a.querySelector=t:t&&(t instanceof HTMLElement?a.nodes=[t]:a.nodes=t),await lt(a)},"init"),ea=i(async(e,{lazyLoad:t=!0}={})=>{X(),ue(...e),t===!1&&await vr()},"registerExternalDiagrams"),mt=i(function(){if(b.startOnLoad){let{startOnLoad:e}=S.getConfig();e&&b.run().catch(t=>w.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",mt,!1);var ta=i(function(e){b.parseError=e},"setParseErrorHandler"),Z=[],ce=!1,ut=i(async()=>{if(!ce){for(ce=!0;Z.length>0;){let e=Z.shift();if(e)try{await e()}catch(t){w.error("Error executing queue",t)}}ce=!1}},"executeQueue"),ra=i(async(e,t)=>new Promise((r,a)=>{let n=i(()=>new Promise((o,s)=>{S.parse(e,t).then(l=>{o(l),r(l)},l=>{var d;w.error("Error parsing",l),(d=b.parseError)==null||d.call(b,l),s(l),a(l)})}),"performCall");Z.push(n),ut().catch(a)}),"parse"),gt=i((e,t,r)=>new Promise((a,n)=>{let o=i(()=>new Promise((s,l)=>{S.render(e,t,r).then(d=>{s(d),a(d)},d=>{var g;w.error("Error parsing",d),(g=b.parseError)==null||g.call(b,d),l(d),n(d)})}),"performCall");Z.push(o),ut().catch(n)}),"render"),b={startOnLoad:!0,mermaidAPI:S,parse:ra,render:gt,init:Kr,run:lt,registerExternalDiagrams:ea,registerLayoutLoaders:qa,initialize:ct,parseError:void 0,contentLoaded:mt,setParseErrorHandler:ta,detectType:Lt,registerIconPacks:za,getRegisteredDiagramsMetadata:i(()=>Object.keys(ge).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},pt=b,aa=Et(ma(),1),ia=Et(pa(),1),na={startOnLoad:!0,theme:"forest",logLevel:"fatal",securityLevel:"strict",fontFamily:"var(--text-font)",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,curve:"linear"},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};function oa(){return Array.from({length:6},()=>"abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)]).join("")}Rt=e=>{let t=(0,Ut.c)(9),{diagram:r}=e,[a]=(0,aa.useState)(sa),n=fa().theme==="dark";pt.initialize({...na,theme:n?"dark":"forest",darkMode:n});let o;t[0]!==r||t[1]!==a?(o=async()=>(await pt.render(a,r,void 0).catch(g=>{var f;throw(f=document.getElementById(a))==null||f.remove(),ga.warn("Failed to render mermaid diagram",g),g})).svg,t[0]=r,t[1]=a,t[2]=o):o=t[2];let s;t[3]!==n||t[4]!==r||t[5]!==a?(s=[r,a,n],t[3]=n,t[4]=r,t[5]=a,t[6]=s):s=t[6];let{data:l}=ha(o,s);if(!l)return null;let d;return t[7]===l?d=t[8]:(d=(0,ia.jsx)("div",{dangerouslySetInnerHTML:{__html:l}}),t[7]=l,t[8]=d),d};function sa(){return oa()}});export{Ha as __tla,Rt as default};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./info-NVLQJR56-DbEISpBO.js","./chunk-FPAJGGOC-DOBSZjU2.js","./reduce-CaioMeUx.js","./_baseIsEqual-B9N9Mw_N.js","./_Uint8Array-BGESiCQL.js","./_arrayReduce-TT0iOGKY.js","./_baseEach-BhAgFun2.js","./_baseFor-Duhs3RiJ.js","./get-6uJrSKbw.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./memoize-BCOZVFBt.js","./hasIn-CycJImp8.js","./_baseProperty-NKyJO2oh.js","./_baseUniq-BP3iN0f3.js","./min-Ci3LzCQg.js","./_baseMap-D3aN2j3O.js","./_baseFlatten-CUZNxU8H.js","./flatten-D-7VEN0q.js","./isEmpty-CgX_-6Mt.js","./main-U5Goe76G.js","./chunk-LvLJmgfZ.js","./chunk-LBM3YZW2-DNY-0NiJ.js","./packet-BFZMPI3H-BR6bDXQk.js","./chunk-76Q3JFCE-CC_RB1qp.js","./pie-7BOR55EZ-Dya4O8xg.js","./chunk-T53DSG4Q-td6bRJ2x.js","./architecture-U656AL7Q-h8chitwC.js","./chunk-O7ZBX7Z2-CsMGWxKA.js","./gitGraph-F6HP7TQM-BeFUiPbI.js","./chunk-S6J4BHB3-B5AsdTT7.js","./radar-NHE76QYJ-CwXZHOPM.js","./chunk-LHMN2FUI-xvIevmTh.js","./treemap-KMMF4GRG-CG4hZ-Cn.js","./chunk-FWNWRKHM-D3c3qJTG.js"])))=>i.map(i=>d[i]);
import{f as i}from"./chunk-FPAJGGOC-DOBSZjU2.js";import{t as c}from"./preload-helper-DItdS47A.js";let _,u=(async()=>{var s;var t={},l={info:i(async()=>{let{createInfoServices:a}=await c(async()=>{let{createInfoServices:r}=await import("./info-NVLQJR56-DbEISpBO.js").then(async e=>(await e.__tla,e));return{createInfoServices:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url);t.info=a().Info.parser.LangiumParser},"info"),packet:i(async()=>{let{createPacketServices:a}=await c(async()=>{let{createPacketServices:r}=await import("./packet-BFZMPI3H-BR6bDXQk.js").then(async e=>(await e.__tla,e));return{createPacketServices:r}},__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,24]),import.meta.url);t.packet=a().Packet.parser.LangiumParser},"packet"),pie:i(async()=>{let{createPieServices:a}=await c(async()=>{let{createPieServices:r}=await import("./pie-7BOR55EZ-Dya4O8xg.js").then(async e=>(await e.__tla,e));return{createPieServices:r}},__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26]),import.meta.url);t.pie=a().Pie.parser.LangiumParser},"pie"),architecture:i(async()=>{let{createArchitectureServices:a}=await c(async()=>{let{createArchitectureServices:r}=await import("./architecture-U656AL7Q-h8chitwC.js").then(async e=>(await e.__tla,e));return{createArchitectureServices:r}},__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,28]),import.meta.url);t.architecture=a().Architecture.parser.LangiumParser},"architecture"),gitGraph:i(async()=>{let{createGitGraphServices:a}=await c(async()=>{let{createGitGraphServices:r}=await import("./gitGraph-F6HP7TQM-BeFUiPbI.js").then(async e=>(await e.__tla,e));return{createGitGraphServices:r}},__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,30]),import.meta.url);t.gitGraph=a().GitGraph.parser.LangiumParser},"gitGraph"),radar:i(async()=>{let{createRadarServices:a}=await c(async()=>{let{createRadarServices:r}=await import("./radar-NHE76QYJ-CwXZHOPM.js").then(async e=>(await e.__tla,e));return{createRadarServices:r}},__vite__mapDeps([31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,32]),import.meta.url);t.radar=a().Radar.parser.LangiumParser},"radar"),treemap:i(async()=>{let{createTreemapServices:a}=await c(async()=>{let{createTreemapServices:r}=await import("./treemap-KMMF4GRG-CG4hZ-Cn.js").then(async e=>(await e.__tla,e));return{createTreemapServices:r}},__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,34]),import.meta.url);t.treemap=a().Treemap.parser.LangiumParser},"treemap")};_=async function(a,r){let e=l[a];if(!e)throw Error(`Unknown diagram type: ${a}`);t[a]||await e();let n=t[a].parse(r);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);return n.value},i(_,"parse");var o=(s=class extends Error{constructor(r){let e=r.lexerErrors.map(p=>p.message).join(`
`),n=r.parserErrors.map(p=>p.message).join(`
`);super(`Parsing failed: ${e} ${n}`),this.result=r}},i(s,"MermaidParseError"),s)})();export{u as __tla,_ as t};
import{c as y}from"./katex-Dc8yG8NU.js";y.__defineMacro("\\ce",function(t){return z(t.consumeArgs(1)[0],"ce")}),y.__defineMacro("\\pu",function(t){return z(t.consumeArgs(1)[0],"pu")}),y.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var z=function(t,e){for(var a="",o=t.length&&t[t.length-1].loc.start,r=t.length-1;r>=0;r--)t[r].loc.start>o&&(a+=" ",o=t[r].loc.start),a+=t[r].text,o+=t[r].text.length;return u.go(n.go(a,e))},n={go:function(t,e){if(!t)return[];e===void 0&&(e="ce");var a="0",o={};o.parenthesisLevel=0,t=t.replace(/\n/g," "),t=t.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),t=t.replace(/[\u2026]/g,"...");for(var r,i=10,c=[];;){r===t?i--:(i=10,r=t);var s=n.stateMachines[e],p=s.transitions[a]||s.transitions["*"];t:for(var m=0;m<p.length;m++){var h=n.patterns.match_(p[m].pattern,t);if(h){for(var d=p[m].task,_=0;_<d.action_.length;_++){var f;if(s.actions[d.action_[_].type_])f=s.actions[d.action_[_].type_](o,h.match_,d.action_[_].option);else if(n.actions[d.action_[_].type_])f=n.actions[d.action_[_].type_](o,h.match_,d.action_[_].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[_].type_+")"];n.concatArray(c,f)}if(a=d.nextState||a,t.length>0){if(d.revisit||(t=h.remainder),!d.toContinue)break t}else return c}}if(i<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var a=0;a<e.length;a++)t.push(e[a]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=n.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var a=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return a?{match_:a[0],remainder:t.substr(a[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return n.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return n.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return n.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return n.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return n.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return n.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return n.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return n.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return n.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return n.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return n.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return n.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return n.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\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 n.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return n.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return n.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return n.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 n.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return n.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return n.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return n.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return n.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return n.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return n.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return n.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 e=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))/);if(e)return{match_:e[0],remainder:t.substr(e[0].length)};var a=n.patterns.findObserveGroups(t,"","$","$","");return a&&(e=a.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),e)?{match_:e[0],remainder:t.substr(e[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 e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,a,o,r,i,c,s,p,m){var h=function(x,l){if(typeof l=="string")return x.indexOf(l)===0?l:null;var g=x.match(l);return g?g[0]:null},d=function(x,l,g){for(var b=0;l<x.length;){var S=x.charAt(l),k=h(x.substr(l),g);if(k!==null&&b===0)return{endMatchBegin:l,endMatchEnd:l+k.length};if(S==="{")b++;else if(S==="}"){if(b===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];b--}l++}return null},_=h(t,e);if(_===null||(t=t.substr(_.length),_=h(t,a),_===null))return null;var f=d(t,_.length,o||r);if(f===null)return null;var $=t.substring(0,o?f.endMatchEnd:f.endMatchBegin);if(i||c){var v=this.findObserveGroups(t.substr(f.endMatchEnd),i,c,s,p);if(v===null)return null;var q=[$,v.match_];return{match_:m?q.join(""):q,remainder:v.remainder}}else return{match_:$,remainder:t.substr(f.endMatchEnd)}},match_:function(t,e){var a=n.patterns.patterns[t];if(a===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if(typeof a=="function")return n.patterns.patterns[t](e);var o=e.match(a);return o?{match_:o[2]?[o[1],o[2]]:o[1]?o[1]:o[0],remainder:e.substr(o[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,a){return{type_:a}},"insert+p1":function(t,e,a){return{type_:a,p1:e}},"insert+p1+p2":function(t,e,a){return{type_:a,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return n.go(e,"text")},"{text}":function(t,e){var a=["{"];return n.concatArray(a,n.go(e,"text")),a.push("}"),a},"tex-math":function(t,e){return n.go(e,"tex-math")},"tex-math tight":function(t,e){return n.go(e,"tex-math tight")},bond:function(t,e,a){return{type_:"bond",kind_:a||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return n.go(e)},"1/2":function(t,e){var a=[];e.match(/^[+\-]/)&&(a.push(e.substr(0,1)),e=e.substr(1));var o=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return o[1]=o[1].replace(/\$/g,""),a.push({type_:"frac",p1:o[1],p2:o[2]}),o[3]&&(o[3]=o[3].replace(/\$/g,""),a.push({type_:"tex-math",p1:o[3]})),a},"9,9":function(t,e){return n.go(e,"9,9")}},createTransitions:function(t){var e,a,o,r,i={};for(e in t)for(a in t[e])for(o=a.split("|"),t[e][a].stateArray=o,r=0;r<o.length;r++)i[o[r]]=[];for(e in t)for(a in t[e])for(o=t[e][a].stateArray||[],r=0;r<o.length;r++){var c=t[e][a];if(c.action_){c.action_=[].concat(c.action_);for(var s=0;s<c.action_.length;s++)typeof c.action_[s]=="string"&&(c.action_[s]={type_:c.action_[s]})}else c.action_=[];for(var p=e.split("|"),m=0;m<p.length;m++)if(o[r]==="*")for(var h in i)i[h].push({pattern:p[m],task:c});else i[o[r]].push({pattern:p[m],task:c})}return i},stateMachines:{}};n.stateMachines={ce:{transitions:n.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"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,e){var a;if((t.d||"").match(/^[0-9]+$/)){var o=t.d;t.d=void 0,a=this.output(t),t.b=o}else a=this.output(t);return n.actions["o="](t,e),a},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var a=[];return n.concatArray(a,this.output(t)),n.concatArray(a,n.actions.bond(t,e,"-")),a}else t.d=e},"- after o/d":function(t,e,a){var o=n.patterns.match_("orbital",t.o||""),r=n.patterns.match_("one lowercase greek letter $",t.o||""),i=n.patterns.match_("one lowercase latin letter $",t.o||""),c=n.patterns.match_("$one lowercase latin letter$ $",t.o||""),s=e==="-"&&(o&&o.remainder===""||r||i||c);s&&!t.a&&!t.b&&!t.p&&!t.d&&!t.q&&!o&&i&&(t.o="$"+t.o+"$");var p=[];return s?(n.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(o=n.patterns.match_("digits",t.d||""),a&&o&&o.remainder===""?(n.concatArray(p,n.actions["d="](t,e)),n.concatArray(p,this.output(t))):(n.concatArray(p,this.output(t)),n.concatArray(p,n.actions.bond(t,e,"-")))),p},"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,e){return{type_:"state of aggregation",p1:n.go(e,"o")}},comma:function(t,e){var a=e.replace(/\s*$/,"");return a!==e&&t.parenthesisLevel===0?{type_:"comma enumeration L",p1:a}:{type_:"comma enumeration M",p1:a}},output:function(t,e,a){var o;if(!t.r)o=[],!t.a&&!t.b&&!t.p&&!t.o&&!t.q&&!t.d&&!a||(t.sb&&o.push({type_:"entitySkip"}),!t.o&&!t.q&&!t.d&&!t.b&&!t.p&&a!==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"&&n.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&t.dType==="kv"&&!t.q&&(t.dType=void 0),o.push({type_:"chemfive",a:n.go(t.a,"a"),b:n.go(t.b,"bd"),p:n.go(t.p,"pq"),o:n.go(t.o,"o"),q:n.go(t.q,"pq"),d:n.go(t.d,t.dType==="oxidation"?"oxidation":"bd"),dType:t.dType}));else{var r=t.rdt==="M"?n.go(t.rd,"tex-math"):t.rdt==="T"?[{type_:"text",p1:t.rd||""}]:n.go(t.rd),i=t.rqt==="M"?n.go(t.rq,"tex-math"):t.rqt==="T"?[{type_:"text",p1:t.rq||""}]:n.go(t.rq);o={type_:"arrow",r:t.r,rd:r,rq:i}}for(var c in t)c!=="parenthesisLevel"&&c!=="beginsWithBond"&&delete t[c];return o},"oxidation-output":function(t,e){var a=["{"];return n.concatArray(a,n.go(e,"oxidation")),a.push("}"),a},"frac-output":function(t,e){return{type_:"frac-ce",p1:n.go(e[0]),p2:n.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:n.go(e[0]),p2:n.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:n.go(e[0]),p2:n.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:n.go(e[0]),p2:n.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:n.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,a){return{type_:"operator",kind_:a||e}}}},a:{transitions:n.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:n.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:n.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 e={type_:"text",p1:t.text_};for(var a in t)delete t[a];return e}}}},pq:{transitions:n.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,e){return{type_:"state of aggregation subscript",p1:n.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:n.go(e[1],"pq")}}}},bd:{transitions:n.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,e){return{type_:"color",color1:e[0],color2:n.go(e[1],"bd")}}}},oxidation:{transitions:n.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:n.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var a in t)delete t[a];return e}}}},"tex-math tight":{transitions:n.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var a in t)delete t[a];return e}}}},"9,9":{transitions:n.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:n.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,e){var a=[];return e[0]==="+-"||e[0]==="+/-"?a.push("\\pm "):e[0]&&a.push(e[0]),e[1]&&(n.concatArray(a,n.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?n.concatArray(a,n.go(e[2],"pu-9,9")):a.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),e[3]==="e"||e[3].substr(0,1)==="*"?a.push({type_:"cdot"}):a.push({type_:"times"}))),e[3]&&a.push("10^{"+e[5]+"}"),a},"number^":function(t,e){var a=[];return e[0]==="+-"||e[0]==="+/-"?a.push("\\pm "):e[0]&&a.push(e[0]),n.concatArray(a,n.go(e[1],"pu-9,9")),a.push("^{"+e[2]+"}"),a},operator:function(t,e,a){return{type_:"operator",kind_:a||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,a=n.patterns.match_("{(...)}",t.d||"");a&&a.remainder===""&&(t.d=a.match_);var o=n.patterns.match_("{(...)}",t.q||"");if(o&&o.remainder===""&&(t.q=o.match_),t.d&&(t.d=(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),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 r={d:n.go(t.d,"pu"),q:n.go(t.q,"pu")};t.o==="//"?e={type_:"pu-frac",p1:r.d,p2:r.q}:(e=r.d,r.d.length>1||r.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),n.concatArray(e,r.q))}else e=n.go(t.d,"pu-2");for(var i in t)delete t[i];return e}}},"pu-2":{transitions:n.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,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var a=n.patterns.match_("{(...)}",t.rm||"");e=a&&a.remainder===""?n.go(a.match_,"pu"):{type_:"rm",p1:t.rm}}for(var o in t)delete t[o];return e}}},"pu-9,9":{transitions:n.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 e=[];if(t.text_=t.text_||"",t.text_.length>4){var a=t.text_.length%3;a===0&&(a=3);for(var o=t.text_.length-3;o>0;o-=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,a)),e.reverse()}else e.push(t.text_);for(var r in t)delete t[r];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var a=t.text_.length-3,o=0;o<a;o+=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(o))}else e.push(t.text_);for(var r in t)delete t[r];return e}}}};var u={go:function(t,e){if(!t)return"";for(var a="",o=!1,r=0;r<t.length;r++){var i=t[r];typeof i=="string"?a+=i:(a+=u._go2(i),i.type_==="1st-level escape"&&(o=!0))}return!e&&!o&&a&&(a="{"+a+"}"),a},_goInner:function(t){return t&&u.go(t,!0)},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var a={a:u._goInner(t.a),b:u._goInner(t.b),p:u._goInner(t.p),o:u._goInner(t.o),q:u._goInner(t.q),d:u._goInner(t.d)};a.a&&(a.a.match(/^[+\-]/)&&(a.a="{"+a.a+"}"),e+=a.a+"\\,"),(a.b||a.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(a.b||"")+"}}_{\\hphantom{"+(a.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(a.b||"")+"}}",e+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(a.p||"")+"}}}"),a.o&&(a.o.match(/^[+\-]/)&&(a.o="{"+a.o+"}"),e+=a.o),t.dType==="kv"?((a.d||a.q)&&(e+="{\\vphantom{X}}"),a.d&&(e+="^{"+a.d+"}"),a.q&&(e+="_{\\smash[t]{"+a.q+"}}")):t.dType==="oxidation"?(a.d&&(e+="{\\vphantom{X}}",e+="^{"+a.d+"}"),a.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+a.q+"}}")):(a.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+a.q+"}}"),a.d&&(e+="{\\vphantom{X}}",e+="^{"+a.d+"}"));break;case"rm":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+u._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+u._goInner(t.p1);break;case"bond":if(e=u._getBond(t.kind_),!e)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var o="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"pu-frac":var r="\\frac{"+u._goInner(t.p1)+"}{"+u._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+r+"}{"+r+"}{"+r+"}{"+r+"}";break;case"tex-math":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+u._goInner(t.p1)+"}{"+u._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+u._goInner(t.p1)+"}{"+u._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+u._goInner(t.p1)+"}{"+u._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+u._goInner(t.p1)+"}_{"+u._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+u._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var i={rd:u._goInner(t.rd),rq:u._goInner(t.rq)},c="\\x"+u._getArrow(t.r);i.rq&&(c+="[{"+i.rq+"}]"),i.rd?c+="{"+i.rd+"}":c+="{}",e=c;break;case"operator":e=u._getOperator(t.kind_);break;case"1st-level escape":e=t.p1+" ";break;case"space":e=" ";break;case"entitySkip":e="~";break;case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"rightleftarrows";case"<=>":return"rightleftharpoons";case"\u21CC":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."]}}};
var C;import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as l,r as O}from"./src-BKLwm2RN.js";import{D as ht,I as B,Q as lt,X as dt,Z as gt,b as z,d as F}from"./chunk-ABZYJK2D-t8l6Viza.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import{r as ut,t as pt}from"./chunk-N4CR4FBY-eo9CRI73.js";import{t as yt}from"./chunk-55IACEB6-SrR0J56d.js";import{t as mt}from"./chunk-QN33PNHL-C_hHv997.js";var b=[];for(let i=0;i<256;++i)b.push((i+256).toString(16).slice(1));function ft(i,t=0){return(b[i[t+0]]+b[i[t+1]]+b[i[t+2]]+b[i[t+3]]+"-"+b[i[t+4]]+b[i[t+5]]+"-"+b[i[t+6]]+b[i[t+7]]+"-"+b[i[t+8]]+b[i[t+9]]+"-"+b[i[t+10]]+b[i[t+11]]+b[i[t+12]]+b[i[t+13]]+b[i[t+14]]+b[i[t+15]]).toLowerCase()}var V,Et=new Uint8Array(16);function bt(){if(!V){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");V=crypto.getRandomValues.bind(crypto)}return V(Et)}var st={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _t(i,t,n){var g;if(st.randomUUID&&!t&&!i)return st.randomUUID();i||(i={});let a=i.random??((g=i.rng)==null?void 0:g.call(i))??bt();if(a.length<16)throw Error("Random bytes length must be >= 16");if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,t){if(n||(n=0),n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let c=0;c<16;++c)t[n+c]=a[c];return t}return ft(a)}var Nt=_t,Q=(function(){var i=l(function(e,h,o,r){for(o||(o={}),r=e.length;r--;o[e[r]]=h);return o},"o"),t=[1,4],n=[1,13],a=[1,12],g=[1,15],c=[1,16],p=[1,20],y=[1,19],f=[6,7,8],E=[1,26],T=[1,24],R=[1,25],_=[6,7,11],Y=[1,6,13,15,16,19,22],Z=[1,33],q=[1,34],A=[1,6,7,11,13,15,16,19,22],G={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(e,h,o,r,u,s,$){var d=s.length-1;switch(u){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",s[d].id),r.addNode(s[d-1].length,s[d].id,s[d].descr,s[d].type);break;case 16:r.getLogger().trace("Icon: ",s[d]),r.decorateNode({icon:s[d]});break;case 17:case 21:r.decorateNode({class:s[d]});break;case 18:r.getLogger().trace("SPACELIST");break;case 19:r.getLogger().trace("Node: ",s[d].id),r.addNode(0,s[d].id,s[d].descr,s[d].type);break;case 20:r.decorateNode({icon:s[d]});break;case 25:r.getLogger().trace("node found ..",s[d-2]),this.$={id:s[d-1],descr:s[d-1],type:r.getType(s[d-2],s[d])};break;case 26:this.$={id:s[d],descr:s[d],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace("node found ..",s[d-3]),this.$={id:s[d-3],descr:s[d-1],type:r.getType(s[d-2],s[d])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:a,14:14,15:g,16:c,17:17,18:18,19:p,22:y},i(f,[2,3]),{1:[2,2]},i(f,[2,4]),i(f,[2,5]),{1:[2,6],6:n,12:21,13:a,14:14,15:g,16:c,17:17,18:18,19:p,22:y},{6:n,9:22,12:11,13:a,14:14,15:g,16:c,17:17,18:18,19:p,22:y},{6:E,7:T,10:23,11:R},i(_,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:y}),i(_,[2,18]),i(_,[2,19]),i(_,[2,20]),i(_,[2,21]),i(_,[2,23]),i(_,[2,24]),i(_,[2,26],{19:[1,30]}),{20:[1,31]},{6:E,7:T,10:32,11:R},{1:[2,7],6:n,12:21,13:a,14:14,15:g,16:c,17:17,18:18,19:p,22:y},i(Y,[2,14],{7:Z,11:q}),i(A,[2,8]),i(A,[2,9]),i(A,[2,10]),i(_,[2,15]),i(_,[2,16]),i(_,[2,17]),{20:[1,35]},{21:[1,36]},i(Y,[2,13],{7:Z,11:q}),i(A,[2,11]),i(A,[2,12]),{21:[1,37]},i(_,[2,25]),i(_,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,h){if(h.recoverable)this.trace(e);else{var o=Error(e);throw o.hash=h,o}},"parseError"),parse:l(function(e){var h=this,o=[0],r=[],u=[null],s=[],$=this.table,d="",U=0,J=0,K=0,rt=2,tt=1,ot=s.slice.call(arguments,1),m=Object.create(this.lexer),x={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(x.yy[j]=this.yy[j]);m.setInput(e,x.yy),x.yy.lexer=m,x.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var H=m.yylloc;s.push(H);var at=m.options&&m.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ct(L){o.length-=2*L,u.length-=L,s.length-=L}l(ct,"popStack");function et(){var L=r.pop()||m.lex()||tt;return typeof L!="number"&&(L instanceof Array&&(r=L,L=r.pop()),L=h.symbols_[L]||L),L}l(et,"lex");for(var N,W,I,D,X,v={},P,S,it,M;;){if(I=o[o.length-1],this.defaultActions[I]?D=this.defaultActions[I]:(N??(N=et()),D=$[I]&&$[I][N]),D===void 0||!D.length||!D[0]){var nt="";for(P in M=[],$[I])this.terminals_[P]&&P>rt&&M.push("'"+this.terminals_[P]+"'");nt=m.showPosition?"Parse error on line "+(U+1)+`:
`+m.showPosition()+`
Expecting `+M.join(", ")+", got '"+(this.terminals_[N]||N)+"'":"Parse error on line "+(U+1)+": Unexpected "+(N==tt?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(nt,{text:m.match,token:this.terminals_[N]||N,line:m.yylineno,loc:H,expected:M})}if(D[0]instanceof Array&&D.length>1)throw Error("Parse Error: multiple actions possible at state: "+I+", token: "+N);switch(D[0]){case 1:o.push(N),u.push(m.yytext),s.push(m.yylloc),o.push(D[1]),N=null,W?(N=W,W=null):(J=m.yyleng,d=m.yytext,U=m.yylineno,H=m.yylloc,K>0&&K--);break;case 2:if(S=this.productions_[D[1]][1],v.$=u[u.length-S],v._$={first_line:s[s.length-(S||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(S||1)].first_column,last_column:s[s.length-1].last_column},at&&(v._$.range=[s[s.length-(S||1)].range[0],s[s.length-1].range[1]]),X=this.performAction.apply(v,[d,J,U,x.yy,D[1],u,s].concat(ot)),X!==void 0)return X;S&&(o=o.slice(0,-1*S*2),u=u.slice(0,-1*S),s=s.slice(0,-1*S)),o.push(this.productions_[D[1]][0]),u.push(v.$),s.push(v._$),it=$[o[o.length-2]][o[o.length-1]],o.push(it);break;case 3:return!0}}return!0},"parse")};G.lexer=(function(){return{EOF:1,parseError:l(function(e,h){if(this.yy.parser)this.yy.parser.parseError(e,h);else throw Error(e)},"parseError"),setInput:l(function(e,h){return this.yy=h||this.yy||{},this._input=e,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:l(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:l(function(e){var h=e.length,o=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;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),o.length-1&&(this.yylineno-=o.length-1);var u=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:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),h=Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:l(function(e,h){var o,r,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),r=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],o=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var s in u)this[s]=u[s];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,h,o,r;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),s=0;s<u.length;s++)if(o=this._input.match(this.rules[u[s]]),o&&(!h||o[0].length>h[0].length)){if(h=o,r=s,this.options.backtrack_lexer){if(e=this.test_match(o,u[s]),e!==!1)return e;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(e=this.test_match(h,u[r]),e===!1?!1:e):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:l(function(){return this.next()||this.lex()},"lex"),begin:l(function(e){this.conditionStack.push(e)},"begin"),popState:l(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:l(function(e){this.begin(e)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(e,h,o,r){switch(o){case 0:return e.getLogger().trace("Found comment",h.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",h.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",h.yytext),"NODE_DEND";case 30:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 35:return e.getLogger().trace("Long description:",h.yytext),20;case 36:return e.getLogger().trace("Long description:",h.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}})();function w(){this.yy={}}return l(w,"Parser"),w.prototype=G,G.Parser=w,new w})();Q.parser=Q;var Dt=Q,k={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Lt=(C=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=k,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let n=this.nodes.length-1;n>=0;n--)if(this.nodes[n].level<t)return this.nodes[n];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,n,a,g){var T,R;O.info("addNode",t,n,a,g);let c=!1;this.nodes.length===0?(this.baseLevel=t,t=0,c=!0):this.baseLevel!==void 0&&(t-=this.baseLevel,c=!1);let p=z(),y=((T=p.mindmap)==null?void 0:T.padding)??F.mindmap.padding;switch(g){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}let f={id:this.count++,nodeId:B(n,p),level:t,descr:B(a,p),type:g,children:[],width:((R=p.mindmap)==null?void 0:R.maxNodeWidth)??F.mindmap.maxNodeWidth,padding:y,isRoot:c},E=this.getParent(t);if(E)E.children.push(f),this.nodes.push(f);else if(c)this.nodes.push(f);else throw Error(`There can be only one root. No parent could be found for ("${f.descr}")`)}getType(t,n){switch(O.debug("In get type",t,n),t){case"[":return this.nodeType.RECT;case"(":return n===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,n){this.elements[t]=n}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;let n=z(),a=this.nodes[this.nodes.length-1];t.icon&&(a.icon=B(t.icon,n)),t.class&&(a.class=B(t.class,n))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,n){if(t.level===0?t.section=void 0:t.section=n,t.children)for(let[a,g]of t.children.entries()){let c=t.level===0?a:n;this.assignSections(g,c)}}flattenNodes(t,n){let a=["mindmap-node"];t.isRoot===!0?a.push("section-root","section--1"):t.section!==void 0&&a.push(`section-${t.section}`),t.class&&a.push(t.class);let g=a.join(" "),c=l(y=>{switch(y){case k.CIRCLE:return"mindmapCircle";case k.RECT:return"rect";case k.ROUNDED_RECT:return"rounded";case k.CLOUD:return"cloud";case k.BANG:return"bang";case k.HEXAGON:return"hexagon";case k.DEFAULT:return"defaultMindmapNode";case k.NO_BORDER:default:return"rect"}},"getShapeFromType"),p={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:c(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:g,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(n.push(p),t.children)for(let y of t.children)this.flattenNodes(y,n)}generateEdges(t,n){if(t.children)for(let a of t.children){let g="edge";a.section!==void 0&&(g+=` section-edge-${a.section}`);let c=t.level+1;g+=` edge-depth-${c}`;let p={id:`edge_${t.id}_${a.id}`,start:t.id.toString(),end:a.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:g,depth:t.level,section:a.section};n.push(p),this.generateEdges(a,n)}}getData(){let t=this.getMindmap(),n=z(),a=ht().layout!==void 0,g=n;if(a||(g.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:g};O.debug("getData: mindmapRoot",t,n),this.assignSections(t);let c=[],p=[];this.flattenNodes(t,c),this.generateEdges(t,p),O.debug(`getData: processed ${c.length} nodes and ${p.length} edges`);let y=new Map;for(let f of c)y.set(f.id,{shape:f.shape,width:f.width,height:f.height,padding:f.padding});return{nodes:c,edges:p,config:g,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(y),type:"mindmap",diagramId:"mindmap-"+Nt()}}getLogger(){return O}},l(C,"MindmapDB"),C),St={draw:l(async(i,t,n,a)=>{var y,f;O.debug(`Rendering mindmap diagram
`+i);let g=a.db,c=g.getData(),p=yt(t,c.config.securityLevel);c.type=a.type,c.layoutAlgorithm=pt(c.config.layout,{fallback:"cose-bilkent"}),c.diagramId=t,g.getMindmap()&&(c.nodes.forEach(E=>{E.shape==="rounded"?(E.radius=15,E.taper=15,E.stroke="none",E.width=0,E.padding=15):E.shape==="circle"?E.padding=10:E.shape==="rect"&&(E.width=0,E.padding=10)}),await ut(c,p),mt(p,((y=c.config.mindmap)==null?void 0:y.padding)??F.mindmap.padding,"mindmapDiagram",((f=c.config.mindmap)==null?void 0:f.useMaxWidth)??F.mindmap.useMaxWidth))},"draw")},kt=l(i=>{let t="";for(let n=0;n<i.THEME_COLOR_LIMIT;n++)i["lineColor"+n]=i["lineColor"+n]||i["cScaleInv"+n],lt(i["lineColor"+n])?i["lineColor"+n]=gt(i["lineColor"+n],20):i["lineColor"+n]=dt(i["lineColor"+n],20);for(let n=0;n<i.THEME_COLOR_LIMIT;n++){let a=""+(17-3*n);t+=`
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
fill: ${i["cScale"+n]};
}
.section-${n-1} text {
fill: ${i["cScaleLabel"+n]};
}
.node-icon-${n-1} {
font-size: 40px;
color: ${i["cScaleLabel"+n]};
}
.section-edge-${n-1}{
stroke: ${i["cScale"+n]};
}
.edge-depth-${n-1}{
stroke-width: ${a};
}
.section-${n-1} line {
stroke: ${i["cScaleInv"+n]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return t},"genSections"),xt={get db(){return new Lt},renderer:St,parser:Dt,styles:l(i=>`
.edge {
stroke-width: 3;
}
${kt(i)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${i.git0};
}
.section-root text {
fill: ${i.gitBranchLabel0};
}
.section-root span {
color: ${i.gitBranchLabel0};
}
.section-2 span {
color: ${i.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.mindmap-node-label {
dy: 1em;
alignment-baseline: middle;
text-anchor: middle;
dominant-baseline: middle;
text-align: center;
}
`,"getStyles")};export{xt as diagram};
import{t as r}from"./mirc-Dpq184o1.js";export{r as mirc};
function t(e){for(var $={},r=e.split(" "),i=0;i<r.length;++i)$[r[i]]=!0;return $}var o=t("$! $$ $& $? $+ $abook $abs $active $activecid $activewid $address $addtok $agent $agentname $agentstat $agentver $alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime $asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind $binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes $chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color $com $comcall $comchan $comerr $compact $compress $comval $cos $count $cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight $dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress $deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll $dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error $eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir $finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve $fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt $group $halted $hash $height $hfind $hget $highlight $hnick $hotline $hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil $inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect $insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile $isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive $lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock $lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer $maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext $menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode $modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile $nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly $opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree $pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo $readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex $reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline $sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin $site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname $sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped $syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp $timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel $ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver $version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"),s=t("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice away background ban bcopy beep bread break breplace bset btrunc bunset bwrite channel clear clearall cline clipboard close cnick color comclose comopen comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver debug dec describe dialog did didtok disable disconnect dlevel dline dll dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable events exit fclose filter findtext finger firewall flash flist flood flush flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear ialmark identd if ignore iline inc invite iuser join kick linesep links list load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice qme qmsg query queryn quit raw reload remini remote remove rename renwin reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini say scid scon server set showmirc signam sline sockaccept sockclose socklist socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs elseif else goto menu nicklist status title icon size option text edit button check radio box scroll list combo link tab item"),l=t("if elseif else and not or eq ne in ni for foreach while switch"),c=/[+\-*&%=<>!?^\/\|]/;function d(e,$,r){return $.tokenize=r,r(e,$)}function a(e,$){var r=$.beforeParams;$.beforeParams=!1;var i=e.next();if(/[\[\]{}\(\),\.]/.test(i))return i=="("&&r?$.inParams=!0:i==")"&&($.inParams=!1),null;if(/\d/.test(i))return e.eatWhile(/[\w\.]/),"number";if(i=="\\")return e.eat("\\"),e.eat(/./),"number";if(i=="/"&&e.eat("*"))return d(e,$,m);if(i==";"&&e.match(/ *\( *\(/))return d(e,$,p);if(i==";"&&!$.inParams)return e.skipToEnd(),"comment";if(i=='"')return e.eat(/"/),"keyword";if(i=="$")return e.eatWhile(/[$_a-z0-9A-Z\.:]/),o&&o.propertyIsEnumerable(e.current().toLowerCase())?"keyword":($.beforeParams=!0,"builtin");if(i=="%")return e.eatWhile(/[^,\s()]/),$.beforeParams=!0,"string";if(c.test(i))return e.eatWhile(c),"operator";e.eatWhile(/[\w\$_{}]/);var n=e.current().toLowerCase();return s&&s.propertyIsEnumerable(n)?"keyword":l&&l.propertyIsEnumerable(n)?($.beforeParams=!0,"keyword"):null}function m(e,$){for(var r=!1,i;i=e.next();){if(i=="/"&&r){$.tokenize=a;break}r=i=="*"}return"comment"}function p(e,$){for(var r=0,i;i=e.next();){if(i==";"&&r==2){$.tokenize=a;break}i==")"?r++:i!=" "&&(r=0)}return"meta"}const u={name:"mirc",startState:function(){return{tokenize:a,beforeParams:!1,inParams:!1}},token:function(e,$){return e.eatSpace()?null:$.tokenize(e,$)}};export{u as t};
import{n as a,r as s,t as r}from"./mllike-eEM7KiC0.js";export{r as fSharp,a as oCaml,s as sml};
function k(i){var n={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},l=i.extraWords||{};for(var w in l)l.hasOwnProperty(w)&&(n[w]=i.extraWords[w]);var a=[];for(var u in n)a.push(u);function d(e,r){var o=e.next();if(o==='"')return r.tokenize=s,r.tokenize(e,r);if(o==="{"&&e.eat("|"))return r.longString=!0,r.tokenize=b,r.tokenize(e,r);if(o==="("&&e.match(/^\*(?!\))/))return r.commentLevel++,r.tokenize=c,r.tokenize(e,r);if(o==="~"||o==="?")return e.eatWhile(/\w/),"variableName.special";if(o==="`")return e.eatWhile(/\w/),"quote";if(o==="/"&&i.slashComments&&e.eat("/"))return e.skipToEnd(),"comment";if(/\d/.test(o))return o==="0"&&e.eat(/[bB]/)&&e.eatWhile(/[01]/),o==="0"&&e.eat(/[xX]/)&&e.eatWhile(/[0-9a-fA-F]/),o==="0"&&e.eat(/[oO]/)?e.eatWhile(/[0-7]/):(e.eatWhile(/[\d_]/),e.eat(".")&&e.eatWhile(/[\d]/),e.eat(/[eE]/)&&e.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(o))return"operator";if(/[\w\xa1-\uffff]/.test(o)){e.eatWhile(/[\w\xa1-\uffff]/);var t=e.current();return n.hasOwnProperty(t)?n[t]:"variable"}return null}function s(e,r){for(var o,t=!1,y=!1;(o=e.next())!=null;){if(o==='"'&&!y){t=!0;break}y=!y&&o==="\\"}return t&&!y&&(r.tokenize=d),"string"}function c(e,r){for(var o,t;r.commentLevel>0&&(t=e.next())!=null;)o==="("&&t==="*"&&r.commentLevel++,o==="*"&&t===")"&&r.commentLevel--,o=t;return r.commentLevel<=0&&(r.tokenize=d),"comment"}function b(e,r){for(var o,t;r.longString&&(t=e.next())!=null;)o==="|"&&t==="}"&&(r.longString=!1),o=t;return r.longString||(r.tokenize=d),"string"}return{startState:function(){return{tokenize:d,commentLevel:0,longString:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)},languageData:{autocomplete:a,commentTokens:{line:i.slashComments?"//":void 0,block:{open:"(*",close:"*)"}}}}}const f=k({name:"ocaml",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),m=k({name:"fsharp",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),p=k({name:"sml",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0});export{f as n,p as r,m as t};
import{i as n,p as t}from"./useEvent-DO6uJBas.js";import{pi as o}from"./cells-BpZ7g6ok.js";import{t as i}from"./invariant-CAG_dYON.js";import{t as a}from"./utils-DXvhzCGS.js";function s(){let r=n.get(e);return o(r,"internal-error: initial mode not found"),i(r!=="present","internal-error: initial mode cannot be 'present'"),r}function m(r){return r==="read"?"read":r==="edit"?"present":"edit"}const d=t({mode:a()?"read":"not-set",cellAnchor:null}),e=t(void 0),l=t(!1);export{d as a,m as i,e as n,l as r,s as t};
import{t as o}from"./modelica-BKRVU7Ex.js";export{o as modelica};
function l(n){for(var e={},t=n.split(" "),o=0;o<t.length;++o)e[t[o]]=!0;return e}var a=l("algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within"),i=l("abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh"),u=l("Real Boolean Integer String"),c=[].concat(Object.keys(a),Object.keys(i),Object.keys(u)),p=/[;=\(:\),{}.*<>+\-\/^\[\]]/,k=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,r=/[0-9]/,s=/[_a-zA-Z]/;function f(n,e){return n.skipToEnd(),e.tokenize=null,"comment"}function m(n,e){for(var t=!1,o;o=n.next();){if(t&&o=="/"){e.tokenize=null;break}t=o=="*"}return"comment"}function d(n,e){for(var t=!1,o;(o=n.next())!=null;){if(o=='"'&&!t){e.tokenize=null,e.sol=!1;break}t=!t&&o=="\\"}return"string"}function z(n,e){for(n.eatWhile(r);n.eat(r)||n.eat(s););var t=n.current();return e.sol&&(t=="package"||t=="model"||t=="when"||t=="connector")?e.level++:e.sol&&t=="end"&&e.level>0&&e.level--,e.tokenize=null,e.sol=!1,a.propertyIsEnumerable(t)?"keyword":i.propertyIsEnumerable(t)?"builtin":u.propertyIsEnumerable(t)?"atom":"variable"}function b(n,e){for(;n.eat(/[^']/););return e.tokenize=null,e.sol=!1,n.eat("'")?"variable":"error"}function h(n,e){return n.eatWhile(r),n.eat(".")&&n.eatWhile(r),(n.eat("e")||n.eat("E"))&&(n.eat("-")||n.eat("+"),n.eatWhile(r)),e.tokenize=null,e.sol=!1,"number"}const g={name:"modelica",startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(n,e){if(e.tokenize!=null)return e.tokenize(n,e);if(n.sol()&&(e.sol=!0),n.eatSpace())return e.tokenize=null,null;var t=n.next();if(t=="/"&&n.eat("/"))e.tokenize=f;else if(t=="/"&&n.eat("*"))e.tokenize=m;else{if(k.test(t+n.peek()))return n.next(),e.tokenize=null,"operator";if(p.test(t))return e.tokenize=null,"operator";if(s.test(t))e.tokenize=z;else if(t=="'"&&n.peek()&&n.peek()!="'")e.tokenize=b;else if(t=='"')e.tokenize=d;else if(r.test(t))e.tokenize=h;else return e.tokenize=null,"error"}return e.tokenize(n,e)},indent:function(n,e,t){if(n.tokenize!=null)return null;var o=n.level;return/(algorithm)/.test(e)&&o--,/(equation)/.test(e)&&o--,/(initial algorithm)/.test(e)&&o--,/(initial equation)/.test(e)&&o--,/(end)/.test(e)&&o--,o>0?t.unit*o:0},languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:c}};export{g as t};
import{n as s,r as a,t as n}from"./mscgen-LPWHVNeM.js";export{n as mscgen,s as msgenny,a as xu};
function i(t){return{name:"mscgen",startState:l,copyState:u,token:m(t),languageData:{commentTokens:{line:"#",block:{open:"/*",close:"*/"}}}}}const c=i({keywords:["msc"],options:["hscale","width","arcgradient","wordwraparcs"],constants:["true","false","on","off"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}),a=i({keywords:null,options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:null,brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}),s=i({keywords:["msc","xu"],options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip","title","deactivate","activate","activation"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]});function n(t){return RegExp("^\\b("+t.join("|")+")\\b","i")}function e(t){return RegExp("^(?:"+t.join("|")+")","i")}function l(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}}function u(t){return{inComment:t.inComment,inString:t.inString,inAttributeList:t.inAttributeList,inScript:t.inScript}}function m(t){return function(r,o){if(r.match(e(t.brackets),!0,!0))return"bracket";if(!o.inComment){if(r.match(/\/\*[^\*\/]*/,!0,!0))return o.inComment=!0,"comment";if(r.match(e(t.singlecomment),!0,!0))return r.skipToEnd(),"comment"}if(o.inComment)return r.match(/[^\*\/]*\*\//,!0,!0)?o.inComment=!1:r.skipToEnd(),"comment";if(!o.inString&&r.match(/\"(\\\"|[^\"])*/,!0,!0))return o.inString=!0,"string";if(o.inString)return r.match(/[^\"]*\"/,!0,!0)?o.inString=!1:r.skipToEnd(),"string";if(t.keywords&&r.match(n(t.keywords),!0,!0)||r.match(n(t.options),!0,!0)||r.match(n(t.arcsWords),!0,!0)||r.match(e(t.arcsOthers),!0,!0))return"keyword";if(t.operators&&r.match(e(t.operators),!0,!0))return"operator";if(t.constants&&r.match(e(t.constants),!0,!0))return"variable";if(!t.inAttributeList&&t.attributes&&r.match("[",!0,!0))return t.inAttributeList=!0,"bracket";if(t.inAttributeList){if(t.attributes!==null&&r.match(n(t.attributes),!0,!0))return"attribute";if(r.match("]",!0,!0))return t.inAttributeList=!1,"bracket"}return r.next(),null}}export{a as n,s as r,c as t};
import{s as n}from"./chunk-LvLJmgfZ.js";import{t as f}from"./react-BGmjiNul.js";import{t as x}from"./compiler-runtime-DeeZ7FnK.js";import{t as u}from"./jsx-runtime-ZmTK25f3.js";var h=x(),v=n(f(),1),p=n(u(),1);const b=c=>{let t=(0,h.c)(8),{children:i,layerTop:m}=c,d=m===void 0?!1:m,o;t[0]===i?o=t[1]:(o=v.Children.toArray(i),t[0]=i,t[1]=o);let[l,s]=o,a=`second-icon absolute ${d?"top-[-2px] left-[-2px]":"bottom-[-2px] right-[-2px]"} rounded-full`,r;t[2]!==s||t[3]!==a?(r=(0,p.jsx)("div",{className:a,children:s}),t[2]=s,t[3]=a,t[4]=r):r=t[4];let e;return t[5]!==l||t[6]!==r?(e=(0,p.jsxs)("div",{className:"multi-icon relative w-fit",children:[l,r]}),t[5]=l,t[6]=r,t[7]=e):e=t[7],e};export{b as t};
var me=Object.defineProperty;var he=(a,t,e)=>t in a?me(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var q=(a,t,e)=>he(a,typeof t!="symbol"?t+"":t,e);import{s as B}from"./chunk-LvLJmgfZ.js";import{t as be}from"./react-BGmjiNul.js";import{t as xe}from"./compiler-runtime-DeeZ7FnK.js";import{r as G}from"./useEventListener-DIUKKfEy.js";import{t as ve}from"./jsx-runtime-ZmTK25f3.js";import{t as C}from"./cn-BKtXLv3a.js";import{_ as we}from"./select-V5IdpNiR.js";import{C as ge,E as J,S as D,_ as j,f as Q,w as W,x as ye}from"./Combination-CMPwuAmi.js";import{d as _e,u as je}from"./menu-items-CJhvWPOk.js";var d=B(be(),1),l=B(ve(),1),N="Collapsible",[Ce,X]=J(N),[Ne,O]=Ce(N),Y=d.forwardRef((a,t)=>{let{__scopeCollapsible:e,open:o,defaultOpen:n,disabled:r,onOpenChange:i,...s}=a,[c,p]=D({prop:o,defaultProp:n??!1,onChange:i,caller:N});return(0,l.jsx)(Ne,{scope:e,disabled:r,contentId:Q(),open:c,onOpenToggle:d.useCallback(()=>p(u=>!u),[p]),children:(0,l.jsx)(j.div,{"data-state":S(c),"data-disabled":r?"":void 0,...s,ref:t})})});Y.displayName=N;var Z="CollapsibleTrigger",ee=d.forwardRef((a,t)=>{let{__scopeCollapsible:e,...o}=a,n=O(Z,e);return(0,l.jsx)(j.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":S(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:W(a.onClick,n.onOpenToggle)})});ee.displayName=Z;var E="CollapsibleContent",ae=d.forwardRef((a,t)=>{let{forceMount:e,...o}=a,n=O(E,a.__scopeCollapsible);return(0,l.jsx)(ye,{present:e||n.open,children:({present:r})=>(0,l.jsx)(Ae,{...o,ref:t,present:r})})});ae.displayName=E;var Ae=d.forwardRef((a,t)=>{let{__scopeCollapsible:e,present:o,children:n,...r}=a,i=O(E,e),[s,c]=d.useState(o),p=d.useRef(null),u=G(t,p),m=d.useRef(0),w=m.current,g=d.useRef(0),v=g.current,y=i.open||s,h=d.useRef(y),x=d.useRef(void 0);return d.useEffect(()=>{let f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),ge(()=>{let f=p.current;if(f){x.current=x.current||{transitionDuration:f.style.transitionDuration,animationName:f.style.animationName},f.style.transitionDuration="0s",f.style.animationName="none";let _=f.getBoundingClientRect();m.current=_.height,g.current=_.width,h.current||(f.style.transitionDuration=x.current.transitionDuration,f.style.animationName=x.current.animationName),c(o)}},[i.open,o]),(0,l.jsx)(j.div,{"data-state":S(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!y,...r,ref:u,style:{"--radix-collapsible-content-height":w?`${w}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...a.style},children:y&&n})});function S(a){return a?"open":"closed"}var Re=Y,ke=ee,Ie=ae,b="Accordion",De=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[V,Oe,Ee]=_e(b),[A,ea]=J(b,[Ee,X]),z=X(),P=d.forwardRef((a,t)=>{let{type:e,...o}=a,n=o,r=o;return(0,l.jsx)(V.Provider,{scope:a.__scopeAccordion,children:e==="multiple"?(0,l.jsx)(Pe,{...r,ref:t}):(0,l.jsx)(ze,{...n,ref:t})})});P.displayName=b;var[re,Se]=A(b),[te,Ve]=A(b,{collapsible:!1}),ze=d.forwardRef((a,t)=>{let{value:e,defaultValue:o,onValueChange:n=()=>{},collapsible:r=!1,...i}=a,[s,c]=D({prop:e,defaultProp:o??"",onChange:n,caller:b});return(0,l.jsx)(re,{scope:a.__scopeAccordion,value:d.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:d.useCallback(()=>r&&c(""),[r,c]),children:(0,l.jsx)(te,{scope:a.__scopeAccordion,collapsible:r,children:(0,l.jsx)(oe,{...i,ref:t})})})}),Pe=d.forwardRef((a,t)=>{let{value:e,defaultValue:o,onValueChange:n=()=>{},...r}=a,[i,s]=D({prop:e,defaultProp:o??[],onChange:n,caller:b}),c=d.useCallback(u=>s((m=[])=>[...m,u]),[s]),p=d.useCallback(u=>s((m=[])=>m.filter(w=>w!==u)),[s]);return(0,l.jsx)(re,{scope:a.__scopeAccordion,value:i,onItemOpen:c,onItemClose:p,children:(0,l.jsx)(te,{scope:a.__scopeAccordion,collapsible:!0,children:(0,l.jsx)(oe,{...r,ref:t})})})}),[Te,R]=A(b),oe=d.forwardRef((a,t)=>{let{__scopeAccordion:e,disabled:o,dir:n,orientation:r="vertical",...i}=a,s=G(d.useRef(null),t),c=Oe(e),p=je(n)==="ltr",u=W(a.onKeyDown,m=>{var U;if(!De.includes(m.key))return;let w=m.target,g=c().filter(I=>{var $;return!(($=I.ref.current)!=null&&$.disabled)}),v=g.findIndex(I=>I.ref.current===w),y=g.length;if(v===-1)return;m.preventDefault();let h=v,x=y-1,f=()=>{h=v+1,h>x&&(h=0)},_=()=>{h=v-1,h<0&&(h=x)};switch(m.key){case"Home":h=0;break;case"End":h=x;break;case"ArrowRight":r==="horizontal"&&(p?f():_());break;case"ArrowDown":r==="vertical"&&f();break;case"ArrowLeft":r==="horizontal"&&(p?_():f());break;case"ArrowUp":r==="vertical"&&_();break}(U=g[h%y].ref.current)==null||U.focus()});return(0,l.jsx)(Te,{scope:e,disabled:o,direction:n,orientation:r,children:(0,l.jsx)(V.Slot,{scope:e,children:(0,l.jsx)(j.div,{...i,"data-orientation":r,ref:s,onKeyDown:o?void 0:u})})})}),k="AccordionItem",[He,T]=A(k),H=d.forwardRef((a,t)=>{let{__scopeAccordion:e,value:o,...n}=a,r=R(k,e),i=Se(k,e),s=z(e),c=Q(),p=o&&i.value.includes(o)||!1,u=r.disabled||a.disabled;return(0,l.jsx)(He,{scope:e,open:p,disabled:u,triggerId:c,children:(0,l.jsx)(Re,{"data-orientation":r.orientation,"data-state":le(p),...s,...n,ref:t,disabled:u,open:p,onOpenChange:m=>{m?i.onItemOpen(o):i.onItemClose(o)}})})});H.displayName=k;var ne="AccordionHeader",ie=d.forwardRef((a,t)=>{let{__scopeAccordion:e,...o}=a,n=R(b,e),r=T(ne,e);return(0,l.jsx)(j.h3,{"data-orientation":n.orientation,"data-state":le(r.open),"data-disabled":r.disabled?"":void 0,...o,ref:t})});ie.displayName=ne;var M="AccordionTrigger",F=d.forwardRef((a,t)=>{let{__scopeAccordion:e,...o}=a,n=R(b,e),r=T(M,e),i=Ve(M,e),s=z(e);return(0,l.jsx)(V.ItemSlot,{scope:e,children:(0,l.jsx)(ke,{"aria-disabled":r.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:r.triggerId,...s,...o,ref:t})})});F.displayName=M;var se="AccordionContent",K=d.forwardRef((a,t)=>{let{__scopeAccordion:e,...o}=a,n=R(b,e),r=T(se,e),i=z(e);return(0,l.jsx)(Ie,{role:"region","aria-labelledby":r.triggerId,"data-orientation":n.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});K.displayName=se;function le(a){return a?"open":"closed"}var Me=P,Fe=H,Ke=ie,de=F,ce=K,L=xe(),Le=Me,pe=d.forwardRef((a,t)=>{let e=(0,L.c)(9),o,n;e[0]===a?(o=e[1],n=e[2]):({className:o,...n}=a,e[0]=a,e[1]=o,e[2]=n);let r;e[3]===o?r=e[4]:(r=C("border-b",o),e[3]=o,e[4]=r);let i;return e[5]!==n||e[6]!==t||e[7]!==r?(i=(0,l.jsx)(Fe,{ref:t,className:r,...n}),e[5]=n,e[6]=t,e[7]=r,e[8]=i):i=e[8],i});pe.displayName="AccordionItem";var ue=d.forwardRef((a,t)=>{let e=(0,L.c)(12),o,n,r;e[0]===a?(o=e[1],n=e[2],r=e[3]):({className:n,children:o,...r}=a,e[0]=a,e[1]=o,e[2]=n,e[3]=r);let i;e[4]===n?i=e[5]:(i=C("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 text-start",n),e[4]=n,e[5]=i);let s;e[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.jsx)(we,{className:"h-4 w-4 transition-transform duration-200"}),e[6]=s):s=e[6];let c;return e[7]!==o||e[8]!==r||e[9]!==t||e[10]!==i?(c=(0,l.jsx)(Ke,{className:"flex",children:(0,l.jsxs)(de,{ref:t,className:i,...r,children:[o,s]})}),e[7]=o,e[8]=r,e[9]=t,e[10]=i,e[11]=c):c=e[11],c});ue.displayName=de.displayName;var fe=d.forwardRef((a,t)=>{let e=(0,L.c)(17),o,n,r,i;e[0]===a?(o=e[1],n=e[2],r=e[3],i=e[4]):({className:n,children:o,wrapperClassName:i,...r}=a,e[0]=a,e[1]=o,e[2]=n,e[3]=r,e[4]=i);let s;e[5]===n?s=e[6]:(s=C("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",n),e[5]=n,e[6]=s);let c;e[7]===i?c=e[8]:(c=C("pb-4 pt-0",i),e[7]=i,e[8]=c);let p;e[9]!==o||e[10]!==c?(p=(0,l.jsx)("div",{className:c,children:o}),e[9]=o,e[10]=c,e[11]=p):p=e[11];let u;return e[12]!==r||e[13]!==t||e[14]!==s||e[15]!==p?(u=(0,l.jsx)(ce,{ref:t,className:s,...r,children:p}),e[12]=r,e[13]=t,e[14]=s,e[15]=p,e[16]=u):u=e[16],u});fe.displayName=ce.displayName;var Ue=class{constructor(){q(this,"map",new Map)}get(a){return this.map.get(a)??[]}set(a,t){this.map.set(a,t)}add(a,t){this.map.has(a)?this.map.get(a).push(t):this.map.set(a,[t])}has(a){return this.map.has(a)}delete(a){return this.map.delete(a)}clear(){this.map.clear()}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}forEach(a){this.map.forEach(a)}flatValues(){let a=[];for(let t of this.map.values())a.push(...t);return a}get size(){return this.map.size}};export{ue as a,H as c,pe as i,F as l,Le as n,P as o,fe as r,K as s,Ue as t};
function a(t){return RegExp("^(("+t.join(")|(")+"))\\b","i")}var n=RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),r=RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),o=RegExp("^[\\.,:]"),c=RegExp("[()]"),m=RegExp("^[%A-Za-z][A-Za-z0-9]*"),i="break.close.do.else.for.goto.halt.hang.if.job.kill.lock.merge.new.open.quit.read.set.tcommit.trollback.tstart.use.view.write.xecute.b.c.d.e.f.g.h.i.j.k.l.m.n.o.q.r.s.tc.tro.ts.u.v.w.x".split("."),l=a("\\$ascii.\\$char.\\$data.\\$ecode.\\$estack.\\$etrap.\\$extract.\\$find.\\$fnumber.\\$get.\\$horolog.\\$io.\\$increment.\\$job.\\$justify.\\$length.\\$name.\\$next.\\$order.\\$piece.\\$qlength.\\$qsubscript.\\$query.\\$quit.\\$random.\\$reverse.\\$select.\\$stack.\\$test.\\$text.\\$translate.\\$view.\\$x.\\$y.\\$a.\\$c.\\$d.\\$e.\\$ec.\\$es.\\$et.\\$f.\\$fn.\\$g.\\$h.\\$i.\\$j.\\$l.\\$n.\\$na.\\$o.\\$p.\\$q.\\$ql.\\$qs.\\$r.\\$re.\\$s.\\$st.\\$t.\\$tr.\\$v.\\$z".split(".")),d=a(i);function s(t,e){t.sol()&&(e.label=!0,e.commandMode=0);var $=t.peek();return $==" "||$==" "?(e.label=!1,e.commandMode==0?e.commandMode=1:(e.commandMode<0||e.commandMode==2)&&(e.commandMode=0)):$!="."&&e.commandMode>0&&($==":"?e.commandMode=-1:e.commandMode=2),($==="("||$===" ")&&(e.label=!1),$===";"?(t.skipToEnd(),"comment"):t.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":$=='"'?t.skipTo('"')?(t.next(),"string"):(t.skipToEnd(),"error"):t.match(r)||t.match(n)?"operator":t.match(o)?null:c.test($)?(t.next(),"bracket"):e.commandMode>0&&t.match(d)?"controlKeyword":t.match(l)?"builtin":t.match(m)?"variable":$==="$"||$==="^"?(t.next(),"builtin"):$==="@"?(t.next(),"string.special"):/[\w%]/.test($)?(t.eatWhile(/[\w%]/),"variable"):(t.next(),"error")}const u={name:"mumps",startState:function(){return{label:!1,commandMode:0}},token:function(t,e){var $=s(t,e);return e.label?"tag":$}};export{u as t};
import{t as m}from"./mumps-46YgImgy.js";export{m as mumps};
import{s as C}from"./chunk-LvLJmgfZ.js";import{t as L}from"./react-BGmjiNul.js";import{bt as x,p as T,w as j,xt as y,yt as F}from"./cells-BpZ7g6ok.js";import{t as b}from"./compiler-runtime-DeeZ7FnK.js";import{t as H}from"./useLifecycle-D35CBukS.js";import{t as K}from"./jsx-runtime-ZmTK25f3.js";import{r as E}from"./button-YC1gW_kJ.js";import{t as w}from"./cn-BKtXLv3a.js";import{r as k}from"./input-pAun1m1X.js";import{r as D}from"./dist-BYyu59D8.js";import{r as I}from"./useTheme-DUdVAZI8.js";import{t as M}from"./tooltip-CEc2ajau.js";import{r as P,t as R}from"./esm-DpMp6qko.js";var W=b(),p=C(L(),1),d=C(K(),1),_=[D(),P({syntaxHighlighting:!0,highlightSpecialChars:!1,history:!1,drawSelection:!1,defaultKeymap:!1,historyKeymap:!1})];const B=(0,p.memo)(s=>{let e=(0,W.c)(8),{code:r,className:a}=s,{theme:i}=I(),o;e[0]===a?o=e[1]:(o=w(a,"text-muted-foreground flex flex-col overflow-hidden"),e[0]=a,e[1]=o);let l=i==="dark"?"dark":"light",t;e[2]!==r||e[3]!==l?(t=(0,d.jsx)(R,{minHeight:"10px",theme:l,height:"100%",className:"tiny-code",editable:!1,basicSetup:!1,extensions:_,value:r}),e[2]=r,e[3]=l,e[4]=t):t=e[4];let n;return e[5]!==o||e[6]!==t?(n=(0,d.jsx)("div",{className:o,children:t}),e[5]=o,e[6]=t,e[7]=n):n=e[7],n});B.displayName="TinyCode";var N=b();const q=s=>{let e=(0,N.c)(16),r,a,i,o,l;e[0]===s?(r=e[1],a=e[2],i=e[3],o=e[4],l=e[5]):({value:l,onChange:r,placeholder:i,onEnterKey:a,...o}=s,e[0]=s,e[1]=r,e[2]=a,e[3]=i,e[4]=o,e[5]=l);let t=(0,p.useRef)(null),n=S(l,r),u;e[6]===n.onBlur?u=e[7]:(u=()=>{let f=n.onBlur,v=t.current;if(v)return v.addEventListener("blur",f),()=>{v.removeEventListener("blur",f)}},e[6]=n.onBlur,e[7]=u),H(u);let m=n.value,g=n.onChange,c;e[8]===a?c=e[9]:(c=E.onEnter(f=>{E.stopPropagation()(f),a==null||a()}),e[8]=a,e[9]=c);let h;return e[10]!==n.onChange||e[11]!==n.value||e[12]!==i||e[13]!==o||e[14]!==c?(h=(0,d.jsx)(k,{"data-testid":"cell-name-input",value:m,onChange:g,ref:t,placeholder:i,className:"shadow-none! hover:shadow-none focus:shadow-none focus-visible:shadow-none",onKeyDown:c,...o}),e[10]=n.onChange,e[11]=n.value,e[12]=i,e[13]=o,e[14]=c,e[15]=h):h=e[15],h},z=s=>{let e=(0,N.c)(12),{value:r,cellId:a,className:i}=s,{updateCellName:o}=j(),l;e[0]!==a||e[1]!==o?(l=g=>o({cellId:a,name:g}),e[0]=a,e[1]=o,e[2]=l):l=e[2];let t=S(r,l);if(x(r))return null;let n=t.focusing?"":"text-ellipsis",u;e[3]!==i||e[4]!==n?(u=w("outline-hidden border hover:border-cyan-500/40 focus:border-cyan-500/40",n,i),e[3]=i,e[4]=n,e[5]=u):u=e[5];let m;return e[6]!==t.onBlur||e[7]!==t.onChange||e[8]!==t.onFocus||e[9]!==u||e[10]!==r?(m=(0,d.jsx)(M,{content:"Click to rename",children:(0,d.jsx)("span",{className:u,contentEditable:!0,suppressContentEditableWarning:!0,onChange:t.onChange,onBlur:t.onBlur,onFocus:t.onFocus,onKeyDown:A,children:r})}),e[6]=t.onBlur,e[7]=t.onChange,e[8]=t.onFocus,e[9]=u,e[10]=r,e[11]=m):m=e[11],m};function S(s,e){let[r,a]=(0,p.useState)(s),[i,o]=(0,p.useState)(!1),l=t=>{if(t!==s){if(!t||x(t)){e(t);return}e(F(t,T()))}};return{value:x(r)?"":r,focusing:i,onChange:t=>{let n=t.target.value;a(y(n))},onBlur:t=>{if(t.target instanceof HTMLInputElement){let n=t.target.value;l(y(n))}else t.target instanceof HTMLSpanElement&&(l(y(t.target.innerText.trim())),t.target.scrollLeft=0,o(!1))},onFocus:()=>{o(!0)}}}function A(s){s.stopPropagation(),s.key==="Enter"&&s.target instanceof HTMLElement&&s.target.blur()}export{q as n,B as r,z as t};
function n(_){for(var t={},r=_.split(" "),e=0;e<r.length;++e)t[r[e]]=!0;return t}var p=n("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),u=n("http mail events server types location upstream charset_map limit_except if geo map"),m=n("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),i;function s(_,t){return i=t,_}function a(_,t){_.eatWhile(/[\w\$_]/);var r=_.current();if(p.propertyIsEnumerable(r))return"keyword";if(u.propertyIsEnumerable(r)||m.propertyIsEnumerable(r))return"controlKeyword";var e=_.next();if(e=="@")return _.eatWhile(/[\w\\\-]/),s("meta",_.current());if(e=="/"&&_.eat("*"))return t.tokenize=c,c(_,t);if(e=="<"&&_.eat("!"))return t.tokenize=l,l(_,t);if(e=="=")s(null,"compare");else return(e=="~"||e=="|")&&_.eat("=")?s(null,"compare"):e=='"'||e=="'"?(t.tokenize=f(e),t.tokenize(_,t)):e=="#"?(_.skipToEnd(),s("comment","comment")):e=="!"?(_.match(/^\s*\w*/),s("keyword","important")):/\d/.test(e)?(_.eatWhile(/[\w.%]/),s("number","unit")):/[,.+>*\/]/.test(e)?s(null,"select-op"):/[;{}:\[\]]/.test(e)?s(null,e):(_.eatWhile(/[\w\\\-]/),s("variable","variable"))}function c(_,t){for(var r=!1,e;(e=_.next())!=null;){if(r&&e=="/"){t.tokenize=a;break}r=e=="*"}return s("comment","comment")}function l(_,t){for(var r=0,e;(e=_.next())!=null;){if(r>=2&&e==">"){t.tokenize=a;break}r=e=="-"?r+1:0}return s("comment","comment")}function f(_){return function(t,r){for(var e=!1,o;(o=t.next())!=null&&!(o==_&&!e);)e=!e&&o=="\\";return e||(r.tokenize=a),s("string","string")}}const d={name:"nginx",startState:function(){return{tokenize:a,baseIndent:0,stack:[]}},token:function(_,t){if(_.eatSpace())return null;i=null;var r=t.tokenize(_,t),e=t.stack[t.stack.length-1];return i=="hash"&&e=="rule"?r="atom":r=="variable"&&(e=="rule"?r="number":(!e||e=="@media{")&&(r="tag")),e=="rule"&&/^[\{\};]$/.test(i)&&t.stack.pop(),i=="{"?e=="@media"?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):i=="}"?t.stack.pop():i=="@media"?t.stack.push("@media"):e=="{"&&i!="comment"&&t.stack.push("rule"),r},indent:function(_,t,r){var e=_.stack.length;return/^\}/.test(t)&&(e-=_.stack[_.stack.length-1]=="rule"?2:1),_.baseIndent+e*r.unit},languageData:{indentOnInput:/^\s*\}$/}};export{d as nginx};

Sorry, the diff of this file is too big to display

import{t as e}from"./simple-mode-BVXe8Gj5.js";const t=e({start:[{regex:/(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/,token:"number"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/`(?:[^\\`]|\\.)*`?/,token:"string"},{regex:/^\s*(?:\!(addincludedir|addplugindir|appendfile|assert|cd|define|delfile|echo|error|execute|finalize|getdllversion|gettlbversion|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|uninstfinalize|verbose|warning))\b/i,token:"keyword"},{regex:/^\s*(?:\!(if(?:n?def)?|ifmacron?def|macro))\b/i,token:"keyword",indent:!0},{regex:/^\s*(?:\!(else|endif|macroend))\b/i,token:"keyword",dedent:!0},{regex:/^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetKnownFolderPath|GetLabelAddress|GetTempFileName|GetWinVer|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfRtlLanguage|IfShellVarContextAll|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Target|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/i,token:"keyword"},{regex:/^\s*(?:Function|PageEx|Section(?:Group)?)\b/i,token:"keyword",indent:!0},{regex:/^\s*(?:(Function|PageEx|Section(?:Group)?)End)\b/i,token:"keyword",dedent:!0},{regex:/\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/i,token:"atom"},{regex:/\b(?:admin|all|amd64-unicode|auto|both|bottom|bzip2|components|current|custom|directory|false|force|hide|highest|ifdiff|ifnewer|instfiles|lastused|leave|left|license|listonly|lzma|nevershow|none|normal|notset|off|on|right|show|silent|silentlog|textonly|top|true|try|un\.components|un\.custom|un\.directory|un\.instfiles|un\.license|uninstConfirm|user|Win10|Win7|Win8|WinVista|x-86-(ansi|unicode)|zlib)\b/i,token:"builtin"},{regex:/\$\{(?:And(?:If(?:Not)?|Unless)|Break|Case(?:2|3|4|5|Else)?|Continue|Default|Do(?:Until|While)?|Else(?:If(?:Not)?|Unless)?|End(?:If|Select|Switch)|Exit(?:Do|For|While)|For(?:Each)?|If(?:Cmd|Not(?:Then)?|Then)?|Loop(?:Until|While)?|Or(?:If(?:Not)?|Unless)|Select|Switch|Unless|While)\}/i,token:"variable-2",indent:!0},{regex:/\$\{(?:BannerTrimPath|DirState|DriveSpace|Get(BaseName|Drives|ExeName|ExePath|FileAttributes|FileExt|FileName|FileVersion|Options|OptionsS|Parameters|Parent|Root|Size|Time)|Locate|RefreshShellIcons)\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:Memento(?:Section(?:Done|End|Restore|Save)?|UnselectedSection))\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:Config(?:Read|ReadS|Write|WriteS)|File(?:Join|ReadFromEnd|Recode)|Line(?:Find|Read|Sum)|Text(?:Compare|CompareS)|TrimNewLines)\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:(?:At(?:Least|Most)|Is)(?:ServicePack|Win(?:7|8|10|95|98|200(?:0|3|8(?:R2)?)|ME|NT4|Vista|XP))|Is(?:NT|Server))\}/i,token:"variable",dedent:!0},{regex:/\$\{(?:StrFilterS?|Version(?:Compare|Convert)|Word(?:AddS?|Find(?:(?:2|3)X)?S?|InsertS?|ReplaceS?))\}/i,token:"keyword",dedent:!0},{regex:/\$\{(?:RunningX64)\}/i,token:"variable",dedent:!0},{regex:/\$\{(?:Disable|Enable)X64FSRedirection\}/i,token:"keyword",dedent:!0},{regex:/(#|;).*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/\$\w[\w\.]*/,token:"variable"},{regex:/\${[\!\w\.:-]+}/,token:"variableName.constant"},{regex:/\$\([\!\w\.:-]+\)/,token:"atom"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],languageData:{name:"nsis",indentOnInput:/^\s*((Function|PageEx|Section|Section(Group)?)End|(\!(endif|macroend))|\$\{(End(If|Unless|While)|Loop(Until)|Next)\})$/i,commentTokens:{line:"#",block:{open:"/*",close:"*/"}}}});export{t};
import{t as s}from"./nsis-Bh7CNuij.js";export{s as nsis};
import{t as r}from"./ntriples-CABx3n6p.js";export{r as ntriples};
var R={PRE_SUBJECT:0,WRITING_SUB_URI:1,WRITING_BNODE_URI:2,PRE_PRED:3,WRITING_PRED_URI:4,PRE_OBJ:5,WRITING_OBJ_URI:6,WRITING_OBJ_BNODE:7,WRITING_OBJ_LITERAL:8,WRITING_LIT_LANG:9,WRITING_LIT_TYPE:10,POST_OBJ:11,ERROR:12};function T(t,I){var _=t.location;t.location=_==R.PRE_SUBJECT&&I=="<"?R.WRITING_SUB_URI:_==R.PRE_SUBJECT&&I=="_"?R.WRITING_BNODE_URI:_==R.PRE_PRED&&I=="<"?R.WRITING_PRED_URI:_==R.PRE_OBJ&&I=="<"?R.WRITING_OBJ_URI:_==R.PRE_OBJ&&I=="_"?R.WRITING_OBJ_BNODE:_==R.PRE_OBJ&&I=='"'?R.WRITING_OBJ_LITERAL:_==R.WRITING_SUB_URI&&I==">"||_==R.WRITING_BNODE_URI&&I==" "?R.PRE_PRED:_==R.WRITING_PRED_URI&&I==">"?R.PRE_OBJ:_==R.WRITING_OBJ_URI&&I==">"||_==R.WRITING_OBJ_BNODE&&I==" "||_==R.WRITING_OBJ_LITERAL&&I=='"'||_==R.WRITING_LIT_LANG&&I==" "||_==R.WRITING_LIT_TYPE&&I==">"?R.POST_OBJ:_==R.WRITING_OBJ_LITERAL&&I=="@"?R.WRITING_LIT_LANG:_==R.WRITING_OBJ_LITERAL&&I=="^"?R.WRITING_LIT_TYPE:I==" "&&(_==R.PRE_SUBJECT||_==R.PRE_PRED||_==R.PRE_OBJ||_==R.POST_OBJ)?_:_==R.POST_OBJ&&I=="."?R.PRE_SUBJECT:R.ERROR}const O={name:"ntriples",startState:function(){return{location:R.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(t,I){var _=t.next();if(_=="<"){T(I,_);var E="";return t.eatWhile(function(r){return r!="#"&&r!=">"?(E+=r,!0):!1}),I.uris.push(E),t.match("#",!1)||(t.next(),T(I,">")),"variable"}if(_=="#"){var i="";return t.eatWhile(function(r){return r!=">"&&r!=" "?(i+=r,!0):!1}),I.anchors.push(i),"url"}if(_==">")return T(I,">"),"variable";if(_=="_"){T(I,_);var B="";return t.eatWhile(function(r){return r==" "?!1:(B+=r,!0)}),I.bnodes.push(B),t.next(),T(I," "),"builtin"}if(_=='"')return T(I,_),t.eatWhile(function(r){return r!='"'}),t.next(),t.peek()!="@"&&t.peek()!="^"&&T(I,'"'),"string";if(_=="@"){T(I,"@");var N="";return t.eatWhile(function(r){return r==" "?!1:(N+=r,!0)}),I.langs.push(N),t.next(),T(I," "),"string.special"}if(_=="^"){t.next(),T(I,"^");var a="";return t.eatWhile(function(r){return r==">"?!1:(a+=r,!0)}),I.types.push(a),t.next(),T(I,">"),"variable"}_==" "&&T(I,_),_=="."&&T(I,_)}};export{O as t};
import{s as It}from"./chunk-LvLJmgfZ.js";import{t as Tt}from"./react-BGmjiNul.js";import{t as Ct}from"./dist-CdBsAJTp.js";var D=It(Tt());const jt=Ct("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function it(t,r){var e={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(e[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(t);n<a.length;n++)r.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(t,a[n])&&(e[a[n]]=t[a[n]]);return e}var tt;(function(t){t.event="event",t.props="prop"})(tt||(tt={}));function q(){}function Rt(t){var r,e=void 0;return function(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];return r&&a.length===r.length&&a.every(function(u,l){return u===r[l]})||(r=a,e=t.apply(void 0,a)),e}}function Y(t){return!!(t||"").match(/\d/)}function X(t){return t==null}function Ft(t){return typeof t=="number"&&isNaN(t)}function lt(t){return X(t)||Ft(t)||typeof t=="number"&&!isFinite(t)}function ct(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Bt(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Mt(t,r,e){var a=Bt(e),n=t.search(/[1-9]/);return n=n===-1?t.length:n,t.substring(0,n)+t.substring(n,t.length).replace(a,"$1"+r)}function kt(t){var r=(0,D.useRef)(t);return r.current=t,(0,D.useRef)(function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];return r.current.apply(r,e)}).current}function nt(t,r){r===void 0&&(r=!0);var e=t[0]==="-",a=e&&r;t=t.replace("-","");var n=t.split(".");return{beforeDecimal:n[0],afterDecimal:n[1]||"",hasNegation:e,addNegation:a}}function Lt(t){if(!t)return t;var r=t[0]==="-";r&&(t=t.substring(1,t.length));var e=t.split("."),a=e[0].replace(/^0+/,"")||"0",n=e[1]||"";return(r?"-":"")+a+(n?"."+n:"")}function st(t,r,e){for(var a="",n=e?"0":"",u=0;u<=r-1;u++)a+=t[u]||n;return a}function ft(t,r){return Array(r+1).join(t)}function vt(t){var r=t+"",e=r[0]==="-"?"-":"";e&&(r=r.substring(1));var a=r.split(/[eE]/g),n=a[0],u=a[1];if(u=Number(u),!u)return e+n;n=n.replace(".","");var l=1+u,m=n.length;return l<0?n="0."+ft("0",Math.abs(l))+n:l>=m?n+=ft("0",l-m):n=(n.substring(0,l)||"0")+"."+n.substring(l),e+n}function dt(t,r,e){if(["","-"].indexOf(t)!==-1)return t;var a=(t.indexOf(".")!==-1||e)&&r,n=nt(t),u=n.beforeDecimal,l=n.afterDecimal,m=n.hasNegation,b=parseFloat("0."+(l||"0")),p=(l.length<=r?"0."+l:b.toFixed(r)).split("."),h=u;u&&Number(p[0])&&(h=u.split("").reverse().reduce(function(c,A,v){return c.length>v?(Number(c[0])+Number(A)).toString()+c.substring(1,c.length):A+c},p[0]));var f=st(p[1]||"",r,e),S=m?"-":"",y=a?".":"";return""+S+h+y+f}function Q(t,r){if(t.value=t.value,t!==null){if(t.createTextRange){var e=t.createTextRange();return e.move("character",r),e.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(r,r),!0):(t.focus(),!1)}}var gt=Rt(function(t,r){for(var e=0,a=0,n=t.length,u=r.length;t[e]===r[e]&&e<n;)e++;for(;t[n-1-a]===r[u-1-a]&&u-a>e&&n-a>e;)a++;return{from:{start:e,end:n-a},to:{start:e,end:u-a}}}),Wt=function(t,r){var e=Math.min(t.selectionStart,r);return{from:{start:e,end:t.selectionEnd},to:{start:e,end:r}}};function Pt(t,r,e){return Math.min(Math.max(t,r),e)}function ut(t){return Math.max(t.selectionStart,t.selectionEnd)}function Kt(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Gt(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function Ut(t){var r=t.currentValue,e=t.formattedValue,a=t.currentValueIndex,n=t.formattedValueIndex;return r[a]===e[n]}function _t(t,r,e,a,n,u,l){l===void 0&&(l=Ut);var m=n.findIndex(function(B){return B}),b=t.slice(0,m);!r&&!e.startsWith(b)&&(r=b,e=b+e,a+=b.length);for(var p=e.length,h=t.length,f={},S=Array(p),y=0;y<p;y++){S[y]=-1;for(var c=0,A=h;c<A;c++)if(l({currentValue:e,lastValue:r,formattedValue:t,currentValueIndex:y,formattedValueIndex:c})&&f[c]!==!0){S[y]=c,f[c]=!0;break}}for(var v=a;v<p&&(S[v]===-1||!u(e[v]));)v++;var E=v===p||S[v]===-1?h:S[v];for(v=a-1;v>0&&S[v]===-1;)v--;var j=v===-1||S[v]===-1?0:S[v]+1;return j>E?E:a-j<E-a?j:E}function mt(t,r,e,a){var n=t.length;if(r=Pt(r,0,n),a==="left"){for(;r>=0&&!e[r];)r--;r===-1&&(r=e.indexOf(!0))}else{for(;r<=n&&!e[r];)r++;r>n&&(r=e.lastIndexOf(!0))}return r===-1&&(r=n),r}function $t(t){for(var r=Array.from({length:t.length+1}).map(function(){return!0}),e=0,a=r.length;e<a;e++)r[e]=!!(Y(t[e])||Y(t[e-1]));return r}function pt(t,r,e,a,n,u){u===void 0&&(u=q);var l=kt(function(c,A){var v,E;return lt(c)?(E="",v=""):typeof c=="number"||A?(E=typeof c=="number"?vt(c):c,v=a(E)):(E=n(c,void 0),v=a(E)),{formattedValue:v,numAsString:E}}),m=(0,D.useState)(function(){return l(X(t)?r:t,e)}),b=m[0],p=m[1],h=function(c,A){c.formattedValue!==b.formattedValue&&p({formattedValue:c.formattedValue,numAsString:c.value}),u(c,A)},f=t,S=e;X(t)&&(f=b.numAsString,S=!0);var y=l(f,S);return(0,D.useMemo)(function(){p(y)},[y.formattedValue]),[b,h]}function qt(t){return t.replace(/[^0-9]/g,"")}function Zt(t){return t}function zt(t){var r=t.type;r===void 0&&(r="text");var e=t.displayType;e===void 0&&(e="input");var a=t.customInput,n=t.renderText,u=t.getInputRef,l=t.format;l===void 0&&(l=Zt);var m=t.removeFormatting;m===void 0&&(m=qt);var b=t.defaultValue,p=t.valueIsNumericString,h=t.onValueChange,f=t.isAllowed,S=t.onChange;S===void 0&&(S=q);var y=t.onKeyDown;y===void 0&&(y=q);var c=t.onMouseUp;c===void 0&&(c=q);var A=t.onFocus;A===void 0&&(A=q);var v=t.onBlur;v===void 0&&(v=q);var E=t.value,j=t.getCaretBoundary;j===void 0&&(j=$t);var B=t.isValidInputCharacter;B===void 0&&(B=Y);var Z=t.isCharacterSame,P=it(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=pt(E,b,!!p,l,m,h),G=z[0],x=G.formattedValue,k=G.numAsString,H=z[1],K=(0,D.useRef)(),s=(0,D.useRef)({formattedValue:x,numAsString:k}),g=function(o,i){s.current={formattedValue:o.formattedValue,numAsString:o.value},H(o,i)},C=(0,D.useState)(!1),I=C[0],W=C[1],w=(0,D.useRef)(null),T=(0,D.useRef)({setCaretTimeout:null,focusTimeout:null});(0,D.useEffect)(function(){return W(!0),function(){clearTimeout(T.current.setCaretTimeout),clearTimeout(T.current.focusTimeout)}},[]);var J=l,R=function(o,i){var d=parseFloat(i);return{formattedValue:o,value:i,floatValue:isNaN(d)?void 0:d}},L=function(o,i,d){o.selectionStart===0&&o.selectionEnd===o.value.length||(Q(o,i),T.current.setCaretTimeout=setTimeout(function(){o.value===d&&o.selectionStart!==i&&Q(o,i)},0))},M=function(o,i,d){return mt(o,i,j(o),d)},et=function(o,i,d){var O=j(i),F=_t(i,x,o,d,O,B,Z);return F=mt(i,F,O),F},bt=function(o){var i=o.formattedValue;i===void 0&&(i="");var d=o.input,O=o.source,F=o.event,N=o.numAsString,V;if(d){var U=o.inputValue||d.value,_=ut(d);d.value=i,V=et(U,i,_),V!==void 0&&L(d,V,i)}i!==x&&g(R(i,N),{event:F,source:O})};(0,D.useEffect)(function(){var o=s.current,i=o.formattedValue,d=o.numAsString;(x!==i||k!==d)&&g(R(x,k),{event:void 0,source:tt.props})},[x,k]);var yt=w.current?ut(w.current):void 0;(typeof window<"u"?D.useLayoutEffect:D.useEffect)(function(){var o=w.current;if(x!==s.current.formattedValue&&o){var i=et(s.current.formattedValue,x,yt);o.value=x,L(o,i,x)}},[x]);var Vt=function(o,i,d){var O=i.target,F=K.current?Wt(K.current,O.selectionEnd):gt(x,o),N=Object.assign(Object.assign({},F),{lastValue:x}),V=m(o,N),U=J(V);if(V=m(U,void 0),f&&!f(R(U,V))){var _=i.target,$=et(o,x,ut(_));return _.value=x,L(_,$,x),!1}return bt({formattedValue:U,numAsString:V,inputValue:o,event:i,source:d,input:i.target}),!0},at=function(o,i){i===void 0&&(i=0),K.current={selectionStart:o.selectionStart,selectionEnd:o.selectionEnd+i}},xt=function(o){var i=o.target.value;Vt(i,o,tt.event)&&S(o),K.current=void 0},wt=function(o){var i=o.target,d=o.key,O=i.selectionStart,F=i.selectionEnd,N=i.value;N===void 0&&(N="");var V;d==="ArrowLeft"||d==="Backspace"?V=Math.max(O-1,0):d==="ArrowRight"?V=Math.min(O+1,N.length):d==="Delete"&&(V=O);var U=0;d==="Delete"&&O===F&&(U=1);var _=d==="ArrowLeft"||d==="ArrowRight";if(V===void 0||O!==F&&!_){y(o),at(i,U);return}var $=V;_?($=M(N,V,d==="ArrowLeft"?"left":"right"),$!==V&&o.preventDefault()):d==="Delete"&&!B(N[V])?$=M(N,V,"right"):d==="Backspace"&&!B(N[V])&&($=M(N,V,"left")),$!==V&&L(i,$,N),y(o),at(i,U)},Nt=function(o){var i=o.target,d=function(){var O=i.selectionStart,F=i.selectionEnd,N=i.value;if(N===void 0&&(N=""),O===F){var V=M(N,O);V!==O&&L(i,V,N)}};d(),requestAnimationFrame(function(){d()}),c(o),at(i)},Dt=function(o){o.persist&&o.persist();var i=o.target,d=o.currentTarget;w.current=i,T.current.focusTimeout=setTimeout(function(){var O=i.selectionStart,F=i.selectionEnd,N=i.value;N===void 0&&(N="");var V=M(N,O);V!==O&&!(O===0&&F===N.length)&&L(i,V,N),A(Object.assign(Object.assign({},o),{currentTarget:d}))},0)},Et=function(o){w.current=null,clearTimeout(T.current.focusTimeout),clearTimeout(T.current.setCaretTimeout),v(o)},Ot=I&&Kt()?"numeric":void 0,ot=Object.assign({inputMode:Ot},P,{type:r,value:x,onChange:xt,onKeyDown:wt,onMouseUp:Nt,onFocus:Dt,onBlur:Et});if(e==="text")return n?D.createElement(D.Fragment,null,n(x,P)||null):D.createElement("span",Object.assign({},P,{ref:u}),x);if(a){var At=a;return D.createElement(At,Object.assign({},ot,{ref:u}))}return D.createElement("input",Object.assign({},ot,{ref:u}))}function ht(t,r){var e=r.decimalScale,a=r.fixedDecimalScale,n=r.prefix;n===void 0&&(n="");var u=r.suffix;u===void 0&&(u="");var l=r.allowNegative,m=r.thousandsGroupStyle;if(m===void 0&&(m="thousand"),t===""||t==="-")return t;var b=rt(r),p=b.thousandSeparator,h=b.decimalSeparator,f=e!==0&&t.indexOf(".")!==-1||e&&a,S=nt(t,l),y=S.beforeDecimal,c=S.afterDecimal,A=S.addNegation;return e!==void 0&&(c=st(c,e,!!a)),p&&(y=Mt(y,p,m)),n&&(y=n+y),u&&(c+=u),A&&(y="-"+y),t=y+(f&&h||"")+c,t}function rt(t){var r=t.decimalSeparator;r===void 0&&(r=".");var e=t.thousandSeparator,a=t.allowedDecimalSeparators;return e===!0&&(e=","),a||(a=[r,"."]),{decimalSeparator:r,thousandSeparator:e,allowedDecimalSeparators:a}}function Ht(t,r){t===void 0&&(t="");var e=RegExp("(-)"),a=RegExp("(-)(.)*(-)"),n=e.test(t),u=a.test(t);return t=t.replace(/-/g,""),n&&!u&&r&&(t="-"+t),t}function Jt(t,r){return RegExp("(^-)|[0-9]|"+ct(t),r?"g":void 0)}function Qt(t,r,e){return t===""?!0:!(r!=null&&r.match(/\d/))&&!(e!=null&&e.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function Xt(t,r,e){var a;r===void 0&&(r=Gt(t));var n=e.allowNegative,u=e.prefix;u===void 0&&(u="");var l=e.suffix;l===void 0&&(l="");var m=e.decimalScale,b=r.from,p=r.to,h=p.start,f=p.end,S=rt(e),y=S.allowedDecimalSeparators,c=S.decimalSeparator,A=t[f]===c;if(Y(t)&&(t===u||t===l)&&r.lastValue==="")return t;if(f-h===1&&y.indexOf(t[h])!==-1){var v=m===0?"":c;t=t.substring(0,h)+v+t.substring(h+1,t.length)}var E=function(w,T,J){var R=!1,L=!1;u.startsWith("-")?R=!1:w.startsWith("--")?(R=!1,L=!0):l.startsWith("-")&&w.length===l.length?R=!1:w[0]==="-"&&(R=!0);var M=R?1:0;return L&&(M=2),M&&(w=w.substring(M),T-=M,J-=M),{value:w,start:T,end:J,hasNegation:R}},j=E(t,h,f),B=j.hasNegation;a=j,t=a.value,h=a.start,f=a.end;var Z=E(r.lastValue,b.start,b.end),P=Z.start,z=Z.end,G=Z.value,x=t.substring(h,f);t.length&&G.length&&(P>G.length-l.length||z<u.length)&&!(x&&l.startsWith(x))&&(t=G);var k=0;t.startsWith(u)?k+=u.length:h<u.length&&(k=h),t=t.substring(k),f-=k;var H=t.length,K=t.length-l.length;t.endsWith(l)?H=K:(f>K||f>t.length-l.length)&&(H=f),t=t.substring(0,H),t=Ht(B?"-"+t:t,n),t=(t.match(Jt(c,!0))||[]).join("");var s=t.indexOf(c);t=t.replace(new RegExp(ct(c),"g"),function(w,T){return T===s?".":""});var g=nt(t,n),C=g.beforeDecimal,I=g.afterDecimal,W=g.addNegation;return p.end-p.start<b.end-b.start&&C===""&&A&&!parseFloat(I)&&(t=W?"-":""),t}function Yt(t,r){var e=r.prefix;e===void 0&&(e="");var a=r.suffix;a===void 0&&(a="");var n=Array.from({length:t.length+1}).map(function(){return!0}),u=t[0]==="-";n.fill(!1,0,e.length+(u?1:0));var l=t.length;return n.fill(!1,l-a.length+1,l+1),n}function tr(t){var r=rt(t),e=r.thousandSeparator,a=r.decimalSeparator,n=t.prefix;n===void 0&&(n="");var u=t.allowNegative;if(u===void 0&&(u=!0),e===a)throw Error(`
Decimal separator can't be same as thousand separator.
thousandSeparator: `+e+` (thousandSeparator = {true} is same as thousandSeparator = ",")
decimalSeparator: `+a+` (default value for decimalSeparator is .)
`);return n.startsWith("-")&&u&&(console.error(`
Prefix can't start with '-' when allowNegative is true.
prefix: `+n+`
allowNegative: `+u+`
`),u=!1),Object.assign(Object.assign({},t),{allowNegative:u})}function rr(t){t=tr(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var r=t.suffix,e=t.allowNegative,a=t.allowLeadingZeros,n=t.onKeyDown;n===void 0&&(n=q);var u=t.onBlur;u===void 0&&(u=q);var l=t.thousandSeparator,m=t.decimalScale,b=t.fixedDecimalScale,p=t.prefix;p===void 0&&(p="");var h=t.defaultValue,f=t.value,S=t.valueIsNumericString,y=t.onValueChange,c=it(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),A=rt(t),v=A.decimalSeparator,E=A.allowedDecimalSeparators,j=function(s){return ht(s,t)},B=function(s,g){return Xt(s,g,t)},Z=X(f)?h:f,P=S??Qt(Z,p,r);X(f)?X(h)||P||(P=typeof h=="number"):P||(P=typeof f=="number");var z=function(s){return lt(s)?s:(typeof s=="number"&&(s=vt(s)),P&&typeof m=="number"?dt(s,m,!!b):s)},G=pt(z(f),z(h),!!P,j,B,y),x=G[0],k=x.numAsString,H=x.formattedValue,K=G[1];return Object.assign(Object.assign({},c),{value:H,valueIsNumericString:!1,isValidInputCharacter:function(s){return s===v?!0:Y(s)},isCharacterSame:function(s){var g=s.currentValue,C=s.lastValue,I=s.formattedValue,W=s.currentValueIndex,w=s.formattedValueIndex,T=g[W],J=I[w],R=gt(C,g).to,L=function(M){return B(M).indexOf(".")+p.length};return f===0&&b&&m&&g[R.start]===v&&L(g)<W&&L(I)>w?!1:W>=R.start&&W<R.end&&E&&E.includes(T)&&J===v?!0:T===J},onValueChange:K,format:j,removeFormatting:B,getCaretBoundary:function(s){return Yt(s,t)},onKeyDown:function(s){var g=s.target,C=s.key,I=g.selectionStart,W=g.selectionEnd,w=g.value;if(w===void 0&&(w=""),(C==="Backspace"||C==="Delete")&&W<p.length){s.preventDefault();return}if(I!==W){n(s);return}C==="Backspace"&&w[0]==="-"&&I===p.length+1&&e&&Q(g,1),m&&b&&(C==="Backspace"&&w[I-1]===v?(Q(g,I-1),s.preventDefault()):C==="Delete"&&w[I]===v&&s.preventDefault()),E!=null&&E.includes(C)&&w[I]===v&&Q(g,I+1);var T=l===!0?",":l;C==="Backspace"&&w[I-1]===T&&Q(g,I-1),C==="Delete"&&w[I]===T&&Q(g,I+1),n(s)},onBlur:function(s){var g=k;g.match(/\d/g)||(g=""),a||(g=Lt(g)),b&&m&&(g=dt(g,m,b)),g!==k&&K({formattedValue:ht(g,t),value:g,floatValue:parseFloat(g)},{event:s,source:tt.event}),u(s)}})}function er(t){var r=rr(t);return D.createElement(zt,Object.assign({},r))}function St(){var t,r,e;return((e=(r=(t=Intl.NumberFormat())==null?void 0:t.formatToParts(1.1))==null?void 0:r.find(a=>a.type==="decimal"))==null?void 0:e.value)??"."}function ar(){return St()==="."?",":"."}var nr=t=>{let{value:r,onChange:e,disabled:a,highlight:n,validatedSelection:u,fixedDecimals:l,allowNegative:m,thousandSeparator:b,decimalSeparator:p}=t,h=D.useRef();return D.useLayoutEffect(()=>{var f;if(u!==void 0){let S=typeof u=="number"?[u,null]:u;(f=h.current)==null||f.setSelectionRange(S[0],S[1])}},[u]),D.createElement(jt,null,D.createElement(er,{autoFocus:!0,getInputRef:h,className:"gdg-input",onFocus:f=>f.target.setSelectionRange(n?0:f.target.value.length,f.target.value.length),disabled:a===!0,decimalScale:l,allowNegative:m,thousandSeparator:b??ar(),decimalSeparator:p??St(),value:Object.is(r,-0)?"-":r??"",onValueChange:e}))};export{nr as default};
import{d as l}from"./hotkeys-BHHWjLlp.js";import{t as s}from"./once-Bul8mtFs.js";const a=s(i=>{for(let t of[100,20,2,0])try{return new Intl.NumberFormat(i,{minimumFractionDigits:0,maximumFractionDigits:t}).format(1),t}catch(n){l.error(n)}return 0});function c(i,t){return i==null?"":Array.isArray(i)?String(i):typeof i=="string"?i:typeof i=="boolean"?String(i):typeof i=="number"||typeof i=="bigint"?i.toLocaleString(t,{minimumFractionDigits:0,maximumFractionDigits:2}):String(i)}function u(i){return i===0?"0":Number.isNaN(i)?"NaN":Number.isFinite(i)?null:i>0?"Infinity":"-Infinity"}function f(i,t){let n=u(i);if(n!==null)return n;let r=Math.abs(i);if(r<.01||r>=1e6)return new Intl.NumberFormat(t.locale,{minimumFractionDigits:1,maximumFractionDigits:1,notation:"scientific"}).format(i).toLowerCase();let{shouldRound:m,locale:o}=t;return m?new Intl.NumberFormat(o,{minimumFractionDigits:0,maximumFractionDigits:2}).format(i):i.toLocaleString(o,{minimumFractionDigits:0,maximumFractionDigits:a(o)})}var e={24:"Y",21:"Z",18:"E",15:"P",12:"T",9:"G",6:"M",3:"k",0:"","-3":"m","-6":"\xB5","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"};function g(i,t){let n=u(i);if(n!==null)return n;let[r,m]=new Intl.NumberFormat(t,{notation:"engineering",maximumSignificantDigits:3}).format(i).split("E");return m in e?r+e[m]:`${r}E${m}`}export{f as i,g as n,c as r,a as t};
function f(n,t){if(n==null)return{};var r={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(t.indexOf(i)!==-1)continue;r[i]=n[i]}return r}export{f as t};
function i(e){return RegExp("^(("+e.join(")|(")+"))\\b")}var o=RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),c=RegExp("^[\\(\\[\\{\\},:=;\\.]"),s=RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),m=RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),l=RegExp("^((>>=)|(<<=))"),u=RegExp("^[\\]\\)]"),f=RegExp("^[_A-Za-z\xA1-\uFFFF][_A-Za-z0-9\xA1-\uFFFF]*"),d=i("error.eval.function.abs.acos.atan.asin.cos.cosh.exp.log.prod.sum.log10.max.min.sign.sin.sinh.sqrt.tan.reshape.break.zeros.default.margin.round.ones.rand.syn.ceil.floor.size.clear.zeros.eye.mean.std.cov.det.eig.inv.norm.rank.trace.expm.logm.sqrtm.linspace.plot.title.xlabel.ylabel.legend.text.grid.meshgrid.mesh.num2str.fft.ifft.arrayfun.cellfun.input.fliplr.flipud.ismember".split(".")),h=i("return.case.switch.else.elseif.end.endif.endfunction.if.otherwise.do.for.while.try.catch.classdef.properties.events.methods.global.persistent.endfor.endwhile.printf.sprintf.disp.until.continue.pkg".split("."));function a(e,n){return!e.sol()&&e.peek()==="'"?(e.next(),n.tokenize=r,"operator"):(n.tokenize=r,r(e,n))}function g(e,n){return e.match(/^.*%}/)?(n.tokenize=r,"comment"):(e.skipToEnd(),"comment")}function r(e,n){if(e.eatSpace())return null;if(e.match("%{"))return n.tokenize=g,e.skipToEnd(),"comment";if(e.match(/^[%#]/))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return e.tokenize=r,"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)||e.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(e.match(i(["nan","NaN","inf","Inf"])))return"number";var t=e.match(/^"(?:[^"]|"")*("|$)/)||e.match(/^'(?:[^']|'')*('|$)/);return t?t[1]?"string":"error":e.match(h)?"keyword":e.match(d)?"builtin":e.match(f)?"variable":e.match(o)||e.match(s)?"operator":e.match(c)||e.match(m)||e.match(l)?null:e.match(u)?(n.tokenize=a,null):(e.next(),"error")}const k={name:"octave",startState:function(){return{tokenize:r}},token:function(e,n){var t=n.tokenize(e,n);return(t==="number"||t==="variable")&&(n.tokenize=a),t},languageData:{commentTokens:{line:"%"}}};export{k as t};
import{t as o}from"./octave-ChjrzDtA.js";export{o as octave};
import{n as d}from"./init-AtRnKt23.js";var l=class extends Map{constructor(t,n=h){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let[e,r]of t)this.set(e,r)}get(t){return super.get(a(this,t))}has(t){return super.has(a(this,t))}set(t,n){return super.set(f(this,t),n)}delete(t){return super.delete(c(this,t))}},g=class extends Set{constructor(t,n=h){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let e of t)this.add(e)}has(t){return super.has(a(this,t))}add(t){return super.add(f(this,t))}delete(t){return super.delete(c(this,t))}};function a({_intern:t,_key:n},e){let r=n(e);return t.has(r)?t.get(r):e}function f({_intern:t,_key:n},e){let r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function c({_intern:t,_key:n},e){let r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function h(t){return typeof t=="object"&&t?t.valueOf():t}const o=Symbol("implicit");function p(){var t=new l,n=[],e=[],r=o;function s(u){let i=t.get(u);if(i===void 0){if(r!==o)return r;t.set(u,i=n.push(u)-1)}return e[i%e.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],t=new l;for(let i of u)t.has(i)||t.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(e=Array.from(u),s):e.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return p(n,e).unknown(r)},d.apply(s,arguments),s}export{p as n,g as r,o as t};
import{s}from"./chunk-LvLJmgfZ.js";import{u as n}from"./useEvent-DO6uJBas.js";import{t as c}from"./react-BGmjiNul.js";import{Ln as f,x as d}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as l}from"./compiler-runtime-DeeZ7FnK.js";import"./config-CIrPQIbt.js";import{t as u}from"./jsx-runtime-ZmTK25f3.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import"./Combination-CMPwuAmi.js";import{i as v,n as x,r as h}from"./floating-outline-DcxjrFFt.js";import{t as j}from"./empty-state-h8C2C6hZ.js";var b=l();c();var p=s(u(),1),g=()=>{let t=(0,b.c)(7),{items:r}=n(d),o;t[0]===r?o=t[1]:(o=h(r),t[0]=r,t[1]=o);let{activeHeaderId:m,activeOccurrences:a}=v(o);if(r.length===0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,p.jsx)(j,{title:"No outline found",description:"Add markdown headings to your notebook to create an outline.",icon:(0,p.jsx)(f,{})}),t[2]=i):i=t[2],i}let e;return t[3]!==m||t[4]!==a||t[5]!==r?(e=(0,p.jsx)(x,{items:r,activeHeaderId:m,activeOccurrences:a}),t[3]=m,t[4]=a,t[5]=r,t[6]=e):e=t[6],e};export{g as default};
function o(e){return RegExp("^(("+e.join(")|(")+"))\\b")}var h=/[\^@!\|<>#~\.\*\-\+\\/,=]/,m=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,k=/(:::)|(\.\.\.)|(=<:)|(>=:)/,i=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],s=["end"],p=o(["true","false","nil","unit"]),z=o(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),g=o(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),f=o(i),l=o(s);function a(e,t){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match("[]"))return"keyword";if(e.match(k)||e.match(m))return"operator";if(e.match(p))return"atom";var r=e.match(g);if(r)return t.doInCurrentLine?t.doInCurrentLine=!1:t.currentIndent++,r[0]=="proc"||r[0]=="fun"?t.tokenize=v:r[0]=="class"?t.tokenize=x:r[0]=="meth"&&(t.tokenize=I),"keyword";if(e.match(f)||e.match(z))return"keyword";if(e.match(l))return t.currentIndent--,"keyword";var n=e.next();if(n=='"'||n=="'")return t.tokenize=S(n),t.tokenize(e,t);if(/[~\d]/.test(n)){if(n=="~")if(/^[0-9]/.test(e.peek())){if(e.next()=="0"&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}else return null;return n=="0"&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return n=="%"?(e.skipToEnd(),"comment"):n=="/"&&e.eat("*")?(t.tokenize=d,d(e,t)):h.test(n)?"operator":(e.eatWhile(/\w/),"variable")}function x(e,t){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=a,"type")}function I(e,t){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=a,"def")}function v(e,t){return e.eatSpace()?null:!t.hasPassedFirstStage&&e.eat("{")?(t.hasPassedFirstStage=!0,"bracket"):t.hasPassedFirstStage?(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),t.hasPassedFirstStage=!1,t.tokenize=a,"def"):(t.tokenize=a,null)}function d(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=a;break}r=n=="*"}return"comment"}function S(e){return function(t,r){for(var n=!1,c,u=!1;(c=t.next())!=null;){if(c==e&&!n){u=!0;break}n=!n&&c=="\\"}return(u||!n)&&(r.tokenize=a),"string"}}function b(){var e=i.concat(s);return RegExp("[\\[\\]]|("+e.join("|")+")$")}const y={name:"oz",startState:function(){return{tokenize:a,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,t){return e.sol()&&(t.doInCurrentLine=0),t.tokenize(e,t)},indent:function(e,t,r){var n=t.replace(/^\s+|\s+$/g,"");return n.match(l)||n.match(f)||n.match(/(\[])/)?r.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.unit},languageData:{indentOnInut:b(),commentTokens:{line:"%",block:{open:"/*",close:"*/"}}}};export{y as t};
import{t as o}from"./oz-BZ0G7oQI.js";export{o as oz};
import{s as H}from"./chunk-LvLJmgfZ.js";import{d as ae,u as oe}from"./useEvent-DO6uJBas.js";import{t as le}from"./react-BGmjiNul.js";import{Zn as V}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as ie}from"./compiler-runtime-DeeZ7FnK.js";import{r as ce}from"./ai-model-dropdown-71lgLrLy.js";import{y as de}from"./utils-DXvhzCGS.js";import{j as me}from"./config-CIrPQIbt.js";import{t as xe}from"./jsx-runtime-ZmTK25f3.js";import{r as pe}from"./button-YC1gW_kJ.js";import{t as K}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{r as W}from"./requests-BsVD4CdD.js";import{_ as ue}from"./select-V5IdpNiR.js";import{t as fe}from"./chevron-right-DwagBitu.js";import{u as ge}from"./toDate-CgbKQM5E.js";import{t as R}from"./spinner-DaIKav-i.js";import{a as he}from"./input-pAun1m1X.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{t as ve}from"./use-toast-rmUWldD_.js";import"./Combination-CMPwuAmi.js";import{t as J}from"./tooltip-CEc2ajau.js";import"./popover-Gz-GJzym.js";import{t as je}from"./copy-Bv2DBpIS.js";import{i as be,n as Z,r as F,s as Q,t as ke}from"./useInstallPackage-Bdnnp5fe.js";import{n as X}from"./error-banner-DUzsIXtq.js";import{n as ye}from"./useAsyncData-C4XRy1BE.js";import{a as Ne,i as q,n as we,o as Y,r as B,t as Se}from"./table-C8uQmBAN.js";import{t as ee}from"./empty-state-h8C2C6hZ.js";var G=ie(),I=H(le(),1);function _e(t){let e=t.trim();for(let r of["pip install","pip3 install","uv add","uv pip install","poetry add","conda install","pipenv install"])if(e.toLowerCase().startsWith(r.toLowerCase()))return e.slice(r.length).trim();return e}var s=H(xe(),1),te=t=>{let e=(0,G.c)(9),{onClick:r,loading:n,children:l,className:x}=t;if(n){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)(R,{size:"small",className:"h-4 w-4 shrink-0 opacity-50"}),e[0]=c):c=e[0],c}let d;e[1]===x?d=e[2]:(d=K("px-2 h-full text-xs text-muted-foreground hover:text-foreground","invisible group-hover:visible",x),e[1]=x,e[2]=d);let a;e[3]===r?a=e[4]:(a=pe.stopPropagation(r),e[3]=r,e[4]=a);let o;return e[5]!==l||e[6]!==d||e[7]!==a?(o=(0,s.jsx)("button",{type:"button",className:d,onClick:a,children:l}),e[5]=l,e[6]=d,e[7]=a,e[8]=o):o=e[8],o},Ce=()=>{var w,S;let t=(0,G.c)(30),[e]=de(),r=e.package_management.manager,{getDependencyTree:n,getPackageList:l}=W(),[x,d]=I.useState(null),a;t[0]!==n||t[1]!==l?(a=async()=>{let[u,C]=await Promise.all([l(),n()]);return{list:u.packages,tree:C.tree}},t[0]=n,t[1]=l,t[2]=a):a=t[2];let o;t[3]===r?o=t[4]:(o=[r],t[3]=r,t[4]=o);let{data:c,error:m,refetch:j,isPending:g}=ye(a,o);if(g){let u;return t[5]===Symbol.for("react.memo_cache_sentinel")?(u=(0,s.jsx)(R,{size:"medium",centered:!0}),t[5]=u):u=t[5],u}if(m){let u;return t[6]===m?u=t[7]:(u=(0,s.jsx)(X,{error:m}),t[6]=m,t[7]=u),u}let h=c.tree!=null,i;t[8]!==h||t[9]!==x?(i=De(x,h),t[8]=h,t[9]=x,t[10]=i):i=t[10];let f=i,p=(w=c.tree)==null?void 0:w.name,P=(S=c==null?void 0:c.tree)==null?void 0:S.version,y=p==="<root>",k;t[11]!==r||t[12]!==j?(k=(0,s.jsx)(Pe,{packageManager:r,onSuccess:j}),t[11]=r,t[12]=j,t[13]=k):k=t[13];let b;t[14]!==y||t[15]!==h||t[16]!==p||t[17]!==P||t[18]!==f?(b=h&&(0,s.jsxs)("div",{className:"flex items-center justify-between px-2 py-1 border-b",children:[(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("button",{type:"button",className:K("px-2 py-1 text-xs rounded",f==="list"?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),onClick:()=>d("list"),children:"List"}),(0,s.jsx)("button",{type:"button",className:K("px-2 py-1 text-xs rounded",f==="tree"?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),onClick:()=>d("tree"),children:"Tree"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"items-center border px-2 py-0.5 text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground rounded-sm text-ellipsis block overflow-hidden max-w-fit font-medium",title:y?"sandbox":"project",children:y?"sandbox":"project"}),p&&!y&&(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[p,P&&` v${P}`]})]})]}),t[14]=y,t[15]=h,t[16]=p,t[17]=P,t[18]=f,t[19]=b):b=t[19];let v;t[20]!==c.list||t[21]!==c.tree||t[22]!==m||t[23]!==j||t[24]!==f?(v=f==="list"?(0,s.jsx)(Ee,{packages:c.list,onSuccess:j}):(0,s.jsx)($e,{tree:c.tree,error:m,onSuccess:j}),t[20]=c.list,t[21]=c.tree,t[22]=m,t[23]=j,t[24]=f,t[25]=v):v=t[25];let _;return t[26]!==k||t[27]!==b||t[28]!==v?(_=(0,s.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[k,b,v]}),t[26]=k,t[27]=b,t[28]=v,t[29]=_):_=t[29],_},Pe=t=>{let e=(0,G.c)(40),{onSuccess:r,packageManager:n}=t,[l,x]=I.useState(""),{handleClick:d}=ce(),a=oe(Q),o=ae(Q),c,m;e[0]!==a||e[1]!==o?(c=()=>{a&&(x(a),o(null))},m=[a,o],e[0]=a,e[1]=o,e[2]=c,e[3]=m):(c=e[2],m=e[3]),I.useEffect(c,m);let{loading:j,handleInstallPackages:g}=ke(),h;e[4]===r?h=e[5]:(h=()=>{r(),x("")},e[4]=r,e[5]=h);let i=h,f;e[6]!==g||e[7]!==l||e[8]!==i?(f=()=>{g([_e(l)],i)},e[6]=g,e[7]=l,e[8]=i,e[9]=f):f=e[9];let p=f,P=`Install packages with ${n}...`,y;e[10]!==j||e[11]!==d?(y=j?(0,s.jsx)(R,{size:"small",className:"mr-2 h-4 w-4 shrink-0 opacity-50"}):(0,s.jsx)(J,{content:"Change package manager",children:(0,s.jsx)(V,{onClick:()=>d("packageManagementAndData"),className:"mr-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-80 cursor-pointer"})}),e[10]=j,e[11]=d,e[12]=y):y=e[12];let k;e[13]===p?k=e[14]:(k=U=>{U.key==="Enter"&&(U.preventDefault(),p())},e[13]=p,e[14]=k);let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=U=>x(U.target.value),e[15]=b):b=e[15];let v;e[16]!==l||e[17]!==P||e[18]!==y||e[19]!==k?(v=(0,s.jsx)(he,{placeholder:P,id:be,icon:y,rootClassName:"flex-1 border-none",value:l,onKeyDown:k,onChange:b}),e[16]=l,e[17]=P,e[18]=y,e[19]=k,e[20]=v):v=e[20];let _;e[21]===Symbol.for("react.memo_cache_sentinel")?(_=(0,s.jsx)("span",{className:"font-bold tracking-wide",children:"Package name:"}),e[21]=_):_=e[21];let w,S;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=(0,s.jsxs)("div",{children:[_," A package name; this will install the latest version.",(0,s.jsx)("div",{className:"text-muted-foreground",children:"Example: httpx"})]}),S=(0,s.jsx)("span",{className:"font-bold tracking-wide",children:"Package and version:"}),e[22]=w,e[23]=S):(w=e[22],S=e[23]);let u,C;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=(0,s.jsxs)("div",{children:[S," ","A package with a specific version or version range.",(0,s.jsx)("div",{className:"text-muted-foreground",children:"Examples: httpx==0.27.0, httpx>=0.27.0"})]}),C=(0,s.jsx)("span",{className:"font-bold tracking-wide",children:"Git:"}),e[24]=u,e[25]=C):(u=e[24],C=e[25]);let E,$;e[26]===Symbol.for("react.memo_cache_sentinel")?(E=(0,s.jsxs)("div",{children:[C," A Git repository",(0,s.jsx)("div",{className:"text-muted-foreground",children:"Example: git+https://github.com/encode/httpx"})]}),$=(0,s.jsx)("span",{className:"font-bold tracking-wide",children:"URL:"}),e[26]=E,e[27]=$):(E=e[26],$=e[27]);let D,T;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=(0,s.jsxs)("div",{children:[$," A remote wheel or source distribution.",(0,s.jsx)("div",{className:"text-muted-foreground",children:"Example: https://example.com/httpx-0.27.0.tar.gz"})]}),T=(0,s.jsx)("span",{className:"font-bold tracking-wide",children:"Path:"}),e[28]=D,e[29]=T):(D=e[28],T=e[29]);let A;e[30]===Symbol.for("react.memo_cache_sentinel")?(A=(0,s.jsx)(J,{delayDuration:300,side:"left",align:"start",content:(0,s.jsxs)("div",{className:"text-sm flex flex-col w-full max-w-[360px]",children:["Packages are installed using the package manager specified in your user configuration. Depending on your package manager, you can install packages with various formats:",(0,s.jsxs)("div",{className:"flex flex-col gap-2 mt-2",children:[w,u,E,D,(0,s.jsxs)("div",{children:[T," A local wheel, source distribution, or project directory.",(0,s.jsx)("div",{className:"text-muted-foreground",children:"Example: /example/foo-0.1.0-py3-none-any.whl"})]})]})]}),children:(0,s.jsx)(ge,{className:"h-4 w-4 cursor-help text-muted-foreground hover:text-foreground bg-transparent"})}),e[30]=A):A=e[30];let L=l&&"bg-accent text-accent-foreground",N;e[31]===L?N=e[32]:(N=K("float-right px-2 m-0 h-full text-sm text-secondary-foreground ml-2",L,"disabled:cursor-not-allowed disabled:opacity-50"),e[31]=L,e[32]=N);let z=!l,M;e[33]!==p||e[34]!==N||e[35]!==z?(M=(0,s.jsx)("button",{type:"button",className:N,onClick:p,disabled:z,children:"Add"}),e[33]=p,e[34]=N,e[35]=z,e[36]=M):M=e[36];let O;return e[37]!==M||e[38]!==v?(O=(0,s.jsxs)("div",{className:"flex items-center w-full border-b",children:[v,A,M]}),e[37]=M,e[38]=v,e[39]=O):O=e[39],O},Ee=t=>{let e=(0,G.c)(9),{onSuccess:r,packages:n}=t;if(n.length===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)(ee,{title:"No packages",description:"No packages are installed in this environment.",icon:(0,s.jsx)(V,{})}),e[0]=a):a=e[0],a}let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)(Ne,{children:(0,s.jsxs)(Y,{children:[(0,s.jsx)(q,{children:"Name"}),(0,s.jsx)(q,{children:"Version"}),(0,s.jsx)(q,{})]})}),e[1]=l):l=e[1];let x;if(e[2]!==r||e[3]!==n){let a;e[5]===r?a=e[6]:(a=o=>(0,s.jsxs)(Y,{className:"group",onClick:async()=>{await je(`${o.name}==${o.version}`),ve({title:"Copied to clipboard"})},children:[(0,s.jsx)(B,{children:o.name}),(0,s.jsx)(B,{children:o.version}),(0,s.jsxs)(B,{className:"flex justify-end",children:[(0,s.jsx)(se,{packageName:o.name,onSuccess:r}),(0,s.jsx)(re,{packageName:o.name,onSuccess:r})]})]},o.name),e[5]=r,e[6]=a),x=n.map(a),e[2]=r,e[3]=n,e[4]=x}else x=e[4];let d;return e[7]===x?d=e[8]:(d=(0,s.jsxs)(Se,{className:"overflow-auto flex-1",children:[l,(0,s.jsx)(we,{children:x})]}),e[7]=x,e[8]=d),d},se=({packageName:t,onSuccess:e})=>{let[r,n]=I.useState(!1),{addPackage:l}=W();return me()?null:(0,s.jsx)(te,{onClick:async()=>{try{n(!0);let x=await l({package:t,upgrade:!0});x.success?(e(),F(t)):F(t,x.error)}finally{n(!1)}},loading:r,children:"Upgrade"})},re=({packageName:t,tags:e,onSuccess:r})=>{let[n,l]=I.useState(!1),{removePackage:x}=W();return(0,s.jsx)(te,{onClick:async()=>{try{l(!0);let d=e==null?void 0:e.some(o=>o.kind==="group"&&o.value==="dev"),a=await x({package:t,dev:d});a.success?(r(),Z(t)):Z(t,a.error)}finally{l(!1)}},loading:n,children:"Remove"})},$e=t=>{let e=(0,G.c)(18),{tree:r,error:n,onSuccess:l}=t,x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=new Set,e[0]=x):x=e[0];let[d,a]=I.useState(x),o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{a(new Set)},e[1]=o):o=e[1];let c;if(e[2]===r?c=e[3]:(c=[r],e[2]=r,e[3]=c),I.useEffect(o,c),n){let i;return e[4]===n?i=e[5]:(i=(0,s.jsx)(X,{error:n}),e[4]=n,e[5]=i),i}if(!r){let i;return e[6]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(R,{size:"medium",centered:!0}),e[6]=i):i=e[6],i}if(r.dependencies.length===0){let i;return e[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(ee,{title:"No dependencies",description:"No package dependencies found in this environment.",icon:(0,s.jsx)(V,{})}),e[7]=i):i=e[7],i}let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=i=>{a(f=>{let p=new Set(f);return p.has(i)?p.delete(i):p.add(i),p})},e[8]=m):m=e[8];let j=m,g;if(e[9]!==d||e[10]!==l||e[11]!==r.dependencies){let i;e[13]!==d||e[14]!==l?(i=(f,p)=>(0,s.jsx)("div",{className:"border-b",children:(0,s.jsx)(ne,{nodeId:`root-${p}`,node:f,level:0,isTopLevel:!0,expandedNodes:d,onToggle:j,onSuccess:l})},`${f.name}-${p}`),e[13]=d,e[14]=l,e[15]=i):i=e[15],g=r.dependencies.map(i),e[9]=d,e[10]=l,e[11]=r.dependencies,e[12]=g}else g=e[12];let h;return e[16]===g?h=e[17]:(h=(0,s.jsx)("div",{className:"flex-1 overflow-auto",children:(0,s.jsx)("div",{children:g})}),e[16]=g,e[17]=h),h},ne=t=>{let e=(0,G.c)(58),{nodeId:r,node:n,level:l,isTopLevel:x,expandedNodes:d,onToggle:a,onSuccess:o}=t,c=x===void 0?!1:x,m=n.dependencies.length>0,j;e[0]!==d||e[1]!==r?(j=d.has(r),e[0]=d,e[1]=r,e[2]=j):j=e[2];let g=j,h=c?0:16+l*16,i;e[3]!==m||e[4]!==r||e[5]!==a?(i=N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),m&&a(r))},e[3]=m,e[4]=r,e[5]=a,e[6]=i):i=e[6];let f=i,p;e[7]!==m||e[8]!==r||e[9]!==a?(p=N=>{N.stopPropagation(),m&&a(r)},e[7]=m,e[8]=r,e[9]=a,e[10]=p):p=e[10];let P=p,y=m&&"select-none",k=c?"px-2 py-0.5":"",b;e[11]!==y||e[12]!==k?(b=K("flex items-center group cursor-pointer text-sm whitespace-nowrap","hover:bg-(--slate-2) focus:bg-(--slate-2) focus:outline-hidden",y,k),e[11]=y,e[12]=k,e[13]=b):b=e[13];let v;e[14]!==h||e[15]!==c?(v=c?{}:{paddingLeft:`${h}px`},e[14]=h,e[15]=c,e[16]=v):v=e[16];let _=m?g:void 0,w;e[17]!==m||e[18]!==g?(w=m?g?(0,s.jsx)(ue,{className:"w-4 h-4 mr-2 shrink-0"}):(0,s.jsx)(fe,{className:"w-4 h-4 mr-2 shrink-0"}):(0,s.jsx)("div",{className:"w-4 mr-2 shrink-0"}),e[17]=m,e[18]=g,e[19]=w):w=e[19];let S;e[20]===n.name?S=e[21]:(S=(0,s.jsx)("span",{className:"font-medium truncate",children:n.name}),e[20]=n.name,e[21]=S);let u;e[22]===n.version?u=e[23]:(u=n.version&&(0,s.jsxs)("span",{className:"text-muted-foreground text-xs",children:["v",n.version]}),e[22]=n.version,e[23]=u);let C;e[24]!==S||e[25]!==u?(C=(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0 py-1.5",children:[S,u]}),e[24]=S,e[25]=u,e[26]=C):C=e[26];let E;e[27]===n.tags?E=e[28]:(E=n.tags.map(Te),e[27]=n.tags,e[28]=E);let $;e[29]===E?$=e[30]:($=(0,s.jsx)("div",{className:"flex items-center gap-1 ml-2",children:E}),e[29]=E,e[30]=$);let D;e[31]!==c||e[32]!==n.name||e[33]!==n.tags||e[34]!==o?(D=c&&(0,s.jsxs)("div",{className:"flex gap-1 invisible group-hover:visible",children:[(0,s.jsx)(se,{packageName:n.name,onSuccess:o}),(0,s.jsx)(re,{packageName:n.name,tags:n.tags,onSuccess:o})]}),e[31]=c,e[32]=n.name,e[33]=n.tags,e[34]=o,e[35]=D):D=e[35];let T;e[36]!==P||e[37]!==f||e[38]!==w||e[39]!==C||e[40]!==$||e[41]!==D||e[42]!==b||e[43]!==v||e[44]!==_?(T=(0,s.jsxs)("div",{className:b,style:v,onClick:P,onKeyDown:f,tabIndex:0,role:"treeitem","aria-selected":!1,"aria-expanded":_,children:[w,C,$,D]}),e[36]=P,e[37]=f,e[38]=w,e[39]=C,e[40]=$,e[41]=D,e[42]=b,e[43]=v,e[44]=_,e[45]=T):T=e[45];let A;e[46]!==d||e[47]!==m||e[48]!==g||e[49]!==l||e[50]!==n.dependencies||e[51]!==r||e[52]!==o||e[53]!==a?(A=m&&g&&(0,s.jsx)("div",{role:"group",children:n.dependencies.map((N,z)=>(0,s.jsx)(ne,{nodeId:`${r}-${z}`,node:N,level:l+1,isTopLevel:!1,expandedNodes:d,onToggle:a,onSuccess:o},`${N.name}-${z}`))}),e[46]=d,e[47]=m,e[48]=g,e[49]=l,e[50]=n.dependencies,e[51]=r,e[52]=o,e[53]=a,e[54]=A):A=e[54];let L;return e[55]!==T||e[56]!==A?(L=(0,s.jsxs)("div",{children:[T,A]}),e[55]=T,e[56]=A,e[57]=L):L=e[57],L};function De(t,e){return t==="list"?"list":e?t||"tree":"list"}function Te(t,e){return t.kind==="cycle"?(0,s.jsx)("div",{className:"items-center border px-2 py-0.5 text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground rounded-sm text-ellipsis block overflow-hidden max-w-fit font-medium border-orange-300 dark:border-orange-700 text-orange-700 dark:text-orange-300",title:"cycle",children:"cycle"},e):t.kind==="extra"?(0,s.jsx)("div",{className:"items-center border px-2 py-0.5 text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground rounded-sm text-ellipsis block overflow-hidden max-w-fit font-medium border-blue-300 dark:border-blue-700 text-blue-700 dark:text-blue-300",title:t.value,children:t.value},e):t.kind==="group"?(0,s.jsx)("div",{className:"items-center border px-2 py-0.5 text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground rounded-sm text-ellipsis block overflow-hidden max-w-fit font-medium border-green-300 dark:border-green-700 text-green-700 dark:text-green-300",title:t.value,children:t.value},e):null}export{Ce as default};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as e}from"./chunk-76Q3JFCE-CC_RB1qp.js";export{e as createPacketServices};
import{s as o}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-BGmjiNul.js";import{t as a}from"./invariant-CAG_dYON.js";var e=o(i(),1),r=(0,e.createContext)(null);const s=r.Provider;function n(){let t=(0,e.useContext)(r);return a(t!==null,"usePanelSection must be used within a PanelSectionProvider"),t}function u(){return n()==="sidebar"?"vertical":"horizontal"}export{u as n,n as r,s as t};
var KA=Object.defineProperty;var HA=(a,A,e)=>A in a?KA(a,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[A]=e;var GA=(a,A,e)=>HA(a,typeof A!="symbol"?A+"":A,e);import{s as hA}from"./chunk-LvLJmgfZ.js";import{d as _,i as BA,l as uA,u as j}from"./useEvent-DO6uJBas.js";import{t as UA}from"./react-BGmjiNul.js";import{D as VA,Dt as XA,Et as WA,F as JA,L as qA,N as zA,Ot as $A,ar as Ae,l as ee,m as mA,oi as ae,on as te,tn as Ge,ui as oe,ur as YA,w as se,y as re,yn as ne}from"./cells-BpZ7g6ok.js";import{t as B}from"./compiler-runtime-DeeZ7FnK.js";import{n as ke}from"./assertNever-CBU83Y6o.js";import{$ as Re,B as ie,F as le,H as Ze,M as ce,P as ge,Q as de,S as he,V as Be,W as S,X as ue,ct as me,dt as Ye,it as fA,nt as fe,ot as pe,q as pA,rt as xe,tt as we,ut as De,z as ve}from"./utilities.esm-CIPARd6-.js";import{a as xA,d as D}from"./hotkeys-BHHWjLlp.js";import{C as Ee,b as ye}from"./utils-DXvhzCGS.js";import{r as oA}from"./constants-B6Cb__3x.js";import{A as x,_ as Ce,j as sA,k as F,o as be,u as Me,w as Ne}from"./config-CIrPQIbt.js";import{a as _e,d as je}from"./switch-8sn_4qbh.js";import{n as Se}from"./ErrorBoundary-ChCiwl15.js";import{t as Fe}from"./useEventListener-DIUKKfEy.js";import{t as Qe}from"./jsx-runtime-ZmTK25f3.js";import{t as rA}from"./button-YC1gW_kJ.js";import{n as Pe,t as f}from"./cn-BKtXLv3a.js";import{Y as wA}from"./JsonOutput-CknFTI_u.js";import{t as Le}from"./createReducer-Dnna-AUO.js";import{t as Oe}from"./requests-BsVD4CdD.js";import{t as W}from"./createLucideIcon-CnW3RofX.js";import{a as Te,f as DA,i as vA,n as Ie,o as Ke,s as He}from"./layout-B1RE_FQ4.js";import{m as Ue}from"./download-BhCZMKuQ.js";import{c as Ve}from"./maps-t9yNKYA8.js";import{c as Xe}from"./markdown-renderer-DhMlG2dP.js";import{n as We}from"./spinner-DaIKav-i.js";import{n as Je}from"./readonly-python-code-DyP9LVLc.js";import{t as qe}from"./uuid-DercMavo.js";import{t as nA}from"./use-toast-rmUWldD_.js";import{s as ze,u as $e}from"./Combination-CMPwuAmi.js";import{t as kA}from"./tooltip-CEc2ajau.js";import{a as Aa,r as EA,t as ea}from"./mode-DX8pdI-l.js";import{_ as aa,f as ta,g as Ga,h as yA,m as CA,p as bA,v as MA,y as oa}from"./alert-dialog-DwQffb13.js";import{r as NA}from"./share-CbPtIlnM.js";import{r as _A}from"./errors-2SszdW9t.js";import{t as sa}from"./RenderHTML-CQZqVk1Z.js";import{i as ra}from"./cell-link-Bw5bzt4a.js";import{t as na}from"./error-banner-DUzsIXtq.js";import{n as ka}from"./useAsyncData-C4XRy1BE.js";import{t as Ra}from"./requests-BEWfBENt.js";import{t as ia}from"./ws-BApgRfsy.js";import{t as la}from"./request-registry-CB8fU98Q.js";import{n as Za}from"./types-z6Sk3JCV.js";import{n as ca}from"./runs-bjsj1D88.js";var ga=W("hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]),jA=W("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]),da=W("square-arrow-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}]]),ha=W("unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]),Ba=B(),r=hA(Qe(),1);const ua=a=>{let A=(0,Ba.c)(10),{reason:e,canTakeover:t}=a,o=t===void 0?!1:t,G=ma;if(o){let n;A[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)("div",{className:"flex justify-between",children:(0,r.jsx)("span",{className:"font-bold text-xl flex items-center mb-2",children:"Notebook already connected"})}),A[0]=n):n=A[0];let k;A[1]===e?k=A[2]:(k=(0,r.jsx)("span",{children:e}),A[1]=e,A[2]=k);let R;A[3]===o?R=A[4]:(R=o&&(0,r.jsxs)(rA,{onClick:G,variant:"outline","data-testid":"takeover-button",className:"shrink-0",children:[(0,r.jsx)(da,{className:"w-4 h-4 mr-2"}),"Take over session"]}),A[3]=o,A[4]=R);let i;return A[5]!==k||A[6]!==R?(i=(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsxs)(na,{kind:"info",className:"mt-10 flex flex-col rounded p-3 max-w-[800px] mx-4",children:[n,(0,r.jsxs)("div",{className:"flex justify-between items-end text-base gap-20",children:[k,R]})]})}),A[5]=k,A[6]=R,A[7]=i):i=A[7],i}let s;return A[8]===e?s=A[9]:(s=(0,r.jsx)("div",{className:"font-mono text-center text-base text-(--red-11)",children:(0,r.jsx)("p",{children:e})}),A[8]=e,A[9]=s),s};async function ma(){try{let a=new URL(window.location.href).searchParams;await _e.post(`/kernel/takeover?${a.toString()}`,{}),NA()}catch(a){nA({title:"Failed to take over session",description:_A(a),variant:"danger"})}}var Ya=B(),u=hA(UA(),1);const fa=a=>{let A=(0,Ya.c)(8),{connection:e,className:t,children:o}=a,G;A[0]!==e.canTakeover||A[1]!==e.reason||A[2]!==e.state?(G=e.state===x.CLOSED&&(0,r.jsx)(ua,{reason:e.reason,canTakeover:e.canTakeover}),A[0]=e.canTakeover,A[1]=e.reason,A[2]=e.state,A[3]=G):G=A[3];let s;return A[4]!==o||A[5]!==t||A[6]!==G?(s=(0,r.jsxs)("div",{className:t,children:[o,G]}),A[4]=o,A[5]=t,A[6]=G,A[7]=s):s=A[7],s};var pa=B();const xa=a=>{let A=(0,pa.c)(10),{title:e}=a,[t,o]=(0,u.useState)(e),[G,s]=(0,u.useState)(!0),n,k;A[0]!==t||A[1]!==e?(n=()=>{if(e!==t){s(!1);let g=setTimeout(()=>{o(e),s(!0)},300);return()=>clearTimeout(g)}},k=[e,t],A[0]=t,A[1]=e,A[2]=n,A[3]=k):(n=A[2],k=A[3]),(0,u.useEffect)(n,k);let R;A[4]===Symbol.for("react.memo_cache_sentinel")?(R=(0,r.jsx)(We,{className:"size-20 animate-spin text-primary","data-testid":"large-spinner",strokeWidth:1}),A[4]=R):R=A[4];let i=G?"opacity-100":"opacity-0",Z;A[5]===i?Z=A[6]:(Z=f("mt-2 text-muted-foreground font-semibold text-lg transition-opacity duration-300",i),A[5]=i,A[6]=Z);let c;return A[7]!==t||A[8]!==Z?(c=(0,r.jsxs)("div",{className:"flex flex-col h-full flex-1 items-center justify-center p-4",children:[R,(0,r.jsx)("div",{className:Z,children:t})]}),A[7]=t,A[8]=Z,A[9]=c):c=A[9],c};var RA=B();const wa=a=>{let A=(0,RA.c)(2),{children:e}=a;if(!sA())return e;let t;return A[0]===e?t=A[1]:(t=(0,r.jsx)(Da,{children:e}),A[0]=e,A[1]=t),t};var Da=a=>{let A=(0,RA.c)(3),{children:e}=a,t;A[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],A[0]=t):t=A[0];let{isPending:o,error:G}=ka(Ea,t),s=j(we);if(o){let n;return A[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)(SA,{}),A[1]=n):n=A[1],n}if(!s&&ea()==="read"&&va()){let n;return A[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)(SA,{}),A[2]=n):n=A[2],n}if(G)throw G;return e};function va(){return Me(oA.showCode,"false")||!BA.get(je)}const SA=a=>{let A=(0,RA.c)(2),e=j(fe),t;return A[0]===e?t=A[1]:(t=(0,r.jsx)(xa,{title:e}),A[0]=e,A[1]=t),t};async function Ea(){return await de.INSTANCE.initialized.promise,!0}var ya={idle:"./favicon.ico",success:"data:image/x-icon;base64,AAABAAEAMDAAAAEACACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAAAkAAAAAAAAAAAAAAAEAAAABAAAAAAAAXXQAAFd3AwBWeAQAVngEAFd4AwBXeAQAVnkEAFh3AwBXdwQAVXcGAFd4BQBXeAQAWHgEAFd6AwBXeAMAVnkEAFZ5AwBXdwQAV3cFAFd4BABYeAQAV3gEAFh4BABXeAQA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYYGAYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcYGBgYGBgYGBgYGBgYGAcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGBgYGBgYGBgYGBgYGBgYGBgYCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAsYGBgYGBgYDA0OChkZGRkKDg0MGBgYGBgYGAsAAAAAAAAAAAAAAAAAAAAAAAAAAxgYGBgYGA8QGRkZGRkZGRkZGRkZEA8YGBgYGBgDAAAAAAAAAAAAAAAAAAAAAAARGBgYGBgSChkZGRkZGRkZGRkZGRkZGRkKEhgYGBgYEQAAAAAAAAAAAAAAAAAAAAMYGBgYGBMZGRkZGRkZGRkZGRkZGRkZGRkZGRMYGBgYGAMAAAAAAAAAAAAAAAAACxgYGBgUEBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkQFBgYGBgLAAAAAAAAAAAAAAAKGBgYGBQKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChQYGBgYCgAAAAAAAAAAAAAEGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYBAAAAAAAAAAAAAgYGBgYExkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkTGBgYGAgAAAAAAAAAAAkYGBgSGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZEhgYGAkAAAAAAAAAAhgYGBgKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChgYGBgCAAAAAAAABxgYGA8ZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGQ8YGBgHAAAAAAABGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYAQAAAAACGBgYDBkZGRkZGRkZGRkZGRkXFhYVGRkZGRkZGRkZGRkZGRkZGRkMGBgYAgAAAAADGBgYDRkZGRkZGRkZGRkZGRcYGBgYFxkZGRkZGRkZGRkZGRkZGRkNGBgYAwAAAAAEGBgYDhkZGRkZGRkZGRkZFxgYGBgYGBcZGRkZGRkZGRkZGRkZGRkOGBgYBAAAAAAFGBgYChkZGRkZGRkZGRkXGBgYGBgYGBgXGRkZGRkZGRkZGRkZGRkKGBgYBQAAAAAGGBgYGRkZGRkZGRkZGRUYGBgYGBgYGBgYFxkZGRkZGRkZGRkZGRkZGBgYBgAAAAAYGBgYGRkZGRkZGRkZGRYYGBgYFxcYGBgYGBcZGRkZGRkZGRkZGRkZGBgYGAAAAAAYGBgYGRkZGRkZGRkZGRYYGBgXGRkXGBgYGBgXGRkZGRkZGRkZGRkZGBgYGAAAAAAGGBgYGRkZGRkZGRkZGRUWFhcZGRkZFxgYGBgYFxkZGRkZGRkZGRkZGBgYBgAAAAAFGBgYChkZGRkZGRkZGRkZGRkZGRkZGRcYGBgYGBcZGRkZGRkZGRkKGBgYBQAAAAAEGBgYDhkZGRkZGRkZGRkZGRkZGRkZGRkXGBgYGBYZGRkZGRkZGRkOGBgYBAAAAAADGBgYDRkZGRkZGRkZGRkZGRkZGRkZGRkZFxgYGBYZGRkZGRkZGRkNGBgYAwAAAAACGBgYDBkZGRkZGRkZGRkZGRkZGRkZGRkZGRUWFhUZGRkZGRkZGRkMGBgYAgAAAAABGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYAQAAAAAABxgYGA8ZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGQ8YGBgHAAAAAAAAAhgYGBgKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChgYGBgCAAAAAAAAAAkYGBgSGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZEhgYGAkAAAAAAAAAAAgYGBgYExkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkTGBgYGAgAAAAAAAAAAAAEGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYBAAAAAAAAAAAAAAKGBgYGBQKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChQYGBgYCgAAAAAAAAAAAAAACxgYGBgUEBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkQFBgYGBgLAAAAAAAAAAAAAAAAAAMYGBgYGBMZGRkZGRkZGRkZGRkZGRkZGRkZGRMYGBgYGAMAAAAAAAAAAAAAAAAAAAARGBgYGBgSChkZGRkZGRkZGRkZGRkZGRkKEhgYGBgYEQAAAAAAAAAAAAAAAAAAAAAAAxgYGBgYGA8QGRkZGRkZGRkZGRkZEA8YGBgYGBgDAAAAAAAAAAAAAAAAAAAAAAAAAAsYGBgYGBgYDA0OChkZGRkKDg0MGBgYGBgYGAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGBgYGBgYGBgYGBgYGBgYGBgYCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcYGBgYGBgYGBgYGBgYGAcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYYGAYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP//gAH//wAA//4AAH//AAD/+AAAH/8AAP/gAAAH/wAA/8AAAAP/AAD/gAAAAf8AAP8AAAAA/wAA/gAAAAB/AAD8AAAAAD8AAPgAAAAAHwAA+AAAAAAfAADwAAAAAA8AAPAAAAAADwAA4AAAAAAHAADgAAAAAAcAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADgAAAAAAcAAOAAAAAABwAA8AAAAAAPAADwAAAAAA8AAPgAAAAAHwAA+AAAAAAfAAD8AAAAAD8AAP4AAAAAfwAA/wAAAAD/AAD/gAAAAf8AAP/AAAAD/wAA/+AAAAf/AAD/+AAAH/8AAP/+AAB//wAA//+AAf//AAD///////8AAP///////wAA",running:"data:image/x-icon;base64,AAABAAEAMDAAAAEACACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAAAkAAAAAAAAAAAAAAAEAAAABAAAAAAAA0YsAAMWEAwDHgwIAx4QBAMeEAgDGhAIAyIUBAMaFAwDGhAIAxoIAAMaFAgDHhAIAx4QCAMiFAwDHhAIAx4YAAMaFAgDHhQEAxoMCAMeEAgDHgwQAx4QDAMeDAgDHhAIA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYYGAYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcYGBgYGBgYGBgYGBgYGAcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGBgYGBgYGBgYGBgYGBgYGBgYCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAsYGBgYGBgYDA0OChkZGRkKDg0MGBgYGBgYGAsAAAAAAAAAAAAAAAAAAAAAAAAAAxgYGBgYGA8QGRkZGRkZGRkZGRkZEA8YGBgYGBgDAAAAAAAAAAAAAAAAAAAAAAARGBgYGBgSChkZGRkZGRkZGRkZGRkZGRkKEhgYGBgYEQAAAAAAAAAAAAAAAAAAAAMYGBgYGBMZGRkZGRkZGRkZGRkZGRkZGRkZGRMYGBgYGAMAAAAAAAAAAAAAAAAACxgYGBgUEBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkQFBgYGBgLAAAAAAAAAAAAAAAKGBgYGBQKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChQYGBgYCgAAAAAAAAAAAAAEGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYBAAAAAAAAAAAAAgYGBgYExkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkTGBgYGAgAAAAAAAAAAAkYGBgSGRkZGRkZGRkZFRgWFxkZGRkZGRkZGRkZGRkZGRkZEhgYGAkAAAAAAAAAAhgYGBgKGRkZGRkZGRkZFhgYGBYVGRkZGRkZGRkZGRkZGRkZChgYGBgCAAAAAAAABxgYGA8ZGRkZGRkZGRkZGBgYGBgYFxkZGRkZGRkZGRkZGRkZGQ8YGBgHAAAAAAABGBgYGBAZGRkZGRkZGRkZGBgYGBgYGBYVGRkZGRkZGRkZGRkZGRAYGBgYAQAAAAACGBgYDBkZGRkZGRkZGRkZGBgYGBgYGBgYFxkZGRkZGRkZGRkZGRkMGBgYAgAAAAADGBgYDRkZGRkZGRkZGRkZGBgYGBgYGBgYGBYVGRkZGRkZGRkZGRkNGBgYAwAAAAAEGBgYDhkZGRkZGRkZGRkZGBgYGBUWGBgYGBgYFxkZGRkZGRkZGRkOGBgYBAAAAAAFGBgYChkZGRkZGRkZGRkZGBgYGBkZFxgYGBgYGBYVGRkZGRkZGRkKGBgYBQAAAAAGGBgYGRkZGRkZGRkZGRkZGBgYGBkZGRUWGBgYGBgYFxkZGRkZGRkZGBgYBgAAAAAYGBgYGRkZGRkZGRkZGRkZGBgYGBkZGRkZFxgYGBgYFxkZGRkZGRkZGBgYGAAAAAAYGBgYGRkZGRkZGRkZGRkZGBgYGBkZGRkZFxgYGBgYFhkZGRkZGRkZGBgYGAAAAAAGGBgYGRkZGRkZGRkZGRkZGBgYGBkZGRkXGBgYGBgYFRkZGRkZGRkZGBgYBgAAAAAFGBgYChkZGRkZGRkZGRkZGBgYGBkZFxgYGBgYGBcZGRkZGRkZGRkKGBgYBQAAAAAEGBgYDhkZGRkZGRkZGRkZGBgYGBkXGBgYGBgYFxkZGRkZGRkZGRkOGBgYBAAAAAADGBgYDRkZGRkZGRkZGRkZGBgYGBgYGBgYGBcZGRkZGRkZGRkZGRkNGBgYAwAAAAACGBgYDBkZGRkZGRkZGRkZGBgYGBgYGBgYFxkZGRkZGRkZGRkZGRkMGBgYAgAAAAABGBgYGBAZGRkZGRkZGRkZGBgYGBgYGBcZGRkZGRkZGRkZGRkZGRAYGBgYAQAAAAAABxgYGA8ZGRkZGRkZGRkZGBgYGBgYFxkZGRkZGRkZGRkZGRkZGQ8YGBgHAAAAAAAAAhgYGBgKGRkZGRkZGRkZFhgYGBcZGRkZGRkZGRkZGRkZGRkZChgYGBgCAAAAAAAAAAkYGBgSGRkZGRkZGRkZFRYWFxkZGRkZGRkZGRkZGRkZGRkZEhgYGAkAAAAAAAAAAAgYGBgYExkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkTGBgYGAgAAAAAAAAAAAAEGBgYGBAZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRAYGBgYBAAAAAAAAAAAAAAKGBgYGBQKGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZChQYGBgYCgAAAAAAAAAAAAAACxgYGBgUEBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkQFBgYGBgLAAAAAAAAAAAAAAAAAAMYGBgYGBMZGRkZGRkZGRkZGRkZGRkZGRkZGRMYGBgYGAMAAAAAAAAAAAAAAAAAAAARGBgYGBgSChkZGRkZGRkZGRkZGRkZGRkKEhgYGBgYEQAAAAAAAAAAAAAAAAAAAAAAAxgYGBgYGA8QGRkZGRkZGRkZGRkZEA8YGBgYGBgDAAAAAAAAAAAAAAAAAAAAAAAAAAsYGBgYGBgYDA0OChkZGRkKDg0MGBgYGBgYGAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGBgYGBgYGBgYGBgYGBgYGBgYCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcYGBgYGBgYGBgYGBgYGAcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYYGAYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP//gAH//wAA//4AAH//AAD/+AAAH/8AAP/gAAAH/wAA/8AAAAP/AAD/gAAAAf8AAP8AAAAA/wAA/gAAAAB/AAD8AAAAAD8AAPgAAAAAHwAA+AAAAAAfAADwAAAAAA8AAPAAAAAADwAA4AAAAAAHAADgAAAAAAcAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADgAAAAAAcAAOAAAAAABwAA8AAAAAAPAADwAAAAAA8AAPgAAAAAHwAA+AAAAAAfAAD8AAAAAD8AAP4AAAAAfwAA/wAAAAD/AAD/gAAAAf8AAP/AAAAD/wAA/+AAAAf/AAD/+AAAH/8AAP/+AAB//wAA//+AAf//AAD///////8AAP///////wAA",error:"data:image/x-icon;base64,AAABAAEAMDAAAAEACACoDgAAFgAAACgAAAAwAAAAYAAAAAEACAAAAAAAAAkAAAAAAAAAAAAAAAEAAAABAAAAAAAALi7oACcn2wAlJdsAJibcACYm3AAmJtsAJyfdACUl3QAmJtsAKCjdACUl3AAmJtwAJyfcACYm3AAoKNcAJibcACcn3AAmJt0AJibcACUl3AAmJtwAKCjbACcn3AAmJtsAJibcAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYZGQYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcZGRkZGRkZGRkZGRkZGQcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGRkZGRkZGRkZGRkZGRkZGRkZCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAsZGRkZGRkZDA0ODxoaGhoPDg0MGRkZGRkZGQsAAAAAAAAAAAAAAAAAAAAAAAAAAxkZGRkZGRARGhoaGhoaGhoaGhoaERAZGRkZGRkDAAAAAAAAAAAAAAAAAAAAAAASGRkZGRkTDxoaGhoaGhoaGhoaGhoaGhoPExkZGRkZEgAAAAAAAAAAAAAAAAAAAAMZGRkZGRQaGhoaGhoaGhoaGhoaGhoaGhoaGhQZGRkZGQMAAAAAAAAAAAAAAAAACxkZGRkVERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoRFRkZGRkLAAAAAAAAAAAAAAAKGRkZGRUPGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaDxUZGRkZCgAAAAAAAAAAAAAEGRkZGREaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhEZGRkZBAAAAAAAAAAAAAgZGRkZFBoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoUGRkZGQgAAAAAAAAAAAkZGRkTGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaExkZGQkAAAAAAAAAAhkZGRkPGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaDxkZGRkCAAAAAAAABxkZGRAaGhoaGhoaGhYXFxYaGhoaGhoaGhgXFxYaGhoaGhoaGhAZGRkHAAAAAAABGRkZGREaGhoaGhoaGhcZGRkYGhoaGhoaGBkZGRcaGhoaGhoaGhEZGRkZAQAAAAACGRkZDBoaGhoaGhoaGhcZGRkZGBoaGhoYGRkZGRcaGhoaGhoaGhoMGRkZAgAAAAADGRkZDRoaGhoaGhoaGhgZGRkZGRgaGhgZGRkZGRYaGhoaGhoaGhoNGRkZAwAAAAAEGRkZDhoaGhoaGhoaGhoYGRkZGRkYGBkZGRkZGBoaGhoaGhoaGhoOGRkZBAAAAAAFGRkZDxoaGhoaGhoaGhoaGBkZGRkZGRkZGRkYGhoaGhoaGhoaGhoPGRkZBQAAAAAGGRkZGhoaGhoaGhoaGhoaGhgZGRkZGRkZGRgaGhoaGhoaGhoaGhoaGRkZBgAAAAAZGRkZGhoaGhoaGhoaGhoaGhoYGRkZGRkZGBoaGhoaGhoaGhoaGhoaGRkZGQAAAAAZGRkZGhoaGhoaGhoaGhoaGhoYGRkZGRkZGBoaGhoaGhoaGhoaGhoaGRkZGQAAAAAGGRkZGhoaGhoaGhoaGhoaGhgZGRkZGRkZGRgaGhoaGhoaGhoaGhoaGRkZBgAAAAAFGRkZDxoaGhoaGhoaGhoaGBkZGRkZGRkZGRkYGhoaGhoaGhoaGhoPGRkZBQAAAAAEGRkZDhoaGhoaGhoaGhoYGRkZGRkYGBkZGRkZGBoaGhoaGhoaGhoOGRkZBAAAAAADGRkZDRoaGhoaGhoaGhYZGRkZGRgaGhgZGRkZGRgaGhoaGhoaGhoNGRkZAwAAAAACGRkZDBoaGhoaGhoaGhcZGRkZGBoaGhoYGRkZGRcaGhoaGhoaGhoMGRkZAgAAAAABGRkZGREaGhoaGhoaGhcZGRkYGhoaGhoaGBkZGRcaGhoaGhoaGhEZGRkZAQAAAAAABxkZGRAaGhoaGhoaGhYXFxgaGhoaGhoaGhYXFxYaGhoaGhoaGhAZGRkHAAAAAAAAAhkZGRkPGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaDxkZGRkCAAAAAAAAAAkZGRkTGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaExkZGQkAAAAAAAAAAAgZGRkZFBoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoUGRkZGQgAAAAAAAAAAAAEGRkZGREaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhEZGRkZBAAAAAAAAAAAAAAKGRkZGRUPGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaDxUZGRkZCgAAAAAAAAAAAAAACxkZGRkVERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoRFRkZGRkLAAAAAAAAAAAAAAAAAAMZGRkZGRQaGhoaGhoaGhoaGhoaGhoaGhoaGhQZGRkZGQMAAAAAAAAAAAAAAAAAAAASGRkZGRkTDxoaGhoaGhoaGhoaGhoaGhoPExkZGRkZEgAAAAAAAAAAAAAAAAAAAAAAAxkZGRkZGRARGhoaGhoaGhoaGhoaERAZGRkZGRkDAAAAAAAAAAAAAAAAAAAAAAAAAAsZGRkZGRkZDA0ODxoaGhoPDg0MGRkZGRkZGQsAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkECgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgJGRkZGRkZGRkZGRkZGRkZGRkZCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgcZGRkZGRkZGRkZGRkZGQcCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMEBQYZGQYFBAMCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP//gAH//wAA//4AAH//AAD/+AAAH/8AAP/gAAAH/wAA/8AAAAP/AAD/gAAAAf8AAP8AAAAA/wAA/gAAAAB/AAD8AAAAAD8AAPgAAAAAHwAA+AAAAAAfAADwAAAAAA8AAPAAAAAADwAA4AAAAAAHAADgAAAAAAcAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADAAAAAAAMAAMAAAAAAAwAAwAAAAAADAADgAAAAAAcAAOAAAAAABwAA8AAAAAAPAADwAAAAAA8AAPgAAAAAHwAA+AAAAAAfAAD8AAAAAD8AAP4AAAAAfwAA/wAAAAD/AAD/gAAAAf8AAP/AAAAD/wAA/+AAAAf/AAD/+AAAH/8AAP/+AAB//wAA//+AAf//AAD///////8AAP///////wAA"};async function Q(a){return ya[a]}function Ca(a){if(document.visibilityState==="visible")return;let A=async()=>{a===0?new Notification("Execution completed",{body:"Your notebook run completed successfully.",icon:await Q("success")}):new Notification("Execution failed",{body:`Your notebook run encountered ${a} error(s).`,icon:await Q("error")})};!("Notification"in window)||Notification.permission==="denied"||(Notification.permission==="granted"?A():Notification.permission==="default"&&Notification.requestPermission().then(e=>{e==="granted"&&A()}))}const ba=a=>{let{isRunning:A}=a,e=VA(),t=document.querySelector("link[rel~='icon']");t||(t=document.createElement("link"),t.rel="icon",document.getElementsByTagName("head")[0].append(t)),(0,u.useEffect)(()=>{!A&&t.href.includes("favicon")||(async()=>{let G;if(G=A?"running":e.length===0?"success":"error",t.href=await Q(G),!document.hasFocus())return;let s=setTimeout(async()=>{t.href=await Q("idle")},3e3);return()=>clearTimeout(s)})()},[A,e,t]);let o=he(A)??A;return(0,u.useEffect)(()=>{o&&!A&&Ca(e.length)},[e,o,A]),Fe(window,"focus",async G=>{A||(t.href=await Q("idle"))}),null};function Ma(){let{cellRuntime:a}=BA.get(re),A=xA.entries(a).find(([e,t])=>t.status==="running");A&&ra(A[0],"focus")}var P=B();const Na=a=>{let A=(0,P.c)(22),{connection:e,isRunning:t}=a,{mode:o}=j(Aa),G=e.state===x.CLOSED,s=e.state===x.OPEN,n;A[0]!==e.canTakeover||A[1]!==G?(n=G&&!e.canTakeover&&(0,r.jsx)(Fa,{}),A[0]=e.canTakeover,A[1]=G,A[2]=n):n=A[2];let k=o==="read"?"fixed":"absolute",R;A[3]===k?R=A[4]:(R=f("z-50 top-4 left-4",k),A[3]=k,A[4]=R);let i;A[5]!==s||A[6]!==t?(i=s&&t&&(0,r.jsx)(Sa,{}),A[5]=s,A[6]=t,A[7]=i):i=A[7];let Z;A[8]!==e.canTakeover||A[9]!==G?(Z=G&&!e.canTakeover&&(0,r.jsx)(_a,{}),A[8]=e.canTakeover,A[9]=G,A[10]=Z):Z=A[10];let c;A[11]!==e.canTakeover||A[12]!==G?(c=G&&e.canTakeover&&(0,r.jsx)(ja,{}),A[11]=e.canTakeover,A[12]=G,A[13]=c):c=A[13];let g;A[14]!==R||A[15]!==i||A[16]!==Z||A[17]!==c?(g=(0,r.jsxs)("div",{className:R,children:[i,Z,c]}),A[14]=R,A[15]=i,A[16]=Z,A[17]=c,A[18]=g):g=A[18];let d;return A[19]!==n||A[20]!==g?(d=(0,r.jsxs)(r.Fragment,{children:[n,g]}),A[19]=n,A[20]=g,A[21]=d):d=A[21],d};var iA="print:hidden pointer-events-auto hover:cursor-pointer",_a=()=>{let a=(0,P.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(kA,{content:"App disconnected",children:(0,r.jsx)("div",{className:iA,children:(0,r.jsx)(ha,{className:"w-[25px] h-[25px] text-(--red-11)"})})}),a[0]=A):A=a[0],A},ja=()=>{let a=(0,P.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(kA,{content:"Notebook locked",children:(0,r.jsx)("div",{className:iA,children:(0,r.jsx)(Je,{className:"w-[25px] h-[25px] text-(--blue-11)"})})}),a[0]=A):A=a[0],A},Sa=()=>{let a=(0,P.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(kA,{content:"Jump to running cell",side:"right",children:(0,r.jsx)("div",{className:iA,"data-testid":"loading-indicator",onClick:Ma,children:(0,r.jsx)(ga,{className:"running-app-icon",size:30,strokeWidth:1})})}),a[0]=A):A=a[0],A},Fa=()=>{let a=(0,P.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"noise"}),(0,r.jsx)("div",{className:"disconnected-gradient"})]}),a[0]=A):A=a[0],A},C=B(),Qa=aa,Pa=oa,La=ze(Ga),FA=u.forwardRef((a,A)=>{let e=(0,C.c)(9),t,o;e[0]===a?(t=e[1],o=e[2]):({className:t,...o}=a,e[0]=a,e[1]=t,e[2]=o);let G;e[3]===t?G=e[4]:(G=f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),e[3]=t,e[4]=G);let s;return e[5]!==o||e[6]!==A||e[7]!==G?(s=(0,r.jsx)(yA,{className:G,...o,ref:A}),e[5]=o,e[6]=A,e[7]=G,e[8]=s):s=e[8],s});FA.displayName=yA.displayName;var Oa=Pe("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),QA=u.forwardRef((a,A)=>{let e=(0,C.c)(15),t,o,G,s;e[0]===a?(t=e[1],o=e[2],G=e[3],s=e[4]):({side:s,className:o,children:t,...G}=a,e[0]=a,e[1]=t,e[2]=o,e[3]=G,e[4]=s);let n=s===void 0?"right":s,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=(0,r.jsx)(FA,{}),e[5]=k):k=e[5];let R;e[6]!==o||e[7]!==n?(R=f(Oa({side:n}),o),e[6]=o,e[7]=n,e[8]=R):R=e[8];let i;e[9]===Symbol.for("react.memo_cache_sentinel")?(i=(0,r.jsxs)(ta,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,r.jsx)(Ve,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]}),e[9]=i):i=e[9];let Z;return e[10]!==t||e[11]!==G||e[12]!==A||e[13]!==R?(Z=(0,r.jsx)(La,{children:(0,r.jsxs)($e,{children:[k,(0,r.jsxs)(bA,{ref:A,className:R,...G,children:[t,i]})]})}),e[10]=t,e[11]=G,e[12]=A,e[13]=R,e[14]=Z):Z=e[14],Z});QA.displayName=bA.displayName;var Ta=a=>{let A=(0,C.c)(8),e,t;A[0]===a?(e=A[1],t=A[2]):({className:e,...t}=a,A[0]=a,A[1]=e,A[2]=t);let o;A[3]===e?o=A[4]:(o=f("flex flex-col space-y-2 text-center sm:text-left",e),A[3]=e,A[4]=o);let G;return A[5]!==t||A[6]!==o?(G=(0,r.jsx)("div",{className:o,...t}),A[5]=t,A[6]=o,A[7]=G):G=A[7],G};Ta.displayName="SheetHeader";var Ia=a=>{let A=(0,C.c)(8),e,t;A[0]===a?(e=A[1],t=A[2]):({className:e,...t}=a,A[0]=a,A[1]=e,A[2]=t);let o;A[3]===e?o=A[4]:(o=f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),A[3]=e,A[4]=o);let G;return A[5]!==t||A[6]!==o?(G=(0,r.jsx)("div",{className:o,...t}),A[5]=t,A[6]=o,A[7]=G):G=A[7],G};Ia.displayName="SheetFooter";var Ka=u.forwardRef((a,A)=>{let e=(0,C.c)(9),t,o;e[0]===a?(t=e[1],o=e[2]):({className:t,...o}=a,e[0]=a,e[1]=t,e[2]=o);let G;e[3]===t?G=e[4]:(G=f("text-lg font-semibold text-foreground",t),e[3]=t,e[4]=G);let s;return e[5]!==o||e[6]!==A||e[7]!==G?(s=(0,r.jsx)(MA,{ref:A,className:G,...o}),e[5]=o,e[6]=A,e[7]=G,e[8]=s):s=e[8],s});Ka.displayName=MA.displayName;var Ha=u.forwardRef((a,A)=>{let e=(0,C.c)(9),t,o;e[0]===a?(t=e[1],o=e[2]):({className:t,...o}=a,e[0]=a,e[1]=t,e[2]=o);let G;e[3]===t?G=e[4]:(G=f("text-sm text-muted-foreground",t),e[3]=t,e[4]=G);let s;return e[5]!==o||e[6]!==A||e[7]!==G?(s=(0,r.jsx)(CA,{ref:A,className:G,...o}),e[5]=o,e[6]=A,e[7]=G,e[8]=s):s=e[8],s});Ha.displayName=CA.displayName;var Ua=B();const lA=(0,u.memo)(()=>{let a=(0,Ua.c)(1),A;return a[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,r.jsx)(De,{name:fA.SIDEBAR}),a[0]=A):A=a[0],A});lA.displayName="SidebarSlot";var Va=B();const Xa=a=>{let A=(0,Va.c)(6),{openWidth:e}=a,t;A[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)(Pa,{className:"lg:hidden",asChild:!0,children:(0,r.jsx)(rA,{variant:"ghost",className:"bg-background",children:(0,r.jsx)(jA,{className:"w-5 h-5"})})}),A[0]=t):t=A[0];let o;A[1]===e?o=A[2]:(o={maxWidth:e},A[1]=e,A[2]=o);let G;A[3]===Symbol.for("react.memo_cache_sentinel")?(G=(0,r.jsx)(lA,{}),A[3]=G):G=A[3];let s;return A[4]===o?s=A[5]:(s=(0,r.jsxs)(Qa,{children:[t,(0,r.jsx)(QA,{className:"w-full px-3 h-full flex flex-col overflow-y-auto",style:o,side:"left",children:G})]}),A[4]=o,A[5]=s),s};var Wa=B();const Ja=a=>{let A=(0,Wa.c)(7),{isOpen:e,toggle:t}=a,o=e?"rotate-0":"rotate-180",G;A[0]===o?G=A[1]:(G=f("h-5 w-5 transition-transform ease-in-out duration-700",o),A[0]=o,A[1]=G);let s;A[2]===G?s=A[3]:(s=(0,r.jsx)(Ue,{className:G}),A[2]=G,A[3]=s);let n;return A[4]!==s||A[5]!==t?(n=(0,r.jsx)("div",{className:"invisible lg:visible absolute top-[12px] right-[16px] z-20",children:(0,r.jsx)(rA,{onClick:t,className:"w-10 h-8",variant:"ghost",size:"icon",children:s})}),A[4]=s,A[5]=t,A[6]=n):n=A[6],n};var qa=B();const za=a=>{let A=(0,qa.c)(11),{isOpen:e,toggle:t,width:o}=a,G=e?o:ve,s;A[0]===G?s=A[1]:(s={width:G},A[0]=G,A[1]=s);let n;A[2]===Symbol.for("react.memo_cache_sentinel")?(n=f("app-sidebar auto-collapse-nav","top-0 left-0 z-20 h-full hidden lg:block relative transition-[width] ease-in-out duration-300"),A[2]=n):n=A[2];let k;A[3]!==e||A[4]!==t?(k=(0,r.jsx)(Ja,{isOpen:e,toggle:t}),A[3]=e,A[4]=t,A[5]=k):k=A[5];let R;A[6]===Symbol.for("react.memo_cache_sentinel")?(R=(0,r.jsx)("div",{className:"relative h-full flex flex-col px-3 pb-16 pt-14 overflow-y-auto shadow-sm border-l",children:(0,r.jsx)(lA,{})}),A[6]=R):R=A[6];let i;return A[7]!==e||A[8]!==s||A[9]!==k?(i=(0,r.jsxs)("aside",{"data-expanded":e,style:s,className:n,children:[k,R]}),A[7]=e,A[8]=s,A[9]=k,A[10]=i):i=A[10],i};var $a=B();const At=a=>{let A=(0,$a.c)(15),{children:e}=a,[t,o]=uA(Be),{isOpen:G,width:s}=t;if(Ye(fA.SIDEBAR).length===0)return e;let n;A[0]===s?n=A[1]:(n=ie(s),A[0]=s,A[1]=n);let k=n,R;A[2]!==o||A[3]!==G?(R=()=>o({type:"toggle",isOpen:!G}),A[2]=o,A[3]=G,A[4]=R):R=A[4];let i;A[5]!==G||A[6]!==k||A[7]!==R?(i=(0,r.jsx)(za,{isOpen:G,width:k,toggle:R}),A[5]=G,A[6]=k,A[7]=R,A[8]=i):i=A[8];let Z;A[9]===k?Z=A[10]:(Z=(0,r.jsx)("div",{className:"absolute top-3 left-4 flex items-center z-50",children:(0,r.jsx)(Xa,{openWidth:k})}),A[9]=k,A[10]=Z);let c;return A[11]!==e||A[12]!==i||A[13]!==Z?(c=(0,r.jsxs)("div",{className:"inset-0 absolute flex",children:[i,Z,e]}),A[11]=e,A[12]=i,A[13]=Z,A[14]=c):c=A[14],c};var et=B();const at=a=>{let A=(0,et.c)(17),{width:e,connection:t,isRunning:o,children:G}=a,s=t.state,n;A[0]===o?n=A[1]:(n=(0,r.jsx)(ba,{isRunning:o}),A[0]=o,A[1]=n);let k;A[2]!==t||A[3]!==o?(k=(0,r.jsx)(Na,{connection:t,isRunning:o}),A[2]=t,A[3]=o,A[4]=k):k=A[4];let R;A[5]!==s||A[6]!==e?(R=f("mathjax_ignore",Ce(s)&&"disconnected","bg-background w-full h-full text-textColor","flex flex-col overflow-y-auto",e==="full"&&"config-width-full",e==="columns"?"overflow-x-auto":"overflow-x-hidden","print:height-fit"),A[5]=s,A[6]=e,A[7]=R):R=A[7];let i;A[8]!==G||A[9]!==s||A[10]!==R||A[11]!==e?(i=(0,r.jsx)(wa,{children:(0,r.jsx)(At,{children:(0,r.jsx)("div",{id:"App","data-config-width":e,"data-connection-state":s,className:R,children:G})})}),A[8]=G,A[9]=s,A[10]=R,A[11]=e,A[12]=i):i=A[12];let Z;return A[13]!==n||A[14]!==k||A[15]!==i?(Z=(0,r.jsxs)(r.Fragment,{children:[n,k,i]}),A[13]=n,A[14]=k,A[15]=i,A[16]=Z):Z=A[16],Z};function tt(a){return a.kind==="missing"}function PA(a){return a.kind==="installing"}var{valueAtom:Gt,useActions:ot}=Le(()=>({packageAlert:null,startupLogsAlert:null,packageLogs:{}}),{addPackageAlert:(a,A)=>{var o;let e={...a.packageLogs};if(PA(A)&&A.logs&&A.log_status)for(let[G,s]of Object.entries(A.logs))switch(A.log_status){case"start":e[G]=s;break;case"append":e[G]=(e[G]||"")+s;break;case"done":e[G]=(e[G]||"")+s;break}let t=((o=a.packageAlert)==null?void 0:o.id)||qe();return{...a,packageAlert:{id:t,...A},packageLogs:e}},clearPackageAlert:(a,A)=>a.packageAlert!==null&&a.packageAlert.id===A?{...a,packageAlert:null,packageLogs:{}}:a,addStartupLog:(a,A)=>{var t;let e=((t=a.startupLogsAlert)==null?void 0:t.content)||"";return{...a,startupLogsAlert:{...a.startupLogsAlert,content:e+A.content,status:A.status}}},clearStartupLogsAlert:a=>({...a,startupLogsAlert:null})});const st=()=>j(Gt);function LA(){return ot()}var OA=B();const TA=(0,u.memo)(a=>{let A=(0,OA.c)(11),{appConfig:e,mode:t,children:o}=a,{selectedLayout:G,layoutData:s}=Te(),n=j(EA);if(t==="edit"&&!n)return o;let k;if(A[0]!==t||A[1]!==G){k=G;let c=new URLSearchParams(window.location.search);if(t==="read"&&c.has(oA.viewAs)){let g=c.get(oA.viewAs);Za.includes(g)&&(k=g)}A[0]=t,A[1]=G,A[2]=k}else k=A[2];let R;A[3]===k?R=A[4]:(R=Ke.find(c=>c.type===k),A[3]=k,A[4]=R);let i=R;if(!i)return o;let Z;return A[5]!==e||A[6]!==k||A[7]!==s||A[8]!==t||A[9]!==i?(Z=(0,r.jsx)(rt,{appConfig:e,mode:t,plugin:i,layoutData:s,finalLayout:k}),A[5]=e,A[6]=k,A[7]=s,A[8]=t,A[9]=i,A[10]=Z):Z=A[10],Z});TA.displayName="CellsRenderer";const rt=a=>{let A=(0,OA.c)(18),{appConfig:e,mode:t,plugin:o,layoutData:G,finalLayout:s}=a,n=zA(),{setCurrentLayoutData:k}=vA(),R,i,Z,c,g;if(A[0]!==e||A[1]!==s||A[2]!==G||A[3]!==t||A[4]!==n||A[5]!==o){let w=ee(n);R=o.Component,i=e,Z=t,c=w,g=G[s]||o.getInitialLayout(w),A[0]=e,A[1]=s,A[2]=G,A[3]=t,A[4]=n,A[5]=o,A[6]=R,A[7]=i,A[8]=Z,A[9]=c,A[10]=g}else R=A[6],i=A[7],Z=A[8],c=A[9],g=A[10];let d;return A[11]!==R||A[12]!==k||A[13]!==i||A[14]!==Z||A[15]!==c||A[16]!==g?(d=(0,r.jsx)(R,{appConfig:i,mode:Z,cells:c,layout:g,setLayout:k}),A[11]=R,A[12]=k,A[13]=i,A[14]=Z,A[15]=c,A[16]=g,A[17]=d):d=A[17],d};var nt=class IA{constructor(A){GA(this,"hasStarted",!1);GA(this,"handleReadyEvent",A=>{let e=A.detail.objectId;if(!this.uiElementRegistry.has(e))return;let t=this.uiElementRegistry.lookupValue(e);t!==void 0&&this.sendComponentValues({objectIds:[e],values:[t]}).catch(o=>{D.warn(o)})});this.uiElementRegistry=A}static get INSTANCE(){let A="_marimo_private_RuntimeState";return window[A]||(window[A]=new IA(S)),window[A]}get sendComponentValues(){if(!this._sendComponentValues)throw Error("sendComponentValues is not set");return this._sendComponentValues}start(A){if(this.hasStarted){D.warn("RuntimeState already started");return}this._sendComponentValues=A,document.addEventListener(pA.TYPE,this.handleReadyEvent),this.hasStarted=!0}stop(){if(!this.hasStarted){D.warn("RuntimeState already stopped");return}document.removeEventListener(pA.TYPE,this.handleReadyEvent),this.hasStarted=!1}};function kt(a){if(a.static)return xe.empty();if(sA())return Re();let A=a.url;return new ia(A,void 0,{maxRetries:10,debug:!1,startClosed:!0,connectionTimeout:1e4})}function Rt(a){let{onOpen:A,onMessage:e,onClose:t,onError:o,waitToConnect:G}=a,[s]=(0,u.useState)(()=>{let n=kt(a);return n.addEventListener("open",A),n.addEventListener("close",t),n.addEventListener("error",o),n.addEventListener("message",e),n});return(0,u.useEffect)(()=>(s.readyState===WebSocket.CLOSED&&G().then(()=>s.reconnect()).catch(n=>{D.error("Healthy connection never made",n),s.close()}),()=>{D.warn("useConnectionTransport is unmounting. This likely means there is a bug."),s.close(),s.removeEventListener("open",A),s.removeEventListener("close",t),s.removeEventListener("error",o),s.removeEventListener("message",e)}),[s]),s}function it(a){let{codes:A,names:e,configs:t,cell_ids:o,last_executed_code:G,last_execution_time:s}=a,n=G||{},k=s||{};return A.map((R,i)=>{let Z=o[i],c=n[Z];return JA({id:Z,code:R,edited:c?c!==R:!1,name:e[i],lastCodeRun:n[Z]??null,lastExecutionTime:k[Z]??null,config:t[i]})})}function lt(a,A,e){let t=Ie(),{layout:o}=a;if(o){let G=o.type,s=He({type:G,data:o.data,cells:A});t.selectedLayout=G,t.layoutData[G]=s,e({layoutView:G,data:s})}return t}function Zt(){let a=[],A=[];return S.entries.forEach((e,t)=>{a.push(t),A.push(e.value)}),{objectIds:a,values:A}}function ct(a,A){let{existingCells:e,autoInstantiate:t,setCells:o,setLayoutData:G,setAppConfig:s,setCapabilities:n,setKernelState:k,onError:R}=A,{resumed:i,ui_values:Z,app_config:c,capabilities:g,auto_instantiated:d}=a,w=e&&e.length>0,y=w&&!i?e:it(a);o(y,lt(a,y,G));let v=Ee.safeParse(c);if(v.success?s(v.data):D.error("Failed to parse app config",v.error),n(g),d)return;if(i){for(let[m,Y]of xA.entries(Z||{}))S.set(m,Y);return}let{objectIds:b,values:M}=Zt(),N=w?Object.fromEntries(e.map(m=>[m.id,m.code])):void 0;Oe().sendInstantiate({objectIds:b,values:M,autoRun:t,codes:N}).then(()=>{k({isInstantiated:!0,error:null})}).catch(m=>{k({isInstantiated:!1,error:m}),R(Error("Failed to instantiate",{cause:m}))})}function gt(a){let A=a.cell_id;S.removeElementsByCell(A),DA.INSTANCE.removeForCellId(A)}function dt(a,A){A(a),DA.INSTANCE.track(a)}const J={append:a=>{let A=new URL(window.location.href);A.searchParams.append(a.key,a.value),window.history.pushState({},"",`${A.pathname}${A.search}`)},set:a=>{let A=new URL(window.location.href);Array.isArray(a.value)?(A.searchParams.delete(a.key),a.value.forEach(e=>A.searchParams.append(a.key,e))):A.searchParams.set(a.key,a.value),window.history.pushState({},"",`${A.pathname}${A.search}`)},delete:a=>{let A=new URL(window.location.href);a.value==null?A.searchParams.delete(a.key):A.searchParams.delete(a.key,a.value),window.history.pushState({},"",`${A.pathname}${A.search}`)},clear:()=>{let a=new URL(window.location.href);a.search="",window.history.pushState({},"",`${a.pathname}${a.search}`)}};var ht=B();function Bt(){return Object.values(mA().cellData).filter(a=>a.id!==ae)}function ut(a){let A=(0,ht.c)(37),e=(0,u.useRef)(!0),{autoInstantiate:t,sessionId:o,setCells:G}=a,{showBoundary:s}=Se(),{handleCellMessage:n,setCellCodes:k,setCellIds:R}=se(),{addCellNotification:i}=ca(),Z=_(ue),c=ye(),{setVariables:g,setMetadata:d}=ne(),{addColumnPreview:w}=YA(),{addDatasets:y,filterDatasetsFromVariables:v}=YA(),{addDataSourceConnection:b,filterDataSourcesFromVariables:M}=Ae(),{setLayoutData:N}=vA(),[m,Y]=uA(Ne),{addBanner:q}=me(),{addPackageAlert:L,addStartupLog:z}=LA(),$=_(EA),AA=_(te),E=be(),eA=_(Ra),aA=_(pe),O;A[0]!==q||A[1]!==i||A[2]!==w||A[3]!==b||A[4]!==y||A[5]!==L||A[6]!==z||A[7]!==t||A[8]!==M||A[9]!==v||A[10]!==n||A[11]!==c||A[12]!==eA||A[13]!==AA||A[14]!==k||A[15]!==R||A[16]!==G||A[17]!==aA||A[18]!==Z||A[19]!==$||A[20]!==N||A[21]!==d||A[22]!==g||A[23]!==s?(O=h=>{let l=oe(h.data);switch(l.data.op){case"reload":NA();return;case"kernel-ready":{let p=Bt();ct(l.data,{autoInstantiate:t,setCells:G,setLayoutData:N,setAppConfig:c,setCapabilities:AA,setKernelState:Z,onError:s,existingCells:p}),$(l.data.kiosk);return}case"completed-run":return;case"interrupted":return;case"kernel-startup-error":aA(l.data.error);return;case"send-ui-element-message":{let p=l.data.model_id,cA=l.data.ui_element,gA=l.data.message,dA=Xe(l.data);p&&le(gA)&&ge({modelId:p,msg:gA,buffers:dA,modelManager:ce}),cA&&S.broadcastMessage(cA,l.data.message,dA);return}case"remove-ui-elements":gt(l.data);return;case"completion-result":Ge.resolve(l.data.completion_id,l.data);return;case"function-call-result":Ze.resolve(l.data.function_call_id,l.data);return;case"cell-op":{dt(l.data,n);let p=mA().cellData[l.data.cell_id];if(!p)return;i({cellNotification:l.data,code:p.code});return}case"variables":g(l.data.variables.map(xt)),v(l.data.variables.map(pt)),M(l.data.variables.map(ft));return;case"variable-values":d(l.data.variables.map(Yt));return;case"alert":nA({title:l.data.title,description:sa({html:l.data.description}),variant:l.data.variant});return;case"banner":q(l.data);return;case"missing-package-alert":L({...l.data,kind:"missing"});return;case"installing-package-alert":L({...l.data,kind:"installing"});return;case"startup-logs":z({content:l.data.content,status:l.data.status});return;case"query-params-append":J.append(l.data);return;case"query-params-set":J.set(l.data);return;case"query-params-delete":J.delete(l.data);return;case"query-params-clear":J.clear();return;case"datasets":y(l.data);return;case"data-column-preview":w(l.data);return;case"sql-table-preview":WA.resolve(l.data.request_id,l.data);return;case"sql-table-list-preview":XA.resolve(l.data.request_id,l.data);return;case"validate-sql-result":$A.resolve(l.data.request_id,l.data);return;case"secret-keys-result":la.resolve(l.data.request_id,l.data);return;case"cache-info":eA(l.data);return;case"cache-cleared":return;case"data-source-connections":b({connections:l.data.connections.map(mt)});return;case"reconnected":return;case"focus-cell":qA(l.data.cell_id);return;case"update-cell-codes":k({codes:l.data.codes,ids:l.data.cell_ids,codeIsStale:l.data.code_is_stale});return;case"update-cell-ids":R({cellIds:l.data.cell_ids});return;default:ke(l.data)}},A[0]=q,A[1]=i,A[2]=w,A[3]=b,A[4]=y,A[5]=L,A[6]=z,A[7]=t,A[8]=M,A[9]=v,A[10]=n,A[11]=c,A[12]=eA,A[13]=AA,A[14]=k,A[15]=R,A[16]=G,A[17]=aA,A[18]=Z,A[19]=$,A[20]=N,A[21]=d,A[22]=g,A[23]=s,A[24]=O):O=A[24];let tA=O,ZA=(h,l)=>{e.current&&(e.current=!1,V.reconnect(h,l))},T;A[25]===Symbol.for("react.memo_cache_sentinel")?(T=wA(),A[25]=T):T=A[25];let I;A[26]!==E||A[27]!==o?(I=()=>E.getWsURL(o).toString(),A[26]=E,A[27]=o,A[28]=I):I=A[28];let K;A[29]===Y?K=A[30]:(K=async()=>{e.current=!0,Y({state:x.OPEN})},A[29]=Y,A[30]=K);let H;A[31]===E?H=A[32]:(H=async()=>{wA()||sA()||E.isSameOrigin||await E.waitForHealthy()},A[31]=E,A[32]=H);let U;A[33]===tA?U=A[34]:(U=h=>{try{tA(h)}catch(l){let p=l;D.error("Failed to handle message",h.data,p),nA({title:"Failed to handle message",description:_A(p),variant:"danger"})}},A[33]=tA,A[34]=U);let V=Rt({static:T,url:I,onOpen:K,waitToConnect:H,onMessage:U,onClose:h=>{switch(D.warn("WebSocket closed",h.code,h.reason),h.reason){case"MARIMO_ALREADY_CONNECTED":Y({state:x.CLOSED,code:F.ALREADY_RUNNING,reason:"another browser tab is already connected to the kernel",canTakeover:!0}),V.close();return;case"MARIMO_WRONG_KERNEL_ID":case"MARIMO_NO_FILE_KEY":case"MARIMO_NO_SESSION_ID":case"MARIMO_NO_SESSION":case"MARIMO_SHUTDOWN":Y({state:x.CLOSED,code:F.KERNEL_DISCONNECTED,reason:"kernel not found"}),V.close();return;case"MARIMO_MALFORMED_QUERY":Y({state:x.CLOSED,code:F.MALFORMED_QUERY,reason:"the kernel did not recognize a request; please file a bug with marimo"});return;default:if(h.reason==="MARIMO_KERNEL_STARTUP_ERROR"){Y({state:x.CLOSED,code:F.KERNEL_STARTUP_ERROR,reason:"Failed to start kernel sandbox"}),V.close();return}Y({state:x.CONNECTING}),ZA(h.code,h.reason)}},onError:h=>{D.warn("WebSocket error",h),Y({state:x.CLOSED,code:F.KERNEL_DISCONNECTED,reason:"kernel not found"}),ZA()}}),X;return A[35]===m?X=A[36]:(X={connection:m},A[35]=m,A[36]=X),X}function mt(a){return{...a,name:a.name}}function Yt(a){return{name:a.name,dataType:a.datatype,value:a.value}}function ft(a){return a.name}function pt(a){return a.name}function xt(a){return{name:a.name,declaredBy:a.declared_by,usedBy:a.used_by}}var wt=B();const Dt=a=>{let A=(0,wt.c)(2),{children:e}=a,t;return A[0]===e?t=A[1]:(t=(0,r.jsx)("div",{className:"flex flex-col flex-1 overflow-hidden absolute inset-0 print:relative",children:e}),A[0]=e,A[1]=t),t};export{PA as a,st as c,jA as d,TA as i,at as l,ut as n,tt as o,nt as r,LA as s,Dt as t,fa as u};
function c(e){for(var r={},t=e.split(" "),n=0;n<t.length;++n)r[t[n]]=!0;return r}var u=c("absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write"),f={null:!0},i=/[+\-*&%=<>!?|\/]/;function p(e,r){var t=e.next();if(t=="#"&&r.startOfLine)return e.skipToEnd(),"meta";if(t=='"'||t=="'")return r.tokenize=d(t),r.tokenize(e,r);if(t=="("&&e.eat("*"))return r.tokenize=l,l(e,r);if(t=="{")return r.tokenize=s,s(e,r);if(/[\[\]\(\),;\:\.]/.test(t))return null;if(/\d/.test(t))return e.eatWhile(/[\w\.]/),"number";if(t=="/"&&e.eat("/"))return e.skipToEnd(),"comment";if(i.test(t))return e.eatWhile(i),"operator";e.eatWhile(/[\w\$_]/);var n=e.current().toLowerCase();return u.propertyIsEnumerable(n)?"keyword":f.propertyIsEnumerable(n)?"atom":"variable"}function d(e){return function(r,t){for(var n=!1,a,o=!1;(a=r.next())!=null;){if(a==e&&!n){o=!0;break}n=!n&&a=="\\"}return(o||!n)&&(t.tokenize=null),"string"}}function l(e,r){for(var t=!1,n;n=e.next();){if(n==")"&&t){r.tokenize=null;break}t=n=="*"}return"comment"}function s(e,r){for(var t;t=e.next();)if(t=="}"){r.tokenize=null;break}return"comment"}const m={name:"pascal",startState:function(){return{tokenize:null}},token:function(e,r){return e.eatSpace()?null:(r.tokenize||p)(e,r)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{block:{open:"(*",close:"*)"}}}};export{m as t};
import{t as a}from"./pascal-BDWWzmkf.js";export{a as pascal};
function E(t){return function(){return t}}var o=Math.PI,y=2*o,u=1e-6,L=y-u;function w(t){this._+=t[0];for(let i=1,h=t.length;i<h;++i)this._+=arguments[i]+t[i]}function q(t){let i=Math.floor(t);if(!(i>=0))throw Error(`invalid digits: ${t}`);if(i>15)return w;let h=10**i;return function(s){this._+=s[0];for(let r=1,_=s.length;r<_;++r)this._+=Math.round(arguments[r]*h)/h+s[r]}}var M=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?w:q(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,h,s){this._append`Q${+t},${+i},${this._x1=+h},${this._y1=+s}`}bezierCurveTo(t,i,h,s,r,_){this._append`C${+t},${+i},${+h},${+s},${this._x1=+r},${this._y1=+_}`}arcTo(t,i,h,s,r){if(t=+t,i=+i,h=+h,s=+s,r=+r,r<0)throw Error(`negative radius: ${r}`);let _=this._x1,l=this._y1,p=h-t,a=s-i,n=_-t,e=l-i,$=n*n+e*e;if(this._x1===null)this._append`M${this._x1=t},${this._y1=i}`;else if($>u)if(!(Math.abs(e*p-a*n)>u)||!r)this._append`L${this._x1=t},${this._y1=i}`;else{let d=h-_,f=s-l,c=p*p+a*a,A=d*d+f*f,g=Math.sqrt(c),v=Math.sqrt($),b=r*Math.tan((o-Math.acos((c+$-A)/(2*g*v)))/2),x=b/v,m=b/g;Math.abs(x-1)>u&&this._append`L${t+x*n},${i+x*e}`,this._append`A${r},${r},0,0,${+(e*d>n*f)},${this._x1=t+m*p},${this._y1=i+m*a}`}}arc(t,i,h,s,r,_){if(t=+t,i=+i,h=+h,_=!!_,h<0)throw Error(`negative radius: ${h}`);let l=h*Math.cos(s),p=h*Math.sin(s),a=t+l,n=i+p,e=1^_,$=_?s-r:r-s;this._x1===null?this._append`M${a},${n}`:(Math.abs(this._x1-a)>u||Math.abs(this._y1-n)>u)&&this._append`L${a},${n}`,h&&($<0&&($=$%y+y),$>L?this._append`A${h},${h},0,1,${e},${t-l},${i-p}A${h},${h},0,1,${e},${this._x1=a},${this._y1=n}`:$>u&&this._append`A${h},${h},0,${+($>=o)},${e},${this._x1=t+h*Math.cos(r)},${this._y1=i+h*Math.sin(r)}`)}rect(t,i,h,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${h=+h}v${+s}h${-h}Z`}toString(){return this._}};function T(){return new M}T.prototype=M.prototype;function C(t){let i=3;return t.digits=function(h){if(!arguments.length)return i;if(h==null)i=null;else{let s=Math.floor(h);if(!(s>=0))throw RangeError(`invalid digits: ${h}`);i=s}return t},()=>new M(i)}export{T as n,E as r,C as t};
function f(e,r){return e.string.charAt(e.pos+(r||0))}function g(e,r){if(r){var i=e.pos-r;return e.string.substr(i>=0?i:0,r)}else return e.string.substr(0,e.pos-1)}function u(e,r){var i=e.string.length,$=i-e.pos+1;return e.string.substr(e.pos,r&&r<i?r:$)}function o(e,r){var i=e.pos+r,$;i<=0?e.pos=0:i>=($=e.string.length-1)?e.pos=$:e.pos=i}var _={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},s="string.special",a=/[goseximacplud]/;function n(e,r,i,$,E){return r.chain=null,r.style=null,r.tail=null,r.tokenize=function(t,R){for(var A=!1,c,p=0;c=t.next();){if(c===i[p]&&!A)return i[++p]===void 0?E&&t.eatWhile(E):(R.chain=i[p],R.style=$,R.tail=E),R.tokenize=T,$;A=!A&&c=="\\"}return $},r.tokenize(e,r)}function d(e,r,i){return r.tokenize=function($,E){return $.string==i&&(E.tokenize=T),$.skipToEnd(),"string"},r.tokenize(e,r)}function T(e,r){if(e.eatSpace())return null;if(r.chain)return n(e,r,r.chain,r.style,r.tail);if(e.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if(e.match(/^<<(?=[_a-zA-Z])/))return e.eatWhile(/\w/),d(e,r,e.current().substr(2));if(e.sol()&&e.match(/^\=item(?!\w)/))return d(e,r,"=cut");var i=e.next();if(i=='"'||i=="'"){if(g(e,3)=="<<"+i){var $=e.pos;e.eatWhile(/\w/);var E=e.current().substr(1);if(E&&e.eat(i))return d(e,r,E);e.pos=$}return n(e,r,[i],"string")}if(i=="q"){var t=f(e,-2);if(!(t&&/\w/.test(t))){if(t=f(e,0),t=="x"){if(t=f(e,1),t=="(")return o(e,2),n(e,r,[")"],s,a);if(t=="[")return o(e,2),n(e,r,["]"],s,a);if(t=="{")return o(e,2),n(e,r,["}"],s,a);if(t=="<")return o(e,2),n(e,r,[">"],s,a);if(/[\^'"!~\/]/.test(t))return o(e,1),n(e,r,[e.eat(t)],s,a)}else if(t=="q"){if(t=f(e,1),t=="(")return o(e,2),n(e,r,[")"],"string");if(t=="[")return o(e,2),n(e,r,["]"],"string");if(t=="{")return o(e,2),n(e,r,["}"],"string");if(t=="<")return o(e,2),n(e,r,[">"],"string");if(/[\^'"!~\/]/.test(t))return o(e,1),n(e,r,[e.eat(t)],"string")}else if(t=="w"){if(t=f(e,1),t=="(")return o(e,2),n(e,r,[")"],"bracket");if(t=="[")return o(e,2),n(e,r,["]"],"bracket");if(t=="{")return o(e,2),n(e,r,["}"],"bracket");if(t=="<")return o(e,2),n(e,r,[">"],"bracket");if(/[\^'"!~\/]/.test(t))return o(e,1),n(e,r,[e.eat(t)],"bracket")}else if(t=="r"){if(t=f(e,1),t=="(")return o(e,2),n(e,r,[")"],s,a);if(t=="[")return o(e,2),n(e,r,["]"],s,a);if(t=="{")return o(e,2),n(e,r,["}"],s,a);if(t=="<")return o(e,2),n(e,r,[">"],s,a);if(/[\^'"!~\/]/.test(t))return o(e,1),n(e,r,[e.eat(t)],s,a)}else if(/[\^'"!~\/(\[{<]/.test(t)){if(t=="(")return o(e,1),n(e,r,[")"],"string");if(t=="[")return o(e,1),n(e,r,["]"],"string");if(t=="{")return o(e,1),n(e,r,["}"],"string");if(t=="<")return o(e,1),n(e,r,[">"],"string");if(/[\^'"!~\/]/.test(t))return n(e,r,[e.eat(t)],"string")}}}if(i=="m"){var t=f(e,-2);if(!(t&&/\w/.test(t))&&(t=e.eat(/[(\[{<\^'"!~\/]/),t)){if(/[\^'"!~\/]/.test(t))return n(e,r,[t],s,a);if(t=="(")return n(e,r,[")"],s,a);if(t=="[")return n(e,r,["]"],s,a);if(t=="{")return n(e,r,["}"],s,a);if(t=="<")return n(e,r,[">"],s,a)}}if(i=="s"){var t=/[\/>\]})\w]/.test(f(e,-2));if(!t&&(t=e.eat(/[(\[{<\^'"!~\/]/),t))return t=="["?n(e,r,["]","]"],s,a):t=="{"?n(e,r,["}","}"],s,a):t=="<"?n(e,r,[">",">"],s,a):t=="("?n(e,r,[")",")"],s,a):n(e,r,[t,t],s,a)}if(i=="y"){var t=/[\/>\]})\w]/.test(f(e,-2));if(!t&&(t=e.eat(/[(\[{<\^'"!~\/]/),t))return t=="["?n(e,r,["]","]"],s,a):t=="{"?n(e,r,["}","}"],s,a):t=="<"?n(e,r,[">",">"],s,a):t=="("?n(e,r,[")",")"],s,a):n(e,r,[t,t],s,a)}if(i=="t"){var t=/[\/>\]})\w]/.test(f(e,-2));if(!t&&(t=e.eat("r"),t&&(t=e.eat(/[(\[{<\^'"!~\/]/),t)))return t=="["?n(e,r,["]","]"],s,a):t=="{"?n(e,r,["}","}"],s,a):t=="<"?n(e,r,[">",">"],s,a):t=="("?n(e,r,[")",")"],s,a):n(e,r,[t,t],s,a)}if(i=="`")return n(e,r,[i],"builtin");if(i=="/")return/~\s*$/.test(g(e))?n(e,r,[i],s,a):"operator";if(i=="$"){var $=e.pos;if(e.eatWhile(/\d/)||e.eat("{")&&e.eatWhile(/\d/)&&e.eat("}"))return"builtin";e.pos=$}if(/[$@%]/.test(i)){var $=e.pos;if(e.eat("^")&&e.eat(/[A-Z]/)||!/[@$%&]/.test(f(e,-2))&&e.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var t=e.current();if(_[t])return"builtin"}e.pos=$}if(/[$@%&]/.test(i)&&(e.eatWhile(/[\w$]/)||e.eat("{")&&e.eatWhile(/[\w$]/)&&e.eat("}"))){var t=e.current();return _[t]?"builtin":"variable"}if(i=="#"&&f(e,-2)!="$")return e.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(i)){var $=e.pos;if(e.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),_[e.current()])return"operator";e.pos=$}if(i=="_"&&e.pos==1){if(u(e,6)=="_END__")return n(e,r,["\0"],"comment");if(u(e,7)=="_DATA__")return n(e,r,["\0"],"builtin");if(u(e,7)=="_C__")return n(e,r,["\0"],"string")}if(/\w/.test(i)){var $=e.pos;if(f(e,-2)=="{"&&(f(e,0)=="}"||e.eatWhile(/\w/)&&f(e,0)=="}"))return"string";e.pos=$}if(/[A-Z]/.test(i)){var R=f(e,-2),$=e.pos;if(e.eatWhile(/[A-Z_]/),/[\da-z]/.test(f(e,0)))e.pos=$;else{var t=_[e.current()];return t?(t[1]&&(t=t[0]),R==":"?"meta":t==1?"keyword":t==2?"def":t==3?"atom":t==4?"operator":t==5?"builtin":"meta"):"meta"}}if(/[a-zA-Z_]/.test(i)){var R=f(e,-2);e.eatWhile(/\w/);var t=_[e.current()];return t?(t[1]&&(t=t[0]),R==":"?"meta":t==1?"keyword":t==2?"def":t==3?"atom":t==4?"operator":t==5?"builtin":"meta"):"meta"}return null}const S={name:"perl",startState:function(){return{tokenize:T,chain:null,style:null,tail:null}},token:function(e,r){return(r.tokenize||T)(e,r)},languageData:{commentTokens:{line:"#"},wordChars:"$"}};export{S as t};
import{t as r}from"./perl-C1twkBDg.js";export{r as perl};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as e}from"./chunk-T53DSG4Q-td6bRJ2x.js";export{e as createPieServices};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as W}from"./ordinal-DTOdb5Da.js";import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import{r as h}from"./path-BMloFSsK.js";import{p as k}from"./math-BIeW4iGV.js";import{t as F}from"./arc-3DY1fURi.js";import{t as _}from"./array-BF0shS9G.js";import{i as B,p as P}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as p,r as M}from"./src-BKLwm2RN.js";import{B as L,C as V,U as j,_ as U,a as q,b as G,c as H,d as I,v as J,z as K}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as Q}from"./chunk-EXTU4WIE-CyW9PraH.js";import"./dist-C04_12Dz.js";import"./chunk-O7ZBX7Z2-CsMGWxKA.js";import"./chunk-S6J4BHB3-B5AsdTT7.js";import"./chunk-LBM3YZW2-DNY-0NiJ.js";import"./chunk-76Q3JFCE-CC_RB1qp.js";import"./chunk-T53DSG4Q-td6bRJ2x.js";import"./chunk-LHMN2FUI-xvIevmTh.js";import"./chunk-FWNWRKHM-D3c3qJTG.js";import{t as X}from"./chunk-4BX2VUAB-BpI4ekYZ.js";import{t as Y}from"./mermaid-parser.core-BQwQ8Y_u.js";function Z(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function tt(t){return t}function et(){var t=tt,a=Z,d=null,o=h(0),s=h(k),x=h(0);function n(e){var l,i=(e=_(e)).length,m,b,$=0,y=Array(i),u=Array(i),v=+o.apply(this,arguments),A=Math.min(k,Math.max(-k,s.apply(this,arguments)-v)),f,T=Math.min(Math.abs(A)/i,x.apply(this,arguments)),w=T*(A<0?-1:1),c;for(l=0;l<i;++l)(c=u[y[l]=l]=+t(e[l],l,e))>0&&($+=c);for(a==null?d!=null&&y.sort(function(g,S){return d(e[g],e[S])}):y.sort(function(g,S){return a(u[g],u[S])}),l=0,b=$?(A-i*w)/$:0;l<i;++l,v=f)m=y[l],c=u[m],f=v+(c>0?c*b:0)+w,u[m]={data:e[m],index:l,value:c,startAngle:v,endAngle:f,padAngle:T};return u}return n.value=function(e){return arguments.length?(t=typeof e=="function"?e:h(+e),n):t},n.sortValues=function(e){return arguments.length?(a=e,d=null,n):a},n.sort=function(e){return arguments.length?(d=e,a=null,n):d},n.startAngle=function(e){return arguments.length?(o=typeof e=="function"?e:h(+e),n):o},n.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:h(+e),n):s},n.padAngle=function(e){return arguments.length?(x=typeof e=="function"?e:h(+e),n):x},n}var R=I.pie,O={sections:new Map,showData:!1,config:R},C=O.sections,z=O.showData,at=structuredClone(R),E={getConfig:p(()=>structuredClone(at),"getConfig"),clear:p(()=>{C=new Map,z=O.showData,q()},"clear"),setDiagramTitle:j,getDiagramTitle:V,setAccTitle:L,getAccTitle:J,setAccDescription:K,getAccDescription:U,addSection:p(({label:t,value:a})=>{if(a<0)throw Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);C.has(t)||(C.set(t,a),M.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),getSections:p(()=>C,"getSections"),setShowData:p(t=>{z=t},"setShowData"),getShowData:p(()=>z,"getShowData")},rt=p((t,a)=>{X(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),it={parse:p(async t=>{let a=await Y("pie",t);M.debug(a),rt(a,E)},"parse")},lt=p(t=>`
.pieCircle{
stroke: ${t.pieStrokeColor};
stroke-width : ${t.pieStrokeWidth};
opacity : ${t.pieOpacity};
}
.pieOuterCircle{
stroke: ${t.pieOuterStrokeColor};
stroke-width: ${t.pieOuterStrokeWidth};
fill: none;
}
.pieTitleText {
text-anchor: middle;
font-size: ${t.pieTitleTextSize};
fill: ${t.pieTitleTextColor};
font-family: ${t.fontFamily};
}
.slice {
font-family: ${t.fontFamily};
fill: ${t.pieSectionTextColor};
font-size:${t.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${t.pieLegendTextColor};
font-family: ${t.fontFamily};
font-size: ${t.pieLegendTextSize};
}
`,"getStyles"),nt=p(t=>{let a=[...t.values()].reduce((o,s)=>o+s,0),d=[...t.entries()].map(([o,s])=>({label:o,value:s})).filter(o=>o.value/a*100>=1).sort((o,s)=>s.value-o.value);return et().value(o=>o.value)(d)},"createPieArcs"),ot={parser:it,db:E,renderer:{draw:p((t,a,d,o)=>{M.debug(`rendering pie chart
`+t);let s=o.db,x=G(),n=B(s.getConfig(),x.pie),e=Q(a),l=e.append("g");l.attr("transform","translate(225,225)");let{themeVariables:i}=x,[m]=P(i.pieOuterStrokeWidth);m??(m=2);let b=n.textPosition,$=F().innerRadius(0).outerRadius(185),y=F().innerRadius(185*b).outerRadius(185*b);l.append("circle").attr("cx",0).attr("cy",0).attr("r",185+m/2).attr("class","pieOuterCircle");let u=s.getSections(),v=nt(u),A=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12],f=0;u.forEach(r=>{f+=r});let T=v.filter(r=>(r.data.value/f*100).toFixed(0)!=="0"),w=W(A);l.selectAll("mySlices").data(T).enter().append("path").attr("d",$).attr("fill",r=>w(r.data.label)).attr("class","pieCircle"),l.selectAll("mySlices").data(T).enter().append("text").text(r=>(r.data.value/f*100).toFixed(0)+"%").attr("transform",r=>"translate("+y.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");let c=[...u.entries()].map(([r,D])=>({label:r,value:D})),g=l.selectAll(".legend").data(c).enter().append("g").attr("class","legend").attr("transform",(r,D)=>{let N=22*c.length/2;return"translate(216,"+(D*22-N)+")"});g.append("rect").attr("width",18).attr("height",18).style("fill",r=>w(r.label)).style("stroke",r=>w(r.label)),g.append("text").attr("x",22).attr("y",14).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);let S=512+Math.max(...g.selectAll("text").nodes().map(r=>(r==null?void 0:r.getBoundingClientRect().width)??0));e.attr("viewBox",`0 0 ${S} 450`),H(e,450,S,n.useMaxWidth)},"draw")},styles:lt};export{ot as diagram};
function R(O){for(var E={},T=O.split(" "),I=0;I<T.length;++I)E[T[I]]=!0;return E}var e="ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER ",L="VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE NEQ MATCHES TRUE FALSE DUMP",r="BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP ",n=R(e),U=R(L),C=R(r),N=/[*+\-%<>=&?:\/!|]/;function G(O,E,T){return E.tokenize=T,T(O,E)}function a(O,E){for(var T=!1,I;I=O.next();){if(I=="/"&&T){E.tokenize=S;break}T=I=="*"}return"comment"}function o(O){return function(E,T){for(var I=!1,A,t=!1;(A=E.next())!=null;){if(A==O&&!I){t=!0;break}I=!I&&A=="\\"}return(t||!I)&&(T.tokenize=S),"error"}}function S(O,E){var T=O.next();return T=='"'||T=="'"?G(O,E,o(T)):/[\[\]{}\(\),;\.]/.test(T)?null:/\d/.test(T)?(O.eatWhile(/[\w\.]/),"number"):T=="/"?O.eat("*")?G(O,E,a):(O.eatWhile(N),"operator"):T=="-"?O.eat("-")?(O.skipToEnd(),"comment"):(O.eatWhile(N),"operator"):N.test(T)?(O.eatWhile(N),"operator"):(O.eatWhile(/[\w\$_]/),U&&U.propertyIsEnumerable(O.current().toUpperCase())&&!O.eat(")")&&!O.eat(".")?"keyword":n&&n.propertyIsEnumerable(O.current().toUpperCase())?"builtin":C&&C.propertyIsEnumerable(O.current().toUpperCase())?"type":"variable")}const M={name:"pig",startState:function(){return{tokenize:S,startOfLine:!0}},token:function(O,E){return O.eatSpace()?null:E.tokenize(O,E)},languageData:{autocomplete:(e+r+L).split(" ")}};export{M as t};
import{t as o}from"./pig-CKZ-JUXx.js";export{o as pig};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),e=a("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);export{t as n,e as t};
import{t}from"./createLucideIcon-CnW3RofX.js";var a=t("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);export{a as t};
import{s as M,t as S}from"./chunk-LvLJmgfZ.js";import{t as T}from"./react-BGmjiNul.js";import{t as V}from"./compiler-runtime-DeeZ7FnK.js";import{r as K}from"./useEventListener-DIUKKfEy.js";import{t as we}from"./jsx-runtime-ZmTK25f3.js";import{t as N}from"./cn-BKtXLv3a.js";import{M as Ce,N as $,j as je}from"./dropdown-menu-B-6unW-7.js";import{E as z,S as L,_ as C,a as Pe,c as _e,d as Re,f as H,i as Ne,m as Oe,o as De,r as Fe,s as Ae,t as Ee,u as ke,w as x,x as F,y as Ie}from"./Combination-CMPwuAmi.js";import{a as Me,c as U,i as q,o as Se,s as Te}from"./dist-uzvC4uAK.js";import{u as Ve}from"./menu-items-CJhvWPOk.js";var Ke=S((r=>{var s=T();function e(l,v){return l===v&&(l!==0||1/l==1/v)||l!==l&&v!==v}var t=typeof Object.is=="function"?Object.is:e,o=s.useState,a=s.useEffect,n=s.useLayoutEffect,i=s.useDebugValue;function c(l,v){var g=v(),w=o({inst:{value:g,getSnapshot:v}}),h=w[0].inst,b=w[1];return n(function(){h.value=g,h.getSnapshot=v,m(h)&&b({inst:h})},[l,g,v]),a(function(){return m(h)&&b({inst:h}),l(function(){m(h)&&b({inst:h})})},[l]),i(g),g}function m(l){var v=l.getSnapshot;l=l.value;try{var g=v();return!t(l,g)}catch{return!0}}function p(l,v){return v()}var f=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?p:c;r.useSyncExternalStore=s.useSyncExternalStore===void 0?f:s.useSyncExternalStore})),$e=S(((r,s)=>{s.exports=Ke()})),u=M(T(),1),d=M(we(),1),O="Tabs",[ze,yo]=z(O,[$]),B=$(),[Le,A]=ze(O),W=u.forwardRef((r,s)=>{let{__scopeTabs:e,value:t,onValueChange:o,defaultValue:a,orientation:n="horizontal",dir:i,activationMode:c="automatic",...m}=r,p=Ve(i),[f,l]=L({prop:t,onChange:o,defaultProp:a??"",caller:O});return(0,d.jsx)(Le,{scope:e,baseId:H(),value:f,onValueChange:l,orientation:n,dir:p,activationMode:c,children:(0,d.jsx)(C.div,{dir:p,"data-orientation":n,...m,ref:s})})});W.displayName=O;var Z="TabsList",G=u.forwardRef((r,s)=>{let{__scopeTabs:e,loop:t=!0,...o}=r,a=A(Z,e),n=B(e);return(0,d.jsx)(Ce,{asChild:!0,...n,orientation:a.orientation,dir:a.dir,loop:t,children:(0,d.jsx)(C.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:s})})});G.displayName=Z;var J="TabsTrigger",Q=u.forwardRef((r,s)=>{let{__scopeTabs:e,value:t,disabled:o=!1,...a}=r,n=A(J,e),i=B(e),c=ee(n.baseId,t),m=oe(n.baseId,t),p=t===n.value;return(0,d.jsx)(je,{asChild:!0,...i,focusable:!o,active:p,children:(0,d.jsx)(C.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":m,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:s,onMouseDown:x(r.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?n.onValueChange(t):f.preventDefault()}),onKeyDown:x(r.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&n.onValueChange(t)}),onFocus:x(r.onFocus,()=>{let f=n.activationMode!=="manual";!p&&!o&&f&&n.onValueChange(t)})})})});Q.displayName=J;var X="TabsContent",Y=u.forwardRef((r,s)=>{let{__scopeTabs:e,value:t,forceMount:o,children:a,...n}=r,i=A(X,e),c=ee(i.baseId,t),m=oe(i.baseId,t),p=t===i.value,f=u.useRef(p);return u.useEffect(()=>{let l=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(l)},[]),(0,d.jsx)(F,{present:o||p,children:({present:l})=>(0,d.jsx)(C.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!l,id:m,tabIndex:0,...n,ref:s,style:{...r.style,animationDuration:f.current?"0s":void 0},children:l&&a})})});Y.displayName=X;function ee(r,s){return`${r}-trigger-${s}`}function oe(r,s){return`${r}-content-${s}`}var He=W,re=G,te=Q,ae=Y,E=V(),Ue=He,ne=u.forwardRef((r,s)=>{let e=(0,E.c)(9),t,o;e[0]===r?(t=e[1],o=e[2]):({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o);let a;e[3]===t?a=e[4]:(a=N("inline-flex max-h-14 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),e[3]=t,e[4]=a);let n;return e[5]!==o||e[6]!==s||e[7]!==a?(n=(0,d.jsx)(re,{ref:s,className:a,...o}),e[5]=o,e[6]=s,e[7]=a,e[8]=n):n=e[8],n});ne.displayName=re.displayName;var se=u.forwardRef((r,s)=>{let e=(0,E.c)(9),t,o;e[0]===r?(t=e[1],o=e[2]):({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o);let a;e[3]===t?a=e[4]:(a=N("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),e[3]=t,e[4]=a);let n;return e[5]!==o||e[6]!==s||e[7]!==a?(n=(0,d.jsx)(te,{ref:s,className:a,...o}),e[5]=o,e[6]=s,e[7]=a,e[8]=n):n=e[8],n});se.displayName=te.displayName;var ie=u.forwardRef((r,s)=>{let e=(0,E.c)(9),t,o;e[0]===r?(t=e[1],o=e[2]):({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o);let a;e[3]===t?a=e[4]:(a=N("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2",t),e[3]=t,e[4]=a);let n;return e[5]!==o||e[6]!==s||e[7]!==a?(n=(0,d.jsx)(ae,{ref:s,className:a,...o}),e[5]=o,e[6]=s,e[7]=a,e[8]=n):n=e[8],n});ie.displayName=ae.displayName;var D="Popover",[le,wo]=z(D,[U]),P=U(),[qe,y]=le(D),de=r=>{let{__scopePopover:s,children:e,open:t,defaultOpen:o,onOpenChange:a,modal:n=!1}=r,i=P(s),c=u.useRef(null),[m,p]=u.useState(!1),[f,l]=L({prop:t,defaultProp:o??!1,onChange:a,caller:D});return(0,d.jsx)(Te,{...i,children:(0,d.jsx)(qe,{scope:s,contentId:H(),triggerRef:c,open:f,onOpenChange:l,onOpenToggle:u.useCallback(()=>l(v=>!v),[l]),hasCustomAnchor:m,onCustomAnchorAdd:u.useCallback(()=>p(!0),[]),onCustomAnchorRemove:u.useCallback(()=>p(!1),[]),modal:n,children:e})})};de.displayName=D;var ue="PopoverAnchor",ce=u.forwardRef((r,s)=>{let{__scopePopover:e,...t}=r,o=y(ue,e),a=P(e),{onCustomAnchorAdd:n,onCustomAnchorRemove:i}=o;return u.useEffect(()=>(n(),()=>i()),[n,i]),(0,d.jsx)(q,{...a,...t,ref:s})});ce.displayName=ue;var pe="PopoverTrigger",fe=u.forwardRef((r,s)=>{let{__scopePopover:e,...t}=r,o=y(pe,e),a=P(e),n=K(s,o.triggerRef),i=(0,d.jsx)(C.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":be(o.open),...t,ref:n,onClick:x(r.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:(0,d.jsx)(q,{asChild:!0,...a,children:i})});fe.displayName=pe;var k="PopoverPortal",[Be,We]=le(k,{forceMount:void 0}),ve=r=>{let{__scopePopover:s,forceMount:e,children:t,container:o}=r,a=y(k,s);return(0,d.jsx)(Be,{scope:s,forceMount:e,children:(0,d.jsx)(F,{present:e||a.open,children:(0,d.jsx)(Re,{asChild:!0,container:o,children:t})})})};ve.displayName=k;var j="PopoverContent",me=u.forwardRef((r,s)=>{let e=We(j,r.__scopePopover),{forceMount:t=e.forceMount,...o}=r,a=y(j,r.__scopePopover);return(0,d.jsx)(F,{present:t||a.open,children:a.modal?(0,d.jsx)(Ge,{...o,ref:s}):(0,d.jsx)(Je,{...o,ref:s})})});me.displayName=j;var Ze=Ie("PopoverContent.RemoveScroll"),Ge=u.forwardRef((r,s)=>{let e=y(j,r.__scopePopover),t=u.useRef(null),o=K(s,t),a=u.useRef(!1);return u.useEffect(()=>{let n=t.current;if(n)return Fe(n)},[]),(0,d.jsx)(Ee,{as:Ze,allowPinchZoom:!0,children:(0,d.jsx)(he,{...r,ref:o,trapFocus:e.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(r.onCloseAutoFocus,n=>{var i;n.preventDefault(),a.current||((i=e.triggerRef.current)==null||i.focus())}),onPointerDownOutside:x(r.onPointerDownOutside,n=>{let i=n.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;a.current=i.button===2||c},{checkForDefaultPrevented:!1}),onFocusOutside:x(r.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1})})})}),Je=u.forwardRef((r,s)=>{let e=y(j,r.__scopePopover),t=u.useRef(!1),o=u.useRef(!1);return(0,d.jsx)(he,{...r,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var n,i;(n=r.onCloseAutoFocus)==null||n.call(r,a),a.defaultPrevented||(t.current||((i=e.triggerRef.current)==null||i.focus()),a.preventDefault()),t.current=!1,o.current=!1},onInteractOutside:a=>{var i,c;(i=r.onInteractOutside)==null||i.call(r,a),a.defaultPrevented||(t.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let n=a.target;(c=e.triggerRef.current)!=null&&c.contains(n)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),he=u.forwardRef((r,s)=>{let{__scopePopover:e,trapFocus:t,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:n,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:m,onInteractOutside:p,...f}=r,l=y(j,e),v=P(e);return Pe(),(0,d.jsx)(Ne,{asChild:!0,loop:!0,trapped:t,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,d.jsx)(Oe,{asChild:!0,disableOutsidePointerEvents:n,onInteractOutside:p,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:m,onDismiss:()=>l.onOpenChange(!1),children:(0,d.jsx)(Se,{"data-state":be(l.open),role:"dialog",id:l.contentId,...v,...f,ref:s,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ge="PopoverClose",I=u.forwardRef((r,s)=>{let{__scopePopover:e,...t}=r,o=y(ge,e);return(0,d.jsx)(C.button,{type:"button",...t,ref:s,onClick:x(r.onClick,()=>o.onOpenChange(!1))})});I.displayName=ge;var Qe="PopoverArrow",Xe=u.forwardRef((r,s)=>{let{__scopePopover:e,...t}=r,o=P(e);return(0,d.jsx)(Me,{...o,...t,ref:s})});Xe.displayName=Qe;function be(r){return r?"open":"closed"}var Ye=de,eo=fe,oo=ve,xe=me,ro=I,to=V(),ao=Ye,no=eo,so=Ae(oo),io=ro,lo=_e(xe),ye=u.forwardRef((r,s)=>{let e=(0,to.c)(22),t,o,a,n,i,c;e[0]===r?(t=e[1],o=e[2],a=e[3],n=e[4],i=e[5],c=e[6]):({className:t,align:a,sideOffset:n,portal:i,scrollable:c,...o}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=a,e[4]=n,e[5]=i,e[6]=c);let m=a===void 0?"center":a,p=n===void 0?4:n,f=i===void 0?!0:i,l=c===void 0?!1:c,v=l&&"overflow-auto",g;e[7]!==t||e[8]!==v?(g=N("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t,v),e[7]=t,e[8]=v,e[9]=g):g=e[9];let w=l?`calc(var(--radix-popover-content-available-height) - ${De}px)`:void 0,h;e[10]!==o.style||e[11]!==w?(h={...o.style,maxHeight:w},e[10]=o.style,e[11]=w,e[12]=h):h=e[12];let b;e[13]!==m||e[14]!==o||e[15]!==s||e[16]!==p||e[17]!==g||e[18]!==h?(b=(0,d.jsx)(ke,{children:(0,d.jsx)(lo,{ref:s,align:m,sideOffset:p,className:g,style:h,...o})}),e[13]=m,e[14]=o,e[15]=s,e[16]=p,e[17]=g,e[18]=h,e[19]=b):b=e[19];let _=b;if(f){let R;return e[20]===_?R=e[21]:(R=(0,d.jsx)(so,{children:_}),e[20]=_,e[21]=R),R}return _});ye.displayName=xe.displayName;export{ce as a,ie as c,$e as d,no as i,ne as l,io as n,I as o,ye as r,Ue as s,ao as t,se as u};
function a(e,r){r||(r={});for(var t=r.prefix===void 0?"^":r.prefix,o=r.suffix===void 0?"\\b":r.suffix,n=0;n<e.length;n++)e[n]instanceof RegExp?e[n]=e[n].source:e[n]=e[n].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return RegExp(t+"("+e.join("|")+")"+o,"i")}var p="(?=[^A-Za-z\\d\\-_]|$)",u=/[\w\-:]/,m={keyword:a([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:p}),number:/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,operator:a([a(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/],{suffix:""}),builtin:a([/[A-Z]:|%|\?/i,a([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),a([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""})],{suffix:p}),punctuation:/[\[\]{},;`\\\.]|@[({]/,variable:/^[A-Za-z\_][A-Za-z\-\_\d]*\b/};function i(e,r){var t=r.returnStack[r.returnStack.length-1];if(t&&t.shouldReturnFrom(r))return r.tokenize=t.tokenize,r.returnStack.pop(),r.tokenize(e,r);if(e.eatSpace())return null;if(e.eat("("))return r.bracketNesting+=1,"punctuation";if(e.eat(")"))return--r.bracketNesting,"punctuation";for(var o in m)if(e.match(m[o]))return o;var n=e.next();if(n==="'")return d(e,r);if(n==="$")return c(e,r);if(n==='"')return S(e,r);if(n==="<"&&e.eat("#"))return r.tokenize=P,P(e,r);if(n==="#")return e.skipToEnd(),"comment";if(n==="@"){var l=e.eat(/["']/);if(l&&e.eol())return r.tokenize=s,r.startQuote=l[0],s(e,r);if(e.eol())return"error";if(e.peek().match(/[({]/))return"punctuation";if(e.peek().match(u))return c(e,r)}return"error"}function d(e,r){for(var t;(t=e.peek())!=null;)if(e.next(),t==="'"&&!e.eat("'"))return r.tokenize=i,"string";return"error"}function S(e,r){for(var t;(t=e.peek())!=null;){if(t==="$")return r.tokenize=v,"string";if(e.next(),t==="`"){e.next();continue}if(t==='"'&&!e.eat('"'))return r.tokenize=i,"string"}return"error"}function v(e,r){return f(e,r,S)}function b(e,r){return r.tokenize=s,r.startQuote='"',s(e,r)}function C(e,r){return f(e,r,b)}function f(e,r,t){if(e.match("$(")){var o=r.bracketNesting;return r.returnStack.push({shouldReturnFrom:function(n){return n.bracketNesting===o},tokenize:t}),r.tokenize=i,r.bracketNesting+=1,"punctuation"}else return e.next(),r.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:t}),r.tokenize=c,r.tokenize(e,r)}function P(e,r){for(var t=!1,o;(o=e.next())!=null;){if(t&&o==">"){r.tokenize=i;break}t=o==="#"}return"comment"}function c(e,r){var t=e.peek();return e.eat("{")?(r.tokenize=g,g(e,r)):t!=null&&t.match(u)?(e.eatWhile(u),r.tokenize=i,"variable"):(r.tokenize=i,"error")}function g(e,r){for(var t;(t=e.next())!=null;)if(t==="}"){r.tokenize=i;break}return"variable"}function s(e,r){var t=r.startQuote;if(e.sol()&&e.match(RegExp(t+"@")))r.tokenize=i;else if(t==='"')for(;!e.eol();){var o=e.peek();if(o==="$")return r.tokenize=C,"string";e.next(),o==="`"&&e.next()}else e.skipToEnd();return"string"}const k={name:"powershell",startState:function(){return{returnStack:[],bracketNesting:0,tokenize:i}},token:function(e,r){return r.tokenize(e,r)},languageData:{commentTokens:{line:"#",block:{open:"<#",close:"#>"}}}};export{k as t};
import{t as e}from"./powershell-BmnkAUC8.js";export{e as powerShell};
import{a as c}from"./defaultLocale-D_rSvXvJ.js";function e(r,t){return r==null||t==null?NaN:r<t?-1:r>t?1:r>=t?0:NaN}function N(r,t){return r==null||t==null?NaN:t<r?-1:t>r?1:t>=r?0:NaN}function g(r){let t,l,f;r.length===2?(t=r===e||r===N?r:x,l=r,f=r):(t=e,l=(n,u)=>e(r(n),u),f=(n,u)=>r(n)-u);function o(n,u,a=0,h=n.length){if(a<h){if(t(u,u)!==0)return h;do{let i=a+h>>>1;l(n[i],u)<0?a=i+1:h=i}while(a<h)}return a}function M(n,u,a=0,h=n.length){if(a<h){if(t(u,u)!==0)return h;do{let i=a+h>>>1;l(n[i],u)<=0?a=i+1:h=i}while(a<h)}return a}function s(n,u,a=0,h=n.length){let i=o(n,u,a,h-1);return i>a&&f(n[i-1],u)>-f(n[i],u)?i-1:i}return{left:o,center:s,right:M}}function x(){return 0}var b=Math.sqrt(50),p=Math.sqrt(10),q=Math.sqrt(2);function m(r,t,l){let f=(t-r)/Math.max(0,l),o=Math.floor(Math.log10(f)),M=f/10**o,s=M>=b?10:M>=p?5:M>=q?2:1,n,u,a;return o<0?(a=10**-o/s,n=Math.round(r*a),u=Math.round(t*a),n/a<r&&++n,u/a>t&&--u,a=-a):(a=10**o*s,n=Math.round(r/a),u=Math.round(t/a),n*a<r&&++n,u*a>t&&--u),u<n&&.5<=l&&l<2?m(r,t,l*2):[n,u,a]}function w(r,t,l){if(t=+t,r=+r,l=+l,!(l>0))return[];if(r===t)return[r];let f=t<r,[o,M,s]=f?m(t,r,l):m(r,t,l);if(!(M>=o))return[];let n=M-o+1,u=Array(n);if(f)if(s<0)for(let a=0;a<n;++a)u[a]=(M-a)/-s;else for(let a=0;a<n;++a)u[a]=(M-a)*s;else if(s<0)for(let a=0;a<n;++a)u[a]=(o+a)/-s;else for(let a=0;a<n;++a)u[a]=(o+a)*s;return u}function d(r,t,l){return t=+t,r=+r,l=+l,m(r,t,l)[2]}function v(r,t,l){t=+t,r=+r,l=+l;let f=t<r,o=f?d(t,r,l):d(r,t,l);return(f?-1:1)*(o<0?1/-o:o)}function y(r){return Math.max(0,-c(Math.abs(r)))}function A(r,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(c(t)/3)))*3-c(Math.abs(r)))}function j(r,t){return r=Math.abs(r),t=Math.abs(t)-r,Math.max(0,c(t)-c(r))+1}export{v as a,e as c,d as i,A as n,w as o,y as r,g as s,j as t};
var v="modulepreload",y=function(u,o){return new URL(u,o).href},m={};const E=function(u,o,d){let f=Promise.resolve();if(o&&o.length>0){let p=function(t){return Promise.all(t.map(l=>Promise.resolve(l).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))},n=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),h=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));f=p(o.map(t=>{if(t=y(t,d),t in m)return;m[t]=!0;let l=t.endsWith(".css"),s=l?'[rel="stylesheet"]':"";if(d)for(let a=n.length-1;a>=0;a--){let c=n[a];if(c.href===t&&(!l||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;let r=document.createElement("link");if(r.rel=l?"stylesheet":v,l||(r.as="script"),r.crossOrigin="",r.href=t,h&&r.setAttribute("nonce",h),document.head.appendChild(r),l)return new Promise((a,c)=>{r.addEventListener("load",a),r.addEventListener("error",()=>c(Error(`Unable to preload CSS for ${t}`)))})}))}function i(n){let e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=n,window.dispatchEvent(e),!e.defaultPrevented)throw n}return f.then(n=>{for(let e of n||[])e.status==="rejected"&&i(e.reason);return u().catch(i)})};export{E as t};
import{G as a,K as i,q as m}from"./cells-BpZ7g6ok.js";function e(t){return t.mimetype.startsWith("application/vnd.marimo")||t.mimetype==="text/html"?m(a.asString(t.data)):i(a.asString(t.data))}export{e as t};
import{t as o}from"./chunk-LvLJmgfZ.js";var f=o(((a,t)=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"})),u=o(((a,t)=>{var c=f();function p(){}function i(){}i.resetWarningCache=p,t.exports=function(){function e(h,m,T,O,_,y){if(y!==c){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}e.isRequired=e;function r(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:p};return n.PropTypes=n,n}})),l=o(((a,t)=>{t.exports=u()()}));export{l as t};
const l={name:"properties",token:function(n,i){var o=n.sol()||i.afterSection,t=n.eol();if(i.afterSection=!1,o&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),t&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),o)for(;n.eatSpace(););var e=n.next();return o&&(e==="#"||e==="!"||e===";")?(i.position="comment",n.skipToEnd(),"comment"):o&&e==="["?(i.afterSection=!0,n.skipTo("]"),n.eat("]"),"header"):e==="="||e===":"?(i.position="quote",null):(e==="\\"&&i.position==="quote"&&n.eol()&&(i.nextMultiline=!0),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}};export{l as t};
import{t as r}from"./properties-B3qF4Ofl.js";export{r as properties};
function e(t){return RegExp("^(("+t.join(")|(")+"))\\b","i")}var a="package.message.import.syntax.required.optional.repeated.reserved.default.extensions.packed.bool.bytes.double.enum.float.string.int32.int64.uint32.uint64.sint32.sint64.fixed32.fixed64.sfixed32.sfixed64.option.service.rpc.returns".split("."),n=e(a),i=RegExp("^[_A-Za-z\xA1-\uFFFF][_A-Za-z0-9\xA1-\uFFFF]*");function o(t){return t.eatSpace()?null:t.match("//")?(t.skipToEnd(),"comment"):t.match(/^[0-9\.+-]/,!1)&&(t.match(/^[+-]?0x[0-9a-fA-F]+/)||t.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||t.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":t.match(/^"([^"]|(""))*"/)||t.match(/^'([^']|(''))*'/)?"string":t.match(n)?"keyword":t.match(i)?"variable":(t.next(),null)}const r={name:"protobuf",token:o,languageData:{autocomplete:a}};export{r as t};
import{t as o}from"./protobuf-CdWFIAi_.js";export{o as protobuf};
import{t as e}from"./javascript-i8I6A_gg.js";var s={"{":"}","(":")","[":"]"};function p(i){if(typeof i!="object")return i;let t={};for(let n in i){let r=i[n];t[n]=r instanceof Array?r.slice():r}return t}var l=class f{constructor(t){this.indentUnit=t,this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=e.startState(t),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken=""}copy(){var t=new f(this.indentUnit);return t.javaScriptLine=this.javaScriptLine,t.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,t.javaScriptArguments=this.javaScriptArguments,t.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,t.isInterpolating=this.isInterpolating,t.interpolationNesting=this.interpolationNesting,t.jsState=(e.copyState||p)(this.jsState),t.restOfLine=this.restOfLine,t.isIncludeFiltered=this.isIncludeFiltered,t.isEach=this.isEach,t.lastTag=this.lastTag,t.isAttrs=this.isAttrs,t.attrsNest=this.attrsNest.slice(),t.inAttributeName=this.inAttributeName,t.attributeIsType=this.attributeIsType,t.attrValue=this.attrValue,t.indentOf=this.indentOf,t.indentToken=this.indentToken,t}};function h(i,t){if(i.sol()&&(t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1),t.javaScriptLine){if(t.javaScriptLineExcludesColon&&i.peek()===":"){t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1;return}var n=e.token(i,t.jsState);return i.eol()&&(t.javaScriptLine=!1),n||!0}}function m(i,t){if(t.javaScriptArguments){if(t.javaScriptArgumentsDepth===0&&i.peek()!=="("){t.javaScriptArguments=!1;return}if(i.peek()==="("?t.javaScriptArgumentsDepth++:i.peek()===")"&&t.javaScriptArgumentsDepth--,t.javaScriptArgumentsDepth===0){t.javaScriptArguments=!1;return}return e.token(i,t.jsState)||!0}}function d(i){if(i.match(/^yield\b/))return"keyword"}function v(i){if(i.match(/^(?:doctype) *([^\n]+)?/))return"meta"}function c(i,t){if(i.match("#{"))return t.isInterpolating=!0,t.interpolationNesting=0,"punctuation"}function S(i,t){if(t.isInterpolating){if(i.peek()==="}"){if(t.interpolationNesting--,t.interpolationNesting<0)return i.next(),t.isInterpolating=!1,"punctuation"}else i.peek()==="{"&&t.interpolationNesting++;return e.token(i,t.jsState)||!0}}function j(i,t){if(i.match(/^case\b/))return t.javaScriptLine=!0,"keyword"}function g(i,t){if(i.match(/^when\b/))return t.javaScriptLine=!0,t.javaScriptLineExcludesColon=!0,"keyword"}function k(i){if(i.match(/^default\b/))return"keyword"}function b(i,t){if(i.match(/^extends?\b/))return t.restOfLine="string","keyword"}function A(i,t){if(i.match(/^append\b/))return t.restOfLine="variable","keyword"}function L(i,t){if(i.match(/^prepend\b/))return t.restOfLine="variable","keyword"}function y(i,t){if(i.match(/^block\b *(?:(prepend|append)\b)?/))return t.restOfLine="variable","keyword"}function w(i,t){if(i.match(/^include\b/))return t.restOfLine="string","keyword"}function N(i,t){if(i.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&i.match("include"))return t.isIncludeFiltered=!0,"keyword"}function x(i,t){if(t.isIncludeFiltered){var n=u(i,t);return t.isIncludeFiltered=!1,t.restOfLine="string",n}}function T(i,t){if(i.match(/^mixin\b/))return t.javaScriptLine=!0,"keyword"}function I(i,t){if(i.match(/^\+([-\w]+)/))return i.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),"variable";if(i.match("+#{",!1))return i.next(),t.mixinCallAfter=!0,c(i,t)}function O(i,t){if(t.mixinCallAfter)return t.mixinCallAfter=!1,i.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),!0}function E(i,t){if(i.match(/^(if|unless|else if|else)\b/))return t.javaScriptLine=!0,"keyword"}function C(i,t){if(i.match(/^(- *)?(each|for)\b/))return t.isEach=!0,"keyword"}function D(i,t){if(t.isEach){if(i.match(/^ in\b/))return t.javaScriptLine=!0,t.isEach=!1,"keyword";if(i.sol()||i.eol())t.isEach=!1;else if(i.next()){for(;!i.match(/^ in\b/,!1)&&i.next(););return"variable"}}}function F(i,t){if(i.match(/^while\b/))return t.javaScriptLine=!0,"keyword"}function V(i,t){var n;if(n=i.match(/^(\w(?:[-:\w]*\w)?)\/?/))return t.lastTag=n[1].toLowerCase(),"tag"}function u(i,t){if(i.match(/^:([\w\-]+)/))return a(i,t),"atom"}function U(i,t){if(i.match(/^(!?=|-)/))return t.javaScriptLine=!0,"punctuation"}function z(i){if(i.match(/^#([\w-]+)/))return"builtin"}function B(i){if(i.match(/^\.([\w-]+)/))return"className"}function G(i,t){if(i.peek()=="(")return i.next(),t.isAttrs=!0,t.attrsNest=[],t.inAttributeName=!0,t.attrValue="",t.attributeIsType=!1,"punctuation"}function o(i,t){if(t.isAttrs){if(s[i.peek()]&&t.attrsNest.push(s[i.peek()]),t.attrsNest[t.attrsNest.length-1]===i.peek())t.attrsNest.pop();else if(i.eat(")"))return t.isAttrs=!1,"punctuation";if(t.inAttributeName&&i.match(/^[^=,\)!]+/))return(i.peek()==="="||i.peek()==="!")&&(t.inAttributeName=!1,t.jsState=e.startState(2),t.lastTag==="script"&&i.current().trim().toLowerCase()==="type"?t.attributeIsType=!0:t.attributeIsType=!1),"attribute";var n=e.token(i,t.jsState);if(t.attrsNest.length===0&&(n==="string"||n==="variable"||n==="keyword"))try{return Function("","var x "+t.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),t.inAttributeName=!0,t.attrValue="",i.backUp(i.current().length),o(i,t)}catch{}return t.attrValue+=i.current(),n||!0}}function H(i,t){if(i.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,"keyword"}function K(i){if(i.sol()&&i.eatSpace())return"indent"}function M(i,t){if(i.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=i.indentation(),t.indentToken="comment","comment"}function P(i){if(i.match(/^: */))return"colon"}function R(i,t){if(i.match(/^(?:\| ?| )([^\n]+)/))return"string";if(i.match(/^(<[^\n]*)/,!1))return a(i,t),i.skipToEnd(),t.indentToken}function W(i,t){if(i.eat("."))return a(i,t),"dot"}function Z(i){return i.next(),null}function a(i,t){t.indentOf=i.indentation(),t.indentToken="string"}function $(i,t){if(i.sol()&&(t.restOfLine=""),t.restOfLine){i.skipToEnd();var n=t.restOfLine;return t.restOfLine="",n}}function q(i){return new l(i)}function J(i){return i.copy()}function Q(i,t){var n=$(i,t)||S(i,t)||x(i,t)||D(i,t)||o(i,t)||h(i,t)||m(i,t)||O(i,t)||d(i)||v(i)||c(i,t)||j(i,t)||g(i,t)||k(i)||b(i,t)||A(i,t)||L(i,t)||y(i,t)||w(i,t)||N(i,t)||T(i,t)||I(i,t)||E(i,t)||C(i,t)||F(i,t)||V(i,t)||u(i,t)||U(i,t)||z(i)||B(i)||G(i,t)||H(i,t)||K(i)||R(i,t)||M(i,t)||P(i)||W(i,t)||Z(i);return n===!0?null:n}const X={startState:q,copyState:J,token:Q};export{X as t};
import{t as o}from"./pug-DEhrk7ZA.js";export{o as pug};
import{t as p}from"./puppet-oVG7sgNi.js";export{p as puppet};
var c={},l=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;function s(e,t){for(var a=t.split(" "),n=0;n<a.length;n++)c[a[n]]=e}s("keyword","class define site node include import inherits"),s("keyword","case if else in and elsif default or"),s("atom","false true running present absent file directory undef"),s("builtin","action augeas burst chain computer cron destination dport exec file filebucket group host icmp iniface interface jump k5login limit log_level log_prefix macauthorization mailalias maillist mcx mount nagios_command nagios_contact nagios_contactgroup nagios_host nagios_hostdependency nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo nagios_servicegroup nagios_timeperiod name notify outiface package proto reject resources router schedule scheduled_task selboolean selmodule service source sport ssh_authorized_key sshkey stage state table tidy todest toports tosource user vlan yumrepo zfs zone zpool");function r(e,t){for(var a,n,o=!1;!e.eol()&&(a=e.next())!=t.pending;){if(a==="$"&&n!="\\"&&t.pending=='"'){o=!0;break}n=a}return o&&e.backUp(1),a==t.pending?t.continueString=!1:t.continueString=!0,"string"}function p(e,t){var a=e.match(/[\w]+/,!1),n=e.match(/(\s+)?\w+\s+=>.*/,!1),o=e.match(/(\s+)?[\w:_]+(\s+)?{/,!1),u=e.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),i=e.next();if(i==="$")return e.match(l)?t.continueString?"variableName.special":"variable":"error";if(t.continueString)return e.backUp(1),r(e,t);if(t.inDefinition){if(e.match(/(\s+)?[\w:_]+(\s+)?/))return"def";e.match(/\s+{/),t.inDefinition=!1}return t.inInclude?(e.match(/(\s+)?\S+(\s+)?/),t.inInclude=!1,"def"):e.match(/(\s+)?\w+\(/)?(e.backUp(1),"def"):n?(e.match(/(\s+)?\w+/),"tag"):a&&c.hasOwnProperty(a)?(e.backUp(1),e.match(/[\w]+/),e.match(/\s+\S+\s+{/,!1)&&(t.inDefinition=!0),a=="include"&&(t.inInclude=!0),c[a]):/(^|\s+)[A-Z][\w:_]+/.test(a)?(e.backUp(1),e.match(/(^|\s+)[A-Z][\w:_]+/),"def"):o?(e.match(/(\s+)?[\w:_]+/),"def"):u?(e.match(/(\s+)?[@]{1,2}/),"atom"):i=="#"?(e.skipToEnd(),"comment"):i=="'"||i=='"'?(t.pending=i,r(e,t)):i=="{"||i=="}"?"bracket":i=="/"?(e.match(/^[^\/]*\//),"string.special"):i.match(/[0-9]/)?(e.eatWhile(/[0-9]+/),"number"):i=="="?(e.peek()==">"&&e.next(),"operator"):(e.eatWhile(/[\w-]/),null)}const d={name:"puppet",startState:function(){var e={};return e.inDefinition=!1,e.inInclude=!1,e.continueString=!1,e.pending=!1,e},token:function(e,t){return e.eatSpace()?null:p(e,t)}};export{d as t};
var{entries:rt,setPrototypeOf:ot,isFrozen:Ht,getPrototypeOf:Bt,getOwnPropertyDescriptor:Gt}=Object,{freeze:_,seal:b,create:De}=Object,{apply:at,construct:it}=typeof Reflect<"u"&&Reflect;_||(_=function(o){return o}),b||(b=function(o){return o}),at||(at=function(o,r){var c=[...arguments].slice(2);return o.apply(r,c)}),it||(it=function(o){return new o(...[...arguments].slice(1))});var le=A(Array.prototype.forEach),Wt=A(Array.prototype.lastIndexOf),lt=A(Array.prototype.pop),q=A(Array.prototype.push),Yt=A(Array.prototype.splice),ce=A(String.prototype.toLowerCase),Ce=A(String.prototype.toString),we=A(String.prototype.match),$=A(String.prototype.replace),jt=A(String.prototype.indexOf),Xt=A(String.prototype.trim),N=A(Object.prototype.hasOwnProperty),E=A(RegExp.prototype.test),K=qt(TypeError);function A(o){return function(r){r instanceof RegExp&&(r.lastIndex=0);var c=[...arguments].slice(1);return at(o,r,c)}}function qt(o){return function(){return it(o,[...arguments])}}function a(o,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ot&&ot(o,null);let s=r.length;for(;s--;){let S=r[s];if(typeof S=="string"){let R=c(S);R!==S&&(Ht(r)||(r[s]=R),S=R)}o[S]=!0}return o}function $t(o){for(let r=0;r<o.length;r++)N(o,r)||(o[r]=null);return o}function C(o){let r=De(null);for(let[c,s]of rt(o))N(o,c)&&(Array.isArray(s)?r[c]=$t(s):s&&typeof s=="object"&&s.constructor===Object?r[c]=C(s):r[c]=s);return r}function V(o,r){for(;o!==null;){let s=Gt(o,r);if(s){if(s.get)return A(s.get);if(typeof s.value=="function")return A(s.value)}o=Bt(o)}function c(){return null}return c}var ct=_("a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")),ve=_("svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")),Oe=_(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Kt=_(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ke=_("math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")),Vt=_(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),st=_(["#text"]),ut=_("accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot".split(".")),Le=_("accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")),mt=_("accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")),se=_(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Zt=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Jt=b(/<%[\w\W]*|[\w\W]*%>/gm),Qt=b(/\$\{[\w\W]*/gm),en=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),tn=b(/^aria-[\-\w]+$/),pt=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nn=b(/^(?:\w+script|data):/i),rn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ft=b(/^html$/i),on=b(/^[a-z][.\w]*(-[.\w]+)+$/i),dt=Object.freeze({__proto__:null,ARIA_ATTR:tn,ATTR_WHITESPACE:rn,CUSTOM_ELEMENT:on,DATA_ATTR:en,DOCTYPE_NAME:ft,ERB_EXPR:Jt,IS_ALLOWED_URI:pt,IS_SCRIPT_OR_DATA:nn,MUSTACHE_EXPR:Zt,TMPLIT_EXPR:Qt}),Z={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},an=function(){return typeof window>"u"?null:window},ln=function(o,r){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let c=null,s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(c=r.getAttribute(s));let S="dompurify"+(c?"#"+c:"");try{return o.createPolicy(S,{createHTML(R){return R},createScriptURL(R){return R}})}catch{return console.warn("TrustedTypes policy "+S+" could not be created."),null}},gt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ht(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:an(),r=e=>ht(e);if(r.version="3.3.1",r.removed=[],!o||!o.document||o.document.nodeType!==Z.document||!o.Element)return r.isSupported=!1,r;let{document:c}=o,s=c,S=s.currentScript,{DocumentFragment:R,HTMLTemplateElement:Tt,Node:ue,Element:xe,NodeFilter:B,NamedNodeMap:yt=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Et,DOMParser:At,trustedTypes:J}=o,G=xe.prototype,_t=V(G,"cloneNode"),bt=V(G,"remove"),Nt=V(G,"nextSibling"),St=V(G,"childNodes"),Q=V(G,"parentNode");if(typeof Tt=="function"){let e=c.createElement("template");e.content&&e.content.ownerDocument&&(c=e.content.ownerDocument)}let h,W="",{implementation:me,createNodeIterator:Rt,createDocumentFragment:Dt,getElementsByTagName:Ct}=c,{importNode:wt}=s,T=gt();r.isSupported=typeof rt=="function"&&typeof Q=="function"&&me&&me.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:pe,ERB_EXPR:fe,TMPLIT_EXPR:de,DATA_ATTR:vt,ARIA_ATTR:Ot,IS_SCRIPT_OR_DATA:kt,ATTR_WHITESPACE:Ie,CUSTOM_ELEMENT:Lt}=dt,{IS_ALLOWED_URI:Me}=dt,p=null,Ue=a({},[...ct,...ve,...Oe,...ke,...st]),f=null,Pe=a({},[...ut,...Le,...mt,...se]),u=Object.seal(De(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,ge=null,M=Object.seal(De(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Fe=!0,he=!0,ze=!1,He=!0,U=!1,ee=!0,k=!1,Te=!1,ye=!1,P=!1,te=!1,ne=!1,Be=!0,Ge=!1,Ee=!0,j=!1,F={},D=null,Ae=a({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),We=null,Ye=a({},["audio","video","img","source","image","track"]),_e=null,je=a({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",w="http://www.w3.org/1999/xhtml",z=w,be=!1,Ne=null,xt=a({},[re,oe,w],Ce),ae=a({},["mi","mo","mn","ms","mtext"]),ie=a({},["annotation-xml"]),It=a({},["title","style","font","a","script"]),X=null,Mt=["application/xhtml+xml","text/html"],m=null,H=null,Ut=c.createElement("form"),Xe=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),X=Mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?"text/html":e.PARSER_MEDIA_TYPE,m=X==="application/xhtml+xml"?Ce:ce,p=N(e,"ALLOWED_TAGS")?a({},e.ALLOWED_TAGS,m):Ue,f=N(e,"ALLOWED_ATTR")?a({},e.ALLOWED_ATTR,m):Pe,Ne=N(e,"ALLOWED_NAMESPACES")?a({},e.ALLOWED_NAMESPACES,Ce):xt,_e=N(e,"ADD_URI_SAFE_ATTR")?a(C(je),e.ADD_URI_SAFE_ATTR,m):je,We=N(e,"ADD_DATA_URI_TAGS")?a(C(Ye),e.ADD_DATA_URI_TAGS,m):Ye,D=N(e,"FORBID_CONTENTS")?a({},e.FORBID_CONTENTS,m):Ae,Y=N(e,"FORBID_TAGS")?a({},e.FORBID_TAGS,m):C({}),ge=N(e,"FORBID_ATTR")?a({},e.FORBID_ATTR,m):C({}),F=N(e,"USE_PROFILES")?e.USE_PROFILES:!1,Fe=e.ALLOW_ARIA_ATTR!==!1,he=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,He=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,U=e.SAFE_FOR_TEMPLATES||!1,ee=e.SAFE_FOR_XML!==!1,k=e.WHOLE_DOCUMENT||!1,P=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,Be=e.SANITIZE_DOM!==!1,Ge=e.SANITIZE_NAMED_PROPS||!1,Ee=e.KEEP_CONTENT!==!1,j=e.IN_PLACE||!1,Me=e.ALLOWED_URI_REGEXP||pt,z=e.NAMESPACE||w,ae=e.MATHML_TEXT_INTEGRATION_POINTS||ae,ie=e.HTML_INTEGRATION_POINTS||ie,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Xe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Xe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),U&&(he=!1),te&&(P=!0),F&&(p=a({},st),f=[],F.html===!0&&(a(p,ct),a(f,ut)),F.svg===!0&&(a(p,ve),a(f,Le),a(f,se)),F.svgFilters===!0&&(a(p,Oe),a(f,Le),a(f,se)),F.mathMl===!0&&(a(p,ke),a(f,mt),a(f,se))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?M.tagCheck=e.ADD_TAGS:(p===Ue&&(p=C(p)),a(p,e.ADD_TAGS,m))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?M.attributeCheck=e.ADD_ATTR:(f===Pe&&(f=C(f)),a(f,e.ADD_ATTR,m))),e.ADD_URI_SAFE_ATTR&&a(_e,e.ADD_URI_SAFE_ATTR,m),e.FORBID_CONTENTS&&(D===Ae&&(D=C(D)),a(D,e.FORBID_CONTENTS,m)),e.ADD_FORBID_CONTENTS&&(D===Ae&&(D=C(D)),a(D,e.ADD_FORBID_CONTENTS,m)),Ee&&(p["#text"]=!0),k&&a(p,["html","head","body"]),p.table&&(a(p,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');h=e.TRUSTED_TYPES_POLICY,W=h.createHTML("")}else h===void 0&&(h=ln(J,S)),h!==null&&typeof W=="string"&&(W=h.createHTML(""));_&&_(e),H=e}},qe=a({},[...ve,...Oe,...Kt]),$e=a({},[...ke,...Vt]),Pt=function(e){let n=Q(e);(!n||!n.tagName)&&(n={namespaceURI:z,tagName:"template"});let t=ce(e.tagName),i=ce(n.tagName);return Ne[e.namespaceURI]?e.namespaceURI===oe?n.namespaceURI===w?t==="svg":n.namespaceURI===re?t==="svg"&&(i==="annotation-xml"||ae[i]):!!qe[t]:e.namespaceURI===re?n.namespaceURI===w?t==="math":n.namespaceURI===oe?t==="math"&&ie[i]:!!$e[t]:e.namespaceURI===w?n.namespaceURI===oe&&!ie[i]||n.namespaceURI===re&&!ae[i]?!1:!$e[t]&&(It[t]||!qe[t]):!!(X==="application/xhtml+xml"&&Ne[e.namespaceURI]):!1},L=function(e){q(r.removed,{element:e});try{Q(e).removeChild(e)}catch{bt(e)}},x=function(e,n){try{q(r.removed,{attribute:n.getAttributeNode(e),from:n})}catch{q(r.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is")if(P||te)try{L(n)}catch{}else try{n.setAttribute(e,"")}catch{}},Ke=function(e){let n=null,t=null;if(ye)e="<remove></remove>"+e;else{let y=we(e,/^[\r\n\t ]+/);t=y&&y[0]}X==="application/xhtml+xml"&&z===w&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let i=h?h.createHTML(e):e;if(z===w)try{n=new At().parseFromString(i,X)}catch{}if(!n||!n.documentElement){n=me.createDocument(z,"template",null);try{n.documentElement.innerHTML=be?W:i}catch{}}let l=n.body||n.documentElement;return e&&t&&l.insertBefore(c.createTextNode(t),l.childNodes[0]||null),z===w?Ct.call(n,k?"html":"body")[0]:k?n.documentElement:l},Ve=function(e){return Rt.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof Et&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof yt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},Ze=function(e){return typeof ue=="function"&&e instanceof ue};function v(e,n,t){le(e,i=>{i.call(r,n,t,H)})}let Je=function(e){let n=null;if(v(T.beforeSanitizeElements,e,null),Re(e))return L(e),!0;let t=m(e.nodeName);if(v(T.uponSanitizeElement,e,{tagName:t,allowedTags:p}),ee&&e.hasChildNodes()&&!Ze(e.firstElementChild)&&E(/<[/\w!]/g,e.innerHTML)&&E(/<[/\w!]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ee&&e.nodeType===Z.comment&&E(/<[/\w]/g,e.data))return L(e),!0;if(!(M.tagCheck instanceof Function&&M.tagCheck(t))&&(!p[t]||Y[t])){if(!Y[t]&&et(t)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t)))return!1;if(Ee&&!D[t]){let i=Q(e)||e.parentNode,l=St(e)||e.childNodes;if(l&&i){let y=l.length;for(let I=y-1;I>=0;--I){let g=_t(l[I],!0);g.__removalCount=(e.__removalCount||0)+1,i.insertBefore(g,Nt(e))}}}return L(e),!0}return e instanceof xe&&!Pt(e)||(t==="noscript"||t==="noembed"||t==="noframes")&&E(/<\/no(script|embed|frames)/i,e.innerHTML)?(L(e),!0):(U&&e.nodeType===Z.text&&(n=e.textContent,le([pe,fe,de],i=>{n=$(n,i," ")}),e.textContent!==n&&(q(r.removed,{element:e.cloneNode()}),e.textContent=n)),v(T.afterSanitizeElements,e,null),!1)},Qe=function(e,n,t){if(Be&&(n==="id"||n==="name")&&(t in c||t in Ut))return!1;if(!(he&&!ge[n]&&E(vt,n))&&!(Fe&&E(Ot,n))&&!(M.attributeCheck instanceof Function&&M.attributeCheck(n,e))){if(!f[n]||ge[n]){if(!(et(e)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&E(u.attributeNameCheck,n)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(n,e))||n==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t))))return!1}else if(!_e[n]&&!E(Me,$(t,Ie,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&jt(t,"data:")===0&&We[e])&&!(ze&&!E(kt,$(t,Ie,"")))&&t)return!1}return!0},et=function(e){return e!=="annotation-xml"&&we(e,Lt)},tt=function(e){v(T.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Re(e))return;let t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:l,namespaceURI:y,value:I}=n[i],g=m(l),O=I,d=l==="value"?O:Xt(O);if(t.attrName=g,t.attrValue=d,t.keepAttr=!0,t.forceKeepAttr=void 0,v(T.uponSanitizeAttribute,e,t),d=t.attrValue,Ge&&(g==="id"||g==="name")&&(x(l,e),d="user-content-"+d),ee&&E(/((--!?|])>)|<\/(style|title|textarea)/i,d)){x(l,e);continue}if(g==="attributename"&&we(d,"href")){x(l,e);continue}if(t.forceKeepAttr)continue;if(!t.keepAttr){x(l,e);continue}if(!He&&E(/\/>/i,d)){x(l,e);continue}U&&le([pe,fe,de],zt=>{d=$(d,zt," ")});let nt=m(e.nodeName);if(!Qe(nt,g,d)){x(l,e);continue}if(h&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!y)switch(J.getAttributeType(nt,g)){case"TrustedHTML":d=h.createHTML(d);break;case"TrustedScriptURL":d=h.createScriptURL(d);break}if(d!==O)try{y?e.setAttributeNS(y,l,d):e.setAttribute(l,d),Re(e)?L(e):lt(r.removed)}catch{x(l,e)}}v(T.afterSanitizeAttributes,e,null)},Ft=function e(n){let t=null,i=Ve(n);for(v(T.beforeSanitizeShadowDOM,n,null);t=i.nextNode();)v(T.uponSanitizeShadowNode,t,null),Je(t),tt(t),t.content instanceof R&&e(t.content);v(T.afterSanitizeShadowDOM,n,null)};return r.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,i=null,l=null,y=null;if(be=!e,be&&(e="<!-->"),typeof e!="string"&&!Ze(e))if(typeof e.toString=="function"){if(e=e.toString(),typeof e!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!r.isSupported)return e;if(Te||Se(n),r.removed=[],typeof e=="string"&&(j=!1),j){if(e.nodeName){let O=m(e.nodeName);if(!p[O]||Y[O])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof ue)t=Ke("<!---->"),i=t.ownerDocument.importNode(e,!0),i.nodeType===Z.element&&i.nodeName==="BODY"||i.nodeName==="HTML"?t=i:t.appendChild(i);else{if(!P&&!U&&!k&&e.indexOf("<")===-1)return h&&ne?h.createHTML(e):e;if(t=Ke(e),!t)return P?null:ne?W:""}t&&ye&&L(t.firstChild);let I=Ve(j?e:t);for(;l=I.nextNode();)Je(l),tt(l),l.content instanceof R&&Ft(l.content);if(j)return e;if(P){if(te)for(y=Dt.call(t.ownerDocument);t.firstChild;)y.appendChild(t.firstChild);else y=t;return(f.shadowroot||f.shadowrootmode)&&(y=wt.call(s,y,!0)),y}let g=k?t.outerHTML:t.innerHTML;return k&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(ft,t.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
`+g),U&&le([pe,fe,de],O=>{g=$(g,O," ")}),h&&ne?h.createHTML(g):g},r.setConfig=function(){Se(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Te=!0},r.clearConfig=function(){H=null,Te=!1},r.isValidAttribute=function(e,n,t){return H||Se({}),Qe(m(e),m(n),t)},r.addHook=function(e,n){typeof n=="function"&&q(T[e],n)},r.removeHook=function(e,n){if(n!==void 0){let t=Wt(T[e],n);return t===-1?void 0:Yt(T[e],t,1)[0]}return lt(T[e])},r.removeHooks=function(e){T[e]=[]},r.removeAllHooks=function(){T=gt()},r}var cn=ht();export{cn as t};
import{n as t,r as a,t as o}from"./python-GCb3koKb.js";export{o as cython,t as mkPython,a as python};
function k(i){return RegExp("^(("+i.join(")|(")+"))\\b")}var Z=k(["and","or","not","is"]),L="as.assert.break.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.lambda.pass.raise.return.try.while.with.yield.in.False.True".split("."),O="abs.all.any.bin.bool.bytearray.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip.__import__.NotImplemented.Ellipsis.__debug__".split(".");function s(i){return i.scopes[i.scopes.length-1]}function v(i){for(var u="error",S=i.delimiters||i.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,d=[i.singleOperators,i.doubleOperators,i.doubleDelimiters,i.tripleDelimiters,i.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],m=0;m<d.length;m++)d[m]||d.splice(m--,1);var g=i.hangingIndent,f=L,p=O;i.extra_keywords!=null&&(f=f.concat(i.extra_keywords)),i.extra_builtins!=null&&(p=p.concat(i.extra_builtins));var x=!(i.version&&Number(i.version)<3);if(x){var h=i.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;f=f.concat(["nonlocal","None","aiter","anext","async","await","breakpoint","match","case"]),p=p.concat(["ascii","bytes","exec","print"]);var _=RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`,"i")}else{var h=i.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;f=f.concat(["exec","print"]),p=p.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","None"]);var _=RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`,"i")}var E=k(f),A=k(p);function z(e,n){var r=e.sol()&&n.lastToken!="\\";if(r&&(n.indent=e.indentation()),r&&s(n).type=="py"){var t=s(n).offset;if(e.eatSpace()){var o=e.indentation();return o>t?w(e,n):o<t&&T(e,n)&&e.peek()!="#"&&(n.errorToken=!0),null}else{var l=y(e,n);return t>0&&T(e,n)&&(l+=" "+u),l}}return y(e,n)}function y(e,n,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var t=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(t=!0),e.match(/^[\d_]+\.\d*/)&&(t=!0),e.match(/^\.\d+/)&&(t=!0),t)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(_))return e.current().toLowerCase().indexOf("f")===-1?(n.tokenize=I(e.current(),n.tokenize),n.tokenize(e,n)):(n.tokenize=D(e.current(),n.tokenize),n.tokenize(e,n));for(var l=0;l<d.length;l++)if(e.match(d[l]))return"operator";return e.match(S)?"punctuation":n.lastToken=="."&&e.match(h)?"property":e.match(E)||e.match(Z)?"keyword":e.match(A)?"builtin":e.match(/^(self|cls)\b/)?"self":e.match(h)?n.lastToken=="def"||n.lastToken=="class"?"def":"variable":(e.next(),r?null:u)}function D(e,n){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var r=e.length==1,t="string";function o(a){return function(c,b){var F=y(c,b,!0);return F=="punctuation"&&(c.current()=="{"?b.tokenize=o(a+1):c.current()=="}"&&(a>1?b.tokenize=o(a-1):b.tokenize=l)),F}}function l(a,c){for(;!a.eol();)if(a.eatWhile(/[^'"\{\}\\]/),a.eat("\\")){if(a.next(),r&&a.eol())return t}else{if(a.match(e))return c.tokenize=n,t;if(a.match("{{"))return t;if(a.match("{",!1))return c.tokenize=o(0),a.current()?t:c.tokenize(a,c);if(a.match("}}"))return t;if(a.match("}"))return u;a.eat(/['"]/)}if(r){if(i.singleLineStringErrors)return u;c.tokenize=n}return t}return l.isString=!0,l}function I(e,n){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var r=e.length==1,t="string";function o(l,a){for(;!l.eol();)if(l.eatWhile(/[^'"\\]/),l.eat("\\")){if(l.next(),r&&l.eol())return t}else{if(l.match(e))return a.tokenize=n,t;l.eat(/['"]/)}if(r){if(i.singleLineStringErrors)return u;a.tokenize=n}return t}return o.isString=!0,o}function w(e,n){for(;s(n).type!="py";)n.scopes.pop();n.scopes.push({offset:s(n).offset+e.indentUnit,type:"py",align:null})}function C(e,n,r){var t=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;n.scopes.push({offset:n.indent+(g||e.indentUnit),type:r,align:t})}function T(e,n){for(var r=e.indentation();n.scopes.length>1&&s(n).offset>r;){if(s(n).type!="py")return!0;n.scopes.pop()}return s(n).offset!=r}function N(e,n){e.sol()&&(n.beginningOfLine=!0,n.dedent=!1);var r=n.tokenize(e,n),t=e.current();if(n.beginningOfLine&&t=="@")return e.match(h,!1)?"meta":x?"operator":u;if(/\S/.test(t)&&(n.beginningOfLine=!1),(r=="variable"||r=="builtin")&&n.lastToken=="meta"&&(r="meta"),(t=="pass"||t=="return")&&(n.dedent=!0),t=="lambda"&&(n.lambda=!0),t==":"&&!n.lambda&&s(n).type=="py"&&e.match(/^\s*(?:#|$)/,!1)&&w(e,n),t.length==1&&!/string|comment/.test(r)){var o="[({".indexOf(t);if(o!=-1&&C(e,n,"])}".slice(o,o+1)),o="])}".indexOf(t),o!=-1)if(s(n).type==t)n.indent=n.scopes.pop().offset-(g||e.indentUnit);else return u}return n.dedent&&e.eol()&&s(n).type=="py"&&n.scopes.length>1&&n.scopes.pop(),r}return{name:"python",startState:function(){return{tokenize:z,scopes:[{offset:0,type:"py",align:null}],indent:0,lastToken:null,lambda:!1,dedent:0}},token:function(e,n){var r=n.errorToken;r&&(n.errorToken=!1);var t=N(e,n);return t&&t!="comment"&&(n.lastToken=t=="keyword"||t=="punctuation"?e.current():t),t=="punctuation"&&(t=null),e.eol()&&n.lambda&&(n.lambda=!1),r?u:t},indent:function(e,n,r){if(e.tokenize!=z)return e.tokenize.isString?null:0;var t=s(e),o=t.type==n.charAt(0)||t.type=="py"&&!e.dedent&&/^(else:|elif |except |finally:)/.test(n);return t.align==null?t.offset-(o?g||r.unit:0):t.align-(o?1:0)},languageData:{autocomplete:L.concat(O).concat(["exec","print"]),indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,commentTokens:{line:"#"},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}}}var R=function(i){return i.split(" ")};const U=v({}),$=v({extra_keywords:R("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")});export{v as n,U as r,$ as t};
import{t as o}from"./q-CylRV6ad.js";export{o as q};
var s,u=d("abs.acos.aj.aj0.all.and.any.asc.asin.asof.atan.attr.avg.avgs.bin.by.ceiling.cols.cor.cos.count.cov.cross.csv.cut.delete.deltas.desc.dev.differ.distinct.div.do.each.ej.enlist.eval.except.exec.exit.exp.fby.fills.first.fkeys.flip.floor.from.get.getenv.group.gtime.hclose.hcount.hdel.hopen.hsym.iasc.idesc.if.ij.in.insert.inter.inv.key.keys.last.like.list.lj.load.log.lower.lsq.ltime.ltrim.mavg.max.maxs.mcount.md5.mdev.med.meta.min.mins.mmax.mmin.mmu.mod.msum.neg.next.not.null.or.over.parse.peach.pj.plist.prd.prds.prev.prior.rand.rank.ratios.raze.read0.read1.reciprocal.reverse.rload.rotate.rsave.rtrim.save.scan.select.set.setenv.show.signum.sin.sqrt.ss.ssr.string.sublist.sum.sums.sv.system.tables.tan.til.trim.txf.type.uj.ungroup.union.update.upper.upsert.value.var.view.views.vs.wavg.where.where.while.within.wj.wj1.wsum.xasc.xbar.xcol.xcols.xdesc.xexp.xgroup.xkey.xlog.xprev.xrank".split(".")),m=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;function d(t){return RegExp("^("+t.join("|")+")$")}function a(t,e){var i=t.sol(),o=t.next();if(s=null,i){if(o=="/")return(e.tokenize=p)(t,e);if(o=="\\")return t.eol()||/\s/.test(t.peek())?(t.skipToEnd(),/^\\\s*$/.test(t.current())?(e.tokenize=f)(t):e.tokenize=a,"comment"):(e.tokenize=a,"builtin")}if(/\s/.test(o))return t.peek()=="/"?(t.skipToEnd(),"comment"):"null";if(o=='"')return(e.tokenize=v)(t,e);if(o=="`")return t.eatWhile(/[A-Za-z\d_:\/.]/),"macroName";if(o=="."&&/\d/.test(t.peek())||/\d/.test(o)){var n=null;return t.backUp(1),t.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||t.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||t.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||t.match(/^\d+[ptuv]{1}/)?n="temporal":(t.match(/^0[NwW]{1}/)||t.match(/^0x[\da-fA-F]*/)||t.match(/^[01]+[b]{1}/)||t.match(/^\d+[chijn]{1}/)||t.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(n="number"),n&&(!(o=t.peek())||m.test(o))?n:(t.next(),"error")}return/[A-Za-z]|\./.test(o)?(t.eatWhile(/[A-Za-z._\d]/),u.test(t.current())?"keyword":"variable"):/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(o)||/[{}\(\[\]\)]/.test(o)?null:"error"}function p(t,e){return t.skipToEnd(),/^\/\s*$/.test(t.current())?(e.tokenize=x)(t,e):e.tokenize=a,"comment"}function x(t,e){var i=t.sol()&&t.peek()=="\\";return t.skipToEnd(),i&&/^\\\s*$/.test(t.current())&&(e.tokenize=a),"comment"}function f(t){return t.skipToEnd(),"comment"}function v(t,e){for(var i=!1,o,n=!1;o=t.next();){if(o=='"'&&!i){n=!0;break}i=!i&&o=="\\"}return n&&(e.tokenize=a),"string"}function c(t,e,i){t.context={prev:t.context,indent:t.indent,col:i,type:e}}function r(t){t.indent=t.context.indent,t.context=t.context.prev}const k={name:"q",startState:function(){return{tokenize:a,context:null,indent:0,col:0}},token:function(t,e){t.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=t.indentation());var i=e.tokenize(t,e);if(i!="comment"&&e.context&&e.context.align==null&&e.context.type!="pattern"&&(e.context.align=!0),s=="(")c(e,")",t.column());else if(s=="[")c(e,"]",t.column());else if(s=="{")c(e,"}",t.column());else if(/[\]\}\)]/.test(s)){for(;e.context&&e.context.type=="pattern";)r(e);e.context&&s==e.context.type&&r(e)}else s=="."&&e.context&&e.context.type=="pattern"?r(e):/atom|string|variable/.test(i)&&e.context&&(/[\}\]]/.test(e.context.type)?c(e,"pattern",t.column()):e.context.type=="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=t.column()));return i},indent:function(t,e,i){var o=e&&e.charAt(0),n=t.context;if(/[\]\}]/.test(o))for(;n&&n.type=="pattern";)n=n.prev;var l=n&&o==n.type;return n?n.type=="pattern"?n.col:n.align?n.col+(l?0:1):n.indent+(l?0:i.unit):0},languageData:{commentTokens:{line:"/"}}};export{k as t};
var lt,ht;import{t as ee}from"./linear-DjglEiG4.js";import"./defaultLocale-D_rSvXvJ.js";import"./purify.es-DNVQZNFu.js";import{u as ie}from"./src-Cf4NnJCp.js";import{n as r,r as At}from"./src-BKLwm2RN.js";import{B as _e,C as ae,I as Se,T as ke,U as Fe,_ as Pe,a as Ce,b as vt,c as Le,d as z,v as ve,z as Ee}from"./chunk-ABZYJK2D-t8l6Viza.js";var Et=(function(){var t=r(function(n,b,g,h){for(g||(g={}),h=n.length;h--;g[n[h]]=b);return g},"o"),o=[1,3],u=[1,4],c=[1,5],l=[1,6],x=[1,7],f=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],_=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],m=[2,36],p=[1,37],y=[1,36],q=[1,38],T=[1,35],d=[1,43],A=[1,41],M=[1,14],Y=[1,23],j=[1,18],pt=[1,19],ct=[1,20],dt=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],i=[1,26],Dt=[1,27],It=[1,28],Nt=[1,29],$=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],C=[1,42],L=[1,44],X=[1,62],H=[1,61],v=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],wt=[1,65],Bt=[1,66],Wt=[1,67],Rt=[1,68],$t=[1,69],Ut=[1,70],Qt=[1,71],Xt=[1,72],Ht=[1,73],Ot=[1,74],Mt=[1,75],Yt=[1,76],N=[4,5,6,7,8,9,10,11,12,13,14,15,18],V=[1,90],Z=[1,91],J=[1,92],tt=[1,99],et=[1,93],it=[1,96],at=[1,94],nt=[1,95],st=[1,97],rt=[1,98],St=[1,102],jt=[10,55,56,57],B=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(n,b,g,h,S,e,gt){var s=e.length-1;switch(S){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],h.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),h.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),h.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),h.setAccDescription(this.$);break;case 46:h.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:h.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:h.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:h.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:h.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:h.setXAxisLeftText(e[s-2]),h.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" \u27F6 ",h.setXAxisLeftText(e[s-1]);break;case 53:h.setXAxisLeftText(e[s]);break;case 54:h.setYAxisBottomText(e[s-2]),h.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" \u27F6 ",h.setYAxisBottomText(e[s-1]);break;case 56:h.setYAxisBottomText(e[s]);break;case 57:h.setQuadrant1Text(e[s]);break;case 58:h.setQuadrant2Text(e[s]);break;case 59:h.setQuadrant3Text(e[s]);break;case 60:h.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:o,26:1,27:2,28:u,55:c,56:l,57:x},{1:[3]},{18:o,26:8,27:2,28:u,55:c,56:l,57:x},{18:o,26:9,27:2,28:u,55:c,56:l,57:x},t(f,[2,33],{29:10}),t(_,[2,61]),t(_,[2,62]),t(_,[2,63]),{1:[2,30]},{1:[2,31]},t(a,m,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:p,5:y,10:q,12:T,13:d,14:A,18:M,25:Y,35:j,37:pt,39:ct,41:dt,42:ut,48:xt,50:ft,51:i,52:Dt,53:It,54:Nt,60:$,61:U,63:k,64:F,65:P,66:C,67:L}),t(f,[2,34]),{27:45,55:c,56:l,57:x},t(a,[2,37]),t(a,m,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:p,5:y,10:q,12:T,13:d,14:A,18:M,25:Y,35:j,37:pt,39:ct,41:dt,42:ut,48:xt,50:ft,51:i,52:Dt,53:It,54:Nt,60:$,61:U,63:k,64:F,65:P,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:p,5:y,10:q,12:T,13:d,14:A,43:51,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:52,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:53,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:54,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:55,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,10:q,12:T,13:d,14:A,43:56,58:31,60:$,61:U,63:k,64:F,65:P,66:C,67:L},{4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:C,67:L},t(v,[2,64]),t(v,[2,66]),t(v,[2,67]),t(v,[2,70]),t(v,[2,71]),t(v,[2,72]),t(v,[2,73]),t(v,[2,74]),t(v,[2,75]),t(v,[2,76]),t(v,[2,77]),t(v,[2,78]),t(v,[2,79]),t(v,[2,80]),t(f,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:wt,5:Bt,6:Wt,7:Rt,8:$t,9:Ut,10:Qt,11:Xt,12:Ht,13:Ot,14:Mt,15:Yt,21:63},t(a,[2,53],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,49:[1,77],63:k,64:F,65:P,66:C,67:L}),t(a,[2,56],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,49:[1,78],63:k,64:F,65:P,66:C,67:L}),t(a,[2,57],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,58],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,59],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,60],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),{45:[1,79]},{44:[1,80]},t(v,[2,65]),t(v,[2,81]),t(v,[2,82]),t(v,[2,83]),{3:82,4:wt,5:Bt,6:Wt,7:Rt,8:$t,9:Ut,10:Qt,11:Xt,12:Ht,13:Ot,14:Mt,15:Yt,18:[1,81]},t(N,[2,23]),t(N,[2,1]),t(N,[2,2]),t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),t(N,[2,9]),t(N,[2,10]),t(N,[2,11]),t(N,[2,12]),t(a,[2,52],{58:31,43:83,4:p,5:y,10:q,12:T,13:d,14:A,60:$,61:U,63:k,64:F,65:P,66:C,67:L}),t(a,[2,55],{58:31,43:84,4:p,5:y,10:q,12:T,13:d,14:A,60:$,61:U,63:k,64:F,65:P,66:C,67:L}),{46:[1,85]},{45:[1,86]},{4:V,5:Z,6:J,8:tt,11:et,13:it,16:89,17:at,18:nt,19:st,20:rt,22:88,23:87},t(N,[2,24]),t(a,[2,51],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,54],{59:59,58:60,4:p,5:y,8:X,10:q,12:T,13:d,14:A,18:H,63:k,64:F,65:P,66:C,67:L}),t(a,[2,47],{22:88,16:89,23:100,4:V,5:Z,6:J,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),{46:[1,101]},t(a,[2,29],{10:St}),t(jt,[2,27],{16:103,4:V,5:Z,6:J,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),t(B,[2,25]),t(B,[2,13]),t(B,[2,14]),t(B,[2,15]),t(B,[2,16]),t(B,[2,17]),t(B,[2,18]),t(B,[2,19]),t(B,[2,20]),t(B,[2,21]),t(B,[2,22]),t(a,[2,49],{10:St}),t(a,[2,48],{22:88,16:89,23:104,4:V,5:Z,6:J,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt}),{4:V,5:Z,6:J,8:tt,11:et,13:it,16:89,17:at,18:nt,19:st,20:rt,22:105},t(B,[2,26]),t(a,[2,50],{10:St}),t(jt,[2,28],{16:103,4:V,5:Z,6:J,8:tt,11:et,13:it,17:at,18:nt,19:st,20:rt})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(n,b){if(b.recoverable)this.trace(n);else{var g=Error(n);throw g.hash=b,g}},"parseError"),parse:r(function(n){var b=this,g=[0],h=[],S=[null],e=[],gt=this.table,s="",mt=0,Gt=0,Kt=0,Te=2,Vt=1,qe=e.slice.call(arguments,1),E=Object.create(this.lexer),G={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(G.yy[Ft]=this.yy[Ft]);E.setInput(n,G.yy),G.yy.lexer=E,G.yy.parser=this,E.yylloc===void 0&&(E.yylloc={});var Pt=E.yylloc;e.push(Pt);var Ae=E.options&&E.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){g.length-=2*R,S.length-=R,e.length-=R}r(be,"popStack");function Zt(){var R=h.pop()||E.lex()||Vt;return typeof R!="number"&&(R instanceof Array&&(h=R,R=h.pop()),R=b.symbols_[R]||R),R}r(Zt,"lex");for(var w,Ct,K,W,Lt,ot={},Tt,O,Jt,qt;;){if(K=g[g.length-1],this.defaultActions[K]?W=this.defaultActions[K]:(w??(w=Zt()),W=gt[K]&&gt[K][w]),W===void 0||!W.length||!W[0]){var te="";for(Tt in qt=[],gt[K])this.terminals_[Tt]&&Tt>Te&&qt.push("'"+this.terminals_[Tt]+"'");te=E.showPosition?"Parse error on line "+(mt+1)+`:
`+E.showPosition()+`
Expecting `+qt.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(mt+1)+": Unexpected "+(w==Vt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(te,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:Pt,expected:qt})}if(W[0]instanceof Array&&W.length>1)throw Error("Parse Error: multiple actions possible at state: "+K+", token: "+w);switch(W[0]){case 1:g.push(w),S.push(E.yytext),e.push(E.yylloc),g.push(W[1]),w=null,Ct?(w=Ct,Ct=null):(Gt=E.yyleng,s=E.yytext,mt=E.yylineno,Pt=E.yylloc,Kt>0&&Kt--);break;case 2:if(O=this.productions_[W[1]][1],ot.$=S[S.length-O],ot._$={first_line:e[e.length-(O||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(O||1)].first_column,last_column:e[e.length-1].last_column},Ae&&(ot._$.range=[e[e.length-(O||1)].range[0],e[e.length-1].range[1]]),Lt=this.performAction.apply(ot,[s,Gt,mt,G.yy,W[1],S,e].concat(qe)),Lt!==void 0)return Lt;O&&(g=g.slice(0,-1*O*2),S=S.slice(0,-1*O),e=e.slice(0,-1*O)),g.push(this.productions_[W[1]][0]),S.push(ot.$),e.push(ot._$),Jt=gt[g[g.length-2]][g[g.length-1]],g.push(Jt);break;case 3:return!0}}return!0},"parse")};kt.lexer=(function(){return{EOF:1,parseError:r(function(n,b){if(this.yy.parser)this.yy.parser.parseError(n,b);else throw Error(n)},"parseError"),setInput:r(function(n,b){return this.yy=b||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:r(function(){var n=this._input[0];return this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n,n.match(/(?:\r\n?|\n).*/g)?(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:r(function(n){var b=n.length,g=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var h=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 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:g?(g.length===h.length?this.yylloc.first_column:0)+h[h.length-g.length].length-g[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(n){this.unput(this.match.slice(n))},"less"),pastInput:r(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:r(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:r(function(){var n=this.pastInput(),b=Array(n.length+1).join("-");return n+this.upcomingInput()+`
`+b+"^"},"showPosition"),test_match:r(function(n,b){var g,h,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))),h=n[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.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],g=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in S)this[e]=S[e];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,b,g,h;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),e=0;e<S.length;e++)if(g=this._input.match(this.rules[S[e]]),g&&(!b||g[0].length>b[0].length)){if(b=g,h=e,this.options.backtrack_lexer){if(n=this.test_match(g,S[e]),n!==!1)return n;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(n=this.test_match(b,S[h]),n===!1?!1:n):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:r(function(){return this.next()||this.lex()},"lex"),begin:r(function(n){this.conditionStack.push(n)},"begin"),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:r(function(n){this.begin(n)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(n,b,g,h){switch(g){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;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 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}})();function yt(){this.yy={}}return r(yt,"Parser"),yt.prototype=kt,kt.Parser=yt,new yt})();Et.parser=Et;var ze=Et,I=ke(),De=(lt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var o,u,c,l,x,f,_,a,m,p,y,q,T,d,A,M,Y,j;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((o=z.quadrantChart)==null?void 0:o.chartWidth)||500,chartWidth:((u=z.quadrantChart)==null?void 0:u.chartHeight)||500,titlePadding:((c=z.quadrantChart)==null?void 0:c.titlePadding)||10,titleFontSize:((l=z.quadrantChart)==null?void 0:l.titleFontSize)||20,quadrantPadding:((x=z.quadrantChart)==null?void 0:x.quadrantPadding)||5,xAxisLabelPadding:((f=z.quadrantChart)==null?void 0:f.xAxisLabelPadding)||5,yAxisLabelPadding:((_=z.quadrantChart)==null?void 0:_.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=z.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((m=z.quadrantChart)==null?void 0:m.yAxisLabelFontSize)||16,quadrantLabelFontSize:((p=z.quadrantChart)==null?void 0:p.quadrantLabelFontSize)||16,quadrantTextTopPadding:((y=z.quadrantChart)==null?void 0:y.quadrantTextTopPadding)||5,pointTextPadding:((q=z.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((T=z.quadrantChart)==null?void 0:T.pointLabelFontSize)||12,pointRadius:((d=z.quadrantChart)==null?void 0:d.pointRadius)||5,xAxisPosition:((A=z.quadrantChart)==null?void 0:A.xAxisPosition)||"top",yAxisPosition:((M=z.quadrantChart)==null?void 0:M.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Y=z.quadrantChart)==null?void 0:Y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((j=z.quadrantChart)==null?void 0:j.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:I.quadrant1Fill,quadrant2Fill:I.quadrant2Fill,quadrant3Fill:I.quadrant3Fill,quadrant4Fill:I.quadrant4Fill,quadrant1TextFill:I.quadrant1TextFill,quadrant2TextFill:I.quadrant2TextFill,quadrant3TextFill:I.quadrant3TextFill,quadrant4TextFill:I.quadrant4TextFill,quadrantPointFill:I.quadrantPointFill,quadrantPointTextFill:I.quadrantPointTextFill,quadrantXAxisTextFill:I.quadrantXAxisTextFill,quadrantYAxisTextFill:I.quadrantYAxisTextFill,quadrantTitleFill:I.quadrantTitleFill,quadrantInternalBorderStrokeFill:I.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:I.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,At.info("clear called")}setData(o){this.data={...this.data,...o}}addPoints(o){this.data.points=[...o,...this.data.points]}addClass(o,u){this.classes.set(o,u)}setConfig(o){At.trace("setConfig called with: ",o),this.config={...this.config,...o}}setThemeConfig(o){At.trace("setThemeConfig called with: ",o),this.themeConfig={...this.themeConfig,...o}}calculateSpace(o,u,c,l){let x=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,f={top:o==="top"&&u?x:0,bottom:o==="bottom"&&u?x:0},_=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&c?_:0,right:this.config.yAxisPosition==="right"&&c?_:0},m=this.config.titleFontSize+this.config.titlePadding*2,p={top:l?m:0},y=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+f.top+p.top,T=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,d=this.config.chartHeight-this.config.quadrantPadding*2-f.top-f.bottom-p.top;return{xAxisSpace:f,yAxisSpace:a,titleSpace:p,quadrantSpace:{quadrantLeft:y,quadrantTop:q,quadrantWidth:T,quadrantHalfWidth:T/2,quadrantHeight:d,quadrantHalfHeight:d/2}}}getAxisLabels(o,u,c,l){let{quadrantSpace:x,titleSpace:f}=l,{quadrantHalfHeight:_,quadrantHeight:a,quadrantLeft:m,quadrantHalfWidth:p,quadrantTop:y,quadrantWidth:q}=x,T=!!this.data.xAxisRightText,d=!!this.data.yAxisTopText,A=[];return this.data.xAxisLeftText&&u&&A.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:m+(T?p/2:0),y:o==="top"?this.config.xAxisLabelPadding+f.top:this.config.xAxisLabelPadding+y+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&u&&A.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:m+p+(T?p/2:0),y:o==="top"?this.config.xAxisLabelPadding+f.top:this.config.xAxisLabelPadding+y+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&c&&A.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+m+q+this.config.quadrantPadding,y:y+a-(d?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&c&&A.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+m+q+this.config.quadrantPadding,y:y+_-(d?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:-90}),A}getQuadrants(o){let{quadrantSpace:u}=o,{quadrantHalfHeight:c,quadrantLeft:l,quadrantHalfWidth:x,quadrantTop:f}=u,_=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:l+x,y:f,width:x,height:c,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:l,y:f,width:x,height:c,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:l,y:f+c,width:x,height:c,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:l+x,y:f+c,width:x,height:c,fill:this.themeConfig.quadrant4Fill}];for(let a of _)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return _}getQuadrantPoints(o){let{quadrantSpace:u}=o,{quadrantHeight:c,quadrantLeft:l,quadrantTop:x,quadrantWidth:f}=u,_=ee().domain([0,1]).range([l,f+l]),a=ee().domain([0,1]).range([c+x,x]);return this.data.points.map(m=>{let p=this.classes.get(m.className);return p&&(m={...p,...m}),{x:_(m.x),y:a(m.y),fill:m.color??this.themeConfig.quadrantPointFill,radius:m.radius??this.config.pointRadius,text:{text:m.text,fill:this.themeConfig.quadrantPointTextFill,x:_(m.x),y:a(m.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:m.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:m.strokeWidth??"0px"}})}getBorders(o){let u=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:c}=o,{quadrantHalfHeight:l,quadrantHeight:x,quadrantLeft:f,quadrantHalfWidth:_,quadrantTop:a,quadrantWidth:m}=c;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:f-u,y1:a,x2:f+m+u,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:f+m,y1:a+u,x2:f+m,y2:a+x-u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:f-u,y1:a+x,x2:f+m+u,y2:a+x},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:f,y1:a+u,x2:f,y2:a+x-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:f+_,y1:a+u,x2:f+_,y2:a+x-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:f+u,y1:a+l,x2:f+m-u,y2:a+l}]}getTitle(o){if(o)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let o=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),u=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),c=this.config.showTitle&&!!this.data.titleText,l=this.data.points.length>0?"bottom":this.config.xAxisPosition,x=this.calculateSpace(l,o,u,c);return{points:this.getQuadrantPoints(x),quadrants:this.getQuadrants(x),axisLabels:this.getAxisLabels(l,o,u,x),borderLines:this.getBorders(x),title:this.getTitle(c)}}},r(lt,"QuadrantBuilder"),lt),bt=(ht=class extends Error{constructor(o,u,c){super(`value for ${o} ${u} is invalid, please use a valid ${c}`),this.name="InvalidStyleError"}},r(ht,"InvalidStyleError"),ht);function zt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}r(zt,"validateHexCode");function ne(t){return!/^\d+$/.test(t)}r(ne,"validateNumber");function se(t){return!/^\d+px$/.test(t)}r(se,"validateSizeInPixels");var Ie=vt();function Q(t){return Se(t.trim(),Ie)}r(Q,"textSanitizer");var D=new De;function re(t){D.setData({quadrant1Text:Q(t.text)})}r(re,"setQuadrant1Text");function oe(t){D.setData({quadrant2Text:Q(t.text)})}r(oe,"setQuadrant2Text");function le(t){D.setData({quadrant3Text:Q(t.text)})}r(le,"setQuadrant3Text");function he(t){D.setData({quadrant4Text:Q(t.text)})}r(he,"setQuadrant4Text");function ce(t){D.setData({xAxisLeftText:Q(t.text)})}r(ce,"setXAxisLeftText");function de(t){D.setData({xAxisRightText:Q(t.text)})}r(de,"setXAxisRightText");function ue(t){D.setData({yAxisTopText:Q(t.text)})}r(ue,"setYAxisTopText");function xe(t){D.setData({yAxisBottomText:Q(t.text)})}r(xe,"setYAxisBottomText");function _t(t){let o={};for(let u of t){let[c,l]=u.trim().split(/\s*:\s*/);if(c==="radius"){if(ne(l))throw new bt(c,l,"number");o.radius=parseInt(l)}else if(c==="color"){if(zt(l))throw new bt(c,l,"hex code");o.color=l}else if(c==="stroke-color"){if(zt(l))throw new bt(c,l,"hex code");o.strokeColor=l}else if(c==="stroke-width"){if(se(l))throw new bt(c,l,"number of pixels (eg. 10px)");o.strokeWidth=l}else throw Error(`style named ${c} is not supported.`)}return o}r(_t,"parseStyles");function fe(t,o,u,c,l){let x=_t(l);D.addPoints([{x:u,y:c,text:Q(t.text),className:o,...x}])}r(fe,"addPoint");function ge(t,o){D.addClass(t,_t(o))}r(ge,"addClass");function pe(t){D.setConfig({chartWidth:t})}r(pe,"setWidth");function ye(t){D.setConfig({chartHeight:t})}r(ye,"setHeight");function me(){let{themeVariables:t,quadrantChart:o}=vt();return o&&D.setConfig(o),D.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),D.setData({titleText:ae()}),D.build()}r(me,"getQuadrantData");var Ne={parser:ze,db:{setWidth:pe,setHeight:ye,setQuadrant1Text:re,setQuadrant2Text:oe,setQuadrant3Text:le,setQuadrant4Text:he,setXAxisLeftText:ce,setXAxisRightText:de,setYAxisTopText:ue,setYAxisBottomText:xe,parseStyles:_t,addPoint:fe,addClass:ge,getQuadrantData:me,clear:r(function(){D.clear(),Ce()},"clear"),setAccTitle:_e,getAccTitle:ve,setDiagramTitle:Fe,getDiagramTitle:ae,getAccDescription:Pe,setAccDescription:Ee},renderer:{draw:r((t,o,u,c)=>{var ut,xt,ft;function l(i){return i==="top"?"hanging":"middle"}r(l,"getDominantBaseLine");function x(i){return i==="left"?"start":"middle"}r(x,"getTextAnchor");function f(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}r(f,"getTransformation");let _=vt();At.debug(`Rendering quadrant chart
`+t);let a=_.securityLevel,m;a==="sandbox"&&(m=ie("#i"+o));let p=ie(a==="sandbox"?m.nodes()[0].contentDocument.body:"body").select(`[id="${o}"]`),y=p.append("g").attr("class","main"),q=((ut=_.quadrantChart)==null?void 0:ut.chartWidth)??500,T=((xt=_.quadrantChart)==null?void 0:xt.chartHeight)??500;Le(p,T,q,((ft=_.quadrantChart)==null?void 0:ft.useMaxWidth)??!0),p.attr("viewBox","0 0 "+q+" "+T),c.db.setHeight(T),c.db.setWidth(q);let d=c.db.getQuadrantData(),A=y.append("g").attr("class","quadrants"),M=y.append("g").attr("class","border"),Y=y.append("g").attr("class","data-points"),j=y.append("g").attr("class","labels"),pt=y.append("g").attr("class","title");d.title&&pt.append("text").attr("x",0).attr("y",0).attr("fill",d.title.fill).attr("font-size",d.title.fontSize).attr("dominant-baseline",l(d.title.horizontalPos)).attr("text-anchor",x(d.title.verticalPos)).attr("transform",f(d.title)).text(d.title.text),d.borderLines&&M.selectAll("line").data(d.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);let ct=A.selectAll("g.quadrant").data(d.quadrants).enter().append("g").attr("class","quadrant");ct.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ct.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>l(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>f(i.text)).text(i=>i.text.text),j.selectAll("g.label").data(d.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>l(i.horizontalPos)).attr("text-anchor",i=>x(i.verticalPos)).attr("transform",i=>f(i));let dt=Y.selectAll("g.data-point").data(d.points).enter().append("g").attr("class","data-point");dt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),dt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>l(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>f(i.text))},"draw")},styles:r(()=>"","styles")};export{Ne as diagram};
function c(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}var m=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],d=["list","quote","bquote","eval","return","call","parse","deparse"],x=["if","else","repeat","while","function","for","in","next","break"],h=["if","else","repeat","while","function","for"],v=c(m),y=c(d),N=c(x),_=c(h),k=/[+\-*\/^<>=!&|~$:]/,i;function l(e,t){i=null;var n=e.next();if(n=="#")return e.skipToEnd(),"comment";if(n=="0"&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if(n=="."&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(n))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if(n=="'"||n=='"')return t.tokenize=A(n),"string";if(n=="`")return e.match(/[^`]+`/),"string.special";if(n=="."&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(n)){e.eatWhile(/[\w\.]/);var r=e.current();return v.propertyIsEnumerable(r)?"atom":N.propertyIsEnumerable(r)?(_.propertyIsEnumerable(r)&&!e.match(/\s*if(\s+|$)/,!1)&&(i="block"),"keyword"):y.propertyIsEnumerable(r)?"builtin":"variable"}else return n=="%"?(e.skipTo("%")&&e.next(),"variableName.special"):n=="<"&&e.eat("-")||n=="<"&&e.match("<-")||n=="-"&&e.match(/>>?/)||n=="="&&t.ctx.argList?"operator":k.test(n)?(n=="$"||e.eatWhile(k),"operator"):/[\(\){}\[\];]/.test(n)?(i=n,n==";"?"punctuation":null):null}function A(e){return function(t,n){if(t.eat("\\")){var r=t.next();return r=="x"?t.match(/^[a-f0-9]{2}/i):(r=="u"||r=="U")&&t.eat("{")&&t.skipTo("}")?t.next():r=="u"?t.match(/^[a-f0-9]{4}/i):r=="U"?t.match(/^[a-f0-9]{8}/i):/[0-7]/.test(r)&&t.match(/^[0-7]{1,2}/),"string.special"}else{for(var a;(a=t.next())!=null;){if(a==e){n.tokenize=l;break}if(a=="\\"){t.backUp(1);break}}return"string"}}}var b=1,u=2,f=4;function o(e,t,n){e.ctx={type:t,indent:e.indent,flags:0,column:n.column(),prev:e.ctx}}function g(e,t){var n=e.ctx;e.ctx={type:n.type,indent:n.indent,flags:n.flags|t,column:n.column,prev:n.prev}}function s(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}const I={name:"r",startState:function(e){return{tokenize:l,ctx:{type:"top",indent:-e,flags:u},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(t.ctx.flags&3||(t.ctx.flags|=u),t.ctx.flags&f&&s(t),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return n!="comment"&&(t.ctx.flags&u)==0&&g(t,b),(i==";"||i=="{"||i=="}")&&t.ctx.type=="block"&&s(t),i=="{"?o(t,"}",e):i=="("?(o(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):i=="["?o(t,"]",e):i=="block"?o(t,"block",e):i==t.ctx.type?s(t):t.ctx.type=="block"&&n!="comment"&&g(t,f),t.afterIdent=n=="variable"||n=="keyword",n},indent:function(e,t,n){if(e.tokenize!=l)return 0;var r=t&&t.charAt(0),a=e.ctx,p=r==a.type;return a.flags&f&&(a=a.prev),a.type=="block"?a.indent+(r=="{"?0:n.unit):a.flags&b?a.column+(p?0:1):a.indent+(p?0:n.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:m.concat(d,x)}};export{I as t};
import{t as r}from"./r-BV8FQxo8.js";export{r};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as r}from"./chunk-LHMN2FUI-xvIevmTh.js";export{r as createRadarServices};
function c(a,r,t){a=+a,r=+r,t=(h=arguments.length)<2?(r=a,a=0,1):h<3?1:+t;for(var o=-1,h=Math.max(0,Math.ceil((r-a)/t))|0,u=Array(h);++o<h;)u[o]=a+o*t;return u}export{c as t};
import{t as T}from"./chunk-LvLJmgfZ.js";var J=T((e=>{var y=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),M=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),L=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),g=Symbol.iterator;function q(t){return typeof t!="object"||!t?null:(t=g&&t[g]||t["@@iterator"],typeof t=="function"?t:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,H={};function l(t,n,u){this.props=t,this.context=n,this.refs=H,this.updater=u||w}l.prototype.isReactComponent={},l.prototype.setState=function(t,n){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,n,"setState")},l.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function k(){}k.prototype=l.prototype;function h(t,n,u){this.props=t,this.context=n,this.refs=H,this.updater=u||w}var m=h.prototype=new k;m.constructor=h,j(m,l.prototype),m.isPureReactComponent=!0;var R=Array.isArray;function _(){}var s={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function v(t,n,u){var r=u.ref;return{$$typeof:y,type:t,key:n,ref:r===void 0?null:r,props:u}}function F(t,n){return v(t.type,n,t.props)}function b(t){return typeof t=="object"&&!!t&&t.$$typeof===y}function z(t){var n={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(u){return n[u]})}var $=/\/+/g;function S(t,n){return typeof t=="object"&&t&&t.key!=null?z(""+t.key):n.toString(36)}function G(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(_,_):(t.status="pending",t.then(function(n){t.status==="pending"&&(t.status="fulfilled",t.value=n)},function(n){t.status==="pending"&&(t.status="rejected",t.reason=n)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function p(t,n,u,r,o){var c=typeof t;(c==="undefined"||c==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(c){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case y:case A:i=!0;break;case E:return i=t._init,p(i(t._payload),n,u,r,o)}}if(i)return o=o(t),i=r===""?"."+S(t,0):r,R(o)?(u="",i!=null&&(u=i.replace($,"$&/")+"/"),p(o,n,u,"",function(B){return B})):o!=null&&(b(o)&&(o=F(o,u+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace($,"$&/")+"/")+i)),n.push(o)),1;i=0;var f=r===""?".":r+":";if(R(t))for(var a=0;a<t.length;a++)r=t[a],c=f+S(r,a),i+=p(r,n,u,c,o);else if(a=q(t),typeof a=="function")for(t=a.call(t),a=0;!(r=t.next()).done;)r=r.value,c=f+S(r,a++),i+=p(r,n,u,c,o);else if(c==="object"){if(typeof t.then=="function")return p(G(t),n,u,r,o);throw n=String(t),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return i}function d(t,n,u){if(t==null)return t;var r=[],o=0;return p(t,r,"","",function(c){return n.call(u,c,o++)}),r}function W(t){if(t._status===-1){var n=t._result;n=n(),n.then(function(u){(t._status===0||t._status===-1)&&(t._status=1,t._result=u)},function(u){(t._status===0||t._status===-1)&&(t._status=2,t._result=u)}),t._status===-1&&(t._status=0,t._result=n)}if(t._status===1)return t._result.default;throw t._result}var x=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Y={map:d,forEach:function(t,n,u){d(t,function(){n.apply(this,arguments)},u)},count:function(t){var n=0;return d(t,function(){n++}),n},toArray:function(t){return d(t,function(n){return n})||[]},only:function(t){if(!b(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};e.Activity=V,e.Children=Y,e.Component=l,e.Fragment=O,e.Profiler=P,e.PureComponent=h,e.StrictMode=I,e.Suspense=D,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,e.__COMPILER_RUNTIME={__proto__:null,c:function(t){return s.H.useMemoCache(t)}},e.cache=function(t){return function(){return t.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(t,n,u){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var r=j({},t.props),o=t.key;if(n!=null)for(c in n.key!==void 0&&(o=""+n.key),n)!C.call(n,c)||c==="key"||c==="__self"||c==="__source"||c==="ref"&&n.ref===void 0||(r[c]=n[c]);var c=arguments.length-2;if(c===1)r.children=u;else if(1<c){for(var i=Array(c),f=0;f<c;f++)i[f]=arguments[f+2];r.children=i}return v(t.type,o,r)},e.createContext=function(t){return t={$$typeof:M,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:N,_context:t},t},e.createElement=function(t,n,u){var r,o={},c=null;if(n!=null)for(r in n.key!==void 0&&(c=""+n.key),n)C.call(n,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=n[r]);var i=arguments.length-2;if(i===1)o.children=u;else if(1<i){for(var f=Array(i),a=0;a<i;a++)f[a]=arguments[a+2];o.children=f}if(t&&t.defaultProps)for(r in i=t.defaultProps,i)o[r]===void 0&&(o[r]=i[r]);return v(t,c,o)},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:U,render:t}},e.isValidElement=b,e.lazy=function(t){return{$$typeof:E,_payload:{_status:-1,_result:t},_init:W}},e.memo=function(t,n){return{$$typeof:L,type:t,compare:n===void 0?null:n}},e.startTransition=function(t){var n=s.T,u={};s.T=u;try{var r=t(),o=s.S;o!==null&&o(u,r),typeof r=="object"&&r&&typeof r.then=="function"&&r.then(_,x)}catch(c){x(c)}finally{n!==null&&u.types!==null&&(n.types=u.types),s.T=n}},e.unstable_useCacheRefresh=function(){return s.H.useCacheRefresh()},e.use=function(t){return s.H.use(t)},e.useActionState=function(t,n,u){return s.H.useActionState(t,n,u)},e.useCallback=function(t,n){return s.H.useCallback(t,n)},e.useContext=function(t){return s.H.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t,n){return s.H.useDeferredValue(t,n)},e.useEffect=function(t,n){return s.H.useEffect(t,n)},e.useEffectEvent=function(t){return s.H.useEffectEvent(t)},e.useId=function(){return s.H.useId()},e.useImperativeHandle=function(t,n,u){return s.H.useImperativeHandle(t,n,u)},e.useInsertionEffect=function(t,n){return s.H.useInsertionEffect(t,n)},e.useLayoutEffect=function(t,n){return s.H.useLayoutEffect(t,n)},e.useMemo=function(t,n){return s.H.useMemo(t,n)},e.useOptimistic=function(t,n){return s.H.useOptimistic(t,n)},e.useReducer=function(t,n,u){return s.H.useReducer(t,n,u)},e.useRef=function(t){return s.H.useRef(t)},e.useState=function(t){return s.H.useState(t)},e.useSyncExternalStore=function(t,n,u){return s.H.useSyncExternalStore(t,n,u)},e.useTransition=function(){return s.H.useTransition()},e.version="19.2.3"})),K=T(((e,y)=>{y.exports=J()}));export{K as t};
import{t as p}from"./chunk-LvLJmgfZ.js";import{t as _}from"./react-BGmjiNul.js";var m=p((e=>{var g=_();function f(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)r+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var o={d:{f:t,r:function(){throw Error(f(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},d=Symbol.for("react.portal");function l(i,r,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:s==null?null:""+s,children:i,containerInfo:r,implementation:n}}var c=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(i,r){if(i==="font")return"";if(typeof r=="string")return r==="use-credentials"?r:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,e.createPortal=function(i,r){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)throw Error(f(299));return l(i,r,null,n)},e.flushSync=function(i){var r=c.T,n=o.p;try{if(c.T=null,o.p=2,i)return i()}finally{c.T=r,o.p=n,o.d.f()}},e.preconnect=function(i,r){typeof i=="string"&&(r?(r=r.crossOrigin,r=typeof r=="string"?r==="use-credentials"?r:"":void 0):r=null,o.d.C(i,r))},e.prefetchDNS=function(i){typeof i=="string"&&o.d.D(i)},e.preinit=function(i,r){if(typeof i=="string"&&r&&typeof r.as=="string"){var n=r.as,s=a(n,r.crossOrigin),y=typeof r.integrity=="string"?r.integrity:void 0,u=typeof r.fetchPriority=="string"?r.fetchPriority:void 0;n==="style"?o.d.S(i,typeof r.precedence=="string"?r.precedence:void 0,{crossOrigin:s,integrity:y,fetchPriority:u}):n==="script"&&o.d.X(i,{crossOrigin:s,integrity:y,fetchPriority:u,nonce:typeof r.nonce=="string"?r.nonce:void 0})}},e.preinitModule=function(i,r){if(typeof i=="string")if(typeof r=="object"&&r){if(r.as==null||r.as==="script"){var n=a(r.as,r.crossOrigin);o.d.M(i,{crossOrigin:n,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0})}}else r??o.d.M(i)},e.preload=function(i,r){if(typeof i=="string"&&typeof r=="object"&&r&&typeof r.as=="string"){var n=r.as,s=a(n,r.crossOrigin);o.d.L(i,n,{crossOrigin:s,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,type:typeof r.type=="string"?r.type:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0,referrerPolicy:typeof r.referrerPolicy=="string"?r.referrerPolicy:void 0,imageSrcSet:typeof r.imageSrcSet=="string"?r.imageSrcSet:void 0,imageSizes:typeof r.imageSizes=="string"?r.imageSizes:void 0,media:typeof r.media=="string"?r.media:void 0})}},e.preloadModule=function(i,r){if(typeof i=="string")if(r){var n=a(r.as,r.crossOrigin);o.d.m(i,{as:typeof r.as=="string"&&r.as!=="script"?r.as:void 0,crossOrigin:n,integrity:typeof r.integrity=="string"?r.integrity:void 0})}else o.d.m(i)},e.requestFormReset=function(i){o.d.r(i)},e.unstable_batchedUpdates=function(i,r){return i(r)},e.useFormState=function(i,r,n){return c.H.useFormState(i,r,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.2.3"})),v=p(((e,g)=>{function f(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(t){console.error(t)}}f(),g.exports=m()}));export{v as t};

Sorry, the diff of this file is too big to display

import{s as ht}from"./chunk-LvLJmgfZ.js";import{t as zt}from"./react-BGmjiNul.js";var d=ht(zt()),ze=(0,d.createContext)(null);ze.displayName="PanelGroupContext";var A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ae=10,te=d.useLayoutEffect,Oe=d.useId,bt=typeof Oe=="function"?Oe:()=>null,vt=0;function ke(e=null){let t=bt(),n=(0,d.useRef)(e||t||null);return n.current===null&&(n.current=""+vt++),e??n.current}function Te({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:l,forwardedRef:a,id:i,maxSize:u,minSize:o,onCollapse:z,onExpand:g,onResize:f,order:c,style:b,tagName:w="div",...C}){let S=(0,d.useContext)(ze);if(S===null)throw Error("Panel components must be rendered within a PanelGroup container");let{collapsePanel:k,expandPanel:D,getPanelSize:N,getPanelStyle:G,groupId:q,isPanelCollapsed:P,reevaluatePanelConstraints:x,registerPanel:F,resizePanel:U,unregisterPanel:W}=S,T=ke(i),L=(0,d.useRef)({callbacks:{onCollapse:z,onExpand:g,onResize:f},constraints:{collapsedSize:n,collapsible:r,defaultSize:l,maxSize:u,minSize:o},id:T,idIsFromProps:i!==void 0,order:c});(0,d.useRef)({didLogMissingDefaultSizeWarning:!1}),te(()=>{let{callbacks:$,constraints:H}=L.current,B={...H};L.current.id=T,L.current.idIsFromProps=i!==void 0,L.current.order=c,$.onCollapse=z,$.onExpand=g,$.onResize=f,H.collapsedSize=n,H.collapsible=r,H.defaultSize=l,H.maxSize=u,H.minSize=o,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&x(L.current,B)}),te(()=>{let $=L.current;return F($),()=>{W($)}},[c,T,F,W]),(0,d.useImperativeHandle)(a,()=>({collapse:()=>{k(L.current)},expand:$=>{D(L.current,$)},getId(){return T},getSize(){return N(L.current)},isCollapsed(){return P(L.current)},isExpanded(){return!P(L.current)},resize:$=>{U(L.current,$)}}),[k,D,N,P,T,U]);let J=G(L.current,l);return(0,d.createElement)(w,{...C,children:e,className:t,id:T,style:{...J,...b},[A.groupId]:q,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:T,[A.panelSize]:parseFloat(""+J.flexGrow).toFixed(1)})}var je=(0,d.forwardRef)((e,t)=>(0,d.createElement)(Te,{...e,forwardedRef:t}));Te.displayName="Panel",je.displayName="forwardRef(Panel)";var xt;function St(){return xt}var De=null,wt=!0,be=-1,X=null;function It(e,t){if(t){let n=(t&Ye)!==0,r=(t&_e)!==0,l=(t&Qe)!==0,a=(t&Ze)!==0;if(n)return l?"se-resize":a?"ne-resize":"e-resize";if(r)return l?"sw-resize":a?"nw-resize":"w-resize";if(l)return"s-resize";if(a)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Ct(){X!==null&&(document.head.removeChild(X),De=null,X=null,be=-1)}function Re(e,t){var l;if(!wt)return;let n=It(e,t);if(De!==n){if(De=n,X===null){X=document.createElement("style");let a=St();a&&X.setAttribute("nonce",a),document.head.appendChild(X)}if(be>=0){var r;(r=X.sheet)==null||r.removeRule(be)}be=((l=X.sheet)==null?void 0:l.insertRule(`*{cursor: ${n} !important;}`))??-1}}function Ve(e){return e.type==="keydown"}function Ue(e){return e.type.startsWith("pointer")}function We(e){return e.type.startsWith("mouse")}function ve(e){if(Ue(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(We(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function Pt(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Et(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function At(e,t){if(e===t)throw Error("Cannot compare node with itself");let n={a:Ke(e),b:Ke(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;v(r,"Stacking order can only be calculated for elements with a common ancestor");let l={a:qe(Je(n.a)),b:qe(Je(n.b))};if(l.a===l.b){let a=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)},u=a.length;for(;u--;){let o=a[u];if(o===i.a)return 1;if(o===i.b)return-1}}return Math.sign(l.a-l.b)}var kt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Dt(e){let t=getComputedStyle(Xe(e)??e).display;return t==="flex"||t==="inline-flex"}function Rt(e){let t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Dt(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||kt.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Je(e){let t=e.length;for(;t--;){let n=e[t];if(v(n,"Missing node"),Rt(n))return n}return null}function qe(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ke(e){let t=[];for(;e;)t.push(e),e=Xe(e);return t}function Xe(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var Ye=1,_e=2,Qe=4,Ze=8,Lt=Pt()==="coarse",V=[],ie=!1,ne=new Map,xe=new Map,fe=new Set;function Mt(e,t,n,r,l){let{ownerDocument:a}=t,i={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:l},u=ne.get(a)??0;return ne.set(a,u+1),fe.add(i),Se(),function(){xe.delete(e),fe.delete(i);let o=ne.get(a)??1;if(ne.set(a,o-1),Se(),o===1&&ne.delete(a),V.includes(i)){let z=V.indexOf(i);z>=0&&V.splice(z,1),He(),l("up",!0,null)}}}function Nt(e){let{target:t}=e,{x:n,y:r}=ve(e);ie=!0,Ne({target:t,x:n,y:r}),Se(),V.length>0&&(we("down",e),e.preventDefault(),et(t)||e.stopImmediatePropagation())}function Le(e){let{x:t,y:n}=ve(e);if(ie&&e.buttons===0&&(ie=!1,we("up",e)),!ie){let{target:r}=e;Ne({target:r,x:t,y:n})}we("move",e),He(),V.length>0&&e.preventDefault()}function Me(e){let{target:t}=e,{x:n,y:r}=ve(e);xe.clear(),ie=!1,V.length>0&&(e.preventDefault(),et(t)||e.stopImmediatePropagation()),we("up",e),Ne({target:t,x:n,y:r}),He(),Se()}function et(e){let t=e;for(;t;){if(t.hasAttribute(A.resizeHandle))return!0;t=t.parentElement}return!1}function Ne({target:e,x:t,y:n}){V.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),fe.forEach(l=>{let{element:a,hitAreaMargins:i}=l,u=a.getBoundingClientRect(),{bottom:o,left:z,right:g,top:f}=u,c=Lt?i.coarse:i.fine;if(t>=z-c&&t<=g+c&&n>=f-c&&n<=o+c){if(r!==null&&document.contains(r)&&a!==r&&!a.contains(r)&&!r.contains(a)&&At(r,a)>0){let b=r,w=!1;for(;b&&!b.contains(a);){if(Et(b.getBoundingClientRect(),u,!0)){w=!0;break}b=b.parentElement}if(w)return}V.push(l)}})}function $e(e,t){xe.set(e,t)}function He(){let e=!1,t=!1;V.forEach(r=>{let{direction:l}=r;l==="horizontal"?e=!0:t=!0});let n=0;xe.forEach(r=>{n|=r}),e&&t?Re("intersection",n):e?Re("horizontal",n):t?Re("vertical",n):Ct()}var Fe=new AbortController;function Se(){Fe.abort(),Fe=new AbortController;let e={capture:!0,signal:Fe.signal};fe.size&&(ie?(V.length>0&&ne.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener("contextmenu",Me,e),r.addEventListener("pointerleave",Le,e),r.addEventListener("pointermove",Le,e))}),window.addEventListener("pointerup",Me,e),window.addEventListener("pointercancel",Me,e)):ne.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener("pointerdown",Nt,e),r.addEventListener("pointermove",Le,e))}))}function we(e,t){fe.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,V.includes(n),t)})}function $t(){let[e,t]=(0,d.useState)(0);return(0,d.useCallback)(()=>t(n=>n+1),[])}function v(e,t){if(!e)throw console.error(t),Error(t)}function re(e,t,n=Ae){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Y(e,t,n=Ae){return re(e,t,n)===0}function O(e,t,n){return re(e,t,n)===0}function Ht(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let l=e[r],a=t[r];if(!O(l,a,n))return!1}return!0}function oe({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];v(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:l=0,collapsible:a,maxSize:i=100,minSize:u=0}=r;if(re(n,u)<0)if(a){let o=(l+u)/2;n=re(n,o)<0?l:u}else n=u;return n=Math.min(i,n),n=parseFloat(n.toFixed(Ae)),n}function pe({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:l,trigger:a}){if(O(e,0))return t;let i=[...t],[u,o]=r;v(u!=null,"Invalid first pivot index"),v(o!=null,"Invalid second pivot index");let z=0;if(a==="keyboard"){{let g=e<0?o:u,f=n[g];v(f,`Panel constraints not found for index ${g}`);let{collapsedSize:c=0,collapsible:b,minSize:w=0}=f;if(b){let C=t[g];if(v(C!=null,`Previous layout not found for panel index ${g}`),O(C,c)){let S=w-C;re(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}{let g=e<0?u:o,f=n[g];v(f,`No panel constraints found for index ${g}`);let{collapsedSize:c=0,collapsible:b,minSize:w=0}=f;if(b){let C=t[g];if(v(C!=null,`Previous layout not found for panel index ${g}`),O(C,w)){let S=C-c;re(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{let g=e<0?1:-1,f=e<0?o:u,c=0;for(;;){let w=t[f];v(w!=null,`Previous layout not found for panel index ${f}`);let C=oe({panelConstraints:n,panelIndex:f,size:100})-w;if(c+=C,f+=g,f<0||f>=n.length)break}let b=Math.min(Math.abs(e),Math.abs(c));e=e<0?0-b:b}{let g=e<0?u:o;for(;g>=0&&g<n.length;){let f=Math.abs(e)-Math.abs(z),c=t[g];v(c!=null,`Previous layout not found for panel index ${g}`);let b=c-f,w=oe({panelConstraints:n,panelIndex:g,size:b});if(!O(c,w)&&(z+=c-w,i[g]=w,z.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?g--:g++}}if(Ht(l,i))return l;{let g=e<0?o:u,f=t[g];v(f!=null,`Previous layout not found for panel index ${g}`);let c=f+z,b=oe({panelConstraints:n,panelIndex:g,size:c});if(i[g]=b,!O(b,c)){let w=c-b,C=e<0?o:u;for(;C>=0&&C<n.length;){let S=i[C];v(S!=null,`Previous layout not found for panel index ${C}`);let k=S+w,D=oe({panelConstraints:n,panelIndex:C,size:k});if(O(S,D)||(w-=D-S,i[C]=D),O(w,0))break;e>0?C--:C++}}}return O(i.reduce((g,f)=>f+g,0),100)?i:l}function Ft({layout:e,panelsArray:t,pivotIndices:n}){let r=0,l=100,a=0,i=0,u=n[0];return v(u!=null,"No pivot index found"),t.forEach((o,z)=>{let{constraints:g}=o,{maxSize:f=100,minSize:c=0}=g;z===u?(r=c,l=f):(a+=c,i+=f)}),{valueMax:Math.min(l,100-a),valueMin:Math.max(r,100-i),valueNow:e[u]}}function ge(e,t=document){return Array.from(t.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${e}"]`))}function tt(e,t,n=document){return ge(e,n).findIndex(r=>r.getAttribute(A.resizeHandleId)===t)??null}function nt(e,t,n){let r=tt(e,t,n);return r==null?[-1,-1]:[r,r+1]}function rt(e,t=document){var n;return t instanceof HTMLElement&&((n=t==null?void 0:t.dataset)==null?void 0:n.panelGroupId)==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function Ie(e,t=document){return t.querySelector(`[${A.resizeHandleId}="${e}"]`)||null}function Bt(e,t,n,r=document){var u,o;let l=Ie(t,r),a=ge(e,r),i=l?a.indexOf(l):-1;return[((u=n[i])==null?void 0:u.id)??null,((o=n[i+1])==null?void 0:o.id)??null]}function Gt({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:l,panelGroupElement:a,setLayout:i}){(0,d.useRef)({didWarnAboutMissingResizeHandle:!1}),te(()=>{if(!a)return;let u=ge(n,a);for(let o=0;o<l.length-1;o++){let{valueMax:z,valueMin:g,valueNow:f}=Ft({layout:r,panelsArray:l,pivotIndices:[o,o+1]}),c=u[o];if(c!=null){let b=l[o];v(b,`No panel data found for index "${o}"`),c.setAttribute("aria-controls",b.id),c.setAttribute("aria-valuemax",""+Math.round(z)),c.setAttribute("aria-valuemin",""+Math.round(g)),c.setAttribute("aria-valuenow",f==null?"":""+Math.round(f))}}return()=>{u.forEach((o,z)=>{o.removeAttribute("aria-controls"),o.removeAttribute("aria-valuemax"),o.removeAttribute("aria-valuemin"),o.removeAttribute("aria-valuenow")})}},[n,r,l,a]),(0,d.useEffect)(()=>{if(!a)return;let u=t.current;v(u,"Eager values not found");let{panelDataArray:o}=u;v(rt(n,a)!=null,`No group found for id "${n}"`);let z=ge(n,a);v(z,`No resize handles found for group id "${n}"`);let g=z.map(f=>{let c=f.getAttribute(A.resizeHandleId);v(c,"Resize handle element has no handle id attribute");let[b,w]=Bt(n,c,o,a);if(b==null||w==null)return()=>{};let C=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();let k=o.findIndex(D=>D.id===b);if(k>=0){let D=o[k];v(D,`No panel data found for index ${k}`);let N=r[k],{collapsedSize:G=0,collapsible:q,minSize:P=0}=D.constraints;if(N!=null&&q){let x=pe({delta:O(N,G)?P-G:G-N,initialLayout:r,panelConstraints:o.map(F=>F.constraints),pivotIndices:nt(n,c,a),prevLayout:r,trigger:"keyboard"});r!==x&&i(x)}}break}}};return f.addEventListener("keydown",C),()=>{f.removeEventListener("keydown",C)}});return()=>{g.forEach(f=>f())}},[a,e,t,n,r,l,i])}function at(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function lt(e,t){let n=e==="horizontal",{x:r,y:l}=ve(t);return n?r:l}function Ot(e,t,n,r,l){let a=n==="horizontal",i=Ie(t,l);v(i,`No resize handle element found for id "${t}"`);let u=i.getAttribute(A.groupId);v(u,"Resize handle element has no group id attribute");let{initialCursorPosition:o}=r,z=lt(n,e),g=rt(u,l);v(g,`No group element found for id "${u}"`);let f=g.getBoundingClientRect(),c=a?f.width:f.height;return(z-o)/c*100}function Tt(e,t,n,r,l,a){if(Ve(e)){let i=n==="horizontal",u=0;u=e.shiftKey?100:l??10;let o=0;switch(e.key){case"ArrowDown":o=i?0:u;break;case"ArrowLeft":o=i?-u:0;break;case"ArrowRight":o=i?u:0;break;case"ArrowUp":o=i?0:-u;break;case"End":o=100;break;case"Home":o=-100;break}return o}else return r==null?0:Ot(e,t,n,r,a)}function jt({panelDataArray:e}){let t=Array(e.length),n=e.map(a=>a.constraints),r=0,l=100;for(let a=0;a<e.length;a++){let i=n[a];v(i,`Panel constraints not found for index ${a}`);let{defaultSize:u}=i;u!=null&&(r++,t[a]=u,l-=u)}for(let a=0;a<e.length;a++){let i=n[a];v(i,`Panel constraints not found for index ${a}`);let{defaultSize:u}=i;if(u!=null)continue;let o=e.length-r,z=l/o;r++,t[a]=z,l-=z}return t}function ue(e,t,n){t.forEach((r,l)=>{let a=e[l];v(a,`Panel data not found for index ${l}`);let{callbacks:i,constraints:u,id:o}=a,{collapsedSize:z=0,collapsible:g}=u,f=n[o];if(f==null||r!==f){n[o]=r;let{onCollapse:c,onExpand:b,onResize:w}=i;w&&w(r,f),g&&(c||b)&&(b&&(f==null||Y(f,z))&&!Y(r,z)&&b(),c&&(f==null||!Y(f,z))&&Y(r,z)&&c())}})}function Ce(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Vt({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:l,precision:a=3}){let i=n[l],u;return u=i==null?e==null?"1":e.toPrecision(a):r.length===1?"1":i.toPrecision(a),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:t===null?void 0:"none"}}function Ut(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function it(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function ot(e){return`react-resizable-panels:${e}`}function ut(e){return e.map(t=>{let{constraints:n,id:r,idIsFromProps:l,order:a}=t;return l?r:a?`${a}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function st(e,t){try{let n=ot(e),r=t.getItem(n);if(r){let l=JSON.parse(r);if(typeof l=="object"&&l)return l}}catch{}return null}function Wt(e,t,n){return(st(e,n)??{})[ut(t)]??null}function Jt(e,t,n,r,l){let a=ot(e),i=ut(t),u=st(e,l)??{};u[i]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{l.setItem(a,JSON.stringify(u))}catch(o){console.error(o)}}function dt({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((a,i)=>a+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!O(r,100)&&n.length>0)for(let a=0;a<t.length;a++){let i=n[a];v(i!=null,`No layout data found for index ${a}`),n[a]=100/r*i}let l=0;for(let a=0;a<t.length;a++){let i=n[a];v(i!=null,`No layout data found for index ${a}`);let u=oe({panelConstraints:t,panelIndex:a,size:i});i!=u&&(l+=i-u,n[a]=u)}if(!O(l,0))for(let a=0;a<t.length;a++){let i=n[a];v(i!=null,`No layout data found for index ${a}`);let u=i+l,o=oe({panelConstraints:t,panelIndex:a,size:u});if(i!==o&&(l-=o-i,n[a]=o,O(l,0)))break}return n}var qt=100,ye={getItem:e=>(it(ye),ye.getItem(e)),setItem:(e,t)=>{it(ye),ye.setItem(e,t)}},ct={};function ft({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:l,id:a=null,onLayout:i=null,keyboardResizeBy:u=null,storage:o=ye,style:z,tagName:g="div",...f}){let c=ke(a),b=(0,d.useRef)(null),[w,C]=(0,d.useState)(null),[S,k]=(0,d.useState)([]),D=$t(),N=(0,d.useRef)({}),G=(0,d.useRef)(new Map),q=(0,d.useRef)(0),P=(0,d.useRef)({autoSaveId:e,direction:r,dragState:w,id:c,keyboardResizeBy:u,onLayout:i,storage:o}),x=(0,d.useRef)({layout:S,panelDataArray:[],panelDataArrayChanged:!1});(0,d.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,d.useImperativeHandle)(l,()=>({getId:()=>P.current.id,getLayout:()=>{let{layout:s}=x.current;return s},setLayout:s=>{let{onLayout:p}=P.current,{layout:y,panelDataArray:m}=x.current,h=dt({layout:s,panelConstraints:m.map(I=>I.constraints)});at(y,h)||(k(h),x.current.layout=h,p&&p(h),ue(m,h,N.current))}}),[]),te(()=>{P.current.autoSaveId=e,P.current.direction=r,P.current.dragState=w,P.current.id=c,P.current.onLayout=i,P.current.storage=o}),Gt({committedValuesRef:P,eagerValuesRef:x,groupId:c,layout:S,panelDataArray:x.current.panelDataArray,setLayout:k,panelGroupElement:b.current}),(0,d.useEffect)(()=>{let{panelDataArray:s}=x.current;if(e){if(S.length===0||S.length!==s.length)return;let p=ct[e];p??(p=Ut(Jt,qt),ct[e]=p);let y=[...s],m=new Map(G.current);p(e,y,m,S,o)}},[e,S,o]),(0,d.useEffect)(()=>{});let F=(0,d.useCallback)(s=>{let{onLayout:p}=P.current,{layout:y,panelDataArray:m}=x.current;if(s.constraints.collapsible){let h=m.map(R=>R.constraints),{collapsedSize:I=0,panelSize:E,pivotIndices:M}=ae(m,s,y);if(v(E!=null,`Panel size not found for panel "${s.id}"`),!Y(E,I)){G.current.set(s.id,E);let R=pe({delta:se(m,s)===m.length-1?E-I:I-E,initialLayout:y,panelConstraints:h,pivotIndices:M,prevLayout:y,trigger:"imperative-api"});Ce(y,R)||(k(R),x.current.layout=R,p&&p(R),ue(m,R,N.current))}}},[]),U=(0,d.useCallback)((s,p)=>{let{onLayout:y}=P.current,{layout:m,panelDataArray:h}=x.current;if(s.constraints.collapsible){let I=h.map(_=>_.constraints),{collapsedSize:E=0,panelSize:M=0,minSize:R=0,pivotIndices:K}=ae(h,s,m),j=p??R;if(Y(M,E)){let _=G.current.get(s.id),he=_!=null&&_>=j?_:j,ee=pe({delta:se(h,s)===h.length-1?M-he:he-M,initialLayout:m,panelConstraints:I,pivotIndices:K,prevLayout:m,trigger:"imperative-api"});Ce(m,ee)||(k(ee),x.current.layout=ee,y&&y(ee),ue(h,ee,N.current))}}},[]),W=(0,d.useCallback)(s=>{let{layout:p,panelDataArray:y}=x.current,{panelSize:m}=ae(y,s,p);return v(m!=null,`Panel size not found for panel "${s.id}"`),m},[]),T=(0,d.useCallback)((s,p)=>{let{panelDataArray:y}=x.current;return Vt({defaultSize:p,dragState:w,layout:S,panelData:y,panelIndex:se(y,s)})},[w,S]),L=(0,d.useCallback)(s=>{let{layout:p,panelDataArray:y}=x.current,{collapsedSize:m=0,collapsible:h,panelSize:I}=ae(y,s,p);return v(I!=null,`Panel size not found for panel "${s.id}"`),h===!0&&Y(I,m)},[]),J=(0,d.useCallback)(s=>{let{layout:p,panelDataArray:y}=x.current,{collapsedSize:m=0,collapsible:h,panelSize:I}=ae(y,s,p);return v(I!=null,`Panel size not found for panel "${s.id}"`),!h||re(I,m)>0},[]),$=(0,d.useCallback)(s=>{let{panelDataArray:p}=x.current;p.push(s),p.sort((y,m)=>{let h=y.order,I=m.order;return h==null&&I==null?0:h==null?-1:I==null?1:h-I}),x.current.panelDataArrayChanged=!0,D()},[D]);te(()=>{if(x.current.panelDataArrayChanged){x.current.panelDataArrayChanged=!1;let{autoSaveId:s,onLayout:p,storage:y}=P.current,{layout:m,panelDataArray:h}=x.current,I=null;if(s){let M=Wt(s,h,y);M&&(G.current=new Map(Object.entries(M.expandToSizes)),I=M.layout)}I??(I=jt({panelDataArray:h}));let E=dt({layout:I,panelConstraints:h.map(M=>M.constraints)});at(m,E)||(k(E),x.current.layout=E,p&&p(E),ue(h,E,N.current))}}),te(()=>{let s=x.current;return()=>{s.layout=[]}},[]);let H=(0,d.useCallback)(s=>{let p=!1,y=b.current;return y&&window.getComputedStyle(y,null).getPropertyValue("direction")==="rtl"&&(p=!0),function(m){m.preventDefault();let h=b.current;if(!h)return()=>null;let{direction:I,dragState:E,id:M,keyboardResizeBy:R,onLayout:K}=P.current,{layout:j,panelDataArray:_}=x.current,{initialLayout:he}=E??{},ee=nt(M,s,h),Q=Tt(m,s,I,E,R,h),Be=I==="horizontal";Be&&p&&(Q=-Q);let yt=_.map(mt=>mt.constraints),ce=pe({delta:Q,initialLayout:he??j,panelConstraints:yt,pivotIndices:ee,prevLayout:j,trigger:Ve(m)?"keyboard":"mouse-or-touch"}),Ge=!Ce(j,ce);(Ue(m)||We(m))&&q.current!=Q&&(q.current=Q,!Ge&&Q!==0?Be?$e(s,Q<0?Ye:_e):$e(s,Q<0?Qe:Ze):$e(s,0)),Ge&&(k(ce),x.current.layout=ce,K&&K(ce),ue(_,ce,N.current))}},[]),B=(0,d.useCallback)((s,p)=>{let{onLayout:y}=P.current,{layout:m,panelDataArray:h}=x.current,I=h.map(K=>K.constraints),{panelSize:E,pivotIndices:M}=ae(h,s,m);v(E!=null,`Panel size not found for panel "${s.id}"`);let R=pe({delta:se(h,s)===h.length-1?E-p:p-E,initialLayout:m,panelConstraints:I,pivotIndices:M,prevLayout:m,trigger:"imperative-api"});Ce(m,R)||(k(R),x.current.layout=R,y&&y(R),ue(h,R,N.current))},[]),de=(0,d.useCallback)((s,p)=>{let{layout:y,panelDataArray:m}=x.current,{collapsedSize:h=0,collapsible:I}=p,{collapsedSize:E=0,collapsible:M,maxSize:R=100,minSize:K=0}=s.constraints,{panelSize:j}=ae(m,s,y);j!=null&&(I&&M&&Y(j,h)?Y(h,E)||B(s,E):j<K?B(s,K):j>R&&B(s,R))},[B]),me=(0,d.useCallback)((s,p)=>{let{direction:y}=P.current,{layout:m}=x.current;if(!b.current)return;let h=Ie(s,b.current);v(h,`Drag handle element not found for id "${s}"`);let I=lt(y,p);C({dragHandleId:s,dragHandleRect:h.getBoundingClientRect(),initialCursorPosition:I,initialLayout:m})},[]),Z=(0,d.useCallback)(()=>{C(null)},[]),le=(0,d.useCallback)(s=>{let{panelDataArray:p}=x.current,y=se(p,s);y>=0&&(p.splice(y,1),delete N.current[s.id],x.current.panelDataArrayChanged=!0,D())},[D]),Pe=(0,d.useMemo)(()=>({collapsePanel:F,direction:r,dragState:w,expandPanel:U,getPanelSize:W,getPanelStyle:T,groupId:c,isPanelCollapsed:L,isPanelExpanded:J,reevaluatePanelConstraints:de,registerPanel:$,registerResizeHandle:H,resizePanel:B,startDragging:me,stopDragging:Z,unregisterPanel:le,panelGroupElement:b.current}),[F,w,r,U,W,T,c,L,J,de,$,H,B,me,Z,le]),Ee={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return(0,d.createElement)(ze.Provider,{value:Pe},(0,d.createElement)(g,{...f,children:t,className:n,id:a,ref:b,style:{...Ee,...z},[A.group]:"",[A.groupDirection]:r,[A.groupId]:c}))}var pt=(0,d.forwardRef)((e,t)=>(0,d.createElement)(ft,{...e,forwardedRef:t}));ft.displayName="PanelGroup",pt.displayName="forwardRef(PanelGroup)";function se(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ae(e,t,n){let r=se(e,t),l=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:l}}function Kt({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,d.useEffect)(()=>{if(e||n==null||r==null)return;let l=Ie(t,r);if(l==null)return;let a=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":i.preventDefault(),n(i);break;case"F6":{i.preventDefault();let u=l.getAttribute(A.groupId);v(u,`No group element found for id "${u}"`);let o=ge(u,r),z=tt(u,t,r);v(z!==null,`No resize element found for id "${t}"`),o[i.shiftKey?z>0?z-1:o.length-1:z+1<o.length?z+1:0].focus();break}}};return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}},[r,e,t,n])}function gt({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:l,onBlur:a,onClick:i,onDragging:u,onFocus:o,onPointerDown:z,onPointerUp:g,style:f={},tabIndex:c=0,tagName:b="div",...w}){let C=(0,d.useRef)(null),S=(0,d.useRef)({onClick:i,onDragging:u,onPointerDown:z,onPointerUp:g});(0,d.useEffect)(()=>{S.current.onClick=i,S.current.onDragging=u,S.current.onPointerDown=z,S.current.onPointerUp=g});let k=(0,d.useContext)(ze);if(k===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");let{direction:D,groupId:N,registerResizeHandle:G,startDragging:q,stopDragging:P,panelGroupElement:x}=k,F=ke(l),[U,W]=(0,d.useState)("inactive"),[T,L]=(0,d.useState)(!1),[J,$]=(0,d.useState)(null),H=(0,d.useRef)({state:U});te(()=>{H.current.state=U}),(0,d.useEffect)(()=>{if(n)$(null);else{let Z=G(F);$(()=>Z)}},[n,F,G]);let B=(r==null?void 0:r.coarse)??15,de=(r==null?void 0:r.fine)??5;(0,d.useEffect)(()=>{if(n||J==null)return;let Z=C.current;v(Z,"Element ref not attached");let le=!1;return Mt(F,Z,D,{coarse:B,fine:de},(Pe,Ee,s)=>{if(!Ee){W("inactive");return}switch(Pe){case"down":{W("drag"),le=!1,v(s,'Expected event to be defined for "down" action'),q(F,s);let{onDragging:p,onPointerDown:y}=S.current;p==null||p(!0),y==null||y();break}case"move":{let{state:p}=H.current;le=!0,p!=="drag"&&W("hover"),v(s,'Expected event to be defined for "move" action'),J(s);break}case"up":{W("hover"),P();let{onClick:p,onDragging:y,onPointerUp:m}=S.current;y==null||y(!1),m==null||m(),le||(p==null||p());break}}})},[B,D,n,de,G,F,J,q,P]),Kt({disabled:n,handleId:F,resizeHandler:J,panelGroupElement:x});let me={touchAction:"none",userSelect:"none"};return(0,d.createElement)(b,{...w,children:e,className:t,id:l,onBlur:()=>{L(!1),a==null||a()},onFocus:()=>{L(!0),o==null||o()},ref:C,role:"separator",style:{...me,...f},tabIndex:c,[A.groupDirection]:D,[A.groupId]:N,[A.resizeHandle]:"",[A.resizeHandleActive]:U==="drag"?"pointer":T?"keyboard":void 0,[A.resizeHandleEnabled]:!n,[A.resizeHandleId]:F,[A.resizeHandleState]:U})}gt.displayName="PanelResizeHandle";export{pt as n,gt as r,je as t};

Sorry, the diff of this file is too big to display

import"./react-BGmjiNul.js";import"./jsx-runtime-ZmTK25f3.js";import"./vega-loader.browser-CRZ52CKf.js";import{n as m,t as o}from"./react-vega-CoHwoAp_.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";export{m as VegaEmbed,o as useVegaEmbed};
import{s as A}from"./chunk-LvLJmgfZ.js";import{t as E}from"./react-BGmjiNul.js";import{Wn as F,kt as I}from"./cells-BpZ7g6ok.js";import{t as L}from"./compiler-runtime-DeeZ7FnK.js";import{t as T}from"./jsx-runtime-ZmTK25f3.js";import{r as V,t as W}from"./button-YC1gW_kJ.js";import{t as D}from"./cn-BKtXLv3a.js";import{at as M}from"./dist-DBwNzi3C.js";import{f as q}from"./dist-Gqv0jSNr.js";import{t as G}from"./createLucideIcon-CnW3RofX.js";import{t as J}from"./copy-CQ15EONK.js";import{t as K}from"./eye-off-BhExYOph.js";import{t as Q}from"./plus-BD5o34_i.js";import{t as U}from"./use-toast-rmUWldD_.js";import{r as X}from"./useTheme-DUdVAZI8.js";import{t as g}from"./tooltip-CEc2ajau.js";import{t as Y}from"./copy-Bv2DBpIS.js";import{t as Z}from"./esm-DpMp6qko.js";import{t as $}from"./useAddCell-BmeZUK02.js";var tt=G("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),N=L(),O=A(E(),1),s=A(T(),1),ot=[I(),M.lineWrapping],et=[q(),M.lineWrapping];const R=(0,O.memo)(r=>{let t=(0,N.c)(41),{theme:a}=X(),o,e,i,l,c,C,j,u;t[0]===r?(o=t[1],e=t[2],i=t[3],l=t[4],c=t[5],C=t[6],j=t[7],u=t[8]):({code:e,className:o,initiallyHideCode:i,showHideCode:C,showCopyCode:j,insertNewCell:l,language:u,...c}=r,t[0]=r,t[1]=o,t[2]=e,t[3]=i,t[4]=l,t[5]=c,t[6]=C,t[7]=j,t[8]=u);let m=C===void 0?!0:C,b=j===void 0?!0:j,B=u===void 0?"python":u,[n,H]=(0,O.useState)(i),d;t[9]===o?d=t[10]:(d=D("relative hover-actions-parent w-full overflow-hidden",o),t[9]=o,t[10]=d);let p;t[11]!==n||t[12]!==m?(p=m&&n&&(0,s.jsx)(st,{tooltip:"Show code",onClick:()=>H(!1)}),t[11]=n,t[12]=m,t[13]=p):p=t[13];let h;t[14]!==e||t[15]!==b?(h=b&&(0,s.jsx)(rt,{text:e}),t[14]=e,t[15]=b,t[16]=h):h=t[16];let x;t[17]!==e||t[18]!==l?(x=l&&(0,s.jsx)(it,{code:e}),t[17]=e,t[18]=l,t[19]=x):x=t[19];let f;t[20]!==n||t[21]!==m?(f=m&&!n&&(0,s.jsx)(at,{onClick:()=>H(!0)}),t[20]=n,t[21]=m,t[22]=f):f=t[22];let y;t[23]!==h||t[24]!==x||t[25]!==f?(y=(0,s.jsxs)("div",{className:"absolute top-0 right-0 my-1 mx-2 z-10 hover-action flex gap-2",children:[h,x,f]}),t[23]=h,t[24]=x,t[25]=f,t[26]=y):y=t[26];let z=n&&"opacity-20 h-8 overflow-hidden",v;t[27]===z?v=t[28]:(v=D("cm",z),t[27]=z,t[28]=v);let _=a==="dark"?"dark":"light",S=!n,P=B==="python"?ot:et,k;t[29]!==e||t[30]!==c||t[31]!==v||t[32]!==_||t[33]!==S||t[34]!==P?(k=(0,s.jsx)(Z,{...c,className:v,theme:_,height:"100%",editable:S,extensions:P,value:e,readOnly:!0}),t[29]=e,t[30]=c,t[31]=v,t[32]=_,t[33]=S,t[34]=P,t[35]=k):k=t[35];let w;return t[36]!==k||t[37]!==d||t[38]!==p||t[39]!==y?(w=(0,s.jsxs)("div",{className:d,children:[p,y,k]}),t[36]=k,t[37]=d,t[38]=p,t[39]=y,t[40]=w):w=t[40],w});R.displayName="ReadonlyCode";var rt=r=>{let t=(0,N.c)(5),a;t[0]===r.text?a=t[1]:(a=V.stopPropagation(async()=>{await Y(r.text),U({title:"Copied to clipboard"})}),t[0]=r.text,t[1]=a);let o=a,e;t[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(J,{size:14,strokeWidth:1.5}),t[2]=e):e=t[2];let i;return t[3]===o?i=t[4]:(i=(0,s.jsx)(g,{content:"Copy code",usePortal:!1,children:(0,s.jsx)(W,{onClick:o,size:"xs",className:"py-0",variant:"secondary",children:e})}),t[3]=o,t[4]=i),i},at=r=>{let t=(0,N.c)(3),a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)(K,{size:14,strokeWidth:1.5}),t[0]=a):a=t[0];let o;return t[1]===r.onClick?o=t[2]:(o=(0,s.jsx)(g,{content:"Hide code",usePortal:!1,children:(0,s.jsx)(W,{onClick:r.onClick,size:"xs",className:"py-0",variant:"secondary",children:a})}),t[1]=r.onClick,t[2]=o),o};const st=r=>{let t=(0,N.c)(7),a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)(F,{className:"hover-action w-5 h-5 text-muted-foreground cursor-pointer absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 opacity-80 hover:opacity-100 z-20"}),t[0]=a):a=t[0];let o;t[1]===r.tooltip?o=t[2]:(o=(0,s.jsx)(g,{usePortal:!1,content:r.tooltip,children:a}),t[1]=r.tooltip,t[2]=o);let e;return t[3]!==r.className||t[4]!==r.onClick||t[5]!==o?(e=(0,s.jsx)("div",{className:r.className,onClick:r.onClick,children:o}),t[3]=r.className,t[4]=r.onClick,t[5]=o,t[6]=e):e=t[6],e};var it=r=>{let t=(0,N.c)(6),a=$(),o;t[0]!==a||t[1]!==r.code?(o=()=>{a(r.code)},t[0]=a,t[1]=r.code,t[2]=o):o=t[2];let e=o,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(Q,{size:14,strokeWidth:1.5}),t[3]=i):i=t[3];let l;return t[4]===e?l=t[5]:(l=(0,s.jsx)(g,{content:"Add code to notebook",usePortal:!1,children:(0,s.jsx)(W,{onClick:e,size:"xs",className:"py-0",variant:"secondary",children:i})}),t[4]=e,t[5]=l),l};export{tt as n,R as t};
import{t as h}from"./createLucideIcon-CnW3RofX.js";var a=h("refresh-ccw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);export{a as t};
import{t}from"./createLucideIcon-CnW3RofX.js";var a=t("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);export{a as t};
import{s as v}from"./chunk-LvLJmgfZ.js";import{p as x,u as j}from"./useEvent-DO6uJBas.js";import{t as _}from"./react-BGmjiNul.js";import{Br as u,zr as w}from"./cells-BpZ7g6ok.js";import{t as y}from"./compiler-runtime-DeeZ7FnK.js";import{o as N}from"./utils-DXvhzCGS.js";import{t as R}from"./jsx-runtime-ZmTK25f3.js";import{t as z}from"./mode-DX8pdI-l.js";import{t as C}from"./usePress-Bup4EGrp.js";import{t as H}from"./copy-icon-BhONVREY.js";import{t as E}from"./purify.es-DNVQZNFu.js";import{t as k}from"./useRunCells-24p6hn99.js";var F=y(),m=v(_(),1),s=v(R(),1);const M=e=>{let t=(0,F.c)(16),r,a,i;t[0]===e?(r=t[1],a=t[2],i=t[3]):({href:a,children:r,...i}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=i);let o=(0,m.useRef)(null),l;t[4]===a?l=t[5]:(l=()=>{let d=new URL(globalThis.location.href);d.hash=a,globalThis.history.pushState({},"",d.toString()),globalThis.dispatchEvent(new HashChangeEvent("hashchange"));let S=a.slice(1),A=document.getElementById(S);A&&A.scrollIntoView({behavior:"smooth",block:"start"})},t[4]=a,t[5]=l);let n=l,c;t[6]===n?c=t[7]:(c={onPress:()=>{n()}},t[6]=n,t[7]=c);let{pressProps:b}=C(c),f;t[8]===n?f=t[9]:(f=d=>{d.preventDefault(),n()},t[8]=n,t[9]=f);let g=f,h;return t[10]!==r||t[11]!==g||t[12]!==a||t[13]!==b||t[14]!==i?(h=(0,s.jsx)("a",{ref:o,href:a,...b,onClick:g,...i,children:r}),t[10]=r,t[11]=g,t[12]=a,t[13]=b,t[14]=i,t[15]=h):h=t[15],h};var T=x(e=>{let t=e(k),r=e(N);if(t||r)return!1;let a=!0;try{a=z()==="read"}catch{return!0}return!a});function L(){return j(T)}var p="data-temp-href-target";E.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&(e.hasAttribute("target")||e.setAttribute("target","_self"),e.hasAttribute("target")&&e.setAttribute(p,e.getAttribute("target")||""))}),E.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(p)&&(e.setAttribute("target",e.getAttribute(p)||""),e.removeAttribute(p),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer"))});function O(e){let t={USE_PROFILES:{html:!0,svg:!0,mathMl:!0},FORCE_BODY:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:/^(marimo-[A-Za-z][\w-]*|iconify-icon)$/,attributeNameCheck:/^[A-Za-z][\w-]*$/},SAFE_FOR_XML:!e.includes("marimo-mermaid")};return E.sanitize(e,t)}var I=y(),D=e=>{if(e instanceof u.Element&&!/^[A-Za-z][\w-]*$/.test(e.name))return m.createElement(m.Fragment)},V=(e,t)=>{if(t instanceof u.Element&&t.name==="body"){if((0,m.isValidElement)(e)&&"props"in e){let r=e.props.children;return(0,s.jsx)(s.Fragment,{children:r})}return}},W=(e,t)=>{if(t instanceof u.Element&&t.name==="html"){if((0,m.isValidElement)(e)&&"props"in e){let r=e.props.children;return(0,s.jsx)(s.Fragment,{children:r})}return}},$=e=>{if(e instanceof u.Element&&e.attribs&&e.name==="iframe"){let t=document.createElement("iframe");return Object.entries(e.attribs).forEach(([r,a])=>{r.startsWith('"')&&r.endsWith('"')&&(r=r.slice(1,-1)),t.setAttribute(r,a)}),(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:t.outerHTML}})}},B=e=>{if(e instanceof u.Element&&e.name==="script"){let t=e.attribs.src;if(!t)return;if(!document.querySelector(`script[src="${t}"]`)){let r=document.createElement("script");r.src=t,document.head.append(r)}return(0,s.jsx)(s.Fragment,{})}},P=(e,t)=>{if(t instanceof u.Element&&t.name==="a"){let r=t.attribs.href;if(r!=null&&r.startsWith("#")&&!r.startsWith("#code/")){let a=null;return(0,m.isValidElement)(e)&&"props"in e&&(a=e.props.children),(0,s.jsx)(M,{href:r,...t.attribs,children:a})}}},U=(e,t,r)=>{var a,i;if(t instanceof u.Element&&t.name==="div"&&((i=(a=t.attribs)==null?void 0:a.class)!=null&&i.includes("codehilite")))return(0,s.jsx)(Z,{children:e},r)},Z=e=>{let t=(0,I.c)(3),{children:r}=e,a=(0,m.useRef)(null),i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,s.jsx)(H,{tooltip:!1,className:"p-1",value:()=>{var n;let l=(n=a.current)==null?void 0:n.firstChild;return l&&l.textContent||""}})}),t[0]=i):i=t[0];let o;return t[1]===r?o=t[2]:(o=(0,s.jsxs)("div",{className:"relative group codehilite-wrapper",ref:a,children:[r,i]}),t[1]=r,t[2]=o),o};const q=({html:e,additionalReplacements:t=[],alwaysSanitizeHtml:r=!0})=>(0,s.jsx)(G,{html:e,alwaysSanitizeHtml:r,additionalReplacements:t});var G=({html:e,additionalReplacements:t=[],alwaysSanitizeHtml:r})=>{let a=L();return X({html:(0,m.useMemo)(()=>r||a?O(e):e,[e,r,a]),additionalReplacements:t})};function X({html:e,additionalReplacements:t=[]}){let r=[D,$,B,...t],a=[U,P,V,W];return w(e,{replace:(i,o)=>{for(let l of r){let n=l(i,o);if(n)return n}return i},transform:(i,o,l)=>{for(let n of a){let c=n(i,o,l);if(c)return c}return i}})}export{q as t};
import{s as g}from"./chunk-LvLJmgfZ.js";import{u as d}from"./useEvent-DO6uJBas.js";import{t as A}from"./compiler-runtime-DeeZ7FnK.js";import{s as v,t as b}from"./hotkeys-BHHWjLlp.js";import{p}from"./utils-DXvhzCGS.js";import{t as D}from"./jsx-runtime-ZmTK25f3.js";import{t as y}from"./cn-BKtXLv3a.js";import{l as S}from"./dropdown-menu-B-6unW-7.js";import{t as h}from"./tooltip-CEc2ajau.js";import{t as x}from"./kbd-C3JY7O_u.js";var f=A(),m=g(D(),1);function _(o,e=!0){return(0,m.jsx)(E,{shortcut:o,includeName:e})}var E=o=>{let e=(0,f.c)(11),{shortcut:l,includeName:s}=o,t=s===void 0?!0:s,a=d(p),n;e[0]!==a||e[1]!==l?(n=a.getHotkey(l),e[0]=a,e[1]=l,e[2]=n):n=e[2];let r=n,c;e[3]!==r.name||e[4]!==t?(c=t&&(0,m.jsx)("span",{className:"mr-2",children:r.name}),e[3]=r.name,e[4]=t,e[5]=c):c=e[5];let i;e[6]===r.key?i=e[7]:(i=(0,m.jsx)(j,{shortcut:r.key}),e[6]=r.key,e[7]=i);let u;return e[8]!==c||e[9]!==i?(u=(0,m.jsxs)("span",{className:"inline-flex",children:[c,i]}),e[8]=c,e[9]=i,e[10]=u):u=e[10],u};const j=o=>{let e=(0,f.c)(10),{shortcut:l,className:s}=o;if(l===b||l===""){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,m.jsx)("span",{}),e[0]=r):r=e[0],r}let t,a;if(e[1]!==s||e[2]!==l){let r=l.split("-");e[5]===s?t=e[6]:(t=y("flex gap-1",s),e[5]=s,e[6]=t),a=r.map(k).map(L),e[1]=s,e[2]=l,e[3]=t,e[4]=a}else t=e[3],a=e[4];let n;return e[7]!==t||e[8]!==a?(n=(0,m.jsx)("div",{className:t,children:a}),e[7]=t,e[8]=a,e[9]=n):n=e[9],n};function H(o){return(0,m.jsx)(w,{shortcut:o})}const w=o=>{let e=(0,f.c)(6),{className:l,shortcut:s}=o,t=d(p),a;e[0]!==t||e[1]!==s?(a=t.getHotkey(s),e[0]=t,e[1]=s,e[2]=a):a=e[2];let n=a,r;return e[3]!==l||e[4]!==n.key?(r=(0,m.jsx)(C,{shortcut:n.key,className:l}),e[3]=l,e[4]=n.key,e[5]=r):r=e[5],r},C=o=>{let e=(0,f.c)(12),{shortcut:l,className:s}=o;if(l===b||l===""){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,m.jsx)("span",{}),e[0]=c):c=e[0],c}let t,a,n;if(e[1]!==s||e[2]!==l){let c=l.split("-");t=S,e[6]===s?a=e[7]:(a=y("flex gap-1 items-center",s),e[6]=s,e[7]=a),n=c.map(k).map(F),e[1]=s,e[2]=l,e[3]=t,e[4]=a,e[5]=n}else t=e[3],a=e[4],n=e[5];let r;return e[8]!==t||e[9]!==a||e[10]!==n?(r=(0,m.jsx)(t,{className:a,children:n}),e[8]=t,e[9]=a,e[10]=n,e[11]=r):r=e[11],r};function k(o){let e=v()?"mac":"default",l=o.toLowerCase(),s=I[o.toLowerCase()];if(s){let t=s.symbols[e]||s.symbols.default;return[s.label,t]}return[l]}var I={ctrl:{symbols:{mac:"\u2303",default:"Ctrl"},label:"Control"},control:{symbols:{mac:"\u2303",default:"Ctrl"},label:"Control"},shift:{symbols:{mac:"\u21E7",default:"Shift"},label:"Shift"},alt:{symbols:{mac:"\u2325",default:"Alt"},label:"Alt/Option"},escape:{symbols:{mac:"\u238B",default:"Esc"},label:"Escape"},arrowup:{symbols:{default:"\u2191"},label:"Arrow Up"},arrowdown:{symbols:{default:"\u2193"},label:"Arrow Down"},arrowleft:{symbols:{default:"\u2190"},label:"Arrow Left"},arrowright:{symbols:{default:"\u2192"},label:"Arrow Right"},backspace:{symbols:{mac:"\u232B",default:"\u27F5"},label:"Backspace"},tab:{symbols:{mac:"\u21E5",default:"\u2B7E"},label:"Tab"},capslock:{symbols:{default:"\u21EA"},label:"Caps Lock"},fn:{symbols:{default:"Fn"},label:"Fn"},cmd:{symbols:{mac:"\u2318",windows:"\u229E Win",default:"Command"},label:"Command"},insert:{symbols:{default:"Ins"},label:"Insert"},delete:{symbols:{mac:"\u2326",default:"Del"},label:"Delete"},home:{symbols:{mac:"\u2196",default:"Home"},label:"Home"},end:{symbols:{mac:"\u2198",default:"End"},label:"End"},mod:{symbols:{mac:"\u2318",windows:"\u229E Win",default:"Ctrl"},label:"Control"}};function N(o){return o.charAt(0).toUpperCase()+o.slice(1)}function L(o){let[e,l]=o;return l?(0,m.jsx)(h,{asChild:!1,tabIndex:-1,content:e,delayDuration:300,children:(0,m.jsx)(x,{children:l},e)},e):(0,m.jsx)(x,{children:N(e)},e)}function F(o){let[e,l]=o;return l?(0,m.jsx)(h,{content:e,delayDuration:300,tabIndex:-1,children:(0,m.jsx)("span",{children:l},e)},e):(0,m.jsx)("span",{children:N(e)},e)}export{_ as a,H as i,C as n,w as r,j as t};
import{t as s}from"./requests-BsVD4CdD.js";import{t as r}from"./DeferredRequestRegistry-CO2AyNfd.js";const o=new r("secrets-result",async(t,e)=>{await s().listSecretKeys({requestId:t,...e})});export{o as t};
import{p as o}from"./useEvent-DO6uJBas.js";const t=o(null);export{t};
import{i as s,p as n,u as i}from"./useEvent-DO6uJBas.js";import{t as r}from"./invariant-CAG_dYON.js";const e=n(null);function u(){let t=i(e);return r(t,"useRequestClient() requires setting requestClientAtom."),t}function o(){let t=s.get(e);return r(t,"getRequestClient() requires requestClientAtom to be set."),t}export{e as n,u as r,o as t};
var J;import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import{g as ze}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as u,r as ke,t as Ge}from"./src-BKLwm2RN.js";import{B as Xe,C as Je,U as Ze,_ as et,a as tt,b as Ne,v as st,z as it}from"./chunk-ABZYJK2D-t8l6Viza.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import{r as nt,t as rt}from"./chunk-N4CR4FBY-eo9CRI73.js";import{t as at}from"./chunk-55IACEB6-SrR0J56d.js";import{t as lt}from"./chunk-QN33PNHL-C_hHv997.js";var qe=(function(){var e=u(function(i,m,a,s){for(a||(a={}),s=i.length;s--;a[i[s]]=m);return a},"o"),r=[1,3],h=[1,4],c=[1,5],y=[1,6],l=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],d=[2,7],o=[1,26],p=[1,27],S=[1,28],T=[1,29],C=[1,33],A=[1,34],v=[1,35],L=[1,36],x=[1,37],O=[1,38],M=[1,24],$=[1,31],D=[1,32],w=[1,30],_=[1,39],g=[1,40],R=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],G=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],pe=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],Me=[1,75],$e=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],ne=[1,88],re=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],V=[63,64],De=[1,101],we=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[1,110],B=[1,106],Q=[1,107],H=[1,108],K=[1,109],W=[1,111],oe=[1,116],he=[1,117],ue=[1,114],ye=[1,115],ge={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(i,m,a,s,f,t,me){var n=t.length-1;switch(f){case 4:this.$=t[n].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[n].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[n-3],t[n-4]);break;case 22:s.addRequirement(t[n-5],t[n-6]),s.setClass([t[n-5]],t[n-3]);break;case 23:s.setNewReqId(t[n-2]);break;case 24:s.setNewReqText(t[n-2]);break;case 25:s.setNewReqRisk(t[n-2]);break;case 26:s.setNewReqVerifyMethod(t[n-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[n-3]);break;case 43:s.addElement(t[n-5]),s.setClass([t[n-5]],t[n-3]);break;case 44:s.setNewElementType(t[n-2]);break;case 45:s.setNewElementDocRef(t[n-2]);break;case 48:s.addRelationship(t[n-2],t[n],t[n-4]);break;case 49:s.addRelationship(t[n-2],t[n-4],t[n]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[n-2],s.defineClass(t[n-1],t[n]);break;case 58:s.setClass(t[n-1],t[n]);break;case 59:s.setClass([t[n-2]],t[n]);break;case 60:case 62:this.$=[t[n]];break;case 61:case 63:this.$=t[n-2].concat([t[n]]);break;case 64:this.$=t[n-2],s.setCssStyle(t[n-1],t[n]);break;case 65:this.$=[t[n]];break;case 66:t[n-2].push(t[n]),this.$=t[n-2];break;case 68:this.$=t[n-1]+t[n];break}},"anonymous"),table:[{3:1,4:2,6:r,9:h,11:c,13:y},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:h,11:c,13:y},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(l,[2,6]),{3:12,4:2,6:r,9:h,11:c,13:y},{1:[2,2]},{4:17,5:E,7:13,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},e(l,[2,4]),e(l,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:43,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:44,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:45,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:46,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:47,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:48,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:49,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{4:17,5:E,7:50,8:d,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:S,24:T,25:23,33:25,41:C,42:A,43:v,44:L,45:x,46:O,54:M,72:$,74:D,77:w,89:_,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(R,[2,17]),e(R,[2,18]),e(R,[2,19]),e(R,[2,20]),{30:60,33:62,75:P,89:_,90:g},{30:63,33:62,75:P,89:_,90:g},{30:64,33:62,75:P,89:_,90:g},e(G,[2,29]),e(G,[2,30]),e(G,[2,31]),e(G,[2,32]),e(G,[2,33]),e(G,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(pe,[2,79]),e(pe,[2,80]),{27:[1,67],29:[1,68]},e(pe,[2,85]),e(pe,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:Me,71:$e},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:Me,71:$e},{30:78,33:62,75:P,89:_,90:g},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:_,90:g},{5:[1,95]},{30:96,33:62,75:P,89:_,90:g},{5:[1,97]},{30:98,33:62,75:P,89:_,90:g},{63:[1,99]},e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(V,[2,54]),e(V,[2,55]),e(V,[2,56]),{64:[1,100]},e(R,[2,59],{76:U}),e(R,[2,64],{76:De}),{33:103,75:[1,102],89:_,90:g},e(we,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),e(k,[2,67]),e(k,[2,69]),e(k,[2,70]),e(k,[2,71]),e(k,[2,72]),e(k,[2,73]),e(k,[2,74]),e(k,[2,75]),e(k,[2,76]),e(k,[2,77]),e(k,[2,78]),e(R,[2,57],{76:De}),e(R,[2,58],{76:U}),{5:Y,28:105,31:B,34:Q,36:H,38:K,40:W},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:ye},{27:[1,118],76:U},{33:119,89:_,90:g},{33:120,89:_,90:g},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(k,[2,68]),e(R,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Y,28:126,31:B,34:Q,36:H,38:K,40:W},e(R,[2,28]),{5:[1,127]},e(R,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:ye},e(R,[2,47]),{5:[1,131]},e(R,[2,48]),e(R,[2,49]),e(we,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),{33:132,89:_,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(R,[2,27]),{5:Y,28:145,31:B,34:Q,36:H,38:K,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(R,[2,46]),{5:oe,40:he,56:152,57:ue,59:ye},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(R,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(R,[2,43]),{5:Y,28:159,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:160,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:161,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:162,31:B,34:Q,36:H,38:K,40:W},{5:oe,40:he,56:163,57:ue,59:ye},{5:oe,40:he,56:164,57:ue,59:ye},e(R,[2,23]),e(R,[2,24]),e(R,[2,25]),e(R,[2,26]),e(R,[2,44]),e(R,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(i,m){if(m.recoverable)this.trace(i);else{var a=Error(i);throw a.hash=m,a}},"parseError"),parse:u(function(i){var m=this,a=[0],s=[],f=[null],t=[],me=this.table,n="",Re=0,Fe=0,Pe=0,He=2,Ue=1,Ke=t.slice.call(arguments,1),I=Object.create(this.lexer),j={yy:{}};for(var Ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ie)&&(j.yy[Ie]=this.yy[Ie]);I.setInput(i,j.yy),j.yy.lexer=I,j.yy.parser=this,I.yylloc===void 0&&(I.yylloc={});var Se=I.yylloc;t.push(Se);var We=I.options&&I.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(q){a.length-=2*q,f.length-=q,t.length-=q}u(je,"popStack");function Ve(){var q=s.pop()||I.lex()||Ue;return typeof q!="number"&&(q instanceof Array&&(s=q,q=s.pop()),q=m.symbols_[q]||q),q}u(Ve,"lex");for(var b,be,z,N,Te,X={},fe,F,Ye,_e;;){if(z=a[a.length-1],this.defaultActions[z]?N=this.defaultActions[z]:(b??(b=Ve()),N=me[z]&&me[z][b]),N===void 0||!N.length||!N[0]){var Be="";for(fe in _e=[],me[z])this.terminals_[fe]&&fe>He&&_e.push("'"+this.terminals_[fe]+"'");Be=I.showPosition?"Parse error on line "+(Re+1)+`:
`+I.showPosition()+`
Expecting `+_e.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(Re+1)+": Unexpected "+(b==Ue?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(Be,{text:I.match,token:this.terminals_[b]||b,line:I.yylineno,loc:Se,expected:_e})}if(N[0]instanceof Array&&N.length>1)throw Error("Parse Error: multiple actions possible at state: "+z+", token: "+b);switch(N[0]){case 1:a.push(b),f.push(I.yytext),t.push(I.yylloc),a.push(N[1]),b=null,be?(b=be,be=null):(Fe=I.yyleng,n=I.yytext,Re=I.yylineno,Se=I.yylloc,Pe>0&&Pe--);break;case 2:if(F=this.productions_[N[1]][1],X.$=f[f.length-F],X._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},We&&(X._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(X,[n,Fe,Re,j.yy,N[1],f,t].concat(Ke)),Te!==void 0)return Te;F&&(a=a.slice(0,-1*F*2),f=f.slice(0,-1*F),t=t.slice(0,-1*F)),a.push(this.productions_[N[1]][0]),f.push(X.$),t.push(X._$),Ye=me[a[a.length-2]][a[a.length-1]],a.push(Ye);break;case 3:return!0}}return!0},"parse")};ge.lexer=(function(){return{EOF:1,parseError:u(function(i,m){if(this.yy.parser)this.yy.parser.parseError(i,m);else throw Error(i)},"parseError"),setInput:u(function(i,m){return this.yy=m||this.yy||{},this._input=i,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 i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:u(function(i){var m=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var s=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),a.length-1&&(this.yylineno-=a.length-1);var f=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:a?(a.length===s.length?this.yylloc.first_column:0)+s[s.length-a.length].length-a[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-m]),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(i){this.unput(this.match.slice(i))},"less"),pastInput:u(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var i=this.pastInput(),m=Array(i.length+1).join("-");return i+this.upcomingInput()+`
`+m+"^"},"showPosition"),test_match:u(function(i,m){var a,s,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),s=i[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],a=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var t in f)this[t]=f[t];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,m,a,s;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),t=0;t<f.length;t++)if(a=this._input.match(this.rules[f[t]]),a&&(!m||a[0].length>m[0].length)){if(m=a,s=t,this.options.backtrack_lexer){if(i=this.test_match(a,f[t]),i!==!1)return i;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(i=this.test_match(m,f[s]),i===!1?!1:i):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(){return this.next()||this.lex()},"lex"),begin:u(function(i){this.conditionStack.push(i)},"begin"),popState:u(function(){return this.conditionStack.length-1>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(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:u(function(i){this.begin(i)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(i,m,a,s){switch(a){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;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:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return m.yytext=m.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?: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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,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,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}})();function de(){this.yy={}}return u(de,"Parser"),de.prototype=ge,ge.Parser=de,new de})();qe.parser=qe;var ct=qe,ot=(J=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Xe,this.getAccTitle=st,this.setAccDescription=it,this.getAccDescription=et,this.setDiagramTitle=Ze,this.getDiagramTitle=Je,this.getConfig=u(()=>Ne().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(r){this.direction=r}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(r,h){return this.requirements.has(r)||this.requirements.set(r,{name:r,type:h,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(r)}getRequirements(){return this.requirements}setNewReqId(r){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=r)}setNewReqText(r){this.latestRequirement!==void 0&&(this.latestRequirement.text=r)}setNewReqRisk(r){this.latestRequirement!==void 0&&(this.latestRequirement.risk=r)}setNewReqVerifyMethod(r){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=r)}addElement(r){return this.elements.has(r)||(this.elements.set(r,{name:r,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),ke.info("Added new element: ",r)),this.resetLatestElement(),this.elements.get(r)}getElements(){return this.elements}setNewElementType(r){this.latestElement!==void 0&&(this.latestElement.type=r)}setNewElementDocRef(r){this.latestElement!==void 0&&(this.latestElement.docRef=r)}addRelationship(r,h,c){this.relations.push({type:r,src:h,dst:c})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,tt()}setCssStyle(r,h){for(let c of r){let y=this.requirements.get(c)??this.elements.get(c);if(!h||!y)return;for(let l of h)l.includes(",")?y.cssStyles.push(...l.split(",")):y.cssStyles.push(l)}}setClass(r,h){var c;for(let y of r){let l=this.requirements.get(y)??this.elements.get(y);if(l)for(let E of h){l.classes.push(E);let d=(c=this.classes.get(E))==null?void 0:c.styles;d&&l.cssStyles.push(...d)}}}defineClass(r,h){for(let c of r){let y=this.classes.get(c);y===void 0&&(y={id:c,styles:[],textStyles:[]},this.classes.set(c,y)),h&&h.forEach(function(l){if(/color/.exec(l)){let E=l.replace("fill","bgFill");y.textStyles.push(E)}y.styles.push(l)}),this.requirements.forEach(l=>{l.classes.includes(c)&&l.cssStyles.push(...h.flatMap(E=>E.split(",")))}),this.elements.forEach(l=>{l.classes.includes(c)&&l.cssStyles.push(...h.flatMap(E=>E.split(",")))})}}getClasses(){return this.classes}getData(){var y,l,E,d;let r=Ne(),h=[],c=[];for(let o of this.requirements.values()){let p=o;p.id=o.name,p.cssStyles=o.cssStyles,p.cssClasses=o.classes.join(" "),p.shape="requirementBox",p.look=r.look,h.push(p)}for(let o of this.elements.values()){let p=o;p.shape="requirementBox",p.look=r.look,p.id=o.name,p.cssStyles=o.cssStyles,p.cssClasses=o.classes.join(" "),h.push(p)}for(let o of this.relations){let p=0,S=o.type===this.Relationships.CONTAINS,T={id:`${o.src}-${o.dst}-${p}`,start:((y=this.requirements.get(o.src))==null?void 0:y.name)??((l=this.elements.get(o.src))==null?void 0:l.name),end:((E=this.requirements.get(o.dst))==null?void 0:E.name)??((d=this.elements.get(o.dst))==null?void 0:d.name),label:`&lt;&lt;${o.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",S?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:S?"normal":"dashed",arrowTypeStart:S?"requirement_contains":"",arrowTypeEnd:S?"":"requirement_arrow",look:r.look};c.push(T),p++}return{nodes:h,edges:c,other:{},config:r,direction:this.getDirection()}}},u(J,"RequirementDB"),J),ht=u(e=>`
marker {
fill: ${e.relationColor};
stroke: ${e.relationColor};
}
marker.cross {
stroke: ${e.lineColor};
}
svg {
font-family: ${e.fontFamily};
font-size: ${e.fontSize};
}
.reqBox {
fill: ${e.requirementBackground};
fill-opacity: 1.0;
stroke: ${e.requirementBorderColor};
stroke-width: ${e.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${e.requirementTextColor};
}
.reqLabelBox {
fill: ${e.relationLabelBackground};
fill-opacity: 1.0;
}
.req-title-line {
stroke: ${e.requirementBorderColor};
stroke-width: ${e.requirementBorderSize};
}
.relationshipLine {
stroke: ${e.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${e.relationLabelColor};
}
.divider {
stroke: ${e.nodeBorder};
stroke-width: 1;
}
.label {
font-family: ${e.fontFamily};
color: ${e.nodeTextColor||e.textColor};
}
.label text,span {
fill: ${e.nodeTextColor||e.textColor};
color: ${e.nodeTextColor||e.textColor};
}
.labelBkg {
background-color: ${e.edgeLabelBackground};
}
`,"getStyles"),Qe={};Ge(Qe,{draw:()=>ut});var ut=u(async function(e,r,h,c){ke.info("REF0:"),ke.info("Drawing requirement diagram (unified)",r);let{securityLevel:y,state:l,layout:E}=Ne(),d=c.db.getData(),o=at(r,y);d.type=c.type,d.layoutAlgorithm=rt(E),d.nodeSpacing=(l==null?void 0:l.nodeSpacing)??50,d.rankSpacing=(l==null?void 0:l.rankSpacing)??50,d.markers=["requirement_contains","requirement_arrow"],d.diagramId=r,await nt(d,o),ze.insertTitle(o,"requirementDiagramTitleText",(l==null?void 0:l.titleTopMargin)??25,c.db.getDiagramTitle()),lt(o,8,"requirementDiagram",(l==null?void 0:l.useMaxWidth)??!0)},"draw"),yt={parser:ct,get db(){return new ot},renderer:Qe,styles:ht};export{yt as diagram};
import{t}from"./createLucideIcon-CnW3RofX.js";var a=t("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);export{a as t};
var a=/^-+$/,n=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,e=/^[\w+.-]+@[\w.-]+/;const c={name:"rpmchanges",token:function(r){return r.sol()&&(r.match(a)||r.match(n))?"tag":r.match(e)?"string":(r.next(),null)}};var o=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,i=/^[a-zA-Z0-9()]+:/,p=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,l=/^%(ifnarch|ifarch|if)/,s=/^%(else|endif)/,m=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;const u={name:"rpmspec",startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(r,t){if(r.peek()=="#")return r.skipToEnd(),"comment";if(r.sol()){if(r.match(i))return"header";if(r.match(p))return"atom"}if(r.match(/^\$\w+/)||r.match(/^\$\{\w+\}/))return"def";if(r.match(s))return"keyword";if(r.match(l))return t.controlFlow=!0,"keyword";if(t.controlFlow){if(r.match(m))return"operator";if(r.match(/^(\d+)/))return"number";r.eol()&&(t.controlFlow=!1)}if(r.match(o))return r.eol()&&(t.controlFlow=!1),"number";if(r.match(/^%[\w]+/))return r.match("(")&&(t.macroParameters=!0),"keyword";if(t.macroParameters){if(r.match(/^\d+/))return"number";if(r.match(")"))return t.macroParameters=!1,"keyword"}return r.match(/^%\{\??[\w \-\:\!]+\}/)?(r.eol()&&(t.controlFlow=!1),"def"):(r.next(),null)}};export{u as n,c as t};
import{n as p,t as r}from"./rpm-0QmIraaR.js";export{r as rpmChanges,p as rpmSpec};
import{t as r}from"./ruby-h-bI2J_W.js";export{r as ruby};
function d(e){for(var n={},t=0,i=e.length;t<i;++t)n[e[t]]=!0;return n}var k="alias.and.BEGIN.begin.break.case.class.def.defined?.do.else.elsif.END.end.ensure.false.for.if.in.module.next.not.or.redo.rescue.retry.return.self.super.then.true.undef.unless.until.when.while.yield.nil.raise.throw.catch.fail.loop.callcc.caller.lambda.proc.public.protected.private.require.load.require_relative.extend.autoload.__END__.__FILE__.__LINE__.__dir__".split("."),h=d(k),x=d(["def","class","case","for","while","until","module","catch","loop","proc","begin"]),v=d(["end","until"]),m={"[":"]","{":"}","(":")"},z={"]":"[","}":"{",")":"("},o;function s(e,n,t){return t.tokenize.push(e),e(n,t)}function c(e,n){if(e.sol()&&e.match("=begin")&&e.eol())return n.tokenize.push(y),"comment";if(e.eatSpace())return null;var t=e.next(),i;if(t=="`"||t=="'"||t=='"')return s(f(t,"string",t=='"'||t=="`"),e,n);if(t=="/")return b(e)?s(f(t,"string.special",!0),e,n):"operator";if(t=="%"){var a="string",r=!0;e.eat("s")?a="atom":e.eat(/[WQ]/)?a="string":e.eat(/[r]/)?a="string.special":e.eat(/[wxq]/)&&(a="string",r=!1);var u=e.eat(/[^\w\s=]/);return u?(m.propertyIsEnumerable(u)&&(u=m[u]),s(f(u,a,r,!0),e,n)):"operator"}else{if(t=="#")return e.skipToEnd(),"comment";if(t=="<"&&(i=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return s(g(i[2],i[1]),e,n);if(t=="0")return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(t))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if(t=="?"){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}else{if(t==":")return e.eat("'")?s(f("'","atom",!1),e,n):e.eat('"')?s(f('"',"atom",!0),e,n):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if(t=="@"&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"propertyName";if(t=="$")return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variableName.special";if(/[a-zA-Z_\xa1-\uffff]/.test(t))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"variable";if(t=="|"&&(n.varList||n.lastTok=="{"||n.lastTok=="do"))return o="|",null;if(/[\(\)\[\]{}\\;]/.test(t))return o=t,null;if(t=="-"&&e.eat(">"))return"operator";if(/[=+\-\/*:\.^%<>~|]/.test(t)){var l=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return t=="."&&!l&&(o="."),"operator"}else return null}}}function b(e){for(var n=e.pos,t=0,i,a=!1,r=!1;(i=e.next())!=null;)if(r)r=!1;else{if("[{(".indexOf(i)>-1)t++;else if("]})".indexOf(i)>-1){if(t--,t<0)break}else if(i=="/"&&t==0){a=!0;break}r=i=="\\"}return e.backUp(e.pos-n),a}function p(e){return e||(e=1),function(n,t){if(n.peek()=="}"){if(e==1)return t.tokenize.pop(),t.tokenize[t.tokenize.length-1](n,t);t.tokenize[t.tokenize.length-1]=p(e-1)}else n.peek()=="{"&&(t.tokenize[t.tokenize.length-1]=p(e+1));return c(n,t)}}function _(){var e=!1;return function(n,t){return e?(t.tokenize.pop(),t.tokenize[t.tokenize.length-1](n,t)):(e=!0,c(n,t))}}function f(e,n,t,i){return function(a,r){var u=!1,l;for(r.context.type==="read-quoted-paused"&&(r.context=r.context.prev,a.eat("}"));(l=a.next())!=null;){if(l==e&&(i||!u)){r.tokenize.pop();break}if(t&&l=="#"&&!u){if(a.eat("{")){e=="}"&&(r.context={prev:r.context,type:"read-quoted-paused"}),r.tokenize.push(p());break}else if(/[@\$]/.test(a.peek())){r.tokenize.push(_());break}}u=!u&&l=="\\"}return n}}function g(e,n){return function(t,i){return n&&t.eatSpace(),t.match(e)?i.tokenize.pop():t.skipToEnd(),"string"}}function y(e,n){return e.sol()&&e.match("=end")&&e.eol()&&n.tokenize.pop(),e.skipToEnd(),"comment"}const w={name:"ruby",startState:function(e){return{tokenize:[c],indented:0,context:{type:"top",indented:-e},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,n){o=null,e.sol()&&(n.indented=e.indentation());var t=n.tokenize[n.tokenize.length-1](e,n),i,a=o;if(t=="variable"){var r=e.current();t=n.lastTok=="."?"property":h.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(r)?"tag":n.lastTok=="def"||n.lastTok=="class"||n.varList?"def":"variable",t=="keyword"&&(a=r,x.propertyIsEnumerable(r)?i="indent":v.propertyIsEnumerable(r)?i="dedent":((r=="if"||r=="unless")&&e.column()==e.indentation()||r=="do"&&n.context.indented<n.indented)&&(i="indent"))}return(o||t&&t!="comment")&&(n.lastTok=a),o=="|"&&(n.varList=!n.varList),i=="indent"||/[\(\[\{]/.test(o)?n.context={prev:n.context,type:o||t,indented:n.indented}:(i=="dedent"||/[\)\]\}]/.test(o))&&n.context.prev&&(n.context=n.context.prev),e.eol()&&(n.continuedLine=o=="\\"||t=="operator"),t},indent:function(e,n,t){if(e.tokenize[e.tokenize.length-1]!=c)return null;var i=n&&n.charAt(0),a=e.context,r=a.type==z[i]||a.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(n);return a.indented+(r?0:t.unit)+(e.continuedLine?t.unit:0)},languageData:{indentOnInput:/^\s*(?:end|rescue|elsif|else|\})$/,commentTokens:{line:"#"},autocomplete:k}};export{w as t};
import{s as J}from"./chunk-LvLJmgfZ.js";import{u as K}from"./useEvent-DO6uJBas.js";import{t as Z}from"./react-BGmjiNul.js";import{b as $,qr as ee,w as te}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as V}from"./compiler-runtime-DeeZ7FnK.js";import"./tooltip-BGrCWNss.js";import{w as re}from"./utilities.esm-CIPARd6-.js";import{n as Y}from"./constants-B6Cb__3x.js";import{b as oe,j as se,s as ae}from"./config-CIrPQIbt.js";import{t as ie}from"./jsx-runtime-ZmTK25f3.js";import{t as F}from"./button-YC1gW_kJ.js";import"./dist-DBwNzi3C.js";import{E as me,Y as H}from"./JsonOutput-CknFTI_u.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{r as le}from"./requests-BsVD4CdD.js";import"./layout-B1RE_FQ4.js";import{r as ne}from"./download-BhCZMKuQ.js";import"./markdown-renderer-DhMlG2dP.js";import{t as ce}from"./copy-CQ15EONK.js";import{t as de}from"./download-B9SUL40m.js";import{i as pe,l as he,n as xe,r as M,t as fe,u as be}from"./panels-DdW0Mr43.js";import{t as je}from"./spinner-DaIKav-i.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{t as ye}from"./use-toast-rmUWldD_.js";import"./Combination-CMPwuAmi.js";import"./dates-Dhn1r-h6.js";import{a as ue,c as ge,l as ke,n as _e,r as Ne,t as we}from"./dialog-CxGKN4C_.js";import"./popover-Gz-GJzym.js";import{t as ve}from"./share-CbPtIlnM.js";import"./vega-loader.browser-CRZ52CKf.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import{t as Se}from"./copy-Bv2DBpIS.js";import"./purify.es-DNVQZNFu.js";import{a as Ce}from"./cell-link-Bw5bzt4a.js";import"./chunk-5FQGJX7Z-CVUXBqX6.js";import"./katex-Dc8yG8NU.js";import"./html-to-image-DjukyIj4.js";import"./esm-DpMp6qko.js";import{n as Ie,t as Ae}from"./react-resizable-panels.browser.esm-Ctj_10o2.js";import"./name-cell-input-FC1vzor8.js";import{t as Ee}from"./icon-32x32-ClOCJ7rj.js";import"./ws-BApgRfsy.js";import"./dist-C9XNJlLJ.js";import"./dist-fsvXrTzp.js";import"./dist-6cIjG-FS.js";import"./dist-CldbmzwA.js";import"./dist-OM63llNV.js";import"./dist-BmvOPdv_.js";import"./dist-DDGPBuw4.js";import"./dist-C4h-1T2Q.js";import"./dist-D_XLVesh.js";import"./esm-l4kcybiY.js";var Te=V(),ze=J(Z(),1),t=J(ie(),1);const Re=s=>{let e=(0,Te.c)(21),{appConfig:o}=s,{setCells:r}=te(),{sendComponentValues:x}=le(),n;e[0]===x?n=e[1]:(n=()=>(M.INSTANCE.start(x),Pe),e[0]=x,e[1]=n);let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[2]=a):a=e[2],(0,ze.useEffect)(n,a);let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=ae(),e[3]=i):i=e[3];let f;e[4]===r?f=e[5]:(f={autoInstantiate:!0,setCells:r,sessionId:i},e[4]=r,e[5]=f);let{connection:m}=xe(f),y=K($),b;e[6]===m.state?b=e[7]:(b=oe(m.state),e[6]=m.state,e[7]=b);let p=b,c;e[8]!==o||e[9]!==p?(c=()=>p?(0,t.jsxs)(me,{milliseconds:2e3,fallback:null,children:[(0,t.jsx)(je,{className:"mx-auto"}),(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground mt-2",children:"Connecting..."})]}):(0,t.jsx)(pe,{appConfig:o,mode:"read"}),e[8]=o,e[9]=p,e[10]=c):c=e[10];let h=c,u=o.width,l;e[11]===m?l=e[12]:(l=(0,t.jsx)(be,{connection:m,className:"sm:pt-8"}),e[11]=m,e[12]=l);let d;e[13]===h?d=e[14]:(d=h(),e[13]=h,e[14]=d);let j;return e[15]!==o.width||e[16]!==m||e[17]!==y||e[18]!==l||e[19]!==d?(j=(0,t.jsxs)(he,{connection:m,isRunning:y,width:u,children:[l,d]}),e[15]=o.width,e[16]=m,e[17]=y,e[18]=l,e[19]=d,e[20]=j):j=e[20],j};function Pe(){M.INSTANCE.stop()}var Q=V();const We=()=>{let s=(0,Q.c)(3),e=K(ee);if(!H()||!e)return null;let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsxs)("span",{children:["Static"," ",(0,t.jsx)("a",{href:Y.githubPage,target:"_blank",className:"text-(--sky-11) font-medium underline",children:"marimo"})," ","notebook - Run or edit for full interactivity"]}),s[0]=o):o=s[0];let r;return s[1]===e?r=s[2]:(r=(0,t.jsxs)("div",{className:"px-4 py-2 bg-(--sky-2) border-b border-(--sky-7) text-(--sky-11) flex justify-between items-center gap-4 print:hidden text-sm","data-testid":"static-notebook-banner",children:[o,(0,t.jsx)("span",{className:"shrink-0",children:(0,t.jsx)(Oe,{code:e})})]}),s[1]=e,s[2]=r),r};var Oe=s=>{let e=(0,Q.c)(78),{code:o}=s,r=Ce()||"notebook.py",x=r.lastIndexOf("/");x!==-1&&(r=r.slice(x+1));let n=window.location.href,a,i,f,m,y,b,p,c,h,u,l,d,j,k,_,N,g,w,v;if(e[0]!==o||e[1]!==r){let G=ve({code:o});m=we,e[21]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(ke,{asChild:!0,children:(0,t.jsx)(F,{"data-testid":"static-notebook-dialog-trigger",variant:"outline",size:"xs",children:"Run or Edit"})}),e[21]=l):l=e[21],f=_e,i=ue,e[22]===r?u=e[23]:(u=(0,t.jsx)(ge,{children:r}),e[22]=r,e[23]=u),a=Ne,b="pt-3 text-left space-y-3",e[24]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsxs)("p",{children:["This is a static"," ",(0,t.jsx)("a",{href:Y.githubPage,target:"_blank",className:"text-(--sky-11) hover:underline font-medium",children:"marimo"})," ","notebook. To run interactively:"]}),e[24]=p):p=e[24];let U;e[25]===Symbol.for("react.memo_cache_sentinel")?(U=(0,t.jsx)("br",{}),e[25]=U):U=e[25],e[26]===r?c=e[27]:(c=(0,t.jsx)("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:(0,t.jsxs)("div",{className:"font-mono text-(--sky-11) leading-relaxed",children:["pip install marimo",U,"marimo edit ",r]})}),e[26]=r,e[27]=c),e[28]===Symbol.for("react.memo_cache_sentinel")?(h=!n.endsWith(".html")&&(0,t.jsxs)("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:[(0,t.jsx)("div",{className:"text-sm text-(--sky-12) mb-1",children:"Or run directly from URL:"}),(0,t.jsxs)("div",{className:"font-mono text-(--sky-11) break-all",children:["marimo edit ",window.location.href]})]}),e[28]=h):h=e[28],v="pt-3 border-t border-(--sky-7)",N="text-sm text-(--sky-12) mb-2",e[29]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)("strong",{children:"Try in browser with WebAssembly:"}),e[29]=g):g=e[29],w=" ",y=G,d="_blank",j="text-(--sky-11) hover:underline break-all",k="noreferrer",_=G.slice(0,50),e[0]=o,e[1]=r,e[2]=a,e[3]=i,e[4]=f,e[5]=m,e[6]=y,e[7]=b,e[8]=p,e[9]=c,e[10]=h,e[11]=u,e[12]=l,e[13]=d,e[14]=j,e[15]=k,e[16]=_,e[17]=N,e[18]=g,e[19]=w,e[20]=v}else a=e[2],i=e[3],f=e[4],m=e[5],y=e[6],b=e[7],p=e[8],c=e[9],h=e[10],u=e[11],l=e[12],d=e[13],j=e[14],k=e[15],_=e[16],N=e[17],g=e[18],w=e[19],v=e[20];let S;e[30]!==y||e[31]!==d||e[32]!==j||e[33]!==k||e[34]!==_?(S=(0,t.jsxs)("a",{href:y,target:d,className:j,rel:k,children:[_,"..."]}),e[30]=y,e[31]=d,e[32]=j,e[33]=k,e[34]=_,e[35]=S):S=e[35];let C;e[36]!==S||e[37]!==N||e[38]!==g||e[39]!==w?(C=(0,t.jsxs)("p",{className:N,children:[g,w,S]}),e[36]=S,e[37]=N,e[38]=g,e[39]=w,e[40]=C):C=e[40];let q;e[41]===Symbol.for("react.memo_cache_sentinel")?(q=(0,t.jsx)("p",{className:"text-sm text-(--sky-12)",children:"Note: WebAssembly may not work for all notebooks. Additionally, some dependencies may not be available in the browser."}),e[41]=q):q=e[41];let I;e[42]!==C||e[43]!==v?(I=(0,t.jsxs)("div",{className:v,children:[C,q]}),e[42]=C,e[43]=v,e[44]=I):I=e[44];let A;e[45]!==a||e[46]!==b||e[47]!==p||e[48]!==c||e[49]!==h||e[50]!==I?(A=(0,t.jsxs)(a,{className:b,children:[p,c,h,I]}),e[45]=a,e[46]=b,e[47]=p,e[48]=c,e[49]=h,e[50]=I,e[51]=A):A=e[51];let E;e[52]!==i||e[53]!==u||e[54]!==A?(E=(0,t.jsxs)(i,{children:[u,A]}),e[52]=i,e[53]=u,e[54]=A,e[55]=E):E=e[55];let T;e[56]===o?T=e[57]:(T=async()=>{await Se(o),ye({title:"Copied to clipboard"})},e[56]=o,e[57]=T);let B;e[58]===Symbol.for("react.memo_cache_sentinel")?(B=(0,t.jsx)(ce,{className:"w-3 h-3 mr-2"}),e[58]=B):B=e[58];let z;e[59]===T?z=e[60]:(z=(0,t.jsxs)(F,{"data-testid":"copy-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:T,children:[B,"Copy code"]}),e[59]=T,e[60]=z);let R;e[61]!==o||e[62]!==r?(R=()=>{ne(new Blob([o],{type:"text/plain"}),r)},e[61]=o,e[62]=r,e[63]=R):R=e[63];let D;e[64]===Symbol.for("react.memo_cache_sentinel")?(D=(0,t.jsx)(de,{className:"w-3 h-3 mr-2"}),e[64]=D):D=e[64];let P;e[65]===R?P=e[66]:(P=(0,t.jsxs)(F,{"data-testid":"download-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:R,children:[D,"Download"]}),e[65]=R,e[66]=P);let W;e[67]!==z||e[68]!==P?(W=(0,t.jsxs)("div",{className:"flex gap-3 pt-2",children:[z,P]}),e[67]=z,e[68]=P,e[69]=W):W=e[69];let O;e[70]!==f||e[71]!==E||e[72]!==W?(O=(0,t.jsxs)(f,{children:[E,W]}),e[70]=f,e[71]=E,e[72]=W,e[73]=O):O=e[73];let L;return e[74]!==m||e[75]!==l||e[76]!==O?(L=(0,t.jsxs)(m,{children:[l,O]}),e[74]=m,e[75]=l,e[76]=O,e[77]=L):L=e[77],L},X=V(),qe=se()||H(),Be=s=>{let e=(0,X.c)(9),o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(We,{}),e[0]=o):o=e[0];let r;e[1]===s.appConfig?r=e[2]:(r=(0,t.jsx)(Re,{appConfig:s.appConfig}),e[1]=s.appConfig,e[2]=r);let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=qe&&(0,t.jsx)(De,{}),e[3]=x):x=e[3];let n;e[4]===r?n=e[5]:(n=(0,t.jsxs)(Ae,{children:[o,r,x]}),e[4]=r,e[5]=n);let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(re,{}),e[6]=a):a=e[6];let i;return e[7]===n?i=e[8]:(i=(0,t.jsx)(fe,{children:(0,t.jsxs)(Ie,{direction:"horizontal",autoSaveId:"marimo:chrome:v1:run1",children:[n,a]})}),e[7]=n,e[8]=i),i},De=()=>{let s=(0,X.c)(1),e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"fixed bottom-0 right-0 z-50","data-testid":"watermark",children:(0,t.jsxs)("a",{href:Y.githubPage,target:"_blank",className:"text-sm text-(--grass-11) font-bold tracking-wide transition-colors bg-(--grass-4) hover:bg-(--grass-5) border-t border-l border-(--grass-8) px-3 py-1 rounded-tl-md flex items-center gap-2",children:[(0,t.jsx)("span",{children:"made with marimo"}),(0,t.jsx)("img",{src:Ee,alt:"marimo",className:"h-4 w-auto"})]})}),s[0]=e):e=s[0],e},Le=Be;export{Le as default};
import{t as I}from"./createReducer-Dnna-AUO.js";function T(){return{runIds:[],runMap:new Map}}var{reducer:v,createActions:q,valueAtom:w,useActions:_}=I(T,{addCellNotification:(e,i)=>{let{cellNotification:t,code:u}=i,r=t.timestamp??0,s=t.run_id;if(!s)return e;let d=e.runMap.get(s);if(!d&&R(u))return e;let o=t.output&&(t.output.channel==="marimo-error"||t.output.channel==="stderr"),n=o?"error":t.status==="queued"?"queued":t.status==="running"?"running":"success";if(!d){let p={runId:s,cellRuns:new Map([[t.cell_id,{cellId:t.cell_id,code:u.slice(0,200),elapsedTime:0,status:n,startTime:r}]]),runStartTime:r},l=[s,...e.runIds],m=new Map(e.runMap);if(l.length>50){let f=l.pop();f&&m.delete(f)}return m.set(s,p),{runIds:l,runMap:m}}let c=new Map(d.cellRuns),a=c.get(t.cell_id);if(a&&!o&&t.status==="queued")return e;if(a){n=a.status==="error"||o?"error":n;let p=t.status==="running"?r:a.startTime,l=n==="success"||n==="error"?r-a.startTime:void 0;c.set(t.cell_id,{...a,startTime:p,elapsedTime:l,status:n})}else c.set(t.cell_id,{cellId:t.cell_id,code:u.slice(0,200),elapsedTime:0,status:n,startTime:r});let M=new Map(e.runMap);return M.set(s,{...d,cellRuns:c}),{...e,runMap:M}},clearRuns:e=>({...e,runIds:[],runMap:new Map}),removeRun:(e,i)=>{let t=e.runIds.filter(r=>r!==i),u=new Map(e.runMap);return u.delete(i),{...e,runIds:t,runMap:u}}}),g=/mo\.md\(\s*r?('''|""")/;function R(e){return e.startsWith("mo.md(")&&g.test(e)}export{_ as n,w as t};
var W,G,j;import{n as xt}from"./ordinal-DTOdb5Da.js";import"./purify.es-DNVQZNFu.js";import{u as tt}from"./src-Cf4NnJCp.js";import{t as kt}from"./colors-C3_wIR8c.js";import{n as x}from"./src-BKLwm2RN.js";import{B as vt,C as bt,G as Lt,U as Et,_ as wt,a as At,b as et,s as St,u as Mt,v as It,z as Pt}from"./chunk-ABZYJK2D-t8l6Viza.js";var Nt=kt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ht(t,i){let r;if(i===void 0)for(let a of t)a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let u of t)(u=i(u,++a,t))!=null&&(r<u||r===void 0&&u>=u)&&(r=u)}return r}function ut(t,i){let r;if(i===void 0)for(let a of t)a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let u of t)(u=i(u,++a,t))!=null&&(r>u||r===void 0&&u>=u)&&(r=u)}return r}function nt(t,i){let r=0;if(i===void 0)for(let a of t)(a=+a)&&(r+=a);else{let a=-1;for(let u of t)(u=+i(u,++a,t))&&(r+=u)}return r}function Ct(t){return t.target.depth}function $t(t){return t.depth}function Ot(t,i){return i-1-t.height}function ct(t,i){return t.sourceLinks.length?t.depth:i-1}function Tt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ut(t.sourceLinks,Ct)-1:0}function Q(t){return function(){return t}}function ft(t,i){return Y(t.source,i.source)||t.index-i.index}function yt(t,i){return Y(t.target,i.target)||t.index-i.index}function Y(t,i){return t.y0-i.y0}function it(t){return t.value}function Dt(t){return t.index}function zt(t){return t.nodes}function jt(t){return t.links}function gt(t,i){let r=t.get(i);if(!r)throw Error("missing: "+i);return r}function dt({nodes:t}){for(let i of t){let r=i.y0,a=r;for(let u of i.sourceLinks)u.y0=r+u.width/2,r+=u.width;for(let u of i.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Ft(){let t=0,i=0,r=1,a=1,u=24,d=8,e,c=Dt,l=ct,y,p,g=zt,S=jt,L=6;function k(){let n={nodes:g.apply(null,arguments),links:S.apply(null,arguments)};return O(n),I(n),C(n),T(n),N(n),dt(n),n}k.update=function(n){return dt(n),n},k.nodeId=function(n){return arguments.length?(c=typeof n=="function"?n:Q(n),k):c},k.nodeAlign=function(n){return arguments.length?(l=typeof n=="function"?n:Q(n),k):l},k.nodeSort=function(n){return arguments.length?(y=n,k):y},k.nodeWidth=function(n){return arguments.length?(u=+n,k):u},k.nodePadding=function(n){return arguments.length?(d=e=+n,k):d},k.nodes=function(n){return arguments.length?(g=typeof n=="function"?n:Q(n),k):g},k.links=function(n){return arguments.length?(S=typeof n=="function"?n:Q(n),k):S},k.linkSort=function(n){return arguments.length?(p=n,k):p},k.size=function(n){return arguments.length?(t=i=0,r=+n[0],a=+n[1],k):[r-t,a-i]},k.extent=function(n){return arguments.length?(t=+n[0][0],r=+n[1][0],i=+n[0][1],a=+n[1][1],k):[[t,i],[r,a]]},k.iterations=function(n){return arguments.length?(L=+n,k):L};function O({nodes:n,links:f}){for(let[o,s]of n.entries())s.index=o,s.sourceLinks=[],s.targetLinks=[];let h=new Map(n.map((o,s)=>[c(o,s,n),o]));for(let[o,s]of f.entries()){s.index=o;let{source:_,target:b}=s;typeof _!="object"&&(_=s.source=gt(h,_)),typeof b!="object"&&(b=s.target=gt(h,b)),_.sourceLinks.push(s),b.targetLinks.push(s)}if(p!=null)for(let{sourceLinks:o,targetLinks:s}of n)o.sort(p),s.sort(p)}function I({nodes:n}){for(let f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function C({nodes:n}){let f=n.length,h=new Set(n),o=new Set,s=0;for(;h.size;){for(let _ of h){_.depth=s;for(let{target:b}of _.sourceLinks)o.add(b)}if(++s>f)throw Error("circular link");h=o,o=new Set}}function T({nodes:n}){let f=n.length,h=new Set(n),o=new Set,s=0;for(;h.size;){for(let _ of h){_.height=s;for(let{source:b}of _.targetLinks)o.add(b)}if(++s>f)throw Error("circular link");h=o,o=new Set}}function P({nodes:n}){let f=ht(n,s=>s.depth)+1,h=(r-t-u)/(f-1),o=Array(f);for(let s of n){let _=Math.max(0,Math.min(f-1,Math.floor(l.call(null,s,f))));s.layer=_,s.x0=t+_*h,s.x1=s.x0+u,o[_]?o[_].push(s):o[_]=[s]}if(y)for(let s of o)s.sort(y);return o}function v(n){let f=ut(n,h=>(a-i-(h.length-1)*e)/nt(h,it));for(let h of n){let o=i;for(let s of h){s.y0=o,s.y1=o+s.value*f,o=s.y1+e;for(let _ of s.sourceLinks)_.width=_.value*f}o=(a-o+e)/(h.length+1);for(let s=0;s<h.length;++s){let _=h[s];_.y0+=o*(s+1),_.y1+=o*(s+1)}B(h)}}function N(n){let f=P(n);e=Math.min(d,(a-i)/(ht(f,h=>h.length)-1)),v(f);for(let h=0;h<L;++h){let o=.99**h,s=Math.max(1-o,(h+1)/L);$(f,o,s),D(f,o,s)}}function D(n,f,h){for(let o=1,s=n.length;o<s;++o){let _=n[o];for(let b of _){let E=0,U=0;for(let{source:X,value:q}of b.targetLinks){let lt=q*(b.layer-X.layer);E+=z(X,b)*lt,U+=lt}if(!(U>0))continue;let R=(E/U-b.y0)*f;b.y0+=R,b.y1+=R,A(b)}y===void 0&&_.sort(Y),m(_,h)}}function $(n,f,h){for(let o=n.length-2;o>=0;--o){let s=n[o];for(let _ of s){let b=0,E=0;for(let{target:R,value:X}of _.sourceLinks){let q=X*(R.layer-_.layer);b+=M(_,R)*q,E+=q}if(!(E>0))continue;let U=(b/E-_.y0)*f;_.y0+=U,_.y1+=U,A(_)}y===void 0&&s.sort(Y),m(s,h)}}function m(n,f){let h=n.length>>1,o=n[h];V(n,o.y0-e,h-1,f),w(n,o.y1+e,h+1,f),V(n,a,n.length-1,f),w(n,i,0,f)}function w(n,f,h,o){for(;h<n.length;++h){let s=n[h],_=(f-s.y0)*o;_>1e-6&&(s.y0+=_,s.y1+=_),f=s.y1+e}}function V(n,f,h,o){for(;h>=0;--h){let s=n[h],_=(s.y1-f)*o;_>1e-6&&(s.y0-=_,s.y1-=_),f=s.y0-e}}function A({sourceLinks:n,targetLinks:f}){if(p===void 0){for(let{source:{sourceLinks:h}}of f)h.sort(yt);for(let{target:{targetLinks:h}}of n)h.sort(ft)}}function B(n){if(p===void 0)for(let{sourceLinks:f,targetLinks:h}of n)f.sort(yt),h.sort(ft)}function z(n,f){let h=n.y0-(n.sourceLinks.length-1)*e/2;for(let{target:o,width:s}of n.sourceLinks){if(o===f)break;h+=s+e}for(let{source:o,width:s}of f.targetLinks){if(o===n)break;h-=s}return h}function M(n,f){let h=f.y0-(f.targetLinks.length-1)*e/2;for(let{source:o,width:s}of f.targetLinks){if(o===n)break;h+=s+e}for(let{target:o,width:s}of n.sourceLinks){if(o===f)break;h-=s}return h}return k}var rt=Math.PI,st=2*rt,F=1e-6,Ut=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new ot}ot.prototype=pt.prototype={constructor:ot,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,r,a){this._+="Q"+ +t+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},bezierCurveTo:function(t,i,r,a,u,d){this._+="C"+ +t+","+ +i+","+ +r+","+ +a+","+(this._x1=+u)+","+(this._y1=+d)},arcTo:function(t,i,r,a,u){t=+t,i=+i,r=+r,a=+a,u=+u;var d=this._x1,e=this._y1,c=r-t,l=a-i,y=d-t,p=e-i,g=y*y+p*p;if(u<0)throw Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(g>F)if(!(Math.abs(p*c-l*y)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var S=r-d,L=a-e,k=c*c+l*l,O=S*S+L*L,I=Math.sqrt(k),C=Math.sqrt(g),T=u*Math.tan((rt-Math.acos((k+g-O)/(2*I*C)))/2),P=T/C,v=T/I;Math.abs(P-1)>F&&(this._+="L"+(t+P*y)+","+(i+P*p)),this._+="A"+u+","+u+",0,0,"+ +(p*S>y*L)+","+(this._x1=t+v*c)+","+(this._y1=i+v*l)}},arc:function(t,i,r,a,u,d){t=+t,i=+i,r=+r,d=!!d;var e=r*Math.cos(a),c=r*Math.sin(a),l=t+e,y=i+c,p=1^d,g=d?a-u:u-a;if(r<0)throw Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+y:(Math.abs(this._x1-l)>F||Math.abs(this._y1-y)>F)&&(this._+="L"+l+","+y),r&&(g<0&&(g=g%st+st),g>Ut?this._+="A"+r+","+r+",0,1,"+p+","+(t-e)+","+(i-c)+"A"+r+","+r+",0,1,"+p+","+(this._x1=l)+","+(this._y1=y):g>F&&(this._+="A"+r+","+r+",0,"+ +(g>=rt)+","+p+","+(this._x1=t+r*Math.cos(u))+","+(this._y1=i+r*Math.sin(u))))},rect:function(t,i,r,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +r+"v"+ +a+"h"+-r+"Z"},toString:function(){return this._}};var Wt=pt;function _t(t){return function(){return t}}function Gt(t){return t[0]}function Vt(t){return t[1]}var Bt=Array.prototype.slice;function Rt(t){return t.source}function Xt(t){return t.target}function qt(t){var i=Rt,r=Xt,a=Gt,u=Vt,d=null;function e(){var c,l=Bt.call(arguments),y=i.apply(this,l),p=r.apply(this,l);if(d||(d=c=Wt()),t(d,+a.apply(this,(l[0]=y,l)),+u.apply(this,l),+a.apply(this,(l[0]=p,l)),+u.apply(this,l)),c)return d=null,c+""||null}return e.source=function(c){return arguments.length?(i=c,e):i},e.target=function(c){return arguments.length?(r=c,e):r},e.x=function(c){return arguments.length?(a=typeof c=="function"?c:_t(+c),e):a},e.y=function(c){return arguments.length?(u=typeof c=="function"?c:_t(+c),e):u},e.context=function(c){return arguments.length?(d=c??null,e):d},e}function Qt(t,i,r,a,u){t.moveTo(i,r),t.bezierCurveTo(i=(i+a)/2,r,i,u,a,u)}function Yt(){return qt(Qt)}function Kt(t){return[t.source.x1,t.y0]}function Zt(t){return[t.target.x0,t.y1]}function Ht(){return Yt().source(Kt).target(Zt)}var at=(function(){var t=x(function(e,c,l,y){for(l||(l={}),y=e.length;y--;l[e[y]]=c);return l},"o"),i=[1,9],r=[1,10],a=[1,5,10,12],u={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:x(function(e,c,l,y,p,g,S){var L=g.length-1;switch(p){case 7:let k=y.findOrCreateNode(g[L-4].trim().replaceAll('""','"')),O=y.findOrCreateNode(g[L-2].trim().replaceAll('""','"')),I=parseFloat(g[L].trim());y.addLink(k,O,I);break;case 8:case 9:case 11:this.$=g[L];break;case 10:this.$=g[L-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:r},{15:18,16:7,17:8,18:i,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:i,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:x(function(e,c){if(c.recoverable)this.trace(e);else{var l=Error(e);throw l.hash=c,l}},"parseError"),parse:x(function(e){var c=this,l=[0],y=[],p=[null],g=[],S=this.table,L="",k=0,O=0,I=0,C=2,T=1,P=g.slice.call(arguments,1),v=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);v.setInput(e,N.yy),N.yy.lexer=v,N.yy.parser=this,v.yylloc===void 0&&(v.yylloc={});var $=v.yylloc;g.push($);var m=v.options&&v.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function w(E){l.length-=2*E,p.length-=E,g.length-=E}x(w,"popStack");function V(){var E=y.pop()||v.lex()||T;return typeof E!="number"&&(E instanceof Array&&(y=E,E=y.pop()),E=c.symbols_[E]||E),E}x(V,"lex");for(var A,B,z,M,n,f={},h,o,s,_;;){if(z=l[l.length-1],this.defaultActions[z]?M=this.defaultActions[z]:(A??(A=V()),M=S[z]&&S[z][A]),M===void 0||!M.length||!M[0]){var b="";for(h in _=[],S[z])this.terminals_[h]&&h>C&&_.push("'"+this.terminals_[h]+"'");b=v.showPosition?"Parse error on line "+(k+1)+`:
`+v.showPosition()+`
Expecting `+_.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(k+1)+": Unexpected "+(A==T?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(b,{text:v.match,token:this.terminals_[A]||A,line:v.yylineno,loc:$,expected:_})}if(M[0]instanceof Array&&M.length>1)throw Error("Parse Error: multiple actions possible at state: "+z+", token: "+A);switch(M[0]){case 1:l.push(A),p.push(v.yytext),g.push(v.yylloc),l.push(M[1]),A=null,B?(A=B,B=null):(O=v.yyleng,L=v.yytext,k=v.yylineno,$=v.yylloc,I>0&&I--);break;case 2:if(o=this.productions_[M[1]][1],f.$=p[p.length-o],f._$={first_line:g[g.length-(o||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(o||1)].first_column,last_column:g[g.length-1].last_column},m&&(f._$.range=[g[g.length-(o||1)].range[0],g[g.length-1].range[1]]),n=this.performAction.apply(f,[L,O,k,N.yy,M[1],p,g].concat(P)),n!==void 0)return n;o&&(l=l.slice(0,-1*o*2),p=p.slice(0,-1*o),g=g.slice(0,-1*o)),l.push(this.productions_[M[1]][0]),p.push(f.$),g.push(f._$),s=S[l[l.length-2]][l[l.length-1]],l.push(s);break;case 3:return!0}}return!0},"parse")};u.lexer=(function(){return{EOF:1,parseError:x(function(e,c){if(this.yy.parser)this.yy.parser.parseError(e,c);else throw Error(e)},"parseError"),setInput:x(function(e,c){return this.yy=c||this.yy||{},this._input=e,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:x(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:x(function(e){var c=e.length,l=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var y=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),l.length-1&&(this.yylineno-=l.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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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:x(function(e){this.unput(this.match.slice(e))},"less"),pastInput:x(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var e=this.pastInput(),c=Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+c+"^"},"showPosition"),test_match:x(function(e,c){var l,y,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))),y=e[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],l=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var g in p)this[g]=p[g];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,c,l,y;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),g=0;g<p.length;g++)if(l=this._input.match(this.rules[p[g]]),l&&(!c||l[0].length>c[0].length)){if(c=l,y=g,this.options.backtrack_lexer){if(e=this.test_match(l,p[g]),e!==!1)return e;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(e=this.test_match(c,p[y]),e===!1?!1:e):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:x(function(){return this.next()||this.lex()},"lex"),begin:x(function(e){this.conditionStack.push(e)},"begin"),popState:x(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:x(function(e){this.begin(e)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(e,c,l,y){switch(l){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}})();function d(){this.yy={}}return x(d,"Parser"),d.prototype=u,u.Parser=d,new d})();at.parser=at;var K=at,Z=[],H=[],J=new Map,Jt=x(()=>{Z=[],H=[],J=new Map,At()},"clear"),te=(W=class{constructor(i,r,a=0){this.source=i,this.target=r,this.value=a}},x(W,"SankeyLink"),W),ee=x((t,i,r)=>{Z.push(new te(t,i,r))},"addLink"),ne=(G=class{constructor(i){this.ID=i}},x(G,"SankeyNode"),G),ie={nodesMap:J,getConfig:x(()=>et().sankey,"getConfig"),getNodes:x(()=>H,"getNodes"),getLinks:x(()=>Z,"getLinks"),getGraph:x(()=>({nodes:H.map(t=>({id:t.ID})),links:Z.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),addLink:ee,findOrCreateNode:x(t=>{t=St.sanitizeText(t,et());let i=J.get(t);return i===void 0&&(i=new ne(t),J.set(t,i),H.push(i)),i},"findOrCreateNode"),getAccTitle:It,setAccTitle:vt,getAccDescription:wt,setAccDescription:Pt,getDiagramTitle:bt,setDiagramTitle:Et,clear:Jt},mt=(j=class{static next(i){return new j(i+ ++j.count)}constructor(i){this.id=i,this.href=`#${i}`}toString(){return"url("+this.href+")"}},x(j,"Uid"),j.count=0,j),re={left:$t,right:Ot,center:Tt,justify:ct},se={draw:x(function(t,i,r,a){let{securityLevel:u,sankey:d}=et(),e=Mt.sankey,c;u==="sandbox"&&(c=tt("#i"+i));let l=tt(u==="sandbox"?c.nodes()[0].contentDocument.body:"body"),y=u==="sandbox"?l.select(`[id="${i}"]`):tt(`[id="${i}"]`),p=(d==null?void 0:d.width)??e.width,g=(d==null?void 0:d.height)??e.width,S=(d==null?void 0:d.useMaxWidth)??e.useMaxWidth,L=(d==null?void 0:d.nodeAlignment)??e.nodeAlignment,k=(d==null?void 0:d.prefix)??e.prefix,O=(d==null?void 0:d.suffix)??e.suffix,I=(d==null?void 0:d.showValues)??e.showValues,C=a.db.getGraph(),T=re[L];Ft().nodeId(m=>m.id).nodeWidth(10).nodePadding(10+(I?15:0)).nodeAlign(T).extent([[0,0],[p,g]])(C);let P=xt(Nt);y.append("g").attr("class","nodes").selectAll(".node").data(C.nodes).join("g").attr("class","node").attr("id",m=>(m.uid=mt.next("node-")).id).attr("transform",function(m){return"translate("+m.x0+","+m.y0+")"}).attr("x",m=>m.x0).attr("y",m=>m.y0).append("rect").attr("height",m=>m.y1-m.y0).attr("width",m=>m.x1-m.x0).attr("fill",m=>P(m.id));let v=x(({id:m,value:w})=>I?`${m}
${k}${Math.round(w*100)/100}${O}`:m,"getText");y.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(C.nodes).join("text").attr("x",m=>m.x0<p/2?m.x1+6:m.x0-6).attr("y",m=>(m.y1+m.y0)/2).attr("dy",`${I?"0":"0.35"}em`).attr("text-anchor",m=>m.x0<p/2?"start":"end").text(v);let N=y.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(C.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),D=(d==null?void 0:d.linkColor)??"gradient";if(D==="gradient"){let m=N.append("linearGradient").attr("id",w=>(w.uid=mt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);m.append("stop").attr("offset","0%").attr("stop-color",w=>P(w.source.id)),m.append("stop").attr("offset","100%").attr("stop-color",w=>P(w.target.id))}let $;switch(D){case"gradient":$=x(m=>m.uid,"coloring");break;case"source":$=x(m=>P(m.source.id),"coloring");break;case"target":$=x(m=>P(m.target.id),"coloring");break;default:$=D}N.append("path").attr("d",Ht()).attr("stroke",$).attr("stroke-width",m=>Math.max(1,m.width)),Lt(void 0,y,0,S)},"draw")},oe=x(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
`).trim(),"prepareTextForParsing"),ae=x(t=>`.label {
font-family: ${t.fontFamily};
}`,"getStyles"),le=K.parse.bind(K);K.parse=t=>le(oe(t));var he={styles:ae,parser:K,db:ie,renderer:se};export{he as diagram};
var r={},l={eq:"operator",lt:"operator",le:"operator",gt:"operator",ge:"operator",in:"operator",ne:"operator",or:"operator"},c=/(<=|>=|!=|<>)/,m=/[=\(:\),{}.*<>+\-\/^\[\]]/;function o(e,n,s){if(s)for(var a=n.split(" "),t=0;t<a.length;t++)r[a[t]]={style:e,state:s}}o("def","stack pgm view source debug nesting nolist",["inDataStep"]),o("def","if while until for do do; end end; then else cancel",["inDataStep"]),o("def","label format _n_ _error_",["inDataStep"]),o("def","ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME",["inDataStep"]),o("def","filevar finfo finv fipname fipnamel fipstate first firstobs floor",["inDataStep"]),o("def","varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday",["inDataStep"]),o("def","zipfips zipname zipnamel zipstate",["inDataStep"]),o("def","put putc putn",["inDataStep"]),o("builtin","data run",["inDataStep"]),o("def","data",["inProc"]),o("def","%if %end %end; %else %else; %do %do; %then",["inMacro"]),o("builtin","proc run; quit; libname filename %macro %mend option options",["ALL"]),o("def","footnote title libname ods",["ALL"]),o("def","%let %put %global %sysfunc %eval ",["ALL"]),o("variable","&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext",["ALL"]),o("def","source2 nosource2 page pageno pagesize",["ALL"]),o("def","_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddfm ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref fmterr fmtsearch fnonct fnote font fontalias fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs on open order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2 paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps pw pwreq qtr quote r ranbin rancau random ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni rcorr read recfm register regr remote remove rename repeat repeated replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover sub subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq min max",["inDataStep","inProc"]),o("operator","and not ",["inDataStep","inProc"]);function p(e,n){var s=e.next();if(s==="/"&&e.eat("*"))return n.continueComment=!0,"comment";if(n.continueComment===!0)return s==="*"&&e.peek()==="/"?(e.next(),n.continueComment=!1):e.skipTo("*")?(e.skipTo("*"),e.next(),e.eat("/")&&(n.continueComment=!1)):e.skipToEnd(),"comment";if(s=="*"&&e.column()==e.indentation())return e.skipToEnd(),"comment";var a=s+e.peek();if((s==='"'||s==="'")&&!n.continueString)return n.continueString=s,"string";if(n.continueString)return n.continueString==s?n.continueString=null:e.skipTo(n.continueString)?(e.next(),n.continueString=null):e.skipToEnd(),"string";if(n.continueString!==null&&e.eol())return e.skipTo(n.continueString)||e.skipToEnd(),"string";if(/[\d\.]/.test(s))return s==="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):s==="0"?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(c.test(s+e.peek()))return e.next(),"operator";if(l.hasOwnProperty(a)){if(e.next(),e.peek()===" ")return l[a.toLowerCase()]}else if(m.test(s))return"operator";var t;if(e.match(/[%&;\w]+/,!1)!=null){if(t=s+e.match(/[%&;\w]+/,!0),/&/.test(t))return"variable"}else t=s;if(n.nextword)return e.match(/[\w]+/),e.peek()==="."&&e.skipTo(" "),n.nextword=!1,"variableName.special";if(t=t.toLowerCase(),n.inDataStep){if(t==="run;"||e.match(/run\s;/))return n.inDataStep=!1,"builtin";if(t&&e.next()===".")return/\w/.test(e.peek())?"variableName.special":"variable";if(t&&r.hasOwnProperty(t)&&(r[t].state.indexOf("inDataStep")!==-1||r[t].state.indexOf("ALL")!==-1)){e.start<e.pos&&e.backUp(e.pos-e.start);for(var i=0;i<t.length;++i)e.next();return r[t].style}}if(n.inProc){if(t==="run;"||t==="quit;")return n.inProc=!1,"builtin";if(t&&r.hasOwnProperty(t)&&(r[t].state.indexOf("inProc")!==-1||r[t].state.indexOf("ALL")!==-1))return e.match(/[\w]+/),r[t].style}return n.inMacro?t==="%mend"?(e.peek()===";"&&e.next(),n.inMacro=!1,"builtin"):t&&r.hasOwnProperty(t)&&(r[t].state.indexOf("inMacro")!==-1||r[t].state.indexOf("ALL")!==-1)?(e.match(/[\w]+/),r[t].style):"atom":t&&r.hasOwnProperty(t)?(e.backUp(1),e.match(/[\w]+/),t==="data"&&/=/.test(e.peek())===!1?(n.inDataStep=!0,n.nextword=!0,"builtin"):t==="proc"?(n.inProc=!0,n.nextword=!0,"builtin"):t==="%macro"?(n.inMacro=!0,n.nextword=!0,"builtin"):/title[1-9]/.test(t)?"def":t==="footnote"?(e.eat(/[1-9]/),"def"):n.inDataStep===!0&&r[t].state.indexOf("inDataStep")!==-1||n.inProc===!0&&r[t].state.indexOf("inProc")!==-1||n.inMacro===!0&&r[t].state.indexOf("inMacro")!==-1||r[t].state.indexOf("ALL")!==-1?r[t].style:null):null}const d={name:"sas",startState:function(){return{inDataStep:!1,inProc:!1,inMacro:!1,nextword:!1,continueString:null,continueComment:!1}},token:function(e,n){return e.eatSpace()?null:p(e,n)},languageData:{commentTokens:{block:{open:"/*",close:"*/"}}}};export{d as t};
import{t as s}from"./sas-BvwZbLPG.js";export{s as sas};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);export{t};

Sorry, the diff of this file is too big to display

import{t as e}from"./scheme-BPuaxh6y.js";export{e as scheme};
var E="builtin",s="comment",g="string",x="symbol",l="atom",b="number",v="bracket",S=2;function k(e){for(var t={},n=e.split(" "),a=0;a<n.length;++a)t[n[a]]=!0;return t}var y=k("\u03BB case-lambda call/cc class cond-expand define-class define-values exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax define-macro defmacro delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),q=k("define let letrec let* lambda define-macro defmacro let-syntax letrec-syntax let-values let*-values define-syntax syntax-rules define-values when unless");function Q(e,t,n){this.indent=e,this.type=t,this.prev=n}function d(e,t,n){e.indentStack=new Q(t,n,e.indentStack)}function $(e){e.indentStack=e.indentStack.prev}var R=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),C=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),U=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),W=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);function z(e){return e.match(R)}function I(e){return e.match(C)}function m(e,t){return t===!0&&e.backUp(1),e.match(W)}function j(e){return e.match(U)}function w(e,t){for(var n,a=!1;(n=e.next())!=null;){if(n==t.token&&!a){t.state.mode=!1;break}a=!a&&n=="\\"}}const B={name:"scheme",startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1,sExprQuote:!1}},token:function(e,t){if(t.indentStack==null&&e.sol()&&(t.indentation=e.indentation()),e.eatSpace())return null;var n=null;switch(t.mode){case"string":w(e,{token:'"',state:t}),n=g;break;case"symbol":w(e,{token:"|",state:t}),n=x;break;case"comment":for(var a,p=!1;(a=e.next())!=null;){if(a=="#"&&p){t.mode=!1;break}p=a=="|"}n=s;break;case"s-expr-comment":if(t.mode=!1,e.peek()=="("||e.peek()=="[")t.sExprComment=0;else{e.eatWhile(/[^\s\(\)\[\]]/),n=s;break}default:var r=e.next();if(r=='"')t.mode="string",n=g;else if(r=="'")e.peek()=="("||e.peek()=="["?(typeof t.sExprQuote!="number"&&(t.sExprQuote=0),n=l):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),n=l);else if(r=="|")t.mode="symbol",n=x;else if(r=="#")if(e.eat("|"))t.mode="comment",n=s;else if(e.eat(/[tf]/i))n=l;else if(e.eat(";"))t.mode="s-expr-comment",n=s;else{var i=null,o=!1,f=!0;e.eat(/[ei]/i)?o=!0:e.backUp(1),e.match(/^#b/i)?i=z:e.match(/^#o/i)?i=I:e.match(/^#x/i)?i=j:e.match(/^#d/i)?i=m:e.match(/^[-+0-9.]/,!1)?(f=!1,i=m):o||e.eat("#"),i!=null&&(f&&!o&&e.match(/^#[ei]/i),i(e)&&(n=b))}else if(/^[-+0-9.]/.test(r)&&m(e,!0))n=b;else if(r==";")e.skipToEnd(),n=s;else if(r=="("||r=="["){for(var c="",u=e.column(),h;(h=e.eat(/[^\s\(\[\;\)\]]/))!=null;)c+=h;c.length>0&&q.propertyIsEnumerable(c)?d(t,u+S,r):(e.eatSpace(),e.eol()||e.peek()==";"?d(t,u+1,r):d(t,u+e.current().length,r)),e.backUp(e.current().length-1),typeof t.sExprComment=="number"&&t.sExprComment++,typeof t.sExprQuote=="number"&&t.sExprQuote++,n=v}else r==")"||r=="]"?(n=v,t.indentStack!=null&&t.indentStack.type==(r==")"?"(":"[")&&($(t),typeof t.sExprComment=="number"&&--t.sExprComment==0&&(n=s,t.sExprComment=!1),typeof t.sExprQuote=="number"&&--t.sExprQuote==0&&(n=l,t.sExprQuote=!1))):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),n=y&&y.propertyIsEnumerable(e.current())?E:"variable")}return typeof t.sExprComment=="number"?s:typeof t.sExprQuote=="number"?l:n},indent:function(e){return e.indentStack==null?e.indentation:e.indentStack.indent},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:";;"}}};export{B as t};
import{s as oe}from"./chunk-LvLJmgfZ.js";import{d as be,l as ye,n as V,p as ae,u as we}from"./useEvent-DO6uJBas.js";import{t as Ne}from"./react-BGmjiNul.js";import{N as ke,Zr as ze,_n as Ce,ai as Se,oi as n,w as Oe,__tla as Ae}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as se}from"./compiler-runtime-DeeZ7FnK.js";import"./tooltip-BGrCWNss.js";import{f as ie}from"./hotkeys-BHHWjLlp.js";import{y as Ie}from"./utils-DXvhzCGS.js";import{t as Le}from"./constants-B6Cb__3x.js";import"./config-CIrPQIbt.js";import{t as Me}from"./jsx-runtime-ZmTK25f3.js";import{t as z}from"./button-YC1gW_kJ.js";import{t as le}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import{n as Pe,__tla as Ee}from"./JsonOutput-CknFTI_u.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{r as Re}from"./requests-BsVD4CdD.js";import{t as me}from"./createLucideIcon-CnW3RofX.js";import{d as De,__tla as He}from"./layout-B1RE_FQ4.js";import{n as Ve,t as qe,__tla as Te}from"./LazyAnyLanguageCodeMirror-yzHjsVJt.js";import"./download-BhCZMKuQ.js";import"./markdown-renderer-DhMlG2dP.js";import{u as Ge}from"./toDate-CgbKQM5E.js";import{t as Ue,__tla as Ze}from"./cell-editor-CeBmoryT.js";import{t as Be}from"./play-BPIh-ZEU.js";import{t as Fe}from"./spinner-DaIKav-i.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{r as Je}from"./useTheme-DUdVAZI8.js";import"./Combination-CMPwuAmi.js";import{t as C}from"./tooltip-CEc2ajau.js";import"./dates-Dhn1r-h6.js";import"./popover-Gz-GJzym.js";import"./vega-loader.browser-CRZ52CKf.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import"./purify.es-DNVQZNFu.js";import{__tla as Ke}from"./chunk-5FQGJX7Z-CVUXBqX6.js";import"./katex-Dc8yG8NU.js";import"./html-to-image-DjukyIj4.js";import{o as Qe}from"./focus-D51fcwZX.js";import{a as We}from"./renderShortcut-DEwfrKeS.js";import"./esm-DpMp6qko.js";import{n as Xe,r as Ye,t as ne}from"./react-resizable-panels.browser.esm-Ctj_10o2.js";import"./name-cell-input-FC1vzor8.js";import{n as $e,r as et}from"./panel-context-B7WTvLhE.js";import"./Inputs-D2Xn4HON.js";import{__tla as tt}from"./loro_wasm_bg-CDxXoyfI.js";import"./ws-BApgRfsy.js";import"./dist-C9XNJlLJ.js";import"./dist-fsvXrTzp.js";import"./dist-6cIjG-FS.js";import"./dist-CldbmzwA.js";import"./dist-OM63llNV.js";import"./dist-BmvOPdv_.js";import"./dist-DDGPBuw4.js";import"./dist-C4h-1T2Q.js";import"./dist-D_XLVesh.js";import"./esm-l4kcybiY.js";import{t as rt}from"./kiosk-mode-B5u1Ptdj.js";let ce,ot=Promise.all([(()=>{try{return Ae}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return Ze}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return tt}catch{}})()]).then(async()=>{var de=me("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]),pe=me("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),he=se(),q=oe(Ne(),1),ue=15;const T=ze("marimo:scratchpadHistory:v1",[],Ce),fe=ae(!1),xe=ae(null,(e,s,i)=>{if(i=i.trim(),!i)return;let m=e(T);s(T,[i,...m.filter(c=>c!==i)].slice(0,ue))});var t=oe(Me(),1),_e={hide_code:!1,disabled:!1};const ve=()=>{var re;let e=(0,he.c)(60),s=ke(),[i]=Ie(),{theme:m}=Je(),c=(0,q.useRef)(null),G=Qe(),{createNewCell:U,updateCellCode:d}=Oe(),{sendRunScratchpad:p}=Re(),S=$e(),Z=et(),l=s.cellRuntime[n],B=l==null?void 0:l.output,O=l==null?void 0:l.status,F=l==null?void 0:l.consoleOutputs,r=((re=s.cellData.__scratch__)==null?void 0:re.code)??"",J=be(xe),[a,h]=ye(fe),u=we(T),A;e[0]!==J||e[1]!==r||e[2]!==p?(A=()=>{p({code:r}),J(r)},e[0]=J,e[1]=r,e[2]=p,e[3]=A):A=e[3];let f=V(A),I;e[4]!==r||e[5]!==U||e[6]!==G?(I=()=>{r.trim()&&U({code:r,before:!1,cellId:G??"__end__"})},e[4]=r,e[5]=U,e[6]=G,e[7]=I):I=e[7];let K=V(I),L;e[8]!==p||e[9]!==d?(L=()=>{d({cellId:n,code:"",formattingChange:!1}),p({code:""});let o=c.current;o&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:""}})},e[8]=p,e[9]=d,e[10]=L):L=e[10];let Q=V(L),M;e[11]!==h||e[12]!==d?(M=o=>{h(!1),d({cellId:n,code:o,formattingChange:!1});let k=c.current;k&&k.dispatch({changes:{from:0,to:k.state.doc.length,insert:o}})},e[11]=h,e[12]=d,e[13]=M):M=e[13];let W=V(M),[X,ge]=(0,q.useState)(),P;e[14]!==W||e[15]!==u||e[16]!==a||e[17]!==m?(P=()=>a?(0,t.jsx)("div",{className:"absolute inset-0 z-100 bg-background p-3 border-none overflow-auto",children:(0,t.jsx)("div",{className:"overflow-auto flex flex-col gap-3",children:u.map((o,k)=>(0,t.jsx)("div",{className:"border rounded-md hover:shadow-sm cursor-pointer hover:border-input overflow-hidden",onClick:()=>W(o),children:(0,t.jsx)(q.Suspense,{children:(0,t.jsx)(qe,{language:"python",theme:m,basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1},value:o.trim(),editable:!1,readOnly:!0})})},k))})}):null,e[14]=W,e[15]=u,e[16]=a,e[17]=m,e[18]=P):P=e[18];let Y=P,E;e[19]!==Q||e[20]!==K||e[21]!==f||e[22]!==u.length||e[23]!==a||e[24]!==h||e[25]!==O?(E=()=>(0,t.jsxs)("div",{className:"flex items-center shrink-0 border-b",children:[(0,t.jsx)(C,{content:We("cell.run"),children:(0,t.jsx)(z,{"data-testid":"scratchpad-run-button",onClick:f,disabled:a,variant:"text",size:"xs",children:(0,t.jsx)(Be,{color:"var(--grass-11)",size:16})})}),(0,t.jsx)(C,{content:"Clear code and outputs",children:(0,t.jsx)(z,{disabled:a,size:"xs",variant:"text",onClick:Q,children:(0,t.jsx)(de,{size:16})})}),(0,t.jsx)(rt,{children:(0,t.jsx)(C,{content:"Insert code",children:(0,t.jsx)(z,{disabled:a,size:"xs",variant:"text",onClick:K,children:(0,t.jsx)(Ve,{size:16})})})}),(O==="running"||O==="queued")&&(0,t.jsx)(Fe,{className:"inline",size:"small"}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)(C,{content:"Toggle history",children:(0,t.jsx)(z,{size:"xs",variant:"text",className:le(a&&"bg-(--sky-3) rounded-none"),onClick:()=>h(!a),disabled:u.length===0,children:(0,t.jsx)(pe,{size:16})})}),(0,t.jsx)(C,{content:(0,t.jsx)("span",{className:"block max-w-prose",children:"Use this scratchpad to experiment with code without restrictions on variable names. Variables defined here aren't saved to notebook memory, and the code is not saved in the notebook file."}),children:(0,t.jsx)(z,{size:"xs",variant:"text",children:(0,t.jsx)(Ge,{size:16})})})]}),e[19]=Q,e[20]=K,e[21]=f,e[22]=u.length,e[23]=a,e[24]=h,e[25]=O,e[26]=E):E=e[26];let $=E,je=S==="vertical",R;e[27]===Symbol.for("react.memo_cache_sentinel")?(R=Se.create(n),e[27]=R):R=e[27];let x;e[28]===$?x=e[29]:(x=$(),e[28]=$,e[29]=x);let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=o=>{c.current=o},e[30]=D):D=e[30];let _;e[31]!==r||e[32]!==f||e[33]!==X||e[34]!==m||e[35]!==i?(_=(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)(Ue,{theme:m,showPlaceholder:!1,id:n,code:r,config:_e,status:"idle",serializedEditorState:null,runCell:f,userConfig:i,editorViewRef:c,setEditorView:D,hidden:!1,showHiddenCode:ie.NOOP,languageAdapter:X,setLanguageAdapter:ge})}),e[31]=r,e[32]=f,e[33]=X,e[34]=m,e[35]=i,e[36]=_):_=e[36];let v;e[37]===Y?v=e[38]:(v=Y(),e[37]=Y,e[38]=v);let g;e[39]!==v||e[40]!==x||e[41]!==_?(g=(0,t.jsx)(ne,{defaultSize:40,minSize:20,maxSize:70,children:(0,t.jsxs)("div",{className:"h-full flex flex-col overflow-hidden relative",children:[x,_,v]})}),e[39]=v,e[40]=x,e[41]=_,e[42]=g):g=e[42];let ee=je?"h-1":"w-1",j;e[43]===ee?j=e[44]:(j=le("bg-border hover:bg-primary/50 transition-colors",ee),e[43]=ee,e[44]=j);let b;e[45]===j?b=e[46]:(b=(0,t.jsx)(Ye,{className:j}),e[45]=j,e[46]=b);let y;e[47]===B?y=e[48]:(y=(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)(Pe,{allowExpand:!1,output:B,className:Le.outputArea,cellId:n,stale:!1,loading:!1})}),e[47]=B,e[48]=y);let w;e[49]===F?w=e[50]:(w=(0,t.jsx)("div",{className:"overflow-auto shrink-0 max-h-[50%]",children:(0,t.jsx)(De,{consoleOutputs:F,className:"overflow-auto",stale:!1,cellName:"_",onSubmitDebugger:ie.NOOP,cellId:n,debuggerActive:!1})}),e[49]=F,e[50]=w);let N;e[51]!==y||e[52]!==w?(N=(0,t.jsx)(ne,{defaultSize:60,minSize:20,children:(0,t.jsxs)("div",{className:"h-full flex flex-col divide-y overflow-hidden",children:[y,w]})}),e[51]=y,e[52]=w,e[53]=N):N=e[53];let H;return e[54]!==S||e[55]!==Z||e[56]!==g||e[57]!==b||e[58]!==N?(H=(0,t.jsx)("div",{className:"flex flex-col h-full overflow-hidden",id:R,children:(0,t.jsxs)(Xe,{direction:S,className:"h-full",children:[g,b,N]},Z)}),e[54]=S,e[55]=Z,e[56]=g,e[57]=b,e[58]=N,e[59]=H):H=e[59],H};let te;te=se(),ce=()=>{let e=(0,te.c)(1),s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(ve,{}),e[0]=s):s=e[0],s}});export{ot as __tla,ce as default};
import{s as g}from"./chunk-LvLJmgfZ.js";import"./useEvent-DO6uJBas.js";import{t as k}from"./react-BGmjiNul.js";import"./react-dom-C9fstfnp.js";import{t as $}from"./compiler-runtime-DeeZ7FnK.js";import{t as M}from"./jsx-runtime-ZmTK25f3.js";import{t as E}from"./cn-BKtXLv3a.js";import{t as L}from"./check-DdfN0k2d.js";import{t as A}from"./copy-CQ15EONK.js";import{n as D}from"./DeferredRequestRegistry-CO2AyNfd.js";import{t as P}from"./spinner-DaIKav-i.js";import{t as T}from"./plus-BD5o34_i.js";import{t as V}from"./badge-Ce8wRjuQ.js";import{t as q}from"./use-toast-rmUWldD_.js";import"./Combination-CMPwuAmi.js";import{n as B}from"./ImperativeModal-CUbWEBci.js";import{t as F}from"./copy-Bv2DBpIS.js";import{n as I}from"./error-banner-DUzsIXtq.js";import{n as O}from"./useAsyncData-C4XRy1BE.js";import{a as R,i as S,n as G,o as w,r as _,t as H}from"./table-C8uQmBAN.js";import{n as J,r as K,t as C}from"./react-resizable-panels.browser.esm-Ctj_10o2.js";import{t as Q}from"./empty-state-h8C2C6hZ.js";import{t as U}from"./request-registry-CB8fU98Q.js";import{n as W,t as X}from"./write-secret-modal-CpmU5gbF.js";var z=$(),Y=g(k(),1),r=g(M(),1),Z=()=>{let e=(0,z.c)(27),{openModal:t,closeModal:n}=B(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];let{data:s,isPending:x,error:f,refetch:m}=O(re,l);if(x){let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(P,{size:"medium",centered:!0}),e[1]=o):o=e[1],o}if(f){let o;return e[2]===f?o=e[3]:(o=(0,r.jsx)(I,{error:f}),e[2]=f,e[3]=o),o}let c;e[4]===s?c=e[5]:(c=s.filter(te).map(oe),e[4]=s,e[5]=c);let i=c;if(s.length===0){let o;return e[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(Q,{title:"No environment variables",description:"No environment variables are available in this notebook.",icon:(0,r.jsx)(D,{})}),e[6]=o):o=e[6],o}let a;e[7]!==n||e[8]!==t||e[9]!==i||e[10]!==m?(a=()=>t((0,r.jsx)(X,{providerNames:i,onSuccess:()=>{m(),n()},onClose:n})),e[7]=n,e[8]=t,e[9]=i,e[10]=m,e[11]=a):a=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=(0,r.jsx)(T,{className:"h-4 w-4"}),e[12]=b):b=e[12];let d;e[13]===a?d=e[14]:(d=(0,r.jsx)("div",{className:"flex justify-start h-8 border-b",children:(0,r.jsx)("button",{type:"button",className:"border-r px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",onClick:a,children:b})}),e[13]=a,e[14]=d);let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=(0,r.jsx)(R,{children:(0,r.jsxs)(w,{children:[(0,r.jsx)(S,{children:"Environment Variable"}),(0,r.jsx)(S,{children:"Source"}),(0,r.jsx)(S,{})]})}),e[15]=j):j=e[15];let p;e[16]===s?p=e[17]:(p=s.map(se),e[16]=s,e[17]=p);let h;e[18]===p?h=e[19]:(h=(0,r.jsxs)(H,{className:"overflow-auto flex-1 mb-16",children:[j,(0,r.jsx)(G,{children:p})]}),e[18]=p,e[19]=h);let u;e[20]!==d||e[21]!==h?(u=(0,r.jsx)(C,{defaultSize:50,minSize:30,maxSize:80,children:(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[d,h]})}),e[20]=d,e[21]=h,e[22]=u):u=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=(0,r.jsx)(K,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),e[23]=v):v=e[23];let y;e[24]===Symbol.for("react.memo_cache_sentinel")?(y=(0,r.jsx)(C,{defaultSize:50,children:(0,r.jsx)("div",{})}),e[24]=y):y=e[24];let N;return e[25]===u?N=e[26]:(N=(0,r.jsxs)(J,{direction:"horizontal",className:"h-full",children:[u,v,y]}),e[25]=u,e[26]=N),N},ee=e=>{let t=(0,z.c)(9),{className:n,ariaLabel:l,onCopy:s}=e,[x,f]=Y.useState(!1),m;t[0]===s?m=t[1]:(m=()=>{s(),f(!0),setTimeout(()=>f(!1),1e3)},t[0]=s,t[1]=m);let c=m,i;t[2]===x?i=t[3]:(i=x?(0,r.jsx)(L,{className:"w-3 h-3 text-green-700 rounded"}):(0,r.jsx)(A,{className:"w-3 h-3 hover:bg-muted rounded"}),t[2]=x,t[3]=i);let a;return t[4]!==l||t[5]!==n||t[6]!==c||t[7]!==i?(a=(0,r.jsx)("button",{type:"button",className:n,onClick:c,"aria-label":l,children:i}),t[4]=l,t[5]=n,t[6]=c,t[7]=i,t[8]=a):a=t[8],a};async function re(){return W((await U.request({})).secrets)}function te(e){return e.provider!=="env"}function oe(e){return e.name}function se(e){return e.keys.map(t=>(0,r.jsxs)(w,{className:"group",children:[(0,r.jsx)(_,{children:t}),(0,r.jsx)(_,{children:e.provider!=="env"&&(0,r.jsx)(V,{variant:"outline",className:"select-none",children:e.name})}),(0,r.jsx)(_,{children:(0,r.jsx)(ee,{ariaLabel:`Copy ${t}`,onCopy:async()=>{await F(`os.environ["${t}"]`),q({title:"Copied to clipboard",description:`os.environ["${t}"] has been copied to your clipboard.`})},className:E("float-right px-2 h-full text-xs text-muted-foreground hover:text-foreground","invisible group-hover:visible")})})]},`${e.name}-${t}`))}export{Z as default};
import{s as ge}from"./chunk-LvLJmgfZ.js";import{t as Ct}from"./react-BGmjiNul.js";import{t as jt}from"./react-dom-C9fstfnp.js";import{t as Ie}from"./compiler-runtime-DeeZ7FnK.js";import{r as A}from"./useEventListener-DIUKKfEy.js";import{t as Nt}from"./jsx-runtime-ZmTK25f3.js";import{r as _t}from"./button-YC1gW_kJ.js";import{n as kt,t as Z}from"./cn-BKtXLv3a.js";import{t as xe}from"./createLucideIcon-CnW3RofX.js";import{t as Pt}from"./check-DdfN0k2d.js";import{C as q,E as Rt,S as Te,_ as T,a as It,c as Tt,d as Dt,f as we,g as Et,i as Mt,m as Ot,r as Lt,s as At,t as Ht,u as Vt,w as k,y as Bt}from"./Combination-CMPwuAmi.js";import{a as Kt,c as De,i as Ft,n as Wt,o as zt,s as Ut}from"./dist-uzvC4uAK.js";import{d as qt,t as Xt,u as Yt}from"./menu-items-CJhvWPOk.js";var ye=xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ee=xe("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Me=xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),d=ge(Ct(),1);function Oe(n){let i=d.useRef({value:n,previous:n});return d.useMemo(()=>(i.current.value!==n&&(i.current.previous=i.current.value,i.current.value=n),i.current.previous),[n])}function be(n,[i,e]){return Math.min(e,Math.max(i,n))}var Le=ge(jt(),1),c=ge(Nt(),1),Gt=[" ","Enter","ArrowUp","ArrowDown"],Zt=[" ","Enter"],$="Select",[le,ie,$t]=qt($),[re,Wr]=Rt($,[$t,De]),se=De(),[Jt,X]=re($),[Qt,er]=re($),Ae=n=>{let{__scopeSelect:i,children:e,open:t,defaultOpen:r,onOpenChange:a,value:o,defaultValue:l,onValueChange:s,dir:u,name:m,autoComplete:v,disabled:x,required:b,form:S}=n,p=se(i),[w,j]=d.useState(null),[f,g]=d.useState(null),[V,D]=d.useState(!1),P=Yt(u),[B,K]=Te({prop:t,defaultProp:r??!1,onChange:a,caller:$}),[F,O]=Te({prop:o,defaultProp:l,onChange:s,caller:$}),Q=d.useRef(null),W=w?S||!!w.closest("form"):!0,[E,z]=d.useState(new Set),U=Array.from(E).map(R=>R.props.value).join(";");return(0,c.jsx)(Ut,{...p,children:(0,c.jsxs)(Jt,{required:b,scope:i,trigger:w,onTriggerChange:j,valueNode:f,onValueNodeChange:g,valueNodeHasChildren:V,onValueNodeHasChildrenChange:D,contentId:we(),value:F,onValueChange:O,open:B,onOpenChange:K,dir:P,triggerPointerDownPosRef:Q,disabled:x,children:[(0,c.jsx)(le.Provider,{scope:i,children:(0,c.jsx)(Qt,{scope:n.__scopeSelect,onNativeOptionAdd:d.useCallback(R=>{z(H=>new Set(H).add(R))},[]),onNativeOptionRemove:d.useCallback(R=>{z(H=>{let L=new Set(H);return L.delete(R),L})},[]),children:e})}),W?(0,c.jsxs)(st,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:v,value:F,onChange:R=>O(R.target.value),disabled:x,form:S,children:[F===void 0?(0,c.jsx)("option",{value:""}):null,Array.from(E)]},U):null]})})};Ae.displayName=$;var He="SelectTrigger",Ve=d.forwardRef((n,i)=>{let{__scopeSelect:e,disabled:t=!1,...r}=n,a=se(e),o=X(He,e),l=o.disabled||t,s=A(i,o.onTriggerChange),u=ie(e),m=d.useRef("touch"),[v,x,b]=ct(p=>{let w=u().filter(f=>!f.disabled),j=ut(w,p,w.find(f=>f.value===o.value));j!==void 0&&o.onValueChange(j.value)}),S=p=>{l||(o.onOpenChange(!0),b()),p&&(o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return(0,c.jsx)(Ft,{asChild:!0,...a,children:(0,c.jsx)(T.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":dt(o.value)?"":void 0,...r,ref:s,onClick:k(r.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&S(p)}),onPointerDown:k(r.onPointerDown,p=>{m.current=p.pointerType;let w=p.target;w.hasPointerCapture(p.pointerId)&&w.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:k(r.onKeyDown,p=>{let w=v.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&x(p.key),!(w&&p.key===" ")&&Gt.includes(p.key)&&(S(),p.preventDefault())})})})});Ve.displayName=He;var Be="SelectValue",Ke=d.forwardRef((n,i)=>{let{__scopeSelect:e,className:t,style:r,children:a,placeholder:o="",...l}=n,s=X(Be,e),{onValueNodeHasChildrenChange:u}=s,m=a!==void 0,v=A(i,s.onValueNodeChange);return q(()=>{u(m)},[u,m]),(0,c.jsx)(T.span,{...l,ref:v,style:{pointerEvents:"none"},children:dt(s.value)?(0,c.jsx)(c.Fragment,{children:o}):a})});Ke.displayName=Be;var tr="SelectIcon",Fe=d.forwardRef((n,i)=>{let{__scopeSelect:e,children:t,...r}=n;return(0,c.jsx)(T.span,{"aria-hidden":!0,...r,ref:i,children:t||"\u25BC"})});Fe.displayName=tr;var rr="SelectPortal",We=n=>(0,c.jsx)(Dt,{asChild:!0,...n});We.displayName=rr;var J="SelectContent",ze=d.forwardRef((n,i)=>{let e=X(J,n.__scopeSelect),[t,r]=d.useState();if(q(()=>{r(new DocumentFragment)},[]),!e.open){let a=t;return a?Le.createPortal((0,c.jsx)(Ue,{scope:n.__scopeSelect,children:(0,c.jsx)(le.Slot,{scope:n.__scopeSelect,children:(0,c.jsx)("div",{children:n.children})})}),a):null}return(0,c.jsx)(qe,{...n,ref:i})});ze.displayName=J;var M=10,[Ue,Y]=re(J),or="SelectContentImpl",nr=Bt("SelectContent.RemoveScroll"),qe=d.forwardRef((n,i)=>{let{__scopeSelect:e,position:t="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:s,align:u,alignOffset:m,arrowPadding:v,collisionBoundary:x,collisionPadding:b,sticky:S,hideWhenDetached:p,avoidCollisions:w,...j}=n,f=X(J,e),[g,V]=d.useState(null),[D,P]=d.useState(null),B=A(i,h=>V(h)),[K,F]=d.useState(null),[O,Q]=d.useState(null),W=ie(e),[E,z]=d.useState(!1),U=d.useRef(!1);d.useEffect(()=>{if(g)return Lt(g)},[g]),It();let R=d.useCallback(h=>{let[_,...C]=W().map(N=>N.ref.current),[y]=C.slice(-1),I=document.activeElement;for(let N of h)if(N===I||(N==null||N.scrollIntoView({block:"nearest"}),N===_&&D&&(D.scrollTop=0),N===y&&D&&(D.scrollTop=D.scrollHeight),N==null||N.focus(),document.activeElement!==I))return},[W,D]),H=d.useCallback(()=>R([K,g]),[R,K,g]);d.useEffect(()=>{E&&H()},[E,H]);let{onOpenChange:L,triggerPointerDownPosRef:G}=f;d.useEffect(()=>{if(g){let h={x:0,y:0},_=y=>{var I,N;h={x:Math.abs(Math.round(y.pageX)-(((I=G.current)==null?void 0:I.x)??0)),y:Math.abs(Math.round(y.pageY)-(((N=G.current)==null?void 0:N.y)??0))}},C=y=>{h.x<=10&&h.y<=10?y.preventDefault():g.contains(y.target)||L(!1),document.removeEventListener("pointermove",_),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",C,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",C,{capture:!0})}}},[g,L,G]),d.useEffect(()=>{let h=()=>L(!1);return window.addEventListener("blur",h),window.addEventListener("resize",h),()=>{window.removeEventListener("blur",h),window.removeEventListener("resize",h)}},[L]);let[ae,ce]=ct(h=>{let _=W().filter(y=>!y.disabled),C=ut(_,h,_.find(y=>y.ref.current===document.activeElement));C&&setTimeout(()=>C.ref.current.focus())}),ue=d.useCallback((h,_,C)=>{let y=!U.current&&!C;(f.value!==void 0&&f.value===_||y)&&(F(h),y&&(U.current=!0))},[f.value]),ee=d.useCallback(()=>g==null?void 0:g.focus(),[g]),pe=d.useCallback((h,_,C)=>{let y=!U.current&&!C;(f.value!==void 0&&f.value===_||y)&&Q(h)},[f.value]),te=t==="popper"?Se:Xe,fe=te===Se?{side:l,sideOffset:s,align:u,alignOffset:m,arrowPadding:v,collisionBoundary:x,collisionPadding:b,sticky:S,hideWhenDetached:p,avoidCollisions:w}:{};return(0,c.jsx)(Ue,{scope:e,content:g,viewport:D,onViewportChange:P,itemRefCallback:ue,selectedItem:K,onItemLeave:ee,itemTextRefCallback:pe,focusSelectedItem:H,selectedItemText:O,position:t,isPositioned:E,searchRef:ae,children:(0,c.jsx)(Ht,{as:nr,allowPinchZoom:!0,children:(0,c.jsx)(Mt,{asChild:!0,trapped:f.open,onMountAutoFocus:h=>{h.preventDefault()},onUnmountAutoFocus:k(r,h=>{var _;(_=f.trigger)==null||_.focus({preventScroll:!0}),h.preventDefault()}),children:(0,c.jsx)(Ot,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:(0,c.jsx)(te,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:h=>h.preventDefault(),...j,...fe,onPlaced:()=>z(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:k(j.onKeyDown,h=>{let _=h.ctrlKey||h.altKey||h.metaKey;if(h.key==="Tab"&&h.preventDefault(),!_&&h.key.length===1&&ce(h.key),["ArrowUp","ArrowDown","Home","End"].includes(h.key)){let C=W().filter(y=>!y.disabled).map(y=>y.ref.current);if(["ArrowUp","End"].includes(h.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){let y=h.target,I=C.indexOf(y);C=C.slice(I+1)}setTimeout(()=>R(C)),h.preventDefault()}})})})})})})});qe.displayName=or;var ar="SelectItemAlignedPosition",Xe=d.forwardRef((n,i)=>{let{__scopeSelect:e,onPlaced:t,...r}=n,a=X(J,e),o=Y(J,e),[l,s]=d.useState(null),[u,m]=d.useState(null),v=A(i,P=>m(P)),x=ie(e),b=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:w,selectedItemText:j,focusSelectedItem:f}=o,g=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&w&&j){let P=a.trigger.getBoundingClientRect(),B=u.getBoundingClientRect(),K=a.valueNode.getBoundingClientRect(),F=j.getBoundingClientRect();if(a.dir!=="rtl"){let C=F.left-B.left,y=K.left-C,I=P.left-y,N=P.width+I,me=Math.max(N,B.width),he=window.innerWidth-M,ve=be(y,[M,Math.max(M,he-me)]);l.style.minWidth=N+"px",l.style.left=ve+"px"}else{let C=B.right-F.right,y=window.innerWidth-K.right-C,I=window.innerWidth-P.right-y,N=P.width+I,me=Math.max(N,B.width),he=window.innerWidth-M,ve=be(y,[M,Math.max(M,he-me)]);l.style.minWidth=N+"px",l.style.right=ve+"px"}let O=x(),Q=window.innerHeight-M*2,W=p.scrollHeight,E=window.getComputedStyle(u),z=parseInt(E.borderTopWidth,10),U=parseInt(E.paddingTop,10),R=parseInt(E.borderBottomWidth,10),H=parseInt(E.paddingBottom,10),L=z+U+W+H+R,G=Math.min(w.offsetHeight*5,L),ae=window.getComputedStyle(p),ce=parseInt(ae.paddingTop,10),ue=parseInt(ae.paddingBottom,10),ee=P.top+P.height/2-M,pe=Q-ee,te=w.offsetHeight/2,fe=w.offsetTop+te,h=z+U+fe,_=L-h;if(h<=ee){let C=O.length>0&&w===O[O.length-1].ref.current;l.style.bottom="0px";let y=u.clientHeight-p.offsetTop-p.offsetHeight,I=h+Math.max(pe,te+(C?ue:0)+y+R);l.style.height=I+"px"}else{let C=O.length>0&&w===O[0].ref.current;l.style.top="0px";let y=Math.max(ee,z+p.offsetTop+(C?ce:0)+te)+_;l.style.height=y+"px",p.scrollTop=h-ee+p.offsetTop}l.style.margin=`${M}px 0`,l.style.minHeight=G+"px",l.style.maxHeight=Q+"px",t==null||t(),requestAnimationFrame(()=>b.current=!0)}},[x,a.trigger,a.valueNode,l,u,p,w,j,a.dir,t]);q(()=>g(),[g]);let[V,D]=d.useState();return q(()=>{u&&D(window.getComputedStyle(u).zIndex)},[u]),(0,c.jsx)(ir,{scope:e,contentWrapper:l,shouldExpandOnScrollRef:b,onScrollButtonChange:d.useCallback(P=>{P&&S.current===!0&&(g(),f==null||f(),S.current=!1)},[g,f]),children:(0,c.jsx)("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:V},children:(0,c.jsx)(T.div,{...r,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Xe.displayName=ar;var lr="SelectPopperPosition",Se=d.forwardRef((n,i)=>{let{__scopeSelect:e,align:t="start",collisionPadding:r=M,...a}=n,o=se(e);return(0,c.jsx)(zt,{...o,...a,ref:i,align:t,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=lr;var[ir,Ce]=re(J,{}),je="SelectViewport",Ye=d.forwardRef((n,i)=>{let{__scopeSelect:e,nonce:t,...r}=n,a=Y(je,e),o=Ce(je,e),l=A(i,a.onViewportChange),s=d.useRef(0);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),(0,c.jsx)(le.Slot,{scope:e,children:(0,c.jsx)(T.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:k(r.onScroll,u=>{let m=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:x}=o;if(x!=null&&x.current&&v){let b=Math.abs(s.current-m.scrollTop);if(b>0){let S=window.innerHeight-M*2,p=parseFloat(v.style.minHeight),w=parseFloat(v.style.height),j=Math.max(p,w);if(j<S){let f=j+b,g=Math.min(S,f),V=f-g;v.style.height=g+"px",v.style.bottom==="0px"&&(m.scrollTop=V>0?V:0,v.style.justifyContent="flex-end")}}}s.current=m.scrollTop})})})]})});Ye.displayName=je;var Ge="SelectGroup",[sr,dr]=re(Ge),Ze=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n,r=we();return(0,c.jsx)(sr,{scope:e,id:r,children:(0,c.jsx)(T.div,{role:"group","aria-labelledby":r,...t,ref:i})})});Ze.displayName=Ge;var $e="SelectLabel",Je=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n,r=dr($e,e);return(0,c.jsx)(T.div,{id:r.id,...t,ref:i})});Je.displayName=$e;var de="SelectItem",[cr,Qe]=re(de),et=d.forwardRef((n,i)=>{let{__scopeSelect:e,value:t,disabled:r=!1,textValue:a,...o}=n,l=X(de,e),s=Y(de,e),u=l.value===t,[m,v]=d.useState(a??""),[x,b]=d.useState(!1),S=A(i,f=>{var g;return(g=s.itemRefCallback)==null?void 0:g.call(s,f,t,r)}),p=we(),w=d.useRef("touch"),j=()=>{r||(l.onValueChange(t),l.onOpenChange(!1))};if(t==="")throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,c.jsx)(cr,{scope:e,value:t,disabled:r,textId:p,isSelected:u,onItemTextChange:d.useCallback(f=>{v(g=>g||((f==null?void 0:f.textContent)??"").trim())},[]),children:(0,c.jsx)(le.ItemSlot,{scope:e,value:t,disabled:r,textValue:m,children:(0,c.jsx)(T.div,{role:"option","aria-labelledby":p,"data-highlighted":x?"":void 0,"aria-selected":u&&x,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...o,ref:S,onFocus:k(o.onFocus,()=>b(!0)),onBlur:k(o.onBlur,()=>b(!1)),onClick:k(o.onClick,()=>{w.current!=="mouse"&&j()}),onPointerUp:k(o.onPointerUp,()=>{w.current==="mouse"&&j()}),onPointerDown:k(o.onPointerDown,f=>{w.current=f.pointerType}),onPointerMove:k(o.onPointerMove,f=>{var g;w.current=f.pointerType,r?(g=s.onItemLeave)==null||g.call(s):w.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:k(o.onPointerLeave,f=>{var g;f.currentTarget===document.activeElement&&((g=s.onItemLeave)==null||g.call(s))}),onKeyDown:k(o.onKeyDown,f=>{var g;((g=s.searchRef)==null?void 0:g.current)!==""&&f.key===" "||(Zt.includes(f.key)&&j(),f.key===" "&&f.preventDefault())})})})})});et.displayName=de;var oe="SelectItemText",tt=d.forwardRef((n,i)=>{let{__scopeSelect:e,className:t,style:r,...a}=n,o=X(oe,e),l=Y(oe,e),s=Qe(oe,e),u=er(oe,e),[m,v]=d.useState(null),x=A(i,j=>v(j),s.onItemTextChange,j=>{var f;return(f=l.itemTextRefCallback)==null?void 0:f.call(l,j,s.value,s.disabled)}),b=m==null?void 0:m.textContent,S=d.useMemo(()=>(0,c.jsx)("option",{value:s.value,disabled:s.disabled,children:b},s.value),[s.disabled,s.value,b]),{onNativeOptionAdd:p,onNativeOptionRemove:w}=u;return q(()=>(p(S),()=>w(S)),[p,w,S]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(T.span,{id:s.textId,...a,ref:x}),s.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Le.createPortal(a.children,o.valueNode):null]})});tt.displayName=oe;var rt="SelectItemIndicator",ot=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n;return Qe(rt,e).isSelected?(0,c.jsx)(T.span,{"aria-hidden":!0,...t,ref:i}):null});ot.displayName=rt;var Ne="SelectScrollUpButton",nt=d.forwardRef((n,i)=>{let e=Y(Ne,n.__scopeSelect),t=Ce(Ne,n.__scopeSelect),[r,a]=d.useState(!1),o=A(i,t.onScrollButtonChange);return q(()=>{if(e.viewport&&e.isPositioned){let l=function(){a(s.scrollTop>0)},s=e.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[e.viewport,e.isPositioned]),r?(0,c.jsx)(lt,{...n,ref:o,onAutoScroll:()=>{let{viewport:l,selectedItem:s}=e;l&&s&&(l.scrollTop-=s.offsetHeight)}}):null});nt.displayName=Ne;var _e="SelectScrollDownButton",at=d.forwardRef((n,i)=>{let e=Y(_e,n.__scopeSelect),t=Ce(_e,n.__scopeSelect),[r,a]=d.useState(!1),o=A(i,t.onScrollButtonChange);return q(()=>{if(e.viewport&&e.isPositioned){let l=function(){let u=s.scrollHeight-s.clientHeight;a(Math.ceil(s.scrollTop)<u)},s=e.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[e.viewport,e.isPositioned]),r?(0,c.jsx)(lt,{...n,ref:o,onAutoScroll:()=>{let{viewport:l,selectedItem:s}=e;l&&s&&(l.scrollTop+=s.offsetHeight)}}):null});at.displayName=_e;var lt=d.forwardRef((n,i)=>{let{__scopeSelect:e,onAutoScroll:t,...r}=n,a=Y("SelectScrollButton",e),o=d.useRef(null),l=ie(e),s=d.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return d.useEffect(()=>()=>s(),[s]),q(()=>{var u,m;(m=(u=l().find(v=>v.ref.current===document.activeElement))==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[l]),(0,c.jsx)(T.div,{"aria-hidden":!0,...r,ref:i,style:{flexShrink:0,...r.style},onPointerDown:k(r.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(t,50))}),onPointerMove:k(r.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),o.current===null&&(o.current=window.setInterval(t,50))}),onPointerLeave:k(r.onPointerLeave,()=>{s()})})}),ur="SelectSeparator",it=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n;return(0,c.jsx)(T.div,{"aria-hidden":!0,...t,ref:i})});it.displayName=ur;var ke="SelectArrow",pr=d.forwardRef((n,i)=>{let{__scopeSelect:e,...t}=n,r=se(e),a=X(ke,e),o=Y(ke,e);return a.open&&o.position==="popper"?(0,c.jsx)(Kt,{...r,...t,ref:i}):null});pr.displayName=ke;var fr="SelectBubbleInput",st=d.forwardRef(({__scopeSelect:n,value:i,...e},t)=>{let r=d.useRef(null),a=A(t,r),o=Oe(i);return d.useEffect(()=>{let l=r.current;if(!l)return;let s=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(s,"value").set;if(o!==i&&u){let m=new Event("change",{bubbles:!0});u.call(l,i),l.dispatchEvent(m)}},[o,i]),(0,c.jsx)(T.select,{...e,style:{...Wt,...e.style},ref:a,defaultValue:i})});st.displayName=fr;function dt(n){return n===""||n===void 0}function ct(n){let i=Et(n),e=d.useRef(""),t=d.useRef(0),r=d.useCallback(o=>{let l=e.current+o;i(l),(function s(u){e.current=u,window.clearTimeout(t.current),u!==""&&(t.current=window.setTimeout(()=>s(""),1e3))})(l)},[i]),a=d.useCallback(()=>{e.current="",window.clearTimeout(t.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(t.current),[]),[e,r,a]}function ut(n,i,e){let t=i.length>1&&Array.from(i).every(l=>l===i[0])?i[0]:i,r=e?n.indexOf(e):-1,a=mr(n,Math.max(r,0));t.length===1&&(a=a.filter(l=>l!==e));let o=a.find(l=>l.textValue.toLowerCase().startsWith(t.toLowerCase()));return o===e?void 0:o}function mr(n,i){return n.map((e,t)=>n[(i+t)%n.length])}var hr=Ae,Pe=Ve,vr=Ke,pt=Fe,gr=We,ft=ze,xr=Ye,wr=Ze,mt=Je,ht=et,yr=tt,br=ot,Sr=nt,Cr=at,vt=it,jr=Ie();const Re=kt("flex h-6 w-fit mb-1 items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"shadow-xs-solid border border-input hover:shadow-sm-solid focus:border-primary focus:shadow-md-solid disabled:hover:shadow-xs-solid",ghost:"opacity-70 hover:opacity-100 focus:opacity-100"}},defaultVariants:{variant:"default"}});var gt=d.forwardRef((n,i)=>{let e=(0,jr.c)(12),t,r,a;e[0]===n?(t=e[1],r=e[2],a=e[3]):({className:r,children:t,...a}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=a);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=_t.stopPropagation(),e[4]=o):o=e[4];let l;e[5]===r?l=e[6]:(l=Z(Re({}),r),e[5]=r,e[6]=l);let s;return e[7]!==t||e[8]!==a||e[9]!==i||e[10]!==l?(s=(0,c.jsx)("select",{ref:i,onClick:o,className:l,...a,children:t}),e[7]=t,e[8]=a,e[9]=i,e[10]=l,e[11]=s):s=e[11],s});gt.displayName="NativeSelect";var ne=Ie(),Nr=hr,_r=wr,kr=At(gr),Pr=vr,xt=d.forwardRef((n,i)=>{let e=(0,ne.c)(21),t,r,a,o,l,s;e[0]===n?(t=e[1],r=e[2],a=e[3],o=e[4],l=e[5],s=e[6]):({className:r,children:t,onClear:a,variant:s,hideChevron:l,...o}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=a,e[4]=o,e[5]=l,e[6]=s);let u=l===void 0?!1:l,m;e[7]!==r||e[8]!==s?(m=Z(Re({variant:s}),"mb-0",r),e[7]=r,e[8]=s,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==a?(v=a?(0,c.jsx)("span",{onPointerDown:S=>{S.preventDefault(),S.stopPropagation(),a()},children:(0,c.jsx)(Me,{className:"h-4 w-4 opacity-50 hover:opacity-90"})}):!u&&(0,c.jsx)(ye,{className:"h-4 w-4 opacity-50"}),e[10]=u,e[11]=a,e[12]=v):v=e[12];let x;e[13]===v?x=e[14]:(x=(0,c.jsx)(pt,{asChild:!0,children:v}),e[13]=v,e[14]=x);let b;return e[15]!==t||e[16]!==o||e[17]!==i||e[18]!==m||e[19]!==x?(b=(0,c.jsxs)(Pe,{ref:i,className:m,...o,children:[t,x]}),e[15]=t,e[16]=o,e[17]=i,e[18]=m,e[19]=x,e[20]=b):b=e[20],b});xt.displayName=Pe.displayName;var Rr=Tt(ft),wt=d.forwardRef((n,i)=>{let e=(0,ne.c)(21),t,r,a,o;e[0]===n?(t=e[1],r=e[2],a=e[3],o=e[4]):({className:r,children:t,position:o,...a}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=a,e[4]=o);let l=o===void 0?"popper":o,s=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",u;e[5]!==r||e[6]!==s?(u=Z("max-h-[300px] relative z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s,r),e[5]=r,e[6]=s,e[7]=u):u=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=(0,c.jsx)(Sr,{className:"flex items-center justify-center h-[20px] bg-background text-muted-foreground cursor-default",children:(0,c.jsx)(Ee,{className:"h-4 w-4"})}),e[8]=m):m=e[8];let v=l==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)",x;e[9]===v?x=e[10]:(x=Z("p-1",v),e[9]=v,e[10]=x);let b;e[11]!==t||e[12]!==x?(b=(0,c.jsx)(xr,{className:x,children:t}),e[11]=t,e[12]=x,e[13]=b):b=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=(0,c.jsx)(Cr,{className:"flex items-center justify-center h-[20px] bg-background text-muted-foreground cursor-default",children:(0,c.jsx)(ye,{className:"h-4 w-4 opacity-50"})}),e[14]=S):S=e[14];let p;return e[15]!==l||e[16]!==a||e[17]!==i||e[18]!==u||e[19]!==b?(p=(0,c.jsx)(kr,{children:(0,c.jsx)(Vt,{children:(0,c.jsxs)(Rr,{ref:i,className:u,position:l,...a,children:[m,b,S]})})}),e[15]=l,e[16]=a,e[17]=i,e[18]=u,e[19]=b,e[20]=p):p=e[20],p});wt.displayName=ft.displayName;var yt=d.forwardRef((n,i)=>{let e=(0,ne.c)(9),t,r;e[0]===n?(t=e[1],r=e[2]):({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r);let a;e[3]===t?a=e[4]:(a=Z("px-2 py-1.5 text-sm font-semibold",t),e[3]=t,e[4]=a);let o;return e[5]!==r||e[6]!==i||e[7]!==a?(o=(0,c.jsx)(mt,{ref:i,className:a,...r}),e[5]=r,e[6]=i,e[7]=a,e[8]=o):o=e[8],o});yt.displayName=mt.displayName;var bt=d.forwardRef((n,i)=>{let e=(0,ne.c)(17),t,r,a,o;e[0]===n?(t=e[1],r=e[2],a=e[3],o=e[4]):({className:r,children:t,subtitle:o,...a}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=a,e[4]=o);let l;e[5]===r?l=e[6]:(l=Z("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground",Xt,r),e[5]=r,e[6]=l);let s;e[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,c.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,c.jsx)(br,{children:(0,c.jsx)(Pt,{className:"h-3 w-3"})})}),e[7]=s):s=e[7];let u=typeof t=="string"?void 0:!0,m;e[8]!==t||e[9]!==u?(m=(0,c.jsx)(yr,{asChild:u,className:"flex w-full flex-1",children:t}),e[8]=t,e[9]=u,e[10]=m):m=e[10];let v;return e[11]!==a||e[12]!==i||e[13]!==o||e[14]!==l||e[15]!==m?(v=(0,c.jsxs)(ht,{ref:i,className:l,...a,children:[s,m,o]}),e[11]=a,e[12]=i,e[13]=o,e[14]=l,e[15]=m,e[16]=v):v=e[16],v});bt.displayName=ht.displayName;var St=d.forwardRef((n,i)=>{let e=(0,ne.c)(9),t,r;e[0]===n?(t=e[1],r=e[2]):({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r);let a;e[3]===t?a=e[4]:(a=Z("-mx-1 my-1 h-px bg-muted",t),e[3]=t,e[4]=a);let o;return e[5]!==r||e[6]!==i||e[7]!==a?(o=(0,c.jsx)(vt,{ref:i,className:a,...r}),e[5]=r,e[6]=i,e[7]=a,e[8]=o):o=e[8],o});St.displayName=vt.displayName;export{ye as _,yt as a,Pr as c,pt as d,Pe as f,Ee as g,Me as h,bt as i,gt as l,Oe as m,wt as n,St as o,be as p,_r as r,xt as s,Nr as t,Re as u};

Sorry, the diff of this file is too big to display

import{s as oe}from"./chunk-LvLJmgfZ.js";import{d as ce,i as Me,l as Ee,p as me,u as H}from"./useEvent-DO6uJBas.js";import{t as Pe}from"./react-BGmjiNul.js";import{$t as ie,Dt as Oe,Et as Ue,Fn as ze,Gn as le,Mn as Re,Nn as Ge,Vn as Ae,Wn as We,Zr as Ke,_n as He,a as Je,ar as de,bn as he,bt as Xe,cr as Ze,f as ue,fr as xe,ft as Qe,gr as pe,hr as Ye,j as ea,k as aa,lr as ta,nr as sa,or as fe,pr as be,sr as ge,vn as la,w as na}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as ne}from"./compiler-runtime-DeeZ7FnK.js";import{n as ra}from"./assertNever-CBU83Y6o.js";import{t as je}from"./add-database-form-3g4nuZN1.js";import"./tooltip-BGrCWNss.js";import{t as J}from"./sortBy-CGfmqUg5.js";import{o as oa}from"./utils-DXvhzCGS.js";import"./config-CIrPQIbt.js";import{t as ca}from"./ErrorBoundary-ChCiwl15.js";import{t as ma}from"./jsx-runtime-ZmTK25f3.js";import{r as ia,t as X}from"./button-YC1gW_kJ.js";import{t as q}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import{B as da,I as Ne,L as ha,R as ua,k as re,z as xa}from"./JsonOutput-CknFTI_u.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{r as pa}from"./requests-BsVD4CdD.js";import{t as fa}from"./createLucideIcon-CnW3RofX.js";import{h as ba}from"./select-V5IdpNiR.js";import"./download-BhCZMKuQ.js";import"./markdown-renderer-DhMlG2dP.js";import{t as ye}from"./plus-BD5o34_i.js";import{t as ga}from"./refresh-cw-CQd-1kjx.js";import{a as ja}from"./input-pAun1m1X.js";import{c as ve,d as we,f as Se,l as ae,n as Na,o as ya,p as va,u as _e}from"./column-preview-CxMrs0B_.js";import{t as wa}from"./workflow-CMjI9cxl.js";import{t as Sa}from"./badge-Ce8wRjuQ.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import"./Combination-CMPwuAmi.js";import{t as te}from"./tooltip-CEc2ajau.js";import"./dates-Dhn1r-h6.js";import{t as _a}from"./context-JwD-oSsl.js";import"./popover-Gz-GJzym.js";import"./vega-loader.browser-CRZ52CKf.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import{t as Ca}from"./copy-icon-BhONVREY.js";import"./purify.es-DNVQZNFu.js";import{a as Ce,i as ke,n as ka,r as $e}from"./multi-map-C8GlnP-4.js";import{t as Fe}from"./cell-link-Bw5bzt4a.js";import{n as Te}from"./useAsyncData-C4XRy1BE.js";import{a as $a,o as se,t as Fa,u as Ta}from"./command-DhzFN2CJ.js";import"./chunk-5FQGJX7Z-CVUXBqX6.js";import"./katex-Dc8yG8NU.js";import{r as Ia}from"./html-to-image-DjukyIj4.js";import{o as La}from"./focus-D51fcwZX.js";import{a as qa,i as Ba,n as Da,o as Ie,r as Va,t as Ma}from"./table-C8uQmBAN.js";import{n as Ea}from"./icons-BhEXrzsb.js";import{t as Le}from"./useAddCell-BmeZUK02.js";import{t as Pa}from"./empty-state-h8C2C6hZ.js";import{n as Oa,t as Ua}from"./common-dAEMv5ry.js";var za=fa("square-equal",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}]]),_=oe(Pe(),1),Ra=ne(),t=oe(ma(),1);const Ga=a=>{let e=(0,Ra.c)(8),{variableName:s,className:l}=a,r;e[0]===s?r=e[1]:(r=()=>{let g=Aa(s);if(!g)return;let N=ue(g);N&&ie(N,s)},e[0]=s,e[1]=r);let o=r,n;e[2]===l?n=e[3]:(n=q("text-link opacity-80 hover:opacity-100 hover:underline",l),e[2]=l,e[3]=n);let b;return e[4]!==o||e[5]!==n||e[6]!==s?(b=(0,t.jsx)("button",{type:"button",onClick:o,className:n,children:s}),e[4]=o,e[5]=n,e[6]=s,e[7]=b):b=e[7],b};function Aa(a){let e=Me.get(he)[a];if(e)return e.declaredBy[0]}var R=ne(),C={engineEmpty:"pl-3",engine:"pl-3 pr-2",database:"pl-4",schemaEmpty:"pl-8",schema:"pl-7",tableLoading:"pl-11",tableSchemaless:"pl-8",tableWithSchema:"pl-12",columnLocal:"pl-5",columnSql:"pl-13",columnPreview:"pl-10"},Wa=me(a=>{let e=a(ge),s=a(he),l=a(Je);return J(e,r=>{if(!r.variable_name)return-1;let o=Object.values(s).find(b=>b.name===r.variable_name);if(!o)return 0;let n=l.inOrderIds.indexOf(o.declaredBy[0]);return n===-1?0:n})});const qe=me(a=>{let e=new Map(a(sa));for(let s of pe){let l=e.get(s);l&&(l.databases.length===0&&e.delete(s),l.databases.length===1&&l.databases[0].name==="memory"&&l.databases[0].schemas.length===0&&e.delete(s))}return J([...e.values()],s=>pe.has(s.name)?1:0)}),Ka=()=>{let a=(0,R.c)(32),[e,s]=_.useState(""),l=ce(fe),r=H(Wa),o=H(qe);if(r.length===0&&o.length===0){let p;return a[0]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(Pa,{title:"No tables found",description:"Any datasets/dataframes in the global scope will be shown here.",action:(0,t.jsx)(je,{children:(0,t.jsxs)(X,{variant:"outline",size:"sm",children:["Add database or catalog",(0,t.jsx)(ye,{className:"h-4 w-4 ml-2"})]})}),icon:(0,t.jsx)(le,{})}),a[0]=p):p=a[0],p}let n=!!e.trim(),b;a[1]===l?b=a[2]:(b=p=>{l(p.length>0),s(p)},a[1]=l,a[2]=b);let g;a[3]!==e||a[4]!==b?(g=(0,t.jsx)($a,{placeholder:"Search tables...",className:"h-6 m-1",value:e,onValueChange:b,rootClassName:"flex-1 border-r border-b-0"}),a[3]=e,a[4]=b,a[5]=g):g=a[5];let N;a[6]===n?N=a[7]:(N=n&&(0,t.jsx)("button",{type:"button",className:"float-right border-b px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",onClick:()=>s(""),children:(0,t.jsx)(ba,{className:"h-4 w-4"})}),a[6]=n,a[7]=N);let j;a[8]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsx)(je,{children:(0,t.jsx)(X,{variant:"ghost",size:"sm",className:"px-2 rounded-none focus-visible:outline-hidden",children:(0,t.jsx)(ye,{className:"h-4 w-4"})})}),a[8]=j):j=a[8];let i;a[9]!==g||a[10]!==N?(i=(0,t.jsxs)("div",{className:"flex items-center w-full border-b",children:[g,N,j]}),a[9]=g,a[10]=N,a[11]=i):i=a[11];let c;if(a[12]!==o||a[13]!==n||a[14]!==e){let p;a[16]!==n||a[17]!==e?(p=u=>(0,t.jsx)(Ha,{connection:u,hasChildren:u.databases.length>0,children:u.databases.map(f=>(0,t.jsx)(Ja,{engineName:u.name,database:f,hasSearch:n,children:(0,t.jsx)(Xa,{schemas:f.schemas,defaultSchema:u.default_schema,defaultDatabase:u.default_database,engineName:u.name,databaseName:f.name,hasSearch:n,searchValue:e,dialect:u.dialect})},f.name))},u.name),a[16]=n,a[17]=e,a[18]=p):p=a[18],c=o.map(p),a[12]=o,a[13]=n,a[14]=e,a[15]=c}else c=a[15];let d;a[19]!==o.length||a[20]!==r.length?(d=o.length>0&&r.length>0&&(0,t.jsxs)(ve,{className:C.engine,children:[(0,t.jsx)(Ea,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs",children:"Python"})]}),a[19]=o.length,a[20]=r.length,a[21]=d):d=a[21];let x;a[22]!==e||a[23]!==r?(x=r.length>0&&(0,t.jsx)(Be,{tables:r,searchValue:e}),a[22]=e,a[23]=r,a[24]=x):x=a[24];let h;a[25]!==c||a[26]!==d||a[27]!==x?(h=(0,t.jsxs)(Ta,{className:"flex flex-col",children:[c,d,x]}),a[25]=c,a[26]=d,a[27]=x,a[28]=h):h=a[28];let m;return a[29]!==i||a[30]!==h?(m=(0,t.jsxs)(Fa,{className:"border-b bg-background rounded-none h-full pb-10 overflow-auto outline-hidden",shouldFilter:!1,children:[i,h]}),a[29]=i,a[30]=h,a[31]=m):m=a[31],m};var Ha=a=>{let e=(0,R.c)(26),{connection:s,children:l,hasChildren:r}=a,o=s.name===Ye,n=o?"In-Memory":s.name,{previewDataSourceConnection:b}=pa(),[g,N]=_.useState(!1),j;e[0]!==s.name||e[1]!==b?(j=async()=>{N(!0),await b({engine:s.name}),setTimeout(()=>N(!1),500)},e[0]=s.name,e[1]=b,e[2]=j):j=e[2];let i=j,c;e[3]===s.dialect?c=e[4]:(c=(0,t.jsx)(Qe,{className:"h-4 w-4 text-muted-foreground",name:s.dialect}),e[3]=s.dialect,e[4]=c);let d;e[5]===s.dialect?d=e[6]:(d=Re(s.dialect),e[5]=s.dialect,e[6]=d);let x;e[7]===d?x=e[8]:(x=(0,t.jsx)("span",{className:"text-xs",children:d}),e[7]=d,e[8]=x);let h=n,m;e[9]===h?m=e[10]:(m=(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",(0,t.jsx)(Ga,{variableName:h}),")"]}),e[9]=h,e[10]=m);let p;e[11]!==i||e[12]!==o||e[13]!==g?(p=!o&&(0,t.jsx)(te,{content:"Refresh connection",children:(0,t.jsx)(X,{variant:"ghost",size:"icon",className:"ml-auto hover:bg-transparent hover:shadow-none",onClick:i,children:(0,t.jsx)(ga,{className:q("h-4 w-4 text-muted-foreground hover:text-foreground",g&&"animate-[spin_0.5s]")})})}),e[11]=i,e[12]=o,e[13]=g,e[14]=p):p=e[14];let u;e[15]!==c||e[16]!==x||e[17]!==m||e[18]!==p?(u=(0,t.jsxs)(ve,{className:C.engine,children:[c,x,m,p]}),e[15]=c,e[16]=x,e[17]=m,e[18]=p,e[19]=u):u=e[19];let f;e[20]!==l||e[21]!==r?(f=r?l:(0,t.jsx)(ae,{content:"No databases available",className:C.engineEmpty}),e[20]=l,e[21]=r,e[22]=f):f=e[22];let y;return e[23]!==u||e[24]!==f?(y=(0,t.jsxs)(t.Fragment,{children:[u,f]}),e[23]=u,e[24]=f,e[25]=y):y=e[25],y},Ja=a=>{let e=(0,R.c)(26),{hasSearch:s,engineName:l,database:r,children:o}=a,[n,b]=_.useState(!1),[g,N]=_.useState(!1),[j,i]=_.useState(s);j!==s&&(i(s),b(s));let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=q("text-sm flex flex-row gap-1 items-center cursor-pointer rounded-none",C.database),e[0]=c):c=e[0];let d;e[1]!==n||e[2]!==g?(d=()=>{b(!n),N(!g)},e[1]=n,e[2]=g,e[3]=d):d=e[3];let x=`${l}:${r.name}`,h;e[4]===n?h=e[5]:(h=(0,t.jsx)(Se,{isExpanded:n}),e[4]=n,e[5]=h);let m=g&&n?"text-foreground":"text-muted-foreground",p;e[6]===m?p=e[7]:(p=q("h-4 w-4",m),e[6]=m,e[7]=p);let u;e[8]===p?u=e[9]:(u=(0,t.jsx)(le,{className:p}),e[8]=p,e[9]=u);let f=g&&n&&"font-semibold",y;e[10]===f?y=e[11]:(y=q(f),e[10]=f,e[11]=y);let v;e[12]===r.name?v=e[13]:(v=r.name===""?(0,t.jsx)("i",{children:"Not connected"}):r.name,e[12]=r.name,e[13]=v);let w;e[14]!==v||e[15]!==y?(w=(0,t.jsx)("span",{className:y,children:v}),e[14]=v,e[15]=y,e[16]=w):w=e[16];let S;e[17]!==w||e[18]!==d||e[19]!==x||e[20]!==h||e[21]!==u?(S=(0,t.jsxs)(se,{className:c,onSelect:d,value:x,children:[h,u,w]}),e[17]=w,e[18]=d,e[19]=x,e[20]=h,e[21]=u,e[22]=S):S=e[22];let L=n&&o,k;return e[23]!==S||e[24]!==L?(k=(0,t.jsxs)(t.Fragment,{children:[S,L]}),e[23]=S,e[24]=L,e[25]=k):k=e[25],k},Xa=a=>{let e=(0,R.c)(22),{schemas:s,defaultSchema:l,defaultDatabase:r,dialect:o,engineName:n,databaseName:b,hasSearch:g,searchValue:N}=a;if(s.length===0){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(ae,{content:"No schemas available",className:C.schemaEmpty}),e[0]=c):c=e[0],c}let j;if(e[1]!==b||e[2]!==r||e[3]!==l||e[4]!==o||e[5]!==n||e[6]!==g||e[7]!==s||e[8]!==N){let c;e[10]===N?c=e[11]:(c=h=>N?h.tables.some(m=>m.name.toLowerCase().includes(N.toLowerCase())):!0,e[10]=N,e[11]=c);let d=s.filter(c),x;e[12]!==b||e[13]!==r||e[14]!==l||e[15]!==o||e[16]!==n||e[17]!==g||e[18]!==N?(x=h=>(0,t.jsx)(Za,{databaseName:b,schema:h,hasSearch:g,children:(0,t.jsx)(Be,{tables:h.tables,searchValue:N,sqlTableContext:{engine:n,database:b,schema:h.name,defaultSchema:l,defaultDatabase:r,dialect:o}})},h.name),e[12]=b,e[13]=r,e[14]=l,e[15]=o,e[16]=n,e[17]=g,e[18]=N,e[19]=x):x=e[19],j=d.map(x),e[1]=b,e[2]=r,e[3]=l,e[4]=o,e[5]=n,e[6]=g,e[7]=s,e[8]=N,e[9]=j}else j=e[9];let i;return e[20]===j?i=e[21]:(i=(0,t.jsx)(t.Fragment,{children:j}),e[20]=j,e[21]=i),i},Za=a=>{let e=(0,R.c)(24),{databaseName:s,schema:l,children:r,hasSearch:o}=a,[n,b]=_.useState(o),[g,N]=_.useState(!1),j=`${s}:${l.name}`;if(xe(l.name))return r;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=q("text-sm flex flex-row gap-1 items-center cursor-pointer rounded-none",C.schema),e[0]=i):i=e[0];let c;e[1]!==n||e[2]!==g?(c=()=>{b(!n),N(!g)},e[1]=n,e[2]=g,e[3]=c):c=e[3];let d;e[4]===n?d=e[5]:(d=(0,t.jsx)(Se,{isExpanded:n}),e[4]=n,e[5]=d);let x=g&&n&&"text-foreground",h;e[6]===x?h=e[7]:(h=q("h-4 w-4 text-muted-foreground",x),e[6]=x,e[7]=h);let m;e[8]===h?m=e[9]:(m=(0,t.jsx)(Ae,{className:h}),e[8]=h,e[9]=m);let p=g&&n&&"font-semibold",u;e[10]===p?u=e[11]:(u=q(p),e[10]=p,e[11]=u);let f;e[12]!==l.name||e[13]!==u?(f=(0,t.jsx)("span",{className:u,children:l.name}),e[12]=l.name,e[13]=u,e[14]=f):f=e[14];let y;e[15]!==c||e[16]!==d||e[17]!==m||e[18]!==f||e[19]!==j?(y=(0,t.jsxs)(se,{className:i,onSelect:c,value:j,children:[d,m,f]}),e[15]=c,e[16]=d,e[17]=m,e[18]=f,e[19]=j,e[20]=y):y=e[20];let v=n&&r,w;return e[21]!==y||e[22]!==v?(w=(0,t.jsxs)(t.Fragment,{children:[y,v]}),e[21]=y,e[22]=v,e[23]=w):w=e[23],w},Be=a=>{let e=(0,R.c)(24),{tables:s,sqlTableContext:l,searchValue:r}=a,{addTableList:o}=de(),[n,b]=_.useState(!1),[g,N]=_.useState(!1),j;e[0]!==o||e[1]!==l||e[2]!==s.length||e[3]!==n?(j=async()=>{if(s.length===0&&l&&!n){b(!0),N(!0);let{engine:m,database:p,schema:u}=l,f=await Oe.request({engine:m,database:p,schema:u});if(!(f!=null&&f.tables))throw N(!1),Error("No tables available");o({tables:f.tables,sqlTableContext:l}),N(!1)}},e[0]=o,e[1]=l,e[2]=s.length,e[3]=n,e[4]=j):j=e[4];let i;e[5]!==l||e[6]!==s.length||e[7]!==n?(i=[s.length,l,n],e[5]=l,e[6]=s.length,e[7]=n,e[8]=i):i=e[8];let{isPending:c,error:d}=Te(j,i);if(c||g){let m;return e[9]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(we,{message:"Loading tables...",className:C.tableLoading}),e[9]=m):m=e[9],m}if(d){let m;return e[10]===d?m=e[11]:(m=(0,t.jsx)(_e,{error:d,className:C.tableLoading}),e[10]=d,e[11]=m),m}if(s.length===0){let m;return e[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(ae,{content:"No tables found",className:C.tableLoading}),e[12]=m):m=e[12],m}let x;if(e[13]!==r||e[14]!==l||e[15]!==s){let m;e[17]===r?m=e[18]:(m=f=>r?f.name.toLowerCase().includes(r.toLowerCase()):!0,e[17]=r,e[18]=m);let p=s.filter(m),u;e[19]!==r||e[20]!==l?(u=f=>(0,t.jsx)(Qa,{table:f,sqlTableContext:l,isSearching:!!r},f.name),e[19]=r,e[20]=l,e[21]=u):u=e[21],x=p.map(u),e[13]=r,e[14]=l,e[15]=s,e[16]=x}else x=e[16];let h;return e[22]===x?h=e[23]:(h=(0,t.jsx)(t.Fragment,{children:x}),e[22]=x,e[23]=h),h},Qa=a=>{let e=(0,R.c)(64),{table:s,sqlTableContext:l,isSearching:r}=a,{addTable:o}=de(),[n,b]=_.useState(!1),[g,N]=_.useState(!1),j=s.columns.length>0,i;e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==s.name||e[4]!==j||e[5]!==g?(i=async()=>{if(n&&!j&&l&&!g){N(!0);let{engine:V,database:Y,schema:Ve}=l,ee=await Ue.request({engine:V,database:Y,schema:Ve,tableName:s.name});if(!(ee!=null&&ee.table))throw Error("No table details available");o({table:ee.table,sqlTableContext:l})}},e[0]=o,e[1]=n,e[2]=l,e[3]=s.name,e[4]=j,e[5]=g,e[6]=i):i=e[6];let c;e[7]!==n||e[8]!==j?(c=[n,j],e[7]=n,e[8]=j,e[9]=c):c=e[9];let{isFetching:d,isPending:x,error:h}=Te(i,c),m=H(oa),p=La(),{createNewCell:u}=na(),f=Le(),y;e[10]!==f||e[11]!==m||e[12]!==u||e[13]!==p||e[14]!==l||e[15]!==s?(y=()=>{Ia({autoInstantiate:m,createNewCell:u,fromCellId:p}),f((()=>{if(s.source_type==="catalog"){let V=l!=null&&l.database?`${l.database}.${s.name}`:s.name;return`${s.engine}.load_table("${V}")`}if(l)return be({table:s,columnName:"*",sqlTableContext:l});switch(s.source_type){case"local":return`mo.ui.table(${s.name})`;case"duckdb":case"connection":return be({table:s,columnName:"*",sqlTableContext:l});default:return ra(s.source_type),""}})())},e[10]=f,e[11]=m,e[12]=u,e[13]=p,e[14]=l,e[15]=s,e[16]=y):y=e[16];let v=y,w;e[17]!==s.num_columns||e[18]!==s.num_rows?(w=()=>{let V=[];return s.num_rows!=null&&V.push(`${s.num_rows} rows`),s.num_columns!=null&&V.push(`${s.num_columns} columns`),V.length===0?null:(0,t.jsx)("div",{className:"flex flex-row gap-2 items-center pl-6 group-hover:hidden",children:(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:V.join(", ")})})},e[17]=s.num_columns,e[18]=s.num_rows,e[19]=w):w=e[19];let S=w,L;e[20]!==h||e[21]!==d||e[22]!==x||e[23]!==l||e[24]!==s?(L=()=>{if(x||d)return(0,t.jsx)(we,{message:"Loading columns...",className:C.tableLoading});if(h)return(0,t.jsx)(_e,{error:h,className:C.tableLoading});let V=s.columns;return V.length===0?(0,t.jsx)(ae,{content:"No columns found",className:C.tableLoading}):V.map(Y=>(0,t.jsx)(Ya,{table:s,column:Y,sqlTableContext:l},Y.name))},e[20]=h,e[21]=d,e[22]=x,e[23]=l,e[24]=s,e[25]=L):L=e[25];let k=L,B;e[26]!==n||e[27]!==r||e[28]!==s.source_type||e[29]!==s.type?(B=()=>{if(s.source_type!=="local")return(0,t.jsx)(s.type==="table"?ze:We,{className:"h-3 w-3",strokeWidth:n||r?2.5:void 0})},e[26]=n,e[27]=r,e[28]=s.source_type,e[29]=s.type,e[30]=B):B=e[30];let M=B,E=l?`${l.database}.${l.schema}.${s.name}`:s.name,P=l&&(xe(l.schema)?C.tableSchemaless:C.tableWithSchema),O=(n||r)&&"font-semibold",$;e[31]!==P||e[32]!==O?($=q("rounded-none group h-8 cursor-pointer",P,O),e[31]=P,e[32]=O,e[33]=$):$=e[33];let F;e[34]===n?F=e[35]:(F=()=>b(!n),e[34]=n,e[35]=F);let T;e[36]===M?T=e[37]:(T=M(),e[36]=M,e[37]=T);let D;e[38]===s.name?D=e[39]:(D=(0,t.jsx)("span",{className:"text-sm",children:s.name}),e[38]=s.name,e[39]=D);let U;e[40]!==T||e[41]!==D?(U=(0,t.jsxs)("div",{className:"flex gap-2 items-center flex-1 pl-1",children:[T,D]}),e[40]=T,e[41]=D,e[42]=U):U=e[42];let z;e[43]===S?z=e[44]:(z=S(),e[43]=S,e[44]=z);let I;e[45]===v?I=e[46]:(I=ia.stopPropagation(()=>v()),e[45]=v,e[46]=I);let Z;e[47]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,t.jsx)(va,{className:"h-3 w-3"}),e[47]=Z):Z=e[47];let A;e[48]===I?A=e[49]:(A=(0,t.jsx)(te,{content:"Add table to notebook",delayDuration:400,children:(0,t.jsx)(X,{className:"group-hover:inline-flex hidden",variant:"text",size:"icon",onClick:I,children:Z})}),e[48]=I,e[49]=A);let W;e[50]!==n||e[51]!==F||e[52]!==U||e[53]!==z||e[54]!==A||e[55]!==$||e[56]!==E?(W=(0,t.jsxs)(se,{className:$,value:E,"aria-selected":n,forceMount:!0,onSelect:F,children:[U,z,A]}),e[50]=n,e[51]=F,e[52]=U,e[53]=z,e[54]=A,e[55]=$,e[56]=E,e[57]=W):W=e[57];let K;e[58]!==n||e[59]!==k?(K=n&&k(),e[58]=n,e[59]=k,e[60]=K):K=e[60];let Q;return e[61]!==W||e[62]!==K?(Q=(0,t.jsxs)(t.Fragment,{children:[W,K]}),e[61]=W,e[62]=K,e[63]=Q):Q=e[63],Q},Ya=a=>{var U,z;let e=(0,R.c)(48),{table:s,column:l,sqlTableContext:r}=a,[o,n]=_.useState(!1),b=H(fe),g=ce(Ze);b&&o&&n(!1),g(o?I=>new Set([...I,`${s.name}:${l.name}`]):I=>(I.delete(`${s.name}:${l.name}`),new Set(I)));let N=Le(),{columnsPreviews:j}=ta(),i;e[0]!==l.name||e[1]!==s.primary_keys?(i=((U=s.primary_keys)==null?void 0:U.includes(l.name))||!1,e[0]=l.name,e[1]=s.primary_keys,e[2]=i):i=e[2];let c=i,d;e[3]!==l.name||e[4]!==s.indexes?(d=((z=s.indexes)==null?void 0:z.includes(l.name))||!1,e[3]=l.name,e[4]=s.indexes,e[5]=d):d=e[5];let x=d,h;e[6]===N?h=e[7]:(h=I=>{N(I)},e[6]=N,e[7]=h);let m=h,p=et,u=o?"font-semibold":"",f;e[8]!==l.name||e[9]!==u?(f=(0,t.jsx)("span",{className:u,children:l.name}),e[8]=l.name,e[9]=u,e[10]=f):f=e[10];let y=f,v=`${s.name}.${l.name}`,w=`${s.name}.${l.name}`,S;e[11]===o?S=e[12]:(S=()=>n(!o),e[11]=o,e[12]=S);let L=r?C.columnSql:C.columnLocal,k;e[13]===L?k=e[14]:(k=q("flex flex-row gap-2 items-center flex-1",L),e[13]=L,e[14]=k);let B;e[15]!==l.type||e[16]!==y?(B=(0,t.jsx)(ya,{columnName:y,dataType:l.type}),e[15]=l.type,e[16]=y,e[17]=B):B=e[17];let M;e[18]===c?M=e[19]:(M=c&&p({tooltipContent:"Primary key",content:"PK"}),e[18]=c,e[19]=M);let E;e[20]===x?E=e[21]:(E=x&&p({tooltipContent:"Indexed",content:"IDX"}),e[20]=x,e[21]=E);let P;e[22]!==k||e[23]!==B||e[24]!==M||e[25]!==E?(P=(0,t.jsxs)("div",{className:k,children:[B,M,E]}),e[22]=k,e[23]=B,e[24]=M,e[25]=E,e[26]=P):P=e[26];let O;e[27]===l.name?O=e[28]:(O=(0,t.jsx)(te,{content:"Copy column name",delayDuration:400,children:(0,t.jsx)(X,{variant:"text",size:"icon",className:"group-hover:opacity-100 opacity-0 hover:bg-muted text-muted-foreground hover:text-foreground",children:(0,t.jsx)(Ca,{tooltip:!1,value:l.name,className:"h-3 w-3"})})}),e[27]=l.name,e[28]=O);let $;e[29]===l.external_type?$=e[30]:($=(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l.external_type}),e[29]=l.external_type,e[30]=$);let F;e[31]!==P||e[32]!==O||e[33]!==$||e[34]!==v||e[35]!==w||e[36]!==S?(F=(0,t.jsxs)(se,{className:"rounded-none py-1 group cursor-pointer",value:w,onSelect:S,children:[P,O,$]},v),e[31]=P,e[32]=O,e[33]=$,e[34]=v,e[35]=w,e[36]=S,e[37]=F):F=e[37];let T;e[38]!==l||e[39]!==j||e[40]!==m||e[41]!==o||e[42]!==r||e[43]!==s?(T=o&&(0,t.jsx)("div",{className:q(C.columnPreview,"pr-2 py-2 bg-(--slate-1) shadow-inner border-b"),children:(0,t.jsx)(ca,{children:(0,t.jsx)(Na,{table:s,column:l,onAddColumnChart:m,preview:j.get(r?`${r.database}.${r.schema}.${s.name}:${l.name}`:`${s.name}:${l.name}`),sqlTableContext:r})})}),e[38]=l,e[39]=j,e[40]=m,e[41]=o,e[42]=r,e[43]=s,e[44]=T):T=e[44];let D;return e[45]!==F||e[46]!==T?(D=(0,t.jsxs)(t.Fragment,{children:[F,T]}),e[45]=F,e[46]=T,e[47]=D):D=e[47],D};function et(a){let{tooltipContent:e,content:s}=a;return(0,t.jsx)(te,{content:e,delayDuration:100,children:(0,t.jsx)("span",{className:"text-xs text-black bg-gray-100 dark:invert rounded px-1",children:s})})}function us(a){return a}var G={name:"name",type:"type-value",defs:"defs-refs"},at=[{id:G.name,accessorFn:a=>[a.name,a.declaredBy],enableSorting:!0,sortingFn:"alphanumeric",header:({column:a})=>(0,t.jsx)(re,{header:"Name",column:a}),cell:({getValue:a})=>{let[e,s]=a();return(0,t.jsx)(Ua,{name:e,declaredBy:s})}},{id:G.type,accessorFn:a=>[a.dataType,a.value],enableSorting:!0,sortingFn:"alphanumeric",header:({column:a})=>(0,t.jsx)(re,{header:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{children:"Type"}),(0,t.jsx)("span",{children:"Value"})]}),column:a}),cell:({getValue:a})=>{let[e,s]=a();return(0,t.jsxs)("div",{className:"max-w-[150px]",children:[(0,t.jsx)("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap text-muted-foreground font-mono text-xs",children:e}),(0,t.jsx)("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap",title:s??"",children:s})]})}},{id:G.defs,accessorFn:a=>[a.declaredBy,a.usedBy,a.name,a.declaredByNames,a.usedByNames],enableSorting:!0,sortingFn:"basic",header:({column:a})=>(0,t.jsx)(re,{header:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{children:"Declared By"}),(0,t.jsx)("span",{children:"Used By"})]}),column:a}),cell:({getValue:a})=>{let[e,s,l]=a(),r=o=>{let n=ue(o);n&&ie(n,l)};return(0,t.jsxs)("div",{className:"flex flex-col gap-1 py-1",children:[(0,t.jsxs)("div",{className:"flex flex-row overflow-auto gap-2 items-center",children:[(0,t.jsx)("span",{title:"Declared by",children:(0,t.jsx)(za,{className:"w-3.5 h-3.5 text-muted-foreground"})}),e.length===1?(0,t.jsx)(Fe,{variant:"focus",cellId:e[0],skipScroll:!0,onClick:()=>r(e[0])}):(0,t.jsx)("div",{className:"text-destructive flex flex-row gap-2",children:e.slice(0,3).map((o,n)=>(0,t.jsxs)("span",{className:"flex",children:[(0,t.jsx)(Fe,{variant:"focus",cellId:o,skipScroll:!0,className:"whitespace-nowrap text-destructive",onClick:()=>r(o)},o),n<e.length-1&&", "]},o))})]}),(0,t.jsxs)("div",{className:"flex flex-row overflow-auto gap-2 items-baseline",children:[(0,t.jsx)("span",{title:"Used by",children:(0,t.jsx)(wa,{className:"w-3.5 h-3.5 text-muted-foreground"})}),(0,t.jsx)(Oa,{maxCount:3,cellIds:s,skipScroll:!0,onClick:r})]})]})}}];function tt({variables:a,sort:e,cellIdToIndex:s}){e||(e={id:G.defs,desc:!1});let l=[];switch(e.id){case G.name:l=J(a,r=>r.name);break;case G.type:l=J(a,r=>r.dataType);break;case G.defs:l=J(a,r=>s.get(r.declaredBy[0]));break}return e.desc?l.reverse():l}const De=(0,_.memo)(({className:a,cellIds:e,variables:s})=>{let[l,r]=_.useState([]),[o,n]=_.useState(""),b=ea(),{locale:g}=_a(),N=(0,_.useMemo)(()=>{let i=c=>{let d=b[c];return Xe(d)?`cell-${e.indexOf(c)}`:d??`cell-${e.indexOf(c)}`};return Object.values(s).map(c=>({...c,declaredByNames:c.declaredBy.map(i),usedByNames:c.usedBy.map(i)}))},[s,b,e]),j=ha({data:(0,_.useMemo)(()=>{let i=new Map;return e.forEach((c,d)=>i.set(c,d)),tt({variables:N,sort:l[0],cellIdToIndex:i})},[N,l,e]),columns:at,getCoreRowModel:ua(),onGlobalFilterChange:n,getFilteredRowModel:xa(),enableFilters:!0,enableGlobalFilter:!0,enableColumnPinning:!1,getColumnCanGlobalFilter(i){return i.columnDef.enableGlobalFilter??!0},globalFilterFn:"auto",manualSorting:!0,locale:g,onSortingChange:r,getSortedRowModel:da(),state:{sorting:l,globalFilter:o}});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ja,{className:"w-full",placeholder:"Search",value:o,onChange:i=>n(i.target.value)}),(0,t.jsxs)(Ma,{className:q("w-full text-sm flex-1 border-separate border-spacing-0",a),children:[(0,t.jsx)(qa,{children:(0,t.jsx)(Ie,{className:"whitespace-nowrap text-xs",children:j.getFlatHeaders().map(i=>(0,t.jsx)(Ba,{className:"sticky top-0 bg-background border-b",children:Ne(i.column.columnDef.header,i.getContext())},i.id))})}),(0,t.jsx)(Da,{children:j.getRowModel().rows.map(i=>(0,t.jsx)(Ie,{className:"hover:bg-accent",children:i.getVisibleCells().map(c=>(0,t.jsx)(Va,{className:"border-b",children:Ne(c.column.columnDef.cell,c.getContext())},c.id))},i.id))})]})]})});De.displayName="VariableTable";var st=ne(),lt=Ke("marimo:session-panel:state",{openSections:["variables"],hasUserInteracted:!1},He),nt=()=>{let a=(0,st.c)(24),e=la(),s=aa(),l=H(ge),r=H(qe),[o,n]=Ee(lt),b=l.length+r.length,g;a[0]!==b||a[1]!==o.hasUserInteracted||a[2]!==o.openSections?(g=!o.hasUserInteracted&&b>0?[...new Set([...o.openSections,"datasources"])]:o.openSections,a[0]=b,a[1]=o.hasUserInteracted,a[2]=o.openSections,a[3]=g):g=a[3];let N=g,j;a[4]===n?j=a[5]:(j=v=>{n({openSections:v,hasUserInteracted:!0})},a[4]=n,a[5]=j);let i=j,c=!N.includes("datasources")&&b>0,d;a[6]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(le,{className:"w-4 h-4"}),a[6]=d):d=a[6];let x;a[7]!==b||a[8]!==c?(x=c&&(0,t.jsx)(Sa,{variant:"secondary",className:"ml-1 px-1.5 py-0 mb-px text-[10px]",children:b}),a[7]=b,a[8]=c,a[9]=x):x=a[9];let h;a[10]===x?h=a[11]:(h=(0,t.jsx)(Ce,{className:"px-3 py-2 text-xs font-semibold uppercase tracking-wide hover:no-underline",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[d,"Data sources",x]})}),a[10]=x,a[11]=h);let m;a[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)($e,{wrapperClassName:"p-0",children:(0,t.jsx)(Ka,{})}),a[12]=m):m=a[12];let p;a[13]===h?p=a[14]:(p=(0,t.jsxs)(ke,{value:"datasources",className:"border-b",children:[h,m]}),a[13]=h,a[14]=p);let u;a[15]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(Ce,{className:"px-3 py-2 text-xs font-semibold uppercase tracking-wide hover:no-underline",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(Ge,{className:"w-4 h-4"}),"Variables"]})}),a[15]=u):u=a[15];let f;a[16]!==s||a[17]!==e?(f=(0,t.jsxs)(ke,{value:"variables",className:"border-b-0",children:[u,(0,t.jsx)($e,{wrapperClassName:"p-0",children:Object.keys(e).length===0?(0,t.jsx)("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:"No variables defined"}):(0,t.jsx)(De,{cellIds:s.inOrderIds,variables:e})})]}),a[16]=s,a[17]=e,a[18]=f):f=a[18];let y;return a[19]!==i||a[20]!==N||a[21]!==p||a[22]!==f?(y=(0,t.jsxs)(ka,{type:"multiple",value:N,onValueChange:i,className:"flex flex-col h-full overflow-auto",children:[p,f]}),a[19]=i,a[20]=N,a[21]=p,a[22]=f,a[23]=y):y=a[23],y};export{nt as default};
import{t as e}from"./createLucideIcon-CnW3RofX.js";var r=e("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);export{r as t};
import{t as O}from"./chunk-LvLJmgfZ.js";import{d as j}from"./hotkeys-BHHWjLlp.js";import{t as T}from"./use-toast-rmUWldD_.js";function k(){try{window.location.reload()}catch(w){j.error("Failed to reload page",w),T({title:"Failed to reload page",description:"Please refresh the page manually."})}}var F=O(((w,y)=>{var C=(function(){var g=String.fromCharCode,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",b={};function _(r,e){if(!b[r]){b[r]={};for(var a=0;a<r.length;a++)b[r][r.charAt(a)]=a}return b[r][e]}var d={compressToBase64:function(r){if(r==null)return"";var e=d._compress(r,6,function(a){return x.charAt(a)});switch(e.length%4){default:case 0:return e;case 1:return e+"===";case 2:return e+"==";case 3:return e+"="}},decompressFromBase64:function(r){return r==null?"":r==""?null:d._decompress(r.length,32,function(e){return _(x,r.charAt(e))})},compressToUTF16:function(r){return r==null?"":d._compress(r,15,function(e){return g(e+32)})+" "},decompressFromUTF16:function(r){return r==null?"":r==""?null:d._decompress(r.length,16384,function(e){return r.charCodeAt(e)-32})},compressToUint8Array:function(r){for(var e=d.compress(r),a=new Uint8Array(e.length*2),n=0,s=e.length;n<s;n++){var f=e.charCodeAt(n);a[n*2]=f>>>8,a[n*2+1]=f%256}return a},decompressFromUint8Array:function(r){if(r==null)return d.decompress(r);for(var e=Array(r.length/2),a=0,n=e.length;a<n;a++)e[a]=r[a*2]*256+r[a*2+1];var s=[];return e.forEach(function(f){s.push(g(f))}),d.decompress(s.join(""))},compressToEncodedURIComponent:function(r){return r==null?"":d._compress(r,6,function(e){return U.charAt(e)})},decompressFromEncodedURIComponent:function(r){return r==null?"":r==""?null:(r=r.replace(/ /g,"+"),d._decompress(r.length,32,function(e){return _(U,r.charAt(e))}))},compress:function(r){return d._compress(r,16,function(e){return g(e)})},_compress:function(r,e,a){if(r==null)return"";var n,s,f={},v={},m="",A="",p="",h=2,l=3,c=2,u=[],o=0,i=0,t;for(t=0;t<r.length;t+=1)if(m=r.charAt(t),Object.prototype.hasOwnProperty.call(f,m)||(f[m]=l++,v[m]=!0),A=p+m,Object.prototype.hasOwnProperty.call(f,A))p=A;else{if(Object.prototype.hasOwnProperty.call(v,p)){if(p.charCodeAt(0)<256){for(n=0;n<c;n++)o<<=1,i==e-1?(i=0,u.push(a(o)),o=0):i++;for(s=p.charCodeAt(0),n=0;n<8;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}else{for(s=1,n=0;n<c;n++)o=o<<1|s,i==e-1?(i=0,u.push(a(o)),o=0):i++,s=0;for(s=p.charCodeAt(0),n=0;n<16;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}h--,h==0&&(h=2**c,c++),delete v[p]}else for(s=f[p],n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;h--,h==0&&(h=2**c,c++),f[A]=l++,p=String(m)}if(p!==""){if(Object.prototype.hasOwnProperty.call(v,p)){if(p.charCodeAt(0)<256){for(n=0;n<c;n++)o<<=1,i==e-1?(i=0,u.push(a(o)),o=0):i++;for(s=p.charCodeAt(0),n=0;n<8;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}else{for(s=1,n=0;n<c;n++)o=o<<1|s,i==e-1?(i=0,u.push(a(o)),o=0):i++,s=0;for(s=p.charCodeAt(0),n=0;n<16;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}h--,h==0&&(h=2**c,c++),delete v[p]}else for(s=f[p],n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;h--,h==0&&(h=2**c,c++)}for(s=2,n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;for(;;)if(o<<=1,i==e-1){u.push(a(o));break}else i++;return u.join("")},decompress:function(r){return r==null?"":r==""?null:d._decompress(r.length,32768,function(e){return r.charCodeAt(e)})},_decompress:function(r,e,a){var n=[],s=4,f=4,v=3,m="",A=[],p,h,l,c,u,o,i,t={val:a(0),position:e,index:1};for(p=0;p<3;p+=1)n[p]=p;for(l=0,u=2**2,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;switch(l){case 0:for(l=0,u=2**8,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;i=g(l);break;case 1:for(l=0,u=2**16,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;i=g(l);break;case 2:return""}for(n[3]=i,h=i,A.push(i);;){if(t.index>r)return"";for(l=0,u=2**v,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;switch(i=l){case 0:for(l=0,u=2**8,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;n[f++]=g(l),i=f-1,s--;break;case 1:for(l=0,u=2**16,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;n[f++]=g(l),i=f-1,s--;break;case 2:return A.join("")}if(s==0&&(s=2**v,v++),n[i])m=n[i];else if(i===f)m=h+h.charAt(0);else return null;A.push(m),n[f++]=h+m.charAt(0),s--,h=m,s==0&&(s=2**v,v++)}}};return d})();typeof define=="function"&&define.amd?define(function(){return C}):y!==void 0&&y!=null?y.exports=C:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return C})})),P=F();function E(w){let{code:y,baseUrl:C="https://marimo.app"}=w,g=new URL(C);return y&&(g.hash=`#code/${(0,P.compressToEncodedURIComponent)(y)}`),g.href}export{F as n,k as r,E as t};
import{t as e}from"./shell-DmziZNbR.js";export{e as shell};
var f={};function c(e,t){for(var r=0;r<t.length;r++)f[t[r]]=e}var l=["true","false"],k=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],h="ab.awk.bash.beep.cat.cc.cd.chown.chmod.chroot.clear.cp.curl.cut.diff.echo.find.gawk.gcc.get.git.grep.hg.kill.killall.ln.ls.make.mkdir.openssl.mv.nc.nl.node.npm.ping.ps.restart.rm.rmdir.sed.service.sh.shopt.shred.source.sort.sleep.ssh.start.stop.su.sudo.svn.tee.telnet.top.touch.vi.vim.wall.wc.wget.who.write.yes.zsh".split(".");c("atom",l),c("keyword",k),c("builtin",h);function d(e,t){if(e.eatSpace())return null;var r=e.sol(),n=e.next();if(n==="\\")return e.next(),null;if(n==="'"||n==='"'||n==="`")return t.tokens.unshift(a(n,n==="`"?"quote":"string")),u(e,t);if(n==="#")return r&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if(n==="$")return t.tokens.unshift(p),u(e,t);if(n==="+"||n==="=")return"operator";if(n==="-")return e.eat("-"),e.eatWhile(/\w/),"attribute";if(n=="<"){if(e.match("<<"))return"operator";var i=e.match(/^<-?\s*(?:['"]([^'"]*)['"]|([^'"\s]*))/);if(i)return t.tokens.unshift(g(i[1]||i[2])),"string.special"}if(/\d/.test(n)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var s=e.current();return e.peek()==="="&&/\w+/.test(s)?"def":f.hasOwnProperty(s)?f[s]:null}function a(e,t){var r=e=="("?")":e=="{"?"}":e;return function(n,i){for(var s,o=!1;(s=n.next())!=null;){if(s===r&&!o){i.tokens.shift();break}else if(s==="$"&&!o&&e!=="'"&&n.peek()!=r){o=!0,n.backUp(1),i.tokens.unshift(p);break}else{if(!o&&e!==r&&s===e)return i.tokens.unshift(a(e,t)),u(n,i);if(!o&&/['"]/.test(s)&&!/['"]/.test(e)){i.tokens.unshift(m(s,"string")),n.backUp(1);break}}o=!o&&s==="\\"}return t}}function m(e,t){return function(r,n){return n.tokens[0]=a(e,t),r.next(),u(r,n)}}var p=function(e,t){t.tokens.length>1&&e.eat("$");var r=e.next();return/['"({]/.test(r)?(t.tokens[0]=a(r,r=="("?"quote":r=="{"?"def":"string"),u(e,t)):(/\d/.test(r)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function g(e){return function(t,r){return t.sol()&&t.string==e&&r.tokens.shift(),t.skipToEnd(),"string.special"}}function u(e,t){return(t.tokens[0]||d)(e,t)}const w={name:"shell",startState:function(){return{tokens:[]}},token:function(e,t){return u(e,t)},languageData:{autocomplete:l.concat(k,h),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};export{w as t};
import{t as e}from"./sieve-DT4D9aeW.js";export{e as sieve};
function o(n){for(var t={},e=n.split(" "),r=0;r<e.length;++r)t[e[r]]=!0;return t}var l=o("if elsif else stop require"),s=o("true false not");function i(n,t){var e=n.next();if(e=="/"&&n.eat("*"))return t.tokenize=a,a(n,t);if(e==="#")return n.skipToEnd(),"comment";if(e=='"')return t.tokenize=p(e),t.tokenize(n,t);if(e=="(")return t._indent.push("("),t._indent.push("{"),null;if(e==="{")return t._indent.push("{"),null;if(e==")"&&(t._indent.pop(),t._indent.pop()),e==="}")return t._indent.pop(),null;if(e==","||e==";"||/[{}\(\),;]/.test(e))return null;if(/\d/.test(e))return n.eatWhile(/[\d]/),n.eat(/[KkMmGg]/),"number";if(e==":")return n.eatWhile(/[a-zA-Z_]/),n.eatWhile(/[a-zA-Z0-9_]/),"operator";n.eatWhile(/\w/);var r=n.current();return r=="text"&&n.eat(":")?(t.tokenize=f,"string"):l.propertyIsEnumerable(r)?"keyword":s.propertyIsEnumerable(r)?"atom":null}function f(n,t){return t._multiLineString=!0,n.sol()?(n.next()=="."&&n.eol()&&(t._multiLineString=!1,t.tokenize=i),"string"):(n.eatSpace(),n.peek()=="#"?(n.skipToEnd(),"comment"):(n.skipToEnd(),"string"))}function a(n,t){for(var e=!1,r;(r=n.next())!=null;){if(e&&r=="/"){t.tokenize=i;break}e=r=="*"}return"comment"}function p(n){return function(t,e){for(var r=!1,u;(u=t.next())!=null&&!(u==n&&!r);)r=!r&&u=="\\";return r||(e.tokenize=i),"string"}}const c={name:"sieve",startState:function(n){return{tokenize:i,baseIndent:n||0,_indent:[]}},token:function(n,t){return n.eatSpace()?null:(t.tokenize||i)(n,t)},indent:function(n,t,e){var r=n._indent.length;return t&&t[0]=="}"&&r--,r<0&&(r=0),r*e.unit},languageData:{indentOnInput:/^\s*\}$/}};export{c as t};
function l(t){o(t,"start");var e={},n=t.languageData||{},s=!1;for(var d in t)if(d!=n&&t.hasOwnProperty(d))for(var p=e[d]=[],r=t[d],a=0;a<r.length;a++){var i=r[a];p.push(new k(i,t)),(i.indent||i.dedent)&&(s=!0)}return{name:n.name,startState:function(){return{state:"start",pending:null,indent:s?[]:null}},copyState:function(u){var g={state:u.state,pending:u.pending,indent:u.indent&&u.indent.slice(0)};return u.stack&&(g.stack=u.stack.slice(0)),g},token:c(e),indent:x(e,n),mergeTokens:n.mergeTokens,languageData:n}}function o(t,e){if(!t.hasOwnProperty(e))throw Error("Undefined state "+e+" in simple mode")}function f(t,e){if(!t)return/(?:)/;var n="";return t instanceof RegExp?(t.ignoreCase&&(n="i"),t.unicode&&(n+="u"),t=t.source):t=String(t),RegExp((e===!1?"":"^")+"(?:"+t+")",n)}function h(t){if(!t)return null;if(t.apply)return t;if(typeof t=="string")return t.replace(/\./g," ");for(var e=[],n=0;n<t.length;n++)e.push(t[n]&&t[n].replace(/\./g," "));return e}function k(t,e){(t.next||t.push)&&o(e,t.next||t.push),this.regex=f(t.regex),this.token=h(t.token),this.data=t}function c(t){return function(e,n){if(n.pending){var s=n.pending.shift();return n.pending.length==0&&(n.pending=null),e.pos+=s.text.length,s.token}for(var d=t[n.state],p=0;p<d.length;p++){var r=d[p],a=(!r.data.sol||e.sol())&&e.match(r.regex);if(a){r.data.next?n.state=r.data.next:r.data.push?((n.stack||(n.stack=[])).push(n.state),n.state=r.data.push):r.data.pop&&n.stack&&n.stack.length&&(n.state=n.stack.pop()),r.data.indent&&n.indent.push(e.indentation()+e.indentUnit),r.data.dedent&&n.indent.pop();var i=r.token;if(i&&i.apply&&(i=i(a)),a.length>2&&r.token&&typeof r.token!="string"){n.pending=[];for(var u=2;u<a.length;u++)a[u]&&n.pending.push({text:a[u],token:r.token[u-1]});return e.backUp(a[0].length-(a[1]?a[1].length:0)),i[0]}else return i&&i.join?i[0]:i}}return e.next(),null}}function x(t,e){return function(n,s){if(n.indent==null||e.dontIndentStates&&e.dontIndentStates.indexOf(n.state)>-1)return null;var d=n.indent.length-1,p=t[n.state];t:for(;;){for(var r=0;r<p.length;r++){var a=p[r];if(a.data.dedent&&a.data.dedentIfLineStart!==!1){var i=a.regex.exec(s);if(i&&i[0]){d--,(a.next||a.push)&&(p=t[a.next||a.push]),s=s.slice(i[0].length);continue t}}}break}return d<0?0:n.indent[d]}}export{l as t};

Sorry, the diff of this file is too big to display

import{t as a}from"./smalltalk-lAY6r45k.js";export{a as smalltalk};
var s=/[+\-\/\\*~<>=@%|&?!.,:;^]/,d=/true|false|nil|self|super|thisContext/,r=function(n,e){this.next=n,this.parent=e},o=function(n,e,t){this.name=n,this.context=e,this.eos=t},l=function(){this.context=new r(c,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};l.prototype.userIndent=function(n,e){this.userIndentationDelta=n>0?n/e-this.indentation:0};var c=function(n,e,t){var a=new o(null,e,!1),i=n.next();return i==='"'?a=u(n,new r(u,e)):i==="'"?a=x(n,new r(x,e)):i==="#"?n.peek()==="'"?(n.next(),a=h(n,new r(h,e))):n.eatWhile(/[^\s.{}\[\]()]/)?a.name="string.special":a.name="meta":i==="$"?(n.next()==="<"&&(n.eatWhile(/[^\s>]/),n.next()),a.name="string.special"):i==="|"&&t.expectVariable?a.context=new r(p,e):/[\[\]{}()]/.test(i)?(a.name="bracket",a.eos=/[\[{(]/.test(i),i==="["?t.indentation++:i==="]"&&(t.indentation=Math.max(0,t.indentation-1))):s.test(i)?(n.eatWhile(s),a.name="operator",a.eos=i!==";"):/\d/.test(i)?(n.eatWhile(/[\w\d]/),a.name="number"):/[\w_]/.test(i)?(n.eatWhile(/[\w\d_]/),a.name=t.expectVariable?d.test(n.current())?"keyword":"variable":null):a.eos=t.expectVariable,a},u=function(n,e){return n.eatWhile(/[^"]/),new o("comment",n.eat('"')?e.parent:e,!0)},x=function(n,e){return n.eatWhile(/[^']/),new o("string",n.eat("'")?e.parent:e,!1)},h=function(n,e){return n.eatWhile(/[^']/),new o("string.special",n.eat("'")?e.parent:e,!1)},p=function(n,e){var t=new o(null,e,!1);return n.next()==="|"?(t.context=e.parent,t.eos=!0):(n.eatWhile(/[^|]/),t.name="variable"),t};const f={name:"smalltalk",startState:function(){return new l},token:function(n,e){if(e.userIndent(n.indentation(),n.indentUnit),n.eatSpace())return null;var t=e.context.next(n,e.context,e);return e.context=t.context,e.expectVariable=t.eos,t.name},blankLine:function(n,e){n.userIndent(0,e)},indent:function(n,e,t){var a=n.context.next===c&&e&&e.charAt(0)==="]"?-1:n.userIndentationDelta;return(n.indentation+a)*t.unit},languageData:{indentOnInput:/^\s*\]$/}};export{f as t};
import{s as I}from"./chunk-LvLJmgfZ.js";import"./useEvent-DO6uJBas.js";import{t as P}from"./react-BGmjiNul.js";import{w as q}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as $}from"./compiler-runtime-DeeZ7FnK.js";import{n as D}from"./constants-B6Cb__3x.js";import"./config-CIrPQIbt.js";import{t as F}from"./jsx-runtime-ZmTK25f3.js";import{i as G,t as w}from"./button-YC1gW_kJ.js";import{t as T}from"./cn-BKtXLv3a.js";import{at as W}from"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{r as A}from"./requests-BsVD4CdD.js";import{n as M,t as B}from"./LazyAnyLanguageCodeMirror-yzHjsVJt.js";import{h as J}from"./select-V5IdpNiR.js";import{t as K}from"./spinner-DaIKav-i.js";import{t as L}from"./plus-BD5o34_i.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{r as R}from"./useTheme-DUdVAZI8.js";import"./Combination-CMPwuAmi.js";import{t as U}from"./tooltip-CEc2ajau.js";import{a as V,c as Y,i as Q,n as X,r as Z}from"./dialog-CxGKN4C_.js";import{n as ee}from"./ImperativeModal-CUbWEBci.js";import{t as te}from"./RenderHTML-CQZqVk1Z.js";import"./purify.es-DNVQZNFu.js";import{n as se}from"./error-banner-DUzsIXtq.js";import{n as re}from"./useAsyncData-C4XRy1BE.js";import{a as le,o as oe,r as ie,t as ae,u as ne}from"./command-DhzFN2CJ.js";import{o as me}from"./focus-D51fcwZX.js";import{n as ce,r as de,t as E}from"./react-resizable-panels.browser.esm-Ctj_10o2.js";import{t as pe}from"./empty-state-h8C2C6hZ.js";import{n as he,r as fe}from"./panel-context-B7WTvLhE.js";import{t as H}from"./kiosk-mode-B5u1Ptdj.js";var O=$(),C=I(P(),1),s=I(F(),1);const xe=t=>{let e=(0,O.c)(6),{children:r}=t,{openModal:i,closeModal:o}=ee(),l;e[0]!==o||e[1]!==i?(l=()=>i((0,s.jsx)(ue,{onClose:o})),e[0]=o,e[1]=i,e[2]=l):l=e[2];let a;return e[3]!==r||e[4]!==l?(a=(0,s.jsx)(G,{onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=a):a=e[5],a};var ue=t=>{let e=(0,O.c)(4),{onClose:r}=t,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(Y,{children:"Contribute a Snippet"}),e[0]=i):i=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsxs)(V,{children:[i,(0,s.jsxs)(Z,{children:["Have a useful snippet you want to share with the community? Make a pull request"," ",(0,s.jsx)("a",{href:D.githubPage,target:"_blank",className:"underline",children:"on GitHub"}),"."]})]}),e[1]=o):o=e[1];let l;return e[2]===r?l=e[3]:(l=(0,s.jsxs)(X,{className:"max-w-md",children:[o,(0,s.jsx)(Q,{children:(0,s.jsx)(w,{"data-testid":"snippet-close-button",variant:"default",onClick:r,children:"Close"})})]}),e[2]=r,e[3]=l),l},k=$(),je=[W.lineWrapping],ve=()=>{let t=(0,k.c)(24),{readSnippets:e}=A(),[r,i]=C.useState(),o=he(),l=fe(),a;t[0]===e?a=t[1]:(a=()=>e(),t[0]=e,t[1]=a);let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=[],t[2]=c):c=t[2];let{data:N,error:j,isPending:g}=re(a,c);if(j){let m;return t[3]===j?m=t[4]:(m=(0,s.jsx)(se,{error:j}),t[3]=j,t[4]=m),m}if(g||!N){let m;return t[5]===Symbol.for("react.memo_cache_sentinel")?(m=(0,s.jsx)(K,{size:"medium",centered:!0}),t[5]=m):m=t[5],m}let _=o==="vertical",v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=(0,s.jsx)(le,{placeholder:"Search snippets...",className:"h-6 m-1",rootClassName:"flex-1 border-r"}),t[6]=v):v=t[6];let h,f;t[7]===Symbol.for("react.memo_cache_sentinel")?(h=(0,s.jsxs)("div",{className:"flex items-center w-full border-b",children:[v,(0,s.jsx)(xe,{children:(0,s.jsx)("button",{className:"float-right px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",children:(0,s.jsx)(L,{className:"h-4 w-4"})})})]}),f=(0,s.jsx)(ie,{children:"No results"}),t[7]=h,t[8]=f):(h=t[7],f=t[8]);let b;t[9]===Symbol.for("react.memo_cache_sentinel")?(b=m=>i(m),t[9]=b):b=t[9];let d;t[10]===N.snippets?d=t[11]:(d=(0,s.jsx)(E,{defaultSize:40,minSize:20,maxSize:70,children:(0,s.jsxs)(ae,{className:"h-full rounded-none",children:[h,f,(0,s.jsx)(Ne,{onSelect:b,snippets:N.snippets})]})}),t[10]=N.snippets,t[11]=d);let u=_?"h-1":"w-1",p;t[12]===u?p=t[13]:(p=T("bg-border hover:bg-primary/50 transition-colors",u),t[12]=u,t[13]=p);let x;t[14]===p?x=t[15]:(x=(0,s.jsx)(de,{className:p}),t[14]=p,t[15]=x);let n;t[16]===r?n=t[17]:(n=(0,s.jsx)(E,{defaultSize:60,minSize:20,children:(0,s.jsx)(C.Suspense,{children:(0,s.jsx)("div",{className:"h-full snippet-viewer flex flex-col overflow-hidden",children:r?(0,s.jsx)(be,{snippet:r,onClose:()=>i(void 0)},r.title):(0,s.jsx)(pe,{title:"",description:"Click on a snippet to view its content."})})})}),t[16]=r,t[17]=n);let S;return t[18]!==o||t[19]!==l||t[20]!==n||t[21]!==d||t[22]!==x?(S=(0,s.jsx)("div",{className:"flex-1 overflow-hidden h-full",children:(0,s.jsxs)(ce,{direction:o,className:"h-full",children:[d,x,n]},l)}),t[18]=o,t[19]=l,t[20]=n,t[21]=d,t[22]=x,t[23]=S):S=t[23],S},be=t=>{let e=(0,k.c)(33),{snippet:r,onClose:i}=t,{theme:o}=R(),{createNewCell:l}=q(),a=me(),c;e[0]!==l||e[1]!==a||e[2]!==r.sections?(c=()=>{for(let n of[...r.sections].reverse())n.code&&l({code:n.code,before:!1,cellId:a??"__end__",skipIfCodeExists:!0})},e[0]=l,e[1]=a,e[2]=r.sections,e[3]=c):c=e[3];let N=c,j;e[4]!==l||e[5]!==a?(j=n=>{l({code:n,before:!1,cellId:a??"__end__"})},e[4]=l,e[5]=a,e[6]=j):j=e[6];let g=j,_;e[7]===r.title?_=e[8]:(_=(0,s.jsx)("span",{children:r.title}),e[7]=r.title,e[8]=_);let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,s.jsx)(J,{className:"h-4 w-4"}),e[9]=v):v=e[9];let h;e[10]===i?h=e[11]:(h=(0,s.jsx)(w,{size:"sm",variant:"ghost",onClick:i,className:"h-6 w-6 p-0 hover:bg-muted-foreground/10",children:v}),e[10]=i,e[11]=h);let f;e[12]!==_||e[13]!==h?(f=(0,s.jsxs)("div",{className:"text-sm font-semibold bg-muted border-y px-2 py-1 flex justify-between items-center",children:[_,h]}),e[12]=_,e[13]=h,e[14]=f):f=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsx)(M,{className:"ml-2 h-4 w-4"}),e[15]=b):b=e[15];let d;e[16]===N?d=e[17]:(d=(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(H,{children:(0,s.jsxs)(w,{className:"float-right",size:"xs",variant:"outline",onClick:N,children:["Insert snippet",b]})})}),e[16]=N,e[17]=d);let u;if(e[18]!==g||e[19]!==r.sections||e[20]!==r.title||e[21]!==o){let n;e[23]!==g||e[24]!==r.title||e[25]!==o?(n=S=>{let{code:m,html:z,id:y}=S;return z?(0,s.jsx)("div",{children:te({html:z})},`${r.title}-${y}`):m?(0,s.jsxs)("div",{className:"relative hover-actions-parent pr-2",children:[(0,s.jsx)(H,{children:(0,s.jsx)(U,{content:"Insert snippet",children:(0,s.jsx)(w,{className:"absolute -top-2 -right-1 z-10 hover-action px-2 bg-background",size:"sm",variant:"outline",onClick:()=>{g(m)},children:(0,s.jsx)(M,{className:"h-5 w-5"})})})}),(0,s.jsx)(C.Suspense,{children:(0,s.jsx)(B,{theme:o==="dark"?"dark":"light",language:"python",className:"cm border rounded overflow-hidden",extensions:je,value:m,readOnly:!0},`${r.title}-${y}`)})]},`${r.title}-${y}`):null},e[23]=g,e[24]=r.title,e[25]=o,e[26]=n):n=e[26],u=r.sections.map(n),e[18]=g,e[19]=r.sections,e[20]=r.title,e[21]=o,e[22]=u}else u=e[22];let p;e[27]!==d||e[28]!==u?(p=(0,s.jsxs)("div",{className:"px-2 py-2 space-y-4 overflow-auto flex-1",children:[d,u]}),e[27]=d,e[28]=u,e[29]=p):p=e[29];let x;return e[30]!==p||e[31]!==f?(x=(0,s.jsxs)(s.Fragment,{children:[f,p]}),e[30]=p,e[31]=f,e[32]=x):x=e[32],x},Ne=t=>{let e=(0,k.c)(7),{snippets:r,onSelect:i}=t,o;if(e[0]!==i||e[1]!==r){let a;e[3]===i?a=e[4]:(a=c=>(0,s.jsx)(oe,{className:"rounded-none",onSelect:()=>i(c),children:(0,s.jsx)("div",{className:"flex flex-row gap-2 items-center",children:(0,s.jsx)("span",{className:"mt-1 text-accent-foreground",children:c.title})})},c.title),e[3]=i,e[4]=a),o=r.map(a),e[0]=i,e[1]=r,e[2]=o}else o=e[2];let l;return e[5]===o?l=e[6]:(l=(0,s.jsx)(ne,{className:"flex flex-col overflow-auto",children:o}),e[5]=o,e[6]=l),l};export{ve as default};
var i=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/,a=/[\|\!\+\-\*\?\~\^\&]/,c=/^(OR|AND|NOT|TO)$/;function k(n){return parseFloat(n).toString()===n}function s(n){return function(t,e){for(var r=!1,u;(u=t.next())!=null&&!(u==n&&!r);)r=!r&&u=="\\";return r||(e.tokenize=o),"string"}}function f(n){return function(t,e){return n=="|"?t.eat(/\|/):n=="&"&&t.eat(/\&/),e.tokenize=o,"operator"}}function l(n){return function(t,e){for(var r=n;(n=t.peek())&&n.match(i)!=null;)r+=t.next();return e.tokenize=o,c.test(r)?"operator":k(r)?"number":t.peek()==":"?"propertyName":"string"}}function o(n,t){var e=n.next();return e=='"'?t.tokenize=s(e):a.test(e)?t.tokenize=f(e):i.test(e)&&(t.tokenize=l(e)),t.tokenize==o?null:t.tokenize(n,t)}const z={name:"solr",startState:function(){return{tokenize:o}},token:function(n,t){return n.eatSpace()?null:t.tokenize(n,t)}};export{z as solr};
import{t as r}from"./sparql-nFvL3z3l.js";export{r as sparql};
var u;function s(e){return RegExp("^(?:"+e.join("|")+")$","i")}var p=s("str.lang.langmatches.datatype.bound.sameterm.isiri.isuri.iri.uri.bnode.count.sum.min.max.avg.sample.group_concat.rand.abs.ceil.floor.round.concat.substr.strlen.replace.ucase.lcase.encode_for_uri.contains.strstarts.strends.strbefore.strafter.year.month.day.hours.minutes.seconds.timezone.tz.now.uuid.struuid.md5.sha1.sha256.sha384.sha512.coalesce.if.strlang.strdt.isnumeric.regex.exists.isblank.isliteral.a.bind".split(".")),m=s("base.prefix.select.distinct.reduced.construct.describe.ask.from.named.where.order.limit.offset.filter.optional.graph.by.asc.desc.as.having.undef.values.group.minus.in.not.service.silent.using.insert.delete.union.true.false.with.data.copy.to.move.add.create.drop.clear.load.into".split(".")),F=/[*+\-<>=&|\^\/!\?]/,l="[A-Za-z_\\-0-9]",x=RegExp("[A-Za-z]"),g=RegExp("(("+l+"|\\.)*("+l+"))?:");function d(e,t){var n=e.next();if(u=null,n=="$"||n=="?")return n=="?"&&e.match(/\s/,!1)?"operator":(e.match(/^[A-Za-z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Za-z0-9_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*/),"variableName.local");if(n=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(n=='"'||n=="'")return t.tokenize=h(n),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(n))return u=n,"bracket";if(n=="#")return e.skipToEnd(),"comment";if(F.test(n))return"operator";if(n==":")return f(e),"atom";if(n=="@")return e.eatWhile(/[a-z\d\-]/i),"meta";if(x.test(n)&&e.match(g))return f(e),"atom";e.eatWhile(/[_\w\d]/);var a=e.current();return p.test(a)?"builtin":m.test(a)?"keyword":"variable"}function f(e){e.match(/(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/i)}function h(e){return function(t,n){for(var a=!1,r;(r=t.next())!=null;){if(r==e&&!a){n.tokenize=d;break}a=!a&&r=="\\"}return"string"}}function o(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function i(e){e.indent=e.context.indent,e.context=e.context.prev}const v={name:"sparql",startState:function(){return{tokenize:d,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&t.context.align==null&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if(n!="comment"&&t.context&&t.context.align==null&&t.context.type!="pattern"&&(t.context.align=!0),u=="(")o(t,")",e.column());else if(u=="[")o(t,"]",e.column());else if(u=="{")o(t,"}",e.column());else if(/[\]\}\)]/.test(u)){for(;t.context&&t.context.type=="pattern";)i(t);t.context&&u==t.context.type&&(i(t),u=="}"&&t.context&&t.context.type=="pattern"&&i(t))}else u=="."&&t.context&&t.context.type=="pattern"?i(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?o(t,"pattern",e.column()):t.context.type=="pattern"&&!t.context.align&&(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t,n){var a=t&&t.charAt(0),r=e.context;if(/[\]\}]/.test(a))for(;r&&r.type=="pattern";)r=r.prev;var c=r&&a==r.type;return r?r.type=="pattern"?r.col:r.align?r.col+(c?0:1):r.indent+(c?0:n.unit):0},languageData:{commentTokens:{line:"#"}}};export{v as t};
import{n as I}from"./assertNever-CBU83Y6o.js";import{a as J}from"./useLifecycle-D35CBukS.js";import{t as p}from"./createLucideIcon-CnW3RofX.js";import{t as R}from"./chart-no-axes-column-W42b2ZIs.js";import{r as Z,t as ee}from"./table-DZR6ewbN.js";import{t as te}from"./square-function-CqXXKtIq.js";var ae=p("align-center-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]]),ne=p("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),re=p("arrow-up-to-line",[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]),ie=p("baseline",[["path",{d:"M4 20h16",key:"14thso"}],["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),le=p("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]),P=p("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),oe=p("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]),se=p("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]),ce=p("chart-scatter",[["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}],["circle",{cx:"18.5",cy:"5.5",r:".5",fill:"currentColor",key:"lysivs"}],["circle",{cx:"11.5",cy:"11.5",r:".5",fill:"currentColor",key:"byv1b8"}],["circle",{cx:"7.5",cy:"16.5",r:".5",fill:"currentColor",key:"nkw3mc"}],["circle",{cx:"17.5",cy:"14.5",r:".5",fill:"currentColor",key:"1gjh6j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}]]),ue=p("ruler-dimension-line",[["path",{d:"M10 15v-3",key:"1pjskw"}],["path",{d:"M14 15v-3",key:"1o1mqj"}],["path",{d:"M18 15v-3",key:"cws6he"}],["path",{d:"M2 8V4",key:"3jv1jz"}],["path",{d:"M22 6H2",key:"1iqbfk"}],["path",{d:"M22 8V4",key:"16f4ou"}],["path",{d:"M6 15v-3",key:"1ij1qe"}],["rect",{x:"2",y:"12",width:"20",height:"8",rx:"2",key:"1tqiko"}]]),de=p("sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);function v(e){return e&&e.replaceAll(".","\\.").replaceAll("[","\\[").replaceAll("]","\\]").replaceAll(":","\\:")}const fe="__count__",Y="default",me="yearmonthdate",ye=6,ge="",pe={line:oe,bar:se,pie:Z,scatter:ce,heatmap:ee,area:le},U="mean",he={none:te,count:J,sum:de,mean:ie,median:ae,min:ne,max:re,distinct:J,valid:J,stdev:R,stdevp:R,variance:P,variancep:P,bin:ue},be={none:"No aggregation",count:"Count of records",sum:"Sum of values",mean:"Mean of values",median:"Median of values",min:"Minimum value",max:"Maximum value",distinct:"Count of distinct records",valid:"Count non-null records",stdev:"Standard deviation",stdevp:"Standard deviation of population",variance:"Variance",variancep:"Variance of population",bin:"Group values into bins"},ke=[Y,"accent","category10","category20","category20b","category20c","dark2","paired","pastel1","pastel2","set1","set2","set3","tableau10","tableau20","blues","greens","greys","oranges","purples","reds","bluegreen","bluepurple","goldgreen","goldorange","goldred","greenblue","orangered","purplebluegreen","purplered","redpurple","yellowgreenblue","yelloworangered","blueorange","brownbluegreen","purplegreen","pinkyellowgreen","purpleorange","redblue","redgrey","redyellowblue","redyellowgreen","spectral","rainbow","sinebow"],ve={number:"Continuous numerical scale",string:"Discrete categorical scale (inputs treated as strings)",temporal:"Continuous temporal scale"},xe={year:["Year","2025"],quarter:["Quarter","Q1 2025"],month:["Month","Jan 2025"],week:["Week","Jan 01, 2025"],day:["Day","Jan 01, 2025"],hours:["Hour","Jan 01, 2025 12:00"],minutes:["Minute","Jan 01, 2025 12:34"],seconds:["Second","Jan 01, 2025 12:34:56"],milliseconds:["Millisecond","Jan 01, 2025 12:34:56.789"],date:["Date","Jan 01, 2025"],dayofyear:["Day of Year","Day 1 of 2025"],yearmonth:["Year Month","Jan 2025"],yearmonthdate:["Year Month Date","Jan 01, 2025"],monthdate:["Month Date","Jan 01"]},Me=["number","string","temporal"],O=["year","quarter","month","date","week","day","dayofyear","hours","minutes","seconds","milliseconds"],X=["yearmonth","yearmonthdate","monthdate"],L=[...O,...X];[...L];const we=["ascending","descending"],q="none",Ce="bin",Ae=[q,"bin","count","sum","mean","median","min","max","distinct","valid","stdev","stdevp","variance","variancep"],N=[q,"count","distinct","valid"],y={LINE:"line",BAR:"bar",PIE:"pie",SCATTER:"scatter",HEATMAP:"heatmap",AREA:"area"},Ee=Object.values(y),Te=["X","Y","Color",q];function B(e){switch(e){case"number":case"integer":return"quantitative";case"string":case"boolean":case"unknown":return"nominal";case"date":case"datetime":case"time":case"temporal":return"temporal";default:return I(e),"nominal"}}function _e(e){switch(e){case"number":case"integer":return"number";case"string":case"boolean":case"unknown":return"string";case"date":case"datetime":case"time":return"temporal";default:return I(e),"string"}}function Q(e){switch(e){case y.PIE:return"arc";case y.SCATTER:return"point";case y.HEATMAP:return"rect";default:return e}}function j(e,t,a,i){if(e===y.HEATMAP)return a!=null&&a.maxbins?{maxbins:a==null?void 0:a.maxbins}:void 0;if(t!=="number")return;if(!(a!=null&&a.binned))return i;let n={};return a.step!==void 0&&(n.step=a.step),a.maxbins!==void 0&&(n.maxbins=a.maxbins),Object.keys(n).length===0?!0:n}function G(e){var i,n;let t=(i=e.color)==null?void 0:i.range;if(t!=null&&t.length)return{range:t};let a=(n=e.color)==null?void 0:n.scheme;if(a&&a!=="default")return{scheme:a}}function De(e,t){var o,c,u,f,h,s,g,k,b;if(e===y.PIE)return;let a;if(m((c=(o=t.general)==null?void 0:o.colorByColumn)==null?void 0:c.field))a=(u=t.general)==null?void 0:u.colorByColumn;else if(m((f=t.color)==null?void 0:f.field))switch((h=t.color)==null?void 0:h.field){case"X":a=(s=t.general)==null?void 0:s.xColumn;break;case"Y":a=(g=t.general)==null?void 0:g.yColumn;break;case"Color":a=(k=t.general)==null?void 0:k.colorByColumn;break;default:return}else return;if(!a||!m(a.field)||a.field==="none")return;if(a.field==="__count__")return{aggregate:"count",type:"quantitative"};let i=(b=t.color)==null?void 0:b.bin,n=a.selectedDataType||"string",r=a==null?void 0:a.aggregate;return{field:v(a.field),type:B(n),scale:G(t),aggregate:W(r,n),bin:j(e,n,i)}}function Ve(e,t){var a,i,n,r,o;if(!((a=t.general)!=null&&a.stacking||!m((n=(i=t.general)==null?void 0:i.colorByColumn)==null?void 0:n.field)||e!==y.BAR))return{field:v((o=(r=t.general)==null?void 0:r.colorByColumn)==null?void 0:o.field)}}function W(e,t,a){if(t!=="temporal"&&!(e==="none"||e==="bin"))return e?t==="string"?N.includes(e)?e:void 0:e:a||void 0}function qe(e){switch(e){case"integer":return",.0f";case"number":return",.2f";default:return}}function $(e){var u,f,h,s,g,k,b,M,w,C,_,D,V,A,E,T;let{formValues:t,xEncoding:a,yEncoding:i,colorByEncoding:n}=e;if(!t.tooltips)return;function r(l,x,d){if("aggregate"in l&&l.aggregate==="count"&&!m(l.field))return{aggregate:"count"};if(l&&"field"in l&&m(l.field))return l.timeUnit&&!d&&(d=l.field),{field:l.field,aggregate:l.aggregate,timeUnit:l.timeUnit,format:qe(x),title:d,bin:l.bin}}if(t.tooltips.auto){let l=[],x=r(a,((f=(u=t.general)==null?void 0:u.xColumn)==null?void 0:f.type)||"string",(h=t.xAxis)==null?void 0:h.label);x&&l.push(x);let d=r(i,((g=(s=t.general)==null?void 0:s.yColumn)==null?void 0:g.type)||"string",(k=t.yAxis)==null?void 0:k.label);d&&l.push(d);let z=r(n||{},((M=(b=t.general)==null?void 0:b.colorByColumn)==null?void 0:M.type)||"string");return z&&l.push(z),l}let o=t.tooltips.fields??[],c=[];for(let l of o){if("field"in a&&m(a.field)&&a.field===l.field){let d=r(a,((C=(w=t.general)==null?void 0:w.xColumn)==null?void 0:C.type)||"string",(_=t.xAxis)==null?void 0:_.label);d&&c.push(d);continue}if("field"in i&&m(i.field)&&i.field===l.field){let d=r(i,((V=(D=t.general)==null?void 0:D.yColumn)==null?void 0:V.type)||"string",(A=t.yAxis)==null?void 0:A.label);d&&c.push(d);continue}if(n&&"field"in n&&m(n.field)&&n.field===l.field){let d=r(n,((T=(E=t.general)==null?void 0:E.colorByColumn)==null?void 0:T.type)||"string");d&&c.push(d);continue}let x={field:v(l.field)};c.push(x)}return c}function Be(e,t,a,i,n){var A,E,T,l;let{xColumn:r,yColumn:o,colorByColumn:c,horizontal:u,stacking:f,title:h,facet:s}=t.general??{};if(e===y.PIE)return He(t,a,i,n);if(!m(r==null?void 0:r.field))return"X-axis column is required";if(!m(o==null?void 0:o.field))return"Y-axis column is required";let g=S(r,(A=t.xAxis)==null?void 0:A.bin,H((E=t.xAxis)==null?void 0:E.label),c!=null&&c.field&&u?f:void 0,e),k=U;(o==null?void 0:o.selectedDataType)==="string"&&(k="count");let b=S(o,(T=t.yAxis)==null?void 0:T.bin,H((l=t.yAxis)==null?void 0:l.label),c!=null&&c.field&&!u?f:void 0,e,k),M=s!=null&&s.row.field?F(s.row,e):void 0,w=s!=null&&s.column.field?F(s.column,e):void 0,C=De(e,t),_=K(e,t,a,i,n,h),D={x:u?b:g,y:u?g:b,xOffset:Ve(e,t),color:C,tooltip:$({formValues:t,xEncoding:g,yEncoding:b,colorByEncoding:C}),...M&&{row:M},...w&&{column:w}},V=Se(s==null?void 0:s.column,s==null?void 0:s.row);return{..._,mark:{type:Q(e)},encoding:D,...V}}function je(e,t){return{...e,data:{values:t}}}function S(e,t,a,i,n,r){let o=e.selectedDataType||"string";return e.field==="__count__"?{aggregate:"count",type:"quantitative",bin:j(n,o,t),title:a==="__count__"?void 0:a,stack:i}:{field:v(e.field),type:B(e.selectedDataType||"unknown"),bin:j(n,o,t),title:a,stack:i,aggregate:W(e.aggregate,o,r),sort:e.sort,timeUnit:Je(e)}}function F(e,t){let a=j(t,e.selectedDataType||"string",{maxbins:e.maxbins,binned:e.binned},{maxbins:6});return{field:v(e.field),sort:e.sort,timeUnit:Pe(e),type:B(e.selectedDataType||"unknown"),bin:a}}function He(e,t,a,i){var f,h,s,g;let{yColumn:n,colorByColumn:r,title:o}=e.general??{};if(!m(r==null?void 0:r.field))return"Color by column is required";if(!m(n==null?void 0:n.field))return"Size by column is required";let c=S(n,(f=e.xAxis)==null?void 0:f.bin,H((h=e.xAxis)==null?void 0:h.label),void 0,y.PIE),u={field:v(r.field),type:B(r.selectedDataType||"unknown"),scale:G(e),title:H((s=e.yAxis)==null?void 0:s.label)};return{...K(y.PIE,e,t,a,i,o),mark:{type:Q(y.PIE),innerRadius:(g=e.style)==null?void 0:g.innerRadius},encoding:{theta:c,color:u,tooltip:$({formValues:e,xEncoding:c,yEncoding:c,colorByEncoding:u})}}}function K(e,t,a,i,n,r){var c,u,f;let o=((c=t.style)==null?void 0:c.gridLines)??!1;return e===y.SCATTER&&(o=!0),{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"dark":"white",title:r,data:{values:[]},height:((u=t.yAxis)==null?void 0:u.height)??n,width:((f=t.xAxis)==null?void 0:f.width)??i,config:{axis:{grid:o}}}}function m(e){return e!==void 0&&e.trim()!==""}function H(e){let t=e==null?void 0:e.trim();return t===""?void 0:t}function Je(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Pe(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Se(e,t){let a={};return(e==null?void 0:e.linkXAxis)===!1&&(a.x="independent"),(t==null?void 0:t.linkYAxis)===!1&&(a.y="independent"),Object.keys(a).length>0?{resolve:{axis:a}}:void 0}export{P as A,Y as C,ve as D,ge as E,xe as O,U as S,me as T,be as _,Ae as a,ke as b,Te as c,q as d,Me as f,L as g,N as h,_e as i,v as k,X as l,we as m,Be as n,Ce as o,O as p,m as r,Ee as s,je as t,y as u,he as v,ye as w,fe as x,pe as y};
import{s as n}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-BGmjiNul.js";import{t as x}from"./compiler-runtime-DeeZ7FnK.js";import{t as N}from"./jsx-runtime-ZmTK25f3.js";import{n as g,t as k}from"./cn-BKtXLv3a.js";import{t as v}from"./createLucideIcon-CnW3RofX.js";var d=v("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),y=x(),j=n(h(),1),w=n(N(),1),M=g("animate-spin",{variants:{centered:{true:"m-auto"},size:{small:"size-4",medium:"size-12",large:"size-20",xlarge:"size-20"}},defaultVariants:{size:"medium"}}),f=j.forwardRef((l,o)=>{let e=(0,y.c)(13),r,a,s,t;if(e[0]!==l){let{className:p,children:R,centered:c,size:z,...u}=l;a=p,r=c,t=z,s=u,e[0]=l,e[1]=r,e[2]=a,e[3]=s,e[4]=t}else r=e[1],a=e[2],s=e[3],t=e[4];let i;e[5]!==r||e[6]!==a||e[7]!==t?(i=k(M({centered:r,size:t}),a),e[5]=r,e[6]=a,e[7]=t,e[8]=i):i=e[8];let m;return e[9]!==s||e[10]!==o||e[11]!==i?(m=(0,w.jsx)(d,{ref:o,className:i,strokeWidth:1.5,...s}),e[9]=s,e[10]=o,e[11]=i,e[12]=m):m=e[12],m});f.displayName="Spinner";export{d as n,f as t};
const e={name:"spreadsheet",startState:function(){return{stringType:null,stack:[]}},token:function(t,a){if(t){switch(a.stack.length===0&&(t.peek()=='"'||t.peek()=="'")&&(a.stringType=t.peek(),t.next(),a.stack.unshift("string")),a.stack[0]){case"string":for(;a.stack[0]==="string"&&!t.eol();)t.peek()===a.stringType?(t.next(),a.stack.shift()):t.peek()==="\\"?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return"string";case"characterClass":for(;a.stack[0]==="characterClass"&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(/^\\./)||a.stack.shift();return"operator"}var s=t.peek();switch(s){case"[":return t.next(),a.stack.unshift("characterClass"),"bracket";case":":return t.next(),"operator";case"\\":return t.match(/\\[a-z]+/)?"string.special":(t.next(),"atom");case".":case",":case";":case"*":case"-":case"+":case"^":case"<":case"/":case"=":return t.next(),"atom";case"$":return t.next(),"builtin"}return t.match(/\d+/)?t.match(/^\w+/)?"error":"number":t.match(/^[a-zA-Z_]\w*/)?t.match(/(?=[\(.])/,!1)?"keyword":"variable":["[","]","(",")","{","}"].indexOf(s)==-1?(t.eatSpace()||t.next(),null):(t.next(),"bracket")}}};export{e as spreadsheet};
function o(a){var c=a.client||{},g=a.atoms||{false:!0,true:!0,null:!0},p=a.builtin||e(z),C=a.keywords||e(d),_=a.operatorChars||/^[*+\-%<>!=&|~^\/]/,s=a.support||{},y=a.hooks||{},S=a.dateSQL||{date:!0,time:!0,timestamp:!0},Q=a.backslashStringEscapes!==!1,N=a.brackets||/^[\{}\(\)\[\]]/,v=a.punctuation||/^[;.,:]/;function h(t,i){var r=t.next();if(y[r]){var n=y[r](t,i);if(n!==!1)return n}if(s.hexNumber&&(r=="0"&&t.match(/^[xX][0-9a-fA-F]+/)||(r=="x"||r=="X")&&t.match(/^'[0-9a-fA-F]*'/))||s.binaryNumber&&((r=="b"||r=="B")&&t.match(/^'[01]+'/)||r=="0"&&t.match(/^b[01]*/)))return"number";if(r.charCodeAt(0)>47&&r.charCodeAt(0)<58)return t.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),s.decimallessFloat&&t.match(/^\.(?!\.)/),"number";if(r=="?"&&(t.eatSpace()||t.eol()||t.eat(";")))return"macroName";if(r=="'"||r=='"'&&s.doubleQuote)return i.tokenize=x(r),i.tokenize(t,i);if((s.nCharCast&&(r=="n"||r=="N")||s.charsetCast&&r=="_"&&t.match(/[a-z][a-z0-9]*/i))&&(t.peek()=="'"||t.peek()=='"'))return"keyword";if(s.escapeConstant&&(r=="e"||r=="E")&&(t.peek()=="'"||t.peek()=='"'&&s.doubleQuote))return i.tokenize=function(m,k){return(k.tokenize=x(m.next(),!0))(m,k)},"keyword";if(s.commentSlashSlash&&r=="/"&&t.eat("/")||s.commentHash&&r=="#"||r=="-"&&t.eat("-")&&(!s.commentSpaceRequired||t.eat(" ")))return t.skipToEnd(),"comment";if(r=="/"&&t.eat("*"))return i.tokenize=b(1),i.tokenize(t,i);if(r=="."){if(s.zerolessFloat&&t.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(t.match(/^\.+/))return null;if(s.ODBCdotTable&&t.match(/^[\w\d_$#]+/))return"type"}else{if(_.test(r))return t.eatWhile(_),"operator";if(N.test(r))return"bracket";if(v.test(r))return t.eatWhile(v),"punctuation";if(r=="{"&&(t.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||t.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";t.eatWhile(/^[_\w\d]/);var l=t.current().toLowerCase();return S.hasOwnProperty(l)&&(t.match(/^( )+'[^']*'/)||t.match(/^( )+"[^"]*"/))?"number":g.hasOwnProperty(l)?"atom":p.hasOwnProperty(l)?"type":C.hasOwnProperty(l)?"keyword":c.hasOwnProperty(l)?"builtin":null}}function x(t,i){return function(r,n){for(var l=!1,m;(m=r.next())!=null;){if(m==t&&!l){n.tokenize=h;break}l=(Q||i)&&!l&&m=="\\"}return"string"}}function b(t){return function(i,r){var n=i.match(/^.*?(\/\*|\*\/)/);return n?n[1]=="/*"?r.tokenize=b(t+1):t>1?r.tokenize=b(t-1):r.tokenize=h:i.skipToEnd(),"comment"}}function w(t,i,r){i.context={prev:i.context,indent:t.indentation(),col:t.column(),type:r}}function j(t){t.indent=t.context.indent,t.context=t.context.prev}return{name:"sql",startState:function(){return{tokenize:h,context:null}},token:function(t,i){if(t.sol()&&i.context&&i.context.align==null&&(i.context.align=!1),i.tokenize==h&&t.eatSpace())return null;var r=i.tokenize(t,i);if(r=="comment")return r;i.context&&i.context.align==null&&(i.context.align=!0);var n=t.current();return n=="("?w(t,i,")"):n=="["?w(t,i,"]"):i.context&&i.context.type==n&&j(i),r},indent:function(t,i,r){var n=t.context;if(!n)return null;var l=i.charAt(0)==n.type;return n.align?n.col+(l?0:1):n.indent+(l?0:r.unit)},languageData:{commentTokens:{line:s.commentSlashSlash?"//":s.commentHash?"#":"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}}}function f(a){for(var c;(c=a.next())!=null;)if(c=="`"&&!a.eat("`"))return"string.special";return a.backUp(a.current().length-1),a.eatWhile(/\w/)?"string.special":null}function L(a){for(var c;(c=a.next())!=null;)if(c=='"'&&!a.eat('"'))return"string.special";return a.backUp(a.current().length-1),a.eatWhile(/\w/)?"string.special":null}function u(a){return a.eat("@")&&(a.match("session."),a.match("local."),a.match("global.")),a.eat("'")?(a.match(/^.*'/),"string.special"):a.eat('"')?(a.match(/^.*"/),"string.special"):a.eat("`")?(a.match(/^.*`/),"string.special"):a.match(/^[0-9a-zA-Z$\.\_]+/)?"string.special":null}function q(a){return a.eat("N")?"atom":a.match(/^[a-zA-Z.#!?]/)?"string.special":null}var d="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function e(a){for(var c={},g=a.split(" "),p=0;p<g.length;++p)c[g[p]]=!0;return c}var z="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";const F=o({keywords:e(d+"begin"),builtin:e(z),atoms:e("false true null unknown"),dateSQL:e("date time timestamp"),support:e("ODBCdotTable doubleQuote binaryNumber hexNumber")}),T=o({client:e("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:e(d+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:e("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:e("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:e("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":u}}),O=o({client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(d+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":u,"`":f,"\\":q}}),D=o({client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(d+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":u,"`":f,"\\":q}}),B=o({client:e("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:e(d+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:e("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:e("date time timestamp datetime"),support:e("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":u,":":u,"?":u,$:u,'"':L,"`":f}}),$=o({client:{},keywords:e("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:e("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:e("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:e("commentSlashSlash decimallessFloat"),hooks:{}}),A=o({client:e("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:e("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:e("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:e("date time timestamp"),support:e("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),E=o({keywords:e("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:e("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:e("date timestamp"),support:e("ODBCdotTable doubleQuote binaryNumber hexNumber")}),P=o({client:e("source"),keywords:e(d+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:e("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:e("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),W=o({keywords:e("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:e("false true"),builtin:e("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),H=o({client:e("source"),keywords:e("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:e("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),R=o({keywords:e("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:e("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:e("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable doubleQuote zerolessFloat")}),U=o({client:e("source"),keywords:e("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:e("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:e("time"),support:e("decimallessFloat zerolessFloat binaryNumber hexNumber")});export{$ as cassandra,U as esper,H as gpSQL,W as gql,E as hive,D as mariaDB,T as msSQL,O as mySQL,P as pgSQL,A as plSQL,R as sparkSQL,o as sql,B as sqlite,F as standardSQL};
import{t}from"./createLucideIcon-CnW3RofX.js";var r=t("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);export{r as t};
import{t}from"./createLucideIcon-CnW3RofX.js";var e=t("square-function",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]]);export{e as t};
import{s as rt,t as st}from"./chunk-LvLJmgfZ.js";var Q=st(((c,h)=>{(function(w,_){typeof c=="object"&&h!==void 0?h.exports=_():typeof define=="function"&&define.amd?define(_):(w=typeof globalThis<"u"?globalThis:w||self).dayjs=_()})(c,(function(){var w=1e3,_=6e4,z=36e5,I="millisecond",k="second",L="minute",Y="hour",D="day",N="week",v="month",V="quarter",S="year",C="date",G="Invalid Date",X=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,tt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,et={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},U=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},nt={s:U,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+U(r,2,"0")+":"+U(e,2,"0")},m:function s(n,t){if(n.date()<t.date())return-s(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,v),i=t-e<0,o=n.clone().add(r+(i?-1:1),v);return+(-(r+(t-e)/(i?e-o:o-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:v,y:S,w:N,d:D,D:C,h:Y,m:L,s:k,ms:I,Q:V}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},W="en",T={};T[W]=et;var P="$isDayjsObject",J=function(s){return s instanceof E||!(!s||!s[P])},j=function s(n,t,r){var e;if(!n)return W;if(typeof n=="string"){var i=n.toLowerCase();T[i]&&(e=i),t&&(T[i]=t,e=i);var o=n.split("-");if(!e&&o.length>1)return s(o[0])}else{var u=n.name;T[u]=n,e=u}return!r&&e&&(W=e),e||!r&&W},l=function(s,n){if(J(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new E(t)},a=nt;a.l=j,a.i=J,a.w=function(s,n){return l(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var E=(function(){function s(t){this.$L=j(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[P]=!0}var n=s.prototype;return n.parse=function(t){this.$d=(function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var o=e.match(X);if(o){var u=o[2]-1||0,f=(o[7]||"0").substring(0,3);return i?new Date(Date.UTC(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,f)):new Date(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,f)}}return new Date(e)})(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==G},n.isSame=function(t,r){var e=l(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return l(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<l(t)},n.$g=function(t,r,e){return a.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,i=!!a.u(r)||r,o=a.p(t),u=function(A,g){var O=a.w(e.$u?Date.UTC(e.$y,g,A):new Date(e.$y,g,A),e);return i?O:O.endOf(D)},f=function(A,g){return a.w(e.toDate()[A].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(g)),e)},d=this.$W,$=this.$M,b=this.$D,H="set"+(this.$u?"UTC":"");switch(o){case S:return i?u(1,0):u(31,11);case v:return i?u(1,$):u(0,$+1);case N:var x=this.$locale().weekStart||0,R=(d<x?d+7:d)-x;return u(i?b-R:b+(6-R),$);case D:case C:return f(H+"Hours",0);case Y:return f(H+"Minutes",1);case L:return f(H+"Seconds",2);case k:return f(H+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,i=a.p(t),o="set"+(this.$u?"UTC":""),u=(e={},e[D]=o+"Date",e[C]=o+"Date",e[v]=o+"Month",e[S]=o+"FullYear",e[Y]=o+"Hours",e[L]=o+"Minutes",e[k]=o+"Seconds",e[I]=o+"Milliseconds",e)[i],f=i===D?this.$D+(r-this.$W):r;if(i===v||i===S){var d=this.clone().set(C,1);d.$d[u](f),d.init(),this.$d=d.set(C,Math.min(this.$D,d.daysInMonth())).$d}else u&&this.$d[u](f);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[a.p(t)]()},n.add=function(t,r){var e,i=this;t=Number(t);var o=a.p(r),u=function($){var b=l(i);return a.w(b.date(b.date()+Math.round($*t)),i)};if(o===v)return this.set(v,this.$M+t);if(o===S)return this.set(S,this.$y+t);if(o===D)return u(1);if(o===N)return u(7);var f=(e={},e[L]=_,e[Y]=z,e[k]=w,e)[o]||1,d=this.$d.getTime()+t*f;return a.w(d,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||G;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=a.z(this),u=this.$H,f=this.$m,d=this.$M,$=e.weekdays,b=e.months,H=e.meridiem,x=function(g,O,B,F){return g&&(g[O]||g(r,i))||B[O].slice(0,F)},R=function(g){return a.s(u%12||12,g,"0")},A=H||function(g,O,B){var F=g<12?"AM":"PM";return B?F.toLowerCase():F};return i.replace(tt,(function(g,O){return O||(function(B){switch(B){case"YY":return String(r.$y).slice(-2);case"YYYY":return a.s(r.$y,4,"0");case"M":return d+1;case"MM":return a.s(d+1,2,"0");case"MMM":return x(e.monthsShort,d,b,3);case"MMMM":return x(b,d);case"D":return r.$D;case"DD":return a.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return x(e.weekdaysMin,r.$W,$,2);case"ddd":return x(e.weekdaysShort,r.$W,$,3);case"dddd":return $[r.$W];case"H":return String(u);case"HH":return a.s(u,2,"0");case"h":return R(1);case"hh":return R(2);case"a":return A(u,f,!0);case"A":return A(u,f,!1);case"m":return String(f);case"mm":return a.s(f,2,"0");case"s":return String(r.$s);case"ss":return a.s(r.$s,2,"0");case"SSS":return a.s(r.$ms,3,"0");case"Z":return o}return null})(g)||o.replace(":","")}))},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var i,o=this,u=a.p(r),f=l(t),d=(f.utcOffset()-this.utcOffset())*_,$=this-f,b=function(){return a.m(o,f)};switch(u){case S:i=b()/12;break;case v:i=b();break;case V:i=b()/3;break;case N:i=($-d)/6048e5;break;case D:i=($-d)/864e5;break;case Y:i=$/z;break;case L:i=$/_;break;case k:i=$/w;break;default:i=$}return e?i:a.a(i)},n.daysInMonth=function(){return this.endOf(v).$D},n.$locale=function(){return T[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),i=j(t,r,!0);return i&&(e.$L=i),e},n.clone=function(){return a.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},s})(),q=E.prototype;return l.prototype=q,[["$ms",I],["$s",k],["$m",L],["$H",Y],["$W",D],["$M",v],["$y",S],["$D",C]].forEach((function(s){q[s[1]]=function(n){return this.$g(n,s[0],s[1])}})),l.extend=function(s,n){return s.$i||(s.$i=(s(n,E,l),!0)),l},l.locale=j,l.isDayjs=J,l.unix=function(s){return l(1e3*s)},l.en=T[W],l.Ls=T,l.p={},l}))})),it=rt(Q(),1),K=Object.defineProperty,p=(c,h)=>K(c,"name",{value:h,configurable:!0}),ot=(c,h)=>{for(var w in h)K(c,w,{get:h[w],enumerable:!0})},M={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},m={trace:p((...c)=>{},"trace"),debug:p((...c)=>{},"debug"),info:p((...c)=>{},"info"),warn:p((...c)=>{},"warn"),error:p((...c)=>{},"error"),fatal:p((...c)=>{},"fatal")},at=p(function(c="fatal"){let h=M.fatal;typeof c=="string"?c.toLowerCase()in M&&(h=M[c]):typeof c=="number"&&(h=c),m.trace=()=>{},m.debug=()=>{},m.info=()=>{},m.warn=()=>{},m.error=()=>{},m.fatal=()=>{},h<=M.fatal&&(m.fatal=console.error?console.error.bind(console,y("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",y("FATAL"))),h<=M.error&&(m.error=console.error?console.error.bind(console,y("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",y("ERROR"))),h<=M.warn&&(m.warn=console.warn?console.warn.bind(console,y("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",y("WARN"))),h<=M.info&&(m.info=console.info?console.info.bind(console,y("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",y("INFO"))),h<=M.debug&&(m.debug=console.debug?console.debug.bind(console,y("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",y("DEBUG"))),h<=M.trace&&(m.trace=console.debug?console.debug.bind(console,y("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",y("TRACE")))},"setLogLevel"),y=p(c=>`%c${(0,it.default)().format("ss.SSS")} : ${c} : `,"format"),{abs:ct,max:ft,min:lt}=Math;["w","e"].map(Z),["n","s"].map(Z),["n","w","e","s","nw","ne","sw","se"].map(Z);function Z(c){return{type:c}}export{Q as a,at as i,p as n,m as r,ot as t};
import{_ as ht,b as lt,c as It,f as Ot,l as Ut,m as ft,n as Rt,p as jt,r as Gt,s as Ht,t as Kt}from"./timer-ffBO1paY.js";var pt={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function W(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),pt.hasOwnProperty(n)?{space:pt[n],local:t}:t}function Wt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e==="http://www.w3.org/1999/xhtml"&&n.documentElement.namespaceURI==="http://www.w3.org/1999/xhtml"?n.createElement(t):n.createElementNS(e,t)}}function $t(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function mt(t){var n=W(t);return(n.local?$t:Wt)(n)}function Ft(){}function rt(t){return t==null?Ft:function(){return this.querySelector(t)}}function Jt(t){typeof t!="function"&&(t=rt(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=Array(u),c,l,f=0;f<u;++f)(c=o[f])&&(l=t.call(c,c.__data__,f,o))&&("__data__"in c&&(l.__data__=c.__data__),a[f]=l);return new S(r,this._parents)}function Qt(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Zt(){return[]}function vt(t){return t==null?Zt:function(){return this.querySelectorAll(t)}}function tn(t){return function(){return Qt(t.apply(this,arguments))}}function nn(t){t=typeof t=="function"?tn(t):vt(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u=n[o],a=u.length,c,l=0;l<a;++l)(c=u[l])&&(r.push(t.call(c,c.__data__,l,u)),i.push(c));return new S(r,i)}function _t(t){return function(){return this.matches(t)}}function gt(t){return function(n){return n.matches(t)}}var en=Array.prototype.find;function rn(t){return function(){return en.call(this.children,t)}}function on(){return this.firstElementChild}function un(t){return this.select(t==null?on:rn(typeof t=="function"?t:gt(t)))}var sn=Array.prototype.filter;function an(){return Array.from(this.children)}function cn(t){return function(){return sn.call(this.children,t)}}function hn(t){return this.selectAll(t==null?an:cn(typeof t=="function"?t:gt(t)))}function ln(t){typeof t!="function"&&(t=_t(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=[],c,l=0;l<u;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&a.push(c);return new S(r,this._parents)}function dt(t){return Array(t.length)}function fn(){return new S(this._enter||this._groups.map(dt),this._parents)}function $(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}$.prototype={constructor:$,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function pn(t){return function(){return t}}function mn(t,n,e,r,i,o){for(var u=0,a,c=n.length,l=o.length;u<l;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new $(t,o[u]);for(;u<c;++u)(a=n[u])&&(i[u]=a)}function vn(t,n,e,r,i,o,u){var a,c,l=new Map,f=n.length,x=o.length,d=Array(f),_;for(a=0;a<f;++a)(c=n[a])&&(d[a]=_=u.call(c,c.__data__,a,n)+"",l.has(_)?i[a]=c:l.set(_,c));for(a=0;a<x;++a)_=u.call(t,o[a],a,o)+"",(c=l.get(_))?(r[a]=c,c.__data__=o[a],l.delete(_)):e[a]=new $(t,o[a]);for(a=0;a<f;++a)(c=n[a])&&l.get(d[a])===c&&(i[a]=c)}function _n(t){return t.__data__}function gn(t,n){if(!arguments.length)return Array.from(this,_n);var e=n?vn:mn,r=this._parents,i=this._groups;typeof t!="function"&&(t=pn(t));for(var o=i.length,u=Array(o),a=Array(o),c=Array(o),l=0;l<o;++l){var f=r[l],x=i[l],d=x.length,_=dn(t.call(f,f&&f.__data__,l,r)),E=_.length,k=a[l]=Array(E),I=u[l]=Array(E);e(f,x,k,I,c[l]=Array(d),_,n);for(var v=0,B=0,O,j;v<E;++v)if(O=k[v]){for(v>=B&&(B=v+1);!(j=I[B])&&++B<E;);O._next=j||null}}return u=new S(u,r),u._enter=a,u._exit=c,u}function dn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yn(){return new S(this._exit||this._groups.map(dt),this._parents)}function wn(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function xn(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,u=Math.min(i,o),a=Array(i),c=0;c<u;++c)for(var l=e[c],f=r[c],x=l.length,d=a[c]=Array(x),_,E=0;E<x;++E)(_=l[E]||f[E])&&(d[E]=_);for(;c<i;++c)a[c]=e[c];return new S(a,this._parents)}function An(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],u;--i>=0;)(u=r[i])&&(o&&u.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(u,o),o=u);return this}function bn(t){t||(t=zn);function n(x,d){return x&&d?t(x.__data__,d.__data__):!x-!d}for(var e=this._groups,r=e.length,i=Array(r),o=0;o<r;++o){for(var u=e[o],a=u.length,c=i[o]=Array(a),l,f=0;f<a;++f)(l=u[f])&&(c[f]=l);c.sort(n)}return new S(i,this._parents).order()}function zn(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function En(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Sn(){return Array.from(this)}function kn(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null}function Tn(){let t=0;for(let n of this)++t;return t}function Cn(){return!this.node()}function Mn(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,u=i.length,a;o<u;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function Nn(t){return function(){this.removeAttribute(t)}}function Pn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bn(t,n){return function(){this.setAttribute(t,n)}}function Vn(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Dn(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Xn(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Yn(t,n){var e=W(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Pn:Nn:typeof n=="function"?e.local?Xn:Dn:e.local?Vn:Bn)(e,n))}function yt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ln(t){return function(){this.style.removeProperty(t)}}function qn(t,n,e){return function(){this.style.setProperty(t,n,e)}}function In(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function On(t,n,e){return arguments.length>1?this.each((n==null?Ln:typeof n=="function"?In:qn)(t,n,e??"")):G(this.node(),t)}function G(t,n){return t.style.getPropertyValue(n)||yt(t).getComputedStyle(t,null).getPropertyValue(n)}function Un(t){return function(){delete this[t]}}function Rn(t,n){return function(){this[t]=n}}function jn(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function Gn(t,n){return arguments.length>1?this.each((n==null?Un:typeof n=="function"?jn:Rn)(t,n)):this.node()[t]}function wt(t){return t.trim().split(/^|\s+/)}function it(t){return t.classList||new xt(t)}function xt(t){this._node=t,this._names=wt(t.getAttribute("class")||"")}xt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function At(t,n){for(var e=it(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function bt(t,n){for(var e=it(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Hn(t){return function(){At(this,t)}}function Kn(t){return function(){bt(this,t)}}function Wn(t,n){return function(){(n.apply(this,arguments)?At:bt)(this,t)}}function $n(t,n){var e=wt(t+"");if(arguments.length<2){for(var r=it(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?Wn:n?Hn:Kn)(e,n))}function Fn(){this.textContent=""}function Jn(t){return function(){this.textContent=t}}function Qn(t){return function(){this.textContent=t.apply(this,arguments)??""}}function Zn(t){return arguments.length?this.each(t==null?Fn:(typeof t=="function"?Qn:Jn)(t)):this.node().textContent}function te(){this.innerHTML=""}function ne(t){return function(){this.innerHTML=t}}function ee(t){return function(){this.innerHTML=t.apply(this,arguments)??""}}function re(t){return arguments.length?this.each(t==null?te:(typeof t=="function"?ee:ne)(t)):this.node().innerHTML}function ie(){this.nextSibling&&this.parentNode.appendChild(this)}function oe(){return this.each(ie)}function ue(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function se(){return this.each(ue)}function ae(t){var n=typeof t=="function"?t:mt(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ce(){return null}function he(t,n){var e=typeof t=="function"?t:mt(t),r=n==null?ce:typeof n=="function"?n:rt(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function le(){var t=this.parentNode;t&&t.removeChild(this)}function fe(){return this.each(le)}function pe(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function me(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ve(t){return this.select(t?me:pe)}function _e(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ge(t){return function(n){t.call(this,n,this.__data__)}}function de(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function ye(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function we(t,n,e){return function(){var r=this.__on,i,o=ge(n);if(r){for(var u=0,a=r.length;u<a;++u)if((i=r[u]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function xe(t,n,e){var r=de(t+""),i,o=r.length,u;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,f;c<l;++c)for(i=0,f=a[c];i<o;++i)if((u=r[i]).type===f.type&&u.name===f.name)return f.value}return}for(a=n?we:ye,i=0;i<o;++i)this.each(a(r[i],n,e));return this}function zt(t,n,e){var r=yt(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Ae(t,n){return function(){return zt(this,t,n)}}function be(t,n){return function(){return zt(this,t,n.apply(this,arguments))}}function ze(t,n){return this.each((typeof n=="function"?be:Ae)(t,n))}function*Ee(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,u;i<o;++i)(u=r[i])&&(yield u)}var Et=[null];function S(t,n){this._groups=t,this._parents=n}function St(){return new S([[document.documentElement]],Et)}function Se(){return this}S.prototype=St.prototype={constructor:S,select:Jt,selectAll:nn,selectChild:un,selectChildren:hn,filter:ln,data:gn,enter:fn,exit:yn,join:wn,merge:xn,selection:Se,order:An,sort:bn,call:En,nodes:Sn,node:kn,size:Tn,empty:Cn,each:Mn,attr:Yn,style:On,property:Gn,classed:$n,text:Zn,html:re,raise:oe,lower:se,append:ae,insert:he,remove:fe,clone:ve,datum:_e,on:xe,dispatch:ze,[Symbol.iterator]:Ee};var H=St;function U(t){return typeof t=="string"?new S([[document.querySelector(t)]],[document.documentElement]):new S([[t]],Et)}function ke(t){let n;for(;n=t.sourceEvent;)t=n;return t}function R(t,n){if(t=ke(t),n===void 0&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}const Te={passive:!1},F={capture:!0,passive:!1};function Ce(t){t.stopImmediatePropagation()}function J(t){t.preventDefault(),t.stopImmediatePropagation()}function kt(t){var n=t.document.documentElement,e=U(t).on("dragstart.drag",J,F);"onselectstart"in n?e.on("selectstart.drag",J,F):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Tt(t,n){var e=t.document.documentElement,r=U(t).on("dragstart.drag",null);n&&(r.on("click.drag",J,F),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function Ct(t,n,e){var r=new Kt;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var Me=lt("start","end","cancel","interrupt"),Ne=[];function Q(t,n,e,r,i,o){var u=t.__transition;if(!u)t.__transition={};else if(e in u)return;Pe(t,e,{name:n,index:r,group:i,on:Me,tween:Ne,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function ot(t,n){var e=M(t,n);if(e.state>0)throw Error("too late; already scheduled");return e}function P(t,n){var e=M(t,n);if(e.state>3)throw Error("too late; already running");return e}function M(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw Error("transition not found");return e}function Pe(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=Gt(o,0,e.time);function o(l){e.state=1,e.timer.restart(u,e.delay,e.time),e.delay<=l&&u(l-e.delay)}function u(l){var f,x,d,_;if(e.state!==1)return c();for(f in r)if(_=r[f],_.name===e.name){if(_.state===3)return Ct(u);_.state===4?(_.state=6,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete r[f]):+f<n&&(_.state=6,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete r[f])}if(Ct(function(){e.state===3&&(e.state=4,e.timer.restart(a,e.delay,e.time),a(l))}),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),e.state===2){for(e.state=3,i=Array(d=e.tween.length),f=0,x=-1;f<d;++f)(_=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(i[++x]=_);i.length=x+1}}function a(l){for(var f=l<e.duration?e.ease.call(null,l/e.duration):(e.timer.restart(c),e.state=5,1),x=-1,d=i.length;++x<d;)i[x].call(t,f);e.state===5&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){for(var l in e.state=6,e.timer.stop(),delete r[n],r)return;delete t.__transition}}function Z(t,n){var e=t.__transition,r,i,o=!0,u;if(e){for(u in n=n==null?null:n+"",e){if((r=e[u]).name!==n){o=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[u]}o&&delete t.__transition}}function Be(t){return this.each(function(){Z(this,t)})}function Ve(t,n){var e,r;return function(){var i=P(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,a=r.length;u<a;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function De(t,n,e){var r,i;if(typeof e!="function")throw Error();return function(){var o=P(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},c=0,l=i.length;c<l;++c)if(i[c].name===n){i[c]=a;break}c===l&&i.push(a)}o.tween=i}}function Xe(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=M(this.node(),e).tween,i=0,o=r.length,u;i<o;++i)if((u=r[i]).name===t)return u.value;return null}return this.each((n==null?Ve:De)(e,t,n))}function ut(t,n,e){var r=t._id;return t.each(function(){var i=P(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return M(i,r).value[n]}}function Mt(t,n){var e;return(typeof n=="number"?jt:n instanceof ht?ft:(e=ht(n))?(n=e,ft):Ot)(t,n)}function Ye(t){return function(){this.removeAttribute(t)}}function Le(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qe(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttribute(t);return u===i?null:u===r?o:o=n(r=u,e)}}function Ie(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttributeNS(t.space,t.local);return u===i?null:u===r?o:o=n(r=u,e)}}function Oe(t,n,e){var r,i,o;return function(){var u,a=e(this),c;return a==null?void this.removeAttribute(t):(u=this.getAttribute(t),c=a+"",u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,a)))}}function Ue(t,n,e){var r,i,o;return function(){var u,a=e(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),c=a+"",u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,a)))}}function Re(t,n){var e=W(t),r=e==="transform"?Ut:Mt;return this.attrTween(t,typeof n=="function"?(e.local?Ue:Oe)(e,r,ut(this,"attr."+t,n)):n==null?(e.local?Le:Ye)(e):(e.local?Ie:qe)(e,r,n))}function je(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Ge(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function He(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&Ge(t,o)),e}return i._value=n,i}function Ke(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&je(t,o)),e}return i._value=n,i}function We(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw Error();var r=W(t);return this.tween(e,(r.local?He:Ke)(r,n))}function $e(t,n){return function(){ot(this,t).delay=+n.apply(this,arguments)}}function Fe(t,n){return n=+n,function(){ot(this,t).delay=n}}function Je(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?$e:Fe)(n,t)):M(this.node(),n).delay}function Qe(t,n){return function(){P(this,t).duration=+n.apply(this,arguments)}}function Ze(t,n){return n=+n,function(){P(this,t).duration=n}}function tr(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Qe:Ze)(n,t)):M(this.node(),n).duration}function nr(t,n){if(typeof n!="function")throw Error();return function(){P(this,t).ease=n}}function er(t){var n=this._id;return arguments.length?this.each(nr(n,t)):M(this.node(),n).ease}function rr(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw Error();P(this,t).ease=e}}function ir(t){if(typeof t!="function")throw Error();return this.each(rr(this._id,t))}function or(t){typeof t!="function"&&(t=_t(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,a=r[i]=[],c,l=0;l<u;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&a.push(c);return new Y(r,this._parents,this._name,this._id)}function ur(t){if(t._id!==this._id)throw Error();for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=Array(r),a=0;a<o;++a)for(var c=n[a],l=e[a],f=c.length,x=u[a]=Array(f),d,_=0;_<f;++_)(d=c[_]||l[_])&&(x[_]=d);for(;a<r;++a)u[a]=n[a];return new Y(u,this._parents,this._name,this._id)}function sr(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function ar(t,n,e){var r,i,o=sr(n)?ot:P;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function cr(t,n){var e=this._id;return arguments.length<2?M(this.node(),e).on.on(t):this.each(ar(e,t,n))}function hr(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function lr(){return this.on("end.remove",hr(this._id))}function fr(t){var n=this._name,e=this._id;typeof t!="function"&&(t=rt(t));for(var r=this._groups,i=r.length,o=Array(i),u=0;u<i;++u)for(var a=r[u],c=a.length,l=o[u]=Array(c),f,x,d=0;d<c;++d)(f=a[d])&&(x=t.call(f,f.__data__,d,a))&&("__data__"in f&&(x.__data__=f.__data__),l[d]=x,Q(l[d],n,e,d,l,M(f,e)));return new Y(o,this._parents,n,e)}function pr(t){var n=this._name,e=this._id;typeof t!="function"&&(t=vt(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var c=r[a],l=c.length,f,x=0;x<l;++x)if(f=c[x]){for(var d=t.call(f,f.__data__,x,c),_,E=M(f,e),k=0,I=d.length;k<I;++k)(_=d[k])&&Q(_,n,e,k,d,E);o.push(d),u.push(f)}return new Y(o,u,n,e)}var mr=H.prototype.constructor;function vr(){return new mr(this._groups,this._parents)}function _r(t,n){var e,r,i;return function(){var o=G(this,t),u=(this.style.removeProperty(t),G(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}function Nt(t){return function(){this.style.removeProperty(t)}}function gr(t,n,e){var r,i=e+"",o;return function(){var u=G(this,t);return u===i?null:u===r?o:o=n(r=u,e)}}function dr(t,n,e){var r,i,o;return function(){var u=G(this,t),a=e(this),c=a+"";return a??(c=a=(this.style.removeProperty(t),G(this,t))),u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,a))}}function yr(t,n){var e,r,i,o="style."+n,u="end."+o,a;return function(){var c=P(this,t),l=c.on,f=c.value[o]==null?a||(a=Nt(n)):void 0;(l!==e||i!==f)&&(r=(e=l).copy()).on(u,i=f),c.on=r}}function wr(t,n,e){var r=(t+="")=="transform"?It:Mt;return n==null?this.styleTween(t,_r(t,r)).on("end.style."+t,Nt(t)):typeof n=="function"?this.styleTween(t,dr(t,r,ut(this,"style."+t,n))).each(yr(this._id,t)):this.styleTween(t,gr(t,r,n),e).on("end.style."+t,null)}function xr(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Ar(t,n,e){var r,i;function o(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&xr(t,u,e)),r}return o._value=n,o}function br(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw Error();return this.tween(r,Ar(t,n,e??""))}function zr(t){return function(){this.textContent=t}}function Er(t){return function(){this.textContent=t(this)??""}}function Sr(t){return this.tween("text",typeof t=="function"?Er(ut(this,"text",t)):zr(t==null?"":t+""))}function kr(t){return function(n){this.textContent=t.call(this,n)}}function Tr(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&kr(i)),n}return r._value=t,r}function Cr(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw Error();return this.tween(n,Tr(t))}function Mr(){for(var t=this._name,n=this._id,e=Pt(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],a=u.length,c,l=0;l<a;++l)if(c=u[l]){var f=M(c,n);Q(c,t,e,l,u,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Y(r,this._parents,t,e)}function Nr(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,u){var a={value:u},c={value:function(){--i===0&&o()}};e.each(function(){var l=P(this,r),f=l.on;f!==t&&(n=(t=f).copy(),n._.cancel.push(a),n._.interrupt.push(a),n._.end.push(c)),l.on=n}),i===0&&o()})}var Pr=0;function Y(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Br(t){return H().transition(t)}function Pt(){return++Pr}var L=H.prototype;Y.prototype=Br.prototype={constructor:Y,select:fr,selectAll:pr,selectChild:L.selectChild,selectChildren:L.selectChildren,filter:or,merge:ur,selection:vr,transition:Mr,call:L.call,nodes:L.nodes,node:L.node,size:L.size,empty:L.empty,each:L.each,on:cr,attr:Re,attrTween:We,style:wr,styleTween:br,text:Sr,textTween:Cr,remove:lr,tween:Xe,delay:Je,duration:tr,ease:er,easeVarying:ir,end:Nr,[Symbol.iterator]:L[Symbol.iterator]};function Vr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Dr={time:null,delay:0,duration:250,ease:Vr};function Xr(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw Error(`transition ${n} not found`);return e}function Yr(t){var n,e;t instanceof Y?(n=t._id,t=t._name):(n=Pt(),(e=Dr).time=Rt(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],a=u.length,c,l=0;l<a;++l)(c=u[l])&&Q(c,t,n,l,u,e||Xr(c,n));return new Y(r,this._parents,t,n)}H.prototype.interrupt=Be,H.prototype.transition=Yr;var tt=t=>()=>t;function Lr(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function q(t,n,e){this.k=t,this.x=n,this.y=e}q.prototype={constructor:q,scale:function(t){return t===1?this:new q(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new q(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nt=new q(1,0,0);qr.prototype=q.prototype;function qr(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nt;return t.__zoom}function st(t){t.stopImmediatePropagation()}function K(t){t.preventDefault(),t.stopImmediatePropagation()}function Ir(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Or(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Bt(){return this.__zoom||nt}function Ur(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Rr(){return navigator.maxTouchPoints||"ontouchstart"in this}function jr(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],u=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}function Gr(){var t=Ir,n=Or,e=jr,r=Ur,i=Rr,o=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],a=250,c=Ht,l=lt("start","zoom","end"),f,x,d,_=500,E=150,k=0,I=10;function v(s){s.property("__zoom",Bt).on("wheel.zoom",Vt,{passive:!1}).on("mousedown.zoom",Dt).on("dblclick.zoom",Xt).filter(i).on("touchstart.zoom",Yt).on("touchmove.zoom",Lt).on("touchend.zoom touchcancel.zoom",qt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(s,p,h,m){var g=s.selection?s.selection():s;g.property("__zoom",Bt),s===g?g.interrupt().each(function(){V(this,arguments).event(m).start().zoom(null,typeof p=="function"?p.apply(this,arguments):p).end()}):at(s,p,h,m)},v.scaleBy=function(s,p,h,m){v.scaleTo(s,function(){return this.__zoom.k*(typeof p=="function"?p.apply(this,arguments):p)},h,m)},v.scaleTo=function(s,p,h,m){v.transform(s,function(){var g=n.apply(this,arguments),w=this.__zoom,y=h==null?j(g):typeof h=="function"?h.apply(this,arguments):h,A=w.invert(y),b=typeof p=="function"?p.apply(this,arguments):p;return e(O(B(w,b),y,A),g,u)},h,m)},v.translateBy=function(s,p,h,m){v.transform(s,function(){return e(this.__zoom.translate(typeof p=="function"?p.apply(this,arguments):p,typeof h=="function"?h.apply(this,arguments):h),n.apply(this,arguments),u)},null,m)},v.translateTo=function(s,p,h,m,g){v.transform(s,function(){var w=n.apply(this,arguments),y=this.__zoom,A=m==null?j(w):typeof m=="function"?m.apply(this,arguments):m;return e(nt.translate(A[0],A[1]).scale(y.k).translate(typeof p=="function"?-p.apply(this,arguments):-p,typeof h=="function"?-h.apply(this,arguments):-h),w,u)},m,g)};function B(s,p){return p=Math.max(o[0],Math.min(o[1],p)),p===s.k?s:new q(p,s.x,s.y)}function O(s,p,h){var m=p[0]-h[0]*s.k,g=p[1]-h[1]*s.k;return m===s.x&&g===s.y?s:new q(s.k,m,g)}function j(s){return[(+s[0][0]+ +s[1][0])/2,(+s[0][1]+ +s[1][1])/2]}function at(s,p,h,m){s.on("start.zoom",function(){V(this,arguments).event(m).start()}).on("interrupt.zoom end.zoom",function(){V(this,arguments).event(m).end()}).tween("zoom",function(){var g=this,w=arguments,y=V(g,w).event(m),A=n.apply(g,w),b=h==null?j(A):typeof h=="function"?h.apply(g,w):h,N=Math.max(A[1][0]-A[0][0],A[1][1]-A[0][1]),z=g.__zoom,T=typeof p=="function"?p.apply(g,w):p,D=c(z.invert(b).concat(N/z.k),T.invert(b).concat(N/T.k));return function(C){if(C===1)C=T;else{var X=D(C),et=N/X[2];C=new q(et,b[0]-X[0]*et,b[1]-X[1]*et)}y.zoom(null,C)}})}function V(s,p,h){return!h&&s.__zooming||new ct(s,p)}function ct(s,p){this.that=s,this.args=p,this.active=0,this.sourceEvent=null,this.extent=n.apply(s,p),this.taps=0}ct.prototype={event:function(s){return s&&(this.sourceEvent=s),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(s,p){return this.mouse&&s!=="mouse"&&(this.mouse[1]=p.invert(this.mouse[0])),this.touch0&&s!=="touch"&&(this.touch0[1]=p.invert(this.touch0[0])),this.touch1&&s!=="touch"&&(this.touch1[1]=p.invert(this.touch1[0])),this.that.__zoom=p,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(s){var p=U(this.that).datum();l.call(s,this.that,new Lr(s,{sourceEvent:this.sourceEvent,target:v,type:s,transform:this.that.__zoom,dispatch:l}),p)}};function Vt(s,...p){if(!t.apply(this,arguments))return;var h=V(this,p).event(s),m=this.__zoom,g=Math.max(o[0],Math.min(o[1],m.k*2**r.apply(this,arguments))),w=R(s);if(h.wheel)(h.mouse[0][0]!==w[0]||h.mouse[0][1]!==w[1])&&(h.mouse[1]=m.invert(h.mouse[0]=w)),clearTimeout(h.wheel);else{if(m.k===g)return;h.mouse=[w,m.invert(w)],Z(this),h.start()}K(s),h.wheel=setTimeout(y,E),h.zoom("mouse",e(O(B(m,g),h.mouse[0],h.mouse[1]),h.extent,u));function y(){h.wheel=null,h.end()}}function Dt(s,...p){if(d||!t.apply(this,arguments))return;var h=s.currentTarget,m=V(this,p,!0).event(s),g=U(s.view).on("mousemove.zoom",b,!0).on("mouseup.zoom",N,!0),w=R(s,h),y=s.clientX,A=s.clientY;kt(s.view),st(s),m.mouse=[w,this.__zoom.invert(w)],Z(this),m.start();function b(z){if(K(z),!m.moved){var T=z.clientX-y,D=z.clientY-A;m.moved=T*T+D*D>k}m.event(z).zoom("mouse",e(O(m.that.__zoom,m.mouse[0]=R(z,h),m.mouse[1]),m.extent,u))}function N(z){g.on("mousemove.zoom mouseup.zoom",null),Tt(z.view,m.moved),K(z),m.event(z).end()}}function Xt(s,...p){if(t.apply(this,arguments)){var h=this.__zoom,m=R(s.changedTouches?s.changedTouches[0]:s,this),g=h.invert(m),w=h.k*(s.shiftKey?.5:2),y=e(O(B(h,w),m,g),n.apply(this,p),u);K(s),a>0?U(this).transition().duration(a).call(at,y,m,s):U(this).call(v.transform,y,m,s)}}function Yt(s,...p){if(t.apply(this,arguments)){var h=s.touches,m=h.length,g=V(this,p,s.changedTouches.length===m).event(s),w,y,A,b;for(st(s),y=0;y<m;++y)A=h[y],b=R(A,this),b=[b,this.__zoom.invert(b),A.identifier],g.touch0?!g.touch1&&g.touch0[2]!==b[2]&&(g.touch1=b,g.taps=0):(g.touch0=b,w=!0,g.taps=1+!!f);f&&(f=clearTimeout(f)),w&&(g.taps<2&&(x=b[0],f=setTimeout(function(){f=null},_)),Z(this),g.start())}}function Lt(s,...p){if(this.__zooming){var h=V(this,p).event(s),m=s.changedTouches,g=m.length,w,y,A,b;for(K(s),w=0;w<g;++w)y=m[w],A=R(y,this),h.touch0&&h.touch0[2]===y.identifier?h.touch0[0]=A:h.touch1&&h.touch1[2]===y.identifier&&(h.touch1[0]=A);if(y=h.that.__zoom,h.touch1){var N=h.touch0[0],z=h.touch0[1],T=h.touch1[0],D=h.touch1[1],C=(C=T[0]-N[0])*C+(C=T[1]-N[1])*C,X=(X=D[0]-z[0])*X+(X=D[1]-z[1])*X;y=B(y,Math.sqrt(C/X)),A=[(N[0]+T[0])/2,(N[1]+T[1])/2],b=[(z[0]+D[0])/2,(z[1]+D[1])/2]}else if(h.touch0)A=h.touch0[0],b=h.touch0[1];else return;h.zoom("touch",e(O(y,A,b),h.extent,u))}}function qt(s,...p){if(this.__zooming){var h=V(this,p).event(s),m=s.changedTouches,g=m.length,w,y;for(st(s),d&&clearTimeout(d),d=setTimeout(function(){d=null},_),w=0;w<g;++w)y=m[w],h.touch0&&h.touch0[2]===y.identifier?delete h.touch0:h.touch1&&h.touch1[2]===y.identifier&&delete h.touch1;if(h.touch1&&!h.touch0&&(h.touch0=h.touch1,delete h.touch1),h.touch0)h.touch0[1]=this.__zoom.invert(h.touch0[0]);else if(h.end(),h.taps===2&&(y=R(y,this),Math.hypot(x[0]-y[0],x[1]-y[1])<I)){var A=U(this).on("dblclick.zoom");A&&A.apply(this,arguments)}}}return v.wheelDelta=function(s){return arguments.length?(r=typeof s=="function"?s:tt(+s),v):r},v.filter=function(s){return arguments.length?(t=typeof s=="function"?s:tt(!!s),v):t},v.touchable=function(s){return arguments.length?(i=typeof s=="function"?s:tt(!!s),v):i},v.extent=function(s){return arguments.length?(n=typeof s=="function"?s:tt([[+s[0][0],+s[0][1]],[+s[1][0],+s[1][1]]]),v):n},v.scaleExtent=function(s){return arguments.length?(o[0]=+s[0],o[1]=+s[1],v):[o[0],o[1]]},v.translateExtent=function(s){return arguments.length?(u[0][0]=+s[0][0],u[1][0]=+s[1][0],u[0][1]=+s[0][1],u[1][1]=+s[1][1],v):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},v.constrain=function(s){return arguments.length?(e=s,v):e},v.duration=function(s){return arguments.length?(a=+s,v):a},v.interpolate=function(s){return arguments.length?(c=s,v):c},v.on=function(){var s=l.on.apply(l,arguments);return s===l?v:s},v.clickDistance=function(s){return arguments.length?(k=(s=+s)*s,v):Math.sqrt(k)},v.tapDistance=function(s){return arguments.length?(I=+s,v):I},v}export{J as a,Ce as c,Tt as i,R as l,nt as n,Te as o,kt as r,F as s,Gr as t,U as u};
import{s as d}from"./chunk-LvLJmgfZ.js";import{t as m}from"./react-BGmjiNul.js";var e=d(m(),1),f={prefix:String(Math.round(Math.random()*1e10)),current:0},l=e.createContext(f),p=e.createContext(!1);typeof window<"u"&&window.document&&window.document.createElement;var c=new WeakMap;function x(t=!1){var u,i;let r=(0,e.useContext)(l),n=(0,e.useRef)(null);if(n.current===null&&!t){let a=(i=(u=e.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:u.ReactCurrentOwner)==null?void 0:i.current;if(a){let o=c.get(a);o==null?c.set(a,{id:r.current,state:a.memoizedState}):a.memoizedState!==o.state&&(r.current=o.id,c.delete(a))}n.current=++r.current}return n.current}function S(t){let r=(0,e.useContext)(l),n=x(!!t),u=`react-aria${r.prefix}`;return t||`${u}-${n}`}function _(t){let r=e.useId(),[n]=(0,e.useState)(s()),u=n?"react-aria":`react-aria${f.prefix}`;return t||`${u}-${r}`}var E=typeof e.useId=="function"?_:S;function w(){return!1}function C(){return!0}function R(t){return()=>{}}function s(){return typeof e.useSyncExternalStore=="function"?e.useSyncExternalStore(R,w,C):(0,e.useContext)(p)}export{E as n,s as t};
import{p as i}from"./useEvent-DO6uJBas.js";import{Zr as l,_n as o,gn as h}from"./cells-BpZ7g6ok.js";import{d as m}from"./once-Bul8mtFs.js";import{t as d}from"./createLucideIcon-CnW3RofX.js";var p=d("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),f="marimo:ai:chatState:v5";const v=i(null),u=l("marimo:ai:includeOtherCells",!0,o);function C(a){let t=new Map;for(let[s,e]of a.entries()){if(e.messages.length===0)continue;let c=m(e.messages,n=>n.id);t.set(s,{...e,messages:c})}return t}const r=l(f,{chats:new Map,activeChatId:null},h({toSerializable:a=>({chats:[...C(a.chats).entries()],activeChatId:a.activeChatId}),fromSerializable:a=>({chats:new Map(a.chats),activeChatId:a.activeChatId})})),g=i(a=>{let t=a(r);return t.activeChatId?t.chats.get(t.activeChatId):null},(a,t,s)=>{t(r,e=>({...e,activeChatId:s}))});export{p as a,u as i,v as n,r,g as t};
import{u as o}from"./useEvent-DO6uJBas.js";import{t}from"./createReducer-Dnna-AUO.js";import{t as a}from"./uuid-DercMavo.js";function d(){return{pendingCommands:[],isReady:!1}}var{reducer:f,createActions:g,valueAtom:r,useActions:i}=t(d,{addCommand:(n,m)=>{let e={id:a(),text:m,timestamp:Date.now()};return{...n,pendingCommands:[...n.pendingCommands,e]}},removeCommand:(n,m)=>({...n,pendingCommands:n.pendingCommands.filter(e=>e.id!==m)}),setReady:(n,m)=>({...n,isReady:m}),clearCommands:n=>({...n,pendingCommands:[]})});const s=()=>o(r);function p(){return i()}export{s as n,p as t};
import{t as A}from"./graphlib-B4SLw_H3.js";import{t as G}from"./dagre-DFula7I5.js";import"./purify.es-DNVQZNFu.js";import{u as H}from"./src-Cf4NnJCp.js";import{_ as O}from"./step-COhf-b0R.js";import{t as P}from"./line-BCZzhM6G.js";import{g as R}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as m,r as B}from"./src-BKLwm2RN.js";import{E as U,b as t,c as C,s as v}from"./chunk-ABZYJK2D-t8l6Viza.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import"./chunk-N4CR4FBY-eo9CRI73.js";import"./chunk-55IACEB6-SrR0J56d.js";import"./chunk-QN33PNHL-C_hHv997.js";import{i as I,n as W,t as M}from"./chunk-DI55MBZ5-BNViV6Iv.js";var F=m(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),J=m(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),_=m((e,i)=>{let o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),s=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",s.width+2*t().state.padding).attr("height",s.height+2*t().state.padding).attr("rx",t().state.radius),o},"drawSimpleState"),j=m((e,i)=>{let o=m(function(g,f,S){let b=g.append("tspan").attr("x",2*t().state.padding).text(f);S||b.attr("dy",t().state.textHeight)},"addTspan"),s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),d=s.height,x=e.append("text").attr("x",t().state.padding).attr("y",d+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description"),c=!0,a=!0;i.descriptions.forEach(function(g){c||(o(x,g,a),a=!1),c=!1});let n=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+d+t().state.dividerMargin/2).attr("y2",t().state.padding+d+t().state.dividerMargin/2).attr("class","descr-divider"),h=x.node().getBBox(),p=Math.max(h.width,s.width);return n.attr("x2",p+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",p+2*t().state.padding).attr("height",h.height+d+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Y=m((e,i,o)=>{let s=t().state.padding,d=2*t().state.padding,x=e.node().getBBox(),c=x.width,a=x.x,n=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),h=n.node().getBBox().width+d,p=Math.max(h,c);p===c&&(p+=d);let g,f=e.node().getBBox();i.doc,g=a-s,h>c&&(g=(c-p)/2+s),Math.abs(a-f.x)<s&&h>c&&(g=a-(h-c)/2);let S=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",S).attr("class",o?"alt-composit":"composit").attr("width",p).attr("height",f.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),n.attr("x",g+s),h<=c&&n.attr("x",a+(p-d)/2-h/2+s),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",f.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),$=m(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),X=m((e,i)=>{let o=t().state.forkWidth,s=t().state.forkHeight;if(i.parentId){let d=o;o=s,s=d}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",s).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),q=m((e,i,o,s)=>{let d=0,x=s.append("text");x.style("text-anchor","start"),x.attr("class","noteText");let c=e.replace(/\r\n/g,"<br/>");c=c.replace(/\n/g,"<br/>");let a=c.split(v.lineBreakRegex),n=1.25*t().state.noteMargin;for(let h of a){let p=h.trim();if(p.length>0){let g=x.append("tspan");if(g.text(p),n===0){let f=g.node().getBBox();n+=f.height}d+=n,g.attr("x",i+t().state.noteMargin),g.attr("y",o+d+1.25*t().state.noteMargin)}}return{textWidth:x.node().getBBox().width,textHeight:d}},"_drawLongText"),Z=m((e,i)=>{i.attr("class","state-note");let o=i.append("rect").attr("x",0).attr("y",t().state.padding),{textWidth:s,textHeight:d}=q(e,0,0,i.append("g"));return o.attr("height",d+2*t().state.noteMargin),o.attr("width",s+t().state.noteMargin*2),o},"drawNote"),T=m(function(e,i){let o=i.id,s={id:o,label:i.id,width:0,height:0},d=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&F(d),i.type==="end"&&$(d),(i.type==="fork"||i.type==="join")&&X(d,i),i.type==="note"&&Z(i.note.text,d),i.type==="divider"&&J(d),i.type==="default"&&i.descriptions.length===0&&_(d,i),i.type==="default"&&i.descriptions.length>0&&j(d,i);let x=d.node().getBBox();return s.width=x.width+2*t().state.padding,s.height=x.height+2*t().state.padding,s},"drawState"),D=0,K=m(function(e,i,o){let s=m(function(n){switch(n){case M.relationType.AGGREGATION:return"aggregation";case M.relationType.EXTENSION:return"extension";case M.relationType.COMPOSITION:return"composition";case M.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(n=>!Number.isNaN(n.y));let d=i.points,x=P().x(function(n){return n.x}).y(function(n){return n.y}).curve(O),c=e.append("path").attr("d",x(d)).attr("id","edge"+D).attr("class","transition"),a="";if(t().state.arrowMarkerAbsolute&&(a=U(!0)),c.attr("marker-end","url("+a+"#"+s(M.relationType.DEPENDENCY)+"End)"),o.title!==void 0){let n=e.append("g").attr("class","stateLabel"),{x:h,y:p}=R.calcLabelPosition(i.points),g=v.getRows(o.title),f=0,S=[],b=0,N=0;for(let u=0;u<=g.length;u++){let l=n.append("text").attr("text-anchor","middle").text(g[u]).attr("x",h).attr("y",p+f),y=l.node().getBBox();b=Math.max(b,y.width),N=Math.min(N,y.x),B.info(y.x,h,p+f),f===0&&(f=l.node().getBBox().height,B.info("Title height",f,p)),S.push(l)}let k=f*g.length;if(g.length>1){let u=(g.length-1)*f*.5;S.forEach((l,y)=>l.attr("y",p+y*f-u)),k=f*g.length}let r=n.node().getBBox();n.insert("rect",":first-child").attr("class","box").attr("x",h-b/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",b+t().state.padding).attr("height",k+t().state.padding),B.info(r)}D++},"drawEdge"),w,z={},Q=m(function(){},"setConf"),V=m(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),tt=m(function(e,i,o,s){w=t().state;let d=t().securityLevel,x;d==="sandbox"&&(x=H("#i"+i));let c=H(d==="sandbox"?x.nodes()[0].contentDocument.body:"body"),a=d==="sandbox"?x.nodes()[0].contentDocument:document;B.debug("Rendering diagram "+e);let n=c.select(`[id='${i}']`);V(n),L(s.db.getRootDoc(),n,void 0,!1,c,a,s);let h=w.padding,p=n.node().getBBox(),g=p.width+h*2,f=p.height+h*2;C(n,f,g*1.75,w.useMaxWidth),n.attr("viewBox",`${p.x-w.padding} ${p.y-w.padding} `+g+" "+f)},"draw"),et=m(e=>e?e.length*w.fontSizeFactor:1,"getLabelWidth"),L=m((e,i,o,s,d,x,c)=>{let a=new A({compound:!0,multigraph:!0}),n,h=!0;for(n=0;n<e.length;n++)if(e[n].stmt==="relation"){h=!1;break}o?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:w.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:w.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});let p=c.db.getStates(),g=c.db.getRelations(),f=Object.keys(p);for(let r of f){let u=p[r];o&&(u.parentId=o);let l;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");l=L(u.doc,y,u.id,!s,d,x,c);{y=Y(y,u,s);let E=y.node().getBBox();l.width=E.width,l.height=E.height+w.padding/2,z[u.id]={y:w.compositTitleSize}}}else l=T(i,u,a);if(u.note){let y=T(i,{descriptions:[],id:u.id+"-note",note:u.note,type:"note"},a);u.note.position==="left of"?(a.setNode(l.id+"-note",y),a.setNode(l.id,l)):(a.setNode(l.id,l),a.setNode(l.id+"-note",y)),a.setParent(l.id,l.id+"-group"),a.setParent(l.id+"-note",l.id+"-group")}else a.setNode(l.id,l)}B.debug("Count=",a.nodeCount(),a);let S=0;g.forEach(function(r){S++,B.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:et(r.title),height:w.labelHeight*v.getRows(r.title).length,labelpos:"c"},"id"+S)}),G(a),B.debug("Graph after layout",a.nodes());let b=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(B.warn("Node "+r+": "+JSON.stringify(a.node(r))),d.select("#"+b.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(z[r]?z[r].y:0)-a.node(r).height/2)+" )"),d.select("#"+b.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),x.querySelectorAll("#"+b.id+" #"+r+" .divider").forEach(u=>{let l=u.parentElement,y=0,E=0;l&&(l.parentElement&&(y=l.parentElement.getBBox().width),E=parseInt(l.getAttribute("data-x-shift"),10),Number.isNaN(E)&&(E=0)),u.setAttribute("x1",0-E+8),u.setAttribute("x2",y-E-8)})):B.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let N=b.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(B.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),N=b.getBBox();let k={id:o||"root",label:o||"root",width:0,height:0};return k.width=N.width+2*w.padding,k.height=N.height+2*w.padding,B.debug("Doc rendered",k,a),k},"renderDoc"),at={parser:W,get db(){return new M(1)},renderer:{setConf:Q,draw:tt},styles:I,init:m(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{at as diagram};
import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as t}from"./src-BKLwm2RN.js";import"./chunk-ABZYJK2D-t8l6Viza.js";import"./chunk-HN2XXSSU-Bw_9WyjM.js";import"./chunk-CVBHYZKI-CsebuiSO.js";import"./chunk-ATLVNIR6-VxibvAOV.js";import"./dist-C04_12Dz.js";import"./chunk-JA3XYJ7Z-CaauVIYw.js";import"./chunk-JZLCHNYA-cYgsW1_e.js";import"./chunk-QXUST7PY-CUUVFKsm.js";import"./chunk-N4CR4FBY-eo9CRI73.js";import"./chunk-55IACEB6-SrR0J56d.js";import"./chunk-QN33PNHL-C_hHv997.js";import{i,n as o,r as m,t as p}from"./chunk-DI55MBZ5-BNViV6Iv.js";var a={parser:o,get db(){return new p(2)},renderer:m,styles:i,init:t(r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{a as diagram};
import"./math-BIeW4iGV.js";function d(t){this._context=t}d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function D(t){return new d(t)}function e(){}function r(t,i,s){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+s)/6)}function l(t){this._context=t}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function F(t){return new l(t)}function w(t){this._context=t}w.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function H(t){return new w(t)}function E(t){this._context=t}E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var s=(this._x0+4*this._x1+t)/6,_=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(s,_):this._context.moveTo(s,_);break;case 3:this._point=4;default:r(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function I(t){return new E(t)}function S(t,i){this._basis=new l(t),this._beta=i}S.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,s=t.length-1;if(s>0)for(var _=t[0],h=i[0],n=t[s]-_,o=i[s]-h,a=-1,c;++a<=s;)c=a/s,this._basis.point(this._beta*t[a]+(1-this._beta)*(_+c*n),this._beta*i[a]+(1-this._beta)*(h+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};var L=(function t(i){function s(_){return i===1?new l(_):new S(_,i)}return s.beta=function(_){return t(+_)},s})(.85);function x(t,i,s){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-s),t._x2,t._y2)}function p(t,i){this._context=t,this._k=(1-i)/6}p.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:x(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var R=(function t(i){function s(_){return new p(_,i)}return s.tension=function(_){return t(+_)},s})(0);function f(t,i){this._context=t,this._k=(1-i)/6}f.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var U=(function t(i){function s(_){return new f(_,i)}return s.tension=function(_){return t(+_)},s})(0);function b(t,i){this._context=t,this._k=(1-i)/6}b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:x(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var V=(function t(i){function s(_){return new b(_,i)}return s.tension=function(_){return t(+_)},s})(0);function k(t,i,s){var _=t._x1,h=t._y1,n=t._x2,o=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);_=(_*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,h=(h*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var v=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,N=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*v+t._x1*t._l23_2a-i*t._l12_2a)/N,o=(o*v+t._y1*t._l23_2a-s*t._l12_2a)/N}t._context.bezierCurveTo(_,h,n,o,t._x2,t._y2)}function m(t,i){this._context=t,this._alpha=i}m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var W=(function t(i){function s(_){return i?new m(_,i):new p(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function P(t,i){this._context=t,this._alpha=i}P.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var G=(function t(i){function s(_){return i?new P(_,i):new f(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function z(t,i){this._context=t,this._alpha=i}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,_=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=(s*s+_*_)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:k(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var J=(function t(i){function s(_){return i?new z(_,i):new b(_,0)}return s.alpha=function(_){return t(+_)},s})(.5);function C(t){this._context=t}C.prototype={areaStart:e,areaEnd:e,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function K(t){return new C(t)}function M(t){return t<0?-1:1}function g(t,i,s){var _=t._x1-t._x0,h=i-t._x1,n=(t._y1-t._y0)/(_||h<0&&-0),o=(s-t._y1)/(h||_<0&&-0),a=(n*h+o*_)/(_+h);return(M(n)+M(o))*Math.min(Math.abs(n),Math.abs(o),.5*Math.abs(a))||0}function A(t,i){var s=t._x1-t._x0;return s?(3*(t._y1-t._y0)/s-i)/2:i}function T(t,i,s){var _=t._x0,h=t._y0,n=t._x1,o=t._y1,a=(n-_)/3;t._context.bezierCurveTo(_+a,h+a*i,n-a,o-a*s,n,o)}function u(t){this._context=t}u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:T(this,this._t0,A(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var s=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,T(this,A(this,s=g(this,t,i)),s);break;default:T(this,this._t0,s=g(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=s}}};function q(t){this._context=new j(t)}(q.prototype=Object.create(u.prototype)).point=function(t,i){u.prototype.point.call(this,i,t)};function j(t){this._context=t}j.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,s,_,h,n){this._context.bezierCurveTo(i,t,_,s,n,h)}};function Q(t){return new u(t)}function X(t){return new q(t)}function O(t){this._context=t}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,s=t.length;if(s)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),s===2)this._context.lineTo(t[1],i[1]);else for(var _=B(t),h=B(i),n=0,o=1;o<s;++n,++o)this._context.bezierCurveTo(_[0][n],h[0][n],_[1][n],h[1][n],t[o],i[o]);(this._line||this._line!==0&&s===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function B(t){var i,s=t.length-1,_,h=Array(s),n=Array(s),o=Array(s);for(h[0]=0,n[0]=2,o[0]=t[0]+2*t[1],i=1;i<s-1;++i)h[i]=1,n[i]=4,o[i]=4*t[i]+2*t[i+1];for(h[s-1]=2,n[s-1]=7,o[s-1]=8*t[s-1]+t[s],i=1;i<s;++i)_=h[i]/n[i-1],n[i]-=_,o[i]-=_*o[i-1];for(h[s-1]=o[s-1]/n[s-1],i=s-2;i>=0;--i)h[i]=(o[i]-h[i+1])/n[i];for(n[s-1]=(t[s]+h[s-1])/2,i=0;i<s-1;++i)n[i]=2*t[i+1]-h[i+1];return[h,n]}function Y(t){return new O(t)}function y(t,i){this._context=t,this._t=i}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var s=this._x*(1-this._t)+t*this._t;this._context.lineTo(s,this._y),this._context.lineTo(s,i)}break}this._x=t,this._y=i}};function Z(t){return new y(t,.5)}function $(t){return new y(t,0)}function tt(t){return new y(t,1)}export{F as _,Q as a,J as c,V as d,U as f,H as g,I as h,Y as i,G as l,L as m,$ as n,X as o,R as p,Z as r,K as s,tt as t,W as u,D as v};
function g(k){function l(t,e){t.cmdState.push(e)}function h(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function b(t){var e=t.cmdState.pop();e&&e.closeBracket()}function p(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var a=e[n];if(a.name!="DEFAULT")return a}return{styleIdentifier:function(){return null}}}function i(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var r={};r.importmodule=i("importmodule","tag",["string","builtin"]),r.documentclass=i("documentclass","tag",["","atom"]),r.usepackage=i("usepackage","tag",["atom"]),r.begin=i("begin","tag",["atom"]),r.end=i("end","tag",["atom"]),r.label=i("label","tag",["atom"]),r.ref=i("ref","tag",["atom"]),r.eqref=i("eqref","tag",["atom"]),r.cite=i("cite","tag",["atom"]),r.bibitem=i("bibitem","tag",["atom"]),r.Bibitem=i("Bibitem","tag",["atom"]),r.RBibitem=i("RBibitem","tag",["atom"]),r.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function c(t,e){t.f=e}function m(t,e){var n;if(t.match(/^\\[a-zA-Z@\xc0-\u1fff\u2060-\uffff]+/)){var a=t.current().slice(1);return n=r.hasOwnProperty(a)?r[a]:r.DEFAULT,n=new n,l(e,n),c(e,d),n.style}if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return c(e,function(o,f){return s(o,f,"\\]")}),"keyword";if(t.match("\\("))return c(e,function(o,f){return s(o,f,"\\)")}),"keyword";if(t.match("$$"))return c(e,function(o,f){return s(o,f,"$$")}),"keyword";if(t.match("$"))return c(e,function(o,f){return s(o,f,"$")}),"keyword";var u=t.next();if(u=="%")return t.skipToEnd(),"comment";if(u=="}"||u=="]"){if(n=h(e),n)n.closeBracket(u),c(e,d);else return"error";return"bracket"}else return u=="{"||u=="["?(n=r.DEFAULT,n=new n,l(e,n),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),n=p(e),n.name=="begin"&&(n.argument=t.current()),n.styleIdentifier())}function s(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return c(e,m),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variableName.special";if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/]/)||t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var a=t.next();return a=="{"||a=="}"||a=="["||a=="]"||a=="("||a==")"?"bracket":a=="%"?(t.skipToEnd(),"comment"):"error"}function d(t,e){var n=t.peek(),a;return n=="{"||n=="["?(a=h(e),a.openBracket(n),t.eat(n),c(e,m),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(c(e,m),b(e),m(t,e))}return{name:"stex",startState:function(){return{cmdState:[],f:k?function(t,e){return s(t,e)}:m}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=m,t.cmdState.length=0},languageData:{commentTokens:{line:"%"}}}}const y=g(!1),S=g(!0);export{S as n,y as t};
import{n as t,t as s}from"./stex-CtmkcLz7.js";export{s as stex,t as stexMath};
var N="a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.bgsound.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.nobr.noframes.noscript.object.ol.optgroup.option.output.p.param.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.track.u.ul.var.video".split("."),q=["domain","regexp","url-prefix","url"],L=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],P="width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.dynamic-range.video-dynamic-range".split("."),C="align-content.align-items.align-self.alignment-adjust.alignment-baseline.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backface-visibility.background.background-attachment.background-clip.background-color.background-image.background-origin.background-position.background-repeat.background-size.baseline-shift.binding.bleed.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-feature-settings.font-family.font-kerning.font-language-override.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-weight.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-position.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.justify-content.left.letter-spacing.line-break.line-height.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marker-offset.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.max-height.max-width.min-height.min-width.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotation.rotation-point.ruby-align.ruby-overhang.ruby-position.ruby-span.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-outline.text-overflow.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.unicode-bidi.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode.font-smoothing.osx-font-smoothing".split("."),_=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],U=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],E="aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen".split("."),O="above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.avoid.avoid-column.avoid-page.avoid-region.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.column.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.dashed.decimal.decimal-leading-zero.default.default-button.destination-atop.destination-in.destination-out.destination-over.devanagari.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fixed.flat.flex.footnotes.forwards.from.geometricPrecision.georgian.graytext.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hebrew.help.hidden.hide.high.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.malayalam.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row-resize.rtl.run-in.running.s-resize.sans-serif.scale.scale3d.scaleX.scaleY.scaleZ.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.semi-condensed.semi-expanded.separate.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.solid.somali.source-atop.source-in.source-out.source-over.space.spell-out.square.square-button.standard.start.static.status-bar.stretch.stroke.sub.subpixel-antialiased.super.sw-resize.symbolic.symbols.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.x-large.x-small.xor.xx-large.xx-small.bicubic.optimizespeed.grayscale.row.row-reverse.wrap.wrap-reverse.column-reverse.flex-start.flex-end.space-between.space-around.unset".split("."),W=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],A=["for","if","else","unless","from","to"],R=["null","true","false","href","title","type","not-allowed","readonly","disabled"],J=N.concat(q,L,P,C,_,E,O,U,W,A,R,["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"]);function S(t){return t=t.sort(function(e,r){return r>e}),RegExp("^(("+t.join(")|(")+"))\\b")}function m(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=!0;return e}function K(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var M=m(N),$=/^(a|b|i|s|col|em)$/i,Q=m(C),V=m(_),ee=m(O),te=m(E),re=m(q),ie=S(q),ae=m(P),oe=m(L),ne=m(U),le=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,se=S(W),ce=m(A),X=new RegExp(/^\-(moz|ms|o|webkit)-/i),de=m(R),j="",s={},h,g,Y,o;function ue(t,e){if(j=t.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),e.context.line.firstWord=j?j[0].replace(/^\s*/,""):"",e.context.line.indent=t.indentation(),h=t.peek(),t.match("//"))return t.skipToEnd(),["comment","comment"];if(t.match("/*"))return e.tokenize=Z,Z(t,e);if(h=='"'||h=="'")return t.next(),e.tokenize=T(h),e.tokenize(t,e);if(h=="@")return t.next(),t.eatWhile(/[\w\\-]/),["def",t.current()];if(h=="#"){if(t.next(),t.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(t.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return t.match(X)?["meta","vendor-prefixes"]:t.match(/^-?[0-9]?\.?[0-9]/)?(t.eatWhile(/[a-z%]/i),["number","unit"]):h=="!"?(t.next(),[t.match(/^(important|optional)/i)?"keyword":"operator","important"]):h=="."&&t.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:t.match(ie)?(t.peek()=="("&&(e.tokenize=me),["property","word"]):t.match(/^[a-z][\w-]*\(/i)?(t.backUp(1),["keyword","mixin"]):t.match(/^(\+|-)[a-z][\w-]*\(/i)?(t.backUp(1),["keyword","block-mixin"]):t.string.match(/^\s*&/)&&t.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:t.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(t.backUp(1),["variableName.special","reference"]):t.match(/^&{1}\s*$/)?["variableName.special","reference"]:t.match(se)?["operator","operator"]:t.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?t.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!b(t.current())?(t.match("."),["variable","variable-name"]):["variable","word"]:t.match(le)?["operator",t.current()]:/[:;,{}\[\]\(\)]/.test(h)?(t.next(),[null,h]):(t.next(),[null,null])}function Z(t,e){for(var r=!1,i;(i=t.next())!=null;){if(r&&i=="/"){e.tokenize=null;break}r=i=="*"}return["comment","comment"]}function T(t){return function(e,r){for(var i=!1,l;(l=e.next())!=null;){if(l==t&&!i){t==")"&&e.backUp(1);break}i=!i&&l=="\\"}return(l==t||!i&&t!=")")&&(r.tokenize=null),["string","string"]}}function me(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=T(")"),[null,"("]}function D(t,e,r,i){this.type=t,this.indent=e,this.prev=r,this.line=i||{firstWord:"",indent:0}}function a(t,e,r,i){return i=i>=0?i:e.indentUnit,t.context=new D(r,e.indentation()+i,t.context),r}function f(t,e,r){var i=t.context.indent-e.indentUnit;return r||(r=!1),t.context=t.context.prev,r&&(t.context.indent=i),t.context.type}function pe(t,e,r){return s[r.context.type](t,e,r)}function B(t,e,r,i){for(var l=i||1;l>0;l--)r.context=r.context.prev;return pe(t,e,r)}function b(t){return t.toLowerCase()in M}function k(t){return t=t.toLowerCase(),t in Q||t in ne}function w(t){return t.toLowerCase()in ce}function F(t){return t.toLowerCase().match(X)}function y(t){var e=t.toLowerCase(),r="variable";return b(t)?r="tag":w(t)?r="block-keyword":k(t)?r="property":e in ee||e in de?r="atom":e=="return"||e in te?r="keyword":t.match(/^[A-Z]/)&&(r="string"),r}function I(t,e){return n(e)&&(t=="{"||t=="]"||t=="hash"||t=="qualifier")||t=="block-mixin"}function G(t,e){return t=="{"&&e.match(/^\s*\$?[\w-]+/i,!1)}function H(t,e){return t==":"&&e.match(/^[a-z-]+/,!1)}function v(t){return t.sol()||t.string.match(RegExp("^\\s*"+K(t.current())))}function n(t){return t.eol()||t.match(/^\s*$/,!1)}function u(t){var e=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r=typeof t=="string"?t.match(e):t.string.match(e);return r?r[0].replace(/^\s*/,""):""}s.block=function(t,e,r){if(t=="comment"&&v(e)||t==","&&n(e)||t=="mixin")return a(r,e,"block",0);if(G(t,e))return a(r,e,"interpolation");if(n(e)&&t=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(e.string)&&!b(u(e)))return a(r,e,"block",0);if(I(t,e))return a(r,e,"block");if(t=="}"&&n(e))return a(r,e,"block",0);if(t=="variable-name")return e.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||w(u(e))?a(r,e,"variableName"):a(r,e,"variableName",0);if(t=="=")return!n(e)&&!w(u(e))?a(r,e,"block",0):a(r,e,"block");if(t=="*"&&(n(e)||e.match(/\s*(,|\.|#|\[|:|{)/,!1)))return o="tag",a(r,e,"block");if(H(t,e))return a(r,e,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(t))return a(r,e,n(e)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return a(r,e,"keyframes");if(/@extends?/.test(t))return a(r,e,"extend",0);if(t&&t.charAt(0)=="@")return e.indentation()>0&&k(e.current().slice(1))?(o="variable","block"):/(@import|@require|@charset)/.test(t)?a(r,e,"block",0):a(r,e,"block");if(t=="reference"&&n(e))return a(r,e,"block");if(t=="(")return a(r,e,"parens");if(t=="vendor-prefixes")return a(r,e,"vendorPrefixes");if(t=="word"){var i=e.current();if(o=y(i),o=="property")return v(e)?a(r,e,"block",0):(o="atom","block");if(o=="tag"){if(/embed|menu|pre|progress|sub|table/.test(i)&&k(u(e))||e.string.match(RegExp("\\[\\s*"+i+"|"+i+"\\s*\\]")))return o="atom","block";if($.test(i)&&(v(e)&&e.string.match(/=/)||!v(e)&&!e.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!b(u(e))))return o="variable",w(u(e))?"block":a(r,e,"block",0);if(n(e))return a(r,e,"block")}if(o=="block-keyword")return o="keyword",e.current(/(if|unless)/)&&!v(e)?"block":a(r,e,"block");if(i=="return")return a(r,e,"block",0);if(o=="variable"&&e.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return a(r,e,"block")}return r.context.type},s.parens=function(t,e,r){if(t=="(")return a(r,e,"parens");if(t==")")return r.context.prev.type=="parens"?f(r,e):e.string.match(/^[a-z][\w-]*\(/i)&&n(e)||w(u(e))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(u(e))||!e.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&b(u(e))?a(r,e,"block"):e.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||e.string.match(/^\s*(\(|\)|[0-9])/)||e.string.match(/^\s+[a-z][\w-]*\(/i)||e.string.match(/^\s+[\$-]?[a-z]/i)?a(r,e,"block",0):n(e)?a(r,e,"block"):a(r,e,"block",0);if(t&&t.charAt(0)=="@"&&k(e.current().slice(1))&&(o="variable"),t=="word"){var i=e.current();o=y(i),o=="tag"&&$.test(i)&&(o="variable"),(o=="property"||i=="to")&&(o="atom")}return t=="variable-name"?a(r,e,"variableName"):H(t,e)?a(r,e,"pseudo"):r.context.type},s.vendorPrefixes=function(t,e,r){return t=="word"?(o="property",a(r,e,"block",0)):f(r,e)},s.pseudo=function(t,e,r){return k(u(e.string))?B(t,e,r):(e.match(/^[a-z-]+/),o="variableName.special",n(e)?a(r,e,"block"):f(r,e))},s.atBlock=function(t,e,r){if(t=="(")return a(r,e,"atBlock_parens");if(I(t,e))return a(r,e,"block");if(G(t,e))return a(r,e,"interpolation");if(t=="word"){var i=e.current().toLowerCase();if(o=/^(only|not|and|or)$/.test(i)?"keyword":re.hasOwnProperty(i)?"tag":oe.hasOwnProperty(i)?"attribute":ae.hasOwnProperty(i)?"property":V.hasOwnProperty(i)?"string.special":y(e.current()),o=="tag"&&n(e))return a(r,e,"block")}return t=="operator"&&/^(not|and|or)$/.test(e.current())&&(o="keyword"),r.context.type},s.atBlock_parens=function(t,e,r){if(t=="{"||t=="}")return r.context.type;if(t==")")return n(e)?a(r,e,"block"):a(r,e,"atBlock");if(t=="word"){var i=e.current().toLowerCase();return o=y(i),/^(max|min)/.test(i)&&(o="property"),o=="tag"&&(o=$.test(i)?"variable":"atom"),r.context.type}return s.atBlock(t,e,r)},s.keyframes=function(t,e,r){return e.indentation()=="0"&&(t=="}"&&v(e)||t=="]"||t=="hash"||t=="qualifier"||b(e.current()))?B(t,e,r):t=="{"?a(r,e,"keyframes"):t=="}"?v(e)?f(r,e,!0):a(r,e,"keyframes"):t=="unit"&&/^[0-9]+\%$/.test(e.current())?a(r,e,"keyframes"):t=="word"&&(o=y(e.current()),o=="block-keyword")?(o="keyword",a(r,e,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(t)?a(r,e,n(e)?"block":"atBlock"):t=="mixin"?a(r,e,"block",0):r.context.type},s.interpolation=function(t,e,r){return t=="{"&&f(r,e)&&a(r,e,"block"),t=="}"?e.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||e.string.match(/^\s*[a-z]/i)&&b(u(e))?a(r,e,"block"):!e.string.match(/^(\{|\s*\&)/)||e.match(/\s*[\w-]/,!1)?a(r,e,"block",0):a(r,e,"block"):t=="variable-name"?a(r,e,"variableName",0):(t=="word"&&(o=y(e.current()),o=="tag"&&(o="atom")),r.context.type)},s.extend=function(t,e,r){return t=="["||t=="="?"extend":t=="]"?f(r,e):t=="word"?(o=y(e.current()),"extend"):f(r,e)},s.variableName=function(t,e,r){return t=="string"||t=="["||t=="]"||e.current().match(/^(\.|\$)/)?(e.current().match(/^\.[\w-]+/i)&&(o="variable"),"variableName"):B(t,e,r)};const he={name:"stylus",startState:function(){return{tokenize:null,state:"block",context:new D("block",0,null)}},token:function(t,e){return!e.tokenize&&t.eatSpace()?null:(g=(e.tokenize||ue)(t,e),g&&typeof g=="object"&&(Y=g[1],g=g[0]),o=g,e.state=s[e.state](Y,t,e),o)},indent:function(t,e,r){var i=t.context,l=e&&e.charAt(0),x=i.indent,z=u(e),p=i.line.indent,c=t.context.prev?t.context.prev.line.firstWord:"",d=t.context.prev?t.context.prev.line.indent:p;return i.prev&&(l=="}"&&(i.type=="block"||i.type=="atBlock"||i.type=="keyframes")||l==")"&&(i.type=="parens"||i.type=="atBlock_parens")||l=="{"&&i.type=="at")?x=i.indent-r.unit:/(\})/.test(l)||(/@|\$|\d/.test(l)||/^\{/.test(e)||/^\s*\/(\/|\*)/.test(e)||/^\s*\/\*/.test(c)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(e)||/^(\+|-)?[a-z][\w-]*\(/i.test(e)||/^return/.test(e)||w(z)?x=p:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(l)||b(z)?x=/\,\s*$/.test(c)?d:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(c)||b(c)?p<=d?d:d+r.unit:p:!/,\s*$/.test(e)&&(F(z)||k(z))&&(x=w(c)?p<=d?d:d+r.unit:/^\{/.test(c)?p<=d?p:d+r.unit:F(c)||k(c)?p>=d?d:p:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(c)||/=\s*$/.test(c)||b(c)||/^\$[\w-\.\[\]\'\"]/.test(c)?d+r.unit:p)),x},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:J}};export{he as t};
import{t as s}from"./stylus-BawZsgUJ.js";export{s as stylus};
import{t}from"./swift-CdaDqiGL.js";export{t as swift};
function u(t){for(var n={},e=0;e<t.length;e++)n[t[e]]=!0;return n}var l=u("_.var.let.actor.class.enum.extension.import.protocol.struct.func.typealias.associatedtype.open.public.internal.fileprivate.private.deinit.init.new.override.self.subscript.super.convenience.dynamic.final.indirect.lazy.required.static.unowned.unowned(safe).unowned(unsafe).weak.as.is.break.case.continue.default.else.fallthrough.for.guard.if.in.repeat.switch.where.while.defer.return.inout.mutating.nonmutating.isolated.nonisolated.catch.do.rethrows.throw.throws.async.await.try.didSet.get.set.willSet.assignment.associativity.infix.left.none.operator.postfix.precedence.precedencegroup.prefix.right.Any.AnyObject.Type.dynamicType.Self.Protocol.__COLUMN__.__FILE__.__FUNCTION__.__LINE__".split(".")),f=u(["var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),p=u(["true","false","nil","self","super","_"]),d=u(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String","UInt8","UInt16","UInt32","UInt64","Void"]),h="+-/*%=|&<>~^?!",m=":;,.(){}[]",v=/^\-?0b[01][01_]*/,_=/^\-?0o[0-7][0-7_]*/,k=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,y=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,x=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,g=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,z=/^\#[A-Za-z]+/,w=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function s(t,n,e){if(t.sol()&&(n.indented=t.indentation()),t.eatSpace())return null;var r=t.peek();if(r=="/"){if(t.match("//"))return t.skipToEnd(),"comment";if(t.match("/*"))return n.tokenize.push(c),c(t,n)}if(t.match(z))return"builtin";if(t.match(w))return"attribute";if(t.match(v)||t.match(_)||t.match(k)||t.match(y))return"number";if(t.match(g))return"property";if(h.indexOf(r)>-1)return t.next(),"operator";if(m.indexOf(r)>-1)return t.next(),t.match(".."),"punctuation";var i;if(i=t.match(/("""|"|')/)){var a=A.bind(null,i[0]);return n.tokenize.push(a),a(t,n)}if(t.match(x)){var o=t.current();return d.hasOwnProperty(o)?"type":p.hasOwnProperty(o)?"atom":l.hasOwnProperty(o)?(f.hasOwnProperty(o)&&(n.prev="define"),"keyword"):e=="define"?"def":"variable"}return t.next(),null}function b(){var t=0;return function(n,e,r){var i=s(n,e,r);if(i=="punctuation"){if(n.current()=="(")++t;else if(n.current()==")"){if(t==0)return n.backUp(1),e.tokenize.pop(),e.tokenize[e.tokenize.length-1](n,e);--t}}return i}}function A(t,n,e){for(var r=t.length==1,i,a=!1;i=n.peek();)if(a){if(n.next(),i=="(")return e.tokenize.push(b()),"string";a=!1}else{if(n.match(t))return e.tokenize.pop(),"string";n.next(),a=i=="\\"}return r&&e.tokenize.pop(),"string"}function c(t,n){for(var e;e=t.next();)if(e==="/"&&t.eat("*"))n.tokenize.push(c);else if(e==="*"&&t.eat("/")){n.tokenize.pop();break}return"comment"}function I(t,n,e){this.prev=t,this.align=n,this.indented=e}function O(t,n){var e=n.match(/^\s*($|\/[\/\*]|[)}\]])/,!1)?null:n.column()+1;t.context=new I(t.context,e,t.indented)}function $(t){t.context&&(t.context=(t.indented=t.context.indented,t.context.prev))}const F={name:"swift",startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(t,n){var e=n.prev;n.prev=null;var r=(n.tokenize[n.tokenize.length-1]||s)(t,n,e);if(!r||r=="comment"?n.prev=e:n.prev||(n.prev=r),r=="punctuation"){var i=/[\(\[\{]|([\]\)\}])/.exec(t.current());i&&(i[1]?$:O)(n,t)}return r},indent:function(t,n,e){var r=t.context;if(!r)return 0;var i=/^[\]\}\)]/.test(n);return r.align==null?r.indented+(i?0:e.unit):r.align-(i?1:0)},languageData:{indentOnInput:/^\s*[\)\}\]]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}};export{F as t};
import{s as z}from"./chunk-LvLJmgfZ.js";import{d as ne,n as E,p as T,u as U}from"./useEvent-DO6uJBas.js";import{t as ie}from"./react-BGmjiNul.js";import{G as _}from"./cells-BpZ7g6ok.js";import{t as le}from"./react-dom-C9fstfnp.js";import{t as D}from"./compiler-runtime-DeeZ7FnK.js";import{a as ce,d as $,f as ue,l as I}from"./hotkeys-BHHWjLlp.js";import{p as de}from"./utils-DXvhzCGS.js";import{r as H}from"./config-CIrPQIbt.js";import{r as M,t as W}from"./useEventListener-DIUKKfEy.js";import{t as fe}from"./jsx-runtime-ZmTK25f3.js";import{n as L,t as G}from"./cn-BKtXLv3a.js";import{m as pe}from"./select-V5IdpNiR.js";import{E as he,S as me,_ as F,w as ye}from"./Combination-CMPwuAmi.js";import{l as be}from"./dist-uzvC4uAK.js";function we(){try{return window.__MARIMO_MOUNT_CONFIG__.version}catch{return $.warn("Failed to get version from mount config"),null}}const ge=T(we()||"latest"),ve=T(!0),xe=T(null);le();var m=z(ie(),1),je=(0,m.createContext)(null);function Re(a){let t=(0,m.useRef)({});return m.createElement(je.Provider,{value:t},a.children)}var ke=(0,m.createContext)({isSelected:!1}),Se={"Content-Type":"application/json"},Ee=/\{[^{}]+\}/g,Te=class extends Request{constructor(a,t){for(let e in super(a,t),t)e in this||(this[e]=t[e])}};function $e(a){let{baseUrl:t="",fetch:e=globalThis.fetch,querySerializer:s,bodySerializer:r,headers:o,...n}={...a};t.endsWith("/")&&(t=t.substring(0,t.length-1)),o=X(Se,o);let i=[];async function u(l,c){let{fetch:f=e,headers:h,params:d={},parseAs:v="json",querySerializer:b,bodySerializer:k=r??Ce,...R}=c||{},S=typeof s=="function"?s:B(s);b&&(S=typeof b=="function"?b:B({...typeof s=="object"?s:{},...b}));let y={redirect:"follow",...n,...R,headers:X(o,h,d.header)};y.body&&(y.body=k(y.body)),y.body instanceof FormData&&y.headers.delete("Content-Type");let x=new Te(Oe(l,{baseUrl:t,params:d,querySerializer:S}),y),N={baseUrl:t,fetch:f,parseAs:v,querySerializer:S,bodySerializer:k};for(let w of i)if(w&&typeof w=="object"&&typeof w.onRequest=="function"){x.schemaPath=l,x.params=d;let g=await w.onRequest(x,N);if(g){if(!(g instanceof Request))throw Error("Middleware must return new Request() when modifying the request");x=g}}let p=await f(x);for(let w=i.length-1;w>=0;w--){let g=i[w];if(g&&typeof g=="object"&&typeof g.onResponse=="function"){let q=await g.onResponse(p,N);if(q){if(!(q instanceof Response))throw Error("Middleware must return new Response() when modifying the response");p=q}}}if(p.status===204||p.headers.get("Content-Length")==="0")return p.ok?{data:{},response:p}:{error:{},response:p};if(p.ok)return v==="stream"?{data:p.body,response:p}:{data:await p[v](),response:p};let O=await p.text();try{O=JSON.parse(O)}catch{}return{error:O,response:p}}return{async GET(l,c){return u(l,{...c,method:"GET"})},async PUT(l,c){return u(l,{...c,method:"PUT"})},async POST(l,c){return u(l,{...c,method:"POST"})},async DELETE(l,c){return u(l,{...c,method:"DELETE"})},async OPTIONS(l,c){return u(l,{...c,method:"OPTIONS"})},async HEAD(l,c){return u(l,{...c,method:"HEAD"})},async PATCH(l,c){return u(l,{...c,method:"PATCH"})},async TRACE(l,c){return u(l,{...c,method:"TRACE"})},use(...l){for(let c of l)if(c){if(typeof c!="object"||!("onRequest"in c||"onResponse"in c))throw Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");i.push(c)}},eject(...l){for(let c of l){let f=i.indexOf(c);f!==-1&&i.splice(f,1)}}}}function P(a,t,e){if(t==null)return"";if(typeof t=="object")throw Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${a}=${(e==null?void 0:e.allowReserved)===!0?t:encodeURIComponent(t)}`}function J(a,t,e){if(!t||typeof t!="object")return"";let s=[],r={simple:",",label:".",matrix:";"}[e.style]||"&";if(e.style!=="deepObject"&&e.explode===!1){for(let i in t)s.push(i,e.allowReserved===!0?t[i]:encodeURIComponent(t[i]));let n=s.join(",");switch(e.style){case"form":return`${a}=${n}`;case"label":return`.${n}`;case"matrix":return`;${a}=${n}`;default:return n}}for(let n in t){let i=e.style==="deepObject"?`${a}[${n}]`:n;s.push(P(i,t[n],e))}let o=s.join(r);return e.style==="label"||e.style==="matrix"?`${r}${o}`:o}function V(a,t,e){if(!Array.isArray(t))return"";if(e.explode===!1){let o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[e.style]||",",n=(e.allowReserved===!0?t:t.map(i=>encodeURIComponent(i))).join(o);switch(e.style){case"simple":return n;case"label":return`.${n}`;case"matrix":return`;${a}=${n}`;default:return`${a}=${n}`}}let s={simple:",",label:".",matrix:";"}[e.style]||"&",r=[];for(let o of t)e.style==="simple"||e.style==="label"?r.push(e.allowReserved===!0?o:encodeURIComponent(o)):r.push(P(a,o,e));return e.style==="label"||e.style==="matrix"?`${s}${r.join(s)}`:r.join(s)}function B(a){return function(t){let e=[];if(t&&typeof t=="object")for(let s in t){let r=t[s];if(r!=null){if(Array.isArray(r)){e.push(V(s,r,{style:"form",explode:!0,...a==null?void 0:a.array,allowReserved:(a==null?void 0:a.allowReserved)||!1}));continue}if(typeof r=="object"){e.push(J(s,r,{style:"deepObject",explode:!0,...a==null?void 0:a.object,allowReserved:(a==null?void 0:a.allowReserved)||!1}));continue}e.push(P(s,r,a))}}return e.join("&")}}function Pe(a,t){let e=a;for(let s of a.match(Ee)??[]){let r=s.substring(1,s.length-1),o=!1,n="simple";if(r.endsWith("*")&&(o=!0,r=r.substring(0,r.length-1)),r.startsWith(".")?(n="label",r=r.substring(1)):r.startsWith(";")&&(n="matrix",r=r.substring(1)),!t||t[r]===void 0||t[r]===null)continue;let i=t[r];if(Array.isArray(i)){e=e.replace(s,V(r,i,{style:n,explode:o}));continue}if(typeof i=="object"){e=e.replace(s,J(r,i,{style:n,explode:o}));continue}if(n==="matrix"){e=e.replace(s,`;${P(r,i)}`);continue}e=e.replace(s,n==="label"?`.${i}`:i)}return e}function Ce(a){return JSON.stringify(a)}function Oe(a,t){var r;let e=`${t.baseUrl}${a}`;(r=t.params)!=null&&r.path&&(e=Pe(e,t.params.path));let s=t.querySerializer(t.params.query??{});return s.startsWith("?")&&(s=s.substring(1)),s&&(e+=`?${s}`),e}function X(...a){let t=new Headers;for(let e of a){if(!e||typeof e!="object")continue;let s=e instanceof Headers?e.entries():Object.entries(e);for(let[r,o]of s)if(o===null)t.delete(r);else if(Array.isArray(o))for(let n of o)t.append(r,n);else o!==void 0&&t.set(r,o)}return t}function qe(a){return $e(a)}function K(){let a=H().httpURL;return a.search="",a.hash="",a.toString()}const A={post(a,t,e={}){let s=`${_.withTrailingSlash(e.baseUrl??K())}api${a}`;return fetch(s,{method:"POST",headers:{"Content-Type":"application/json",...A.headers(),...e.headers},body:JSON.stringify(t),signal:e.signal}).then(async r=>{var n;let o=(n=r.headers.get("Content-Type"))==null?void 0:n.startsWith("application/json");if(!r.ok){let i=o?await r.json():await r.text();throw Error(r.statusText,{cause:i})}return o?r.json():r.text()}).catch(r=>{throw $.error(`Error requesting ${s}`,r),r})},get(a,t={}){let e=`${_.withTrailingSlash(t.baseUrl??K())}api${a}`;return fetch(e,{method:"GET",headers:{...A.headers(),...t.headers}}).then(s=>{var r;if(!s.ok)throw Error(s.statusText);return(r=s.headers.get("Content-Type"))!=null&&r.startsWith("application/json")?s.json():null}).catch(s=>{throw $.error(`Error requesting ${e}`,s),s})},headers(){return H().headers()},handleResponse:a=>a.error?Promise.reject(a.error):Promise.resolve(a.data),handleResponseReturnNull:a=>a.error?Promise.reject(a.error):Promise.resolve(null)};function Ae(a){let t=qe({baseUrl:a.httpURL.toString()});return t.use({onRequest:e=>{let s=a.headers();for(let[r,o]of Object.entries(s))e.headers.set(r,o);return e}}),t}var Q=T({});function Ne(){return U(Q)}function ze(){let a=ne(Q);return{registerAction:E((t,e)=>{a(s=>({...s,[t]:e}))}),unregisterAction:E(t=>{a(e=>{let{[t]:s,...r}=e;return r})})}}var Y=D();function Ue(a,t){let e=(0,Y.c)(13),{registerAction:s,unregisterAction:r}=ze(),o=U(de),n=t===ue.NOOP,i;e[0]===t?i=e[1]:(i=d=>t(d),e[0]=t,e[1]=i);let u=E(i),l;e[2]!==t||e[3]!==o||e[4]!==a?(l=d=>{if(d.defaultPrevented)return;let v=o.getHotkey(a).key;I(v)(d)&&t(d)!==!1&&(d.preventDefault(),d.stopPropagation())},e[2]=t,e[3]=o,e[4]=a,e[5]=l):l=e[5];let c=E(l);W(document,"keydown",c);let f,h;e[6]!==n||e[7]!==u||e[8]!==s||e[9]!==a||e[10]!==r?(f=()=>{if(!n)return s(a,u),()=>r(a)},h=[u,a,n,s,r],e[6]=n,e[7]=u,e[8]=s,e[9]=a,e[10]=r,e[11]=f,e[12]=h):(f=e[11],h=e[12]),(0,m.useEffect)(f,h)}function _e(a,t){let e=(0,Y.c)(2),s;e[0]===t?s=e[1]:(s=r=>{if(!r.defaultPrevented)for(let[o,n]of ce.entries(t))I(o)(r)&&($.debug("Satisfied",o,r),n(r)!==!1&&(r.preventDefault(),r.stopPropagation()))},e[0]=t,e[1]=s),W(a,"keydown",s)}var j=z(fe(),1),C="Switch",[De,it]=he(C),[Ie,He]=De(C),Z=m.forwardRef((a,t)=>{let{__scopeSwitch:e,name:s,checked:r,defaultChecked:o,required:n,disabled:i,value:u="on",onCheckedChange:l,form:c,...f}=a,[h,d]=m.useState(null),v=M(t,y=>d(y)),b=m.useRef(!1),k=h?c||!!h.closest("form"):!0,[R,S]=me({prop:r,defaultProp:o??!1,onChange:l,caller:C});return(0,j.jsxs)(Ie,{scope:e,checked:R,disabled:i,children:[(0,j.jsx)(F.button,{type:"button",role:"switch","aria-checked":R,"aria-required":n,"data-state":ae(R),"data-disabled":i?"":void 0,disabled:i,value:u,...f,ref:v,onClick:ye(a.onClick,y=>{S(x=>!x),k&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})}),k&&(0,j.jsx)(re,{control:h,bubbles:!b.current,name:s,value:u,checked:R,required:n,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});Z.displayName=C;var ee="SwitchThumb",te=m.forwardRef((a,t)=>{let{__scopeSwitch:e,...s}=a,r=He(ee,e);return(0,j.jsx)(F.span,{"data-state":ae(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:t})});te.displayName=ee;var Me="SwitchBubbleInput",re=m.forwardRef(({__scopeSwitch:a,control:t,checked:e,bubbles:s=!0,...r},o)=>{let n=m.useRef(null),i=M(n,o),u=pe(e),l=be(t);return m.useEffect(()=>{let c=n.current;if(!c)return;let f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==e&&h){let d=new Event("click",{bubbles:s});h.call(c,e),c.dispatchEvent(d)}},[u,e,s]),(0,j.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:i,style:{...r.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});re.displayName=Me;function ae(a){return a?"checked":"unchecked"}var se=Z,We=te,Le=D(),Ge=L("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{default:"h-6 w-11 mb-1",sm:"h-4.5 w-8.5",xs:"h-4 w-7"}},defaultVariants:{size:"default"}}),Fe=L("pointer-events-none block rounded-full bg-background shadow-xs ring-0 transition-transform",{variants:{size:{default:"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",sm:"h-3.5 w-3.5 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",xs:"h-3 w-3 data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0"}},defaultVariants:{size:"default"}}),oe=m.forwardRef((a,t)=>{let e=(0,Le.c)(16),s,r,o;e[0]===a?(s=e[1],r=e[2],o=e[3]):({className:s,size:o,...r}=a,e[0]=a,e[1]=s,e[2]=r,e[3]=o);let n;e[4]!==s||e[5]!==o?(n=G(Ge({size:o}),s),e[4]=s,e[5]=o,e[6]=n):n=e[6];let i;e[7]===o?i=e[8]:(i=G(Fe({size:o})),e[7]=o,e[8]=i);let u;e[9]===i?u=e[10]:(u=(0,j.jsx)(We,{className:i}),e[9]=i,e[10]=u);let l;return e[11]!==r||e[12]!==t||e[13]!==n||e[14]!==u?(l=(0,j.jsx)(se,{className:n,...r,ref:t,children:u}),e[11]=r,e[12]=t,e[13]=n,e[14]=u,e[15]=l):l=e[15],l});oe.displayName=se.displayName;export{A as a,Re as c,ve as d,Ne as i,ge as l,Ue as n,Ae as o,_e as r,ke as s,oe as t,xe as u};
import{s as n}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-BGmjiNul.js";import{t as w}from"./compiler-runtime-DeeZ7FnK.js";import{t as g}from"./jsx-runtime-ZmTK25f3.js";import{t as c}from"./cn-BKtXLv3a.js";var d=w(),f=n(h(),1),m=n(g(),1),i=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("w-full caption-bottom text-sm",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("div",{className:"w-full overflow-auto scrollbar-thin flex-1 print:overflow-hidden",children:(0,m.jsx)("table",{ref:o,className:l,...r})}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});i.displayName="Table";var b=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("[&_tr]:border-b bg-background",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("thead",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});b.displayName="TableHeader";var p=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("[&_tr:last-child]:border-0",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("tbody",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});p.displayName="TableBody";var v=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("bg-primary font-medium text-primary-foreground",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("tfoot",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});v.displayName="TableFooter";var N=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("border-b transition-colors bg-background hover:bg-(--slate-2) data-[state=selected]:bg-(--slate-3)",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("tr",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});N.displayName="TableRow";var u=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("th",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});u.displayName="TableHead";var x=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("p-1.5 align-middle [&:has([role=checkbox])]:pr-0",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("td",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});x.displayName="TableCell";var y=f.forwardRef((t,o)=>{let a=(0,d.c)(9),e,r;a[0]===t?(e=a[1],r=a[2]):({className:e,...r}=t,a[0]=t,a[1]=e,a[2]=r);let l;a[3]===e?l=a[4]:(l=c("mt-4 text-sm text-muted-foreground",e),a[3]=e,a[4]=l);let s;return a[5]!==r||a[6]!==o||a[7]!==l?(s=(0,m.jsx)("caption",{ref:o,className:l,...r}),a[5]=r,a[6]=o,a[7]=l,a[8]=s):s=a[8],s});y.displayName="TableCaption";export{b as a,u as i,p as n,N as o,x as r,i as t};
import{t}from"./createLucideIcon-CnW3RofX.js";var a=t("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]),h=t("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]),e=t("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);export{h as n,a as r,e as t};
import{t}from"./tcl-D5FopUjH.js";export{t as tcl};
function s(r){for(var t={},n=r.split(" "),e=0;e<n.length;++e)t[n[e]]=!0;return t}var f=s("Tcl safe after append array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd close concat continue dde eof encoding error eval exec exit expr fblocked fconfigure fcopy file fileevent filename filename flush for foreach format gets glob global history http if incr info interp join lappend lindex linsert list llength load lrange lreplace lsearch lset lsort memory msgcat namespace open package parray pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp registry regsub rename resource return scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest tclvars tell time trace unknown unset update uplevel upvar variable vwait"),u=s("if elseif else and not or eq ne in ni for foreach while switch"),c=/[+\-*&%=<>!?^\/\|]/;function i(r,t,n){return t.tokenize=n,n(r,t)}function o(r,t){var n=t.beforeParams;t.beforeParams=!1;var e=r.next();if((e=='"'||e=="'")&&t.inParams)return i(r,t,m(e));if(/[\[\]{}\(\),;\.]/.test(e))return e=="("&&n?t.inParams=!0:e==")"&&(t.inParams=!1),null;if(/\d/.test(e))return r.eatWhile(/[\w\.]/),"number";if(e=="#")return r.eat("*")?i(r,t,p):e=="#"&&r.match(/ *\[ *\[/)?i(r,t,d):(r.skipToEnd(),"comment");if(e=='"')return r.skipTo(/"/),"comment";if(e=="$")return r.eatWhile(/[$_a-z0-9A-Z\.{:]/),r.eatWhile(/}/),t.beforeParams=!0,"builtin";if(c.test(e))return r.eatWhile(c),"comment";r.eatWhile(/[\w\$_{}\xa1-\uffff]/);var a=r.current().toLowerCase();return f&&f.propertyIsEnumerable(a)?"keyword":u&&u.propertyIsEnumerable(a)?(t.beforeParams=!0,"keyword"):null}function m(r){return function(t,n){for(var e=!1,a,l=!1;(a=t.next())!=null;){if(a==r&&!e){l=!0;break}e=!e&&a=="\\"}return l&&(n.tokenize=o),"string"}}function p(r,t){for(var n=!1,e;e=r.next();){if(e=="#"&&n){t.tokenize=o;break}n=e=="*"}return"comment"}function d(r,t){for(var n=0,e;e=r.next();){if(e=="#"&&n==2){t.tokenize=o;break}e=="]"?n++:e!=" "&&(n=0)}return"meta"}const k={name:"tcl",startState:function(){return{tokenize:o,beforeParams:!1,inParams:!1}},token:function(r,t){return r.eatSpace()?null:t.tokenize(r,t)},languageData:{commentTokens:{line:"#"}}};export{k as t};

Sorry, the diff of this file is too big to display

import{s as cr}from"./chunk-LvLJmgfZ.js";import{t as lt}from"./react-BGmjiNul.js";import{Yn as nt}from"./cells-BpZ7g6ok.js";import{G as ut,K as ot,q as dt}from"./zod-Cg4WLWh2.js";import{t as mr}from"./compiler-runtime-DeeZ7FnK.js";import{t as ft}from"./jsx-runtime-ZmTK25f3.js";import{i as ct,r as mt}from"./button-YC1gW_kJ.js";import{t as de}from"./cn-BKtXLv3a.js";import{t as yt}from"./createLucideIcon-CnW3RofX.js";import{S as gt}from"./Combination-CMPwuAmi.js";import{t as pt}from"./tooltip-CEc2ajau.js";import{t as vt}from"./useDebounce-D5NcotGm.js";import{t as ht}from"./label-Be1daUcS.js";var bt=yt("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),x=cr(lt(),1),pe=r=>r.type==="checkbox",le=r=>r instanceof Date,q=r=>r==null,yr=r=>typeof r=="object",O=r=>!q(r)&&!Array.isArray(r)&&yr(r)&&!le(r),gr=r=>O(r)&&r.target?pe(r.target)?r.target.checked:r.target.value:r,_t=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,pr=(r,a)=>r.has(_t(a)),xt=r=>{let a=r.constructor&&r.constructor.prototype;return O(a)&&a.hasOwnProperty("isPrototypeOf")},Te=typeof window<"u"&&window.HTMLElement!==void 0&&typeof document<"u";function B(r){let a,e=Array.isArray(r),t=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)a=new Date(r);else if(r instanceof Set)a=new Set(r);else if(!(Te&&(r instanceof Blob||t))&&(e||O(r)))if(a=e?[]:{},!e&&!xt(r))a=r;else for(let s in r)r.hasOwnProperty(s)&&(a[s]=B(r[s]));else return r;return a}var ve=r=>Array.isArray(r)?r.filter(Boolean):[],E=r=>r===void 0,m=(r,a,e)=>{if(!a||!O(r))return e;let t=ve(a.split(/[,[\].]+?/)).reduce((s,l)=>q(s)?s:s[l],r);return E(t)||t===r?E(r[a])?e:r[a]:t},G=r=>typeof r=="boolean",Me=r=>/^\w*$/.test(r),vr=r=>ve(r.replace(/["|']|\]/g,"").split(/\.|\[/)),D=(r,a,e)=>{let t=-1,s=Me(a)?[a]:vr(a),l=s.length,n=l-1;for(;++t<l;){let o=s[t],f=e;if(t!==n){let c=r[o];f=O(c)||Array.isArray(c)?c:isNaN(+s[t+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;r[o]=f,r=r[o]}return r},Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Y={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ee={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},hr=x.createContext(null),ne=()=>x.useContext(hr),br=r=>{let{children:a,...e}=r;return x.createElement(hr.Provider,{value:e},a)},_r=(r,a,e,t=!0)=>{let s={defaultValues:a._defaultValues};for(let l in r)Object.defineProperty(s,l,{get:()=>{let n=l;return a._proxyFormState[n]!==Y.all&&(a._proxyFormState[n]=!t||Y.all),e&&(e[n]=!0),r[n]}});return s},$=r=>O(r)&&!Object.keys(r).length,xr=(r,a,e,t)=>{e(r);let{name:s,...l}=r;return $(l)||Object.keys(l).length>=Object.keys(a).length||Object.keys(l).find(n=>a[n]===(!t||Y.all))},H=r=>Array.isArray(r)?r:[r],Vr=(r,a,e)=>!r||!a||r===a||H(r).some(t=>t&&(e?t===a:t.startsWith(a)||a.startsWith(t)));function Se(r){let a=x.useRef(r);a.current=r,x.useEffect(()=>{let e=!r.disabled&&a.current.subject&&a.current.subject.subscribe({next:a.current.next});return()=>{e&&e.unsubscribe()}},[r.disabled])}function Vt(r){let a=ne(),{control:e=a.control,disabled:t,name:s,exact:l}=r||{},[n,o]=x.useState(e._formState),f=x.useRef(!0),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),b=x.useRef(s);return b.current=s,Se({disabled:t,next:_=>f.current&&Vr(b.current,_.name,l)&&xr(_,c.current,e._updateFormState)&&o({...e._formState,..._}),subject:e._subjects.state}),x.useEffect(()=>(f.current=!0,c.current.isValid&&e._updateValid(!0),()=>{f.current=!1}),[e]),x.useMemo(()=>_r(n,e,c.current,!1),[n,e])}var Z=r=>typeof r=="string",Ar=(r,a,e,t,s)=>Z(r)?(t&&a.watch.add(r),m(e,r,s)):Array.isArray(r)?r.map(l=>(t&&a.watch.add(l),m(e,l))):(t&&(a.watchAll=!0),e);function Fr(r){let a=ne(),{control:e=a.control,name:t,defaultValue:s,disabled:l,exact:n}=r||{},o=x.useRef(t);o.current=t,Se({disabled:l,subject:e._subjects.values,next:b=>{Vr(o.current,b.name,n)&&c(B(Ar(o.current,e._names,b.values||e._formValues,!1,s)))}});let[f,c]=x.useState(e._getWatch(t,s));return x.useEffect(()=>e._removeUnmounted()),f}function At(r){let a=ne(),{name:e,disabled:t,control:s=a.control,shouldUnregister:l}=r,n=pr(s._names.array,e),o=Fr({control:s,name:e,defaultValue:m(s._formValues,e,m(s._defaultValues,e,r.defaultValue)),exact:!0}),f=Vt({control:s,name:e,exact:!0}),c=x.useRef(s.register(e,{...r.rules,value:o,...G(r.disabled)?{disabled:r.disabled}:{}})),b=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(f.errors,e)},isDirty:{enumerable:!0,get:()=>!!m(f.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!m(f.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!m(f.validatingFields,e)},error:{enumerable:!0,get:()=>m(f.errors,e)}}),[f,e]),_=x.useMemo(()=>({name:e,value:o,...G(t)||f.disabled?{disabled:f.disabled||t}:{},onChange:N=>c.current.onChange({target:{value:gr(N),name:e},type:Fe.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:m(s._formValues,e),name:e},type:Fe.BLUR}),ref:N=>{let k=m(s._fields,e);k&&N&&(k._f.ref={focus:()=>N.focus(),select:()=>N.select(),setCustomValidity:v=>N.setCustomValidity(v),reportValidity:()=>N.reportValidity()})}}),[e,s._formValues,t,f.disabled,o,s._fields]);return x.useEffect(()=>{let N=s._options.shouldUnregister||l,k=(v,h)=>{let A=m(s._fields,v);A&&A._f&&(A._f.mount=h)};if(k(e,!0),N){let v=B(m(s._options.defaultValues,e));D(s._defaultValues,e,v),E(m(s._formValues,e))&&D(s._formValues,e,v)}return!n&&s.register(e),()=>{(n?N&&!s._state.action:N)?s.unregister(e):k(e,!1)}},[e,s,n,l]),x.useEffect(()=>{s._updateDisabledField({disabled:t,fields:s._fields,name:e})},[t,e,s]),x.useMemo(()=>({field:_,formState:f,fieldState:b}),[_,f,b])}var Ft=r=>r.render(At(r)),Be=(r,a,e,t,s)=>a?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[t]:s||!0}}:{},ae=()=>{let r=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let e=(Math.random()*16+r)%16|0;return(a=="x"?e:e&3|8).toString(16)})},Le=(r,a,e={})=>e.shouldFocus||E(e.shouldFocus)?e.focusName||`${r}.${E(e.focusIndex)?a:e.focusIndex}.`:"",he=r=>({isOnSubmit:!r||r===Y.onSubmit,isOnBlur:r===Y.onBlur,isOnChange:r===Y.onChange,isOnAll:r===Y.all,isOnTouch:r===Y.onTouched}),Re=(r,a,e)=>!e&&(a.watchAll||a.watch.has(r)||[...a.watch].some(t=>r.startsWith(t)&&/^\.\w+/.test(r.slice(t.length)))),fe=(r,a,e,t)=>{for(let s of e||Object.keys(r)){let l=m(r,s);if(l){let{_f:n,...o}=l;if(n){if(n.refs&&n.refs[0]&&a(n.refs[0],s)&&!t||n.ref&&a(n.ref,n.name)&&!t)return!0;if(fe(o,a))break}else if(O(o)&&fe(o,a))break}}},Sr=(r,a,e)=>{let t=H(m(r,e));return D(t,"root",a[e]),D(r,e,t),r},Ie=r=>r.type==="file",Q=r=>typeof r=="function",we=r=>{if(!Te)return!1;let a=r?r.ownerDocument:0;return r instanceof(a&&a.defaultView?a.defaultView.HTMLElement:HTMLElement)},ke=r=>Z(r),Pe=r=>r.type==="radio",De=r=>r instanceof RegExp,wr={value:!1,isValid:!1},kr={value:!0,isValid:!0},Dr=r=>{if(Array.isArray(r)){if(r.length>1){let a=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:a,isValid:!!a.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!E(r[0].attributes.value)?E(r[0].value)||r[0].value===""?kr:{value:r[0].value,isValid:!0}:kr:wr}return wr},jr={isValid:!1,value:null},Nr=r=>Array.isArray(r)?r.reduce((a,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:a,jr):jr;function Cr(r,a,e="validate"){if(ke(r)||Array.isArray(r)&&r.every(ke)||G(r)&&!r)return{type:e,message:ke(r)?r:"",ref:a}}var ce=r=>O(r)&&!De(r)?r:{value:r,message:""},qe=async(r,a,e,t,s,l)=>{let{ref:n,refs:o,required:f,maxLength:c,minLength:b,min:_,max:N,pattern:k,validate:v,name:h,valueAsNumber:A,mount:j}=r._f,w=m(e,h);if(!j||a.has(h))return{};let W=o?o[0]:n,X=F=>{s&&W.reportValidity&&(W.setCustomValidity(G(F)?"":F||""),W.reportValidity())},T={},ue=Pe(n),Ve=pe(n),ie=ue||Ve,oe=(A||Ie(n))&&E(n.value)&&E(w)||we(n)&&n.value===""||w===""||Array.isArray(w)&&!w.length,z=Be.bind(null,h,t,T),Ae=(F,C,M,R=ee.maxLength,J=ee.minLength)=>{let K=F?C:M;T[h]={type:F?R:J,message:K,ref:n,...z(F?R:J,K)}};if(l?!Array.isArray(w)||!w.length:f&&(!ie&&(oe||q(w))||G(w)&&!w||Ve&&!Dr(o).isValid||ue&&!Nr(o).isValid)){let{value:F,message:C}=ke(f)?{value:!!f,message:f}:ce(f);if(F&&(T[h]={type:ee.required,message:C,ref:W,...z(ee.required,C)},!t))return X(C),T}if(!oe&&(!q(_)||!q(N))){let F,C,M=ce(N),R=ce(_);if(!q(w)&&!isNaN(w)){let J=n.valueAsNumber||w&&+w;q(M.value)||(F=J>M.value),q(R.value)||(C=J<R.value)}else{let J=n.valueAsDate||new Date(w),K=ge=>new Date(new Date().toDateString()+" "+ge),me=n.type=="time",ye=n.type=="week";Z(M.value)&&w&&(F=me?K(w)>K(M.value):ye?w>M.value:J>new Date(M.value)),Z(R.value)&&w&&(C=me?K(w)<K(R.value):ye?w<R.value:J<new Date(R.value))}if((F||C)&&(Ae(!!F,M.message,R.message,ee.max,ee.min),!t))return X(T[h].message),T}if((c||b)&&!oe&&(Z(w)||l&&Array.isArray(w))){let F=ce(c),C=ce(b),M=!q(F.value)&&w.length>+F.value,R=!q(C.value)&&w.length<+C.value;if((M||R)&&(Ae(M,F.message,C.message),!t))return X(T[h].message),T}if(k&&!oe&&Z(w)){let{value:F,message:C}=ce(k);if(De(F)&&!w.match(F)&&(T[h]={type:ee.pattern,message:C,ref:n,...z(ee.pattern,C)},!t))return X(C),T}if(v){if(Q(v)){let F=Cr(await v(w,e),W);if(F&&(T[h]={...F,...z(ee.validate,F.message)},!t))return X(F.message),T}else if(O(v)){let F={};for(let C in v){if(!$(F)&&!t)break;let M=Cr(await v[C](w,e),W,C);M&&(F={...M,...z(C,M.message)},X(M.message),t&&(T[h]=F))}if(!$(F)&&(T[h]={ref:W,...F},!t))return T}}return X(!0),T},$e=(r,a)=>[...r,...H(a)],He=r=>Array.isArray(r)?r.map(()=>{}):void 0;function We(r,a,e){return[...r.slice(0,a),...H(e),...r.slice(a)]}var ze=(r,a,e)=>Array.isArray(r)?(E(r[e])&&(r[e]=void 0),r.splice(e,0,r.splice(a,1)[0]),r):[],Ke=(r,a)=>[...H(a),...H(r)];function St(r,a){let e=0,t=[...r];for(let s of a)t.splice(s-e,1),e++;return ve(t).length?t:[]}var Ge=(r,a)=>E(a)?[]:St(r,H(a).sort((e,t)=>e-t)),Ye=(r,a,e)=>{[r[a],r[e]]=[r[e],r[a]]};function wt(r,a){let e=a.slice(0,-1).length,t=0;for(;t<e;)r=E(r)?t++:r[a[t++]];return r}function kt(r){for(let a in r)if(r.hasOwnProperty(a)&&!E(r[a]))return!1;return!0}function U(r,a){let e=Array.isArray(a)?a:Me(a)?[a]:vr(a),t=e.length===1?r:wt(r,e),s=e.length-1,l=e[s];return t&&delete t[l],s!==0&&(O(t)&&$(t)||Array.isArray(t)&&kt(t))&&U(r,e.slice(0,-1)),r}var Er=(r,a,e)=>(r[a]=e,r);function Dt(r){let a=ne(),{control:e=a.control,name:t,keyName:s="id",shouldUnregister:l,rules:n}=r,[o,f]=x.useState(e._getFieldArray(t)),c=x.useRef(e._getFieldArray(t).map(ae)),b=x.useRef(o),_=x.useRef(t),N=x.useRef(!1);_.current=t,b.current=o,e._names.array.add(t),n&&e.register(t,n),Se({next:({values:v,name:h})=>{if(h===_.current||!h){let A=m(v,_.current);Array.isArray(A)&&(f(A),c.current=A.map(ae))}},subject:e._subjects.array});let k=x.useCallback(v=>{N.current=!0,e._updateFieldArray(t,v)},[e,t]);return x.useEffect(()=>{if(e._state.action=!1,Re(t,e._names)&&e._subjects.state.next({...e._formState}),N.current&&(!he(e._options.mode).isOnSubmit||e._formState.isSubmitted))if(e._options.resolver)e._executeSchema([t]).then(v=>{let h=m(v.errors,t),A=m(e._formState.errors,t);(A?!h&&A.type||h&&(A.type!==h.type||A.message!==h.message):h&&h.type)&&(h?D(e._formState.errors,t,h):U(e._formState.errors,t),e._subjects.state.next({errors:e._formState.errors}))});else{let v=m(e._fields,t);v&&v._f&&!(he(e._options.reValidateMode).isOnSubmit&&he(e._options.mode).isOnSubmit)&&qe(v,e._names.disabled,e._formValues,e._options.criteriaMode===Y.all,e._options.shouldUseNativeValidation,!0).then(h=>!$(h)&&e._subjects.state.next({errors:Sr(e._formState.errors,h,t)}))}e._subjects.values.next({name:t,values:{...e._formValues}}),e._names.focus&&fe(e._fields,(v,h)=>{if(e._names.focus&&h.startsWith(e._names.focus)&&v.focus)return v.focus(),1}),e._names.focus="",e._updateValid(),N.current=!1},[o,t,e]),x.useEffect(()=>(!m(e._formValues,t)&&e._updateFieldArray(t),()=>{(e._options.shouldUnregister||l)&&e.unregister(t)}),[t,e,s,l]),{swap:x.useCallback((v,h)=>{let A=e._getFieldArray(t);Ye(A,v,h),Ye(c.current,v,h),k(A),f(A),e._updateFieldArray(t,A,Ye,{argA:v,argB:h},!1)},[k,t,e]),move:x.useCallback((v,h)=>{let A=e._getFieldArray(t);ze(A,v,h),ze(c.current,v,h),k(A),f(A),e._updateFieldArray(t,A,ze,{argA:v,argB:h},!1)},[k,t,e]),prepend:x.useCallback((v,h)=>{let A=H(B(v)),j=Ke(e._getFieldArray(t),A);e._names.focus=Le(t,0,h),c.current=Ke(c.current,A.map(ae)),k(j),f(j),e._updateFieldArray(t,j,Ke,{argA:He(v)})},[k,t,e]),append:x.useCallback((v,h)=>{let A=H(B(v)),j=$e(e._getFieldArray(t),A);e._names.focus=Le(t,j.length-1,h),c.current=$e(c.current,A.map(ae)),k(j),f(j),e._updateFieldArray(t,j,$e,{argA:He(v)})},[k,t,e]),remove:x.useCallback(v=>{let h=Ge(e._getFieldArray(t),v);c.current=Ge(c.current,v),k(h),f(h),!Array.isArray(m(e._fields,t))&&D(e._fields,t,void 0),e._updateFieldArray(t,h,Ge,{argA:v})},[k,t,e]),insert:x.useCallback((v,h,A)=>{let j=H(B(h)),w=We(e._getFieldArray(t),v,j);e._names.focus=Le(t,v,A),c.current=We(c.current,v,j.map(ae)),k(w),f(w),e._updateFieldArray(t,w,We,{argA:v,argB:He(h)})},[k,t,e]),update:x.useCallback((v,h)=>{let A=B(h),j=Er(e._getFieldArray(t),v,A);c.current=[...j].map((w,W)=>!w||W===v?ae():c.current[W]),k(j),f([...j]),e._updateFieldArray(t,j,Er,{argA:v,argB:A},!0,!1)},[k,t,e]),replace:x.useCallback(v=>{let h=H(B(v));c.current=h.map(ae),k([...h]),f([...h]),e._updateFieldArray(t,[...h],A=>A,{},!0,!1)},[k,t,e]),fields:x.useMemo(()=>o.map((v,h)=>({...v,[s]:c.current[h]||ae()})),[o,s])}}var Je=()=>{let r=[];return{get observers(){return r},next:a=>{for(let e of r)e.next&&e.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(e=>e!==a)}}),unsubscribe:()=>{r=[]}}},Ze=r=>q(r)||!yr(r);function se(r,a){if(Ze(r)||Ze(a))return r===a;if(le(r)&&le(a))return r.getTime()===a.getTime();let e=Object.keys(r),t=Object.keys(a);if(e.length!==t.length)return!1;for(let s of e){let l=r[s];if(!t.includes(s))return!1;if(s!=="ref"){let n=a[s];if(le(l)&&le(n)||O(l)&&O(n)||Array.isArray(l)&&Array.isArray(n)?!se(l,n):l!==n)return!1}}return!0}var Or=r=>r.type==="select-multiple",jt=r=>Pe(r)||pe(r),Qe=r=>we(r)&&r.isConnected,Ur=r=>{for(let a in r)if(Q(r[a]))return!0;return!1};function je(r,a={}){let e=Array.isArray(r);if(O(r)||e)for(let t in r)Array.isArray(r[t])||O(r[t])&&!Ur(r[t])?(a[t]=Array.isArray(r[t])?[]:{},je(r[t],a[t])):q(r[t])||(a[t]=!0);return a}function Tr(r,a,e){let t=Array.isArray(r);if(O(r)||t)for(let s in r)Array.isArray(r[s])||O(r[s])&&!Ur(r[s])?E(a)||Ze(e[s])?e[s]=Array.isArray(r[s])?je(r[s],[]):{...je(r[s])}:Tr(r[s],q(a)?{}:a[s],e[s]):e[s]=!se(r[s],a[s]);return e}var be=(r,a)=>Tr(r,a,je(a)),Mr=(r,{valueAsNumber:a,valueAsDate:e,setValueAs:t})=>E(r)?r:a?r===""?NaN:r&&+r:e&&Z(r)?new Date(r):t?t(r):r;function Xe(r){let a=r.ref;return Ie(a)?a.files:Pe(a)?Nr(r.refs).value:Or(a)?[...a.selectedOptions].map(({value:e})=>e):pe(a)?Dr(r.refs).value:Mr(E(a.value)?r.ref.value:a.value,r)}var Nt=(r,a,e,t)=>{let s={};for(let l of r){let n=m(a,l);n&&D(s,l,n._f)}return{criteriaMode:e,names:[...r],fields:s,shouldUseNativeValidation:t}},_e=r=>E(r)?r:De(r)?r.source:O(r)?De(r.value)?r.value.source:r.value:r,Br="AsyncFunction",Ct=r=>!!r&&!!r.validate&&!!(Q(r.validate)&&r.validate.constructor.name===Br||O(r.validate)&&Object.values(r.validate).find(a=>a.constructor.name===Br)),Et=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate);function Lr(r,a,e){let t=m(r,e);if(t||Me(e))return{error:t,name:e};let s=e.split(".");for(;s.length;){let l=s.join("."),n=m(a,l),o=m(r,l);if(n&&!Array.isArray(n)&&e!==l)return{name:e};if(o&&o.type)return{name:l,error:o};s.pop()}return{name:e}}var Ot=(r,a,e,t,s)=>s.isOnAll?!1:!e&&s.isOnTouch?!(a||r):(e?t.isOnBlur:s.isOnBlur)?!r:(e?t.isOnChange:s.isOnChange)?r:!0,Ut=(r,a)=>!ve(m(r,a)).length&&U(r,a),Tt={mode:Y.onSubmit,reValidateMode:Y.onChange,shouldFocusError:!0};function Mt(r={}){let a={...Tt,...r},e={submitCount:0,isDirty:!1,isLoading:Q(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:a.errors||{},disabled:a.disabled||!1},t={},s=(O(a.defaultValues)||O(a.values))&&B(a.defaultValues||a.values)||{},l=a.shouldUnregister?{}:B(s),n={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,c=0,b={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},_={values:Je(),array:Je(),state:Je()},N=he(a.mode),k=he(a.reValidateMode),v=a.criteriaMode===Y.all,h=i=>u=>{clearTimeout(c),c=setTimeout(i,u)},A=async i=>{if(!a.disabled&&(b.isValid||i)){let u=a.resolver?$((await ie()).errors):await z(t,!0);u!==e.isValid&&_.state.next({isValid:u})}},j=(i,u)=>{!a.disabled&&(b.isValidating||b.validatingFields)&&((i||Array.from(o.mount)).forEach(d=>{d&&(u?D(e.validatingFields,d,u):U(e.validatingFields,d))}),_.state.next({validatingFields:e.validatingFields,isValidating:!$(e.validatingFields)}))},w=(i,u=[],d,p,g=!0,y=!0)=>{if(p&&d&&!a.disabled){if(n.action=!0,y&&Array.isArray(m(t,i))){let V=d(m(t,i),p.argA,p.argB);g&&D(t,i,V)}if(y&&Array.isArray(m(e.errors,i))){let V=d(m(e.errors,i),p.argA,p.argB);g&&D(e.errors,i,V),Ut(e.errors,i)}if(b.touchedFields&&y&&Array.isArray(m(e.touchedFields,i))){let V=d(m(e.touchedFields,i),p.argA,p.argB);g&&D(e.touchedFields,i,V)}b.dirtyFields&&(e.dirtyFields=be(s,l)),_.state.next({name:i,isDirty:F(i,u),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else D(l,i,u)},W=(i,u)=>{D(e.errors,i,u),_.state.next({errors:e.errors})},X=i=>{e.errors=i,_.state.next({errors:e.errors,isValid:!1})},T=(i,u,d,p)=>{let g=m(t,i);if(g){let y=m(l,i,E(d)?m(s,i):d);E(y)||p&&p.defaultChecked||u?D(l,i,u?y:Xe(g._f)):R(i,y),n.mount&&A()}},ue=(i,u,d,p,g)=>{let y=!1,V=!1,S={name:i};if(!a.disabled){let I=!!(m(t,i)&&m(t,i)._f&&m(t,i)._f.disabled);if(!d||p){b.isDirty&&(V=e.isDirty,e.isDirty=S.isDirty=F(),y=V!==S.isDirty);let L=I||se(m(s,i),u);V=!!(!I&&m(e.dirtyFields,i)),L||I?U(e.dirtyFields,i):D(e.dirtyFields,i,!0),S.dirtyFields=e.dirtyFields,y||(y=b.dirtyFields&&V!==!L)}if(d){let L=m(e.touchedFields,i);L||(D(e.touchedFields,i,d),S.touchedFields=e.touchedFields,y||(y=b.touchedFields&&L!==d))}y&&g&&_.state.next(S)}return y?S:{}},Ve=(i,u,d,p)=>{let g=m(e.errors,i),y=b.isValid&&G(u)&&e.isValid!==u;if(a.delayError&&d?(f=h(()=>W(i,d)),f(a.delayError)):(clearTimeout(c),f=null,d?D(e.errors,i,d):U(e.errors,i)),(d?!se(g,d):g)||!$(p)||y){let V={...p,...y&&G(u)?{isValid:u}:{},errors:e.errors,name:i};e={...e,...V},_.state.next(V)}},ie=async i=>{j(i,!0);let u=await a.resolver(l,a.context,Nt(i||o.mount,t,a.criteriaMode,a.shouldUseNativeValidation));return j(i),u},oe=async i=>{let{errors:u}=await ie(i);if(i)for(let d of i){let p=m(u,d);p?D(e.errors,d,p):U(e.errors,d)}else e.errors=u;return u},z=async(i,u,d={valid:!0})=>{for(let p in i){let g=i[p];if(g){let{_f:y,...V}=g;if(y){let S=o.array.has(y.name),I=g._f&&Ct(g._f);I&&b.validatingFields&&j([p],!0);let L=await qe(g,o.disabled,l,v,a.shouldUseNativeValidation&&!u,S);if(I&&b.validatingFields&&j([p]),L[y.name]&&(d.valid=!1,u))break;!u&&(m(L,y.name)?S?Sr(e.errors,L,y.name):D(e.errors,y.name,L[y.name]):U(e.errors,y.name))}!$(V)&&await z(V,u,d)}}return d.valid},Ae=()=>{for(let i of o.unMount){let u=m(t,i);u&&(u._f.refs?u._f.refs.every(d=>!Qe(d)):!Qe(u._f.ref))&&Ce(i)}o.unMount=new Set},F=(i,u)=>!a.disabled&&(i&&u&&D(l,i,u),!se(tr(),s)),C=(i,u,d)=>Ar(i,o,{...n.mount?l:E(u)?s:Z(i)?{[i]:u}:u},d,u),M=i=>ve(m(n.mount?l:s,i,a.shouldUnregister?m(s,i,[]):[])),R=(i,u,d={})=>{let p=m(t,i),g=u;if(p){let y=p._f;y&&(!y.disabled&&D(l,i,Mr(u,y)),g=we(y.ref)&&q(u)?"":u,Or(y.ref)?[...y.ref.options].forEach(V=>V.selected=g.includes(V.value)):y.refs?pe(y.ref)?y.refs.length>1?y.refs.forEach(V=>(!V.defaultChecked||!V.disabled)&&(V.checked=Array.isArray(g)?!!g.find(S=>S===V.value):g===V.value)):y.refs[0]&&(y.refs[0].checked=!!g):y.refs.forEach(V=>V.checked=V.value===g):Ie(y.ref)?y.ref.value="":(y.ref.value=g,y.ref.type||_.values.next({name:i,values:{...l}})))}(d.shouldDirty||d.shouldTouch)&&ue(i,g,d.shouldTouch,d.shouldDirty,!0),d.shouldValidate&&ge(i)},J=(i,u,d)=>{for(let p in u){let g=u[p],y=`${i}.${p}`,V=m(t,y);(o.array.has(i)||O(g)||V&&!V._f)&&!le(g)?J(y,g,d):R(y,g,d)}},K=(i,u,d={})=>{let p=m(t,i),g=o.array.has(i),y=B(u);D(l,i,y),g?(_.array.next({name:i,values:{...l}}),(b.isDirty||b.dirtyFields)&&d.shouldDirty&&_.state.next({name:i,dirtyFields:be(s,l),isDirty:F(i,y)})):p&&!p._f&&!q(y)?J(i,y,d):R(i,y,d),Re(i,o)&&_.state.next({...e}),_.values.next({name:n.mount?i:void 0,values:{...l}})},me=async i=>{n.mount=!0;let u=i.target,d=u.name,p=!0,g=m(t,d),y=()=>u.type?Xe(g._f):gr(i),V=S=>{p=Number.isNaN(S)||le(S)&&isNaN(S.getTime())||se(S,m(l,d,S))};if(g){let S,I,L=y(),te=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,at=!Et(g._f)&&!a.resolver&&!m(e.errors,d)&&!g._f.deps||Ot(te,m(e.touchedFields,d),e.isSubmitted,k,N),Oe=Re(d,o,te);D(l,d,L),te?(g._f.onBlur&&g._f.onBlur(i),f&&f(0)):g._f.onChange&&g._f.onChange(i);let Ue=ue(d,L,te,!1),st=!$(Ue)||Oe;if(!te&&_.values.next({name:d,type:i.type,values:{...l}}),at)return b.isValid&&(a.mode==="onBlur"&&te?A():te||A()),st&&_.state.next({name:d,...Oe?{}:Ue});if(!te&&Oe&&_.state.next({...e}),a.resolver){let{errors:dr}=await ie([d]);if(V(L),p){let it=Lr(e.errors,t,d),fr=Lr(dr,t,it.name||d);S=fr.error,d=fr.name,I=$(dr)}}else j([d],!0),S=(await qe(g,o.disabled,l,v,a.shouldUseNativeValidation))[d],j([d]),V(L),p&&(S?I=!1:b.isValid&&(I=await z(t,!0)));p&&(g._f.deps&&ge(g._f.deps),Ve(d,I,S,Ue))}},ye=(i,u)=>{if(m(e.errors,u)&&i.focus)return i.focus(),1},ge=async(i,u={})=>{let d,p,g=H(i);if(a.resolver){let y=await oe(E(i)?i:g);d=$(y),p=i?!g.some(V=>m(y,V)):d}else i?(p=(await Promise.all(g.map(async y=>{let V=m(t,y);return await z(V&&V._f?{[y]:V}:V)}))).every(Boolean),!(!p&&!e.isValid)&&A()):p=d=await z(t);return _.state.next({...!Z(i)||b.isValid&&d!==e.isValid?{}:{name:i},...a.resolver||!i?{isValid:d}:{},errors:e.errors}),u.shouldFocus&&!p&&fe(t,ye,i?g:o.mount),p},tr=i=>{let u={...n.mount?l:s};return E(i)?u:Z(i)?m(u,i):i.map(d=>m(u,d))},ar=(i,u)=>({invalid:!!m((u||e).errors,i),isDirty:!!m((u||e).dirtyFields,i),error:m((u||e).errors,i),isValidating:!!m(e.validatingFields,i),isTouched:!!m((u||e).touchedFields,i)}),Xr=i=>{i&&H(i).forEach(u=>U(e.errors,u)),_.state.next({errors:i?e.errors:{}})},sr=(i,u,d)=>{let p=(m(t,i,{_f:{}})._f||{}).ref,{ref:g,message:y,type:V,...S}=m(e.errors,i)||{};D(e.errors,i,{...S,...u,ref:p}),_.state.next({name:i,errors:e.errors,isValid:!1}),d&&d.shouldFocus&&p&&p.focus&&p.focus()},et=(i,u)=>Q(i)?_.values.subscribe({next:d=>i(C(void 0,u),d)}):C(i,u,!0),Ce=(i,u={})=>{for(let d of i?H(i):o.mount)o.mount.delete(d),o.array.delete(d),u.keepValue||(U(t,d),U(l,d)),!u.keepError&&U(e.errors,d),!u.keepDirty&&U(e.dirtyFields,d),!u.keepTouched&&U(e.touchedFields,d),!u.keepIsValidating&&U(e.validatingFields,d),!a.shouldUnregister&&!u.keepDefaultValue&&U(s,d);_.values.next({values:{...l}}),_.state.next({...e,...u.keepDirty?{isDirty:F()}:{}}),!u.keepIsValid&&A()},ir=({disabled:i,name:u,field:d,fields:p})=>{(G(i)&&n.mount||i||o.disabled.has(u))&&(i?o.disabled.add(u):o.disabled.delete(u),ue(u,Xe(d?d._f:m(p,u)._f),!1,!1,!0))},Ee=(i,u={})=>{let d=m(t,i),p=G(u.disabled)||G(a.disabled);return D(t,i,{...d||{},_f:{...d&&d._f?d._f:{ref:{name:i}},name:i,mount:!0,...u}}),o.mount.add(i),d?ir({field:d,disabled:G(u.disabled)?u.disabled:a.disabled,name:i}):T(i,!0,u.value),{...p?{disabled:u.disabled||a.disabled}:{},...a.progressive?{required:!!u.required,min:_e(u.min),max:_e(u.max),minLength:_e(u.minLength),maxLength:_e(u.maxLength),pattern:_e(u.pattern)}:{},name:i,onChange:me,onBlur:me,ref:g=>{if(g){Ee(i,u),d=m(t,i);let y=E(g.value)&&g.querySelectorAll&&g.querySelectorAll("input,select,textarea")[0]||g,V=jt(y),S=d._f.refs||[];if(V?S.find(I=>I===y):y===d._f.ref)return;D(t,i,{_f:{...d._f,...V?{refs:[...S.filter(Qe),y,...Array.isArray(m(s,i))?[{}]:[]],ref:{type:y.type,name:i}}:{ref:y}}}),T(i,!1,void 0,y)}else d=m(t,i,{}),d._f&&(d._f.mount=!1),(a.shouldUnregister||u.shouldUnregister)&&!(pr(o.array,i)&&n.action)&&o.unMount.add(i)}}},lr=()=>a.shouldFocusError&&fe(t,ye,o.mount),rt=i=>{G(i)&&(_.state.next({disabled:i}),fe(t,(u,d)=>{let p=m(t,d);p&&(u.disabled=p._f.disabled||i,Array.isArray(p._f.refs)&&p._f.refs.forEach(g=>{g.disabled=p._f.disabled||i}))},0,!1))},nr=(i,u)=>async d=>{let p;d&&(d.preventDefault&&d.preventDefault(),d.persist&&d.persist());let g=B(l);if(o.disabled.size)for(let y of o.disabled)D(g,y,void 0);if(_.state.next({isSubmitting:!0}),a.resolver){let{errors:y,values:V}=await ie();e.errors=y,g=V}else await z(t);if(U(e.errors,"root"),$(e.errors)){_.state.next({errors:{}});try{await i(g,d)}catch(y){p=y}}else u&&await u({...e.errors},d),lr(),setTimeout(lr);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$(e.errors)&&!p,submitCount:e.submitCount+1,errors:e.errors}),p)throw p},tt=(i,u={})=>{m(t,i)&&(E(u.defaultValue)?K(i,B(m(s,i))):(K(i,u.defaultValue),D(s,i,B(u.defaultValue))),u.keepTouched||U(e.touchedFields,i),u.keepDirty||(U(e.dirtyFields,i),e.isDirty=u.defaultValue?F(i,B(m(s,i))):F()),u.keepError||(U(e.errors,i),b.isValid&&A()),_.state.next({...e}))},ur=(i,u={})=>{let d=i?B(i):s,p=B(d),g=$(i),y=g?s:p;if(u.keepDefaultValues||(s=d),!u.keepValues){if(u.keepDirtyValues){let V=new Set([...o.mount,...Object.keys(be(s,l))]);for(let S of Array.from(V))m(e.dirtyFields,S)?D(y,S,m(l,S)):K(S,m(y,S))}else{if(Te&&E(i))for(let V of o.mount){let S=m(t,V);if(S&&S._f){let I=Array.isArray(S._f.refs)?S._f.refs[0]:S._f.ref;if(we(I)){let L=I.closest("form");if(L){L.reset();break}}}}t={}}l=a.shouldUnregister?u.keepDefaultValues?B(s):{}:B(y),_.array.next({values:{...y}}),_.values.next({values:{...y}})}o={mount:u.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},n.mount=!b.isValid||!!u.keepIsValid||!!u.keepDirtyValues,n.watch=!!a.shouldUnregister,_.state.next({submitCount:u.keepSubmitCount?e.submitCount:0,isDirty:g?!1:u.keepDirty?e.isDirty:!!(u.keepDefaultValues&&!se(i,s)),isSubmitted:u.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:g?{}:u.keepDirtyValues?u.keepDefaultValues&&l?be(s,l):e.dirtyFields:u.keepDefaultValues&&i?be(s,i):u.keepDirty?e.dirtyFields:{},touchedFields:u.keepTouched?e.touchedFields:{},errors:u.keepErrors?e.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},or=(i,u)=>ur(Q(i)?i(l):i,u);return{control:{register:Ee,unregister:Ce,getFieldState:ar,handleSubmit:nr,setError:sr,_executeSchema:ie,_getWatch:C,_getDirty:F,_updateValid:A,_removeUnmounted:Ae,_updateFieldArray:w,_updateDisabledField:ir,_getFieldArray:M,_reset:ur,_resetDefaultValues:()=>Q(a.defaultValues)&&a.defaultValues().then(i=>{or(i,a.resetOptions),_.state.next({isLoading:!1})}),_updateFormState:i=>{e={...e,...i}},_disableForm:rt,_subjects:_,_proxyFormState:b,_setErrors:X,get _fields(){return t},get _formValues(){return l},get _state(){return n},set _state(i){n=i},get _defaultValues(){return s},get _names(){return o},set _names(i){o=i},get _formState(){return e},set _formState(i){e=i},get _options(){return a},set _options(i){a={...a,...i}}},trigger:ge,register:Ee,handleSubmit:nr,watch:et,setValue:K,getValues:tr,reset:or,resetField:tt,clearErrors:Xr,unregister:Ce,setError:sr,setFocus:(i,u={})=>{let d=m(t,i),p=d&&d._f;if(p){let g=p.refs?p.refs[0]:p.ref;g.focus&&(g.focus(),u.shouldSelect&&Q(g.select)&&g.select())}},getFieldState:ar}}function Bt(r={}){let a=x.useRef(void 0),e=x.useRef(void 0),[t,s]=x.useState({isDirty:!1,isValidating:!1,isLoading:Q(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,defaultValues:Q(r.defaultValues)?void 0:r.defaultValues});a.current||(a.current={...Mt(r),formState:t});let l=a.current.control;return l._options=r,Se({subject:l._subjects.state,next:n=>{xr(n,l._proxyFormState,l._updateFormState,!0)&&s({...l._formState})}}),x.useEffect(()=>l._disableForm(r.disabled),[l,r.disabled]),x.useEffect(()=>{if(l._proxyFormState.isDirty){let n=l._getDirty();n!==t.isDirty&&l._subjects.state.next({isDirty:n})}},[l,t.isDirty]),x.useEffect(()=>{r.values&&!se(r.values,e.current)?(l._reset(r.values,l._options.resetOptions),e.current=r.values,s(n=>({...n}))):l._resetDefaultValues()},[r.values,l]),x.useEffect(()=>{r.errors&&l._setErrors(r.errors)},[r.errors,l]),x.useEffect(()=>{l._state.mount||(l._updateValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),x.useEffect(()=>{r.shouldUnregister&&l._subjects.values.next({values:l._getWatch()})},[r.shouldUnregister,l]),a.current.formState=_r(t,l),a.current}var Rr=(r,a,e)=>{if(r&&"reportValidity"in r){let t=m(e,a);r.setCustomValidity(t&&t.message||""),r.reportValidity()}},er=(r,a)=>{for(let e in a.fields){let t=a.fields[e];t&&t.ref&&"reportValidity"in t.ref?Rr(t.ref,e,r):t&&t.refs&&t.refs.forEach(s=>Rr(s,e,r))}},Ir=(r,a)=>{a.shouldUseNativeValidation&&er(r,a);let e={};for(let t in r){let s=m(a.fields,t),l=Object.assign(r[t]||{},{ref:s&&s.ref});if(Lt(a.names||Object.keys(r),t)){let n=Object.assign({},m(e,t));D(n,"root",l),D(e,t,n)}else D(e,t,l)}return e},Lt=(r,a)=>{let e=Pr(a);return r.some(t=>Pr(t).match(`^${e}\\.\\d+`))};function Pr(r){return r.replace(/\]|\[/g,"")}function qr(r,a){try{var e=r()}catch(t){return a(t)}return e&&e.then?e.then(void 0,a):e}function Rt(r,a){for(var e={};r.length;){var t=r[0],s=t.code,l=t.message,n=t.path.join(".");if(!e[n])if("unionErrors"in t){var o=t.unionErrors[0].errors[0];e[n]={message:o.message,type:o.code}}else e[n]={message:l,type:s};if("unionErrors"in t&&t.unionErrors.forEach(function(b){return b.errors.forEach(function(_){return r.push(_)})}),a){var f=e[n].types,c=f&&f[t.code];e[n]=Be(n,a,e,s,c?[].concat(c,t.message):t.message)}r.shift()}return e}function It(r,a){for(var e={};r.length;){var t=r[0],s=t.code,l=t.message,n=t.path.join(".");if(!e[n])if(t.code==="invalid_union"&&t.errors.length>0){var o=t.errors[0][0];e[n]={message:o.message,type:o.code}}else e[n]={message:l,type:s};if(t.code==="invalid_union"&&t.errors.forEach(function(b){return b.forEach(function(_){return r.push(_)})}),a){var f=e[n].types,c=f&&f[t.code];e[n]=Be(n,a,e,s,c?[].concat(c,t.message):t.message)}r.shift()}return e}function Pt(r,a,e){if(e===void 0&&(e={}),(function(t){return"_def"in t&&typeof t._def=="object"&&"typeName"in t._def})(r))return function(t,s,l){try{return Promise.resolve(qr(function(){return Promise.resolve(r[e.mode==="sync"?"parse":"parseAsync"](t,a)).then(function(n){return l.shouldUseNativeValidation&&er({},l),{errors:{},values:e.raw?Object.assign({},t):n}})},function(n){if((function(o){return Array.isArray(o==null?void 0:o.issues)})(n))return{values:{},errors:Ir(Rt(n.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw n}))}catch(n){return Promise.reject(n)}};if((function(t){return"_zod"in t&&typeof t._zod=="object"})(r))return function(t,s,l){try{return Promise.resolve(qr(function(){return Promise.resolve((e.mode==="sync"?ut:ot)(r,t,a)).then(function(n){return l.shouldUseNativeValidation&&er({},l),{errors:{},values:e.raw?Object.assign({},t):n}})},function(n){if((function(o){return o instanceof dt})(n))return{values:{},errors:Ir(It(n.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw n}))}catch(n){return Promise.reject(n)}};throw Error("Invalid input: not a Zod schema")}var re=mr(),P=cr(ft(),1),qt=br;const $t=()=>{let r=(0,re.c)(4),a=ne().formState.errors;if(Object.keys(a).length===0)return null;let e;r[0]===a?e=r[1]:(e=Object.values(a).map(Wt).filter(Boolean),r[0]=a,r[1]=e);let t=e.join(", "),s;return r[2]===t?s=r[3]:(s=(0,P.jsx)("div",{className:"text-destructive p-2 rounded-md bg-red-500/10",children:t}),r[2]=t,r[3]=s),s};var $r=x.createContext({}),Ht=r=>{let a=(0,re.c)(10),e;a[0]===r?e=a[1]:({...e}=r,a[0]=r,a[1]=e);let t;a[2]===e.name?t=a[3]:(t={name:e.name},a[2]=e.name,a[3]=t);let s;a[4]===e?s=a[5]:(s=(0,P.jsx)(Ft,{...e}),a[4]=e,a[5]=s);let l;return a[6]!==e.name||a[7]!==t||a[8]!==s?(l=(0,P.jsx)($r,{value:t,children:s},e.name),a[6]=e.name,a[7]=t,a[8]=s,a[9]=l):l=a[9],l},xe=()=>{let r=(0,re.c)(11),a=x.use($r),e=x.use(Hr),{getFieldState:t,formState:s}=ne(),l;r[0]!==a.name||r[1]!==s||r[2]!==t?(l=t(a.name,s),r[0]=a.name,r[1]=s,r[2]=t,r[3]=l):l=r[3];let n=l;if(!a)throw Error("useFormField should be used within <FormField>");let{id:o}=e,f=`${o}-form-item`,c=`${o}-form-item-description`,b=`${o}-form-item-message`,_;return r[4]!==a.name||r[5]!==n||r[6]!==o||r[7]!==f||r[8]!==c||r[9]!==b?(_={id:o,name:a.name,formItemId:f,formDescriptionId:c,formMessageId:b,...n},r[4]=a.name,r[5]=n,r[6]=o,r[7]=f,r[8]=c,r[9]=b,r[10]=_):_=r[10],_},Hr=x.createContext({}),Wr=x.forwardRef((r,a)=>{let e=(0,re.c)(14),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let l=x.useId(),n;e[3]===l?n=e[4]:(n={id:l},e[3]=l,e[4]=n);let o;e[5]===t?o=e[6]:(o=de("flex flex-col gap-1",t),e[5]=t,e[6]=o);let f;e[7]!==s||e[8]!==a||e[9]!==o?(f=(0,P.jsx)("div",{ref:a,className:o,...s}),e[7]=s,e[8]=a,e[9]=o,e[10]=f):f=e[10];let c;return e[11]!==n||e[12]!==f?(c=(0,P.jsx)(Hr,{value:n,children:f}),e[11]=n,e[12]=f,e[13]=c):c=e[13],c});Wr.displayName="FormItem";var zr=x.forwardRef((r,a)=>{let e=(0,re.c)(11),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let{error:l,formItemId:n}=xe();if(!s.children)return;let o=l&&"text-destructive",f;e[3]!==t||e[4]!==o?(f=de(o,t),e[3]=t,e[4]=o,e[5]=f):f=e[5];let c;return e[6]!==n||e[7]!==s||e[8]!==a||e[9]!==f?(c=(0,P.jsx)(ht,{ref:a,className:f,htmlFor:n,...s}),e[6]=n,e[7]=s,e[8]=a,e[9]=f,e[10]=c):c=e[10],c});zr.displayName="FormLabel";var Kr=x.forwardRef((r,a)=>{let e=(0,re.c)(8),t;e[0]===r?t=e[1]:({...t}=r,e[0]=r,e[1]=t);let{error:s,formItemId:l,formDescriptionId:n,formMessageId:o}=xe(),f=s?`${n} ${o}`:n,c=!!s,b;return e[2]!==l||e[3]!==t||e[4]!==a||e[5]!==f||e[6]!==c?(b=(0,P.jsx)(ct,{ref:a,id:l,"aria-describedby":f,"aria-invalid":c,...t}),e[2]=l,e[3]=t,e[4]=a,e[5]=f,e[6]=c,e[7]=b):b=e[7],b});Kr.displayName="FormControl";var Gr=x.forwardRef((r,a)=>{let e=(0,re.c)(10),t,s;e[0]===r?(t=e[1],s=e[2]):({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s);let{formDescriptionId:l}=xe();if(!s.children)return null;let n;e[3]===t?n=e[4]:(n=de("text-sm text-muted-foreground",t),e[3]=t,e[4]=n);let o;return e[5]!==l||e[6]!==s||e[7]!==a||e[8]!==n?(o=(0,P.jsx)("p",{ref:a,id:l,className:n,...s}),e[5]=l,e[6]=s,e[7]=a,e[8]=n,e[9]=o):o=e[9],o});Gr.displayName="FormDescription";var Yr=x.forwardRef((r,a)=>{let e=(0,re.c)(12),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:s,children:t,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let{error:n,formMessageId:o}=xe(),f=n!=null&&n.message?String(n==null?void 0:n.message):t;if(!f)return null;let c;e[4]===s?c=e[5]:(c=de("text-xs font-medium text-destructive",s),e[4]=s,e[5]=c);let b;return e[6]!==f||e[7]!==o||e[8]!==l||e[9]!==a||e[10]!==c?(b=(0,P.jsx)("p",{ref:a,id:o,className:c,...l,children:f}),e[6]=f,e[7]=o,e[8]=l,e[9]=a,e[10]=c,e[11]=b):b=e[11],b});Yr.displayName="FormMessage";var Jr=r=>{let a=(0,re.c)(7),{className:e}=r,{error:t}=xe(),s=t!=null&&t.message?String(t==null?void 0:t.message):null;if(!s)return null;let l;a[0]===e?l=a[1]:(l=de("stroke-[1.8px]",e),a[0]=e,a[1]=l);let n;a[2]===l?n=a[3]:(n=(0,P.jsx)(nt,{className:l}),a[2]=l,a[3]=n);let o;return a[4]!==s||a[5]!==n?(o=(0,P.jsx)(pt,{content:s,children:n}),a[4]=s,a[5]=n,a[6]=o):o=a[6],o};Jr.displayName="FormMessageTooltip";function Wt(r){return r==null?void 0:r.message}var rr=mr(),Ne=x.forwardRef((r,a)=>{let e=(0,rr.c)(16),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:s,bottomAdornment:t,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let n;e[4]===s?n=e[5]:(n=de("shadow-xs-solid hover:shadow-sm-solid disabled:shadow-xs-solid focus-visible:shadow-md-solid","flex w-full mb-1 rounded-sm border border-input bg-background px-3 py-2 text-sm font-code ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-accent disabled:cursor-not-allowed disabled:opacity-50 min-h-6",s),e[4]=s,e[5]=n);let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=mt.stopPropagation(),e[6]=o):o=e[6];let f;e[7]!==l||e[8]!==a||e[9]!==n?(f=(0,P.jsx)("textarea",{className:n,onClick:o,ref:a,...l}),e[7]=l,e[8]=a,e[9]=n,e[10]=f):f=e[10];let c;e[11]===t?c=e[12]:(c=t&&(0,P.jsx)("div",{className:"absolute right-0 bottom-1 flex items-center pr-[6px] pointer-events-none text-muted-foreground h-6",children:t}),e[11]=t,e[12]=c);let b;return e[13]!==f||e[14]!==c?(b=(0,P.jsxs)("div",{className:"relative",children:[f,c]}),e[13]=f,e[14]=c,e[15]=b):b=e[15],b});Ne.displayName="Textarea";const Zr=x.forwardRef((r,a)=>{let e=(0,rr.c)(16),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:t,onValueChange:s,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let n;e[4]!==s||e[5]!==l.delay||e[6]!==l.value?(n={initialValue:l.value,delay:l.delay,onChange:s},e[4]=s,e[5]=l.delay,e[6]=l.value,e[7]=n):n=e[7];let{value:o,onChange:f}=vt(n),c;e[8]===f?c=e[9]:(c=_=>f(_.target.value),e[8]=f,e[9]=c);let b;return e[10]!==t||e[11]!==l||e[12]!==a||e[13]!==c||e[14]!==o?(b=(0,P.jsx)(Ne,{ref:a,className:t,...l,onChange:c,value:o}),e[10]=t,e[11]=l,e[12]=a,e[13]=c,e[14]=o,e[15]=b):b=e[15],b});Zr.displayName="DebouncedTextarea";const Qr=x.forwardRef((r,a)=>{let e=(0,rr.c)(23),t,s,l;e[0]===r?(t=e[1],s=e[2],l=e[3]):({className:t,onValueChange:s,...l}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l);let[n,o]=x.useState(l.value),f;e[4]!==n||e[5]!==s||e[6]!==l.value?(f={prop:l.value,defaultProp:n,onChange:s},e[4]=n,e[5]=s,e[6]=l.value,e[7]=f):f=e[7];let[c,b]=gt(f),_,N;e[8]===c?(_=e[9],N=e[10]):(_=()=>{o(c||"")},N=[c],e[8]=c,e[9]=_,e[10]=N),x.useEffect(_,N);let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=j=>o(j.target.value),e[11]=k):k=e[11];let v,h;e[12]!==n||e[13]!==b?(v=()=>b(n),h=j=>{j.ctrlKey&&j.key==="Enter"&&(j.preventDefault(),b(n))},e[12]=n,e[13]=b,e[14]=v,e[15]=h):(v=e[14],h=e[15]);let A;return e[16]!==t||e[17]!==n||e[18]!==l||e[19]!==a||e[20]!==v||e[21]!==h?(A=(0,P.jsx)(Ne,{ref:a,className:t,...l,value:n,onChange:k,onBlur:v,onKeyDown:h}),e[16]=t,e[17]=n,e[18]=l,e[19]=a,e[20]=v,e[21]=h,e[22]=A):A=e[22],A});Qr.displayName="OnBlurredTextarea";export{ne as _,Kr as a,Ht as c,Yr as d,Jr as f,Bt as g,Dt as h,qt as i,Wr as l,br as m,Qr as n,Gr as o,Pt as p,Ne as r,$t as s,Zr as t,zr as u,Fr as v,bt as y};
import{t}from"./textile-Cum4VLew.js";export{t as textile};
var u={addition:"inserted",attributes:"propertyName",bold:"strong",cite:"keyword",code:"monospace",definitionList:"list",deletion:"deleted",div:"punctuation",em:"emphasis",footnote:"variable",footCite:"qualifier",header:"heading",html:"comment",image:"atom",italic:"emphasis",link:"link",linkDefinition:"link",list1:"list",list2:"list.special",list3:"list",notextile:"string.special",pre:"operator",p:"content",quote:"bracket",span:"quote",specialChar:"character",strong:"strong",sub:"content.special",sup:"content.special",table:"variableName.special",tableHeading:"operator"};function b(t,e){e.mode=r.newLayout,e.tableHeading=!1,e.layoutType==="definitionList"&&e.spanningLayout&&t.match(a("definitionListEnd"),!1)&&(e.spanningLayout=!1)}function d(t,e,i){if(i==="_")return t.eat("_")?s(t,e,"italic",/__/,2):s(t,e,"em",/_/,1);if(i==="*")return t.eat("*")?s(t,e,"bold",/\*\*/,2):s(t,e,"strong",/\*/,1);if(i==="[")return t.match(/\d+\]/)&&(e.footCite=!0),o(e);if(i==="("&&t.match(/^(r|tm|c)\)/))return u.specialChar;if(i==="<"&&t.match(/(\w+)[^>]+>[^<]+<\/\1>/))return u.html;if(i==="?"&&t.eat("?"))return s(t,e,"cite",/\?\?/,2);if(i==="="&&t.eat("="))return s(t,e,"notextile",/==/,2);if(i==="-"&&!t.eat("-"))return s(t,e,"deletion",/-/,1);if(i==="+")return s(t,e,"addition",/\+/,1);if(i==="~")return s(t,e,"sub",/~/,1);if(i==="^")return s(t,e,"sup",/\^/,1);if(i==="%")return s(t,e,"span",/%/,1);if(i==="@")return s(t,e,"code",/@/,1);if(i==="!"){var l=s(t,e,"image",/(?:\([^\)]+\))?!/,1);return t.match(/^:\S+/),l}return o(e)}function s(t,e,i,l,p){var c=t.pos>p?t.string.charAt(t.pos-p-1):null,m=t.peek();if(e[i]){if((!m||/\W/.test(m))&&c&&/\S/.test(c)){var h=o(e);return e[i]=!1,h}}else(!c||/\W/.test(c))&&m&&/\S/.test(m)&&t.match(RegExp("^.*\\S"+l.source+"(?:\\W|$)"),!1)&&(e[i]=!0,e.mode=r.attributes);return o(e)}function o(t){var e=f(t);if(e)return e;var i=[];return t.layoutType&&i.push(u[t.layoutType]),i=i.concat(y(t,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),t.layoutType==="header"&&i.push(u.header+"-"+t.header),i.length?i.join(" "):null}function f(t){var e=t.layoutType;switch(e){case"notextile":case"code":case"pre":return u[e];default:return t.notextile?u.notextile+(e?" "+u[e]:""):null}}function y(t){for(var e=[],i=1;i<arguments.length;++i)t[arguments[i]]&&e.push(u[arguments[i]]);return e}function g(t){var e=t.spanningLayout,i=t.layoutType;for(var l in t)t.hasOwnProperty(l)&&delete t[l];t.mode=r.newLayout,e&&(t.layoutType=i,t.spanningLayout=!0)}var n={cache:{},single:{bc:"bc",bq:"bq",definitionList:/- .*?:=+/,definitionListEnd:/.*=:\s*$/,div:"div",drawTable:/\|.*\|/,foot:/fn\d+/,header:/h[1-6]/,html:/\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(t){switch(t){case"drawTable":return n.makeRe("^",n.single.drawTable,"$");case"html":return n.makeRe("^",n.single.html,"(?:",n.single.html,")*","$");case"linkDefinition":return n.makeRe("^",n.single.linkDefinition,"$");case"listLayout":return n.makeRe("^",n.single.list,a("allAttributes"),"*\\s+");case"tableCellAttributes":return n.makeRe("^",n.choiceRe(n.single.tableCellAttributes,a("allAttributes")),"+\\.");case"type":return n.makeRe("^",a("allTypes"));case"typeLayout":return n.makeRe("^",a("allTypes"),a("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return n.makeRe("^",a("allAttributes"),"+");case"allTypes":return n.choiceRe(n.single.div,n.single.foot,n.single.header,n.single.bc,n.single.bq,n.single.notextile,n.single.pre,n.single.table,n.single.para);case"allAttributes":return n.choiceRe(n.attributes.selector,n.attributes.css,n.attributes.lang,n.attributes.align,n.attributes.pad);default:return n.makeRe("^",n.single[t])}},makeRe:function(){for(var t="",e=0;e<arguments.length;++e){var i=arguments[e];t+=typeof i=="string"?i:i.source}return new RegExp(t)},choiceRe:function(){for(var t=[arguments[0]],e=1;e<arguments.length;++e)t[e*2-1]="|",t[e*2]=arguments[e];return t.unshift("(?:"),t.push(")"),n.makeRe.apply(null,t)}};function a(t){return n.cache[t]||(n.cache[t]=n.createRe(t))}var r={newLayout:function(t,e){if(t.match(a("typeLayout"),!1))return e.spanningLayout=!1,(e.mode=r.blockType)(t,e);var i;return f(e)||(t.match(a("listLayout"),!1)?i=r.list:t.match(a("drawTable"),!1)?i=r.table:t.match(a("linkDefinition"),!1)?i=r.linkDefinition:t.match(a("definitionList"))?i=r.definitionList:t.match(a("html"),!1)&&(i=r.html)),(e.mode=i||r.text)(t,e)},blockType:function(t,e){var i,l;if(e.layoutType=null,i=t.match(a("type")))l=i[0];else return(e.mode=r.text)(t,e);return(i=l.match(a("header")))?(e.layoutType="header",e.header=parseInt(i[0][1])):l.match(a("bq"))?e.layoutType="quote":l.match(a("bc"))?e.layoutType="code":l.match(a("foot"))?e.layoutType="footnote":l.match(a("notextile"))?e.layoutType="notextile":l.match(a("pre"))?e.layoutType="pre":l.match(a("div"))?e.layoutType="div":l.match(a("table"))&&(e.layoutType="table"),e.mode=r.attributes,o(e)},text:function(t,e){if(t.match(a("text")))return o(e);var i=t.next();return i==='"'?(e.mode=r.link)(t,e):d(t,e,i)},attributes:function(t,e){return e.mode=r.layoutLength,t.match(a("attributes"))?u.attributes:o(e)},layoutLength:function(t,e){return t.eat(".")&&t.eat(".")&&(e.spanningLayout=!0),e.mode=r.text,o(e)},list:function(t,e){e.listDepth=t.match(a("list"))[0].length;var i=(e.listDepth-1)%3;return i?i===1?e.layoutType="list2":e.layoutType="list3":e.layoutType="list1",e.mode=r.attributes,o(e)},link:function(t,e){return e.mode=r.text,t.match(a("link"))?(t.match(/\S+/),u.link):o(e)},linkDefinition:function(t){return t.skipToEnd(),u.linkDefinition},definitionList:function(t,e){return t.match(a("definitionList")),e.layoutType="definitionList",t.match(/\s*$/)?e.spanningLayout=!0:e.mode=r.attributes,o(e)},html:function(t){return t.skipToEnd(),u.html},table:function(t,e){return e.layoutType="table",(e.mode=r.tableCell)(t,e)},tableCell:function(t,e){return t.match(a("tableHeading"))?e.tableHeading=!0:t.eat("|"),e.mode=r.tableCellAttributes,o(e)},tableCellAttributes:function(t,e){return e.mode=r.tableText,t.match(a("tableCellAttributes"))?u.attributes:o(e)},tableText:function(t,e){return t.match(a("tableText"))?o(e):t.peek()==="|"?(e.mode=r.tableCell,o(e)):d(t,e,t.next())}};const k={name:"textile",startState:function(){return{mode:r.newLayout}},token:function(t,e){return t.sol()&&b(t,e),e.mode(t,e)},blankLine:g};export{k as t};
var u={},c={allTags:!0,closeAll:!0,list:!0,newJournal:!0,newTiddler:!0,permaview:!0,saveChanges:!0,search:!0,slider:!0,tabs:!0,tag:!0,tagging:!0,tags:!0,tiddler:!0,timeline:!0,today:!0,version:!0,option:!0,with:!0,filter:!0},l=/[\w_\-]/i,f=/^\-\-\-\-+$/,m=/^\/\*\*\*$/,k=/^\*\*\*\/$/,h=/^<<<$/,s=/^\/\/\{\{\{$/,d=/^\/\/\}\}\}$/,p=/^<!--\{\{\{-->$/,b=/^<!--\}\}\}-->$/,$=/^\{\{\{$/,v=/^\}\}\}$/,x=/.*?\}\}\}/;function a(e,t,n){return t.tokenize=n,n(e,t)}function i(e,t){var n=e.sol(),r=e.peek();if(t.block=!1,n&&/[<\/\*{}\-]/.test(r)){if(e.match($))return t.block=!0,a(e,t,o);if(e.match(h))return"quote";if(e.match(m)||e.match(k)||e.match(s)||e.match(d)||e.match(p)||e.match(b))return"comment";if(e.match(f))return"contentSeparator"}if(e.next(),n&&/[\/\*!#;:>|]/.test(r)){if(r=="!")return e.skipToEnd(),"header";if(r=="*")return e.eatWhile("*"),"comment";if(r=="#")return e.eatWhile("#"),"comment";if(r==";")return e.eatWhile(";"),"comment";if(r==":")return e.eatWhile(":"),"comment";if(r==">")return e.eatWhile(">"),"quote";if(r=="|")return"header"}if(r=="{"&&e.match("{{"))return a(e,t,o);if(/[hf]/i.test(r)&&/[ti]/i.test(e.peek())&&e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if(r=='"')return"string";if(r=="~"||/[\[\]]/.test(r)&&e.match(r))return"brace";if(r=="@")return e.eatWhile(l),"link";if(/\d/.test(r))return e.eatWhile(/\d/),"number";if(r=="/"){if(e.eat("%"))return a(e,t,z);if(e.eat("/"))return a(e,t,w)}if(r=="_"&&e.eat("_"))return a(e,t,W);if(r=="-"&&e.eat("-")){if(e.peek()!=" ")return a(e,t,_);if(e.peek()==" ")return"brace"}return r=="'"&&e.eat("'")?a(e,t,g):r=="<"&&e.eat("<")?a(e,t,y):(e.eatWhile(/[\w\$_]/),u.propertyIsEnumerable(e.current())?"keyword":null)}function z(e,t){for(var n=!1,r;r=e.next();){if(r=="/"&&n){t.tokenize=i;break}n=r=="%"}return"comment"}function g(e,t){for(var n=!1,r;r=e.next();){if(r=="'"&&n){t.tokenize=i;break}n=r=="'"}return"strong"}function o(e,t){var n=t.block;return n&&e.current()?"comment":!n&&e.match(x)||n&&e.sol()&&e.match(v)?(t.tokenize=i,"comment"):(e.next(),"comment")}function w(e,t){for(var n=!1,r;r=e.next();){if(r=="/"&&n){t.tokenize=i;break}n=r=="/"}return"emphasis"}function W(e,t){for(var n=!1,r;r=e.next();){if(r=="_"&&n){t.tokenize=i;break}n=r=="_"}return"link"}function _(e,t){for(var n=!1,r;r=e.next();){if(r=="-"&&n){t.tokenize=i;break}n=r=="-"}return"deleted"}function y(e,t){if(e.current()=="<<")return"meta";var n=e.next();return n?n==">"&&e.peek()==">"?(e.next(),t.tokenize=i,"meta"):(e.eatWhile(/[\w\$_]/),c.propertyIsEnumerable(e.current())?"keyword":null):(t.tokenize=i,null)}const S={name:"tiddlywiki",startState:function(){return{tokenize:i}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}};export{S as tiddlyWiki};
function a(n,e,t){return function(r,f){for(;!r.eol();){if(r.match(e)){f.tokenize=u;break}r.next()}return t&&(f.tokenize=t),n}}function p(n){return function(e,t){for(;!e.eol();)e.next();return t.tokenize=u,n}}function u(n,e){function t(m){return e.tokenize=m,m(n,e)}var r=n.sol(),f=n.next();switch(f){case"{":return n.eat("/"),n.eatSpace(),n.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),e.tokenize=d,"tag";case"_":if(n.eat("_"))return t(a("strong","__",u));break;case"'":if(n.eat("'"))return t(a("em","''",u));break;case"(":if(n.eat("("))return t(a("link","))",u));break;case"[":return t(a("url","]",u));case"|":if(n.eat("|"))return t(a("comment","||"));break;case"-":if(n.eat("="))return t(a("header string","=-",u));if(n.eat("-"))return t(a("error tw-deleted","--",u));break;case"=":if(n.match("=="))return t(a("tw-underline","===",u));break;case":":if(n.eat(":"))return t(a("comment","::"));break;case"^":return t(a("tw-box","^"));case"~":if(n.match("np~"))return t(a("meta","~/np~"));break}if(r)switch(f){case"!":return n.match("!!!!!")||n.match("!!!!")||n.match("!!!")||n.match("!!"),t(p("header string"));case"*":case"#":case"+":return t(p("tw-listitem bracket"))}return null}var k,l;function d(n,e){var t=n.next(),r=n.peek();return t=="}"?(e.tokenize=u,"tag"):t=="("||t==")"?"bracket":t=="="?(l="equals",r==">"&&(n.next(),r=n.peek()),/[\'\"]/.test(r)||(e.tokenize=z()),"operator"):/[\'\"]/.test(t)?(e.tokenize=v(t),e.tokenize(n,e)):(n.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function v(n){return function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}}function z(){return function(n,e){for(;!n.eol();){var t=n.next(),r=n.peek();if(t==" "||t==","||/[ )}]/.test(r)){e.tokenize=d;break}}return"string"}}var i,c;function s(){for(var n=arguments.length-1;n>=0;n--)i.cc.push(arguments[n])}function o(){return s.apply(null,arguments),!0}function x(n,e){var t=i.context&&i.context.noIndent;i.context={prev:i.context,pluginName:n,indent:i.indented,startOfLine:e,noIndent:t}}function b(){i.context&&(i.context=i.context.prev)}function w(n){if(n=="openPlugin")return i.pluginName=k,o(g,L(i.startOfLine));if(n=="closePlugin"){var e=!1;return i.context?(e=i.context.pluginName!=k,b()):e=!0,e&&(c="error"),o(O(e))}else return n=="string"&&((!i.context||i.context.name!="!cdata")&&x("!cdata"),i.tokenize==u&&b()),o()}function L(n){return function(e){return e=="selfclosePlugin"||e=="endPlugin"||e=="endPlugin"&&x(i.pluginName,n),o()}}function O(n){return function(e){return n&&(c="error"),e=="endPlugin"?o():s()}}function g(n){return n=="keyword"?(c="attribute",o(g)):n=="equals"?o(P,g):s()}function P(n){return n=="keyword"?(c="string",o()):n=="string"?o(h):s()}function h(n){return n=="string"?o(h):s()}const y={name:"tiki",startState:function(){return{tokenize:u,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(n,e){if(n.sol()&&(e.startOfLine=!0,e.indented=n.indentation()),n.eatSpace())return null;c=l=k=null;var t=e.tokenize(n,e);if((t||l)&&t!="comment")for(i=e;!(e.cc.pop()||w)(l||t););return e.startOfLine=!1,c||t},indent:function(n,e,t){var r=n.context;if(r&&r.noIndent)return 0;for(r&&/^{\//.test(e)&&(r=r.prev);r&&!r.startOfLine;)r=r.prev;return r?r.indent+t.unit:0}};export{y as tiki};
import{a as _,s as q}from"./precisionRound-BMPhtTJQ.js";import{a as z,i as G}from"./linear-DjglEiG4.js";import{A as D,C as d,D as w,E as A,M as k,N as H,O as x,S as J,T as y,_ as K,c as C,j as Q,k as I,l as U,o as j,p as E,s as V,t as W,v as F,w as X,x as L,y as Z}from"./defaultLocale-C92Rrpmf.js";import{n as $}from"./init-AtRnKt23.js";function nn(r,u){let o;if(u===void 0)for(let t of r)t!=null&&(o<t||o===void 0&&t>=t)&&(o=t);else{let t=-1;for(let a of r)(a=u(a,++t,r))!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}return o}function rn(r,u){let o;if(u===void 0)for(let t of r)t!=null&&(o>t||o===void 0&&t>=t)&&(o=t);else{let t=-1;for(let a of r)(a=u(a,++t,r))!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}return o}function N(r,u,o,t,a,f){let e=[[y,1,D],[y,5,5*D],[y,15,15*D],[y,30,30*D],[f,1,x],[f,5,5*x],[f,15,15*x],[f,30,30*x],[a,1,w],[a,3,3*w],[a,6,6*w],[a,12,12*w],[t,1,A],[t,2,2*A],[o,1,Q],[u,1,I],[u,3,3*I],[r,1,k]];function h(s,i,m){let l=i<s;l&&([s,i]=[i,s]);let c=m&&typeof m.range=="function"?m:p(s,i,m),g=c?c.range(s,+i+1):[];return l?g.reverse():g}function p(s,i,m){let l=Math.abs(i-s)/m,c=q(([,,b])=>b).right(e,l);if(c===e.length)return r.every(_(s/k,i/k,m));if(c===0)return H.every(Math.max(_(s,i,m),1));let[g,M]=e[l/e[c-1][2]<e[c][2]/l?c-1:c];return g.every(M)}return[h,p]}var[tn,an]=N(V,U,K,Z,J,X),[on,sn]=N(j,C,E,F,L,d);function O(r,u){r=r.slice();var o=0,t=r.length-1,a=r[o],f=r[t],e;return f<a&&(e=o,o=t,t=e,e=a,a=f,f=e),r[o]=u.floor(a),r[t]=u.ceil(f),r}function un(r){return new Date(r)}function en(r){return r instanceof Date?+r:+new Date(+r)}function S(r,u,o,t,a,f,e,h,p,s){var i=G(),m=i.invert,l=i.domain,c=s(".%L"),g=s(":%S"),M=s("%I:%M"),b=s("%I %p"),T=s("%a %d"),B=s("%b %d"),P=s("%B"),R=s("%Y");function Y(n){return(p(n)<n?c:h(n)<n?g:e(n)<n?M:f(n)<n?b:t(n)<n?a(n)<n?T:B:o(n)<n?P:R)(n)}return i.invert=function(n){return new Date(m(n))},i.domain=function(n){return arguments.length?l(Array.from(n,en)):l().map(un)},i.ticks=function(n){var v=l();return r(v[0],v[v.length-1],n??10)},i.tickFormat=function(n,v){return v==null?Y:s(v)},i.nice=function(n){var v=l();return(!n||typeof n.range!="function")&&(n=u(v[0],v[v.length-1],n??10)),n?l(O(v,n)):i},i.copy=function(){return z(i,S(r,u,o,t,a,f,e,h,p,s))},i}function fn(){return $.apply(S(on,sn,j,C,E,F,L,d,y,W).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{tn as a,an as i,fn as n,rn as o,O as r,nn as s,S as t};
import"./purify.es-DNVQZNFu.js";import{u as X}from"./src-Cf4NnJCp.js";import{t as it}from"./arc-3DY1fURi.js";import{n as s,r as S,t as xt}from"./src-BKLwm2RN.js";import{G as bt,Q as kt,X as _t,Z as vt,a as wt,b as St,o as $t}from"./chunk-ABZYJK2D-t8l6Viza.js";var Y=(function(){var i=s(function(r,h,o,d){for(o||(o={}),d=r.length;d--;o[r[d]]=h);return o},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],n=[1,11],l=[1,12],u=[1,13],g=[1,16],p=[1,17],m={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(r,h,o,d,y,c,v){var f=c.length-1;switch(y){case 1:return c[f-1];case 2:this.$=[];break;case 3:c[f-1].push(c[f]),this.$=c[f-1];break;case 4:case 5:this.$=c[f];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(c[f].substr(6)),this.$=c[f].substr(6);break;case 9:this.$=c[f].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=c[f].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(c[f].substr(8)),this.$=c[f].substr(8);break;case 15:d.addTask(c[f],0,""),this.$=c[f];break;case 16:d.addEvent(c[f].substr(2)),this.$=c[f];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:n,16:l,17:u,18:14,19:15,20:g,21:p},i(t,[2,7],{1:[2,1]}),i(t,[2,3]),{9:18,11:e,12:a,14:n,16:l,17:u,18:14,19:15,20:g,21:p},i(t,[2,5]),i(t,[2,6]),i(t,[2,8]),{13:[1,19]},{15:[1,20]},i(t,[2,11]),i(t,[2,12]),i(t,[2,13]),i(t,[2,14]),i(t,[2,15]),i(t,[2,16]),i(t,[2,4]),i(t,[2,9]),i(t,[2,10])],defaultActions:{},parseError:s(function(r,h){if(h.recoverable)this.trace(r);else{var o=Error(r);throw o.hash=h,o}},"parseError"),parse:s(function(r){var h=this,o=[0],d=[],y=[null],c=[],v=this.table,f="",M=0,N=0,A=0,B=2,F=1,W=c.slice.call(arguments,1),b=Object.create(this.lexer),w={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(w.yy[k]=this.yy[k]);b.setInput(r,w.yy),w.yy.lexer=b,w.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var I=b.yylloc;c.push(I);var C=b.options&&b.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function L(E){o.length-=2*E,y.length-=E,c.length-=E}s(L,"popStack");function O(){var E=d.pop()||b.lex()||F;return typeof E!="number"&&(E instanceof Array&&(d=E,E=d.pop()),E=h.symbols_[E]||E),E}s(O,"lex");for(var _,q,P,$,U,R={},D,T,tt,V;;){if(P=o[o.length-1],this.defaultActions[P]?$=this.defaultActions[P]:(_??(_=O()),$=v[P]&&v[P][_]),$===void 0||!$.length||!$[0]){var et="";for(D in V=[],v[P])this.terminals_[D]&&D>B&&V.push("'"+this.terminals_[D]+"'");et=b.showPosition?"Parse error on line "+(M+1)+`:
`+b.showPosition()+`
Expecting `+V.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(M+1)+": Unexpected "+(_==F?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(et,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:I,expected:V})}if($[0]instanceof Array&&$.length>1)throw Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch($[0]){case 1:o.push(_),y.push(b.yytext),c.push(b.yylloc),o.push($[1]),_=null,q?(_=q,q=null):(N=b.yyleng,f=b.yytext,M=b.yylineno,I=b.yylloc,A>0&&A--);break;case 2:if(T=this.productions_[$[1]][1],R.$=y[y.length-T],R._$={first_line:c[c.length-(T||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(T||1)].first_column,last_column:c[c.length-1].last_column},C&&(R._$.range=[c[c.length-(T||1)].range[0],c[c.length-1].range[1]]),U=this.performAction.apply(R,[f,N,M,w.yy,$[1],y,c].concat(W)),U!==void 0)return U;T&&(o=o.slice(0,-1*T*2),y=y.slice(0,-1*T),c=c.slice(0,-1*T)),o.push(this.productions_[$[1]][0]),y.push(R.$),c.push(R._$),tt=v[o[o.length-2]][o[o.length-1]],o.push(tt);break;case 3:return!0}}return!0},"parse")};m.lexer=(function(){return{EOF:1,parseError:s(function(r,h){if(this.yy.parser)this.yy.parser.parseError(r,h);else throw Error(r)},"parseError"),setInput:s(function(r,h){return this.yy=h||this.yy||{},this._input=r,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:s(function(){var r=this._input[0];return this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r,r.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var h=r.length,o=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var d=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),o.length-1&&(this.yylineno-=o.length-1);var y=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:o?(o.length===d.length?this.yylloc.first_column:0)+d[d.length-o.length].length-o[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),h=Array(r.length+1).join("-");return r+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:s(function(r,h){var o,d,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),d=r[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],o=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var c in y)this[c]=y[c];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,h,o,d;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),c=0;c<y.length;c++)if(o=this._input.match(this.rules[y[c]]),o&&(!h||o[0].length>h[0].length)){if(h=o,d=c,this.options.backtrack_lexer){if(r=this.test_match(o,y[c]),r!==!1)return r;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(r=this.test_match(h,y[d]),r===!1?!1:r):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:s(function(){return this.next()||this.lex()},"lex"),begin:s(function(r){this.conditionStack.push(r)},"begin"),popState:s(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},"topState"),pushState:s(function(r){this.begin(r)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(r,h,o,d){switch(o){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}})();function x(){this.yy={}}return s(x,"Parser"),x.prototype=m,m.Parser=x,new x})();Y.parser=Y;var Et=Y,nt={};xt(nt,{addEvent:()=>dt,addSection:()=>lt,addTask:()=>ht,addTaskOrg:()=>ut,clear:()=>at,default:()=>It,getCommonDb:()=>st,getSections:()=>ot,getTasks:()=>ct});var j="",rt=0,Q=[],G=[],z=[],st=s(()=>$t,"getCommonDb"),at=s(function(){Q.length=0,G.length=0,j="",z.length=0,wt()},"clear"),lt=s(function(i){j=i,Q.push(i)},"addSection"),ot=s(function(){return Q},"getSections"),ct=s(function(){let i=pt(),t=0;for(;!i&&t<100;)i=pt(),t++;return G.push(...z),G},"getTasks"),ht=s(function(i,t,e){let a={id:rt++,section:j,type:j,task:i,score:t||0,events:e?[e]:[]};z.push(a)},"addTask"),dt=s(function(i){z.find(t=>t.id===rt-1).events.push(i)},"addEvent"),ut=s(function(i){let t={section:j,type:j,description:i,task:i,classes:[]};G.push(t)},"addTaskOrg"),pt=s(function(){let i=s(function(e){return z[e].processed},"compileTask"),t=!0;for(let[e,a]of z.entries())i(e),t&&(t=a.processed);return t},"compileTasks"),It={clear:at,getCommonDb:st,addSection:lt,getSections:ot,getTasks:ct,addTask:ht,addTaskOrg:ut,addEvent:dt},Tt=12,Z=s(function(i,t){let e=i.append("rect");return 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),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),Mt=s(function(i,t){let e=i.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),a=i.append("g");a.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(g){let p=it().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(n,"smile");function l(g){let p=it().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(l,"sad");function u(g){g.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(u,"ambivalent"),t.score>3?n(a):t.score<3?l(a):u(a),e},"drawFace"),Nt=s(function(i,t){let e=i.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),yt=s(function(i,t){let e=t.text.replace(/<br\s*\/?>/gi," "),a=i.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class!==void 0&&a.attr("class",t.class);let n=a.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(e),a},"drawText"),At=s(function(i,t){function e(n,l,u,g,p){return n+","+l+" "+(n+u)+","+l+" "+(n+u)+","+(l+g-p)+" "+(n+u-p*1.2)+","+(l+g)+" "+n+","+(l+g)}s(e,"genPoints");let a=i.append("polygon");a.attr("points",e(t.x,t.y,50,20,7)),a.attr("class","labelBox"),t.y+=t.labelMargin,t.x+=.5*t.labelMargin,yt(i,t)},"drawLabel"),Ct=s(function(i,t,e){let a=i.append("g"),n=J();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=e.width,n.height=e.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,Z(a,n),ft(e)(t.text,a,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),gt=-1,Lt=s(function(i,t,e){let a=t.x+e.width/2,n=i.append("g");gt++,n.append("line").attr("id","task"+gt).attr("x1",a).attr("y1",t.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Mt(n,{cx:a,cy:300+(5-t.score)*30,score:t.score});let l=J();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=e.width,l.height=e.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,Z(n,l),ft(e)(t.task,n,l.x,l.y,l.width,l.height,{class:"task"},e,t.colour)},"drawTask"),Pt=s(function(i,t){Z(i,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Ht=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),J=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ft=(function(){function i(n,l,u,g,p,m,x,r){a(l.append("text").attr("x",u+p/2).attr("y",g+m/2+5).style("font-color",r).style("text-anchor","middle").text(n),x)}s(i,"byText");function t(n,l,u,g,p,m,x,r,h){let{taskFontSize:o,taskFontFamily:d}=r,y=n.split(/<br\s*\/?>/gi);for(let c=0;c<y.length;c++){let v=c*o-o*(y.length-1)/2,f=l.append("text").attr("x",u+p/2).attr("y",g).attr("fill",h).style("text-anchor","middle").style("font-size",o).style("font-family",d);f.append("tspan").attr("x",u+p/2).attr("dy",v).text(y[c]),f.attr("y",g+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(f,x)}}s(t,"byTspan");function e(n,l,u,g,p,m,x,r){let h=l.append("switch"),o=h.append("foreignObject").attr("x",u).attr("y",g).attr("width",p).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");o.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,h,u,g,p,m,x,r),a(o,x)}s(e,"byFo");function a(n,l){for(let u in l)u in l&&n.attr(u,l[u])}return s(a,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?e:n.textPlacement==="old"?i:t}})(),Ot=s(function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function K(i,t){i.each(function(){var e=X(this),a=e.text().split(/(\s+|<br>)/).reverse(),n,l=[],u=1.1,g=e.attr("y"),p=parseFloat(e.attr("dy")),m=e.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",p+"em");for(let x=0;x<a.length;x++)n=a[a.length-1-x],l.push(n),m.text(l.join(" ").trim()),(m.node().getComputedTextLength()>t||n==="<br>")&&(l.pop(),m.text(l.join(" ").trim()),l=n==="<br>"?[""]:[n],m=e.append("tspan").attr("x",0).attr("y",g).attr("dy",u+"em").text(n))})}s(K,"wrap");var Rt=s(function(i,t,e,a){var x;let n=e%Tt-1,l=i.append("g");t.section=n,l.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+n));let u=l.append("g"),g=l.append("g"),p=g.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(K,t.width).node().getBBox(),m=(x=a.fontSize)!=null&&x.replace?a.fontSize.replace("px",""):a.fontSize;return t.height=p.height+m*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width+=2*t.padding,g.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),zt(u,t,n,a),t},"drawNode"),jt=s(function(i,t,e){var u;let a=i.append("g"),n=a.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(K,t.width).node().getBBox(),l=(u=e.fontSize)!=null&&u.replace?e.fontSize.replace("px",""):e.fontSize;return a.remove(),n.height+l*1.1*.5+t.padding},"getVirtualNodeHeight"),zt=s(function(i,t,e){i.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+10} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),i.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),H={drawRect:Z,drawCircle:Nt,drawSection:Ct,drawText:yt,drawLabel:At,drawTask:Lt,drawBackgroundRect:Pt,getTextObj:Ht,getNoteRect:J,initGraphics:Ot,drawNode:Rt,getVirtualNodeHeight:jt},Bt=s(function(i,t,e,a){var F,W,b;let n=St(),l=((F=n.timeline)==null?void 0:F.leftMargin)??50;S.debug("timeline",a.db);let u=n.securityLevel,g;u==="sandbox"&&(g=X("#i"+t));let p=X(u==="sandbox"?g.nodes()[0].contentDocument.body:"body").select("#"+t);p.append("g");let m=a.db.getTasks(),x=a.db.getCommonDb().getDiagramTitle();S.debug("task",m),H.initGraphics(p);let r=a.db.getSections();S.debug("sections",r);let h=0,o=0,d=0,y=0,c=50+l,v=50;y=50;let f=0,M=!0;r.forEach(function(w){let k={number:f,descr:w,section:f,width:150,padding:20,maxHeight:h},I=H.getVirtualNodeHeight(p,k,n);S.debug("sectionHeight before draw",I),h=Math.max(h,I+20)});let N=0,A=0;S.debug("tasks.length",m.length);for(let[w,k]of m.entries()){let I={number:w,descr:k,section:k.section,width:150,padding:20,maxHeight:o},C=H.getVirtualNodeHeight(p,I,n);S.debug("taskHeight before draw",C),o=Math.max(o,C+20),N=Math.max(N,k.events.length);let L=0;for(let O of k.events){let _={descr:O,section:k.section,number:k.section,width:150,padding:20,maxHeight:50};L+=H.getVirtualNodeHeight(p,_,n)}k.events.length>0&&(L+=(k.events.length-1)*10),A=Math.max(A,L)}S.debug("maxSectionHeight before draw",h),S.debug("maxTaskHeight before draw",o),r&&r.length>0?r.forEach(w=>{let k=m.filter(O=>O.section===w),I={number:f,descr:w,section:f,width:200*Math.max(k.length,1)-50,padding:20,maxHeight:h};S.debug("sectionNode",I);let C=p.append("g"),L=H.drawNode(C,I,f,n);S.debug("sectionNode output",L),C.attr("transform",`translate(${c}, ${y})`),v+=h+50,k.length>0&&mt(p,k,f,c,v,o,n,N,A,h,!1),c+=200*Math.max(k.length,1),v=y,f++}):(M=!1,mt(p,m,f,c,v,o,n,N,A,h,!0));let B=p.node().getBBox();S.debug("bounds",B),x&&p.append("text").text(x).attr("x",B.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),d=M?h+o+150:o+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",l).attr("y1",d).attr("x2",B.width+3*l).attr("y2",d).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),bt(void 0,p,((W=n.timeline)==null?void 0:W.padding)??50,((b=n.timeline)==null?void 0:b.useMaxWidth)??!1)},"draw"),mt=s(function(i,t,e,a,n,l,u,g,p,m,x){var r;for(let h of t){let o={descr:h.task,section:e,number:e,width:150,padding:20,maxHeight:l};S.debug("taskNode",o);let d=i.append("g").attr("class","taskWrapper"),y=H.drawNode(d,o,e,u).height;if(S.debug("taskHeight after draw",y),d.attr("transform",`translate(${a}, ${n})`),l=Math.max(l,y),h.events){let c=i.append("g").attr("class","lineWrapper"),v=l;n+=100,v+=Ft(i,h.events,e,a,n,u),n-=100,c.append("line").attr("x1",a+190/2).attr("y1",n+l).attr("x2",a+190/2).attr("y2",n+l+100+p+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}a+=200,x&&!((r=u.timeline)!=null&&r.disableMulticolor)&&e++}n-=10},"drawTasks"),Ft=s(function(i,t,e,a,n,l){let u=0,g=n;n+=100;for(let p of t){let m={descr:p,section:e,number:e,width:150,padding:20,maxHeight:50};S.debug("eventNode",m);let x=i.append("g").attr("class","eventWrapper"),r=H.drawNode(x,m,e,l).height;u+=r,x.attr("transform",`translate(${a}, ${n})`),n=n+10+r}return n=g,u},"drawEvents"),Wt={setConf:s(()=>{},"setConf"),draw:Bt},Dt=s(i=>{let t="";for(let e=0;e<i.THEME_COLOR_LIMIT;e++)i["lineColor"+e]=i["lineColor"+e]||i["cScaleInv"+e],kt(i["lineColor"+e])?i["lineColor"+e]=vt(i["lineColor"+e],20):i["lineColor"+e]=_t(i["lineColor"+e],20);for(let e=0;e<i.THEME_COLOR_LIMIT;e++){let a=""+(17-3*e);t+=`
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
fill: ${i["cScale"+e]};
}
.section-${e-1} text {
fill: ${i["cScaleLabel"+e]};
}
.node-icon-${e-1} {
font-size: 40px;
color: ${i["cScaleLabel"+e]};
}
.section-edge-${e-1}{
stroke: ${i["cScale"+e]};
}
.edge-depth-${e-1}{
stroke-width: ${a};
}
.section-${e-1} line {
stroke: ${i["cScaleInv"+e]} ;
stroke-width: 3;
}
.lineWrapper line{
stroke: ${i["cScaleLabel"+e]} ;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return t},"genSections"),Vt={db:nt,renderer:Wt,parser:Et,styles:s(i=>`
.edge {
stroke-width: 3;
}
${Dt(i)}
.section-root rect, .section-root path, .section-root circle {
fill: ${i.git0};
}
.section-root text {
fill: ${i.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.eventWrapper {
filter: brightness(120%);
}
`,"getStyles")};export{Vt as diagram};
import{r as Ar}from"./chunk-LvLJmgfZ.js";var Rr={value:()=>{}};function Xt(){for(var t=0,r=arguments.length,n={},i;t<r;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw Error("illegal type: "+i);n[i]=[]}return new F(n)}function F(t){this._=t}function Hr(t,r){return t.trim().split(/^|\s+/).map(function(n){var i="",a=n.indexOf(".");if(a>=0&&(i=n.slice(a+1),n=n.slice(0,a)),n&&!r.hasOwnProperty(n))throw Error("unknown type: "+n);return{type:n,name:i}})}F.prototype=Xt.prototype={constructor:F,on:function(t,r){var n=this._,i=Hr(t+"",n),a,e=-1,o=i.length;if(arguments.length<2){for(;++e<o;)if((a=(t=i[e]).type)&&(a=Xr(n[a],t.name)))return a;return}if(r!=null&&typeof r!="function")throw Error("invalid callback: "+r);for(;++e<o;)if(a=(t=i[e]).type)n[a]=Ot(n[a],t.name,r);else if(r==null)for(a in n)n[a]=Ot(n[a],t.name,null);return this},copy:function(){var t={},r=this._;for(var n in r)t[n]=r[n].slice();return new F(t)},call:function(t,r){if((a=arguments.length-2)>0)for(var n=Array(a),i=0,a,e;i<a;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(e=this._[t],i=0,a=e.length;i<a;++i)e[i].value.apply(r,n)},apply:function(t,r,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var i=this._[t],a=0,e=i.length;a<e;++a)i[a].value.apply(r,n)}};function Xr(t,r){for(var n=0,i=t.length,a;n<i;++n)if((a=t[n]).name===r)return a.value}function Ot(t,r,n){for(var i=0,a=t.length;i<a;++i)if(t[i].name===r){t[i]=Rr,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:r,value:n}),t}var Or=Xt;function A(t,r,n){t.prototype=r.prototype=n,n.constructor=t}function C(t,r){var n=Object.create(t.prototype);for(var i in r)n[i]=r[i];return n}function N(){}var $=.7,R=1/$,H="\\s*([+-]?\\d+)\\s*",P="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",v="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sr=/^#([0-9a-f]{3,8})$/,jr=RegExp(`^rgb\\(${H},${H},${H}\\)$`),Ir=RegExp(`^rgb\\(${v},${v},${v}\\)$`),Tr=RegExp(`^rgba\\(${H},${H},${H},${P}\\)$`),Dr=RegExp(`^rgba\\(${v},${v},${v},${P}\\)$`),Cr=RegExp(`^hsl\\(${P},${v},${v}\\)$`),Pr=RegExp(`^hsla\\(${P},${v},${v},${P}\\)$`),St={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};A(N,X,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jt,formatHex:jt,formatHex8:Yr,formatHsl:Br,formatRgb:It,toString:It});function jt(){return this.rgb().formatHex()}function Yr(){return this.rgb().formatHex8()}function Br(){return Yt(this).formatHsl()}function It(){return this.rgb().formatRgb()}function X(t){var r,n;return t=(t+"").trim().toLowerCase(),(r=Sr.exec(t))?(n=r[1].length,r=parseInt(r[1],16),n===6?Tt(r):n===3?new p(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):n===8?K(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):n===4?K(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=jr.exec(t))?new p(r[1],r[2],r[3],1):(r=Ir.exec(t))?new p(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=Tr.exec(t))?K(r[1],r[2],r[3],r[4]):(r=Dr.exec(t))?K(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=Cr.exec(t))?Pt(r[1],r[2]/100,r[3]/100,1):(r=Pr.exec(t))?Pt(r[1],r[2]/100,r[3]/100,r[4]):St.hasOwnProperty(t)?Tt(St[t]):t==="transparent"?new p(NaN,NaN,NaN,0):null}function Tt(t){return new p(t>>16&255,t>>8&255,t&255,1)}function K(t,r,n,i){return i<=0&&(t=r=n=NaN),new p(t,r,n,i)}function ft(t){return t instanceof N||(t=X(t)),t?(t=t.rgb(),new p(t.r,t.g,t.b,t.opacity)):new p}function Y(t,r,n,i){return arguments.length===1?ft(t):new p(t,r,n,i??1)}function p(t,r,n,i){this.r=+t,this.g=+r,this.b=+n,this.opacity=+i}A(p,Y,C(N,{brighter(t){return t=t==null?R:R**+t,new p(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?$:$**+t,new p(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new p(_(this.r),_(this.g),_(this.b),Q(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Dt,formatHex:Dt,formatHex8:Lr,formatRgb:Ct,toString:Ct}));function Dt(){return`#${q(this.r)}${q(this.g)}${q(this.b)}`}function Lr(){return`#${q(this.r)}${q(this.g)}${q(this.b)}${q((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ct(){let t=Q(this.opacity);return`${t===1?"rgb(":"rgba("}${_(this.r)}, ${_(this.g)}, ${_(this.b)}${t===1?")":`, ${t})`}`}function Q(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function q(t){return t=_(t),(t<16?"0":"")+t.toString(16)}function Pt(t,r,n,i){return i<=0?t=r=n=NaN:n<=0||n>=1?t=r=NaN:r<=0&&(t=NaN),new d(t,r,n,i)}function Yt(t){if(t instanceof d)return new d(t.h,t.s,t.l,t.opacity);if(t instanceof N||(t=X(t)),!t)return new d;if(t instanceof d)return t;t=t.rgb();var r=t.r/255,n=t.g/255,i=t.b/255,a=Math.min(r,n,i),e=Math.max(r,n,i),o=NaN,u=e-a,c=(e+a)/2;return u?(o=r===e?(n-i)/u+(n<i)*6:n===e?(i-r)/u+2:(r-n)/u+4,u/=c<.5?e+a:2-e-a,o*=60):u=c>0&&c<1?0:o,new d(o,u,c,t.opacity)}function W(t,r,n,i){return arguments.length===1?Yt(t):new d(t,r,n,i??1)}function d(t,r,n,i){this.h=+t,this.s=+r,this.l=+n,this.opacity=+i}A(d,W,C(N,{brighter(t){return t=t==null?R:R**+t,new d(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?$:$**+t,new d(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,r=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*r,a=2*n-i;return new p(pt(t>=240?t-240:t+120,a,i),pt(t,a,i),pt(t<120?t+240:t-120,a,i),this.opacity)},clamp(){return new d(Bt(this.h),G(this.s),G(this.l),Q(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=Q(this.opacity);return`${t===1?"hsl(":"hsla("}${Bt(this.h)}, ${G(this.s)*100}%, ${G(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Bt(t){return t=(t||0)%360,t<0?t+360:t}function G(t){return Math.max(0,Math.min(1,t||0))}function pt(t,r,n){return(t<60?r+(n-r)*t/60:t<180?n:t<240?r+(n-r)*(240-t)/60:r)*255}const Lt=Math.PI/180,Vt=180/Math.PI;var U=18,zt=.96422,Ft=1,Kt=.82521,Qt=4/29,O=6/29,Wt=3*O*O,Vr=O*O*O;function Gt(t){if(t instanceof x)return new x(t.l,t.a,t.b,t.opacity);if(t instanceof M)return Ut(t);t instanceof p||(t=ft(t));var r=bt(t.r),n=bt(t.g),i=bt(t.b),a=gt((.2225045*r+.7168786*n+.0606169*i)/Ft),e,o;return r===n&&n===i?e=o=a:(e=gt((.4360747*r+.3850649*n+.1430804*i)/zt),o=gt((.0139322*r+.0971045*n+.7141733*i)/Kt)),new x(116*a-16,500*(e-a),200*(a-o),t.opacity)}function Z(t,r,n,i){return arguments.length===1?Gt(t):new x(t,r,n,i??1)}function x(t,r,n,i){this.l=+t,this.a=+r,this.b=+n,this.opacity=+i}A(x,Z,C(N,{brighter(t){return new x(this.l+U*(t??1),this.a,this.b,this.opacity)},darker(t){return new x(this.l-U*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,r=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return r=zt*yt(r),t=Ft*yt(t),n=Kt*yt(n),new p(mt(3.1338561*r-1.6168667*t-.4906146*n),mt(-.9787684*r+1.9161415*t+.033454*n),mt(.0719453*r-.2289914*t+1.4052427*n),this.opacity)}}));function gt(t){return t>Vr?t**(1/3):t/Wt+Qt}function yt(t){return t>O?t*t*t:Wt*(t-Qt)}function mt(t){return 255*(t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055)}function bt(t){return(t/=255)<=.04045?t/12.92:((t+.055)/1.055)**2.4}function zr(t){if(t instanceof M)return new M(t.h,t.c,t.l,t.opacity);if(t instanceof x||(t=Gt(t)),t.a===0&&t.b===0)return new M(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var r=Math.atan2(t.b,t.a)*Vt;return new M(r<0?r+360:r,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function J(t,r,n,i){return arguments.length===1?zr(t):new M(t,r,n,i??1)}function M(t,r,n,i){this.h=+t,this.c=+r,this.l=+n,this.opacity=+i}function Ut(t){if(isNaN(t.h))return new x(t.l,0,0,t.opacity);var r=t.h*Lt;return new x(t.l,Math.cos(r)*t.c,Math.sin(r)*t.c,t.opacity)}A(M,J,C(N,{brighter(t){return new M(this.h,this.c,this.l+U*(t??1),this.opacity)},darker(t){return new M(this.h,this.c,this.l-U*(t??1),this.opacity)},rgb(){return Ut(this).rgb()}}));var Zt=-.14861,dt=1.78277,wt=-.29227,tt=-.90649,B=1.97294,Jt=B*tt,tr=B*dt,rr=dt*wt-tt*Zt;function Fr(t){if(t instanceof E)return new E(t.h,t.s,t.l,t.opacity);t instanceof p||(t=ft(t));var r=t.r/255,n=t.g/255,i=t.b/255,a=(rr*i+Jt*r-tr*n)/(rr+Jt-tr),e=i-a,o=(B*(n-a)-wt*e)/tt,u=Math.sqrt(o*o+e*e)/(B*a*(1-a)),c=u?Math.atan2(o,e)*Vt-120:NaN;return new E(c<0?c+360:c,u,a,t.opacity)}function vt(t,r,n,i){return arguments.length===1?Fr(t):new E(t,r,n,i??1)}function E(t,r,n,i){this.h=+t,this.s=+r,this.l=+n,this.opacity=+i}A(E,vt,C(N,{brighter(t){return t=t==null?R:R**+t,new E(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?$:$**+t,new E(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Lt,r=+this.l,n=isNaN(this.s)?0:this.s*r*(1-r),i=Math.cos(t),a=Math.sin(t);return new p(255*(r+n*(Zt*i+dt*a)),255*(r+n*(wt*i+tt*a)),255*(r+B*i*n),this.opacity)}}));function nr(t,r,n,i,a){var e=t*t,o=e*t;return((1-3*t+3*e-o)*r+(4-6*e+3*o)*n+(1+3*t+3*e-3*o)*i+o*a)/6}function ir(t){var r=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,r-1):Math.floor(n*r),a=t[i],e=t[i+1],o=i>0?t[i-1]:2*a-e,u=i<r-1?t[i+2]:2*e-a;return nr((n-i/r)*r,o,a,e,u)}}function ar(t){var r=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*r),a=t[(i+r-1)%r],e=t[i%r],o=t[(i+1)%r],u=t[(i+2)%r];return nr((n-i/r)*r,a,e,o,u)}}var rt=t=>()=>t;function or(t,r){return function(n){return t+n*r}}function Kr(t,r,n){return t**=+n,r=r**+n-t,n=1/n,function(i){return(t+i*r)**+n}}function nt(t,r){var n=r-t;return n?or(t,n>180||n<-180?n-360*Math.round(n/360):n):rt(isNaN(t)?r:t)}function Qr(t){return(t=+t)==1?g:function(r,n){return n-r?Kr(r,n,t):rt(isNaN(r)?n:r)}}function g(t,r){var n=r-t;return n?or(t,n):rt(isNaN(t)?r:t)}var it=(function t(r){var n=Qr(r);function i(a,e){var o=n((a=Y(a)).r,(e=Y(e)).r),u=n(a.g,e.g),c=n(a.b,e.b),l=g(a.opacity,e.opacity);return function(s){return a.r=o(s),a.g=u(s),a.b=c(s),a.opacity=l(s),a+""}}return i.gamma=t,i})(1);function er(t){return function(r){var n=r.length,i=Array(n),a=Array(n),e=Array(n),o,u;for(o=0;o<n;++o)u=Y(r[o]),i[o]=u.r||0,a[o]=u.g||0,e[o]=u.b||0;return i=t(i),a=t(a),e=t(e),u.opacity=1,function(c){return u.r=i(c),u.g=a(c),u.b=e(c),u+""}}}var Wr=er(ir),Gr=er(ar);function xt(t,r){r||(r=[]);var n=t?Math.min(r.length,t.length):0,i=r.slice(),a;return function(e){for(a=0;a<n;++a)i[a]=t[a]*(1-e)+r[a]*e;return i}}function ur(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Ur(t,r){return(ur(r)?xt:sr)(t,r)}function sr(t,r){var n=r?r.length:0,i=t?Math.min(n,t.length):0,a=Array(i),e=Array(n),o;for(o=0;o<i;++o)a[o]=L(t[o],r[o]);for(;o<n;++o)e[o]=r[o];return function(u){for(o=0;o<i;++o)e[o]=a[o](u);return e}}function lr(t,r){var n=new Date;return t=+t,r=+r,function(i){return n.setTime(t*(1-i)+r*i),n}}function w(t,r){return t=+t,r=+r,function(n){return t*(1-n)+r*n}}function cr(t,r){var n={},i={},a;for(a in(typeof t!="object"||!t)&&(t={}),(typeof r!="object"||!r)&&(r={}),r)a in t?n[a]=L(t[a],r[a]):i[a]=r[a];return function(e){for(a in n)i[a]=n[a](e);return i}}var Mt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Nt=new RegExp(Mt.source,"g");function Zr(t){return function(){return t}}function Jr(t){return function(r){return t(r)+""}}function kt(t,r){var n=Mt.lastIndex=Nt.lastIndex=0,i,a,e,o=-1,u=[],c=[];for(t+="",r+="";(i=Mt.exec(t))&&(a=Nt.exec(r));)(e=a.index)>n&&(e=r.slice(n,e),u[o]?u[o]+=e:u[++o]=e),(i=i[0])===(a=a[0])?u[o]?u[o]+=a:u[++o]=a:(u[++o]=null,c.push({i:o,x:w(i,a)})),n=Nt.lastIndex;return n<r.length&&(e=r.slice(n),u[o]?u[o]+=e:u[++o]=e),u.length<2?c[0]?Jr(c[0].x):Zr(r):(r=c.length,function(l){for(var s=0,h;s<r;++s)u[(h=c[s]).i]=h.x(l);return u.join("")})}function L(t,r){var n=typeof r,i;return r==null||n==="boolean"?rt(r):(n==="number"?w:n==="string"?(i=X(r))?(r=i,it):kt:r instanceof X?it:r instanceof Date?lr:ur(r)?xt:Array.isArray(r)?sr:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?cr:w)(t,r)}function tn(t){var r=t.length;return function(n){return t[Math.max(0,Math.min(r-1,Math.floor(n*r)))]}}function rn(t,r){var n=nt(+t,+r);return function(i){var a=n(i);return a-360*Math.floor(a/360)}}function hr(t,r){return t=+t,r=+r,function(n){return Math.round(t*(1-n)+r*n)}}var fr=180/Math.PI,pr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gr(t,r,n,i,a,e){var o,u,c;return(o=Math.sqrt(t*t+r*r))&&(t/=o,r/=o),(c=t*n+r*i)&&(n-=t*c,i-=r*c),(u=Math.sqrt(n*n+i*i))&&(n/=u,i/=u,c/=u),t*i<r*n&&(t=-t,r=-r,c=-c,o=-o),{translateX:a,translateY:e,rotate:Math.atan2(r,t)*fr,skewX:Math.atan(c)*fr,scaleX:o,scaleY:u}}var $t;function nn(t){let r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return r.isIdentity?pr:gr(r.a,r.b,r.c,r.d,r.e,r.f)}function an(t){return t==null||($t||($t=document.createElementNS("http://www.w3.org/2000/svg","g")),$t.setAttribute("transform",t),!(t=$t.transform.baseVal.consolidate()))?pr:(t=t.matrix,gr(t.a,t.b,t.c,t.d,t.e,t.f))}function yr(t,r,n,i){function a(l){return l.length?l.pop()+" ":""}function e(l,s,h,f,y,b){if(l!==h||s!==f){var m=y.push("translate(",null,r,null,n);b.push({i:m-4,x:w(l,h)},{i:m-2,x:w(s,f)})}else(h||f)&&y.push("translate("+h+r+f+n)}function o(l,s,h,f){l===s?s&&h.push(a(h)+"rotate("+s+i):(l-s>180?s+=360:s-l>180&&(l+=360),f.push({i:h.push(a(h)+"rotate(",null,i)-2,x:w(l,s)}))}function u(l,s,h,f){l===s?s&&h.push(a(h)+"skewX("+s+i):f.push({i:h.push(a(h)+"skewX(",null,i)-2,x:w(l,s)})}function c(l,s,h,f,y,b){if(l!==h||s!==f){var m=y.push(a(y)+"scale(",null,",",null,")");b.push({i:m-4,x:w(l,h)},{i:m-2,x:w(s,f)})}else(h!==1||f!==1)&&y.push(a(y)+"scale("+h+","+f+")")}return function(l,s){var h=[],f=[];return l=t(l),s=t(s),e(l.translateX,l.translateY,s.translateX,s.translateY,h,f),o(l.rotate,s.rotate,h,f),u(l.skewX,s.skewX,h,f),c(l.scaleX,l.scaleY,s.scaleX,s.scaleY,h,f),l=s=null,function(y){for(var b=-1,m=f.length,k;++b<m;)h[(k=f[b]).i]=k.x(y);return h.join("")}}}var mr=yr(nn,"px, ","px)","deg)"),br=yr(an,", ",")",")"),on=1e-12;function dr(t){return((t=Math.exp(t))+1/t)/2}function en(t){return((t=Math.exp(t))-1/t)/2}function un(t){return((t=Math.exp(2*t))-1)/(t+1)}var wr=(function t(r,n,i){function a(e,o){var u=e[0],c=e[1],l=e[2],s=o[0],h=o[1],f=o[2],y=s-u,b=h-c,m=y*y+b*b,k,I;if(m<on)I=Math.log(f/l)/r,k=function(D){return[u+D*y,c+D*b,l*Math.exp(r*D*I)]};else{var lt=Math.sqrt(m),ct=(f*f-l*l+i*m)/(2*l*n*lt),ht=(f*f-l*l-i*m)/(2*f*n*lt),T=Math.log(Math.sqrt(ct*ct+1)-ct);I=(Math.log(Math.sqrt(ht*ht+1)-ht)-T)/r,k=function(D){var At=D*I,Rt=dr(T),Ht=l/(n*lt)*(Rt*un(r*At+T)-en(T));return[u+Ht*y,c+Ht*b,l*Rt/dr(r*At+T)]}}return k.duration=I*1e3*r/Math.SQRT2,k}return a.rho=function(e){var o=Math.max(.001,+e),u=o*o;return t(o,u,u*u)},a})(Math.SQRT2,2,4);function vr(t){return function(r,n){var i=t((r=W(r)).h,(n=W(n)).h),a=g(r.s,n.s),e=g(r.l,n.l),o=g(r.opacity,n.opacity);return function(u){return r.h=i(u),r.s=a(u),r.l=e(u),r.opacity=o(u),r+""}}}var sn=vr(nt),ln=vr(g);function cn(t,r){var n=g((t=Z(t)).l,(r=Z(r)).l),i=g(t.a,r.a),a=g(t.b,r.b),e=g(t.opacity,r.opacity);return function(o){return t.l=n(o),t.a=i(o),t.b=a(o),t.opacity=e(o),t+""}}function xr(t){return function(r,n){var i=t((r=J(r)).h,(n=J(n)).h),a=g(r.c,n.c),e=g(r.l,n.l),o=g(r.opacity,n.opacity);return function(u){return r.h=i(u),r.c=a(u),r.l=e(u),r.opacity=o(u),r+""}}}var Mr=xr(nt),hn=xr(g);function Nr(t){return(function r(n){n=+n;function i(a,e){var o=t((a=vt(a)).h,(e=vt(e)).h),u=g(a.s,e.s),c=g(a.l,e.l),l=g(a.opacity,e.opacity);return function(s){return a.h=o(s),a.s=u(s),a.l=c(s**+n),a.opacity=l(s),a+""}}return i.gamma=r,i})(1)}var fn=Nr(nt),pn=Nr(g);function kr(t,r){r===void 0&&(r=t,t=L);for(var n=0,i=r.length-1,a=r[0],e=Array(i<0?0:i);n<i;)e[n]=t(a,a=r[++n]);return function(o){var u=Math.max(0,Math.min(i-1,Math.floor(o*=i)));return e[u](o-u)}}function gn(t,r){for(var n=Array(r),i=0;i<r;++i)n[i]=t(i/(r-1));return n}var yn=Ar({interpolate:()=>L,interpolateArray:()=>Ur,interpolateBasis:()=>ir,interpolateBasisClosed:()=>ar,interpolateCubehelix:()=>fn,interpolateCubehelixLong:()=>pn,interpolateDate:()=>lr,interpolateDiscrete:()=>tn,interpolateHcl:()=>Mr,interpolateHclLong:()=>hn,interpolateHsl:()=>sn,interpolateHslLong:()=>ln,interpolateHue:()=>rn,interpolateLab:()=>cn,interpolateNumber:()=>w,interpolateNumberArray:()=>xt,interpolateObject:()=>cr,interpolateRgb:()=>it,interpolateRgbBasis:()=>Wr,interpolateRgbBasisClosed:()=>Gr,interpolateRound:()=>hr,interpolateString:()=>kt,interpolateTransformCss:()=>mr,interpolateTransformSvg:()=>br,interpolateZoom:()=>wr,piecewise:()=>kr,quantize:()=>gn},1),S=0,at=0,_t=0,$r=1e3,ot,V,et=0,j=0,ut=0,z=typeof performance=="object"&&performance.now?performance:Date,_r=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qt(){return j||(j=(_r(mn),z.now()+ut))}function mn(){j=0}function st(){this._call=this._time=this._next=null}st.prototype=qr.prototype={constructor:st,restart:function(t,r,n){if(typeof t!="function")throw TypeError("callback is not a function");n=(n==null?qt():+n)+(r==null?0:+r),!this._next&&V!==this&&(V?V._next=this:ot=this,V=this),this._call=t,this._time=n,Et()},stop:function(){this._call&&(this._call=null,this._time=1/0,Et())}};function qr(t,r,n){var i=new st;return i.restart(t,r,n),i}function bn(){qt(),++S;for(var t=ot,r;t;)(r=j-t._time)>=0&&t._call.call(void 0,r),t=t._next;--S}function Er(){j=(et=z.now())+ut,S=at=0;try{bn()}finally{S=0,wn(),j=0}}function dn(){var t=z.now(),r=t-et;r>$r&&(ut-=r,et=t)}function wn(){for(var t,r=ot,n,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(n=r._next,r._next=null,r=t?t._next=n:ot=n);V=t,Et(i)}function Et(t){S||(at&&(at=clearTimeout(at)),t-j>24?(t<1/0&&(at=setTimeout(Er,t-z.now()-ut)),_t&&(_t=clearInterval(_t))):(_t||(_t=(et=z.now(),setInterval(dn,$r))),S=1,_r(Er)))}export{X as _,kr as a,Or as b,mr as c,L as d,kt as f,Z as g,J as h,yn as i,br as l,it as m,qt as n,Mr as o,w as p,qr as r,wr as s,st as t,hr as u,W as v,Y as y};
import{t as r}from"./createLucideIcon-CnW3RofX.js";var s=r("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const e=6048e5,i=864e5,u=6e4,f=36e5,p=1e3,y=43200,l=1440,n=3600*24;n*7,n*365.2425;const o=Symbol.for("constructDateFrom");function c(t,a){return typeof t=="function"?t(a):t&&typeof t=="object"&&o in t?t[o](a):t instanceof Date?new t.constructor(a):new Date(a)}function m(t,a){return c(a||t,t)}export{u as a,l as c,f as i,y as l,c as n,p as o,i as r,e as s,m as t,s as u};
import{s as l}from"./chunk-LvLJmgfZ.js";import{t as v}from"./react-BGmjiNul.js";import{t as h}from"./compiler-runtime-DeeZ7FnK.js";import{t as x}from"./jsx-runtime-ZmTK25f3.js";import{n as y,t as f}from"./cn-BKtXLv3a.js";import{S as N,_ as w,w as z}from"./Combination-CMPwuAmi.js";var u=l(v(),1),m=l(x(),1),p="Toggle",g=u.forwardRef((a,n)=>{let{pressed:e,defaultPressed:r,onPressedChange:s,...o}=a,[t,i]=N({prop:e,onChange:s,defaultProp:r??!1,caller:p});return(0,m.jsx)(w.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...o,ref:n,onClick:z(a.onClick,()=>{a.disabled||i(!t)})})});g.displayName=p;var b=g,C=h(),j=y(f("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","data-[state=on]:bg-muted data-[state=on]:text-muted-foreground"),{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted hover:text-muted-foreground"},size:{default:"h-9 px-3",xs:"h-4 w-4",sm:"h-6 px-2",lg:"h-10 px-5"}},defaultVariants:{variant:"default",size:"default"}}),c=u.forwardRef((a,n)=>{let e=(0,C.c)(13),r,s,o,t;e[0]===a?(r=e[1],s=e[2],o=e[3],t=e[4]):({className:r,variant:t,size:o,...s}=a,e[0]=a,e[1]=r,e[2]=s,e[3]=o,e[4]=t);let i;e[5]!==r||e[6]!==o||e[7]!==t?(i=f(j({variant:t,size:o,className:r})),e[5]=r,e[6]=o,e[7]=t,e[8]=i):i=e[8];let d;return e[9]!==s||e[10]!==n||e[11]!==i?(d=(0,m.jsx)(b,{ref:n,className:i,...s}),e[9]=s,e[10]=n,e[11]=i,e[12]=d):d=e[12],d});c.displayName=b.displayName;export{c as t};
const i={name:"toml",startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(n,e){let r;if(!e.inString&&(r=n.match(/^('''|"""|'|")/))&&(e.stringType=r[0],e.inString=!0),n.sol()&&!e.inString&&e.inArray===0&&(e.lhs=!0),e.inString){for(;e.inString;)if(n.match(e.stringType))e.inString=!1;else if(n.peek()==="\\")n.next(),n.next();else{if(n.eol())break;n.match(/^.[^\\\"\']*/)}return e.lhs?"property":"string"}else{if(e.inArray&&n.peek()==="]")return n.next(),e.inArray--,"bracket";if(e.lhs&&n.peek()==="["&&n.skipTo("]"))return n.next(),n.peek()==="]"&&n.next(),"atom";if(n.peek()==="#")return n.skipToEnd(),"comment";if(n.eatSpace())return null;if(e.lhs&&n.eatWhile(function(t){return t!="="&&t!=" "}))return"property";if(e.lhs&&n.peek()==="=")return n.next(),e.lhs=!1,null;if(!e.lhs&&n.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!e.lhs&&(n.match("true")||n.match("false")))return"atom";if(!e.lhs&&n.peek()==="[")return e.inArray++,n.next(),"bracket";if(!e.lhs&&n.match(/^\-?\d+(?:\.\d+)?/))return"number";n.eatSpace()||n.next()}return null},languageData:{commentTokens:{line:"#"}}};export{i as t};
import{t as o}from"./toml-5si8PWt8.js";export{o as toml};
var ue=Object.defineProperty;var ce=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>ce(t,typeof e!="symbol"?e+"":e,n);var at,lt,ot,ut,ct;import{C as de,w as he}from"./_Uint8Array-BGESiCQL.js";import{a as fe,d as ye}from"./hotkeys-BHHWjLlp.js";import{St as yt,a as pe,c as ge,gt as me,o as ve,wt as be}from"./vega-loader.browser-CRZ52CKf.js";var xe="[object Number]";function we(t){return typeof t=="number"||de(t)&&he(t)==xe}var Ie=we;const pt=Uint8Array.of(65,82,82,79,87,49),$={V1:0,V2:1,V3:2,V4:3,V5:4},S={NONE:0,Schema:1,DictionaryBatch:2,RecordBatch:3,Tensor:4,SparseTensor:5},l={Dictionary:-1,NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Duration:18,LargeBinary:19,LargeUtf8:20,LargeList:21,RunEndEncoded:22,BinaryView:23,Utf8View:24,ListView:25,LargeListView:26},gt={HALF:0,SINGLE:1,DOUBLE:2},z={DAY:0,MILLISECOND:1},m={SECOND:0,MILLISECOND:1,MICROSECOND:2,NANOSECOND:3},C={YEAR_MONTH:0,DAY_TIME:1,MONTH_DAY_NANO:2},W={Sparse:0,Dense:1},mt=Uint8Array,vt=Uint16Array,bt=Uint32Array,xt=BigUint64Array,wt=Int8Array,Le=Int16Array,x=Int32Array,L=BigInt64Array,Ae=Float32Array,k=Float64Array;function Ne(t,e){let n=Math.log2(t)-3;return(e?[wt,Le,x,L]:[mt,vt,bt,xt])[n]}Object.getPrototypeOf(Int8Array);function X(t,e){let n=0,r=t.length;if(r<=2147483648)do{let i=n+r>>>1;t[i]<=e?n=i+1:r=i}while(n<r);else do{let i=Math.trunc((n+r)/2);t[i]<=e?n=i+1:r=i}while(n<r);return n}function J(t,e,n){if(e(t))return t;throw Error(n(t))}function w(t,e,n){return e=Array.isArray(e)?e:Object.values(e),J(t,r=>e.includes(r),n??(()=>`${t} must be one of ${e}`))}function It(t,e){for(let[n,r]of Object.entries(t))if(r===e)return n;return"<Unknown>"}const G=t=>`Unsupported data type: "${It(l,t)}" (id ${t})`,Lt=(t,e,n=!0,r=null)=>({name:t,type:e,nullable:n,metadata:r});function At(t){return Object.hasOwn(t,"name")&&Nt(t.type)}function Nt(t){return typeof(t==null?void 0:t.typeId)=="number"}function B(t,e="",n=!0){return At(t)?t:Lt(e,J(t,Nt,()=>"Data type expected."),n)}const Ee=(t,e,n=!1,r=-1)=>({typeId:l.Dictionary,id:r,dictionary:t,indices:e||Dt(),ordered:n}),Et=(t=32,e=!0)=>({typeId:l.Int,bitWidth:w(t,[8,16,32,64]),signed:e,values:Ne(t,e)}),Dt=()=>Et(32),De=(t=2)=>({typeId:l.Float,precision:w(t,gt),values:[vt,Ae,k][t]}),Se=()=>({typeId:l.Binary,offsets:x}),Be=()=>({typeId:l.Utf8,offsets:x}),Oe=(t,e,n=128)=>({typeId:l.Decimal,precision:t,scale:e,bitWidth:w(n,[128,256]),values:xt}),Te=t=>({typeId:l.Date,unit:w(t,z),values:t===z.DAY?x:L}),Me=(t=m.MILLISECOND,e=32)=>({typeId:l.Time,unit:w(t,m),bitWidth:w(e,[32,64]),values:e===32?x:L}),Ce=(t=m.MILLISECOND,e=null)=>({typeId:l.Timestamp,unit:w(t,m),timezone:e,values:L}),Ue=(t=C.MONTH_DAY_NANO)=>({typeId:l.Interval,unit:w(t,C),values:t===C.MONTH_DAY_NANO?void 0:x}),Ve=t=>({typeId:l.List,children:[B(t)],offsets:x}),Fe=t=>({typeId:l.Struct,children:Array.isArray(t)&&At(t[0])?t:Object.entries(t).map(([e,n])=>Lt(e,n))}),Re=(t,e,n,r)=>(n??(n=e.map((i,s)=>s)),{typeId:l.Union,mode:w(t,W),typeIds:n,typeMap:n.reduce((i,s,a)=>(i[s]=a,i),{}),children:e.map((i,s)=>B(i,`_${s}`)),typeIdForValue:r,offsets:x}),$e=t=>({typeId:l.FixedSizeBinary,stride:t}),ze=(t,e)=>({typeId:l.FixedSizeList,stride:e,children:[B(t)]}),ke=(t,e)=>({typeId:l.Map,keysSorted:t,children:[e],offsets:x}),je=(t=m.MILLISECOND)=>({typeId:l.Duration,unit:w(t,m),values:L}),Ye=()=>({typeId:l.LargeBinary,offsets:L}),_e=()=>({typeId:l.LargeUtf8,offsets:L}),He=t=>({typeId:l.LargeList,children:[B(t)],offsets:L}),Pe=(t,e)=>({typeId:l.RunEndEncoded,children:[J(B(t,"run_ends"),n=>n.type.typeId===l.Int,()=>"Run-ends must have an integer type."),B(e,"values")]}),We=t=>({typeId:l.ListView,children:[B(t,"value")],offsets:x}),Xe=t=>({typeId:l.LargeListView,children:[B(t,"value")],offsets:L});var j=new k(2).buffer;new L(j),new bt(j),new x(j),new mt(j);function O(t){if(t>2**53-1||t<-(2**53-1))throw Error(`BigInt exceeds integer number representation: ${t}`);return Number(t)}function Z(t,e){return Number(t/e)+Number(t%e)/Number(e)}var U=t=>BigInt.asUintN(64,t);function Je(t,e){let n=e<<1,r;return BigInt.asIntN(64,t[n+1])<0?(r=U(~t[n])|U(~t[n+1])<<64n,r=-(r+1n)):r=t[n]|t[n+1]<<64n,r}function Ge(t,e){let n=e<<2,r;return BigInt.asIntN(64,t[n+3])<0?(r=U(~t[n])|U(~t[n+1])<<64n|U(~t[n+2])<<128n|U(~t[n+3])<<192n,r=-(r+1n)):r=t[n]|t[n+1]<<64n|t[n+2]<<128n|t[n+3]<<192n,r}var Ze=new TextDecoder("utf-8");new TextEncoder;function Y(t){return Ze.decode(t)}function St(t,e){return(t[e>>3]&1<<e%8)!=0}function N(t,e){let n=e+h(t,e),r=n-h(t,n),i=v(t,r);return(s,a,o=null)=>{if(s<i){let u=v(t,r+s);if(u)return a(t,n+u)}return o}}function M(t,e){return e}function F(t,e){return!!qe(t,e)}function qe(t,e){return q(t,e)<<24>>24}function q(t,e){return t[e]}function v(t,e){return Ke(t,e)<<16>>16}function Ke(t,e){return t[e]|t[e+1]<<8}function h(t,e){return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24}function Bt(t,e){return h(t,e)>>>0}function b(t,e){return O(BigInt.asIntN(64,BigInt(Bt(t,e))+(BigInt(Bt(t,e+4))<<32n)))}function _(t,e){let n=e+h(t,e),r=h(t,n);return n+=4,Y(t.subarray(n,n+r))}function T(t,e,n,r){if(!e)return[];let i=e+h(t,e);return Array.from({length:h(t,i)},(s,a)=>r(t,i+4+a*n))}const K=Symbol("rowIndex");function Q(t,e){class n{constructor(s){this[K]=s}toJSON(){return Tt(t,e,this[K])}}let r=n.prototype;for(let i=0;i<t.length;++i){if(Object.hasOwn(r,t[i]))continue;let s=e[i];Object.defineProperty(r,t[i],{get(){return s.at(this[K])},enumerable:!0})}return i=>new n(i)}function Ot(t,e){return n=>Tt(t,e,n)}function Tt(t,e,n){let r={};for(let i=0;i<t.length;++i)r[t[i]]=e[i].at(n);return r}function Qe(t){return t instanceof P}var H=(at=class{constructor({length:t,nullCount:e,type:n,validity:r,values:i,offsets:s,sizes:a,children:o}){this.length=t,this.nullCount=e,this.type=n,this.validity=r,this.values=i,this.offsets=s,this.sizes=a,this.children=o,(!e||!this.validity)&&(this.at=u=>this.value(u))}get[Symbol.toStringTag](){return"Batch"}at(t){return this.isValid(t)?this.value(t):null}isValid(t){return St(this.validity,t)}value(t){return this.values[t]}slice(t,e){let n=e-t,r=Array(n);for(let i=0;i<n;++i)r[i]=this.at(t+i);return r}*[Symbol.iterator](){for(let t=0;t<this.length;++t)yield this.at(t)}},A(at,"ArrayType",null),at),P=class extends H{constructor(t){super(t);let{length:e,values:n}=this;this.values=n.subarray(0,e)}slice(t,e){return this.nullCount?super.slice(t,e):this.values.subarray(t,e)}[Symbol.iterator](){return this.nullCount?super[Symbol.iterator]():this.values[Symbol.iterator]()}},tt=(lt=class extends H{},A(lt,"ArrayType",k),lt),f=(ot=class extends H{},A(ot,"ArrayType",Array),ot),tn=class extends f{value(t){return null}},V=class extends tt{value(t){return O(this.values[t])}},en=class extends tt{value(t){let e=this.values[t],n=(e&31744)>>10,r=(e&1023)/1024,i=(-1)**((e&32768)>>15);switch(n){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(n-15)*(1+r)}},nn=class extends f{value(t){return St(this.values,t)}},Mt=class extends H{constructor(t){super(t);let{bitWidth:e,scale:n}=this.type;this.decimal=e===128?Je:Ge,this.scale=10n**BigInt(n)}},rn=(ut=class extends Mt{value(t){return Z(this.decimal(this.values,t),this.scale)}},A(ut,"ArrayType",k),ut),sn=(ct=class extends Mt{value(t){return this.decimal(this.values,t)}},A(ct,"ArrayType",Array),ct),Ct=class extends f{constructor(t){super(t),this.source=t}value(t){return new Date(this.source.value(t))}},an=class extends tt{value(t){return 864e5*this.values[t]}};const ln=V;var on=class extends V{value(t){return super.value(t)*1e3}};const un=V;var cn=class extends V{value(t){return Z(this.values[t],1000n)}},dn=class extends V{value(t){return Z(this.values[t],1000000n)}},hn=class extends f{value(t){return this.values.subarray(t<<1,t+1<<1)}},fn=class extends f{value(t){let e=this.values,n=t<<4;return Float64Array.of(h(e,n),h(e,n+4),b(e,n+8))}},Ut=({values:t,offsets:e},n)=>t.subarray(e[n],e[n+1]),Vt=({values:t,offsets:e},n)=>t.subarray(O(e[n]),O(e[n+1])),yn=class extends f{value(t){return Ut(this,t)}},pn=class extends f{value(t){return Vt(this,t)}},gn=class extends f{value(t){return Y(Ut(this,t))}},mn=class extends f{value(t){return Y(Vt(this,t))}},vn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(e[t],e[t+1])}},bn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(O(e[t]),O(e[t+1]))}},xn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(e,n)}},wn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(O(e),O(n))}},Ft=class extends f{constructor(t){super(t),this.stride=this.type.stride}},In=class extends Ft{value(t){let{stride:e,values:n}=this;return n.subarray(t*e,(t+1)*e)}},Ln=class extends Ft{value(t){let{children:e,stride:n}=this;return e[0].slice(t*n,(t+1)*n)}};function Rt({children:t,offsets:e},n){let[r,i]=t[0].children,s=e[n],a=e[n+1],o=[];for(let u=s;u<a;++u)o.push([r.at(u),i.at(u)]);return o}var An=class extends f{value(t){return Rt(this,t)}},Nn=class extends f{value(t){return new Map(Rt(this,t))}},$t=class extends f{constructor({typeIds:t,...e}){super(e),this.typeIds=t,this.typeMap=this.type.typeMap}value(t,e=t){let{typeIds:n,children:r,typeMap:i}=this;return r[i[n[t]]].at(e)}},En=class extends $t{value(t){return super.value(t,this.offsets[t])}},zt=class extends f{constructor(t,e=Ot){super(t),this.names=this.type.children.map(n=>n.name),this.factory=e(this.names,this.children)}value(t){return this.factory(t)}},Dn=class extends zt{constructor(t){super(t,Q)}},Sn=class extends f{value(t){let[{values:e},n]=this.children;return n.at(X(e,t))}},Bn=class extends f{setDictionary(t){return this.dictionary=t,this.cache=t.cache(),this}value(t){return this.cache[this.key(t)]}key(t){return this.values[t]}},kt=class extends f{constructor({data:t,...e}){super(e),this.data=t}view(t){let{values:e,data:n}=this,r=t<<4,i=r+4,s=e,a=h(s,r);return a>12&&(i=h(s,r+12),s=n[h(s,r+8)]),s.subarray(i,i+a)}},On=class extends kt{value(t){return this.view(t)}},Tn=class extends kt{value(t){return Y(this.view(t))}};function jt(t){let e=[];return{add(n){return e.push(n),this},clear:()=>e=[],done:()=>new Mn(e,t)}}var Mn=class{constructor(t,e=(n=>(n=t[0])==null?void 0:n.type)()){this.type=e,this.length=t.reduce((s,a)=>s+a.length,0),this.nullCount=t.reduce((s,a)=>s+a.nullCount,0),this.data=t;let r=t.length,i=new Int32Array(r+1);if(r===1){let[s]=t;i[1]=s.length,this.at=a=>s.at(a)}else for(let s=0,a=0;s<r;++s)i[s+1]=a+=t[s].length;this.offsets=i}get[Symbol.toStringTag](){return"Column"}[Symbol.iterator](){let t=this.data;return t.length===1?t[0][Symbol.iterator]():Cn(t)}at(t){var i;let{data:e,offsets:n}=this,r=X(n,t)-1;return(i=e[r])==null?void 0:i.at(t-n[r])}get(t){return this.at(t)}toArray(){let{length:t,nullCount:e,data:n}=this,r=!e&&Qe(n[0]),i=n.length;if(r&&i===1)return n[0].values;let s=new(!i||e>0?Array:n[0].constructor.ArrayType??n[0].values.constructor)(t);return r?Un(s,n):Vn(s,n)}cache(){return this._cache??(this._cache=this.toArray())}};function*Cn(t){for(let e=0;e<t.length;++e){let n=t[e][Symbol.iterator]();for(let r=n.next();!r.done;r=n.next())yield r.value}}function Un(t,e){for(let n=0,r=0;n<e.length;++n){let{values:i}=e[n];t.set(i,r),r+=i.length}return t}function Vn(t,e){let n=-1;for(let r=0;r<e.length;++r){let i=e[r];for(let s=0;s<i.length;++s)t[++n]=i.at(s)}return t}var Fn=class le{constructor(e,n,r=!1){let i=e.fields.map(a=>a.name);this.schema=e,this.names=i,this.children=n,this.factory=r?Q:Ot;let s=[];this.getFactory=a=>s[a]??(s[a]=this.factory(i,n.map(o=>o.data[a])))}get[Symbol.toStringTag](){return"Table"}get numCols(){return this.names.length}get numRows(){var e;return((e=this.children[0])==null?void 0:e.length)??0}getChildAt(e){return this.children[e]}getChild(e){let n=this.names.findIndex(r=>r===e);return n>-1?this.children[n]:void 0}selectAt(e,n=[]){let{children:r,factory:i,schema:s}=this,{fields:a}=s;return new le({...s,fields:e.map((o,u)=>Rn(a[o],n[u]))},e.map(o=>r[o]),i===Q)}select(e,n){let r=this.names,i=e.map(s=>r.indexOf(s));return this.selectAt(i,n)}toColumns(){let{children:e,names:n}=this,r={};return n.forEach((i,s)=>{var a;return r[i]=((a=e[s])==null?void 0:a.toArray())??[]}),r}toArray(){var a;let{children:e,getFactory:n,numRows:r}=this,i=((a=e[0])==null?void 0:a.data)??[],s=Array(r);for(let o=0,u=-1;o<i.length;++o){let d=n(o);for(let c=0;c<i[o].length;++c)s[++u]=d(c)}return s}*[Symbol.iterator](){var i;let{children:e,getFactory:n}=this,r=((i=e[0])==null?void 0:i.data)??[];for(let s=0;s<r.length;++s){let a=n(s);for(let o=0;o<r[s].length;++o)yield a(o)}}at(e){let{children:n,getFactory:r,numRows:i}=this;if(e<0||e>=i)return null;let[{offsets:s}]=n,a=X(s,e)-1;return r(a)(e-s[a])}get(e){return this.at(e)}};function Rn(t,e){return e!=null&&e!==t.name?{...t,name:e}:t}function $n(t,e={}){let{typeId:n,bitWidth:r,precision:i,unit:s}=t,{useBigInt:a,useDate:o,useDecimalBigInt:u,useMap:d,useProxy:c}=e;switch(n){case l.Null:return tn;case l.Bool:return nn;case l.Int:case l.Time:case l.Duration:return a||r<64?P:V;case l.Float:return i?P:en;case l.Date:return Yt(s===z.DAY?an:ln,o&&Ct);case l.Timestamp:return Yt(s===m.SECOND?on:s===m.MILLISECOND?un:s===m.MICROSECOND?cn:dn,o&&Ct);case l.Decimal:return u?sn:rn;case l.Interval:return s===C.DAY_TIME?hn:s===C.YEAR_MONTH?P:fn;case l.FixedSizeBinary:return In;case l.Utf8:return gn;case l.LargeUtf8:return mn;case l.Binary:return yn;case l.LargeBinary:return pn;case l.BinaryView:return On;case l.Utf8View:return Tn;case l.List:return vn;case l.LargeList:return bn;case l.Map:return d?Nn:An;case l.ListView:return xn;case l.LargeListView:return wn;case l.FixedSizeList:return Ln;case l.Struct:return c?Dn:zt;case l.RunEndEncoded:return Sn;case l.Dictionary:return Bn;case l.Union:return t.mode?En:$t}throw Error(G(n))}function Yt(t,e){return e?class extends e{constructor(n){super(new t(n))}}:t}function zn(t,e){return{offset:b(t,e),metadataLength:h(t,e+8),bodyLength:b(t,e+16)}}function _t(t,e){return T(t,e,24,zn)}function Ht(t,e,n){let r=N(t,e);if(r(10,M,0))throw Error("Record batch compression not implemented");let i=n<$.V4?8:0;return{length:r(4,b,0),nodes:T(t,r(6,M),16,(s,a)=>({length:b(s,a),nullCount:b(s,a+8)})),regions:T(t,r(8,M),16+i,(s,a)=>({offset:b(s,a+i),length:b(s,a+i+8)})),variadic:T(t,r(12,M),8,b)}}function kn(t,e,n){let r=N(t,e);return{id:r(4,b,0),data:r(6,(i,s)=>Ht(i,s,n)),isDelta:r(8,F,!1)}}function Pt(t,e,n,r){w(n,l,G);let i=N(t,e);switch(n){case l.Binary:return Se();case l.Utf8:return Be();case l.LargeBinary:return Ye();case l.LargeUtf8:return _e();case l.List:return Ve(r[0]);case l.ListView:return We(r[0]);case l.LargeList:return He(r[0]);case l.LargeListView:return Xe(r[0]);case l.Struct:return Fe(r);case l.RunEndEncoded:return Pe(r[0],r[1]);case l.Int:return Et(i(4,h,0),i(6,F,!1));case l.Float:return De(i(4,v,gt.HALF));case l.Decimal:return Oe(i(4,h,0),i(6,h,0),i(8,h,128));case l.Date:return Te(i(4,v,z.MILLISECOND));case l.Time:return Me(i(4,v,m.MILLISECOND),i(6,h,32));case l.Timestamp:return Ce(i(4,v,m.SECOND),i(6,_));case l.Interval:return Ue(i(4,v,C.YEAR_MONTH));case l.Duration:return je(i(4,v,m.MILLISECOND));case l.FixedSizeBinary:return $e(i(4,h,0));case l.FixedSizeList:return ze(r[0],i(4,h,0));case l.Map:return ke(i(4,F,!1),r[0]);case l.Union:return Re(i(4,v,W.Sparse),r,T(t,i(6,M),4,h))}return{typeId:n}}function et(t,e){let n=T(t,e,4,(r,i)=>{let s=N(r,i);return[s(4,_),s(6,_)]});return n.length?new Map(n):null}function Wt(t,e,n){let r=N(t,e);return{version:n,endianness:r(4,v,0),fields:r(6,jn,[]),metadata:r(8,et)}}function jn(t,e){return T(t,e,4,Xt)}function Xt(t,e){let n=N(t,e),r=n(8,q,l.NONE),i=n(10,M,0),s=n(12,_n),a=Pt(t,i,r,n(14,(o,u)=>Yn(o,u)));return s&&(s.dictionary=a,a=s),{name:n(4,_),type:a,nullable:n(6,F,!1),metadata:n(16,et)}}function Yn(t,e){let n=T(t,e,4,Xt);return n.length?n:null}function _n(t,e){if(!e)return null;let n=N(t,e);return Ee(null,n(6,Hn,Dt()),n(8,F,!1),n(4,b,0))}function Hn(t,e){return Pt(t,e,l.Int)}var Pn=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,Wn=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`,Xn=t=>`Unsupported message type: ${t} (${It(S,t)})`;function nt(t,e){let n=h(t,e)||0;if(e+=4,n===-1&&(n=h(t,e)||0,e+=4),n===0)return null;let r=t.subarray(e,e+=n);if(r.byteLength<n)throw Error(Pn(n,r.byteLength));let i=N(r,0),s=i(4,v,$.V1),a=i(6,q,S.NONE),o=i(8,M,0),u=i(10,b,0),d;if(o){let c=a===S.Schema?Wt:a===S.DictionaryBatch?kn:a===S.RecordBatch?Ht:null;if(!c)throw Error(Xn(a));if(d=c(r,o,s),u>0){let g=t.subarray(e,e+=u);if(g.byteLength<u)throw Error(Wn(u,g.byteLength));d.body=g}}return{version:s,type:a,index:e,content:d}}function Jn(t){let e=t instanceof ArrayBuffer?new Uint8Array(t):t;return e instanceof Uint8Array&&Gn(e)?qn(e):Zn(e)}function Gn(t){if(!t||t.length<4)return!1;for(let e=0;e<6;++e)if(pt[e]!==t[e])return!1;return!0}function Zn(t){let e=[t].flat(),n,r=[],i=[];for(let s of e){if(!(s instanceof Uint8Array))throw Error("IPC data batch was not a Uint8Array.");let a=0;for(;;){let o=nt(s,a);if(o===null)break;if(a=o.index,o.content)switch(o.type){case S.Schema:n||(n=o.content);break;case S.RecordBatch:r.push(o.content);break;case S.DictionaryBatch:i.push(o.content);break}}}return{schema:n,dictionaries:i,records:r,metadata:null}}function qn(t){let e=t.byteLength-(pt.length+4),n=N(t,e-h(t,e)),r=n(4,v,$.V1),i=n(8,_t,[]),s=n(10,_t,[]);return{schema:n(6,(a,o)=>Wt(a,o,r)),dictionaries:i.map(({offset:a})=>nt(t,a).content),records:s.map(({offset:a})=>nt(t,a).content),metadata:n(12,et)}}function rt(t,e){return Kn(Jn(t),e)}function Kn(t,e={}){let{schema:n={fields:[]},dictionaries:r,records:i}=t,{version:s,fields:a}=n,o=new Map,u=tr(e,s,o),d=new Map;Qn(n,y=>{let p=y.type;p.typeId===l.Dictionary&&d.set(p.id,p.dictionary)});let c=new Map;for(let y of r){let{id:p,data:E,isDelta:D,body:oe}=y,dt=d.get(p),ht=it(dt,u({...E,body:oe}));if(c.has(p)){let ft=c.get(p);D||ft.clear(),ft.add(ht)}else{if(D)throw Error("Delta update can not be first dictionary batch.");c.set(p,jt(dt).add(ht))}}c.forEach((y,p)=>o.set(p,y.done()));let g=a.map(y=>jt(y.type));for(let y of i){let p=u(y);a.forEach((E,D)=>g[D].add(it(E.type,p)))}return new Fn(n,g.map(y=>y.done()),e.useProxy)}function Qn(t,e){t.fields.forEach(function n(r){var i,s,a;e(r),(s=(i=r.type.dictionary)==null?void 0:i.children)==null||s.forEach(n),(a=r.type.children)==null||a.forEach(n)})}function tr(t,e,n){let r={version:e,options:t,dictionary:i=>n.get(i)};return i=>{let{length:s,nodes:a,regions:o,variadic:u,body:d}=i,c=-1,g=-1,y=-1;return{...r,length:s,node:()=>a[++c],buffer:p=>{let{length:E,offset:D}=o[++g];return p?new p(d.buffer,d.byteOffset+D,E/p.BYTES_PER_ELEMENT):d.subarray(D,D+E)},variadic:()=>u[++y],visit(p){return p.map(E=>it(E.type,this))}}}}function it(t,e){let{typeId:n}=t,{length:r,options:i,node:s,buffer:a,variadic:o,version:u}=e,d=$n(t,i);if(n===l.Null)return new d({length:r,nullCount:r,type:t});let c={...s(),type:t};switch(n){case l.Bool:case l.Int:case l.Time:case l.Duration:case l.Float:case l.Decimal:case l.Date:case l.Timestamp:case l.Interval:case l.FixedSizeBinary:return new d({...c,validity:a(),values:a(t.values)});case l.Utf8:case l.LargeUtf8:case l.Binary:case l.LargeBinary:return new d({...c,validity:a(),offsets:a(t.offsets),values:a()});case l.BinaryView:case l.Utf8View:return new d({...c,validity:a(),values:a(),data:Array.from({length:o()},()=>a())});case l.List:case l.LargeList:case l.Map:return new d({...c,validity:a(),offsets:a(t.offsets),children:e.visit(t.children)});case l.ListView:case l.LargeListView:return new d({...c,validity:a(),offsets:a(t.offsets),sizes:a(t.offsets),children:e.visit(t.children)});case l.FixedSizeList:case l.Struct:return new d({...c,validity:a(),children:e.visit(t.children)});case l.RunEndEncoded:return new d({...c,children:e.visit(t.children)});case l.Dictionary:{let{id:g,indices:y}=t;return new d({...c,validity:a(),values:a(y.values)}).setDictionary(e.dictionary(g))}case l.Union:return u<$.V5&&a(),new d({...c,typeIds:a(wt),offsets:t.mode===W.Sparse?null:a(t.offsets),children:e.visit(t.children)});default:throw Error(G(n))}}new Uint16Array(new Uint8Array([1,0]).buffer)[0];function R(t,e){let n=new Map;return(...r)=>{let i=e(...r);if(n.has(i))return n.get(i);let s=t(...r).finally(()=>{n.delete(i)});return n.set(i,s),s}}function st(t,e){return ve(t,e)}function er(){return pe()}const I=ge;function Jt(){let t=nr(er()),e=n=>JSON.stringify(n);return{load:R(t.load.bind(t),e),sanitize:R(t.sanitize.bind(t),e),http:R(t.http.bind(t),e),file:R(t.file.bind(t),e)}}function nr(t){return{...t,async load(e,n){return e.endsWith(".arrow")?rt(await Gt(e),{useProxy:!1}).toArray():t.load(e,n)}}}const Gt=R(t=>fetch(t).then(e=>e.arrayBuffer()),t=>t);var Zt=I.integer,qt=I.number,rr=I.date,ir=I.boolean,Kt=()=>(I.integer=t=>{if(t==="")return"";if(t==="-inf"||t==="inf")return t;function e(r){let i=Zt(r);return Number.isNaN(i)?r:i}let n=Number.parseInt(t,10);if(Ie(n)){if(!(Math.abs(n)>2**53-1))return e(t);try{return BigInt(t)}catch{return e(t)}}else return""},I.number=t=>{if(t==="-inf"||t==="inf")return t;let e=qt(t);return Number.isNaN(e)?t:e},()=>{I.integer=Zt,I.number=qt}),Qt=()=>(I.date=t=>{if(t==="")return"";if(t==null)return null;if(!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return t;try{let e=new Date(t);return Number.isNaN(e.getTime())?t:e}catch{return ye.warn(`Failed to parse date: ${t}`),t}},()=>{I.date=rr});I.boolean=t=>t==="True"?!0:t==="False"?!1:ir(t);const te=Jt();async function sr(t,e,n={}){let{handleBigIntAndNumberLike:r=!1,replacePeriod:i=!1}=n;if(t.endsWith(".arrow")||(e==null?void 0:e.type)==="arrow")return rt(await Gt(t),{useProxy:!0,useDate:!0,useBigInt:r}).toArray();let s=[Qt];r&&s.push(Kt);let a=[];try{let o=await te.load(t);if(!e){if(typeof o=="string")try{JSON.parse(o),e={type:"json"}}catch{e={type:"csv",parse:"auto"}}typeof o=="object"&&(e={type:"json"})}let u=(e==null?void 0:e.type)==="csv";u&&typeof o=="string"&&(o=lr(o)),u&&typeof o=="string"&&i&&(o=or(o));let d=(e==null?void 0:e.parse)||"auto";return typeof d=="object"&&(d=fe.mapValues(d,c=>c==="time"?"string":c==="datetime"?"date":c)),a=s.map(c=>c()),u?st(o,{...e,parse:d}):st(o,e)}finally{a.forEach(o=>o())}}function ar(t,e=!0){let n=[Qt];e&&n.push(Kt);let r=n.map(s=>s()),i=st(t,{type:"csv",parse:"auto"});return r.forEach(s=>s()),i}function lr(t){return t!=null&&t.includes(",")?ee(t,e=>{let n=new Set;return e.map(r=>{let i=cr(r,n);return n.add(i),i})}):t}function or(t){return t!=null&&t.includes(".")?ee(t,e=>e.map(n=>n.replaceAll(".","\u2024"))):t}function ee(t,e){let n=t.split(`
`);return n[0]=e(n[0].split(",")).join(","),n.join(`
`)}var ur="\u200B";function cr(t,e){let n=t,r=1;for(;e.has(n);)n=`${t}${ur.repeat(r)}`,r++;return n}var dr={version:"1.1.0"};function hr(t,e,n,r){if(me(t))return`[${t.map(i=>e(be(i)?i:ne(i,n))).join(", ")}]`;if(yt(t)){let i="",{title:s,image:a,...o}=t;s&&(i+=`<h2>${e(s)}</h2>`),a&&(i+=`<img src="${new URL(e(a),r||location.href).href}">`);let u=Object.keys(o);if(u.length>0){i+="<table>";for(let d of u){let c=o[d];c!==void 0&&(yt(c)&&(c=ne(c,n)),i+=`<tr><td class="key">${e(d)}</td><td class="value">${e(c)}</td></tr>`)}i+="</table>"}return i||"{}"}return e(t)}function fr(t){let e=[];return function(n,r){return typeof r!="object"||!r?r:(e.length=e.indexOf(this)+1,e.length>t?"[Object]":e.indexOf(r)>=0?"[Circular]":(e.push(r),r))}}function ne(t,e){return JSON.stringify(t,fr(e))}var yr=`#vg-tooltip-element {
visibility: hidden;
padding: 8px;
position: fixed;
z-index: 1000;
font-family: sans-serif;
font-size: 11px;
border-radius: 3px;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
white-space: pre-line;
}
#vg-tooltip-element.visible {
visibility: visible;
}
#vg-tooltip-element h2 {
margin-top: 0;
margin-bottom: 10px;
font-size: 13px;
}
#vg-tooltip-element table {
border-spacing: 0;
}
#vg-tooltip-element table tr {
border: none;
}
#vg-tooltip-element table tr td {
overflow: hidden;
text-overflow: ellipsis;
padding-top: 2px;
padding-bottom: 2px;
vertical-align: text-top;
}
#vg-tooltip-element table tr td.key {
color: #808080;
max-width: 150px;
text-align: right;
padding-right: 4px;
}
#vg-tooltip-element table tr td.value {
display: block;
max-width: 300px;
max-height: 7em;
text-align: left;
}
#vg-tooltip-element {
/* The default theme is the light theme. */
background-color: rgba(255, 255, 255, 0.95);
border: 1px solid #d9d9d9;
color: black;
}
#vg-tooltip-element.dark-theme {
background-color: rgba(32, 32, 32, 0.9);
border: 1px solid #f5f5f5;
color: white;
}
#vg-tooltip-element.dark-theme td.key {
color: #bfbfbf;
}
`,re="vg-tooltip-element",pr={offsetX:10,offsetY:10,id:re,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:gr,maxDepth:2,formatTooltip:hr,baseURL:"",anchor:"cursor",position:["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]};function gr(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;")}function mr(t){if(!/^[A-Za-z]+[-:.\w]*$/.test(t))throw Error("Invalid HTML ID");return yr.toString().replaceAll(re,t)}function ie(t,e,{offsetX:n,offsetY:r}){let i=se({x1:t.clientX,x2:t.clientX,y1:t.clientY,y2:t.clientY},e,n,r);for(let s of["bottom-right","bottom-left","top-right","top-left"])if(ae(i[s],e))return i[s];return i["top-left"]}function vr(t,e,n,r,i){let{position:s,offsetX:a,offsetY:o}=i,u=t._el.getBoundingClientRect(),d=t._origin,c=se(br(u,d,n),r,a,o),g=Array.isArray(s)?s:[s];for(let y of g)if(ae(c[y],r)&&!xr(e,c[y],r))return c[y];return ie(e,r,i)}function br(t,e,n){let r=n.isVoronoi?n.datum.bounds:n.bounds,i=t.left+e[0]+r.x1,s=t.top+e[1]+r.y1,a=n;for(;a.mark.group;)a=a.mark.group,i+=a.x??0,s+=a.y??0;let o=r.x2-r.x1,u=r.y2-r.y1;return{x1:i,x2:i+o,y1:s,y2:s+u}}function se(t,e,n,r){let i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2,a=t.x1-e.width-n,o=i-e.width/2,u=t.x2+n,d=t.y1-e.height-r,c=s-e.height/2,g=t.y2+r;return{top:{x:o,y:d},bottom:{x:o,y:g},left:{x:a,y:c},right:{x:u,y:c},"top-left":{x:a,y:d},"top-right":{x:u,y:d},"bottom-left":{x:a,y:g},"bottom-right":{x:u,y:g}}}function ae(t,e){return t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight}function xr(t,e,n){return t.clientX>=e.x&&t.clientX<=e.x+n.width&&t.clientY>=e.y&&t.clientY<=e.y+n.height}var wr=class{constructor(t){A(this,"call");A(this,"options");A(this,"el");this.options={...pr,...t};let e=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){let n=document.createElement("style");n.setAttribute("id",this.options.styleId),n.innerHTML=mr(e);let r=document.head;r.childNodes.length>0?r.insertBefore(n,r.childNodes[0]):r.appendChild(n)}}tooltipHandler(t,e,n,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),r==null||r===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);let{x:i,y:s}=this.options.anchor==="mark"?vr(t,e,n,this.el.getBoundingClientRect(),this.options):ie(e,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${s}px`,this.el.style.left=`${i}px`}};dr.version;const Ir=new wr;export{Jt as a,te as i,ar as n,rt as o,sr as r,Ir as t};
import{s as F}from"./chunk-LvLJmgfZ.js";import{t as ee}from"./react-BGmjiNul.js";import{t as te}from"./compiler-runtime-DeeZ7FnK.js";import{r as S}from"./useEventListener-DIUKKfEy.js";import{t as re}from"./jsx-runtime-ZmTK25f3.js";import{t as ne}from"./cn-BKtXLv3a.js";import{E as oe,S as ie,_ as ae,b as le,c as se,d as ce,f as ue,m as de,s as pe,u as fe,w,x as K}from"./Combination-CMPwuAmi.js";import{a as he,c as X,i as xe,o as me,s as ge,t as ve}from"./dist-uzvC4uAK.js";var s=F(ee(),1),p=F(re(),1),[_,Ve]=oe("Tooltip",[X]),R=X(),Y="TooltipProvider",ye=700,L="tooltip.open",[be,O]=_(Y),M=r=>{let{__scopeTooltip:e,delayDuration:t=ye,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=r,l=s.useRef(!0),u=s.useRef(!1),a=s.useRef(0);return s.useEffect(()=>{let f=a.current;return()=>window.clearTimeout(f)},[]),(0,p.jsx)(be,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:s.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:i})};M.displayName=Y;var E="Tooltip",[we,j]=_(E),z=r=>{let{__scopeTooltip:e,children:t,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:l,delayDuration:u}=r,a=O(E,r.__scopeTooltip),f=R(e),[c,x]=s.useState(null),h=ue(),d=s.useRef(0),m=l??a.disableHoverableContent,v=u??a.delayDuration,g=s.useRef(!1),[b,y]=ie({prop:n,defaultProp:o??!1,onChange:B=>{B?(a.onOpen(),document.dispatchEvent(new CustomEvent(L))):a.onClose(),i==null||i(B)},caller:E}),T=s.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),D=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,g.current=!1,y(!0)},[y]),P=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,y(!1)},[y]),A=s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{g.current=!0,y(!0),d.current=0},v)},[v,y]);return s.useEffect(()=>()=>{d.current&&(d.current=(window.clearTimeout(d.current),0))},[]),(0,p.jsx)(ge,{...f,children:(0,p.jsx)(we,{scope:e,contentId:h,open:b,stateAttribute:T,trigger:c,onTriggerChange:x,onTriggerEnter:s.useCallback(()=>{a.isOpenDelayedRef.current?A():D()},[a.isOpenDelayedRef,A,D]),onTriggerLeave:s.useCallback(()=>{m?P():(window.clearTimeout(d.current),d.current=0)},[P,m]),onOpen:D,onClose:P,disableHoverableContent:m,children:t})})};z.displayName=E;var I="TooltipTrigger",q=s.forwardRef((r,e)=>{let{__scopeTooltip:t,...n}=r,o=j(I,t),i=O(I,t),l=R(t),u=S(e,s.useRef(null),o.onTriggerChange),a=s.useRef(!1),f=s.useRef(!1),c=s.useCallback(()=>a.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),(0,p.jsx)(xe,{asChild:!0,...l,children:(0,p.jsx)(ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:w(r.onPointerMove,x=>{x.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:w(r.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:w(r.onPointerDown,()=>{o.open&&o.onClose(),a.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:w(r.onFocus,()=>{a.current||o.onOpen()}),onBlur:w(r.onBlur,o.onClose),onClick:w(r.onClick,o.onClose)})})});q.displayName=I;var N="TooltipPortal",[Ce,Te]=_(N,{forceMount:void 0}),G=r=>{let{__scopeTooltip:e,forceMount:t,children:n,container:o}=r,i=j(N,e);return(0,p.jsx)(Ce,{scope:e,forceMount:t,children:(0,p.jsx)(K,{present:t||i.open,children:(0,p.jsx)(ce,{asChild:!0,container:o,children:n})})})};G.displayName=N;var C="TooltipContent",J=s.forwardRef((r,e)=>{let t=Te(C,r.__scopeTooltip),{forceMount:n=t.forceMount,side:o="top",...i}=r,l=j(C,r.__scopeTooltip);return(0,p.jsx)(K,{present:n||l.open,children:l.disableHoverableContent?(0,p.jsx)(Q,{side:o,...i,ref:e}):(0,p.jsx)(Ee,{side:o,...i,ref:e})})}),Ee=s.forwardRef((r,e)=>{let t=j(C,r.__scopeTooltip),n=O(C,r.__scopeTooltip),o=s.useRef(null),i=S(e,o),[l,u]=s.useState(null),{trigger:a,onClose:f}=t,c=o.current,{onPointerInTransitChange:x}=n,h=s.useCallback(()=>{u(null),x(!1)},[x]),d=s.useCallback((m,v)=>{let g=m.currentTarget,b={x:m.clientX,y:m.clientY},y=Pe(b,De(b,g.getBoundingClientRect())),T=Le(v.getBoundingClientRect());u(Me([...y,...T])),x(!0)},[x]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(a&&c){let m=g=>d(g,c),v=g=>d(g,a);return a.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{a.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[a,c,d,h]),s.useEffect(()=>{if(l){let m=v=>{let g=v.target,b={x:v.clientX,y:v.clientY},y=(a==null?void 0:a.contains(g))||(c==null?void 0:c.contains(g)),T=!Oe(b,l);y?h():T&&(h(),f())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[a,c,l,f,h]),(0,p.jsx)(Q,{...r,ref:i})}),[je,_e]=_(E,{isInside:!1}),Re=le("TooltipContent"),Q=s.forwardRef((r,e)=>{let{__scopeTooltip:t,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:l,...u}=r,a=j(C,t),f=R(t),{onClose:c}=a;return s.useEffect(()=>(document.addEventListener(L,c),()=>document.removeEventListener(L,c)),[c]),s.useEffect(()=>{if(a.trigger){let x=h=>{var d;(d=h.target)!=null&&d.contains(a.trigger)&&c()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[a.trigger,c]),(0,p.jsx)(de,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:x=>x.preventDefault(),onDismiss:c,children:(0,p.jsxs)(me,{"data-state":a.stateAttribute,...f,...u,ref:e,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(Re,{children:n}),(0,p.jsx)(je,{scope:t,isInside:!0,children:(0,p.jsx)(ve,{id:a.contentId,role:"tooltip",children:o||n})})]})})});J.displayName=C;var U="TooltipArrow",ke=s.forwardRef((r,e)=>{let{__scopeTooltip:t,...n}=r,o=R(t);return _e(U,t).isInside?null:(0,p.jsx)(he,{...o,...n,ref:e})});ke.displayName=U;function De(r,e){let t=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),o=Math.abs(e.right-r.x),i=Math.abs(e.left-r.x);switch(Math.min(t,n,o,i)){case i:return"left";case o:return"right";case t:return"top";case n:return"bottom";default:throw Error("unreachable")}}function Pe(r,e,t=5){let n=[];switch(e){case"top":n.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":n.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":n.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":n.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return n}function Le(r){let{top:e,right:t,bottom:n,left:o}=r;return[{x:o,y:e},{x:t,y:e},{x:t,y:n},{x:o,y:n}]}function Oe(r,e){let{x:t,y:n}=r,o=!1;for(let i=0,l=e.length-1;i<e.length;l=i++){let u=e[i],a=e[l],f=u.x,c=u.y,x=a.x,h=a.y;c>n!=h>n&&t<(x-f)*(n-c)/(h-c)+f&&(o=!o)}return o}function Me(r){let e=r.slice();return e.sort((t,n)=>t.x<n.x?-1:t.x>n.x?1:t.y<n.y?-1:t.y>n.y?1:0),Ie(e)}function Ie(r){if(r.length<=1)return r.slice();let e=[];for(let n=0;n<r.length;n++){let o=r[n];for(;e.length>=2;){let i=e[e.length-1],l=e[e.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))e.pop();else break}e.push(o)}e.pop();let t=[];for(let n=r.length-1;n>=0;n--){let o=r[n];for(;t.length>=2;){let i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Ne=M,He=z,Ae=q,Be=G,V=J,H=te(),Fe=r=>{let e=(0,H.c)(6),t,n;e[0]===r?(t=e[1],n=e[2]):({delayDuration:n,...t}=r,e[0]=r,e[1]=t,e[2]=n);let o=n===void 0?400:n,i;return e[3]!==o||e[4]!==t?(i=(0,p.jsx)(Ne,{delayDuration:o,...t}),e[3]=o,e[4]=t,e[5]=i):i=e[5],i},W=pe(Be),Z=He,Se=se(V),$=Ae,k=s.forwardRef((r,e)=>{let t=(0,H.c)(11),n,o,i;t[0]===r?(n=t[1],o=t[2],i=t[3]):({className:n,sideOffset:i,...o}=r,t[0]=r,t[1]=n,t[2]=o,t[3]=i);let l=i===void 0?4:i,u;t[4]===n?u=t[5]:(u=ne("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-xs data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",n),t[4]=n,t[5]=u);let a;return t[6]!==o||t[7]!==e||t[8]!==l||t[9]!==u?(a=(0,p.jsx)(fe,{children:(0,p.jsx)(Se,{ref:e,sideOffset:l,className:u,...o})}),t[6]=o,t[7]=e,t[8]=l,t[9]=u,t[10]=a):a=t[10],a});k.displayName=V.displayName;var Ke=r=>{let e=(0,H.c)(22),t,n,o,i,l,u,a,f;e[0]===r?(t=e[1],n=e[2],o=e[3],i=e[4],l=e[5],u=e[6],a=e[7],f=e[8]):({content:o,children:n,usePortal:u,asChild:a,tabIndex:f,side:l,align:t,...i}=r,e[0]=r,e[1]=t,e[2]=n,e[3]=o,e[4]=i,e[5]=l,e[6]=u,e[7]=a,e[8]=f);let c=u===void 0?!0:u,x=a===void 0?!0:a;if(o==null||o==="")return n;let h;e[9]!==x||e[10]!==n||e[11]!==f?(h=(0,p.jsx)($,{asChild:x,tabIndex:f,children:n}),e[9]=x,e[10]=n,e[11]=f,e[12]=h):h=e[12];let d;e[13]!==t||e[14]!==o||e[15]!==l||e[16]!==c?(d=c?(0,p.jsx)(W,{children:(0,p.jsx)(k,{side:l,align:t,children:o})}):(0,p.jsx)(k,{side:l,align:t,children:o}),e[13]=t,e[14]=o,e[15]=l,e[16]=c,e[17]=d):d=e[17];let m;return e[18]!==i||e[19]!==h||e[20]!==d?(m=(0,p.jsxs)(Z,{disableHoverableContent:!0,...i,children:[h,d]}),e[18]=i,e[19]=h,e[20]=d,e[21]=m):m=e[21],m};export{Z as a,Fe as i,k as n,$ as o,W as r,M as s,Ke as t};
import{s as O}from"./chunk-LvLJmgfZ.js";import{d as ee,p as te,u as q}from"./useEvent-DO6uJBas.js";import{t as le}from"./react-BGmjiNul.js";import{Jn as re,W as A,er as se,k as ae}from"./cells-BpZ7g6ok.js";import"./react-dom-C9fstfnp.js";import{t as ie}from"./compiler-runtime-DeeZ7FnK.js";import"./config-CIrPQIbt.js";import{t as ne}from"./jsx-runtime-ZmTK25f3.js";import{t as oe}from"./cn-BKtXLv3a.js";import"./dist-DBwNzi3C.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-_Aax6sXd.js";import{t as ce}from"./createLucideIcon-CnW3RofX.js";import{n as de,r as U}from"./CellStatus-C5UGkPn6.js";import{_ as me}from"./select-V5IdpNiR.js";import{t as pe}from"./chevron-right-DwagBitu.js";import{t as ue}from"./circle-check-C57eOpl0.js";import{t as he}from"./circle-play-BuOtSgid.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{r as fe}from"./useTheme-DUdVAZI8.js";import"./Combination-CMPwuAmi.js";import{t as J}from"./tooltip-CEc2ajau.js";import"./vega-loader.browser-CRZ52CKf.js";import{r as xe,t as ve}from"./react-vega-CoHwoAp_.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import{t as ge}from"./cell-link-Bw5bzt4a.js";import{t as je}from"./bundle.esm-2AjO7UK5.js";import{n as ye,r as Se,t as V}from"./react-resizable-panels.browser.esm-Ctj_10o2.js";import{t as Ie}from"./empty-state-h8C2C6hZ.js";import"./multi-icon-DZsiUPo5.js";import{t as be}from"./clear-button-BZQ4dSdG.js";import{n as Ne,t as Te}from"./runs-bjsj1D88.js";var we=ce("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),D=ie(),z=O(le(),1);const W="hoveredCellId",Y="cellHover";var ke="cellNum",G="cell",H="startTimestamp",K="endTimestamp",X="status";function Re(t,e,l,i){let n="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:i==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:W,bind:{element:`#${e}`}},{name:Y,select:{type:"point",on:"mouseover",fields:[G],clear:"mouseout"}}],height:{step:l==="sideBySide"?26:21},encoding:{y:{field:ke,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:l==="sideBySide"?null:void 0},x:{field:H,type:"temporal",axis:{orient:"top",title:null}},x2:{field:K,type:"temporal"},tooltip:[{field:H,type:"temporal",timeUnit:n,title:"Start"},{field:K,type:"temporal",timeUnit:n,title:"End"}],size:{value:{expr:`${W} == toString(datum.${G}) ? 19.5 : 18`}},color:{field:X,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${X} === 'queued' ? 9999999999999 : datum.${H}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function Z(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var r=O(ne(),1),Q=te(new Map);const _e=()=>{let t=(0,D.c)(32),{runIds:e,runMap:l}=q(Te),i=q(Q),{clearRuns:n}=Ne(),{theme:o}=fe(),[a,w]=(0,z.useState)("above"),u;t[0]===a?u=t[1]:(u=()=>{w(a==="above"?"sideBySide":"above")},t[0]=a,t[1]=u);let d=u;if(e.length===0){let s;return t[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,r.jsx)(Ie,{title:"No traces",description:(0,r.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,r.jsx)(se,{})}),t[2]=s):s=t[2],s}let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=(0,r.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=m):m=t[3];let x=a==="sideBySide",p;t[4]!==x||t[5]!==d?(p=(0,r.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[m,(0,r.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:d,defaultChecked:x,className:"h-3 cursor-pointer"})]}),t[4]=x,t[5]=d,t[6]=p):p=t[6];let c;t[7]===n?c=t[8]:(c=(0,r.jsx)(be,{dataTestId:"clear-traces-button",onClick:n}),t[7]=n,t[8]=c);let h;t[9]!==p||t[10]!==c?(h=(0,r.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[p,c]}),t[9]=p,t[10]=c,t[11]=h):h=t[11];let v;if(t[12]!==a||t[13]!==i||t[14]!==e||t[15]!==l||t[16]!==o){let s;t[18]!==a||t[19]!==i||t[20]!==l||t[21]!==o?(s=(N,T)=>{let b=l.get(N);return b?(0,r.jsx)(Me,{run:b,isExpanded:i.get(b.runId),isMostRecentRun:T===0,chartPosition:a,theme:o},b.runId):null},t[18]=a,t[19]=i,t[20]=l,t[21]=o,t[22]=s):s=t[22],v=e.map(s),t[12]=a,t[13]=i,t[14]=e,t[15]=l,t[16]=o,t[17]=v}else v=t[17];let g;t[23]===v?g=t[24]:(g=(0,r.jsx)("div",{className:"flex flex-col gap-3",children:v}),t[23]=v,t[24]=g);let j;t[25]!==h||t[26]!==g?(j=(0,r.jsx)(V,{defaultSize:50,minSize:30,maxSize:80,children:(0,r.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[h,g]})}),t[25]=h,t[26]=g,t[27]=j):j=t[27];let I;t[28]===Symbol.for("react.memo_cache_sentinel")?(I=(0,r.jsx)(Se,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[28]=I):I=t[28];let f;t[29]===Symbol.for("react.memo_cache_sentinel")?(f=(0,r.jsx)(V,{defaultSize:50,children:(0,r.jsx)("div",{})}),t[29]=f):f=t[29];let y;return t[30]===j?y=t[31]:(y=(0,r.jsxs)(ye,{direction:"horizontal",className:"h-full",children:[j,I,f]}),t[30]=j,t[31]=y),y};var Me=({run:t,isMostRecentRun:e,chartPosition:l,isExpanded:i,theme:n})=>{let o=ee(Q);i??(i=e);let a=()=>{o(d=>{let m=new Map(d);return m.set(t.runId,!i),m})},w=(0,r.jsx)(i?me:pe,{height:16,className:"inline"}),u=(0,r.jsxs)("span",{className:"text-sm cursor-pointer",onClick:a,children:["Run - ",A(t.runStartTime),w]});return i?(0,r.jsx)($e,{run:t,chartPosition:l,theme:n,title:u},t.runId):(0,r.jsx)("div",{className:"flex flex-col",children:(0,r.jsx)("pre",{className:"font-mono font-semibold",children:u})},t.runId)},$e=t=>{let e=(0,D.c)(40),{run:l,chartPosition:i,theme:n,title:o}=t,[a,w]=(0,z.useState)(),u=(0,z.useRef)(null),{ref:d,width:m}=je(),x=m===void 0?300:m,p=ae(),c,h;if(e[0]!==p||e[1]!==i||e[2]!==l.cellRuns||e[3]!==l.runId||e[4]!==n){let k=[...l.cellRuns.values()].map(S=>{let R=S.elapsedTime??0;return{cell:S.cellId,cellNum:p.inOrderIds.indexOf(S.cellId),startTimestamp:Z(S.startTime),endTimestamp:Z(S.startTime+R),elapsedTime:U(R*1e3),status:S.status}});c=`hiddenInputElement-${l.runId}`,h=xe(Re(k,c,i,n)),e[0]=p,e[1]=i,e[2]=l.cellRuns,e[3]=l.runId,e[4]=n,e[5]=c,e[6]=h}else c=e[5],h=e[6];let v=h.spec,g=n==="dark"?"dark":void 0,j=x-50,I=i==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==I?(f={theme:g,width:j,height:I,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=I,e[10]=f):f=e[10];let y;e[11]!==f||e[12]!==v?(y={ref:u,spec:v,options:f},e[11]=f,e[12]=v,e[13]=y):y=e[13];let s=ve(y),N;e[14]===(s==null?void 0:s.view)?N=e[15]:(N=()=>{let k=[{signalName:Y,handler:(S,R)=>{var L;let C=(L=R.cell)==null?void 0:L[0];w(C??null)}}];return k.forEach(S=>{let{signalName:R,handler:C}=S;s==null||s.view.addSignalListener(R,C)}),()=>{k.forEach(S=>{let{signalName:R,handler:C}=S;s==null||s.view.removeSignalListener(R,C)})}},e[14]=s==null?void 0:s.view,e[15]=N);let T;e[16]===s?T=e[17]:(T=[s],e[16]=s,e[17]=T),(0,z.useEffect)(N,T);let b;e[18]!==c||e[19]!==a||e[20]!==l?(b=(0,r.jsx)(ze,{run:l,hoveredCellId:a,hiddenInputElementId:c}),e[18]=c,e[19]=a,e[20]=l,e[21]=b):b=e[21];let _=b,F=i==="sideBySide"?"-mt-0.5 flex-1":"",E;e[22]===Symbol.for("react.memo_cache_sentinel")?(E=(0,r.jsx)(z.Suspense,{children:(0,r.jsx)("div",{ref:u})}),e[22]=E):E=e[22];let P;e[23]!==d||e[24]!==F?(P=(0,r.jsx)("div",{className:F,ref:d,children:E}),e[23]=d,e[24]=F,e[25]=P):P=e[25];let M=P;if(i==="above"){let k;e[26]!==M||e[27]!==o||e[28]!==_?(k=(0,r.jsxs)("pre",{className:"font-mono font-semibold",children:[o,M,_]}),e[26]=M,e[27]=o,e[28]=_,e[29]=k):k=e[29];let S;return e[30]!==l.runId||e[31]!==k?(S=(0,r.jsx)("div",{className:"flex flex-col",children:k},l.runId),e[30]=l.runId,e[31]=k,e[32]=S):S=e[32],S}let $;e[33]!==o||e[34]!==_?($=(0,r.jsxs)("pre",{className:"font-mono font-semibold",children:[o,_]}),e[33]=o,e[34]=_,e[35]=$):$=e[35];let B;return e[36]!==M||e[37]!==l.runId||e[38]!==$?(B=(0,r.jsxs)("div",{className:"flex flex-row",children:[$,M]},l.runId),e[36]=M,e[37]=l.runId,e[38]=$,e[39]=B):B=e[39],B},ze=t=>{let e=(0,D.c)(12),{run:l,hoveredCellId:i,hiddenInputElementId:n}=t,o=(0,z.useRef)(null),a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=c=>{o.current&&(o.current.value=String(c),o.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=a):a=e[0];let w=a,u=i||"",d;e[1]!==n||e[2]!==u?(d=(0,r.jsx)("input",{type:"text",id:n,defaultValue:u,hidden:!0,ref:o}),e[1]=n,e[2]=u,e[3]=d):d=e[3];let m;e[4]===l.cellRuns?m=e[5]:(m=[...l.cellRuns.values()],e[4]=l.cellRuns,e[5]=m);let x;e[6]!==i||e[7]!==m?(x=m.map(c=>(0,r.jsx)(Ee,{cellRun:c,hovered:c.cellId===i,dispatchHoverEvent:w},c.cellId)),e[6]=i,e[7]=m,e[8]=x):x=e[8];let p;return e[9]!==d||e[10]!==x?(p=(0,r.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[d,x]}),e[9]=d,e[10]=x,e[11]=p):p=e[11],p},Ce={success:(0,r.jsx)(ue,{color:"green",size:14}),running:(0,r.jsx)(he,{color:"var(--blue-10)",size:14}),error:(0,r.jsx)(re,{color:"red",size:14}),queued:(0,r.jsx)(we,{color:"grey",size:14})},Ee=t=>{let e=(0,D.c)(39),{cellRun:l,hovered:i,dispatchHoverEvent:n}=t,o;e[0]===l.elapsedTime?o=e[1]:(o=l.elapsedTime?U(l.elapsedTime*1e3):"-",e[0]=l.elapsedTime,e[1]=o);let a=o,w;e[2]!==l.elapsedTime||e[3]!==a?(w=l.elapsedTime?(0,r.jsxs)("span",{children:["This cell took ",(0,r.jsx)(de,{elapsedTime:a})," to run"]}):(0,r.jsx)("span",{children:"This cell has not been run"}),e[2]=l.elapsedTime,e[3]=a,e[4]=w):w=e[4];let u=w,d;e[5]!==l.cellId||e[6]!==n?(d=()=>{n(l.cellId)},e[5]=l.cellId,e[6]=n,e[7]=d):d=e[7];let m=d,x;e[8]===n?x=e[9]:(x=()=>{n(null)},e[8]=n,e[9]=x);let p=x,c=i&&"bg-(--gray-3) opacity-100",h;e[10]===c?h=e[11]:(h=oe("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",c),e[10]=c,e[11]=h);let v;e[12]===l.startTime?v=e[13]:(v=A(l.startTime),e[12]=l.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,r.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===l.cellId?j=e[17]:(j=(0,r.jsxs)("span",{className:"text-(--gray-10) w-16",children:["(",(0,r.jsx)(ge,{cellId:l.cellId}),")"]}),e[16]=l.cellId,e[17]=j);let I;e[18]===l.code?I=e[19]:(I=(0,r.jsx)("span",{className:"w-40 truncate -ml-1",children:l.code}),e[18]=l.code,e[19]=I);let f;e[20]===a?f=e[21]:(f=(0,r.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:a}),e[20]=a,e[21]=f);let y;e[22]!==u||e[23]!==f?(y=(0,r.jsx)(J,{content:u,children:f}),e[22]=u,e[23]=f,e[24]=y):y=e[24];let s=Ce[l.status],N;e[25]!==l.status||e[26]!==s?(N=(0,r.jsx)(J,{content:l.status,children:s}),e[25]=l.status,e[26]=s,e[27]=N):N=e[27];let T;e[28]!==y||e[29]!==N?(T=(0,r.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[y,N]}),e[28]=y,e[29]=N,e[30]=T):T=e[30];let b;return e[31]!==m||e[32]!==p||e[33]!==I||e[34]!==T||e[35]!==h||e[36]!==g||e[37]!==j?(b=(0,r.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:p,children:[g,j,I,T]}),e[31]=m,e[32]=p,e[33]=I,e[34]=T,e[35]=h,e[36]=g,e[37]=j,e[38]=b):b=e[38],b};export{_e as Tracing};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-DcLhmYc2.js","./clear-button-BZQ4dSdG.js","./cn-BKtXLv3a.js","./clsx-D8GwTfvk.js","./compiler-runtime-DeeZ7FnK.js","./react-BGmjiNul.js","./chunk-LvLJmgfZ.js","./jsx-runtime-ZmTK25f3.js","./cells-BpZ7g6ok.js","./preload-helper-DItdS47A.js","./badge-Ce8wRjuQ.js","./button-YC1gW_kJ.js","./hotkeys-BHHWjLlp.js","./useEventListener-DIUKKfEy.js","./Combination-CMPwuAmi.js","./react-dom-C9fstfnp.js","./select-V5IdpNiR.js","./menu-items-CJhvWPOk.js","./dist-uzvC4uAK.js","./createLucideIcon-CnW3RofX.js","./check-DdfN0k2d.js","./tooltip-CEc2ajau.js","./use-toast-rmUWldD_.js","./utils-DXvhzCGS.js","./useEvent-DO6uJBas.js","./_baseIsEqual-B9N9Mw_N.js","./_Uint8Array-BGESiCQL.js","./invariant-CAG_dYON.js","./merge-BBX6ug-N.js","./_baseFor-Duhs3RiJ.js","./zod-Cg4WLWh2.js","./config-CIrPQIbt.js","./constants-B6Cb__3x.js","./Deferred-CrO5-0RA.js","./DeferredRequestRegistry-CO2AyNfd.js","./uuid-DercMavo.js","./requests-BsVD4CdD.js","./useLifecycle-D35CBukS.js","./assertNever-CBU83Y6o.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./_hasUnicode-CWqKLxBC.js","./_arrayReduce-TT0iOGKY.js","./useNonce-_Aax6sXd.js","./useTheme-DUdVAZI8.js","./once-Bul8mtFs.js","./capabilities-MM7JYRxj.js","./createReducer-Dnna-AUO.js","./dist-ChS0Dc_R.js","./dist-DBwNzi3C.js","./dist-CtsanegT.js","./dist-Cayq-K1c.js","./dist-TiFCI16_.js","./dist-BIKFl48f.js","./dist-B0VqT_4z.js","./dist-BYyu59D8.js","./dist-Gqv0jSNr.js","./stex-CtmkcLz7.js","./toDate-CgbKQM5E.js","./cjs-CH5Rj0g8.js","./_baseProperty-NKyJO2oh.js","./debounce-B3mjKxHe.js","./now-6sUe0ZdD.js","./toInteger-CDcO32Gx.js","./database-zap-B9y7063w.js","./main-U5Goe76G.js","./cells-jmgGt1lS.css","./CellStatus-C5UGkPn6.js","./multi-icon-DZsiUPo5.js","./multi-icon-pwGWVz3d.css","./useDateFormatter-CS4kbWl2.js","./context-JwD-oSsl.js","./SSRProvider-CEHRCdjA.js","./en-US-pRRbZZHE.js","./ellipsis-5ip-qDfN.js","./refresh-cw-CQd-1kjx.js","./workflow-CMjI9cxl.js","./CellStatus-2Psjnl5F.css","./empty-state-h8C2C6hZ.js","./cell-link-Bw5bzt4a.js","./ImperativeModal-CUbWEBci.js","./alert-dialog-DwQffb13.js","./dialog-CxGKN4C_.js","./input-pAun1m1X.js","./useDebounce-D5NcotGm.js","./numbers-iQunIAXf.js","./useNumberFormatter-c6GXymzg.js","./usePress-Bup4EGrp.js","./runs-bjsj1D88.js","./react-vega-CoHwoAp_.js","./precisionRound-BMPhtTJQ.js","./defaultLocale-D_rSvXvJ.js","./linear-DjglEiG4.js","./timer-ffBO1paY.js","./init-AtRnKt23.js","./time-lLuPpFd-.js","./defaultLocale-C92Rrpmf.js","./range-Bc7-zhbC.js","./vega-loader.browser-CRZ52CKf.js","./treemap-DqSsE4KM.js","./path-BMloFSsK.js","./colors-C3_wIR8c.js","./ordinal-DTOdb5Da.js","./arc-3DY1fURi.js","./math-BIeW4iGV.js","./array-BF0shS9G.js","./step-COhf-b0R.js","./line-BCZzhM6G.js","./chevron-right-DwagBitu.js","./circle-check-C57eOpl0.js","./circle-play-BuOtSgid.js","./react-resizable-panels.browser.esm-Ctj_10o2.js","./bundle.esm-2AjO7UK5.js"])))=>i.map(i=>d[i]);
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-BGmjiNul.js";import{t as n}from"./compiler-runtime-DeeZ7FnK.js";import{t as f}from"./jsx-runtime-ZmTK25f3.js";import{t as _}from"./spinner-DaIKav-i.js";import{t as p}from"./preload-helper-DItdS47A.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-DcLhmYc2.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,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,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,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112]),import.meta.url).then(t=>({default:t.Tracing}))),c=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s,{}),children:(0,r.jsx)(o,{})}),t[0]=e):e=t[0],e},s=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"flex flex-col items-center justify-center h-full",children:(0,r.jsx)(_,{})}),t[0]=e):e=t[0],e}})();export{u as __tla,c as default};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);export{t};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);export{t};

Sorry, the diff of this file is too big to display

function C(n){var r=0,u=n.children,i=u&&u.length;if(!i)r=1;else for(;--i>=0;)r+=u[i].value;n.value=r}function D(){return this.eachAfter(C)}function F(n,r){let u=-1;for(let i of this)n.call(r,i,++u,this);return this}function G(n,r){for(var u=this,i=[u],e,o,a=-1;u=i.pop();)if(n.call(r,u,++a,this),e=u.children)for(o=e.length-1;o>=0;--o)i.push(e[o]);return this}function H(n,r){for(var u=this,i=[u],e=[],o,a,h,l=-1;u=i.pop();)if(e.push(u),o=u.children)for(a=0,h=o.length;a<h;++a)i.push(o[a]);for(;u=e.pop();)n.call(r,u,++l,this);return this}function J(n,r){let u=-1;for(let i of this)if(n.call(r,i,++u,this))return i}function K(n){return this.eachAfter(function(r){for(var u=+n(r.data)||0,i=r.children,e=i&&i.length;--e>=0;)u+=i[e].value;r.value=u})}function N(n){return this.eachBefore(function(r){r.children&&r.children.sort(n)})}function P(n){for(var r=this,u=Q(r,n),i=[r];r!==u;)r=r.parent,i.push(r);for(var e=i.length;n!==u;)i.splice(e,0,n),n=n.parent;return i}function Q(n,r){if(n===r)return n;var u=n.ancestors(),i=r.ancestors(),e=null;for(n=u.pop(),r=i.pop();n===r;)e=n,n=u.pop(),r=i.pop();return e}function U(){for(var n=this,r=[n];n=n.parent;)r.push(n);return r}function V(){return Array.from(this)}function W(){var n=[];return this.eachBefore(function(r){r.children||n.push(r)}),n}function X(){var n=this,r=[];return n.each(function(u){u!==n&&r.push({source:u.parent,target:u})}),r}function*Y(){var n=this,r,u=[n],i,e,o;do for(r=u.reverse(),u=[];n=r.pop();)if(yield n,i=n.children)for(e=0,o=i.length;e<o;++e)u.push(i[e]);while(u.length)}function I(n,r){n instanceof Map?(n=[void 0,n],r===void 0&&(r=S)):r===void 0&&(r=$);for(var u=new A(n),i,e=[u],o,a,h,l;i=e.pop();)if((a=r(i.data))&&(l=(a=Array.from(a)).length))for(i.children=a,h=l-1;h>=0;--h)e.push(o=a[h]=new A(a[h])),o.parent=i,o.depth=i.depth+1;return u.eachBefore(O)}function Z(){return I(this).eachBefore(_)}function $(n){return n.children}function S(n){return Array.isArray(n)?n[1]:null}function _(n){n.data.value!==void 0&&(n.value=n.data.value),n.data=n.data.data}function O(n){var r=0;do n.height=r;while((n=n.parent)&&n.height<++r)}function A(n){this.data=n,this.depth=this.height=0,this.parent=null}A.prototype=I.prototype={constructor:A,count:D,each:F,eachAfter:H,eachBefore:G,find:J,sum:K,sort:N,path:P,ancestors:U,descendants:V,leaves:W,links:X,copy:Z,[Symbol.iterator]:Y};function nn(n){return n==null?null:E(n)}function E(n){if(typeof n!="function")throw Error();return n}function m(){return 0}function M(n){return function(){return n}}function L(n){n.x0=Math.round(n.x0),n.y0=Math.round(n.y0),n.x1=Math.round(n.x1),n.y1=Math.round(n.y1)}function R(n,r,u,i,e){for(var o=n.children,a,h=-1,l=o.length,v=n.value&&(i-r)/n.value;++h<l;)a=o[h],a.y0=u,a.y1=e,a.x0=r,a.x1=r+=a.value*v}function b(n,r,u,i,e){for(var o=n.children,a,h=-1,l=o.length,v=n.value&&(e-u)/n.value;++h<l;)a=o[h],a.x0=r,a.x1=i,a.y0=u,a.y1=u+=a.value*v}var j=(1+Math.sqrt(5))/2;function q(n,r,u,i,e,o){for(var a=[],h=r.children,l,v,f=0,y=0,t=h.length,s,p,d=r.value,c,g,B,w,T,k,x;f<t;){s=e-u,p=o-i;do c=h[y++].value;while(!c&&y<t);for(g=B=c,k=Math.max(p/s,s/p)/(d*n),x=c*c*k,T=Math.max(B/x,x/g);y<t;++y){if(c+=v=h[y].value,v<g&&(g=v),v>B&&(B=v),x=c*c*k,w=Math.max(B/x,x/g),w>T){c-=v;break}T=w}a.push(l={value:c,dice:s<p,children:h.slice(f,y)}),l.dice?R(l,u,i,e,d?i+=p*c/d:o):b(l,u,i,d?u+=s*c/d:e,o),d-=c,f=y}return a}var z=(function n(r){function u(i,e,o,a,h){q(r,i,e,o,a,h)}return u.ratio=function(i){return n((i=+i)>1?i:1)},u})(j);function rn(){var n=z,r=!1,u=1,i=1,e=[0],o=m,a=m,h=m,l=m,v=m;function f(t){return t.x0=t.y0=0,t.x1=u,t.y1=i,t.eachBefore(y),e=[0],r&&t.eachBefore(L),t}function y(t){var s=e[t.depth],p=t.x0+s,d=t.y0+s,c=t.x1-s,g=t.y1-s;c<p&&(p=c=(p+c)/2),g<d&&(d=g=(d+g)/2),t.x0=p,t.y0=d,t.x1=c,t.y1=g,t.children&&(s=e[t.depth+1]=o(t)/2,p+=v(t)-s,d+=a(t)-s,c-=h(t)-s,g-=l(t)-s,c<p&&(p=c=(p+c)/2),g<d&&(d=g=(d+g)/2),n(t,p,d,c,g))}return f.round=function(t){return arguments.length?(r=!!t,f):r},f.size=function(t){return arguments.length?(u=+t[0],i=+t[1],f):[u,i]},f.tile=function(t){return arguments.length?(n=E(t),f):n},f.padding=function(t){return arguments.length?f.paddingInner(t).paddingOuter(t):f.paddingInner()},f.paddingInner=function(t){return arguments.length?(o=typeof t=="function"?t:M(+t),f):o},f.paddingOuter=function(t){return arguments.length?f.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):f.paddingTop()},f.paddingTop=function(t){return arguments.length?(a=typeof t=="function"?t:M(+t),f):a},f.paddingRight=function(t){return arguments.length?(h=typeof t=="function"?t:M(+t),f):h},f.paddingBottom=function(t){return arguments.length?(l=typeof t=="function"?t:M(+t),f):l},f.paddingLeft=function(t){return arguments.length?(v=typeof t=="function"?t:M(+t),f):v},f}export{b as a,m as c,A as d,O as f,z as i,M as l,j as n,R as o,I as p,q as r,L as s,rn as t,nn as u};
import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import{n as e}from"./chunk-FWNWRKHM-D3c3qJTG.js";export{e as createTreemapServices};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);export{t};
import{t as o}from"./troff-qCd7sECP.js";export{o as troff};
var e={};function c(a){if(a.eatSpace())return null;var r=a.sol(),n=a.next();if(n==="\\")return a.match("fB")||a.match("fR")||a.match("fI")||a.match("u")||a.match("d")||a.match("%")||a.match("&")?"string":a.match("m[")?(a.skipTo("]"),a.next(),"string"):a.match("s+")||a.match("s-")?(a.eatWhile(/[\d-]/),"string"):((a.match("(")||a.match("*("))&&a.eatWhile(/[\w-]/),"string");if(r&&(n==="."||n==="'")&&a.eat("\\")&&a.eat('"'))return a.skipToEnd(),"comment";if(r&&n==="."){if(a.match("B ")||a.match("I ")||a.match("R "))return"attribute";if(a.match("TH ")||a.match("SH ")||a.match("SS ")||a.match("HP "))return a.skipToEnd(),"quote";if(a.match(/[A-Z]/)&&a.match(/[A-Z]/)||a.match(/[a-z]/)&&a.match(/[a-z]/))return"attribute"}a.eatWhile(/[\w-]/);var t=a.current();return e.hasOwnProperty(t)?e[t]:null}function h(a,r){return(r.tokens[0]||c)(a,r)}const m={name:"troff",startState:function(){return{tokens:[]}},token:function(a,r){return h(a,r)}};export{m as t};
function o(t){for(var e={},n=t.split(" "),r=0;r<n.length;++r)e[n[r]]=!0;return e}var i={name:"ttcn",keywords:o("activate address alive all alt altstep and and4b any break case component const continue control deactivate display do else encode enumerated except exception execute extends extension external for from function goto group if import in infinity inout interleave label language length log match message mixed mod modifies module modulepar mtc noblock not not4b nowait of on optional or or4b out override param pattern port procedure record recursive rem repeat return runs select self sender set signature system template testcase to type union value valueof var variant while with xor xor4b"),builtin:o("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue decomp decvalue float2int float2str hex2bit hex2int hex2oct hex2str int2bit int2char int2float int2hex int2oct int2str int2unichar isbound ischosen ispresent isvalue lengthof log2str oct2bit oct2char oct2hex oct2int oct2str regexp replace rnd sizeof str2bit str2float str2hex str2int str2oct substr unichar2int unichar2char enum2int"),types:o("anytype bitstring boolean char charstring default float hexstring integer objid octetstring universal verdicttype timer"),timerOps:o("read running start stop timeout"),portOps:o("call catch check clear getcall getreply halt raise receive reply send trigger"),configOps:o("create connect disconnect done kill killed map unmap"),verdictOps:o("getverdict setverdict"),sutOps:o("action"),functionOps:o("apply derefers refers"),verdictConsts:o("error fail inconc none pass"),booleanConsts:o("true false"),otherConsts:o("null NULL omit"),visibilityModifiers:o("private public friend"),templateMatch:o("complement ifpresent subset superset permutation"),multiLineStrings:!0},f=[];function p(t){if(t)for(var e in t)t.hasOwnProperty(e)&&f.push(e)}p(i.keywords),p(i.builtin),p(i.timerOps),p(i.portOps);var y=i.keywords||{},v=i.builtin||{},x=i.timerOps||{},g=i.portOps||{},k=i.configOps||{},O=i.verdictOps||{},E=i.sutOps||{},w=i.functionOps||{},I=i.verdictConsts||{},z=i.booleanConsts||{},C=i.otherConsts||{},L=i.types||{},S=i.visibilityModifiers||{},M=i.templateMatch||{},T=i.multiLineStrings,W=i.indentStatements!==!1,d=/[+\-*&@=<>!\/]/,a;function D(t,e){var n=t.next();if(n=='"'||n=="'")return e.tokenize=N(n),e.tokenize(t,e);if(/[\[\]{}\(\),;\\:\?\.]/.test(n))return a=n,"punctuation";if(n=="#")return t.skipToEnd(),"atom";if(n=="%")return t.eatWhile(/\b/),"atom";if(/\d/.test(n))return t.eatWhile(/[\w\.]/),"number";if(n=="/"){if(t.eat("*"))return e.tokenize=b,b(t,e);if(t.eat("/"))return t.skipToEnd(),"comment"}if(d.test(n))return n=="@"&&(t.match("try")||t.match("catch")||t.match("lazy"))?"keyword":(t.eatWhile(d),"operator");t.eatWhile(/[\w\$_\xa1-\uffff]/);var r=t.current();return y.propertyIsEnumerable(r)?"keyword":v.propertyIsEnumerable(r)?"builtin":x.propertyIsEnumerable(r)||k.propertyIsEnumerable(r)||O.propertyIsEnumerable(r)||g.propertyIsEnumerable(r)||E.propertyIsEnumerable(r)||w.propertyIsEnumerable(r)?"def":I.propertyIsEnumerable(r)||z.propertyIsEnumerable(r)||C.propertyIsEnumerable(r)?"string":L.propertyIsEnumerable(r)?"typeName.standard":S.propertyIsEnumerable(r)?"modifier":M.propertyIsEnumerable(r)?"atom":"variable"}function N(t){return function(e,n){for(var r=!1,l,m=!1;(l=e.next())!=null;){if(l==t&&!r){var s=e.peek();s&&(s=s.toLowerCase(),(s=="b"||s=="h"||s=="o")&&e.next()),m=!0;break}r=!r&&l=="\\"}return(m||!(r||T))&&(n.tokenize=null),"string"}}function b(t,e){for(var n=!1,r;r=t.next();){if(r=="/"&&n){e.tokenize=null;break}n=r=="*"}return"comment"}function h(t,e,n,r,l){this.indented=t,this.column=e,this.type=n,this.align=r,this.prev=l}function u(t,e,n){var r=t.indented;return t.context&&t.context.type=="statement"&&(r=t.context.indented),t.context=new h(r,e,n,null,t.context)}function c(t){var e=t.context.type;return(e==")"||e=="]"||e=="}")&&(t.indented=t.context.indented),t.context=t.context.prev}const _={name:"ttcn",startState:function(){return{tokenize:null,context:new h(0,0,"top",!1),indented:0,startOfLine:!0}},token:function(t,e){var n=e.context;if(t.sol()&&(n.align??(n.align=!1),e.indented=t.indentation(),e.startOfLine=!0),t.eatSpace())return null;a=null;var r=(e.tokenize||D)(t,e);if(r=="comment")return r;if(n.align??(n.align=!0),(a==";"||a==":"||a==",")&&n.type=="statement")c(e);else if(a=="{")u(e,t.column(),"}");else if(a=="[")u(e,t.column(),"]");else if(a=="(")u(e,t.column(),")");else if(a=="}"){for(;n.type=="statement";)n=c(e);for(n.type=="}"&&(n=c(e));n.type=="statement";)n=c(e)}else a==n.type?c(e):W&&((n.type=="}"||n.type=="top")&&a!=";"||n.type=="statement"&&a=="newstatement")&&u(e,t.column(),"statement");return e.startOfLine=!1,r},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:f}};export{_ as t};
function i(e){for(var t={},T=e.split(" "),E=0;E<T.length;++E)t[T[E]]=!0;return t}var I={name:"ttcn-cfg",keywords:i("Yes No LogFile FileMask ConsoleMask AppendFile TimeStampFormat LogEventTypes SourceInfoFormat LogEntityName LogSourceInfo DiskFullAction LogFileNumber LogFileSize MatchingHints Detailed Compact SubCategories Stack Single None Seconds DateTime Time Stop Error Retry Delete TCPPort KillTimer NumHCs UnixSocketsEnabled LocalAddress"),fileNCtrlMaskOptions:i("TTCN_EXECUTOR TTCN_ERROR TTCN_WARNING TTCN_PORTEVENT TTCN_TIMEROP TTCN_VERDICTOP TTCN_DEFAULTOP TTCN_TESTCASE TTCN_ACTION TTCN_USER TTCN_FUNCTION TTCN_STATISTICS TTCN_PARALLEL TTCN_MATCHING TTCN_DEBUG EXECUTOR ERROR WARNING PORTEVENT TIMEROP VERDICTOP DEFAULTOP TESTCASE ACTION USER FUNCTION STATISTICS PARALLEL MATCHING DEBUG LOG_ALL LOG_NOTHING ACTION_UNQUALIFIED DEBUG_ENCDEC DEBUG_TESTPORT DEBUG_UNQUALIFIED DEFAULTOP_ACTIVATE DEFAULTOP_DEACTIVATE DEFAULTOP_EXIT DEFAULTOP_UNQUALIFIED ERROR_UNQUALIFIED EXECUTOR_COMPONENT EXECUTOR_CONFIGDATA EXECUTOR_EXTCOMMAND EXECUTOR_LOGOPTIONS EXECUTOR_RUNTIME EXECUTOR_UNQUALIFIED FUNCTION_RND FUNCTION_UNQUALIFIED MATCHING_DONE MATCHING_MCSUCCESS MATCHING_MCUNSUCC MATCHING_MMSUCCESS MATCHING_MMUNSUCC MATCHING_PCSUCCESS MATCHING_PCUNSUCC MATCHING_PMSUCCESS MATCHING_PMUNSUCC MATCHING_PROBLEM MATCHING_TIMEOUT MATCHING_UNQUALIFIED PARALLEL_PORTCONN PARALLEL_PORTMAP PARALLEL_PTC PARALLEL_UNQUALIFIED PORTEVENT_DUALRECV PORTEVENT_DUALSEND PORTEVENT_MCRECV PORTEVENT_MCSEND PORTEVENT_MMRECV PORTEVENT_MMSEND PORTEVENT_MQUEUE PORTEVENT_PCIN PORTEVENT_PCOUT PORTEVENT_PMIN PORTEVENT_PMOUT PORTEVENT_PQUEUE PORTEVENT_STATE PORTEVENT_UNQUALIFIED STATISTICS_UNQUALIFIED STATISTICS_VERDICT TESTCASE_FINISH TESTCASE_START TESTCASE_UNQUALIFIED TIMEROP_GUARD TIMEROP_READ TIMEROP_START TIMEROP_STOP TIMEROP_TIMEOUT TIMEROP_UNQUALIFIED USER_UNQUALIFIED VERDICTOP_FINAL VERDICTOP_GETVERDICT VERDICTOP_SETVERDICT VERDICTOP_UNQUALIFIED WARNING_UNQUALIFIED"),externalCommands:i("BeginControlPart EndControlPart BeginTestCase EndTestCase"),multiLineStrings:!0},U=I.keywords,a=I.fileNCtrlMaskOptions,R=I.externalCommands,S=I.multiLineStrings,l=I.indentStatements!==!1,A=/[\|]/,n;function P(e,t){var T=e.next();if(T=='"'||T=="'")return t.tokenize=L(T),t.tokenize(e,t);if(/[:=]/.test(T))return n=T,"punctuation";if(T=="#")return e.skipToEnd(),"comment";if(/\d/.test(T))return e.eatWhile(/[\w\.]/),"number";if(A.test(T))return e.eatWhile(A),"operator";if(T=="[")return e.eatWhile(/[\w_\]]/),"number";e.eatWhile(/[\w\$_]/);var E=e.current();return U.propertyIsEnumerable(E)?"keyword":a.propertyIsEnumerable(E)?"atom":R.propertyIsEnumerable(E)?"deleted":"variable"}function L(e){return function(t,T){for(var E=!1,N,_=!1;(N=t.next())!=null;){if(N==e&&!E){var C=t.peek();C&&(C=C.toLowerCase(),(C=="b"||C=="h"||C=="o")&&t.next()),_=!0;break}E=!E&&N=="\\"}return(_||!(E||S))&&(T.tokenize=null),"string"}}function O(e,t,T,E,N){this.indented=e,this.column=t,this.type=T,this.align=E,this.prev=N}function o(e,t,T){var E=e.indented;return e.context&&e.context.type=="statement"&&(E=e.context.indented),e.context=new O(E,t,T,null,e.context)}function r(e){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const s={name:"ttcn",startState:function(){return{tokenize:null,context:new O(0,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var T=t.context;if(e.sol()&&(T.align??(T.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;n=null;var E=(t.tokenize||P)(e,t);if(E=="comment")return E;if(T.align??(T.align=!0),(n==";"||n==":"||n==",")&&T.type=="statement")r(t);else if(n=="{")o(t,e.column(),"}");else if(n=="[")o(t,e.column(),"]");else if(n=="(")o(t,e.column(),")");else if(n=="}"){for(;T.type=="statement";)T=r(t);for(T.type=="}"&&(T=r(t));T.type=="statement";)T=r(t)}else n==T.type?r(t):l&&((T.type=="}"||T.type=="top")&&n!=";"||T.type=="statement"&&n=="newstatement")&&o(t,e.column(),"statement");return t.startOfLine=!1,E},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"#"}}};export{s as t};
import{t}from"./ttcn-cfg-BlUyan1P.js";export{t as ttcnCfg};
import{t}from"./ttcn-BZC1oJG1.js";export{t as ttcn};
var i;function u(e){return RegExp("^(?:"+e.join("|")+")$","i")}u([]);var f=u(["@prefix","@base","a"]),x=/[*+\-<>=&|]/;function p(e,t){var n=e.next();if(i=null,n=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(n=='"'||n=="'")return t.tokenize=s(n),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(n))return i=n,null;if(n=="#")return e.skipToEnd(),"comment";if(x.test(n))return e.eatWhile(x),null;if(n==":")return"operator";if(e.eatWhile(/[_\w\d]/),e.peek()==":")return"variableName.special";var r=e.current();return f.test(r)?"meta":n>="A"&&n<="Z"?"comment":"keyword";var r}function s(e){return function(t,n){for(var r=!1,o;(o=t.next())!=null;){if(o==e&&!r){n.tokenize=p;break}r=!r&&o=="\\"}return"string"}}function c(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function a(e){e.indent=e.context.indent,e.context=e.context.prev}const m={name:"turtle",startState:function(){return{tokenize:p,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&t.context.align==null&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if(n!="comment"&&t.context&&t.context.align==null&&t.context.type!="pattern"&&(t.context.align=!0),i=="(")c(t,")",e.column());else if(i=="[")c(t,"]",e.column());else if(i=="{")c(t,"}",e.column());else if(/[\]\}\)]/.test(i)){for(;t.context&&t.context.type=="pattern";)a(t);t.context&&i==t.context.type&&a(t)}else i=="."&&t.context&&t.context.type=="pattern"?a(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?c(t,"pattern",e.column()):t.context.type=="pattern"&&!t.context.align&&(t.context.align=!0,t.context.col=e.column()));return n},indent:function(e,t,n){var r=t&&t.charAt(0),o=e.context;if(/[\]\}]/.test(r))for(;o&&o.type=="pattern";)o=o.prev;var l=o&&r==o.type;return o?o.type=="pattern"?o.col:o.align?o.col+(l?0:1):o.indent+(l?0:n.unit):0},languageData:{commentTokens:{line:"#"}}};export{m as t};
import{t}from"./turtle-BGa4pyfx.js";export{t as turtle};
import{t as e}from"./createLucideIcon-CnW3RofX.js";var a=e("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const t={Insert:"insert",Remove:"remove",Rename:"rename"};export{a as n,t};
import{Gn as o,Un as r}from"./cells-BpZ7g6ok.js";import{t}from"./createLucideIcon-CnW3RofX.js";import{i as c,n as i,r as p,t as d}from"./file-video-camera-DW3v07j2.js";import{t as m}from"./file-Cs1JbsV6.js";var s=t("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),f=t("folder-archive",[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]]),h=t("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);function u(a){let n=a.split(".").pop();if(n===void 0)return"unknown";switch(n.toLowerCase()){case"py":return"python";case"txt":case"md":case"qmd":return"text";case"png":case"jpg":case"jpeg":case"gif":return"image";case"csv":return"data";case"json":return"json";case"js":case"ts":case"tsx":case"html":case"css":case"toml":case"yaml":case"yml":case"wasm":return"code";case"mp3":case"m4a":case"m4v":case"ogg":case"wav":return"audio";case"mp4":case"webm":case"mkv":return"video";case"pdf":return"pdf";case"zip":case"tar":case"gz":return"zip";default:return"unknown"}}const $={directory:h,python:s,json:c,code:s,text:r,image:i,audio:p,video:d,pdf:s,zip:f,data:o,unknown:m};var e=" ";const v={directory:a=>`os.listdir("${a}")`,python:a=>`with open("${a}", "r") as _f:
${e}...
`,json:a=>`with open("${a}", "r") as _f:
${e}_data = json.load(_f)
`,code:a=>`with open("${a}", "r") as _f:
${e}...
`,text:a=>`with open("${a}", "r") as _f:
${e}...
`,image:a=>`mo.image("${a}")`,audio:a=>`mo.audio("${a}")`,video:a=>`mo.video("${a}")`,pdf:a=>`with open("${a}", "rb") as _f:
${e}...
`,zip:a=>`with open("${a}", "rb") as _f:
${e}...
`,data:a=>`with open("${a}", "r") as _f:
${e}...
`,unknown:a=>`with open("${a}", "r") as _f:
${e}...
`};export{v as n,u as r,$ as t};
const s=["vertical","grid","slides"],e=["slides"];export{e as n,s as t};
import{s as A}from"./chunk-LvLJmgfZ.js";import{t as O}from"./react-BGmjiNul.js";import{t as _}from"./compiler-runtime-DeeZ7FnK.js";var l=_(),c=A(O(),1),u=1,I=1e4,T=0;function E(){return T=(T+1)%Number.MAX_VALUE,T.toString()}var S=new Map,f=t=>{if(S.has(t))return;let a=setTimeout(()=>{S.delete(t),r({type:"REMOVE_TOAST",toastId:t})},I);S.set(t,a)};const D=(t,a)=>{switch(a.type){case"ADD_TOAST":return{...t,toasts:[a.toast,...t.toasts].slice(0,u)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(s=>s.id===a.toast.id?{...s,...a.toast}:s)};case"DISMISS_TOAST":{let{toastId:s}=a;return s?f(s):t.toasts.forEach(o=>{f(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return a.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==a.toastId)};case"UPSERT_TOAST":return t.toasts.findIndex(s=>s.id===a.toast.id)>-1?{...t,toasts:t.toasts.map(s=>s.id===a.toast.id?{...s,...a.toast}:s)}:{...t,toasts:[a.toast,...t.toasts].slice(0,u)}}};var p=new Set,d={toasts:[]};function r(t){d=D(d,t),p.forEach(a=>{a(d)})}function h({id:t,...a}){let s=t||E(),o=i=>r({type:"UPDATE_TOAST",toast:{...i,id:s}}),e=()=>r({type:"DISMISS_TOAST",toastId:s}),n=i=>r({type:"UPSERT_TOAST",toast:{...i,id:s,open:!0,onOpenChange:m=>{m||e()}}});return r({type:"ADD_TOAST",toast:{...a,id:s,open:!0,onOpenChange:i=>{i||e()}}}),{id:s,dismiss:e,update:o,upsert:n}}function y(){let t=(0,l.c)(5),[a,s]=c.useState(d),o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>(p.add(s),()=>{p.delete(s)}),t[0]=o):o=t[0];let e;t[1]===a?e=t[2]:(e=[a],t[1]=a,t[2]=e),c.useEffect(o,e);let n;return t[3]===a?n=t[4]:(n={...a,dismiss:M},t[3]=a,t[4]=n),n}function M(t){return r({type:"DISMISS_TOAST",toastId:t})}export{y as n,h as t};
import{u as l}from"./useEvent-DO6uJBas.js";import{w as s}from"./cells-BpZ7g6ok.js";import{t as i}from"./compiler-runtime-DeeZ7FnK.js";import{o as n}from"./utils-DXvhzCGS.js";import{n as f}from"./html-to-image-DjukyIj4.js";import{o as c}from"./focus-D51fcwZX.js";var p=i();function u(){let o=(0,p.c)(4),a=l(n),r=c(),{createNewCell:t}=s(),e;return o[0]!==a||o[1]!==t||o[2]!==r?(e=m=>{m.includes("alt")&&f({autoInstantiate:a,createNewCell:t,fromCellId:r}),t({code:m,before:!1,cellId:r??"__end__"})},o[0]=a,o[1]=t,o[2]=r,o[3]=e):e=o[3],e}export{u as t};
import{s as S}from"./chunk-LvLJmgfZ.js";import{n as _}from"./useEvent-DO6uJBas.js";import{t as A}from"./react-BGmjiNul.js";import{t as D}from"./compiler-runtime-DeeZ7FnK.js";import{t as F}from"./invariant-CAG_dYON.js";var E=D(),y=S(A(),1),a={error(e,s){return{status:"error",data:s,error:e,isPending:!1,isFetching:!1}},success(e){return{status:"success",data:e,error:void 0,isPending:!1,isFetching:!1}},loading(e){return{status:"loading",data:e,error:void 0,isPending:!1,isFetching:!0}},pending(){return{status:"pending",data:void 0,error:void 0,isPending:!0,isFetching:!0}}};function q(...e){F(e.length>0,"combineAsyncData requires at least one response");let s=()=>{e.forEach(r=>r.refetch())},t=e.find(r=>r.status==="error");if(t!=null&&t.error)return{...a.error(t.error),refetch:s};if(e.every(r=>r.status==="success"))return{...a.success(e.map(r=>r.data)),refetch:s};let n=e.some(r=>r.status==="loading"),v=e.every(r=>r.data!==void 0);return n&&v?{...a.loading(e.map(r=>r.data)),refetch:s}:{...a.pending(),refetch:s}}function w(e,s){let t=(0,E.c)(17),[n,v]=(0,y.useState)(0),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.pending(),t[0]=r):r=t[0];let[o,l]=(0,y.useState)(r),g;t[1]===e?g=t[2]:(g=typeof e=="function"?{fetch:e}:e,t[1]=e,t[2]=g);let c=_(g.fetch),p;t[3]===c?p=t[4]:(p=()=>{let i=new AbortController,f=!1;return l(x),c({previous:()=>{f=!0}}).then(b=>{i.signal.aborted||f||l(a.success(b))}).catch(b=>{i.signal.aborted||l(P=>a.error(b,P.data))}),()=>{i.abort()}},t[3]=c,t[4]=p);let h;t[5]!==s||t[6]!==c||t[7]!==n?(h=[...s,n,c],t[5]=s,t[6]=c,t[7]=n,t[8]=h):h=t[8],(0,y.useEffect)(p,h);let u;t[9]===o?u=t[10]:(u=i=>{let f;typeof i=="function"?(F(o.status==="success"||o.status==="loading","No previous state value."),f=i(o.data)):f=i,l(a.success(f))},t[9]=o,t[10]=u);let d;t[11]===n?d=t[12]:(d=()=>v(n+1),t[11]=n,t[12]=d);let m;return t[13]!==o||t[14]!==u||t[15]!==d?(m={...o,setData:u,refetch:d},t[13]=o,t[14]=u,t[15]=d,t[16]=m):m=t[16],m}function x(e){return e.status==="success"?a.loading(e.data):a.pending()}export{w as n,q as t};
import{s as T}from"./chunk-LvLJmgfZ.js";import{t as N}from"./react-BGmjiNul.js";import{t as _}from"./compiler-runtime-DeeZ7FnK.js";import{d as f,s as b}from"./hotkeys-BHHWjLlp.js";import{r as k}from"./constants-B6Cb__3x.js";import{j as C}from"./config-CIrPQIbt.js";import{t as F}from"./createLucideIcon-CnW3RofX.js";import{P as M}from"./usePress-Bup4EGrp.js";var A=F("case-sensitive",[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]]),R=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,w=new WeakMap,s=[];function P(t,e){let r=M(t==null?void 0:t[0]),a=e instanceof r.Element?{root:e}:e,l=(a==null?void 0:a.root)??document.body,h=(a==null?void 0:a.shouldUseInert)&&R,m=new Set(t),u=new Set,v=n=>h&&n instanceof r.HTMLElement?n.inert:n.getAttribute("aria-hidden")==="true",o=(n,i)=>{h&&n instanceof r.HTMLElement?n.inert=i:i?n.setAttribute("aria-hidden","true"):(n.removeAttribute("aria-hidden"),n instanceof r.HTMLElement&&(n.inert=!1))},p=n=>{for(let d of n.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))m.add(d);let i=d=>{if(u.has(d)||m.has(d)||d.parentElement&&u.has(d.parentElement)&&d.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let L of m)if(d.contains(L))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i}),S=i(n);if(S===NodeFilter.FILTER_ACCEPT&&x(n),S!==NodeFilter.FILTER_REJECT){let d=c.nextNode();for(;d!=null;)x(d),d=c.nextNode()}},x=n=>{let i=w.get(n)??0;v(n)&&i===0||(i===0&&o(n,!0),u.add(n),w.set(n,i+1))};s.length&&s[s.length-1].disconnect(),p(l);let E=new MutationObserver(n=>{for(let i of n)if(i.type==="childList"&&![...m,...u].some(c=>c.contains(i.target)))for(let c of i.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?m.add(c):c instanceof Element&&p(c)});E.observe(l,{childList:!0,subtree:!0});let y={visibleNodes:m,hiddenNodes:u,observe(){E.observe(l,{childList:!0,subtree:!0})},disconnect(){E.disconnect()}};return s.push(y),()=>{E.disconnect();for(let n of u){let i=w.get(n);i!=null&&(i===1?(o(n,!1),w.delete(n)):w.set(n,i-1))}y===s[s.length-1]?(s.pop(),s.length&&s[s.length-1].observe()):s.splice(s.indexOf(y),1)}}function H(t){let e=s[s.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const I=typeof window<"u"&&window.parent!==window;function K(){new URLSearchParams(window.location.search).has(k.vscode)&&(!I||C()||(f.log("[vscode] Registering VS Code bindings"),W(),D(),q(),z()))}function D(){window.addEventListener("copy",()=>{var t;g({command:"copy",text:((t=window.getSelection())==null?void 0:t.toString())??""})}),window.addEventListener("cut",()=>{var e;let t=((e=window.getSelection())==null?void 0:e.toString())??"";b()&&document.execCommand("insertText",!1,""),g({command:"cut",text:t})}),window.addEventListener("message",async t=>{try{let e=t.data,r=b();switch(e.command){case"paste":if(f.log(`[vscode] Received paste mac=${r}`,e),r){let a=document.activeElement;if(!a){f.warn("[vscode] No active element to paste into"),document.execCommand("insertText",!1,e.text);return}let l=new DataTransfer;l.setData("text/plain",e.text),a.dispatchEvent(new ClipboardEvent("paste",{clipboardData:l}))}else f.log("[vscode] Not pasting on mac");return}}catch(e){f.error("Error in paste message handler",e)}})}function W(){document.addEventListener("keydown",t=>{var e,r;if((t.ctrlKey||t.metaKey)&&t.key==="c"){let a=((e=window.getSelection())==null?void 0:e.toString())??"";f.log("[vscode] Sending copy",a),g({command:"copy",text:a});return}if((t.ctrlKey||t.metaKey)&&t.key==="x"){let a=((r=window.getSelection())==null?void 0:r.toString())??"";b()&&document.execCommand("insertText",!1,""),f.log("[vscode] Sending cut",a),g({command:"cut",text:a});return}if((t.ctrlKey||t.metaKey)&&t.key==="v"){f.log("[vscode] Sending paste"),g({command:"paste"});return}})}function q(){document.addEventListener("click",t=>{let e=t.target;if(e.tagName!=="A")return;let r=e.getAttribute("href");r&&(r.startsWith("http://")||r.startsWith("https://"))&&(t.preventDefault(),g({command:"external_link",url:r}))})}function z(){document.addEventListener("contextmenu",t=>{t.preventDefault(),g({command:"context_menu"})})}function g(t){var e;(e=window.parent)==null||e.postMessage(t,"*")}var O=_(),J=T(N(),1);function U(t){let e=(0,O.c)(6),[r,a]=(0,J.useState)(t),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(!0)},e[0]=l):l=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(!1)},e[1]=h):h=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o=>{var p;(p=o==null?void 0:o.stopPropagation)==null||p.call(o),a(V)},e[2]=m):m=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={setTrue:l,setFalse:h,toggle:m},e[3]=u):u=e[3];let v;return e[4]===r?v=e[5]:(v=[r,u],e[4]=r,e[5]=v),v}function V(t){return!t}export{P as a,H as i,K as n,A as o,g as r,U as t};
import{s as oe}from"./chunk-LvLJmgfZ.js";import{d as ae,u as x}from"./useEvent-DO6uJBas.js";import{Cn as ne,En as ie,Gn as de,Jn as se,Kn as re,Wn as ce,_ as he,dt as F,si as me,w as pe}from"./cells-BpZ7g6ok.js";import{t as ke}from"./compiler-runtime-DeeZ7FnK.js";import{a as fe,o as ue,r as ye}from"./utils-DXvhzCGS.js";import{t as be}from"./jsx-runtime-ZmTK25f3.js";import{r as xe}from"./requests-BsVD4CdD.js";import{t as f}from"./createLucideIcon-CnW3RofX.js";import{_ as K,g as G}from"./select-V5IdpNiR.js";import{a as je,m as ve}from"./download-BhCZMKuQ.js";import{t as Ce}from"./chevron-right-DwagBitu.js";import{t as V}from"./circle-plus-CnWl9uZo.js";import{t as ge}from"./code-xml-XLwHyDBr.js";import{t as we}from"./eye-off-BhExYOph.js";import{n as ze,t as Ie}from"./play-BPIh-ZEU.js";import{t as We}from"./link-BsTPF7B0.js";import{a as Me,n as _e}from"./state-BfXVTTtD.js";import{t as Se}from"./trash-2-CyqGun26.js";import{t as Te}from"./use-toast-rmUWldD_.js";import{r as Ae}from"./mode-DX8pdI-l.js";import{a as Ne,c as De,n as Ee}from"./dialog-CxGKN4C_.js";import{n as Re}from"./ImperativeModal-CUbWEBci.js";import{t as Be}from"./copy-Bv2DBpIS.js";import{i as He}from"./useRunCells-24p6hn99.js";import{r as U}from"./html-to-image-DjukyIj4.js";import{t as Oe}from"./label-Be1daUcS.js";import{t as Pe}from"./useDeleteCell-5uYlTcQZ.js";import{n as qe,t as Le}from"./icons-BhEXrzsb.js";import{n as J}from"./name-cell-input-FC1vzor8.js";import{t as Q}from"./multi-icon-DZsiUPo5.js";import{t as Ue}from"./useSplitCell-C8MYZz7z.js";var $=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),X=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Y=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Fe=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),Z=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),ee=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ke(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ge(a){var s;let e=(s=a.match(/scrollTo=([^&]+)/))==null?void 0:s[1];return e?decodeURIComponent(e.split("&")[0]):null}function le(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Ve=ke(),l=oe(be(),1);function Je(a){let e=(0,Ve.c)(44),{cell:s,closePopover:u}=a,{createNewCell:r,updateCellConfig:h,updateCellName:j,moveCell:m,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S}=pe(),T=Ue(),A=He(s==null?void 0:s.cellId),N=!x(he),D=Pe(),{openModal:v}=Re(),E=ae(_e),R=x(ye),y=x(ue),te=x(Ae),b=x(fe),{saveCellConfig:p}=xe();if(!s||te){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0],t}let{cellId:o,config:n,getEditorView:d,name:c,hasOutput:C,hasConsoleOutput:B,status:H}=s,g;e[1]!==o||e[2]!==n.disabled||e[3]!==p||e[4]!==h?(g=async()=>{let t={disabled:!n.disabled};await p({configs:{[o]:t}}),h({cellId:o,config:t})},e[1]=o,e[2]=n.disabled,e[3]=p,e[4]=h,e[5]=g):g=e[5];let O=g,w;e[6]!==o||e[7]!==n.hide_code||e[8]!==d||e[9]!==p||e[10]!==h?(w=async()=>{let t={hide_code:!n.hide_code};await p({configs:{[o]:t}}),h({cellId:o,config:t});let L=d();L&&(t.hide_code?L.contentDOM.blur():L.focus())},e[6]=o,e[7]=n.hide_code,e[8]=d,e[9]=p,e[10]=h,e[11]=w):w=e[11];let P=w,i=o===me,z;e[12]===Symbol.for("react.memo_cache_sentinel")?(z=(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),e[12]=z):z=e[12];let q=H==="running"||H==="queued"||H==="disabled-transitively"||n.disabled,k;e[13]===A?k=e[14]:(k=()=>A(),e[13]=A,e[14]=k);let I;return e[15]!==_||e[16]!==R||e[17]!==b||e[18]!==y||e[19]!==N||e[20]!==o||e[21]!==S||e[22]!==u||e[23]!==n.disabled||e[24]!==n.hide_code||e[25]!==r||e[26]!==D||e[27]!==d||e[28]!==B||e[29]!==C||e[30]!==i||e[31]!==m||e[32]!==c||e[33]!==v||e[34]!==M||e[35]!==W||e[36]!==E||e[37]!==T||e[38]!==q||e[39]!==k||e[40]!==O||e[41]!==P||e[42]!==j?(I=[[{icon:z,label:"Run cell",hotkey:"cell.run",hidden:q,redundant:!0,handle:k},{icon:(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!R,handle:()=>{E(t=>(t==null?void 0:t.cellId)===o?null:{cellId:o})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>T({cellId:o})},{icon:(0,l.jsx)(ge,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=d();t&&ie({[o]:t})}},{icon:n.hide_code?(0,l.jsx)(ce,{size:13,strokeWidth:1.5}):(0,l.jsx)(we,{size:13,strokeWidth:1.5}),label:n.hide_code?"Show code":"Hide code",handle:P,hotkey:"cell.hideCode"},{icon:n.disabled?(0,l.jsx)(Z,{size:13,strokeWidth:1.5}):(0,l.jsx)(ee,{size:13,strokeWidth:1.5}),label:n.disabled?"Enable execution":"Disable execution",handle:O,hidden:i}],[{icon:(0,l.jsx)(Le,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:()=>{let t=d();t&&(U({autoInstantiate:y,createNewCell:r}),F(t,{language:"markdown",keepCodeAsIs:!1}))},hidden:i},{icon:(0,l.jsx)(de,{size:13,strokeWidth:1.5}),label:"Convert to SQL",handle:()=>{let t=d();t&&(U({autoInstantiate:y,createNewCell:r}),F(t,{language:"sql",keepCodeAsIs:!1}))},hidden:i},{icon:(0,l.jsx)(qe,{}),label:"Toggle as Python",handle:()=>{let t=d();t&&(U({autoInstantiate:y,createNewCell:r}),ne(t,"python",{force:!0}))},hidden:i}],[{icon:(0,l.jsxs)(Q,{children:[(0,l.jsx)(V,{size:13,strokeWidth:1.5}),(0,l.jsx)(G,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>r({cellId:o,before:!0}),hidden:i,redundant:!0},{icon:(0,l.jsxs)(Q,{children:[(0,l.jsx)(V,{size:13,strokeWidth:1.5}),(0,l.jsx)(K,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>r({cellId:o,before:!1}),redundant:!0},{icon:(0,l.jsx)(G,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>m({cellId:o,before:!0}),hidden:i},{icon:(0,l.jsx)(K,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>m({cellId:o,before:!1}),hidden:i},{icon:(0,l.jsx)(ve,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>m({cellId:o,direction:"left"}),hidden:b!=="columns"||i},{icon:(0,l.jsx)(Ce,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>m({cellId:o,direction:"right"}),hidden:b!=="columns"||i},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:o,scroll:!1}),hidden:i},{icon:(0,l.jsx)($,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:i},{icon:(0,l.jsx)(re,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:b!=="columns"||i}],[{icon:(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>je(o,"result")},{icon:(0,l.jsx)(se,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||B),handle:()=>{S({cellId:o})}}],[{icon:(0,l.jsx)(Fe,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:Ye,handleHeadless:()=>{v((0,l.jsxs)(Ee,{children:[(0,l.jsx)(Ne,{children:(0,l.jsx)(De,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(Oe,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)(J,{placeholder:"cell name",value:c,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),v(null))},onChange:t=>j({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)(J,{placeholder:"cell name",value:c,onChange:t=>j({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:i},{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!le(c),tooltip:le(c)?void 0:"Only named cells can be linked to",handle:async()=>{await Be(Ke(c)),Te({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!N,variant:"danger",icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),handle:()=>{D({cellId:o})}}]].map($e).filter(Qe),e[15]=_,e[16]=R,e[17]=b,e[18]=y,e[19]=N,e[20]=o,e[21]=S,e[22]=u,e[23]=n.disabled,e[24]=n.hide_code,e[25]=r,e[26]=D,e[27]=d,e[28]=B,e[29]=C,e[30]=i,e[31]=m,e[32]=c,e[33]=v,e[34]=M,e[35]=W,e[36]=E,e[37]=T,e[38]=q,e[39]=k,e[40]=O,e[41]=P,e[42]=j,e[43]=I):I=e[43],I}function Qe(a){return a.length>0}function $e(a){return a.filter(Xe)}function Xe(a){return!a.hidden}function Ye(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Y as a,Z as i,Ge as n,X as o,ee as r,$ as s,Je as t};
import{s as c}from"./chunk-LvLJmgfZ.js";import{t as p}from"./react-BGmjiNul.js";import{t as d}from"./context-JwD-oSsl.js";var s=c(p(),1);function i(r,t){let e=(0,s.useRef)(null);return r&&e.current&&t(r,e.current)&&(r=e.current),e.current=r,r}var u=new Map,f=class{format(r){return this.formatter.format(r)}formatToParts(r){return this.formatter.formatToParts(r)}formatRange(r,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(r,t);if(t<r)throw RangeError("End date must be >= start date");return`${this.formatter.format(r)} \u2013 ${this.formatter.format(t)}`}formatRangeToParts(r,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(r,t);if(t<r)throw RangeError("End date must be >= start date");let e=this.formatter.formatToParts(r),n=this.formatter.formatToParts(t);return[...e.map(o=>({...o,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...n.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let r=this.formatter.resolvedOptions();return g()&&(this.resolvedHourCycle||(this.resolvedHourCycle=T(r.locale,this.options)),r.hourCycle=this.resolvedHourCycle,r.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),r.calendar==="ethiopic-amete-alem"&&(r.calendar="ethioaa"),r}constructor(r,t={}){this.formatter=l(r,t),this.options=t}},y={true:{ja:"h11"},false:{}};function l(r,t={}){if(typeof t.hour12=="boolean"&&v()){t={...t};let o=y[String(t.hour12)][r.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=o??a,delete t.hour12}let e=r+(t?Object.entries(t).sort((o,a)=>o[0]<a[0]?-1:1).join():"");if(u.has(e))return u.get(e);let n=new Intl.DateTimeFormat(r,t);return u.set(e,n),n}var h=null;function v(){return h??(h=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),h}var m=null;function g(){return m??(m=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),m}function T(r,t){if(!t.timeStyle&&!t.hour)return;r=r.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),r+=(r.includes("-u-")?"":"-u")+"-nu-latn";let e=l(r,{...t,timeZone:void 0}),n=parseInt(e.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),o=parseInt(e.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(n===0&&o===23)return"h23";if(n===24&&o===23)return"h24";if(n===0&&o===11)return"h11";if(n===12&&o===11)return"h12";throw Error("Unexpected hour cycle result")}function w(r){r=i(r??{},R);let{locale:t}=d();return(0,s.useMemo)(()=>new f(t,r),[t,r])}function R(r,t){if(r===t)return!0;let e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(let o of e)if(t[o]!==r[o])return!1;return!0}export{f as n,i as r,w as t};
import{s as C}from"./chunk-LvLJmgfZ.js";import{n as b}from"./useEvent-DO6uJBas.js";import{t as E}from"./react-BGmjiNul.js";import{t as V}from"./compiler-runtime-DeeZ7FnK.js";import{t as S}from"./debounce-B3mjKxHe.js";var v=V(),s=C(E(),1);function T(u,e){let t=(0,v.c)(4),[a,l]=(0,s.useState)(u),n,r;return t[0]!==e||t[1]!==u?(n=()=>{let f=setTimeout(()=>l(u),e);return()=>{clearTimeout(f)}},r=[u,e],t[0]=e,t[1]=u,t[2]=n,t[3]=r):(n=t[2],r=t[3]),(0,s.useEffect)(n,r),a}function x(u){let e=(0,v.c)(18),{initialValue:t,onChange:a,delay:l,disabled:n}=u,[r,f]=(0,s.useState)(t),o=T(r,l||200),i=b(a),c,m;e[0]===t?(c=e[1],m=e[2]):(c=()=>{f(t)},m=[t],e[0]=t,e[1]=c,e[2]=m),(0,s.useEffect)(c,m);let d;e[3]!==o||e[4]!==n||e[5]!==t||e[6]!==i?(d=()=>{n||o!==t&&i(o)},e[3]=o,e[4]=n,e[5]=t,e[6]=i,e[7]=d):d=e[7];let p;if(e[8]!==o||e[9]!==n||e[10]!==i?(p=[o,n,i],e[8]=o,e[9]=n,e[10]=i,e[11]=p):p=e[11],(0,s.useEffect)(d,p),n){let h;return e[12]!==r||e[13]!==a?(h={value:r,debouncedValue:r,onChange:a},e[12]=r,e[13]=a,e[14]=h):h=e[14],h}let g;return e[15]!==o||e[16]!==r?(g={value:r,debouncedValue:o,onChange:f},e[15]=o,e[16]=r,e[17]=g):g=e[17],g}function y(u,e){let t=(0,v.c)(3),a=b(u),l;return t[0]!==e||t[1]!==a?(l=S(a,e),t[0]=e,t[1]=a,t[2]=l):l=t[2],l}export{y as n,x as t};
import{s as a}from"./chunk-LvLJmgfZ.js";import{t as c}from"./react-BGmjiNul.js";var o=Object.prototype.hasOwnProperty;function u(t,r,n){for(n of t.keys())if(i(n,r))return n}function i(t,r){var n,e,f;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((e=t.length)===r.length)for(;e--&&i(t[e],r[e]););return e===-1}if(n===Set){if(t.size!==r.size)return!1;for(e of t)if(f=e,f&&typeof f=="object"&&(f=u(r,f),!f)||!r.has(f))return!1;return!0}if(n===Map){if(t.size!==r.size)return!1;for(e of t)if(f=e[0],f&&typeof f=="object"&&(f=u(r,f),!f)||!i(e[1],r.get(f)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),r=new Uint8Array(r);else if(n===DataView){if((e=t.byteLength)===r.byteLength)for(;e--&&t.getInt8(e)===r.getInt8(e););return e===-1}if(ArrayBuffer.isView(t)){if((e=t.byteLength)===r.byteLength)for(;e--&&t[e]===r[e];);return e===-1}if(!n||typeof t=="object"){for(n in e=0,t)if(o.call(t,n)&&++e&&!o.call(r,n)||!(n in r)||!i(t[n],r[n]))return!1;return Object.keys(r).length===e}}return t!==t&&r!==r}var s=a(c(),1);function y(t){let r=s.useRef(t);return i(t,r.current)||(r.current=t),r.current}export{y as t};
import{s as D}from"./chunk-LvLJmgfZ.js";import{i as m,n as u}from"./useEvent-DO6uJBas.js";import{_ as p,w as h,y as I}from"./cells-BpZ7g6ok.js";import{t as C}from"./compiler-runtime-DeeZ7FnK.js";import{t as _}from"./useEventListener-DIUKKfEy.js";import{t as v}from"./jsx-runtime-ZmTK25f3.js";import{t as w}from"./button-YC1gW_kJ.js";import{r as y}from"./requests-BsVD4CdD.js";import{t as b}from"./use-toast-rmUWldD_.js";import{n as x}from"./renderShortcut-DEwfrKeS.js";var j=C(),d=D(v(),1);const f=e=>{let t=(0,j.c)(7),l;t[0]===e?l=t[1]:(l=a=>{var s;(a.ctrlKey||a.metaKey)&&a.key==="z"&&(a.preventDefault(),a.stopPropagation(),(s=e.onClick)==null||s.call(e,a))},t[0]=e,t[1]=l);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={capture:!0},t[2]=r):r=t[2],_(window,"keydown",l,r);let o=e.children??"Undo",i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,d.jsx)(x,{className:"ml-2",shortcut:"cmd-z"}),t[3]=i):i=t[3];let n;return t[4]!==o||t[5]!==e?(n=(0,d.jsxs)(w,{"data-testid":"undo-button",size:"sm",variant:"outline",...e,children:[o," ",i]}),t[4]=o,t[5]=e,t[6]=n):n=t[6],n};var g=C();function z(){let e=(0,g.c)(4),{deleteCell:t,undoDeleteCell:l}=h(),{sendDeleteCell:r}=y(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=i=>{var s;if(m.get(p))return;let{cellId:n}=i,a=(((s=m.get(I).cellData[n])==null?void 0:s.code)??"").trim()==="";if(t({cellId:n}),r({cellId:n}).catch(()=>{l()}),!a){let{dismiss:c}=b({title:"Cell deleted",description:"You can bring it back by clicking undo or through the command palette.",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{l(),k()}})}),k=c}},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}function K(){let e=(0,g.c)(4),{deleteCell:t,undoDeleteCell:l}=h(),{sendDeleteCell:r}=y(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=async i=>{if(m.get(p))return;let{cellIds:n}=i;for(let c of n)await r({cellId:c}).then(()=>{t({cellId:c})});let{dismiss:a}=b({title:"Cells deleted",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{for(let c of n)l();s()}})}),s=a},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}export{K as n,f as r,z as t};
import{s as U}from"./chunk-LvLJmgfZ.js";import{d as Y,l as Z,n as V,p as $,u as ee}from"./useEvent-DO6uJBas.js";import{t as te}from"./react-BGmjiNul.js";import{U as le,gt as re}from"./cells-BpZ7g6ok.js";import{t as B}from"./compiler-runtime-DeeZ7FnK.js";import{t as se}from"./jsx-runtime-ZmTK25f3.js";import{t as ae}from"./cn-BKtXLv3a.js";import{t as ne}from"./createLucideIcon-CnW3RofX.js";import{t as oe}from"./useCellActionButton-DNI-LzxR.js";import{a as ie,n as ce,o as me,t as de}from"./tooltip-CEc2ajau.js";import{d as he}from"./alert-dialog-DwQffb13.js";import{i as G,r as pe,t as J}from"./popover-Gz-GJzym.js";import{a as fe,c as ue,i as xe,o as je,r as be,t as ye,u as ve}from"./command-DhzFN2CJ.js";import{n as ge}from"./focus-D51fcwZX.js";import{a as Ne,i as we}from"./renderShortcut-DEwfrKeS.js";var ke=ne("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),K=B(),p=U(te(),1),t=U(se(),1);const L=p.memo(p.forwardRef((n,l)=>{let e=(0,K.c)(46),{children:r,showTooltip:m,...d}=n,f=m===void 0?!0:m,[h,o]=(0,p.useState)(!1),k;e[0]===o?k=e[1]:(k=()=>o(!1),e[0]=o,e[1]=k);let X=k,A=(0,p.useRef)(null),u=oe({cell:d,closePopover:X}),F=he(),C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{le(()=>{A.current&&A.current.scrollIntoView({behavior:"auto",block:"nearest"})})},e[2]=C):C=e[2];let H=V(C),S;e[3]!==H||e[4]!==o?(S=s=>{o(c=>{let w=typeof s=="function"?s(c):s;return w&&H(),w})},e[3]=H,e[4]=o,e[5]=S):S=e[5];let i=V(S),_;e[6]===i?_=e[7]:(_=()=>({toggle:()=>i(Ce)}),e[6]=i,e[7]=_),(0,p.useImperativeHandle)(l,_);let M=pe,O=ye,R=fe,q=re(d.cellId),x;e[8]!==R||e[9]!==q?(x=(0,t.jsx)(R,{placeholder:"Search actions...",className:"h-6 m-1",...q}),e[8]=R,e[9]=q,e[10]=x):x=e[10];let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=(0,t.jsx)(be,{children:"No results"}),e[11]=I):I=e[11];let j;if(e[12]!==u||e[13]!==o){let s;e[15]!==u.length||e[16]!==o?(s=(c,w)=>(0,t.jsxs)(p.Fragment,{children:[(0,t.jsx)(xe,{children:c.map(a=>{if(a.redundant)return null;let E=(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[a.icon&&(0,t.jsx)("div",{className:"mr-2 w-5 text-muted-foreground",children:a.icon}),(0,t.jsx)("div",{className:"flex-1",children:a.label}),(0,t.jsxs)("div",{className:"shrink-0 text-sm",children:[a.hotkey&&we(a.hotkey),a.rightElement]})]});return a.tooltip&&(E=(0,t.jsx)(de,{content:a.tooltip,delayDuration:100,children:E})),(0,t.jsx)(je,{className:ae(a.disabled&&"opacity-50!"),onSelect:()=>{a.disableClick||a.disabled||(a.handle(),o(!1))},variant:a.variant,children:E},a.label)})},w),w<u.length-1&&(0,t.jsx)(ue,{})]},w),e[15]=u.length,e[16]=o,e[17]=s):s=e[17],j=u.map(s),e[12]=u,e[13]=o,e[14]=j}else j=e[14];let b;e[18]===j?b=e[19]:(b=(0,t.jsxs)(ve,{children:[I,j]}),e[18]=j,e[19]=b);let y;e[20]!==O||e[21]!==x||e[22]!==b?(y=(0,t.jsxs)(O,{children:[x,b]}),e[20]=O,e[21]=x,e[22]=b,e[23]=y):y=e[23];let T;e[24]!==M||e[25]!==F||e[26]!==y?(T=(0,t.jsx)(M,{className:"w-[300px] p-0 pt-1 overflow-auto",scrollable:!0,...F,children:y}),e[24]=M,e[25]=F,e[26]=y,e[27]=T):T=e[27];let v=T;if(!f){let s;e[28]===r?s=e[29]:(s=(0,t.jsx)(G,{asChild:!0,children:r}),e[28]=r,e[29]=s);let c;return e[30]!==v||e[31]!==i||e[32]!==h||e[33]!==s?(c=(0,t.jsxs)(J,{open:h,onOpenChange:i,children:[s,v]}),e[30]=v,e[31]=i,e[32]=h,e[33]=s,e[34]=c):c=e[34],c}let D;e[35]===Symbol.for("react.memo_cache_sentinel")?(D=(0,t.jsx)(ce,{tabIndex:-1,children:Ne("cell.cellActions")}),e[35]=D):D=e[35];let z=!h&&D,g;e[36]===r?g=e[37]:(g=(0,t.jsx)(me,{ref:A,children:(0,t.jsx)(G,{className:"flex",children:r})}),e[36]=r,e[37]=g);let N;e[38]!==z||e[39]!==g?(N=(0,t.jsxs)(ie,{delayDuration:200,disableHoverableContent:!0,children:[z,g]}),e[38]=z,e[39]=g,e[40]=N):N=e[40];let P;return e[41]!==v||e[42]!==i||e[43]!==h||e[44]!==N?(P=(0,t.jsxs)(J,{open:h,onOpenChange:i,children:[N,v]}),e[41]=v,e[42]=i,e[43]=h,e[44]=N,e[45]=P):P=e[45],P})),Q=p.memo(n=>{let l=(0,K.c)(5),{children:e,cellId:r}=n,m;l[0]===r?m=l[1]:(m=ge(r),l[0]=r,l[1]=m);let d=ee(m);if(!d)return null;let f;return l[2]!==e||l[3]!==d?(f=(0,t.jsx)(L,{showTooltip:!1,...d,children:e}),l[2]=e,l[3]=d,l[4]=f):f=l[4],f});Q.displayName="ConnectionCellActionsDropdown";function Ce(n){return!n}var Se=B();const W=$("minimap");function _e(){let n=(0,Se.c)(3),[l,e]=Z(W),r;return n[0]!==l||n[1]!==e?(r={dependencyPanelTab:l,setDependencyPanelTab:e},n[0]=l,n[1]=e,n[2]=r):r=n[2],r}function Ie(){return Y(W)}export{ke as a,Q as i,Ie as n,L as r,_e as t};
import{s as at}from"./chunk-LvLJmgfZ.js";import{t as ut}from"./react-BGmjiNul.js";import{t as ot}from"./compiler-runtime-DeeZ7FnK.js";import{t as it}from"./_baseIsEqual-B9N9Mw_N.js";function $(t){return"init"in t}function q(t){return!!t.write}function B(t){return"v"in t||"e"in t}function R(t){if("e"in t)throw t.e;return t.v}var T=new WeakMap;function F(t){var e;return W(t)&&!!((e=T.get(t))!=null&&e[0])}function ft(t){let e=T.get(t);e!=null&&e[0]&&(e[0]=!1,e[1].forEach(n=>n()))}function O(t,e){let n=T.get(t);if(!n){n=[!0,new Set],T.set(t,n);let r=()=>{n[0]=!1};t.then(r,r)}n[1].add(e)}function W(t){return typeof(t==null?void 0:t.then)=="function"}function G(t,e,n){if(!n.p.has(t)){n.p.add(t);let r=()=>n.p.delete(t);e.then(r,r)}}function H(t,e,n){var l;let r=new Set;for(let a of((l=n.get(t))==null?void 0:l.t)||[])r.add(a);for(let a of e.p)r.add(a);return r}var st=(t,e,...n)=>e.read(...n),ct=(t,e,...n)=>e.write(...n),dt=(t,e)=>{if(e.INTERNAL_onInit)return e.INTERNAL_onInit(t);if(e.unstable_onInit)return console.warn("[DEPRECATED] atom.unstable_onInit is renamed to atom.INTERNAL_onInit."),e.unstable_onInit(t)},ht=(t,e,n)=>{var r;return(r=e.onMount)==null?void 0:r.call(e,n)},gt=(t,e)=>{var n;let r=w(t),l=r[0],a=r[6],u=r[9],f=l.get(e);return f||(f={d:new Map,p:new Set,n:0},l.set(e,f),(n=a.i)==null||n.call(a,e),u==null||u(t,e)),f},pt=t=>{let e=w(t),n=e[1],r=e[3],l=e[4],a=e[5],u=e[6],f=e[13],c=[],i=o=>{try{o()}catch(s){c.push(s)}};do{u.f&&i(u.f);let o=new Set,s=o.add.bind(o);r.forEach(d=>{var g;return(g=n.get(d))==null?void 0:g.l.forEach(s)}),r.clear(),a.forEach(s),a.clear(),l.forEach(s),l.clear(),o.forEach(i),r.size&&f(t)}while(r.size||a.size||l.size);if(c.length)throw AggregateError(c)},vt=t=>{let e=w(t),n=e[1],r=e[2],l=e[3],a=e[11],u=e[14],f=e[17],c=[],i=new WeakSet,o=new WeakSet,s=Array.from(l);for(;s.length;){let d=s[s.length-1],g=a(t,d);if(o.has(d)){s.pop();continue}if(i.has(d)){r.get(d)===g.n&&c.push([d,g]),o.add(d),s.pop();continue}i.add(d);for(let h of H(d,g,n))i.has(h)||s.push(h)}for(let d=c.length-1;d>=0;--d){let[g,h]=c[d],b=!1;for(let m of h.d.keys())if(m!==g&&l.has(m)){b=!0;break}b&&(u(t,g),f(t,g)),r.delete(g)}},yt=(t,e)=>{var n,r;let l=w(t),a=l[1],u=l[2],f=l[3],c=l[6],i=l[7],o=l[11],s=l[12],d=l[13],g=l[14],h=l[16],b=l[17],m=l[20],p=o(t,e);if(B(p)){if(a.has(e)&&u.get(e)!==p.n)return p;let y=!1;for(let[M,_]of p.d)if(g(t,M).n!==_){y=!0;break}if(!y)return p}p.d.clear();let v=!0;function S(){a.has(e)&&(b(t,e),d(t),s(t))}function N(y){var M;if(y===e){let U=o(t,y);if(!B(U))if($(y))m(t,y,y.init);else throw Error("no atom init");return R(U)}let _=g(t,y);try{return R(_)}finally{p.d.set(y,_.n),F(p.v)&&G(e,p.v,_),a.has(e)&&((M=a.get(y))==null||M.t.add(e)),v||S()}}let k,I,z={get signal(){return k||(k=new AbortController),k.signal},get setSelf(){return!I&&q(e)&&(I=(...y)=>{if(!v)try{return h(t,e,...y)}finally{d(t),s(t)}}),I}},V=p.n;try{let y=i(t,e,N,z);return m(t,e,y),W(y)&&(O(y,()=>k==null?void 0:k.abort()),y.then(S,S)),(n=c.r)==null||n.call(c,e),p}catch(y){return delete p.v,p.e=y,++p.n,p}finally{v=!1,V!==p.n&&u.get(e)===V&&(u.set(e,p.n),f.add(e),(r=c.c)==null||r.call(c,e))}},wt=(t,e)=>{let n=w(t),r=n[1],l=n[2],a=n[11],u=[e];for(;u.length;){let f=u.pop(),c=a(t,f);for(let i of H(f,c,r)){let o=a(t,i);l.set(i,o.n),u.push(i)}}},mt=(t,e,...n)=>{let r=w(t),l=r[3],a=r[6],u=r[8],f=r[11],c=r[12],i=r[13],o=r[14],s=r[15],d=r[16],g=r[17],h=r[20],b=!0,m=v=>R(o(t,v)),p=(v,...S)=>{var N;let k=f(t,v);try{if(v===e){if(!$(v))throw Error("atom not writable");let I=k.n,z=S[0];h(t,v,z),g(t,v),I!==k.n&&(l.add(v),s(t,v),(N=a.c)==null||N.call(a,v));return}else return d(t,v,...S)}finally{b||(i(t),c(t))}};try{return u(t,e,m,p,...n)}finally{b=!1}},Et=(t,e)=>{var g;var n;let r=w(t),l=r[1],a=r[3],u=r[6],f=r[11],c=r[15],i=r[18],o=r[19],s=f(t,e),d=l.get(e);if(d&&!F(s.v)){for(let[h,b]of s.d)if(!d.d.has(h)){let m=f(t,h);i(t,h).t.add(e),d.d.add(h),b!==m.n&&(a.add(h),c(t,h),(n=u.c)==null||n.call(u,h))}for(let h of d.d)s.d.has(h)||(d.d.delete(h),(g=o(t,h))==null||g.t.delete(e))}},bt=(t,e)=>{var n;let r=w(t),l=r[1],a=r[4],u=r[6],f=r[10],c=r[11],i=r[12],o=r[13],s=r[14],d=r[16],g=r[18],h=c(t,e),b=l.get(e);if(!b){s(t,e);for(let m of h.d.keys())g(t,m).t.add(e);b={l:new Set,d:new Set(h.d.keys()),t:new Set},l.set(e,b),q(e)&&a.add(()=>{let m=!0,p=(...v)=>{try{return d(t,e,...v)}finally{m||(o(t),i(t))}};try{let v=f(t,e,p);v&&(b.u=()=>{m=!0;try{v()}finally{m=!1}})}finally{m=!1}}),(n=u.m)==null||n.call(u,e)}return b},kt=(t,e)=>{var d,g;var n;let r=w(t),l=r[1],a=r[5],u=r[6],f=r[11],c=r[19],i=f(t,e),o=l.get(e);if(!o||o.l.size)return o;let s=!1;for(let h of o.t)if((d=l.get(h))!=null&&d.d.has(e)){s=!0;break}if(!s){o.u&&a.add(o.u),o=void 0,l.delete(e);for(let h of i.d.keys())(g=c(t,h))==null||g.t.delete(e);(n=u.u)==null||n.call(u,e);return}return o},St=(t,e,n)=>{let r=w(t)[11],l=r(t,e),a="v"in l,u=l.v;if(W(n))for(let f of l.d.keys())G(e,n,r(t,f));l.v=n,delete l.e,(!a||!Object.is(u,l.v))&&(++l.n,W(u)&&ft(u))},It=(t,e)=>{let n=w(t)[14];return R(n(t,e))},_t=(t,e,...n)=>{let r=w(t),l=r[12],a=r[13],u=r[16];try{return u(t,e,...n)}finally{a(t),l(t)}},At=(t,e,n)=>{let r=w(t),l=r[12],a=r[18],u=r[19],f=a(t,e).l;return f.add(n),l(t),()=>{f.delete(n),u(t,e),l(t)}},J=new WeakMap,w=t=>J.get(t);function Nt(t){let e=w(t),n=e[24];return n?n(e):e}function K(...t){let e={get(r){let l=w(e)[21];return l(e,r)},set(r,...l){let a=w(e)[22];return a(e,r,...l)},sub(r,l){let a=w(e)[23];return a(e,r,l)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},st,ct,dt,ht,gt,pt,vt,yt,wt,mt,Et,bt,kt,St,It,_t,At,void 0].map((r,l)=>t[l]||r);return J.set(e,Object.freeze(n)),e}var Mt=0;function Q(t,e){let n=`atom${++Mt}`,r={toString(){return n}};return typeof t=="function"?r.read=t:(r.init=t,r.read=Rt,r.write=Tt),e&&(r.write=e),r}function Rt(t){return t(this)}function Tt(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}var X;function C(){return X?X():K()}var Y;function Wt(){return Y||(Y=C()),Y}var E=at(ut(),1),D=(0,E.createContext)(void 0);function j(t){let e=(0,E.useContext)(D);return(t==null?void 0:t.store)||e||Wt()}function Ct({children:t,store:e}){let n=(0,E.useRef)(null);return e?(0,E.createElement)(D.Provider,{value:e},t):(n.current===null&&(n.current=C()),(0,E.createElement)(D.Provider,{value:n.current},t))}var L=t=>typeof(t==null?void 0:t.then)=="function",P=t=>{t.status||(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}))},jt=E.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(P(t),t)}),x=new WeakMap,Z=(t,e)=>{let n=x.get(t);return n||(n=new Promise((r,l)=>{let a=t,u=i=>o=>{a===i&&r(o)},f=i=>o=>{a===i&&l(o)},c=()=>{try{let i=e();L(i)?(x.set(i,n),a=i,i.then(u(i),f(i)),O(i,c)):r(i)}catch(i){l(i)}};t.then(u(t),f(t)),O(t,c)}),x.set(t,n)),n};function tt(t,e){let{delay:n,unstable_promiseStatus:r=!E.use}=e||{},l=j(e),[[a,u,f],c]=(0,E.useReducer)(o=>{let s=l.get(t);return Object.is(o[0],s)&&o[1]===l&&o[2]===t?o:[s,l,t]},void 0,()=>[l.get(t),l,t]),i=a;if((u!==l||f!==t)&&(c(),i=l.get(t)),(0,E.useEffect)(()=>{let o=l.sub(t,()=>{if(r)try{let s=l.get(t);L(s)&&P(Z(s,()=>l.get(t)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),o},[l,t,n,r]),(0,E.useDebugValue)(i),L(i)){let o=Z(i,()=>l.get(t));return r&&P(o),jt(o)}return i}function et(t,e){let n=j(e);return(0,E.useCallback)((...r)=>n.set(t,...r),[n,t])}function zt(t,e){return[tt(t,e),et(t,e)]}function Ot(t,e){return it(t,e)}var rt=Ot,Dt=ot();const A=C();async function Lt(t,e){return e(A.get(t))?A.get(t):new Promise(n=>{let r=A.sub(t,()=>{let l=A.get(t);e(l)&&(r(),n(l))})})}function Pt(t,e){let n=(0,Dt.c)(5),r=j(),l,a;n[0]!==t||n[1]!==e||n[2]!==r?(l=()=>{let u=r.get(t);r.sub(t,()=>{let f=r.get(t);e(f,u),u=f})},a=[t,e,r],n[0]=t,n[1]=e,n[2]=r,n[3]=l,n[4]=a):(l=n[3],a=n[4]),(0,E.useEffect)(l,a)}var nt=Symbol("sentinel");function xt(t,e=rt){let n=nt;return Q(r=>{let l=r(t);return(n===nt||!e(n,l))&&(n=l),n})}var Vt=typeof window<"u"?E.useInsertionEffect||E.useLayoutEffect:()=>{};function lt(t){let e=E.useRef(Ut);Vt(()=>{e.current=t},[t]);let n=E.useRef(null);return n.current||(n.current=function(){return e.current.apply(this,arguments)}),n.current}function Ut(){throw Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}var $t=lt;export{Pt as a,Ct as c,et as d,j as f,Nt as g,K as h,A as i,zt as l,C as m,$t as n,Lt as o,Q as p,xt as r,rt as s,lt as t,tt as u};
import{s as E}from"./chunk-LvLJmgfZ.js";import{t as d}from"./react-BGmjiNul.js";import{t as b}from"./compiler-runtime-DeeZ7FnK.js";var a=E(d(),1);function m(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function v(...t){return n=>{let e=!1,u=t.map(r=>{let f=m(r,n);return!e&&typeof f=="function"&&(e=!0),f});if(e)return()=>{for(let r=0;r<u.length;r++){let f=u[r];typeof f=="function"?f():m(t[r],null)}}}}function L(...t){return a.useCallback(v(...t),t)}var g=b();function h(t){return typeof t=="object"&&!!t&&"current"in t}function j(t,n,e,u){let r=(0,g.c)(8),f=(0,a.useRef)(e),o,c;r[0]===e?(o=r[1],c=r[2]):(o=()=>{f.current=e},c=[e],r[0]=e,r[1]=o,r[2]=c),(0,a.useEffect)(o,c);let l,i;r[3]!==u||r[4]!==t||r[5]!==n?(l=()=>{let s=h(t)?t.current:t;if(!s)return;let p=y=>f.current(y);return s.addEventListener(n,p,u),()=>{s.removeEventListener(n,p,u)}},i=[n,t,u],r[3]=u,r[4]=t,r[5]=n,r[6]=l,r[7]=i):(l=r[6],i=r[7]),(0,a.useEffect)(l,i)}export{v as n,L as r,j as t};
import"./chunk-LvLJmgfZ.js";import{t as o}from"./react-BGmjiNul.js";import{t as m}from"./compiler-runtime-DeeZ7FnK.js";import{t as e}from"./capabilities-MM7JYRxj.js";var a=m();o();function i(){let t=(0,a.c)(1),r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(),t[0]=r):r=t[0],r}export{i as t};
import{s as l}from"./chunk-LvLJmgfZ.js";import{p as x}from"./useEvent-DO6uJBas.js";import{t as k}from"./react-BGmjiNul.js";import{d as v}from"./hotkeys-BHHWjLlp.js";import{t as f}from"./jsx-runtime-ZmTK25f3.js";import{r as j}from"./requests-BsVD4CdD.js";import{t as n}from"./use-toast-rmUWldD_.js";import{t as o}from"./kbd-C3JY7O_u.js";const y=x(null),m="packages-install-input",p=()=>{requestAnimationFrame(()=>{let e=document.getElementById(m);e&&e.focus()})},P=e=>{e.openApplication("packages"),p()};var a=l(f(),1);const g=(e,t)=>{n(t?{title:"Failed to add package",description:t,variant:"danger"}:{title:"Package added",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," and its dependencies has been added to your environment."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})},N=(e,t)=>{n(t?{title:"Failed to upgrade package",description:t,variant:"danger"}:{title:"Package upgraded",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," has been upgraded."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})},q=(e,t)=>{n(t?{title:"Failed to remove package",description:t,variant:"danger"}:{title:"Package removed",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:["The package ",(0,a.jsx)(o,{className:"inline",children:e})," has been removed from your environment."]}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:"Some Python packages may require a kernel restart to see changes."})]})})};var F=l(k(),1);function S(){let[e,t]=(0,F.useState)(!1),{addPackage:h}=j();return{loading:e,handleInstallPackages:async(d,r)=>{t(!0);try{for(let[s,i]of d.entries()){let c=await h({package:i});c.success?g(i):g(i,c.error),s<d.length-1&&await new Promise(u=>setTimeout(u,1e3))}r==null||r()}catch(s){v.error(s)}finally{t(!1)}}}}export{p as a,m as i,q as n,P as o,N as r,y as s,S as t};
import{s as o}from"./chunk-LvLJmgfZ.js";import{t as m}from"./react-BGmjiNul.js";import{t as v}from"./useEventListener-DIUKKfEy.js";var e=o(m(),1);function b(a,f){let{delayMs:r,whenVisible:n,disabled:l=!1,skipIfRunning:c=!1}=f,t=(0,e.useRef)(void 0),s=(0,e.useRef)(!1);(0,e.useEffect)(()=>{t.current=a},[a]);let u=(0,e.useCallback)(async()=>{var i;if(!(s.current&&c)){s.current=!0;try{await((i=t.current)==null?void 0:i.call(t))}finally{s.current=!1}}},[c]);return(0,e.useEffect)(()=>{if(r===null||l)return;let i=setInterval(()=>{n&&document.visibilityState!=="visible"||u()},r);return()=>clearInterval(i)},[r,n,l,u]),v(document,"visibilitychange",()=>{document.visibilityState==="visible"&&n&&!l&&u()}),null}export{b as t};
import{s as z}from"./chunk-LvLJmgfZ.js";import{t as I}from"./react-BGmjiNul.js";import{t as r}from"./toString-DlRqgfqz.js";import{r as O}from"./assertNever-CBU83Y6o.js";import{t as U}from"./_arrayReduce-TT0iOGKY.js";import{t}from"./createLucideIcon-CnW3RofX.js";function Z(u){return function(e){return u==null?void 0:u[e]}}var j=Z({\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"}),R=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,L=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function M(u){return u=r(u),u&&u.replace(R,j).replace(L,"")}var T=M,w=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function D(u){return u.match(w)||[]}var N=D,S=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function C(u){return S.test(u)}var G=C,n="\\ud800-\\udfff",H="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",x="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",Y="\\xac\\xb1\\xd7\\xf7",J="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",V="\\u2000-\\u206f",_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",d="A-Z\\xc0-\\xd6\\xd8-\\xde",$="\\ufe0e\\ufe0f",i=Y+J+V+_,c="['\u2019]",y="["+i+"]",K="["+H+"]",s="\\d+",W="["+x+"]",h="["+o+"]",p="[^"+n+i+s+x+o+d+"]",q="(?:"+K+"|\\ud83c[\\udffb-\\udfff])",B="[^"+n+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",f="["+d+"]",F="\\u200d",m="(?:"+h+"|"+p+")",P="(?:"+f+"|"+p+")",k="(?:"+c+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+c+"(?:D|LL|M|RE|S|T|VE))?",v=q+"?",E="["+$+"]?",Q="(?:"+F+"(?:"+[B,l,g].join("|")+")"+E+v+")*",X="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",u0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",e0=E+v+Q,f0="(?:"+[W,l,g].join("|")+")"+e0,t0=RegExp([f+"?"+h+"+"+k+"(?="+[y,f,"$"].join("|")+")",P+"+"+A+"(?="+[y,f+m,"$"].join("|")+")",f+"?"+m+"+"+k,f+"+"+A,u0,X,s,f0].join("|"),"g");function a0(u){return u.match(t0)||[]}var r0=a0;function n0(u,e,a){return u=r(u),e=a?void 0:e,e===void 0?G(u)?r0(u):N(u):u.match(e)||[]}var x0=n0,o0=RegExp("['\u2019]","g");function d0(u){return function(e){return U(x0(T(e).replace(o0,"")),u,"")}}var i0=d0(function(u,e,a){return u+(a?" ":"")+O(e)}),c0=t("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),y0=t("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),s0=t("toggle-left",[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]),h0=t("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]),b=z(I(),1);function p0(u){(0,b.useEffect)(u,[])}function l0(u){(0,b.useEffect)(()=>u(),[])}export{y0 as a,s0 as i,l0 as n,c0 as o,h0 as r,i0 as s,p0 as t};
var me=Object.defineProperty;var we=(n,e,t)=>e in n?me(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var k=(n,e,t)=>we(n,typeof e!="symbol"?e+"":e,t);var J;import{s as ye}from"./chunk-LvLJmgfZ.js";import{t as $e}from"./react-BGmjiNul.js";import{t as Re}from"./compiler-runtime-DeeZ7FnK.js";function M(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=M();function ne(n){R=n}var z={exec:()=>null};function u(n,e=""){let t=typeof n=="string"?n:n.source,s={replace:(r,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(b.caret,"$1"),t=t.replace(r,c),s},getRegex:()=>new RegExp(t,e)};return s}var b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Se=/^(?:[ \t]*(?:\n|$))+/,Te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ze=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ae=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,O=/(?:[*+-]|\d{1,9}[.)])/,re=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,se=u(re).replace(/bull/g,O).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),_e=u(re).replace(/bull/g,O).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Q=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pe=/^[^\n]+/,N=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ie=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",N).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Le=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,O).getRegex(),I="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",j=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ce=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",j).replace("tag",I).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ie=u(Q).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex(),G={blockquote:u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ie).getRegex(),code:Te,def:Ie,fences:ze,heading:Ae,hr:A,html:Ce,lheading:se,list:Le,newline:Se,paragraph:ie,table:z,text:Pe},le=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex(),Be={...G,lheading:_e,table:le,paragraph:u(Q).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",le).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex()},Ee={...G,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",j).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(Q).replace("hr",A).replace("heading",` *#{1,6} *[^
]`).replace("lheading",se).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ve=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ae=/^( {2,}|\\)\n(?!\s*$)/,Ze=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,L=/[\p{P}\p{S}]/u,H=/[\s\p{P}\p{S}]/u,oe=/[^\s\p{P}\p{S}]/u,De=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,H).getRegex(),ce=/(?!~)[\p{P}\p{S}]/u,Me=/(?!~)[\s\p{P}\p{S}]/u,Oe=/(?:[^\s\p{P}\p{S}]|~)/u,Qe=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,he=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ne=u(he,"u").replace(/punct/g,L).getRegex(),je=u(he,"u").replace(/punct/g,ce).getRegex(),pe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ge=u(pe,"gu").replace(/notPunctSpace/g,oe).replace(/punctSpace/g,H).replace(/punct/g,L).getRegex(),He=u(pe,"gu").replace(/notPunctSpace/g,Oe).replace(/punctSpace/g,Me).replace(/punct/g,ce).getRegex(),Xe=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,oe).replace(/punctSpace/g,H).replace(/punct/g,L).getRegex(),Fe=u(/\\(punct)/,"gu").replace(/punct/g,L).getRegex(),Ue=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Je=u(j).replace("(?:-->|$)","-->").getRegex(),Ke=u("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Je).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),C=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ve=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",C).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ue=u(/^!?\[(label)\]\[(ref)\]/).replace("label",C).replace("ref",N).getRegex(),ge=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",N).getRegex(),X={_backpedal:z,anyPunctuation:Fe,autolink:Ue,blockSkip:Qe,br:ae,code:ve,del:z,emStrongLDelim:Ne,emStrongRDelimAst:Ge,emStrongRDelimUnd:Xe,escape:qe,link:Ve,nolink:ge,punctuation:De,reflink:ue,reflinkSearch:u("reflink|nolink(?!\\()","g").replace("reflink",ue).replace("nolink",ge).getRegex(),tag:Ke,text:Ze,url:z},We={...X,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",C).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",C).getRegex()},F={...X,emStrongRDelimAst:He,emStrongLDelim:je,url:u(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ye={...F,br:u(ae).replace("{2,}","*").getRegex(),text:u(F.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},B={normal:G,gfm:Be,pedantic:Ee},_={normal:X,gfm:F,breaks:Ye,pedantic:We},et={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ke=n=>et[n];function w(n,e){if(e){if(b.escapeTest.test(n))return n.replace(b.escapeReplace,ke)}else if(b.escapeTestNoEncode.test(n))return n.replace(b.escapeReplaceNoEncode,ke);return n}function de(n){try{n=encodeURI(n).replace(b.percentDecode,"%")}catch{return null}return n}function fe(n,e){var r;let t=n.replace(b.findPipe,(l,c,i)=>{let o=!1,a=c;for(;--a>=0&&i[a]==="\\";)o=!o;return o?"|":" |"}).split(b.splitPipe),s=0;if(t[0].trim()||t.shift(),t.length>0&&!((r=t.at(-1))!=null&&r.trim())&&t.pop(),e)if(t.length>e)t.splice(e);else for(;t.length<e;)t.push("");for(;s<t.length;s++)t[s]=t[s].trim().replace(b.slashPipe,"|");return t}function P(n,e,t){let s=n.length;if(s===0)return"";let r=0;for(;r<s;){let l=n.charAt(s-r-1);if(l===e&&!t)r++;else if(l!==e&&t)r++;else break}return n.slice(0,s-r)}function tt(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])t++;else if(n[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function xe(n,e,t,s,r){let l=e.href,c=e.title||null,i=n[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:l,title:c,text:i,tokens:s.inlineTokens(i)};return s.state.inLink=!1,o}function nt(n,e,t){let s=n.match(t.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
`).map(l=>{let c=l.match(t.other.beginningSpace);if(c===null)return l;let[i]=c;return i.length>=r.length?l.slice(r.length):l}).join(`
`)}var E=class{constructor(n){k(this,"options");k(this,"rules");k(this,"lexer");this.options=n||R}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:P(t,`
`)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],s=nt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=P(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:P(e[0],`
`)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=P(e[0],`
`).split(`
`),s="",r="",l=[];for(;t.length>0;){let c=!1,i=[],o;for(o=0;o<t.length;o++)if(this.rules.other.blockquoteStart.test(t[o]))i.push(t[o]),c=!0;else if(!c)i.push(t[o]);else break;t=t.slice(o);let a=i.join(`
`),h=a.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
${a}`:a,r=r?`${r}
${h}`:h;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=f,t.length===0)break;let p=l.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let x=p,d=x.raw+`
`+t.join(`
`),m=this.blockquote(d);l[l.length-1]=m,s=s.substring(0,s.length-x.raw.length)+m.raw,r=r.substring(0,r.length-x.text.length)+m.text;break}else if((p==null?void 0:p.type)==="list"){let x=p,d=x.raw+`
`+t.join(`
`),m=this.list(d);l[l.length-1]=m,s=s.substring(0,s.length-p.raw.length)+m.raw,r=r.substring(0,r.length-x.raw.length)+m.raw,t=d.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:s,tokens:l,text:r}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),s=t.length>1,r={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let l=this.rules.other.listItemRegex(t),c=!1;for(;n;){let o=!1,a="",h="";if(!(e=l.exec(n))||this.rules.block.hr.test(n))break;a=e[0],n=n.substring(a.length);let f=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,Z=>" ".repeat(3*Z.length)),p=n.split(`
`,1)[0],x=!f.trim(),d=0;if(this.options.pedantic?(d=2,h=f.trimStart()):x?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,h=f.slice(d),d+=e[1].length),x&&this.rules.other.blankLine.test(p)&&(a+=p+`
`,n=n.substring(p.length+1),o=!0),!o){let Z=this.rules.other.nextBulletRegex(d),Y=this.rules.other.hrRegex(d),ee=this.rules.other.fencesBeginRegex(d),te=this.rules.other.headingBeginRegex(d),be=this.rules.other.htmlBeginRegex(d);for(;n;){let D=n.split(`
`,1)[0],T;if(p=D,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),T=p):T=p.replace(this.rules.other.tabCharGlobal," "),ee.test(p)||te.test(p)||be.test(p)||Z.test(p)||Y.test(p))break;if(T.search(this.rules.other.nonSpaceChar)>=d||!p.trim())h+=`
`+T.slice(d);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ee.test(f)||te.test(f)||Y.test(f))break;h+=`
`+p}!x&&!p.trim()&&(x=!0),a+=D+`
`,n=n.substring(D.length+1),f=T.slice(d)}}r.loose||(c?r.loose=!0:this.rules.other.doubleBlankLine.test(a)&&(c=!0));let m=null,W;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(W=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:a,task:!!m,checked:W,loose:!1,text:h,tokens:[]}),r.raw+=a}let i=r.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let o=0;o<r.items.length;o++)if(this.lexer.state.top=!1,r.items[o].tokens=this.lexer.blockTokens(r.items[o].text,[]),!r.loose){let a=r.items[o].tokens.filter(h=>h.type==="space");r.loose=a.length>0&&a.some(h=>this.rules.other.anyLine.test(h.raw))}if(r.loose)for(let o=0;o<r.items.length;o++)r.items[o].loose=!0;return r}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:s,title:r}}}table(n){var c;let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=fe(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(c=e[3])!=null&&c.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?l.align.push("right"):this.rules.other.tableAlignCenter.test(i)?l.align.push("center"):this.rules.other.tableAlignLeft.test(i)?l.align.push("left"):l.align.push(null);for(let i=0;i<t.length;i++)l.header.push({text:t[i],tokens:this.lexer.inline(t[i]),header:!0,align:l.align[i]});for(let i of r)l.rows.push(fe(i,l.header.length).map((o,a)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:l.align[a]})));return l}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let l=P(t.slice(0,-1),"\\");if((t.length-l.length)%2==0)return}else{let l=tt(e[2],"()");if(l===-2)return;if(l>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],r="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],r=l[3])}else r=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(s=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s.slice(1):s.slice(1,-1)),xe(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let s=e[(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!s){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return xe(t,s,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(n);if(s&&!(s[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!t||this.rules.inline.punctuation.exec(t))){let r=[...s[0]].length-1,l,c,i=r,o=0,a=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,e=e.slice(-1*n.length+r);(s=a.exec(e))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(c=[...l].length,s[3]||s[4]){i+=c;continue}else if((s[5]||s[6])&&r%3&&!((r+c)%3)){o+=c;continue}if(i-=c,i>0)continue;c=Math.min(c,c+i+o);let h=[...s[0]][0].length,f=n.slice(0,r+s.index+h+c);if(Math.min(r,c)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(n){var t;let e;if(e=this.rules.inline.url.exec(n)){let s,r;if(e[2]==="@")s=e[0],r="mailto:"+s;else{let l;do l=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(l!==e[0]);s=e[0],r=e[1]==="www."?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},y=class K{constructor(e){k(this,"tokens");k(this,"options");k(this,"state");k(this,"tokenizer");k(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||R,this.options.tokenizer=this.options.tokenizer||new E,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:b,block:B.normal,inline:_.normal};this.options.pedantic?(t.block=B.pedantic,t.inline=_.pedantic):this.options.gfm&&(t.block=B.gfm,this.options.breaks?t.inline=_.breaks:t.inline=_.gfm),this.tokenizer.rules=t}static get rules(){return{block:B,inline:_}}static lex(e,t){return new K(t).lex(e)}static lexInline(e,t){return new K(t).inlineTokens(e)}lex(e){e=e.replace(b.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){var r,l,c;for(this.options.pedantic&&(e=e.replace(b.tabCharGlobal," ").replace(b.spaceLine,""));e;){let i;if((l=(r=this.options.extensions)==null?void 0:r.block)!=null&&l.some(a=>(i=a.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=t.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=t.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue.at(-1).src=a.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=t.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=`
`+i.raw,a.text+=`
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let o=e;if((c=this.options.extensions)!=null&&c.startBlock){let a=1/0,h=e.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},h),typeof f=="number"&&f>=0&&(a=Math.min(a,f))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=t.at(-1);s&&(a==null?void 0:a.type)==="paragraph"?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=t.at(-1);(a==null?void 0:a.type)==="text"?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(i);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var i,o,a;let s=e,r=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,c="";for(;e;){l||(c=""),l=!1;let h;if((o=(i=this.options.extensions)==null?void 0:i.inline)!=null&&o.some(p=>(h=p.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let p=t.at(-1);h.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,s,c)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let f=e;if((a=this.options.extensions)!=null&&a.startInline){let p=1/0,x=e.slice(1),d;this.options.extensions.startInline.forEach(m=>{d=m.call({lexer:this},x),typeof d=="number"&&d>=0&&(p=Math.min(p,d))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(f)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(c=h.raw.slice(-1)),l=!0;let p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw Error(p)}}return t}},q=class{constructor(n){k(this,"options");k(this,"parser");this.options=n||R}space(n){return""}code({text:n,lang:e,escaped:t}){var l;let s=(l=(e||"").match(b.notSpaceStart))==null?void 0:l[0],r=n.replace(b.endingNewline,"")+`
`;return s?'<pre><code class="language-'+w(s)+'">'+(t?r:w(r,!0))+`</code></pre>
`:"<pre><code>"+(t?r:w(r,!0))+`</code></pre>
`}blockquote({tokens:n}){return`<blockquote>
${this.parser.parse(n)}</blockquote>
`}html({text:n}){return n}heading({tokens:n,depth:e}){return`<h${e}>${this.parser.parseInline(n)}</h${e}>
`}hr(n){return`<hr>
`}list(n){let e=n.ordered,t=n.start,s="";for(let c=0;c<n.items.length;c++){let i=n.items[c];s+=this.listitem(i)}let r=e?"ol":"ul",l=e&&t!==1?' start="'+t+'"':"";return"<"+r+l+`>
`+s+"</"+r+`>
`}listitem(n){var t;let e="";if(n.task){let s=this.checkbox({checked:!!n.checked});n.loose?((t=n.tokens[0])==null?void 0:t.type)==="paragraph"?(n.tokens[0].text=s+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=s+" "+w(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):e+=s+" "}return e+=this.parser.parse(n.tokens,!!n.loose),`<li>${e}</li>
`}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
`}table(n){let e="",t="";for(let r=0;r<n.header.length;r++)t+=this.tablecell(n.header[r]);e+=this.tablerow({text:t});let s="";for(let r=0;r<n.rows.length;r++){let l=n.rows[r];t="";for(let c=0;c<l.length;c++)t+=this.tablecell(l[c]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+s+`</table>
`}tablerow({text:n}){return`<tr>
${n}</tr>
`}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${w(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let s=this.parser.parseInline(t),r=de(n);if(r===null)return s;n=r;let l='<a href="'+n+'"';return e&&(l+=' title="'+w(e)+'"'),l+=">"+s+"</a>",l}image({href:n,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let r=de(n);if(r===null)return w(t);n=r;let l=`<img src="${n}" alt="${t}"`;return e&&(l+=` title="${w(e)}"`),l+=">",l}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:w(n.text)}},U=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},$=class V{constructor(e){k(this,"options");k(this,"renderer");k(this,"textRenderer");this.options=e||R,this.options.renderer=this.options.renderer||new q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new U}static parse(e,t){return new V(t).parse(e)}static parseInline(e,t){return new V(t).parseInline(e)}parse(e,t=!0){var r,l;let s="";for(let c=0;c<e.length;c++){let i=e[c];if((l=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&l[i.type]){let a=i,h=this.options.extensions.renderers[a.type].call({parser:this},a);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){s+=h||"";continue}}let o=i;switch(o.type){case"space":s+=this.renderer.space(o);continue;case"hr":s+=this.renderer.hr(o);continue;case"heading":s+=this.renderer.heading(o);continue;case"code":s+=this.renderer.code(o);continue;case"table":s+=this.renderer.table(o);continue;case"blockquote":s+=this.renderer.blockquote(o);continue;case"list":s+=this.renderer.list(o);continue;case"html":s+=this.renderer.html(o);continue;case"paragraph":s+=this.renderer.paragraph(o);continue;case"text":{let a=o,h=this.renderer.text(a);for(;c+1<e.length&&e[c+1].type==="text";)a=e[++c],h+=`
`+this.renderer.text(a);t?s+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):s+=h;continue}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw Error(a)}}}return s}parseInline(e,t=this.renderer){var r,l;let s="";for(let c=0;c<e.length;c++){let i=e[c];if((l=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&l[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){s+=a||"";continue}}let o=i;switch(o.type){case"escape":s+=t.text(o);break;case"html":s+=t.html(o);break;case"link":s+=t.link(o);break;case"image":s+=t.image(o);break;case"strong":s+=t.strong(o);break;case"em":s+=t.em(o);break;case"codespan":s+=t.codespan(o);break;case"br":s+=t.br(o);break;case"del":s+=t.del(o);break;case"text":s+=t.text(o);break;default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw Error(a)}}}return s}},v=(J=class{constructor(n){k(this,"options");k(this,"block");this.options=n||R}preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?y.lex:y.lexInline}provideParser(){return this.block?$.parse:$.parseInline}},k(J,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),J),S=new class{constructor(...n){k(this,"defaults",M());k(this,"options",this.setOptions);k(this,"parse",this.parseMarkdown(!0));k(this,"parseInline",this.parseMarkdown(!1));k(this,"Parser",$);k(this,"Renderer",q);k(this,"TextRenderer",U);k(this,"Lexer",y);k(this,"Tokenizer",E);k(this,"Hooks",v);this.use(...n)}walkTokens(n,e){var s,r;let t=[];for(let l of n)switch(t=t.concat(e.call(this,l)),l.type){case"table":{let c=l;for(let i of c.header)t=t.concat(this.walkTokens(i.tokens,e));for(let i of c.rows)for(let o of i)t=t.concat(this.walkTokens(o.tokens,e));break}case"list":{let c=l;t=t.concat(this.walkTokens(c.items,e));break}default:{let c=l;(r=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&r[c.type]?this.defaults.extensions.childTokens[c.type].forEach(i=>{let o=c[i].flat(1/0);t=t.concat(this.walkTokens(o,e))}):c.tokens&&(t=t.concat(this.walkTokens(c.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw Error("extension name required");if("renderer"in r){let l=e.renderers[r.name];l?e.renderers[r.name]=function(...c){let i=r.renderer.apply(this,c);return i===!1&&(i=l.apply(this,c)),i}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let l=e[r.level];l?l.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),t.renderer){let r=this.defaults.renderer||new q(this.defaults);for(let l in t.renderer){if(!(l in r))throw Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,i=t.renderer[c],o=r[c];r[c]=(...a)=>{let h=i.apply(r,a);return h===!1&&(h=o.apply(r,a)),h||""}}s.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new E(this.defaults);for(let l in t.tokenizer){if(!(l in r))throw Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,i=t.tokenizer[c],o=r[c];r[c]=(...a)=>{let h=i.apply(r,a);return h===!1&&(h=o.apply(r,a)),h}}s.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new v;for(let l in t.hooks){if(!(l in r))throw Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,i=t.hooks[c],o=r[c];v.passThroughHooks.has(l)?r[c]=a=>{if(this.defaults.async)return Promise.resolve(i.call(r,a)).then(f=>o.call(r,f));let h=i.call(r,a);return o.call(r,h)}:r[c]=(...a)=>{let h=i.apply(r,a);return h===!1&&(h=o.apply(r,a)),h}}s.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,l=t.walkTokens;s.walkTokens=function(c){let i=[];return i.push(l.call(this,c)),r&&(i=i.concat(r.call(this,c))),i}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return y.lex(n,e??this.defaults)}parser(n,e){return $.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let s={...t},r={...this.defaults,...s},l=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return l(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(e==null)return l(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=n);let c=r.hooks?r.hooks.provideLexer():n?y.lex:y.lexInline,i=r.hooks?r.hooks.provideParser():n?$.parse:$.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(e):e).then(o=>c(o,r)).then(o=>r.hooks?r.hooks.processAllTokens(o):o).then(o=>r.walkTokens?Promise.all(this.walkTokens(o,r.walkTokens)).then(()=>o):o).then(o=>i(o,r)).then(o=>r.hooks?r.hooks.postprocess(o):o).catch(l);try{r.hooks&&(e=r.hooks.preprocess(e));let o=c(e,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let a=i(o,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(o){return l(o)}}}onError(n,e){return t=>{if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+w(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}};function g(n,e){return S.parse(n,e)}g.options=g.setOptions=function(n){return S.setOptions(n),g.defaults=S.defaults,ne(g.defaults),g},g.getDefaults=M,g.defaults=R,g.use=function(...n){return S.use(...n),g.defaults=S.defaults,ne(g.defaults),g},g.walkTokens=function(n,e){return S.walkTokens(n,e)},g.parseInline=S.parseInline,g.Parser=$,g.parser=$.parse,g.Renderer=q,g.TextRenderer=U,g.Lexer=y,g.lexer=y.lex,g.Tokenizer=E,g.Hooks=v,g.parse=g,g.options,g.setOptions,g.use,g.walkTokens,g.parseInline,$.parse,y.lex;var rt=Re(),st=ye($e(),1);function it(){let n=(0,rt.c)(2),[e,t]=(0,st.useState)(0),s;return n[0]===e?s=n[1]:(s=()=>{t(e+1)},n[0]=e,n[1]=s),s}export{g as n,it as t};
import{s as de}from"./chunk-LvLJmgfZ.js";import{d as D,l as Oe,p as Be,u as ee}from"./useEvent-DO6uJBas.js";import{t as Ue}from"./react-BGmjiNul.js";import{$n as $e,Gn as Ye,Jn as Fe,Rt as Ge,Un as Je,ai as te,dn as Ke,g as Xe,hn as ce,jt as Ze,ln as Qe,m as he,t as et,un as tt,w as pe,yr as at,zt as me}from"./cells-BpZ7g6ok.js";import{t as W}from"./compiler-runtime-DeeZ7FnK.js";import{n as ot}from"./assertNever-CBU83Y6o.js";import{s as ue}from"./useLifecycle-D35CBukS.js";import{n as nt}from"./add-database-form-3g4nuZN1.js";import{n as it,x as lt}from"./ai-model-dropdown-71lgLrLy.js";import{a as fe,d as P}from"./hotkeys-BHHWjLlp.js";import{y as st}from"./utils-DXvhzCGS.js";import{n as _,t as ye}from"./constants-B6Cb__3x.js";import{A as rt,f as dt,j as ke,w as ct}from"./config-CIrPQIbt.js";import{t as ht}from"./jsx-runtime-ZmTK25f3.js";import{r as pt,t as ae}from"./button-YC1gW_kJ.js";import{r as I}from"./requests-BsVD4CdD.js";import{t as h}from"./createLucideIcon-CnW3RofX.js";import{a as be,f as mt,i as xe,m as ut,p as we,u as ge}from"./layout-B1RE_FQ4.js";import{t as je}from"./check-DdfN0k2d.js";import{a as ft,c as yt,i as kt,n as bt,r as xt,s as wt,t as gt}from"./select-V5IdpNiR.js";import{c as jt,d as ve,n as vt,o as Ct,r as Ce,t as zt}from"./download-BhCZMKuQ.js";import{f as Mt}from"./maps-t9yNKYA8.js";import{r as Wt}from"./useCellActionButton-DNI-LzxR.js";import{t as _t}from"./copy-CQ15EONK.js";import{t as At}from"./download-B9SUL40m.js";import{t as St}from"./eye-off-BhExYOph.js";import{t as Nt}from"./file-plus-corner-Da9I6dgU.js";import{t as Dt}from"./file-Cs1JbsV6.js";import{i as Pt,n as It,r as Et,t as Tt}from"./youtube-8p26v8EM.js";import{n as Ht,t as Lt}from"./house-DhFkiXz7.js";import{n as qt}from"./play-BPIh-ZEU.js";import{t as Rt}from"./link-BsTPF7B0.js";import{r as Vt}from"./input-pAun1m1X.js";import{t as Ot}from"./settings-DOXWMfVd.js";import{y as Bt}from"./textarea-DBO30D7K.js";import{t as Ut}from"./square-C8Tw_XXG.js";import{t as C}from"./use-toast-rmUWldD_.js";import{t as $t}from"./tooltip-CEc2ajau.js";import{a as ze,i as Yt,r as Ft}from"./mode-DX8pdI-l.js";import{o as Gt}from"./alert-dialog-DwQffb13.js";import{a as Jt,c as Kt,i as Xt,n as Zt,r as Qt}from"./dialog-CxGKN4C_.js";import{n as oe}from"./ImperativeModal-CUbWEBci.js";import{r as ea,t as ta}from"./share-CbPtIlnM.js";import{t as U}from"./copy-Bv2DBpIS.js";import{r as aa}from"./useRunCells-24p6hn99.js";import{a as oa}from"./cell-link-Bw5bzt4a.js";import{a as Me}from"./renderShortcut-DEwfrKeS.js";import{t as na}from"./icons-BhEXrzsb.js";import{t as ia}from"./links-C-GGaW8R.js";import{r as la,t as sa}from"./hooks-CotXIFzV.js";import{t as We}from"./types-z6Sk3JCV.js";var ra=h("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),da=h("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),_e=h("clipboard-copy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]),Ae=h("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]),Se=h("diamond-plus",[["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z",key:"1ey20j"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),ca=h("fast-forward",[["path",{d:"M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z",key:"b19h5q"}],["path",{d:"M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z",key:"h7h5ge"}]]),ha=h("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]),pa=h("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]),Ne=h("layout-template",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]),ma=h("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),ua=h("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),De=h("presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),fa=h("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),ya=h("square-power",[["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M7.998 9.003a5 5 0 1 0 8-.005",key:"1pek45"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]),Pe=h("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),Ie=W(),ne=de(Ue(),1),a=de(ht(),1),$="https://static.marimo.app";const ka=e=>{let t=(0,Ie.c)(25),{onClose:n}=e,[o,l]=(0,ne.useState)(""),{exportAsHTML:r}=I(),s=`${o}-${Math.random().toString(36).slice(2,6)}`,i=`${$}/static/${s}`,d;t[0]!==r||t[1]!==n||t[2]!==s?(d=async v=>{v.preventDefault(),n();let A=await r({download:!1,includeCode:!0,files:mt.INSTANCE.filenames()}),z=C({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${$}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:A,path:s})}).catch(()=>{z.dismiss(),C({title:"Error uploading static page",description:(0,a.jsxs)("div",{children:["Please try again later. If the problem persists, please file a bug report on"," ",(0,a.jsx)("a",{href:_.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),z.dismiss(),C({title:"Static page uploaded!",description:(0,a.jsxs)("div",{children:["The URL has been copied to your clipboard.",(0,a.jsx)("br",{}),"You can share it with anyone."]})})},t[0]=r,t[1]=n,t[2]=s,t[3]=d):d=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(Kt,{children:"Share static notebook"}),t[4]=p):p=t[4];let w;t[5]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsxs)(Jt,{children:[p,(0,a.jsxs)(Qt,{children:["You can publish a static, non-interactive version of this notebook to the public web. We will create a link for you that lives on"," ",(0,a.jsx)("a",{href:$,target:"_blank",children:$}),"."]})]}),t[5]=w):w=t[5];let g;t[6]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{l(v.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},t[6]=g):g=t[6];let m;t[7]===o?m=t[8]:(m=(0,a.jsx)(Vt,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:g,required:!0,autoComplete:"off"}),t[7]=o,t[8]=m);let u;t[9]===i?u=t[10]:(u=(0,a.jsxs)("div",{className:"font-semibold text-sm text-muted-foreground gap-2 flex flex-col",children:["Anyone will be able to access your notebook at this URL:",(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(ba,{text:i}),(0,a.jsx)("span",{className:"text-primary",children:i})]})]}),t[9]=i,t[10]=u);let f;t[11]!==m||t[12]!==u?(f=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[m,u]}),t[11]=m,t[12]=u,t[13]=f):f=t[13];let y;t[14]===n?y=t[15]:(y=(0,a.jsx)(ae,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),t[14]=n,t[15]=y);let k;t[16]===i?k=t[17]:(k=(0,a.jsx)(ae,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await U(i)},children:"Create"}),t[16]=i,t[17]=k);let b;t[18]!==y||t[19]!==k?(b=(0,a.jsxs)(Xt,{children:[y,k]}),t[18]=y,t[19]=k,t[20]=b):b=t[20];let j;return t[21]!==d||t[22]!==b||t[23]!==f?(j=(0,a.jsx)(Zt,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:d,children:[w,f,b]})}),t[21]=d,t[22]=b,t[23]=f,t[24]=j):j=t[24],j};var ba=e=>{let t=(0,Ie.c)(8),[n,o]=ne.useState(!1),l;t[0]===e.text?l=t[1]:(l=pt.stopPropagation(async p=>{p.preventDefault(),await U(e.text),o(!0),setTimeout(()=>o(!1),2e3)}),t[0]=e.text,t[1]=l);let r=l,s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(_t,{size:14,strokeWidth:1.5}),t[2]=s):s=t[2];let i;t[3]===r?i=t[4]:(i=(0,a.jsx)(ae,{"data-testid":"copy-static-notebook-url-button",onClick:r,size:"xs",variant:"secondary",children:s}),t[3]=r,t[4]=i);let d;return t[5]!==n||t[6]!==i?(d=(0,a.jsx)($t,{content:"Copied!",open:n,children:i}),t[5]=n,t[6]=i,t[7]=d):d=t[7],d},xa=W();function wa(){let e=document.getElementsByClassName(ye.outputArea);for(let t of e){let n=t.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=te.findElement(t);if(!o){P.warn("Could not find HTMLCellId for visible output area",t);continue}return{cellId:te.parse(o.id)}}}return P.warn("No visible output area found for scroll anchor"),null}function ga(e){if(!e){P.warn("No scroll anchor provided to restore scroll position");return}let t=document.getElementById(te.create(e.cellId));if(!t){P.warn("Could not find cell element to restore scroll position",e.cellId);return}if(!t.querySelector(`.${ye.outputArea}`)){P.warn("Could not find output area to restore scroll position",e.cellId);return}t.scrollIntoView({block:"start",behavior:"auto"})}function Ee(){let e=(0,xa.c)(2),t=D(ze),n;return e[0]===t?n=e[1]:(n=()=>{let o=wa();t(l=>({mode:Yt(l.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ga(o)})})},e[0]=t,e[1]=n),n}const Te=Be(!1);var ja=W();const va=()=>{let e=(0,ja.c)(7),{selectedLayout:t}=be(),{setLayoutView:n}=xe();if(ke()&&!ce("wasm_layouts"))return null;let o;e[0]===n?o=e[1]:(o=i=>n(i),e[0]=n,e[1]=o);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(wt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(yt,{placeholder:"Select a view"})}),e[2]=l):l=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(bt,{children:(0,a.jsxs)(xt,{children:[(0,a.jsx)(ft,{children:"View as"}),We.map(za)]})}),e[3]=r):r=e[3];let s;return e[4]!==t||e[5]!==o?(s=(0,a.jsxs)(gt,{"data-testid":"layout-select",value:t,onValueChange:o,children:[l,r]}),e[4]=t,e[5]=o,e[6]=s):s=e[6],s};function Ca(e){return(0,a.jsx)(He(e),{className:"h-4 w-4"})}function He(e){switch(e){case"vertical":return ma;case"grid":return Et;case"slides":return De;default:return ot(e),Ut}}function Le(e){return ue(e)}function za(e){return(0,a.jsx)(kt,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[Ca(e),(0,a.jsx)("span",{children:Le(e)})]})},e)}var Ma=W();function Wa(e){let t=(0,Ma.c)(5),{openPrompt:n,closeModal:o}=oe(),{sendCopy:l}=I(),r;return t[0]!==o||t[1]!==n||t[2]!==l||t[3]!==e?(r=()=>{if(!e)return null;let s=Ge.guessDeliminator(e);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${me.basename(e)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:i=>{let d=s.join(me.dirname(e),i);l({source:e,destination:d}).then(()=>{o(),C({title:"Notebook copied",description:"A copy of the notebook has been created."}),ia(d)})}})},t[0]=o,t[1]=n,t[2]=l,t[3]=e,t[4]=r):r=t[4],r}const _a=()=>{let{updateCellConfig:e}=pe(),{saveCellConfig:t}=I();return(0,ne.useCallback)(async()=>{let n=new Ze,o=he(),l=o.cellIds.inOrderIds,r={};for(let i of l){if(o.cellData[i]===void 0)continue;let{code:d,config:p}=o.cellData[i];p.hide_code||n.isSupported(d)&&(r[i]={hide_code:!0})}let s=fe.entries(r);if(s.length!==0){await t({configs:r});for(let[i,d]of s)e({cellId:i,config:d})}},[e])};var Aa=W();function qe(){let e=(0,Aa.c)(4),{openConfirm:t}=oe(),n=D(ct),{sendRestart:o}=I(),l;return e[0]!==t||e[1]!==o||e[2]!==n?(l=()=>{t({title:"Restart Kernel",description:"This will restart the Python kernel. You'll lose all data that's in memory. You will also lose any unsaved changes, so make sure to save your work before restarting.",variant:"destructive",confirmAction:(0,a.jsx)(Gt,{onClick:async()=>{n({state:rt.CLOSING}),await o(),ea()},"aria-label":"Confirm Restart",children:"Restart"})})},e[0]=t,e[1]=o,e[2]=n,e[3]=l):l=e[3],l}var Sa=W(),E=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation()};function Na(){var se,re;let e=(0,Sa.c)(40),t=oa(),{openModal:n,closeModal:o}=oe(),{toggleApplication:l}=Qe(),{selectedPanel:r}=tt(),[s]=Oe(ze),i=ee(Ft),d=_a(),[p]=st(),{updateCellConfig:w,undoDeleteCell:g,clearAllCellOutputs:m,addSetupCellIfDoesntExist:u,collapseAllCells:f,expandAllCells:y}=pe(),k=qe(),b=aa(),j=Wa(t),v=D(Te),A=D(it),z=D(lt),{exportAsMarkdown:Y,readCode:S,saveCellConfig:F,updateCellOutputs:G}=I(),J=ee(Xe),K=ee(et),{selectedLayout:X}=be(),{setLayoutView:Z}=xe(),T=Ee(),Q=la(),H=((se=p.sharing)==null?void 0:se.html)??!0,L=((re=p.sharing)==null?void 0:re.wasm)??!0,q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q=ce("server_side_pdf_export"),e[0]=q):q=e[0];let le=q,R=le||s.mode==="present",Re=Ga,V;e[1]===Symbol.for("react.memo_cache_sentinel")?(V=(0,a.jsx)(At,{size:14,strokeWidth:1.5}),e[1]=V):V=e[1];let O;e[2]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(we,{size:14,strokeWidth:1.5}),e[2]=O):O=e[2];let M;e[3]===t?M=e[4]:(M=async()=>{if(!t){ie();return}await ge({filename:t,includeCode:!0})},e[3]=t,e[4]=M);let B;return e[5]!==u||e[6]!==K||e[7]!==m||e[8]!==o||e[9]!==f||e[10]!==j||e[11]!==y||e[12]!==Y||e[13]!==t||e[14]!==J||e[15]!==d||e[16]!==i||e[17]!==n||e[18]!==R||e[19]!==S||e[20]!==k||e[21]!==b||e[22]!==F||e[23]!==X||e[24]!==r||e[25]!==v||e[26]!==z||e[27]!==Z||e[28]!==A||e[29]!==H||e[30]!==L||e[31]!==M||e[32]!==Q||e[33]!==l||e[34]!==T||e[35]!==g||e[36]!==w||e[37]!==G||e[38]!==s.mode?(B=[{icon:V,label:"Download",handle:E,dropdown:[{icon:O,label:"Download as HTML",handle:M},{icon:(0,a.jsx)(we,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!t){ie();return}await ge({filename:t,includeCode:!1})}},{icon:(0,a.jsx)(na,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let c=await Y({download:!1});Ce(new Blob([c],{type:"text/plain"}),ve.toMarkdown(document.title))}},{icon:(0,a.jsx)(ut,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let c=await S();Ce(new Blob([c.contents],{type:"text/plain"}),ve.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(qt,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:s.mode!=="present",tooltip:s.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",Me("global.hideCode",!1)]}),handle:Fa},{icon:(0,a.jsx)(Dt,{size:14,strokeWidth:1.5}),label:"Download as PDF",disabled:!R,tooltip:R?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",Me("global.hideCode",!1)]}),handle:async()=>{if(le){if(!t){ie();return}await jt("Downloading PDF...",async N=>{await sa({takeScreenshots:()=>Q({progress:N}),updateCellOutputs:G}),await vt({filename:t,webpdf:!1})});return}let c=new Event("export-beforeprint"),x=new Event("export-afterprint");(function(){window.dispatchEvent(c),setTimeout(Ya,0),setTimeout(()=>window.dispatchEvent(x),0)})()}}]},{icon:(0,a.jsx)(fa,{size:14,strokeWidth:1.5}),label:"Share",handle:E,hidden:!H&&!L,dropdown:[{icon:(0,a.jsx)(Ht,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!H,handle:async()=>{n((0,a.jsx)(ka,{onClose:o}))}},{icon:(0,a.jsx)(Rt,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!L,handle:async()=>{await U(ta({code:(await S()).contents})),C({title:"Copied",description:"Link copied to clipboard."})}}]},{icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:E,dropdown:Ke.flatMap(c=>{let{type:x,Icon:N,hidden:Ve}=c;return Ve?[]:{label:ue(x),rightElement:Re(r===x),icon:(0,a.jsx)(N,{size:14,strokeWidth:1.5}),handle:()=>l(x)}})},{icon:(0,a.jsx)(De,{size:14,strokeWidth:1.5}),label:"Present as",handle:E,dropdown:[{icon:s.mode==="present"?(0,a.jsx)(Bt,{size:14,strokeWidth:1.5}):(0,a.jsx)(Ne,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{T()}},...We.map((c,x)=>{let N=He(c);return{divider:x===0,label:Le(c),icon:(0,a.jsx)(N,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:X===c&&(0,a.jsx)(je,{size:14})}),handle:()=>{Z(c),s.mode==="edit"&&T()}}})]},{icon:(0,a.jsx)(ha,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!t||ke(),handle:j},{icon:(0,a.jsx)(_e,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!t,handle:async()=>{await U((await S()).contents),C({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(Wt,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!J||i,handle:async()=>{let c=at(he());await F({configs:fe.fromEntries(c.map($a))});for(let x of c)w({cellId:x,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(Se,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{u({})}},{icon:(0,a.jsx)(Ye,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(nt,{onClose:o}))}},{icon:(0,a.jsx)(Pe,{size:14,strokeWidth:1.5}),label:"Undo cell deletion",hidden:!K||i,handle:()=>{g()}},{icon:(0,a.jsx)(ya,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:k},{icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{b()}},{icon:(0,a.jsx)(Fe,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{m()}},{icon:(0,a.jsx)(St,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:f,redundant:!0},{icon:(0,a.jsx)(ra,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:y,redundant:!0},{divider:!0,icon:(0,a.jsx)(Ae,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>v(Ua)},{icon:(0,a.jsx)(pa,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>z(Ba)},{icon:(0,a.jsx)(Ot,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>A(Oa),redundant:!0},{icon:(0,a.jsx)(Mt,{size:14,strokeWidth:1.5}),label:"Resources",handle:E,dropdown:[{icon:(0,a.jsx)($e,{size:14,strokeWidth:1.5}),label:"Documentation",handle:Va},{icon:(0,a.jsx)(Pt,{size:14,strokeWidth:1.5}),label:"GitHub",handle:Ra},{icon:(0,a.jsx)(It,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:qa},{icon:(0,a.jsx)(Tt,{size:14,strokeWidth:1.5}),label:"YouTube",handle:La},{icon:(0,a.jsx)(Je,{size:14,strokeWidth:1.5}),label:"Changelog",handle:Ha}]},{divider:!0,icon:(0,a.jsx)(Lt,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:Ta},{icon:(0,a.jsx)(Nt,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:Ea}].filter(Ia).map(Da),e[5]=u,e[6]=K,e[7]=m,e[8]=o,e[9]=f,e[10]=j,e[11]=y,e[12]=Y,e[13]=t,e[14]=J,e[15]=d,e[16]=i,e[17]=n,e[18]=R,e[19]=S,e[20]=k,e[21]=b,e[22]=F,e[23]=X,e[24]=r,e[25]=v,e[26]=z,e[27]=Z,e[28]=A,e[29]=H,e[30]=L,e[31]=M,e[32]=Q,e[33]=l,e[34]=T,e[35]=g,e[36]=w,e[37]=G,e[38]=s.mode,e[39]=B):B=e[39],B}function Da(e){return e.dropdown?{...e,dropdown:e.dropdown.filter(Pa)}:e}function Pa(e){return!e.hidden}function Ia(e){return!e.hidden}function Ea(){let e=dt();window.open(e,"_blank")}function Ta(){let e=document.baseURI.split("?")[0];window.open(e,"_self")}function Ha(){window.open(_.releasesPage,"_blank")}function La(){window.open(_.youtube,"_blank")}function qa(){window.open(_.discordLink,"_blank")}function Ra(){window.open(_.githubPage,"_blank")}function Va(){window.open(_.docsPage,"_blank")}function Oa(e){return!e}function Ba(e){return!e}function Ua(e){return!e}function $a(e){return[e,{disabled:!1}]}function Ya(){return window.print()}async function Fa(){let e=document.getElementById("App");e&&await Ct({element:e,filename:document.title,prepare:zt})}function Ga(e){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:e&&(0,a.jsx)(je,{size:14})})}function ie(){C({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{Ee as a,Se as c,Te as i,Ae as l,qe as n,Pe as o,va as r,Ne as s,Na as t,_e as u};
import{s as h}from"./chunk-LvLJmgfZ.js";import{t as c}from"./react-BGmjiNul.js";import{t as y}from"./context-JwD-oSsl.js";var l=new Map,m=!1;try{m=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}var u=!1;try{u=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}var p={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},f=class{format(t){var e;let r="";if(r=!m&&this.options.signDisplay!=null?b(this.numberFormatter,this.options.signDisplay,t):this.numberFormatter.format(t),this.options.style==="unit"&&!u){let{unit:s,unitDisplay:i="short",locale:a}=this.resolvedOptions();if(!s)return r;let o=(e=p[s])==null?void 0:e[i];r+=o[a]||o.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw RangeError("End date must be >= start date");return`${this.format(t)} \u2013 ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw RangeError("End date must be >= start date");let e=this.numberFormatter.formatToParts(t),s=this.numberFormatter.formatToParts(r);return[...e.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...s.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!m&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!u&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,r={}){this.numberFormatter=d(t,r),this.options=r}};function d(t,r={}){var a;let{numberingSystem:e}=r;if(e&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${e}`),r.style==="unit"&&!u){let{unit:o,unitDisplay:n="short"}=r;if(!o)throw Error('unit option must be provided with style: "unit"');if(!((a=p[o])!=null&&a[n]))throw Error(`Unsupported unit ${o} with unitDisplay = ${n}`);r={...r,style:"decimal"}}let s=t+(r?Object.entries(r).sort((o,n)=>o[0]<n[0]?-1:1).join():"");if(l.has(s))return l.get(s);let i=new Intl.NumberFormat(t,r);return l.set(s,i),i}function b(t,r,e){if(r==="auto")return t.format(e);if(r==="never")return t.format(Math.abs(e));{let s=!1;if(r==="always"?s=e>0||Object.is(e,0):r==="exceptZero"&&(Object.is(e,-0)||Object.is(e,0)?e=Math.abs(e):s=e>0),s){let i=t.format(-e),a=t.format(e),o=i.replace(a,"").replace(/\u200e|\u061C/,"");return[...o].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(a,"!!!").replace(o,"+").replace("!!!",a)}else return t.format(e)}}var g=h(c(),1);function D(t={}){let{locale:r}=y();return(0,g.useMemo)(()=>new f(r,t),[r,t])}export{f as n,D as t};
import{s as Ge}from"./chunk-LvLJmgfZ.js";import{t as Ve}from"./react-BGmjiNul.js";import{t as Be}from"./react-dom-C9fstfnp.js";import{n as We}from"./clsx-D8GwTfvk.js";import{n as _e}from"./SSRProvider-CEHRCdjA.js";var f=Ge(Ve(),1),A=typeof document<"u"?f.useLayoutEffect:()=>{},Ye=f.useInsertionEffect??A;function T(e){let t=(0,f.useRef)(null);return Ye(()=>{t.current=e},[e]),(0,f.useCallback)((...n)=>{let r=t.current;return r==null?void 0:r(...n)},[])}function Xe(e){let[t,n]=(0,f.useState)(e),r=(0,f.useRef)(null),a=T(()=>{if(!r.current)return;let l=r.current.next();if(l.done){r.current=null;return}t===l.value?a():n(l.value)});return A(()=>{r.current&&a()}),[t,T(l=>{r.current=l(t),a()})]}var qe=!!(typeof window<"u"&&window.document&&window.document.createElement),O=new Map,U;typeof FinalizationRegistry<"u"&&(U=new FinalizationRegistry(e=>{O.delete(e)}));function me(e){let[t,n]=(0,f.useState)(e),r=(0,f.useRef)(null),a=_e(t),l=(0,f.useRef)(null);if(U&&U.register(l,a),qe){let u=O.get(a);u&&!u.includes(r)?u.push(r):O.set(a,[r])}return A(()=>{let u=a;return()=>{U&&U.unregister(l),O.delete(u)}},[a]),(0,f.useEffect)(()=>{let u=r.current;return u&&n(u),()=>{u&&(r.current=null)}}),a}function $e(e,t){if(e===t)return e;let n=O.get(e);if(n)return n.forEach(a=>a.current=t),t;let r=O.get(t);return r?(r.forEach(a=>a.current=e),e):t}function Je(e=[]){let t=me(),[n,r]=Xe(t),a=(0,f.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return A(a,[t,a,...e]),n}function Z(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}var L=e=>(e==null?void 0:e.ownerDocument)??document,j=e=>e&&"window"in e&&e.window===e?e:L(e).defaultView||window;function Qe(e){return typeof e=="object"&&!!e&&"nodeType"in e&&typeof e.nodeType=="number"}function Ze(e){return Qe(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var et=!1;function V(){return et}function w(e,t){if(!V())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName==="SLOT"&&n.assignedSlot?n.assignedSlot.parentNode:Ze(n)?n.host:n.parentNode}return!1}var tt=(e=document)=>{var n;if(!V())return e.activeElement;let t=e.activeElement;for(;t&&"shadowRoot"in t&&((n=t.shadowRoot)!=null&&n.activeElement);)t=t.shadowRoot.activeElement;return t};function b(e){return V()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function ee(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let l=t[a],u=r[a];typeof l=="function"&&typeof u=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Z(l,u):(a==="className"||a==="UNSAFE_className")&&typeof l=="string"&&typeof u=="string"?t[a]=We(l,u):a==="id"&&l&&u?t.id=$e(l,u):t[a]=u===void 0?l:u}}return t}function z(e){if(nt())e.focus({preventScroll:!0});else{let t=rt(e);e.focus(),it(t)}}var B=null;function nt(){if(B==null){B=!1;try{document.createElement("div").focus({get preventScroll(){return B=!0,!0}})}catch{}}return B}function rt(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function it(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function W(e){var n;if(typeof window>"u"||window.navigator==null)return!1;let t=(n=window.navigator.userAgentData)==null?void 0:n.brands;return Array.isArray(t)&&t.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function te(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function P(e){let t=null;return()=>(t??(t=e()),t)}var x=P(function(){return te(/^Mac/i)}),Ee=P(function(){return te(/^iPhone/i)}),ne=P(function(){return te(/^iPad/i)||x()&&navigator.maxTouchPoints>1}),_=P(function(){return Ee()||ne()}),at=P(function(){return x()||_()}),be=P(function(){return W(/AppleWebKit/i)&&!he()}),he=P(function(){return W(/Chrome/i)}),re=P(function(){return W(/Android/i)}),ot=P(function(){return W(/Firefox/i)}),st=(0,f.createContext)({isNative:!0,open:ut,useHref:e=>e});function ie(){return(0,f.useContext)(st)}function M(e,t,n=!0){var E;var r;let{metaKey:a,ctrlKey:l,altKey:u,shiftKey:d}=t;ot()&&(r=window.event)!=null&&((E=r.type)!=null&&E.startsWith("key"))&&e.target==="_blank"&&(x()?a=!0:l=!0);let v=be()&&x()&&!ne()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:l,altKey:u,shiftKey:d}):new MouseEvent("click",{metaKey:a,ctrlKey:l,altKey:u,shiftKey:d,bubbles:!0,cancelable:!0});M.isOpening=n,z(e),e.dispatchEvent(v),M.isOpening=!1}M.isOpening=!1;function lt(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function ut(e,t){lt(e,n=>M(n,t))}function ct(e){let t=ie().useHref(e.href??"");return{"data-href":e.href?t:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function dt(e){let t=ie().useHref((e==null?void 0:e.href)??"");return{href:e!=null&&e.href?t:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}var S=new Map,ae=new Set;function Te(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=S.get(r.target);a||(a=new Set,S.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=S.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),S.delete(r.target)),S.size===0)){for(let l of ae)l();ae.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Te):Te());function ft(){for(let[e]of S)"isConnected"in e&&!e.isConnected&&S.delete(e)}function we(e){requestAnimationFrame(()=>{ft(),S.size===0?e():ae.add(e)})}function Pe(){let e=(0,f.useRef)(new Map),t=(0,f.useCallback)((a,l,u,d)=>{let v=d!=null&&d.once?(...E)=>{e.current.delete(u),u(...E)}:u;e.current.set(u,{type:l,eventTarget:a,fn:v,options:d}),a.addEventListener(l,v,d)},[]),n=(0,f.useCallback)((a,l,u,d)=>{var E;let v=((E=e.current.get(u))==null?void 0:E.fn)||u;a.removeEventListener(l,v,d),e.current.delete(u)},[]),r=(0,f.useCallback)(()=>{e.current.forEach((a,l)=>{n(a.eventTarget,a.type,l,a.options)})},[n]);return(0,f.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Le(e,t){A(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Se(e){return e.pointerType===""&&e.isTrusted?!0:re()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ke(e){return!re()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var pt=typeof Element<"u"&&"checkVisibility"in Element.prototype;function gt(e){let t=j(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a=n!=="none"&&r!=="hidden"&&r!=="collapse";if(a){let{getComputedStyle:l}=e.ownerDocument.defaultView,{display:u,visibility:d}=l(e);a=u!=="none"&&d!=="hidden"&&d!=="collapse"}return a}function vt(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function oe(e,t){return pt?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&gt(e)&&vt(e,t)&&(!e.parentElement||oe(e.parentElement,e))}var se=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],yt=se.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";se.push('[tabindex]:not([tabindex="-1"]):not([disabled])');var mt=se.join(':not([hidden]):not([tabindex="-1"]),');function Ae(e){return e.matches(yt)&&oe(e)&&!Me(e)}function Et(e){return e.matches(mt)&&oe(e)&&!Me(e)}function Me(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function bt(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function Ke(e,t,n){bt(e,t),t.set(e,n)}function le(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ce(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function ht(e){let t=(0,f.useRef)({isFocused:!1,observer:null});A(()=>{let r=t.current;return()=>{r.observer&&(r.observer=(r.observer.disconnect(),null))}},[]);let n=T(r=>{e==null||e(r)});return(0,f.useCallback)(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let a=r.target;a.addEventListener("focusout",l=>{t.current.isFocused=!1,a.disabled&&n(le(l)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&a.disabled){var l;(l=t.current.observer)==null||l.disconnect();let u=a===document.activeElement?null:document.activeElement;a.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[n])}var ue=!1;function Tt(e){for(;e&&!Ae(e);)e=e.parentElement;let t=j(e),n=t.document.activeElement;if(!n||n===e)return;ue=!0;let r=!1,a=h=>{(h.target===n||r)&&h.stopImmediatePropagation()},l=h=>{(h.target===n||r)&&(h.stopImmediatePropagation(),!e&&!r&&(r=!0,z(n),v()))},u=h=>{(h.target===e||r)&&h.stopImmediatePropagation()},d=h=>{(h.target===e||r)&&(h.stopImmediatePropagation(),r||(r=!0,z(n),v()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",l,!0),t.addEventListener("focusin",d,!0),t.addEventListener("focus",u,!0);let v=()=>{cancelAnimationFrame(E),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",l,!0),t.removeEventListener("focusin",d,!0),t.removeEventListener("focus",u,!0),ue=!1,r=!1},E=requestAnimationFrame(v);return v}var F="default",ce="",Y=new WeakMap;function wt(e){if(_()){if(F==="default"){let t=L(e);ce=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}F="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Y.set(e,e.style[t]),e.style[t]="none"}}function Ie(e){if(_()){if(F!=="disabled")return;F="restoring",setTimeout(()=>{we(()=>{if(F==="restoring"){let t=L(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=ce||""),ce="",F="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Y.has(e)){let t=Y.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Y.delete(e)}}var de=f.createContext({register:()=>{}});de.displayName="PressResponderContext";function Pt(e,t){return t.get?t.get.call(e):t.value}function Oe(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Lt(e,t){return Pt(e,Oe(e,t,"get"))}function St(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=n}}function xe(e,t,n){return St(e,Oe(e,t,"set"),n),n}Be();function kt(e){let t=(0,f.useContext)(de);if(t){let{register:n,...r}=t;e=ee(r,e),n()}return Le(t,e.ref),e}var X=new WeakMap,q=class{continuePropagation(){xe(this,X,!1)}get shouldStopPropagation(){return Lt(this,X)}constructor(e,t,n,r){var E;Ke(this,X,{writable:!0,value:void 0}),xe(this,X,!0);let a=(E=(r==null?void 0:r.target)??n.currentTarget)==null?void 0:E.getBoundingClientRect(),l,u=0,d,v=null;n.clientX!=null&&n.clientY!=null&&(d=n.clientX,v=n.clientY),a&&(d!=null&&v!=null?(l=d-a.left,u=v-a.top):(l=a.width/2,u=a.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=l,this.y=u}},Fe=Symbol("linkClicked"),He="react-aria-pressable-style",Ne="data-react-aria-pressable";function At(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:l,onClick:u,isDisabled:d,isPressed:v,preventFocusOnPress:E,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:H,ref:$,...Ue}=kt(e),[je,ge]=(0,f.useState)(!1),C=(0,f.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:N,removeAllGlobalListeners:J}=Pe(),D=T((i,c)=>{let m=C.current;if(d||m.didFirePressStart)return!1;let o=!0;if(m.isTriggeringEvent=!0,r){let p=new q("pressstart",c,i);r(p),o=p.shouldStopPropagation}return n&&n(!0),m.isTriggeringEvent=!1,m.didFirePressStart=!0,ge(!0),o}),I=T((i,c,m=!0)=>{let o=C.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let p=!0;if(a){let s=new q("pressend",c,i);a(s),p=s.shouldStopPropagation}if(n&&n(!1),ge(!1),t&&m&&!d){let s=new q("press",c,i);t(s),p&&(p=s.shouldStopPropagation)}return o.isTriggeringEvent=!1,p}),R=T((i,c)=>{let m=C.current;if(d)return!1;if(l){m.isTriggeringEvent=!0;let o=new q("pressup",c,i);return l(o),m.isTriggeringEvent=!1,o.shouldStopPropagation}return!0}),k=T(i=>{let c=C.current;if(c.isPressed&&c.target){c.didFirePressStart&&c.pointerType!=null&&I(K(c.target,i),c.pointerType,!1),c.isPressed=!1,c.isOverTarget=!1,c.activePointerId=null,c.pointerType=null,J(),H||Ie(c.target);for(let m of c.disposables)m();c.disposables=[]}}),ve=T(i=>{h&&k(i)}),Q=T(i=>{d||(u==null||u(i))}),ye=T((i,c)=>{if(!d&&u){let m=new MouseEvent("click",i);Ce(m,c),u(le(m))}}),ze=(0,f.useMemo)(()=>{let i=C.current,c={onKeyDown(o){if(pe(o.nativeEvent,o.currentTarget)&&w(o.currentTarget,b(o.nativeEvent))){var p;De(b(o.nativeEvent),o.key)&&o.preventDefault();let s=!0;if(!i.isPressed&&!o.repeat){i.target=o.currentTarget,i.isPressed=!0,i.pointerType="keyboard",s=D(o,"keyboard");let g=o.currentTarget;N(L(o.currentTarget),"keyup",Z(y=>{pe(y,g)&&!y.repeat&&w(g,b(y))&&i.target&&R(K(i.target,y),"keyboard")},m),!0)}s&&o.stopPropagation(),o.metaKey&&x()&&((p=i.metaKeyEvents)==null||p.set(o.key,o.nativeEvent))}else o.key==="Meta"&&(i.metaKeyEvents=new Map)},onClick(o){if(!(o&&!w(o.currentTarget,b(o.nativeEvent)))&&o&&o.button===0&&!i.isTriggeringEvent&&!M.isOpening){let p=!0;if(d&&o.preventDefault(),!i.ignoreEmulatedMouseEvents&&!i.isPressed&&(i.pointerType==="virtual"||Se(o.nativeEvent))){let s=D(o,"virtual"),g=R(o,"virtual"),y=I(o,"virtual");Q(o),p=s&&g&&y}else if(i.isPressed&&i.pointerType!=="keyboard"){let s=i.pointerType||o.nativeEvent.pointerType||"virtual",g=R(K(o.currentTarget,o),s),y=I(K(o.currentTarget,o),s,!0);p=g&&y,i.isOverTarget=!1,Q(o),k(o)}i.ignoreEmulatedMouseEvents=!1,p&&o.stopPropagation()}}},m=o=>{var g;if(i.isPressed&&i.target&&pe(o,i.target)){var p;De(b(o),o.key)&&o.preventDefault();let y=b(o),G=w(i.target,b(o));I(K(i.target,o),"keyboard",G),G&&ye(o,i.target),J(),o.key!=="Enter"&&fe(i.target)&&w(i.target,y)&&!o[Fe]&&(o[Fe]=!0,M(i.target,o,!1)),i.isPressed=!1,(p=i.metaKeyEvents)==null||p.delete(o.key)}else if(o.key==="Meta"&&((g=i.metaKeyEvents)!=null&&g.size)){var s;let y=i.metaKeyEvents;i.metaKeyEvents=void 0;for(let G of y.values())(s=i.target)==null||s.dispatchEvent(new KeyboardEvent("keyup",G))}};if(typeof PointerEvent<"u"){c.onPointerDown=s=>{if(s.button!==0||!w(s.currentTarget,b(s.nativeEvent)))return;if(ke(s.nativeEvent)){i.pointerType="virtual";return}i.pointerType=s.pointerType;let g=!0;if(!i.isPressed){i.isPressed=!0,i.isOverTarget=!0,i.activePointerId=s.pointerId,i.target=s.currentTarget,H||wt(i.target),g=D(s,i.pointerType);let y=b(s.nativeEvent);"releasePointerCapture"in y&&y.releasePointerCapture(s.pointerId),N(L(s.currentTarget),"pointerup",o,!1),N(L(s.currentTarget),"pointercancel",p,!1)}g&&s.stopPropagation()},c.onMouseDown=s=>{if(w(s.currentTarget,b(s.nativeEvent))&&s.button===0){if(E){let g=Tt(s.target);g&&i.disposables.push(g)}s.stopPropagation()}},c.onPointerUp=s=>{!w(s.currentTarget,b(s.nativeEvent))||i.pointerType==="virtual"||s.button===0&&!i.isPressed&&R(s,i.pointerType||s.pointerType)},c.onPointerEnter=s=>{s.pointerId===i.activePointerId&&i.target&&!i.isOverTarget&&i.pointerType!=null&&(i.isOverTarget=!0,D(K(i.target,s),i.pointerType))},c.onPointerLeave=s=>{s.pointerId===i.activePointerId&&i.target&&i.isOverTarget&&i.pointerType!=null&&(i.isOverTarget=!1,I(K(i.target,s),i.pointerType,!1),ve(s))};let o=s=>{if(s.pointerId===i.activePointerId&&i.isPressed&&s.button===0&&i.target){if(w(i.target,b(s))&&i.pointerType!=null){let g=!1,y=setTimeout(()=>{i.isPressed&&i.target instanceof HTMLElement&&(g?k(s):(z(i.target),i.target.click()))},80);N(s.currentTarget,"click",()=>g=!0,!0),i.disposables.push(()=>clearTimeout(y))}else k(s);i.isOverTarget=!1}},p=s=>{k(s)};c.onDragStart=s=>{w(s.currentTarget,b(s.nativeEvent))&&k(s)}}return c},[N,d,E,J,H,k,ve,I,D,R,Q,ye]);return(0,f.useEffect)(()=>{if(!$)return;let i=L($.current);if(!i||!i.head||i.getElementById(He))return;let c=i.createElement("style");c.id=He,c.textContent=`
@layer {
[${Ne}] {
touch-action: pan-x pan-y pinch-zoom;
}
}
`.trim(),i.head.prepend(c)},[$]),(0,f.useEffect)(()=>{let i=C.current;return()=>{H||Ie(i.target??void 0);for(let c of i.disposables)c();i.disposables=[]}},[H]),{isPressed:v||je,pressProps:ee(Ue,ze,{[Ne]:!0})}}function fe(e){return e.tagName==="A"&&e.hasAttribute("href")}function pe(e,t){let{key:n,code:r}=e,a=t,l=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof j(a).HTMLInputElement&&!Re(a,n)||a instanceof j(a).HTMLTextAreaElement||a.isContentEditable)&&!((l==="link"||!l&&fe(a))&&n!=="Enter")}function K(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function Mt(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!fe(e)}function De(e,t){return e instanceof HTMLInputElement?!Re(e,t):Mt(e)}var Kt=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Re(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":Kt.has(e.type)}export{tt as A,x as C,z as D,_ as E,Z as F,Je as I,me as L,V as M,L as N,ee as O,j as P,T as R,ne as S,at as T,ie as _,Ce as a,he as b,Ae as c,Se as d,Le as f,M as g,dt as h,ht as i,b as j,w as k,Et as l,we as m,de as n,ue as o,Pe as p,le as r,Ke as s,At as t,ke as u,ct as v,re as w,be as x,Ee as y,A as z};
import{d as b,n as i,p as g}from"./useEvent-DO6uJBas.js";import{Sn as k,br as v,it as y,m as p,w as F,wr as x}from"./cells-BpZ7g6ok.js";import{t as D}from"./compiler-runtime-DeeZ7FnK.js";import{d as H}from"./hotkeys-BHHWjLlp.js";import{o as S}from"./dist-ChS0Dc_R.js";import{r as V}from"./requests-BsVD4CdD.js";var u=D();const w=g(!1);function _(){let r=(0,u.c)(2),n=d(),t;return r[0]===n?t=r[1]:(t=()=>n(x(p())),r[0]=n,r[1]=t),i(t)}function j(r){let n=(0,u.c)(3),t=d(),e;return n[0]!==r||n[1]!==t?(e=()=>{r!==void 0&&t([r])},n[0]=r,n[1]=t,n[2]=e):e=n[2],i(e)}function q(){let r=(0,u.c)(2),n=d(),t;return r[0]===n?t=r[1]:(t=()=>n(v(p())),r[0]=n,r[1]=t),i(t)}function d(){let r=(0,u.c)(4),{prepareForRun:n}=F(),{sendRun:t}=V(),e=b(w),o;return r[0]!==n||r[1]!==t||r[2]!==e?(o=async s=>{if(s.length===0)return;let c=p();return e(!0),I({cellIds:s,sendRun:t,prepareForRun:n,notebook:c})},r[0]=n,r[1]=t,r[2]=e,r[3]=o):o=r[3],i(o)}async function I({cellIds:r,sendRun:n,prepareForRun:t,notebook:e}){var m,R,h;if(r.length===0)return;let{cellHandles:o,cellData:s}=e,c=[];for(let a of r){let l=(R=(m=o[a])==null?void 0:m.current)==null?void 0:R.editorView,f;l?(k(l)!=="markdown"&&S(l),f=y(l)):f=((h=s[a])==null?void 0:h.code)||"",c.push(f),t({cellId:a})}await n({cellIds:r,codes:c}).catch(a=>{H.error(a)})}export{d as a,j as i,I as n,_ as o,q as r,w as t};
import{s as n}from"./chunk-LvLJmgfZ.js";import{n as p}from"./useEvent-DO6uJBas.js";import{f as d,it as f,w as u}from"./cells-BpZ7g6ok.js";import{t as c}from"./compiler-runtime-DeeZ7FnK.js";import{t as C}from"./jsx-runtime-ZmTK25f3.js";import{t as h}from"./use-toast-rmUWldD_.js";import{r as v}from"./useDeleteCell-5uYlTcQZ.js";var x=c(),b=n(C(),1);function j(){let t=(0,x.c)(3),{splitCell:o,undoSplitCell:r}=u(),i;return t[0]!==o||t[1]!==r?(i=s=>{let l=d(s.cellId);if(!l)return;let a=f(l);o(s);let{dismiss:e}=h({title:"Cell split",action:(0,b.jsx)(v,{"data-testid":"undo-split-button",size:"sm",variant:"outline",onClick:()=>{r({...s,snapshot:a}),m()},children:"Undo"})}),m=e},t[0]=o,t[1]=r,t[2]=i):i=t[2],p(i)}export{j as t};
import{i as o,p as d,u as h}from"./useEvent-DO6uJBas.js";import{t as f}from"./compiler-runtime-DeeZ7FnK.js";import{_ as k,t as y}from"./utils-DXvhzCGS.js";var b=f();const g=["light","dark","system"];var p=d(t=>{if(y()){if(document.body.classList.contains("dark-mode")||document.body.classList.contains("dark")||document.body.dataset.theme==="dark"||document.body.dataset.mode==="dark"||s()==="dark")return"dark";let e=window.getComputedStyle(document.body),r=e.getPropertyValue("color-scheme").trim();if(r)return r.includes("dark")?"dark":"light";let a=e.getPropertyValue("background-color").match(/\d+/g);if(a){let[m,u,l]=a.map(Number);return(m*299+u*587+l*114)/1e3<128?"dark":"light"}return"light"}return t(k).display.theme}),n=d(!1);function v(){if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia("(prefers-color-scheme: dark)");o.set(n,t.matches),t.addEventListener("change",e=>{o.set(n,e.matches)})}v();function s(){switch(document.body.dataset.vscodeThemeKind){case"vscode-dark":return"dark";case"vscode-high-contrast":return"dark";case"vscode-light":return"light"}}var i=d(s());function w(){let t=new MutationObserver(()=>{let e=s();o.set(i,e)});return t.observe(document.body,{attributes:!0,attributeFilter:["data-vscode-theme-kind"]}),()=>t.disconnect()}w();const c=d(t=>{let e=t(p),r=t(i);if(r!==void 0)return r;let a=t(n);return e==="system"?a?"dark":"light":e});function L(){let t=(0,b.c)(3),e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={store:o},t[0]=e):e=t[0];let r=h(c,e),a;return t[1]===r?a=t[2]:(a={theme:r},t[1]=r,t[2]=a),a}export{c as n,L as r,g as t};
var it=Object.defineProperty;var ot=(t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var a=(t,e,n)=>ot(t,typeof e!="symbol"?e+"":e,n);var M;import{s as ce}from"./chunk-LvLJmgfZ.js";import{i as Q,l as D,o as lt,p as q,u as ut}from"./useEvent-DO6uJBas.js";import{t as ct}from"./react-BGmjiNul.js";import{Wr as dt,Xr as ft,b as mt,ni as z,ti as pt,y as ht}from"./cells-BpZ7g6ok.js";import{B as gt,C as de,D as yt,I as bt,N as wt,P as O,R as fe,k as W,w as me}from"./zod-Cg4WLWh2.js";import{t as pe}from"./compiler-runtime-DeeZ7FnK.js";import{t as vt}from"./get-6uJrSKbw.js";import{t as xt}from"./assertNever-CBU83Y6o.js";import{t as Et}from"./debounce-B3mjKxHe.js";import{t as _t}from"./_baseSet-5Rdwpmr3.js";import{d as E,p as y}from"./hotkeys-BHHWjLlp.js";import{t as Ct}from"./invariant-CAG_dYON.js";import{S as kt}from"./utils-DXvhzCGS.js";import{j as Ft}from"./config-CIrPQIbt.js";import{a as Rt}from"./switch-8sn_4qbh.js";import{n as he}from"./globals-DKH14XH0.js";import{t as ge}from"./ErrorBoundary-ChCiwl15.js";import{t as Nt}from"./jsx-runtime-ZmTK25f3.js";import{t as St}from"./button-YC1gW_kJ.js";import{t as qt}from"./cn-BKtXLv3a.js";import{Z as Pt}from"./JsonOutput-CknFTI_u.js";import{t as jt}from"./createReducer-Dnna-AUO.js";import{t as ye}from"./requests-BsVD4CdD.js";import{t as be}from"./createLucideIcon-CnW3RofX.js";import{h as Mt}from"./select-V5IdpNiR.js";import{a as At,l as Tt,r as It}from"./markdown-renderer-DhMlG2dP.js";import{t as Lt}from"./DeferredRequestRegistry-CO2AyNfd.js";import{t as K}from"./Deferred-CrO5-0RA.js";import{t as we}from"./uuid-DercMavo.js";import{t as Ut}from"./use-toast-rmUWldD_.js";import{t as ve}from"./tooltip-CEc2ajau.js";import{t as xe}from"./mode-DX8pdI-l.js";import{n as zt,r as Ot,t as Wt}from"./share-CbPtIlnM.js";import{r as Dt,t as Ht}from"./react-resizable-panels.browser.esm-Ctj_10o2.js";import{t as Ee}from"./toggle-jWKnIArU.js";function Bt(t,e,n){return t==null?t:_t(t,e,n)}var H=Bt,Vt=be("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]),Xt=be("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);function $t(t){return{all:t||(t=new Map),on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(s){s(n)}),(r=t.get("*"))&&r.slice().map(function(s){s(e,n)})}}}var u=ce(ct(),1),Z=(0,u.createContext)(null),Yt=t=>{let{controller:e}=(0,u.useContext)(Z),n=u.useRef(Symbol("fill"));return(0,u.useEffect)(()=>(e.mount({name:t.name,ref:n.current,children:t.children}),()=>{e.unmount({name:t.name,ref:n.current})}),[]),(0,u.useEffect)(()=>{e.update({name:t.name,ref:n.current,children:t.children})}),null},Gt=Object.defineProperty,Qt=(t,e,n)=>e in t?Gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_e=(t,e,n)=>(Qt(t,typeof e=="symbol"?e:e+"",n),n),Ce=console,Kt=class{constructor(t){_e(this,"_bus"),_e(this,"_db"),this._bus=t,this.handleFillMount=this.handleFillMount.bind(this),this.handleFillUpdated=this.handleFillUpdated.bind(this),this.handleFillUnmount=this.handleFillUnmount.bind(this),this._db={byName:new Map,byFill:new Map}}mount(){this._bus.on("fill-mount",this.handleFillMount),this._bus.on("fill-updated",this.handleFillUpdated),this._bus.on("fill-unmount",this.handleFillUnmount)}unmount(){this._bus.off("fill-mount",this.handleFillMount),this._bus.off("fill-updated",this.handleFillUpdated),this._bus.off("fill-unmount",this.handleFillUnmount)}handleFillMount({fill:t}){let e=u.Children.toArray(t.children),n=t.name,r={fill:t,children:e,name:n},s=this._db.byName.get(n);s?(s.components.push(r),s.listeners.forEach(i=>i([...s.components]))):this._db.byName.set(n,{listeners:[],components:[r]}),this._db.byFill.set(t.ref,r)}handleFillUpdated({fill:t}){let e=this._db.byFill.get(t.ref),n=u.Children.toArray(t.children);if(e){e.children=n;let r=this._db.byName.get(e.name);if(r)r.listeners.forEach(s=>s([...r.components]));else throw Error("registration was expected to be defined")}else{Ce.error("[handleFillUpdated] component was expected to be defined");return}}handleFillUnmount({fill:t}){let e=this._db.byFill.get(t.ref);if(!e){Ce.error("[handleFillUnmount] component was expected to be defined");return}let n=e.name,r=this._db.byName.get(n);if(!r)throw Error("registration was expected to be defined");r.components=r.components.filter(s=>s!==e),this._db.byFill.delete(t.ref),r.listeners.length===0&&r.components.length===0?this._db.byName.delete(n):r.listeners.forEach(s=>s([...r.components]))}onComponentsChange(t,e){let n=this._db.byName.get(t);n?(n.listeners.push(e),e(n.components)):(this._db.byName.set(t,{listeners:[e],components:[]}),e([]))}getFillsByName(t){let e=this._db.byName.get(t);return e?e.components.map(n=>n.fill):[]}getChildrenByName(t){let e=this._db.byName.get(t);return e?e.components.map(n=>n.children).reduce((n,r)=>n.concat(r),[]):[]}removeOnComponentsChange(t,e){let n=this._db.byName.get(t);if(!n)throw Error("expected registration to be defined");let r=n.listeners;r.splice(r.indexOf(e),1)}},Zt=Object.defineProperty,Jt=(t,e,n)=>e in t?Zt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,en=(t,e,n)=>(Jt(t,typeof e=="symbol"?e:e+"",n),n),ke=class{constructor(){en(this,"bus",$t())}mount(t){this.bus.emit("fill-mount",{fill:t})}unmount(t){this.bus.emit("fill-unmount",{fill:t})}update(t){this.bus.emit("fill-updated",{fill:t})}};function tn(t){let e=t||new ke;return{controller:e,manager:new Kt(e.bus)}}var nn=({controller:t,children:e})=>{let[n]=u.useState(()=>{let r=tn(t);return r.manager.mount(),r});return u.useEffect(()=>()=>{n.manager.unmount()},[]),u.createElement(Z.Provider,{value:n},e)};function J(t,e){let[n,r]=(0,u.useState)([]),{manager:s}=(0,u.useContext)(Z);return(0,u.useEffect)(()=>(s.onComponentsChange(t,r),()=>{s.removeOnComponentsChange(t,r)}),[t]),n.flatMap((i,d)=>{let{children:l}=i;return l.map((p,b)=>{if(typeof p=="number"||typeof p=="string")throw Error("Only element children will work here");return u.cloneElement(p,{key:d.toString()+b.toString(),...e})})})}var Fe=t=>{let e=J(t.name,t.childProps);if(typeof t.children=="function"){let n=t.children(e);if(u.isValidElement(n)||n===null)return n;throw Error("Slot rendered with function must return a valid React Element.")}return e};const rn=q(null);var{valueAtom:sn,useActions:an}=jt(()=>({banners:[]}),{addBanner:(t,e)=>({...t,banners:[...t.banners,{...e,id:we()}]}),removeBanner:(t,e)=>({...t,banners:t.banners.filter(n=>n.id!==e)}),clearBanners:t=>({...t,banners:[]})});const on=()=>ut(sn);function ln(){return an()}const un=new ke,B={SIDEBAR:"sidebar",CONTEXT_AWARE_PANEL:"context-aware-panel"};var cn=class{constructor(){a(this,"subscriptions",new Map)}addSubscription(t,e){var n;this.subscriptions.has(t)||this.subscriptions.set(t,new Set),(n=this.subscriptions.get(t))==null||n.add(e)}removeSubscription(t,e){var n;(n=this.subscriptions.get(t))==null||n.delete(e)}notify(t,e){for(let n of this.subscriptions.get(t)??[])n(e)}},Re=class ue{constructor(e){a(this,"subscriptions",new cn);this.producer=e}static withProducerCallback(e){return new ue(e)}static empty(){return new ue}startProducer(){this.producer&&this.producer(e=>{this.subscriptions.notify("message",e)})}connect(){return new Promise(e=>setTimeout(e,0)).then(()=>{this.subscriptions.notify("open",new Event("open"))})}get readyState(){return WebSocket.OPEN}reconnect(e,n){this.close(),this.connect()}close(){this.subscriptions.notify("close",new Event("close"))}send(e){return this.subscriptions.notify("message",new MessageEvent("message",{data:e})),Promise.resolve()}addEventListener(e,n){this.subscriptions.addSubscription(e,n),e==="open"&&n(new Event("open")),e==="message"&&this.startProducer()}removeEventListener(e,n){this.subscriptions.removeSubscription(e,n)}},dn=1e10,fn=1e3;function V(t,e){let n=t.map(r=>`"${r}"`).join(", ");return Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${n}`)}function mn(t={}){let e={};function n(o){e=o}let r={};function s(o){var f;r.unregisterHandler&&r.unregisterHandler(),r=o,(f=r.registerHandler)==null||f.call(r,U)}let i;function d(o){if(typeof o=="function"){i=o;return}i=(f,g)=>{let c=o[f];if(c)return c(g);let h=o._;if(!h)throw Error(`The requested method has no handler: ${f}`);return h(f,g)}}let{maxRequestTime:l=fn}=t;t.transport&&s(t.transport),t.requestHandler&&d(t.requestHandler),t._debugHooks&&n(t._debugHooks);let p=0;function b(){return p<=dn?++p:p=0}let x=new Map,w=new Map;function _(o,...f){let g=f[0];return new Promise((c,h)=>{var T;if(!r.send)throw V(["send"],"make requests");let S=b(),j={type:"request",id:S,method:o,params:g};x.set(S,{resolve:c,reject:h}),l!==1/0&&w.set(S,setTimeout(()=>{w.delete(S),h(Error("RPC request timed out."))},l)),(T=e.onSend)==null||T.call(e,j),r.send(j)})}let R=new Proxy(_,{get:(o,f,g)=>f in o?Reflect.get(o,f,g):c=>_(f,c)}),C=R;function k(o,...f){var h;let g=f[0];if(!r.send)throw V(["send"],"send messages");let c={type:"message",id:o,payload:g};(h=e.onSend)==null||h.call(e,c),r.send(c)}let F=new Proxy(k,{get:(o,f,g)=>f in o?Reflect.get(o,f,g):c=>k(f,c)}),v=F,N=new Map,P=new Set;function A(o,f){var g;if(!r.registerHandler)throw V(["registerHandler"],"register message listeners");if(o==="*"){P.add(f);return}N.has(o)||N.set(o,new Set),(g=N.get(o))==null||g.add(f)}function L(o,f){var g,c;if(o==="*"){P.delete(f);return}(g=N.get(o))==null||g.delete(f),((c=N.get(o))==null?void 0:c.size)===0&&N.delete(o)}async function U(o){var f,g;if((f=e.onReceive)==null||f.call(e,o),!("type"in o))throw Error("Message does not contain a type.");if(o.type==="request"){if(!r.send||!i)throw V(["send","requestHandler"],"handle requests");let{id:c,method:h,params:S}=o,j;try{j={type:"response",id:c,success:!0,payload:await i(h,S)}}catch(T){if(!(T instanceof Error))throw T;j={type:"response",id:c,success:!1,error:T.message}}(g=e.onSend)==null||g.call(e,j),r.send(j);return}if(o.type==="response"){let c=w.get(o.id);c!=null&&clearTimeout(c);let{resolve:h,reject:S}=x.get(o.id)??{};o.success?h==null||h(o.payload):S==null||S(Error(o.error));return}if(o.type==="message"){for(let h of P)h(o.id,o.payload);let c=N.get(o.id);if(!c)return;for(let h of c)h(o.payload);return}throw Error(`Unexpected RPC message type: ${o.type}`)}return{setTransport:s,setRequestHandler:d,request:R,requestProxy:C,send:F,sendProxy:v,addMessageListener:A,removeMessageListener:L,proxy:{send:v,request:C},_setDebugHooks:n}}function pn(t){return mn(t)}var Ne="[transport-id]";function hn(t,e){let{transportId:n}=e;return n==null?t:{[Ne]:n,data:t}}function gn(t,e){let{transportId:n,filter:r}=e,s=r==null?void 0:r();if(n!=null&&s!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let i=t;if(n){if(t[Ne]!==n)return[!0];i=t.data}return s===!1?[!0]:[!1,i]}function yn(t,e={}){let{transportId:n,filter:r,remotePort:s}=e,i=t,d=s??t,l;return{send(p){d.postMessage(hn(p,{transportId:n}))},registerHandler(p){l=b=>{let x=b.data,[w,_]=gn(x,{transportId:n,filter:()=>r==null?void 0:r(b)});w||p(_)},i.addEventListener("message",l)},unregisterHandler(){l&&i.removeEventListener("message",l)}}}function bn(t,e){return yn(t,e)}function Se(t){return pn({transport:bn(t,{transportId:"marimo-transport"}),maxRequestTime:2e4,_debugHooks:{onSend:e=>{E.debug("[rpc] Parent -> Worker",e)},onReceive:e=>{E.debug("[rpc] Worker -> Parent",e)}}})}const qe=q("Initializing..."),wn=q(t=>{let e=t(ht),n=Object.values(e.cellRuntime);return n.some(r=>!Tt(r.output))?!0:n.every(r=>r.status==="idle")});var Pe=zt(),je="marimo:file",Me=new dt(null);const vn={saveFile(t){Me.set(je,t)},readFile(){return Me.get(je)}};var xn={saveFile(t){z.setCodeForHash((0,Pe.compressToEncodedURIComponent)(t))},readFile(){let t=z.getCodeFromHash()||z.getCodeFromSearchParam();return t?(0,Pe.decompressFromEncodedURIComponent)(t):null}};const En={saveFile(t){},readFile(){let t=document.querySelector("marimo-code");return t?decodeURIComponent(t.textContent||"").trim():null}};var _n={saveFile(t){},readFile(){if(window.location.hostname!=="marimo.app")return null;let t=new URL("files/wasm-intro.py",document.baseURI);return fetch(t.toString()).then(e=>e.ok?e.text():null).catch(()=>null)}},Cn={saveFile(t){},readFile(){return["import marimo","app = marimo.App()","","@app.cell","def __():"," return","",'if __name__ == "__main__":'," app.run()"].join(`
`)}},Ae=class{constructor(t){this.stores=t}insert(t,e){this.stores.splice(t,0,e)}saveFile(t){this.stores.forEach(e=>e.saveFile(t))}readFile(){for(let t of this.stores){let e=t.readFile();if(e)return e}return null}};const X=new Ae([En,xn]),ee=new Ae([vn,_n,Cn]);var Te=class st{constructor(){a(this,"initialized",new K);a(this,"sendRename",async({filename:e})=>(e===null||(z.setFilename(e),await this.rpc.proxy.request.bridge({functionName:"rename_file",payload:e})),null));a(this,"sendSave",async e=>{if(!this.saveRpc)return E.warn("Save RPC not initialized"),null;await this.saveRpc.saveNotebook(e);let n=await this.readCode();return n.contents&&(X.saveFile(n.contents),ee.saveFile(n.contents)),this.rpc.proxy.request.saveNotebook(e).catch(r=>{E.error(r)}),null});a(this,"sendCopy",async()=>{y()});a(this,"sendStdin",async e=>(await this.rpc.proxy.request.bridge({functionName:"put_input",payload:e.text}),null));a(this,"sendPdb",async()=>{y()});a(this,"sendRun",async e=>(await this.rpc.proxy.request.loadPackages(e.codes.join(`
`)),await this.putControlRequest({type:"execute-cells",...e}),null));a(this,"sendRunScratchpad",async e=>(await this.rpc.proxy.request.loadPackages(e.code),await this.putControlRequest({type:"execute-scratchpad",...e}),null));a(this,"sendInterrupt",async()=>(this.interruptBuffer!==void 0&&(this.interruptBuffer[0]=2),null));a(this,"sendShutdown",async()=>(window.close(),null));a(this,"sendFormat",async e=>await this.rpc.proxy.request.bridge({functionName:"format",payload:e}));a(this,"sendDeleteCell",async e=>(await this.putControlRequest({type:"delete-cell",...e}),null));a(this,"sendInstallMissingPackages",async e=>(this.putControlRequest({type:"install-packages",...e}),null));a(this,"sendCodeCompletionRequest",async e=>(Q.get(mt)||await this.rpc.proxy.request.bridge({functionName:"code_complete",payload:e}),null));a(this,"saveUserConfig",async e=>(await this.rpc.proxy.request.bridge({functionName:"save_user_config",payload:e}),Rt.post("/kernel/save_user_config",e,{baseUrl:"/"}).catch(n=>(E.error(n),null))));a(this,"saveAppConfig",async e=>(await this.rpc.proxy.request.bridge({functionName:"save_app_config",payload:e}),null));a(this,"saveCellConfig",async e=>(await this.putControlRequest({type:"update-cell-config",...e}),null));a(this,"sendRestart",async()=>{let e=await this.readCode();return e.contents&&(X.saveFile(e.contents),ee.saveFile(e.contents)),Ot(),null});a(this,"readCode",async()=>this.saveRpc?{contents:await this.saveRpc.readNotebook()}:(E.warn("Save RPC not initialized"),{contents:""}));a(this,"readSnippets",async()=>await this.rpc.proxy.request.bridge({functionName:"read_snippets",payload:void 0}));a(this,"openFile",async({path:e})=>{let n=Wt({code:null,baseUrl:window.location.origin});return window.open(n,"_blank"),null});a(this,"sendListFiles",async e=>await this.rpc.proxy.request.bridge({functionName:"list_files",payload:e}));a(this,"sendSearchFiles",async e=>await this.rpc.proxy.request.bridge({functionName:"search_files",payload:e}));a(this,"sendComponentValues",async e=>(await this.putControlRequest({type:"update-ui-element",...e,token:we()}),null));a(this,"sendInstantiate",async e=>null);a(this,"sendFunctionRequest",async e=>(await this.putControlRequest({type:"invoke-function",...e}),null));a(this,"sendCreateFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"create_file_or_directory",payload:e}));a(this,"sendDeleteFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"delete_file_or_directory",payload:e}));a(this,"sendRenameFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"move_file_or_directory",payload:e}));a(this,"sendUpdateFile",async e=>await this.rpc.proxy.request.bridge({functionName:"update_file",payload:e}));a(this,"sendFileDetails",async e=>await this.rpc.proxy.request.bridge({functionName:"file_details",payload:e}));a(this,"exportAsHTML",async e=>await this.rpc.proxy.request.bridge({functionName:"export_html",payload:e}));a(this,"exportAsMarkdown",async e=>await this.rpc.proxy.request.bridge({functionName:"export_markdown",payload:e}));a(this,"previewDatasetColumn",async e=>(await this.putControlRequest({type:"preview-dataset-column",...e}),null));a(this,"previewSQLTable",async e=>(await this.putControlRequest({type:"preview-sql-table",...e}),null));a(this,"previewSQLTableList",async e=>(await this.putControlRequest({type:"list-sql-tables",...e}),null));a(this,"previewDataSourceConnection",async e=>(await this.putControlRequest({type:"list-data-source-connection",...e}),null));a(this,"validateSQL",async e=>(await this.putControlRequest({type:"validate-sql",...e}),null));a(this,"sendModelValue",async e=>(await this.putControlRequest({type:"update-widget-model",...e}),null));a(this,"syncCellIds",()=>Promise.resolve(null));a(this,"addPackage",async e=>this.rpc.proxy.request.addPackage(e));a(this,"removePackage",async e=>this.rpc.proxy.request.removePackage(e));a(this,"getPackageList",async()=>await this.rpc.proxy.request.listPackages());a(this,"getDependencyTree",async()=>({tree:{dependencies:[],name:"",tags:[],version:null}}));a(this,"listSecretKeys",async e=>(await this.putControlRequest({type:"list-secret-keys",...e}),null));a(this,"getUsageStats",y);a(this,"openTutorial",y);a(this,"getRecentFiles",y);a(this,"getWorkspaceFiles",y);a(this,"getRunningNotebooks",y);a(this,"shutdownSession",y);a(this,"exportAsPDF",y);a(this,"autoExportAsHTML",y);a(this,"autoExportAsMarkdown",y);a(this,"autoExportAsIPYNB",y);a(this,"updateCellOutputs",y);a(this,"writeSecret",y);a(this,"invokeAiTool",y);a(this,"clearCache",y);a(this,"getCacheInfo",y);Ft()&&(this.rpc=Se(new Worker(new URL(""+new URL("worker-CUL1lW-N.js",import.meta.url).href,""+import.meta.url),{type:"module",name:he()})),this.rpc.addMessageListener("ready",()=>{this.startSession()}),this.rpc.addMessageListener("initialized",()=>{this.saveRpc=this.getSaveWorker(),this.setInterruptBuffer(),this.initialized.resolve()}),this.rpc.addMessageListener("initializingMessage",({message:e})=>{Q.set(qe,e)}),this.rpc.addMessageListener("initializedError",({error:e})=>{this.initialized.status==="resolved"&&(E.error(e),Ut({title:"Error initializing",description:e,variant:"danger"})),this.initialized.reject(Error(e))}),this.rpc.addMessageListener("kernelMessage",({message:e})=>{var n;(n=this.messageConsumer)==null||n.call(this,new MessageEvent("message",{data:e}))}))}static get INSTANCE(){let e="_marimo_private_PyodideBridge";return window[e]||(window[e]=new st),window[e]}getSaveWorker(){return xe()==="read"?(E.debug("Skipping SaveWorker in read-mode"),{readFile:y,readNotebook:y,saveNotebook:y}):Se(new Worker(new URL(""+new URL("save-worker-DtF6B3PS.js",import.meta.url).href,""+import.meta.url),{type:"module",name:he()})).proxy.request}async startSession(){let e=await X.readFile(),n=await ee.readFile(),r=z.getFilename(),s=Q.get(kt),i={},d=new URLSearchParams(window.location.search);for(let l of d.keys()){let p=d.getAll(l);i[l]=p.length===1?p[0]:p}await this.rpc.proxy.request.startSession({queryParameters:i,code:e||n||"",filename:r,userConfig:{...s,runtime:{...s.runtime,auto_instantiate:xe()==="read"?!0:s.runtime.auto_instantiate}}})}setInterruptBuffer(){crossOriginIsolated?(this.interruptBuffer=new Uint8Array(new SharedArrayBuffer(1)),this.rpc.proxy.request.setInterruptBuffer(this.interruptBuffer)):E.warn("Not running in a secure context; interrupts are not available.")}attachMessageConsumer(e){this.messageConsumer=e,this.rpc.proxy.send.consumerReady({})}async putControlRequest(e){await this.rpc.proxy.request.bridge({functionName:"put_control_request",payload:e})}};function kn(){return Re.withProducerCallback(t=>{Te.INSTANCE.attachMessageConsumer(t)})}const Ie=q({isInstantiated:!1,error:null});function Fn(){return lt(Ie,t=>t.isInstantiated)}function $(t){return()=>({TYPE:t,is(e){return e.type===t},create(e){return new CustomEvent(t,e)}})}const Le=$("marimo-value-input")(),Ue=$("marimo-value-update")(),ze=$("marimo-value-ready")(),Oe=$("marimo-incoming-message")();function Rn(t,e){return Le.create({bubbles:!0,composed:!0,detail:{value:t,element:e}})}var We=class at{static get INSTANCE(){let e="_marimo_private_UIElementRegistry";return window[e]||(window[e]=new at),window[e]}constructor(){this.entries=new Map}has(e){return this.entries.has(e)}set(e,n){if(this.entries.has(e))throw Error(`UIElement ${e} already registered`);this.entries.set(e,{objectId:e,value:n,elements:new Set})}registerInstance(e,n){let r=this.entries.get(e);r===void 0?this.entries.set(e,{objectId:e,value:pt(n,this),elements:new Set([n])}):r.elements.add(n)}removeInstance(e,n){let r=this.entries.get(e);r!=null&&r.elements.has(n)&&r.elements.delete(n)}removeElementsByCell(e){[...this.entries.keys()].filter(n=>n.startsWith(`${e}-`)).forEach(n=>{this.entries.delete(n)})}lookupValue(e){let n=this.entries.get(e);return n===void 0?void 0:n.value}broadcastMessage(e,n,r){let s=this.entries.get(e);s===void 0?E.warn("UIElementRegistry missing entry",e):s.elements.forEach(i=>{i.dispatchEvent(Oe.create({bubbles:!1,composed:!0,detail:{objectId:e,message:n,buffers:r}}))})}broadcastValueUpdate(e,n,r){let s=this.entries.get(n);s===void 0?E.warn("UIElementRegistry missing entry",n):(s.value=r,s.elements.forEach(i=>{i!==e&&i.dispatchEvent(Ue.create({bubbles:!1,composed:!0,detail:{value:r,element:i}}))}),document.dispatchEvent(ze.create({bubbles:!0,composed:!0,detail:{objectId:n}})))}};const Nn=We.INSTANCE,Sn=new Lt("function-call-result",async(t,e)=>{await ye().sendFunctionRequest({functionCallId:t,...e})}),qn="68px";var Pn="288px";const jn=t=>t?/^\d+$/.test(t)?`${t}px`:t:Pn,Mn=ft({isOpen:!0},(t,e)=>{if(!e)return t;switch(e.type){case"toggle":return{...t,isOpen:e.isOpen??t.isOpen};case"setWidth":return{...t,width:e.width};default:return t}});function te(t,e=[]){let n=[];if(t instanceof DataView)n.push(e);else if(Array.isArray(t))for(let[r,s]of t.entries())n.push(...te(s,[...e,r]));else if(typeof t=="object"&&t)for(let[r,s]of Object.entries(t))n.push(...te(s,[...e,r]));return n}function ne(t){let e=te(t);if(e.length===0)return{state:t,buffers:[],bufferPaths:[]};let n=structuredClone(t),r=[],s=[];for(let i of e){let d=vt(t,i);if(d instanceof DataView){let l=At(d);r.push(l),s.push(i),H(n,i,l)}}return{state:n,buffers:r,bufferPaths:s}}function An(t){return typeof t=="object"&&!!t&&"state"in t&&"bufferPaths"in t&&"buffers"in t}function Y(t){let{state:e,bufferPaths:n,buffers:r}=t;if(!n||n.length===0)return e;r&&Ct(r.length===n.length,"Buffers and buffer paths not the same length");let s=structuredClone(e);for(let[i,d]of n.entries()){let l=r==null?void 0:r[i];if(l==null){E.warn("[anywidget] Could not find buffer at path",d);continue}typeof l=="string"?H(s,d,It(l)):H(s,d,l)}return s}const De=new class{constructor(t=1e4){a(this,"models",new Map);this.timeout=t}get(t){let e=this.models.get(t);return e||(e=new K,this.models.set(t,e),setTimeout(()=>{e.status==="pending"&&(e.reject(Error(`Model not found for key: ${t}`)),this.models.delete(t))},this.timeout)),e.promise}set(t,e){let n=this.models.get(t);n||(n=new K,this.models.set(t,n)),n.resolve(e)}delete(t){this.models.delete(t)}};var He=(M=class{constructor(e,n,r,s){a(this,"ANY_CHANGE_EVENT","change");a(this,"listeners",{});a(this,"widget_manager",{async get_model(e){let n=await M._modelManager.get(e);if(!n)throw Error(`Model not found with id: ${e}. This is likely because the model was not registered.`);return n}});a(this,"emitAnyChange",Et(()=>{var e;(e=this.listeners[this.ANY_CHANGE_EVENT])==null||e.forEach(n=>n())},0));this.data=e,this.onChange=n,this.sendToWidget=r,this.dirtyFields=new Map([...s].map(i=>[i,this.data[i]]))}off(e,n){var r;if(!e){this.listeners={};return}if(!n){this.listeners[e]=new Set;return}(r=this.listeners[e])==null||r.delete(n)}send(e,n,r){let{state:s,bufferPaths:i,buffers:d}=ne(e);this.sendToWidget({content:{state:s,bufferPaths:i},buffers:d}).then(n)}get(e){return this.data[e]}set(e,n){this.data={...this.data,[e]:n},this.dirtyFields.set(e,n),this.emit(`change:${e}`,n),this.emitAnyChange()}save_changes(){if(this.dirtyFields.size===0)return;let e=Object.fromEntries(this.dirtyFields.entries());this.dirtyFields.clear(),this.onChange(e)}updateAndEmitDiffs(e){e!=null&&Object.keys(e).forEach(n=>{let r=n;this.data[r]!==e[r]&&this.set(r,e[r])})}receiveCustomMessage(e,n=[]){var s;let r=Be.safeParse(e);if(r.success){let i=r.data;switch(i.method){case"update":this.updateAndEmitDiffs(Y({state:i.state,bufferPaths:i.buffer_paths??[],buffers:n}));break;case"custom":(s=this.listeners["msg:custom"])==null||s.forEach(d=>d(i.content,n));break;case"open":this.updateAndEmitDiffs(Y({state:i.state,bufferPaths:i.buffer_paths??[],buffers:n}));break;case"echo_update":break;default:E.error("[anywidget] Unknown message method",i.method);break}}else E.error("Failed to parse message",r.error),E.error("Message",e)}on(e,n){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(n)}emit(e,n){this.listeners[e]&&this.listeners[e].forEach(r=>r(n))}},a(M,"_modelManager",De),M),re=me(me(gt([fe(),wt()]))),se=bt(fe(),de()),Be=yt("method",[O({method:W("open"),state:se,buffer_paths:re.optional()}),O({method:W("update"),state:se,buffer_paths:re.optional()}),O({method:W("custom"),content:de()}),O({method:W("echo_update"),buffer_paths:re,state:se}),O({method:W("close")})]);function Tn(t){return t==null?!1:Be.safeParse(t).success}async function In({modelId:t,msg:e,buffers:n,modelManager:r}){if(e.method==="echo_update")return;if(e.method==="custom"){(await r.get(t)).receiveCustomMessage(e,n);return}if(e.method==="close"){r.delete(t);return}let{method:s,state:i,buffer_paths:d=[]}=e,l=Y({state:i,bufferPaths:d,buffers:n});if(s==="open"){let p=new He(l,b=>{let{state:x,buffers:w,bufferPaths:_}=ne(b);ye().sendModelValue({modelId:t,message:{state:x,bufferPaths:_},buffers:w})},y,new Set);r.set(t,p);return}if(s==="update"){(await r.get(t)).updateAndEmitDiffs(l);return}xt(s)}const Ve=q(null),Ln=q(null),Xe=q(!1),Un=q(!1),$e=q(!1);var zn=pe();const Ye=t=>{let e=(0,zn.c)(8),{onResize:n,startingWidth:r,minWidth:s,maxWidth:i}=t,d=(0,u.useRef)(null),l=(0,u.useRef)(null),p=(0,u.useRef)(null),b,x;e[0]!==i||e[1]!==s||e[2]!==n?(b=()=>{let C=d.current,k=l.current,F=p.current;if(!C||!k&&!F)return;let v=Number.parseInt(window.getComputedStyle(C).width,10),N=0,P=!1,A=null,L=c=>{if(!C||!P||!A)return;let h=c.clientX-N;N=c.clientX,v=A==="left"?v-h:v+h,s&&(v=Math.max(s,v)),i&&(v=Math.min(i,v)),C.style.width=`${v}px`},U=()=>{P&&(n==null||n(v),P=!1,A=null),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",U)},o=(c,h)=>{c.preventDefault(),P=!0,A=h,N=c.clientX,document.addEventListener("mousemove",L),document.addEventListener("mouseup",U)},f=c=>o(c,"left"),g=c=>o(c,"right");return k&&k.addEventListener("mousedown",f),F&&F.addEventListener("mousedown",g),()=>{k&&k.removeEventListener("mousedown",f),F&&F.removeEventListener("mousedown",g),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",U)}},x=[s,i,n],e[0]=i,e[1]=s,e[2]=n,e[3]=b,e[4]=x):(b=e[3],x=e[4]),(0,u.useEffect)(b,x);let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w={left:l,right:p},e[5]=w):w=e[5];let _=r==="contentWidth"?"var(--content-width-medium)":`${r}px`,R;return e[6]===_?R=e[7]:(R={resizableDivRef:d,handleRefs:w,style:{width:_}},e[6]=_,e[7]=R),R};function Ge(t){t||window.dispatchEvent(new Event("resize"))}var Qe=pe(),m=ce(Nt(),1);const On=()=>{let t=(0,Qe.c)(16),[e,n]=D(Ve),[r,s]=D(Xe),[i,d]=D(Un),[l,p]=D($e),b;t[0]!==s||t[1]!==n?(b=()=>{n(null),s(!1)},t[0]=s,t[1]=n,t[2]=b):b=t[2];let x=b;if(J(B.CONTEXT_AWARE_PANEL).length===0||!e||!r)return null;let w;t[3]!==l||t[4]!==i||t[5]!==p||t[6]!==d?(w=()=>(0,m.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[(0,m.jsx)(ve,{content:i?"Unpin panel":"Pin panel",children:(0,m.jsx)(Ee,{size:"xs",onPressedChange:()=>d(!i),pressed:i,"aria-label":i?"Unpin panel":"Pin panel",children:i?(0,m.jsx)(Xt,{className:"w-4 h-4"}):(0,m.jsx)(Pt,{className:"w-4 h-4"})})}),(0,m.jsx)(ve,{content:l?(0,m.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,m.jsx)("span",{children:"Follow focused table"}),(0,m.jsx)("span",{className:"text-xs text-muted-foreground w-64",children:"The panel updates as cells that output tables are focused. Click to fix to the current cell."})]}):(0,m.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,m.jsx)("span",{children:"Focus on current table"}),(0,m.jsx)("span",{className:"text-xs text-muted-foreground w-64",children:"The panel is focused on the current table. Click to update based on which cell is focused."})]}),children:(0,m.jsx)(Ee,{size:"xs",onPressedChange:()=>p(!l),pressed:l,"aria-label":l?"Follow focused cell":"Fixed",children:(0,m.jsx)(Vt,{className:qt("w-4 h-4",l&&"text-primary")})})})]}),t[3]=l,t[4]=i,t[5]=p,t[6]=d,t[7]=w):w=t[7];let _=w,R;t[8]!==x||t[9]!==_?(R=()=>(0,m.jsxs)("div",{className:"mt-2 pb-7 mb-4 h-full overflow-auto",children:[(0,m.jsxs)("div",{className:"flex flex-row justify-between items-center mx-2",children:[_(),(0,m.jsx)(St,{variant:"linkDestructive",size:"icon",onClick:x,"aria-label":"Close selection panel",children:(0,m.jsx)(Mt,{className:"w-4 h-4"})})]}),(0,m.jsx)(ge,{children:(0,m.jsx)(Fe,{name:B.CONTEXT_AWARE_PANEL})})]}),t[8]=x,t[9]=_,t[10]=R):R=t[10];let C=R;if(!i){let v;return t[11]===C?v=t[12]:(v=(0,m.jsx)(Dn,{children:C()}),t[11]=C,t[12]=v),v}let k;t[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,m.jsx)(Dt,{onDragging:Ge,className:"resize-handle border-border z-20 print:hidden border-l"}),t[13]=k):k=t[13];let F;return t[14]===C?F=t[15]:(F=(0,m.jsxs)(m.Fragment,{children:[k,(0,m.jsx)(Ht,{defaultSize:20,minSize:15,maxSize:80,children:C()})]}),t[14]=C,t[15]=F),F},Wn=t=>{let e=(0,Qe.c)(2),{children:n}=t,r;return e[0]===n?r=e[1]:(r=(0,m.jsx)(ge,{children:(0,m.jsx)(Yt,{name:B.CONTEXT_AWARE_PANEL,children:n})}),e[0]=n,e[1]=r),r};var Dn=({children:t})=>{let{resizableDivRef:e,handleRefs:n,style:r}=Ye({startingWidth:400,minWidth:300,maxWidth:1500});return(0,m.jsxs)("div",{className:"absolute z-40 right-0 h-full bg-background flex flex-row",children:[(0,m.jsx)("div",{ref:n.left,className:"w-1 h-full cursor-col-resize border-l"}),(0,m.jsx)("div",{ref:e,style:r,children:t})]})};function Hn(){var t=[...arguments];return(0,u.useMemo)(()=>e=>{t.forEach(n=>n(e))},t)}var Ke=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function G(t){let e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function ae(t){return"nodeType"in t}function I(t){var e;return t?G(t)?t:ae(t)?((e=t.ownerDocument)==null?void 0:e.defaultView)??window:window:window}function Ze(t){let{Document:e}=I(t);return t instanceof e}function Je(t){return G(t)?!1:t instanceof I(t).HTMLElement}function et(t){return t instanceof I(t).SVGElement}function Bn(t){return t?G(t)?t.document:ae(t)?Ze(t)?t:Je(t)||et(t)?t.ownerDocument:document:document:document}var ie=Ke?u.useLayoutEffect:u.useEffect;function tt(t){let e=(0,u.useRef)(t);return ie(()=>{e.current=t}),(0,u.useCallback)(function(){var n=[...arguments];return e.current==null?void 0:e.current(...n)},[])}function Vn(){let t=(0,u.useRef)(null);return[(0,u.useCallback)((e,n)=>{t.current=setInterval(e,n)},[]),(0,u.useCallback)(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[])]}function Xn(t,e){e===void 0&&(e=[t]);let n=(0,u.useRef)(t);return ie(()=>{n.current!==t&&(n.current=t)},e),n}function $n(t,e){let n=(0,u.useRef)();return(0,u.useMemo)(()=>{let r=t(n.current);return n.current=r,r},[...e])}function Yn(t){let e=tt(t),n=(0,u.useRef)(null);return[n,(0,u.useCallback)(r=>{r!==n.current&&(e==null||e(r,n.current)),n.current=r},[])]}function Gn(t){let e=(0,u.useRef)();return(0,u.useEffect)(()=>{e.current=t},[t]),e.current}var oe={};function Qn(t,e){return(0,u.useMemo)(()=>{if(e)return e;let n=oe[t]==null?0:oe[t]+1;return oe[t]=n,t+"-"+n},[t,e])}function nt(t){return function(e){return[...arguments].slice(1).reduce((n,r)=>{let s=Object.entries(r);for(let[i,d]of s){let l=n[i];l!=null&&(n[i]=l+t*d)}return n},{...e})}}var Kn=nt(1),Zn=nt(-1);function Jn(t){return"clientX"in t&&"clientY"in t}function er(t){if(!t)return!1;let{KeyboardEvent:e}=I(t.target);return e&&t instanceof e}function tr(t){if(!t)return!1;let{TouchEvent:e}=I(t.target);return e&&t instanceof e}function nr(t){if(tr(t)){if(t.touches&&t.touches.length){let{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){let{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return Jn(t)?{x:t.clientX,y:t.clientY}:null}var le=Object.freeze({Translate:{toString(t){if(!t)return;let{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[le.Translate.toString(t),le.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),rt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function rr(t){return t.matches(rt)?t:t.querySelector(rt)}export{kn as $,Ln as A,jn as B,Qn as C,Ye as D,Ge as E,Tn as F,Oe as G,Sn as H,Y as I,Ue as J,Le as K,An as L,De as M,He as N,Xe as O,In as P,Te as Q,ne as R,Gn as S,Wn as T,We as U,Mn as V,Nn as W,Ie as X,Rn as Y,Fn as Z,Vn as _,nr as a,un as at,$n as b,Ze as c,ln as ct,ae as d,J as dt,X as et,et as f,H as ft,tt as g,Hn as h,rr as i,B as it,$e as j,Ve as k,Je as l,nn as lt,Zn as m,Kn as n,qe as nt,Bn as o,rn as ot,G as p,ze as q,Ke as r,Re as rt,I as s,on as st,le as t,wn as tt,er as u,Fe as ut,ie as v,On as w,Yn as x,Xn as y,qn as z};
import{d as k,i as x,l as z,p as o,u as C}from"./useEvent-DO6uJBas.js";import{A as n,B as D,I as j,J as I,N as d,P as h,R as t,T as l,U as J,b as r,w as _}from"./zod-Cg4WLWh2.js";import{t as N}from"./compiler-runtime-DeeZ7FnK.js";import{t as R}from"./merge-BBX6ug-N.js";import{d as f,n as S,u as U}from"./hotkeys-BHHWjLlp.js";import{t as F}from"./invariant-CAG_dYON.js";const M=["pip","uv","rye","poetry","pixi"];var $=["normal","compact","medium","full","columns"],q=["auto","native","polars","lazy-polars","pandas"];const G="openai/gpt-4o";var O=["html","markdown","ipynb"];const H=["manual","ask","agent"];var u=h({api_key:t().optional(),base_url:t().optional(),project:t().optional()}).loose(),K=h({chat_model:t().nullish(),edit_model:t().nullish(),autocomplete_model:t().nullish(),displayed_models:_(t()).default([]),custom_models:_(t()).default([])});const y=n({completion:h({activate_on_typing:l().prefault(!0),signature_hint_on_typing:l().prefault(!1),copilot:D([l(),r(["github","codeium","custom"])]).prefault(!1).transform(a=>a===!0?"github":a),codeium_api_key:t().nullish()}).prefault({}),save:n({autosave:r(["off","after_delay"]).prefault("after_delay"),autosave_delay:d().nonnegative().transform(a=>Math.max(a,1e3)).prefault(1e3),format_on_save:l().prefault(!1)}).prefault({}),formatting:n({line_length:d().nonnegative().prefault(79).transform(a=>Math.min(a,1e3))}).prefault({}),keymap:n({preset:r(["default","vim"]).prefault("default"),overrides:j(t(),t()).prefault({}),destructive_delete:l().prefault(!0)}).prefault({}),runtime:n({auto_instantiate:l().prefault(!0),on_cell_change:r(["lazy","autorun"]).prefault("autorun"),auto_reload:r(["off","lazy","autorun"]).prefault("off"),reactive_tests:l().prefault(!0),watcher_on_save:r(["lazy","autorun"]).prefault("lazy"),default_sql_output:r(q).prefault("auto"),default_auto_download:_(r(O)).prefault([])}).prefault({}),display:n({theme:r(["light","dark","system"]).prefault("light"),code_editor_font_size:d().nonnegative().prefault(14),cell_output:r(["above","below"]).prefault("below"),dataframes:r(["rich","plain"]).prefault("rich"),default_table_page_size:d().prefault(10),default_table_max_columns:d().prefault(50),default_width:r($).prefault("medium").transform(a=>a==="normal"?"compact":a),locale:t().nullable().optional(),reference_highlighting:l().prefault(!0)}).prefault({}),package_management:n({manager:r(M).prefault("pip")}).prefault({}),ai:n({rules:t().prefault(""),mode:r(H).prefault("manual"),inline_tooltip:l().prefault(!1),open_ai:u.optional(),anthropic:u.optional(),google:u.optional(),ollama:u.optional(),openrouter:u.optional(),wandb:u.optional(),open_ai_compatible:u.optional(),azure:u.optional(),bedrock:n({region_name:t().optional(),profile_name:t().optional(),aws_access_key_id:t().optional(),aws_secret_access_key:t().optional()}).optional(),custom_providers:j(t(),u).prefault({}),models:K.prefault({displayed_models:[],custom_models:[]})}).prefault({}),experimental:n({markdown:l().optional(),rtc:l().optional()}).prefault(()=>({})),server:n({disable_file_downloads:l().optional()}).prefault(()=>({})),diagnostics:n({enabled:l().optional(),sql_linter:l().optional()}).prefault(()=>({})),sharing:n({html:l().optional(),wasm:l().optional()}).optional(),mcp:n({presets:_(r(["marimo","context7"])).optional()}).optional().prefault({})}).partial().prefault(()=>({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})),A=t(),L=r(q).prefault("auto"),b=h({width:r($).prefault("medium").transform(a=>a==="normal"?"compact":a),app_title:A.nullish(),css_file:t().nullish(),html_head_file:t().nullish(),auto_download:_(r(O)).prefault([]),sql_output:L}).prefault(()=>({width:"medium",auto_download:[],sql_output:"auto"}));function E(a){try{return b.parse(a)}catch(e){return f.error(`Marimo got an unexpected value in the configuration file: ${e}`),b.parse({})}}function Q(a){try{let e=y.parse(a);for(let[p,s]of Object.entries(e.experimental??{}))s===!0&&f.log(`\u{1F9EA} Experimental feature "${p}" is enabled.`);return e}catch(e){return e instanceof J?f.error(`Marimo got an unexpected value in the configuration file: ${I(e)}`):f.error(`Marimo got an unexpected value in the configuration file: ${e}`),P()}}function V(a){try{let e=a;return F(typeof e=="object","internal-error: marimo-config-overrides is not an object"),Object.keys(e).length>0&&f.log("\u{1F527} Project configuration overrides:",e),e}catch(e){return f.error(`Marimo got an unexpected configuration overrides: ${e}`),{}}}function P(){return y.parse({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})}var W=N();const v=o(P()),T=o({}),i=o(a=>{let e=a(T);return R({},a(v),e)}),X=o(a=>a(i).runtime.auto_instantiate),Y=o(a=>a(i).keymap.overrides??{}),Z=o(U()),aa=o(a=>new S(a(Y),{platform:a(Z)})),ea=o(a=>a(i).save),ta=o(a=>a(i).ai),oa=o(a=>a(i).completion),ra=o(a=>a(i).keymap.preset);function la(){return z(v)}function na(){let a=(0,W.c)(3),e=C(i),p=k(v),s;return a[0]!==e||a[1]!==p?(s=[e,p],a[0]=e,a[1]=p,a[2]=s):s=a[2],s}function ia(){return x.get(i)}const sa=o(a=>B(a(i)));o(a=>a(i).display.code_editor_font_size);const pa=o(a=>a(i).display.locale);function B(a){var e,p,s,m,c,w;return!!((p=(e=a.ai)==null?void 0:e.models)!=null&&p.chat_model)||!!((m=(s=a.ai)==null?void 0:s.models)!=null&&m.edit_model)||!!((w=(c=a.ai)==null?void 0:c.models)!=null&&w.autocomplete_model)}const g=o(E({}));function ua(){return z(g)}function fa(){return k(g)}function ma(){return x.get(g)}const ca=o(a=>a(g).width);o(a=>{var m,c;let e=a(i),p=((m=e.snippets)==null?void 0:m.custom_paths)??[],s=(c=e.snippets)==null?void 0:c.include_default_snippets;return p.length>0||s===!0});const da=o(a=>{var e;return((e=a(i).server)==null?void 0:e.disable_file_downloads)??!1});function _a(){return!1}export{Q as A,b as C,y as D,M as E,E as O,v as S,G as T,i as _,ca as a,fa as b,oa as c,ma as d,ia as f,pa as g,ra as h,g as i,V as k,T as l,B as m,ta as n,X as o,aa as p,sa as r,ea as s,_a as t,da as u,ua as v,A as w,la as x,na as y};
function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g,t=>{let x=Math.trunc(Math.random()*16);return(t==="x"?x:x&3|8).toString(16)})}export{r as t};
import{t as o}from"./vb-G28CZ46r.js";export{o as vb};
var c="error";function a(e){return RegExp("^(("+e.join(")|(")+"))\\b","i")}var v=RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),k=RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),x=RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),w=RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),I=RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),z=RegExp("^[_A-Za-z][_A-Za-z0-9]*"),u=["class","module","sub","enum","select","while","if","function","get","set","property","try","structure","synclock","using","with"],d=["else","elseif","case","catch","finally"],m=["next","loop"],h=["and","andalso","or","orelse","xor","in","not","is","isnot","like"],E=a(h),f="#const.#else.#elseif.#end.#if.#region.addhandler.addressof.alias.as.byref.byval.cbool.cbyte.cchar.cdate.cdbl.cdec.cint.clng.cobj.compare.const.continue.csbyte.cshort.csng.cstr.cuint.culng.cushort.declare.default.delegate.dim.directcast.each.erase.error.event.exit.explicit.false.for.friend.gettype.goto.handles.implements.imports.infer.inherits.interface.isfalse.istrue.lib.me.mod.mustinherit.mustoverride.my.mybase.myclass.namespace.narrowing.new.nothing.notinheritable.notoverridable.of.off.on.operator.option.optional.out.overloads.overridable.overrides.paramarray.partial.private.protected.public.raiseevent.readonly.redim.removehandler.resume.return.shadows.shared.static.step.stop.strict.then.throw.to.true.trycast.typeof.until.until.when.widening.withevents.writeonly".split("."),p="object.boolean.char.string.byte.sbyte.short.ushort.int16.uint16.integer.uinteger.int32.uint32.long.ulong.int64.uint64.decimal.single.double.float.date.datetime.intptr.uintptr".split("."),L=a(f),R=a(p),C='"',O=a(u),g=a(d),b=a(m),y=a(["end"]),T=a(["do"]),F=null;function s(e,n){n.currentIndent++}function o(e,n){n.currentIndent--}function l(e,n){if(e.eatSpace())return null;if(e.peek()==="'")return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var r=!1;if((e.match(/^\d*\.\d+F?/i)||e.match(/^\d+\.\d*F?/)||e.match(/^\.\d+F?/))&&(r=!0),r)return e.eat(/J/i),"number";var t=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?t=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),t=!0):e.match(/^0(?![\dx])/i)&&(t=!0),t)return e.eat(/L/i),"number"}return e.match(C)?(n.tokenize=j(e.current()),n.tokenize(e,n)):e.match(I)||e.match(w)?null:e.match(x)||e.match(v)||e.match(E)?"operator":e.match(k)?null:e.match(T)?(s(e,n),n.doInCurrentLine=!0,"keyword"):e.match(O)?(n.doInCurrentLine?n.doInCurrentLine=!1:s(e,n),"keyword"):e.match(g)?"keyword":e.match(y)?(o(e,n),o(e,n),"keyword"):e.match(b)?(o(e,n),"keyword"):e.match(R)||e.match(L)?"keyword":e.match(z)?"variable":(e.next(),c)}function j(e){var n=e.length==1,r="string";return function(t,i){for(;!t.eol();){if(t.eatWhile(/[^'"]/),t.match(e))return i.tokenize=l,r;t.eat(/['"]/)}return n&&(i.tokenize=l),r}}function S(e,n){var r=n.tokenize(e,n),t=e.current();if(t===".")return r=n.tokenize(e,n),r==="variable"?"variable":c;var i="[({".indexOf(t);return i!==-1&&s(e,n),F==="dedent"&&o(e,n)||(i="])}".indexOf(t),i!==-1&&o(e,n))?c:r}const _={name:"vb",startState:function(){return{tokenize:l,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,n){e.sol()&&(n.currentIndent+=n.nextLineIndent,n.nextLineIndent=0,n.doInCurrentLine=0);var r=S(e,n);return n.lastToken={style:r,content:e.current()},r},indent:function(e,n,r){var t=n.replace(/^\s+|\s+$/g,"");return t.match(b)||t.match(y)||t.match(g)?r.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.unit},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:"'"},autocomplete:u.concat(d).concat(m).concat(h).concat(f).concat(p)}};export{_ as t};
function p(h){var l="error";function a(e){return RegExp("^(("+e.join(")|(")+"))\\b","i")}var f=RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),y=RegExp("^((<>)|(<=)|(>=))"),g=RegExp("^[\\.,]"),x=RegExp("^[\\(\\)]"),k=RegExp("^[A-Za-z][_A-Za-z0-9]*"),w=["class","sub","select","while","if","function","property","with","for"],I=["else","elseif","case"],C=["next","loop","wend"],L=a(["and","or","not","xor","is","mod","eqv","imp"]),D=["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"],S=["true","false","nothing","empty","null"],E="abs.array.asc.atn.cbool.cbyte.ccur.cdate.cdbl.chr.cint.clng.cos.csng.cstr.date.dateadd.datediff.datepart.dateserial.datevalue.day.escape.eval.execute.exp.filter.formatcurrency.formatdatetime.formatnumber.formatpercent.getlocale.getobject.getref.hex.hour.inputbox.instr.instrrev.int.fix.isarray.isdate.isempty.isnull.isnumeric.isobject.join.lbound.lcase.left.len.loadpicture.log.ltrim.rtrim.trim.maths.mid.minute.month.monthname.msgbox.now.oct.replace.rgb.right.rnd.round.scriptengine.scriptenginebuildversion.scriptenginemajorversion.scriptengineminorversion.second.setlocale.sgn.sin.space.split.sqr.strcomp.string.strreverse.tan.time.timer.timeserial.timevalue.typename.ubound.ucase.unescape.vartype.weekday.weekdayname.year".split("."),O="vbBlack.vbRed.vbGreen.vbYellow.vbBlue.vbMagenta.vbCyan.vbWhite.vbBinaryCompare.vbTextCompare.vbSunday.vbMonday.vbTuesday.vbWednesday.vbThursday.vbFriday.vbSaturday.vbUseSystemDayOfWeek.vbFirstJan1.vbFirstFourDays.vbFirstFullWeek.vbGeneralDate.vbLongDate.vbShortDate.vbLongTime.vbShortTime.vbObjectError.vbOKOnly.vbOKCancel.vbAbortRetryIgnore.vbYesNoCancel.vbYesNo.vbRetryCancel.vbCritical.vbQuestion.vbExclamation.vbInformation.vbDefaultButton1.vbDefaultButton2.vbDefaultButton3.vbDefaultButton4.vbApplicationModal.vbSystemModal.vbOK.vbCancel.vbAbort.vbRetry.vbIgnore.vbYes.vbNo.vbCr.VbCrLf.vbFormFeed.vbLf.vbNewLine.vbNullChar.vbNullString.vbTab.vbVerticalTab.vbUseDefault.vbTrue.vbFalse.vbEmpty.vbNull.vbInteger.vbLong.vbSingle.vbDouble.vbCurrency.vbDate.vbString.vbObject.vbError.vbBoolean.vbVariant.vbDataObject.vbDecimal.vbByte.vbArray".split("."),i=["WScript","err","debug","RegExp"],z=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],R=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],T=["server","response","request","session","application"],j=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],F=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],o=R.concat(z);i=i.concat(O),h.isASP&&(i=i.concat(T),o=o.concat(F,j));var B=a(D),A=a(S),N=a(E),W=a(i),q=a(o),M='"',K=a(w),s=a(I),u=a(C),v=a(["end"]),Y=a(["do"]),H=a(["on error resume next","exit"]),J=a(["rem"]);function d(e,t){t.currentIndent++}function c(e,t){t.currentIndent--}function b(e,t){if(e.eatSpace())return null;if(e.peek()==="'"||e.match(J))return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var r=!1;if((e.match(/^\d*\.\d+/i)||e.match(/^\d+\.\d*/)||e.match(/^\.\d+/))&&(r=!0),r)return e.eat(/J/i),"number";var n=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?n=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),n=!0):e.match(/^0(?![\dx])/i)&&(n=!0),n)return e.eat(/L/i),"number"}return e.match(M)?(t.tokenize=P(e.current()),t.tokenize(e,t)):e.match(y)||e.match(f)||e.match(L)?"operator":e.match(g)?null:e.match(x)?"bracket":e.match(H)?(t.doInCurrentLine=!0,"keyword"):e.match(Y)?(d(e,t),t.doInCurrentLine=!0,"keyword"):e.match(K)?(t.doInCurrentLine?t.doInCurrentLine=!1:d(e,t),"keyword"):e.match(s)?"keyword":e.match(v)?(c(e,t),c(e,t),"keyword"):e.match(u)?(t.doInCurrentLine?t.doInCurrentLine=!1:c(e,t),"keyword"):e.match(B)?"keyword":e.match(A)?"atom":e.match(q)?"variableName.special":e.match(N)||e.match(W)?"builtin":e.match(k)?"variable":(e.next(),l)}function P(e){var t=e.length==1,r="string";return function(n,m){for(;!n.eol();){if(n.eatWhile(/[^'"]/),n.match(e))return m.tokenize=b,r;n.eat(/['"]/)}return t&&(m.tokenize=b),r}}function V(e,t){var r=t.tokenize(e,t),n=e.current();return n==="."?(r=t.tokenize(e,t),n=e.current(),r&&(r.substr(0,8)==="variable"||r==="builtin"||r==="keyword")?((r==="builtin"||r==="keyword")&&(r="variable"),o.indexOf(n.substr(1))>-1&&(r="keyword"),r):l):r}return{name:"vbscript",startState:function(){return{tokenize:b,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var r=V(e,t);return t.lastToken={style:r,content:e.current()},r===null&&(r=null),r},indent:function(e,t,r){var n=t.replace(/^\s+|\s+$/g,"");return n.match(u)||n.match(v)||n.match(s)?r.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*r.unit}}}const _=p({}),G=p({isASP:!0});export{G as n,_ as t};
import{n as r,t}from"./vbscript-DOr4ZYtx.js";export{t as vbScript,r as vbScriptASP};
import{s as Z}from"./chunk-LvLJmgfZ.js";import{n as C}from"./useEvent-DO6uJBas.js";import{t as R}from"./react-BGmjiNul.js";import"./react-dom-C9fstfnp.js";import{t as tt}from"./compiler-runtime-DeeZ7FnK.js";import{t as nt}from"./_baseUniq-BP3iN0f3.js";import{t as et}from"./debounce-B3mjKxHe.js";import{r as rt,t as at}from"./tooltip-BGrCWNss.js";import{a as V,d as j}from"./hotkeys-BHHWjLlp.js";import{n as z}from"./config-CIrPQIbt.js";import{t as it}from"./jsx-runtime-ZmTK25f3.js";import{r as ot}from"./button-YC1gW_kJ.js";import{u as lt}from"./toDate-CgbKQM5E.js";import{r as ct}from"./useTheme-DUdVAZI8.js";import"./Combination-CMPwuAmi.js";import{t as st}from"./tooltip-CEc2ajau.js";import{t as mt}from"./isValid-DcYggVWP.js";import{n as pt}from"./vega-loader.browser-CRZ52CKf.js";import{t as ut}from"./react-vega-CoHwoAp_.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import{r as ft,t as dt}from"./alert-BrGyZf9c.js";import{n as ht}from"./error-banner-DUzsIXtq.js";import{n as gt}from"./useAsyncData-C4XRy1BE.js";import{t as yt}from"./formats-W1SWxSE3.js";import{t as H}from"./useDeepCompareMemoize-ZPd9PxYl.js";function vt(t){return t&&t.length?nt(t):[]}var N=vt,kt=tt(),x=Z(R(),1);function bt(t){return t.data&&"url"in t.data&&(t.data.url=z(t.data.url).href),t}const u={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"};var F=new Set(["boxplot","errorband","errorbar"]);const S={getMarkType(t){let n=typeof t=="string"?t:t.type;if(F.has(n))throw Error("Not supported");return n},isInteractive(t){let n=typeof t=="string"?t:t.type;return!F.has(n)},makeClickable(t){let n=typeof t=="string"?t:t.type;return n in u?typeof t=="string"?{type:t,cursor:"pointer",tooltip:!0}:{...t,type:n,cursor:"pointer",tooltip:!0}:t},getOpacity(t){return typeof t=="string"?null:"opacity"in t&&typeof t.opacity=="number"?t.opacity:null}},y={point(t){return t==null?"select_point":`select_point_${t}`},interval(t){return t==null?"select_interval":`select_interval_${t}`},legendSelection(t){return`legend_selection_${t}`},binColoring(t){return t==null?"bin_coloring":`bin_coloring_${t}`},HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint(t){return t.some(n=>n.startsWith("select_point"))},hasInterval(t){return t.some(n=>n.startsWith("select_interval"))},hasLegend(t){return t.some(n=>n.startsWith("legend_selection"))},hasPanZoom(t){return t.some(n=>n.startsWith("pan_zoom"))},isBinColoring(t){return t.startsWith("bin_coloring")}},O={highlight(){return{name:y.HIGHLIGHT,select:{type:"point",on:"mouseover"}}},interval(t,n){return{name:y.interval(n),select:{type:"interval",encodings:W(t),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}},point(t,n){return{name:y.point(n),select:{type:"point",encodings:W(t),on:"click[!event.metaKey]"}}},binColoring(t){return{name:y.binColoring(t),select:{type:"point",on:"click[!event.metaKey]"}}},legend(t){return{name:y.legendSelection(t),select:{type:"point",fields:[t]},bind:"legend"}},panZoom(){return{name:y.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}}}};function W(t){switch(S.getMarkType(t.mark)){case u.image:case u.trail:return;case u.area:case u.arc:return["color"];case u.bar:{let n=wt(t);return n==="horizontal"?["y"]:n==="vertical"?["x"]:void 0}case u.circle:case u.geoshape:case u.line:case u.point:case u.rect:case u.rule:case u.square:case u.text:case u.tick:return["x","y"]}}function P(t){return"params"in t&&t.params&&t.params.length>0?N(t.params.filter(n=>n==null?!1:"select"in n&&n.select!==void 0).map(n=>n.name)):"layer"in t?N(t.layer.flatMap(P)):"vconcat"in t?N(t.vconcat.flatMap(P)):"hconcat"in t?N(t.hconcat.flatMap(P)):[]}function wt(t){var a,r;if(!t||!("mark"in t))return;let n=(a=t.encoding)==null?void 0:a.x,e=(r=t.encoding)==null?void 0:r.y;if(n&&"type"in n&&n.type==="nominal")return"vertical";if(e&&"type"in e&&e.type==="nominal"||n&&"aggregate"in n)return"horizontal";if(e&&"aggregate"in e)return"vertical"}function xt(t){if(!t.encoding)return[];let n=[];for(let e of Object.values(t.encoding))e&&typeof e=="object"&&"bin"in e&&e.bin&&"field"in e&&typeof e.field=="string"&&n.push(e.field);return n}function D(t){if(!t||!("encoding"in t))return[];let{encoding:n}=t;return n?Object.entries(n).flatMap(e=>{let[a,r]=e;return!r||!St.has(a)?[]:"field"in r&&typeof r.field=="string"?[r.field]:"condition"in r&&r.condition&&typeof r.condition=="object"&&"field"in r.condition&&r.condition.field&&typeof r.condition.field=="string"?[r.condition.field]:[]}):[]}var St=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function G(t,n,e,a){let r=e.filter(o=>y.isBinColoring(o)),i={and:(r.length>0?r:e).map(o=>({param:o}))};if(t==="opacity"){let o=S.getOpacity(a)||1;return{...n,opacity:{condition:{test:i,value:o},value:o/5}}}else return n}function At(t){if(!("select"in t)||!t.select)return JSON.stringify(t);let n=t.select;if(typeof n=="string")return JSON.stringify({type:n,bind:t.bind});let e={type:n.type,encodings:"encodings"in n&&n.encodings?[...n.encodings].sort():void 0,fields:"fields"in n&&n.fields?[...n.fields].sort():void 0,bind:t.bind};return JSON.stringify(e)}function $(t){let n=E(t);if(n.length===0)return t;let e=jt(n);return e.length===0?t:{...L(K(t,new Set(e.map(a=>a.name))),e.map(a=>a.name)),params:[...t.params||[],...e]}}function E(t){let n=[];if("vconcat"in t&&Array.isArray(t.vconcat))for(let e of t.vconcat)n.push(...E(e));else if("hconcat"in t&&Array.isArray(t.hconcat))for(let e of t.hconcat)n.push(...E(e));else{if("layer"in t)return[];"mark"in t&&"params"in t&&t.params&&t.params.length>0&&n.push({params:t.params})}return n}function jt(t){if(t.length===0)return[];let n=new Map,e=t.length;for(let{params:r}of t){let i=new Set;for(let o of r){let l=At(o);i.has(l)||(i.add(l),n.has(l)||n.set(l,{count:0,param:o}),n.get(l).count++)}}let a=[];for(let[,{count:r,param:i}]of n)r===e&&a.push(i);return a}function K(t,n){if("vconcat"in t&&Array.isArray(t.vconcat))return{...t,vconcat:t.vconcat.map(e=>K(e,n))};if("hconcat"in t&&Array.isArray(t.hconcat))return{...t,hconcat:t.hconcat.map(e=>K(e,n))};if("mark"in t&&"params"in t&&t.params){let e=t.params,a=[];for(let r of e){if(!r||typeof r!="object"||!("name"in r)){a.push(r);continue}n.has(r.name)||a.push(r)}if(a.length===0){let{params:r,...i}=t;return i}return{...t,params:a}}return t}function L(t,n){return"vconcat"in t&&Array.isArray(t.vconcat)?{...t,vconcat:t.vconcat.map(e=>L(e,n))}:"hconcat"in t&&Array.isArray(t.hconcat)?{...t,hconcat:t.hconcat.map(e=>L(e,n))}:"layer"in t?t:"mark"in t&&S.isInteractive(t.mark)?{...t,mark:S.makeClickable(t.mark),encoding:G("opacity",t.encoding||{},n,t.mark)}:t}function T(t,n){var l,k;let{chartSelection:e=!0,fieldSelection:a=!0}=n;if(!e&&!a)return t;(l=t.params)!=null&&l.some(s=>s.bind==="legend")&&(a=!1);let r=(k=t.params)==null?void 0:k.some(s=>!s.bind);r&&(e=!1);let i="vconcat"in t||"hconcat"in t;if(r&&i)return t;if("vconcat"in t){let s=t.vconcat.map(m=>"mark"in m?T(m,{chartSelection:e,fieldSelection:a}):m);return $({...t,vconcat:s})}if("hconcat"in t){let s=t.hconcat.map(m=>"mark"in m?T(m,{chartSelection:e,fieldSelection:a}):m);return $({...t,hconcat:s})}if("layer"in t){let s=t.params&&t.params.length>0,m=a!==!1&&!s,v=[];if(m){let p=t.layer.flatMap(f=>"mark"in f?D(f):[]);v=[...new Set(p)],Array.isArray(a)&&(v=v.filter(f=>a.includes(f)))}let w=t.layer.map((p,f)=>{if(!("mark"in p))return p;let h=p;if(f===0&&v.length>0){let _=v.map(M=>O.legend(M));h={...h,params:[...h.params||[],..._]}}return h=q(h,e,f),h=J(h),f===0&&(h=B(h)),h});return{...t,layer:w}}if(!("mark"in t)||!S.isInteractive(t.mark))return t;let o=t;return o=Ot(o,a),o=q(o,e,void 0),o=J(o),o=B(o),o}function Ot(t,n){if(n===!1)return t;let e=D(t);Array.isArray(n)&&(e=e.filter(i=>n.includes(i)));let a=e.map(i=>O.legend(i)),r=[...t.params||[],...a];return{...t,params:r}}function q(t,n,e){if(n===!1)return t;let a;try{a=S.getMarkType(t.mark)}catch{return t}if(a==="geoshape")return t;let r=xt(t),i=n===!0?r.length>0?["point"]:_t(a):[n];if(!i||i.length===0)return t;let o=i.map(k=>k==="interval"?O.interval(t,e):O.point(t,e)),l=[...t.params||[],...o];return r.length>0&&i.includes("point")&&l.push(O.binColoring(e)),{...t,params:l}}function B(t){let n;try{n=S.getMarkType(t.mark)}catch{}if(n==="geoshape")return t;let e=t.params||[];return e.some(a=>a.bind==="scales")?t:{...t,params:[...e,O.panZoom()]}}function J(t){let n="encoding"in t?t.encoding:void 0,e=t.params||[],a=e.map(r=>r.name);return e.length===0||!S.isInteractive(t.mark)?t:{...t,mark:S.makeClickable(t.mark),encoding:G("opacity",n||{},a,t.mark)}}function _t(t){switch(t){case"arc":case"area":return["point"];case"text":case"bar":return["point","interval"];case"line":return;default:return["point","interval"]}}async function Mt(t){if(!t)return t;let n="datasets"in t?{...t.datasets}:{},e=async r=>{if(!r)return r;if("layer"in r){let l=await Promise.all(r.layer.map(e));r={...r,layer:l}}if("hconcat"in r){let l=await Promise.all(r.hconcat.map(e));r={...r,hconcat:l}}if("vconcat"in r){let l=await Promise.all(r.vconcat.map(e));r={...r,vconcat:l}}if("spec"in r&&(r={...r,spec:await e(r.spec)}),!r.data||!("url"in r.data))return r;let i;try{i=z(r.data.url)}catch{return r}let o=await rt(i.href,r.data.format);return n[i.pathname]=o,{...r,data:{name:i.pathname}}},a=await e(t);return Object.keys(n).length===0?a:{...a,datasets:n}}var d=Z(it(),1);pt("arrow",yt);var Nt=t=>{let n=(0,kt.c)(12),{value:e,setValue:a,chartSelection:r,fieldSelection:i,spec:o,embedOptions:l}=t,k,s;n[0]===o?(k=n[1],s=n[2]):(k=async()=>Mt(o),s=[o],n[0]=o,n[1]=k,n[2]=s);let{data:m,error:v}=gt(k,s);if(v){let p;return n[3]===v?p=n[4]:(p=(0,d.jsx)(ht,{error:v}),n[3]=v,n[4]=p),p}if(!m)return null;let w;return n[5]!==r||n[6]!==l||n[7]!==i||n[8]!==m||n[9]!==a||n[10]!==e?(w=(0,d.jsx)(Pt,{value:e,setValue:a,chartSelection:r,fieldSelection:i,spec:m,embedOptions:l}),n[5]=r,n[6]=l,n[7]=i,n[8]=m,n[9]=a,n[10]=e,n[11]=w):w=n[11],w},Pt=({value:t,setValue:n,chartSelection:e,fieldSelection:a,spec:r,embedOptions:i})=>{let{theme:o}=ct(),l=(0,x.useRef)(null),k=(0,x.useRef)(void 0),[s,m]=(0,x.useState)(),v=(0,x.useMemo)(()=>i&&"actions"in i?i.actions:{source:!1,compiled:!1},[i]),w=H(r),p=(0,x.useMemo)(()=>T(bt(w),{chartSelection:e,fieldSelection:a}),[w,e,a]),f=(0,x.useMemo)(()=>P(p),[p]),h=C(c=>{n({...t,...c})}),_=(0,x.useMemo)(()=>et((c,g)=>{j.debug("[Vega signal]",c,g);let b=V.mapValues(g,Ct);b=V.mapValues(b,It),h({[c]:b})},100),[h]),M=H(f),I=(0,x.useMemo)(()=>M.reduce((c,g)=>(y.PAN_ZOOM===g||y.isBinColoring(g)||c.push({signalName:g,handler:(b,Y)=>_(b,Y)}),c),[]),[M,_]),Q=C(c=>{j.error(c),j.debug(p),m(c)}),U=C(c=>{j.debug("[Vega view] created",c),k.current=c,m(void 0)}),X=()=>{let c=[];return y.hasPoint(f)&&c.push(["Point selection","click to select a point; hold shift for multi-select"]),y.hasInterval(f)&&c.push(["Interval selection","click and drag to select an interval"]),y.hasLegend(f)&&c.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),y.hasPanZoom(f)&&c.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),c.length===0?null:(0,d.jsx)(st,{delayDuration:300,side:"left",content:(0,d.jsx)("div",{className:"text-xs flex flex-col",children:c.map((g,b)=>(0,d.jsxs)("div",{children:[(0,d.jsxs)("span",{className:"font-bold tracking-wide",children:[g[0],":"]})," ",g[1]]},b))}),children:(0,d.jsx)(lt,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})},A=ut({ref:l,spec:p,options:{theme:o==="dark"?"dark":void 0,actions:v,mode:"vega-lite",tooltip:at.call,renderer:"canvas"},onError:Q,onEmbed:U});return(0,x.useEffect)(()=>(I.forEach(({signalName:c,handler:g})=>{try{A==null||A.view.addSignalListener(c,g)}catch(b){j.error(b)}}),()=>{I.forEach(({signalName:c,handler:g})=>{try{A==null||A.view.removeSignalListener(c,g)}catch(b){j.error(b)}})}),[A,I]),(0,d.jsxs)(d.Fragment,{children:[s&&(0,d.jsxs)(dt,{variant:"destructive",children:[(0,d.jsx)(ft,{children:s.message}),(0,d.jsx)("div",{className:"text-md",children:s.stack})]}),(0,d.jsxs)("div",{className:"relative",onPointerDown:ot.stopPropagation(),children:[(0,d.jsx)("div",{ref:l}),X()]})]})};function It(t){return t instanceof Set?[...t]:t}function Ct(t){return Array.isArray(t)?t.map(n=>n instanceof Date&&mt(n)?new Date(n).getTime():n):t}var Et=Nt;export{Et as default};
import{a as Tt,n as _n,r as Wn,s as Jn,t as qn}from"./precisionRound-BMPhtTJQ.js";import{i as _t,n as Hn,r as Gn,t as Zn}from"./defaultLocale-D_rSvXvJ.js";import{C as Vn,N as Wt,S as Qn,T as Jt,_ as qt,a as Kn,b as it,c as Ht,i as Xn,l as Gt,n as tr,o as nr,p as Zt,r as rr,s as er,t as ar,v as st,w as ur,x as or}from"./defaultLocale-C92Rrpmf.js";function E(t,n,r){return t.fields=n||[],t.fname=r,t}function ir(t){return t==null?null:t.fname}function Vt(t){return t==null?null:t.fields}function Qt(t){return t.length===1?sr(t[0]):lr(t)}var sr=t=>function(n){return n[t]},lr=t=>{let n=t.length;return function(r){for(let e=0;e<n;++e)r=r[t[e]];return r}};function v(t){throw Error(t)}function wt(t){let n=[],r=t.length,e=null,a=0,u="",o,i,c;t+="";function l(){n.push(u+t.substring(o,i)),u="",o=i+1}for(o=i=0;i<r;++i)if(c=t[i],c==="\\")u+=t.substring(o,i++),o=i;else if(c===e)l(),e=null,a=-1;else{if(e)continue;o===a&&c==='"'||o===a&&c==="'"?(o=i+1,e=c):c==="."&&!a?i>o?l():o=i+1:c==="["?(i>o&&l(),a=o=i+1):c==="]"&&(a||v("Access path missing open bracket: "+t),a>0&&l(),a=0,o=i+1)}return a&&v("Access path missing closing bracket: "+t),e&&v("Access path missing closing quote: "+t),i>o&&(i++,l()),n}function lt(t,n,r){let e=wt(t);return t=e.length===1?e[0]:t,E((r&&r.get||Qt)(e),[t],n||t)}var cr=lt("id"),W=E(t=>t,[],"identity"),I=E(()=>0,[],"zero"),Kt=E(()=>1,[],"one"),fr=E(()=>!0,[],"true"),hr=E(()=>!1,[],"false"),gr=new Set([...Object.getOwnPropertyNames(Object.prototype).filter(t=>typeof Object.prototype[t]=="function"),"__proto__"]);function pr(t,n,r){let e=[n].concat([].slice.call(r));console[t].apply(console,e)}var mr=0,dr=1,yr=2,vr=3,br=4;function Mr(t,n,r=pr){let e=t||0;return{level(a){return arguments.length?(e=+a,this):e},error(){return e>=1&&r(n||"error","ERROR",arguments),this},warn(){return e>=2&&r(n||"warn","WARN",arguments),this},info(){return e>=3&&r(n||"log","INFO",arguments),this},debug(){return e>=4&&r(n||"log","DEBUG",arguments),this}}}var J=Array.isArray;function $(t){return t===Object(t)}var Xt=t=>t!=="__proto__";function Cr(...t){return t.reduce((n,r)=>{for(let e in r)if(e==="signals")n.signals=Tr(n.signals,r.signals);else{let a=e==="legend"?{layout:1}:e==="style"?!0:null;jt(n,e,r[e],a)}return n},{})}function jt(t,n,r,e){if(!Xt(n))return;let a,u;if($(r)&&!J(r))for(a in u=$(t[n])?t[n]:t[n]={},r)e&&(e===!0||e[a])?jt(u,a,r[a]):Xt(a)&&(u[a]=r[a]);else t[n]=r}function Tr(t,n){if(t==null)return n;let r={},e=[];function a(u){r[u.name]||(r[u.name]=1,e.push(u))}return n.forEach(a),t.forEach(a),e}function P(t){return t[t.length-1]}function q(t){return t==null||t===""?null:+t}var tn=t=>n=>t*Math.exp(n),nn=t=>n=>Math.log(t*n),rn=t=>n=>Math.sign(n)*Math.log1p(Math.abs(n/t)),en=t=>n=>Math.sign(n)*Math.expm1(Math.abs(n))*t,ct=t=>n=>n<0?-((-n)**+t):n**+t;function ft(t,n,r,e){let a=r(t[0]),u=r(P(t)),o=(u-a)*n;return[e(a-o),e(u-o)]}function wr(t,n){return ft(t,n,q,W)}function jr(t,n){var r=Math.sign(t[0]);return ft(t,n,nn(r),tn(r))}function Dr(t,n,r){return ft(t,n,ct(r),ct(1/r))}function kr(t,n,r){return ft(t,n,rn(r),en(r))}function ht(t,n,r,e,a){let u=e(t[0]),o=e(P(t)),i=n==null?(u+o)/2:e(n);return[a(i+(u-i)*r),a(i+(o-i)*r)]}function Or(t,n,r){return ht(t,n,r,q,W)}function Ur(t,n,r){let e=Math.sign(t[0]);return ht(t,n,r,nn(e),tn(e))}function xr(t,n,r,e){return ht(t,n,r,ct(e),ct(1/e))}function Nr(t,n,r,e){return ht(t,n,r,rn(e),en(e))}function Ar(t){return 1+~~(new Date(t).getMonth()/3)}function Er(t){return 1+~~(new Date(t).getUTCMonth()/3)}function R(t){return t==null?[]:J(t)?t:[t]}function Sr(t,n,r){let e=t[0],a=t[1],u;return a<e&&(u=a,a=e,e=u),u=a-e,u>=r-n?[n,r]:[e=Math.min(Math.max(e,n),r-u),e+u]}function B(t){return typeof t=="function"}var Fr="descending";function Pr(t,n,r){r||(r={}),n=R(n)||[];let e=[],a=[],u={},o=r.comparator||zr;return R(t).forEach((i,c)=>{i!=null&&(e.push(n[c]===Fr?-1:1),a.push(i=B(i)?i:lt(i,null,r)),(Vt(i)||[]).forEach(l=>u[l]=1))}),a.length===0?null:E(o(a,e),Object.keys(u))}var Dt=(t,n)=>(t<n||t==null)&&n!=null?-1:(t>n||n==null)&&t!=null?1:(n=n instanceof Date?+n:n,(t=t instanceof Date?+t:t)!==t&&n===n?-1:n!==n&&t===t?1:0),zr=(t,n)=>t.length===1?Yr(t[0],n[0]):Ir(t,n,t.length),Yr=(t,n)=>function(r,e){return Dt(t(r),t(e))*n},Ir=(t,n,r)=>(n.push(0),function(e,a){let u,o=0,i=-1;for(;o===0&&++i<r;)u=t[i],o=Dt(u(e),u(a));return o*n[i]});function an(t){return B(t)?t:()=>t}function $r(t,n){let r;return e=>{r&&clearTimeout(r),r=setTimeout(()=>(n(e),r=null),t)}}function z(t){for(let n,r,e=1,a=arguments.length;e<a;++e)for(r in n=arguments[e],n)t[r]=n[r];return t}function Rr(t,n){let r=0,e,a,u,o;if(t&&(e=t.length))if(n==null){for(a=t[r];r<e&&(a==null||a!==a);a=t[++r]);for(u=o=a;r<e;++r)a=t[r],a!=null&&(a<u&&(u=a),a>o&&(o=a))}else{for(a=n(t[r]);r<e&&(a==null||a!==a);a=n(t[++r]));for(u=o=a;r<e;++r)a=n(t[r]),a!=null&&(a<u&&(u=a),a>o&&(o=a))}return[u,o]}function Br(t,n){let r=t.length,e=-1,a,u,o,i,c;if(n==null){for(;++e<r;)if(u=t[e],u!=null&&u>=u){a=o=u;break}if(e===r)return[-1,-1];for(i=c=e;++e<r;)u=t[e],u!=null&&(a>u&&(a=u,i=e),o<u&&(o=u,c=e))}else{for(;++e<r;)if(u=n(t[e],e,t),u!=null&&u>=u){a=o=u;break}if(e===r)return[-1,-1];for(i=c=e;++e<r;)u=n(t[e],e,t),u!=null&&(a>u&&(a=u,i=e),o<u&&(o=u,c=e))}return[i,c]}function N(t,n){return Object.hasOwn(t,n)}var gt={};function Lr(t){let n={},r;function e(u){return N(n,u)&&n[u]!==gt}let a={size:0,empty:0,object:n,has:e,get(u){return e(u)?n[u]:void 0},set(u,o){return e(u)||(++a.size,n[u]===gt&&--a.empty),n[u]=o,this},delete(u){return e(u)&&(--a.size,++a.empty,n[u]=gt),this},clear(){a.size=a.empty=0,a.object=n={}},test(u){return arguments.length?(r=u,a):r},clean(){let u={},o=0;for(let i in n){let c=n[i];c!==gt&&(!r||!r(c))&&(u[i]=c,++o)}a.size=o,a.empty=0,a.object=n=u}};return t&&Object.keys(t).forEach(u=>{a.set(u,t[u])}),a}function _r(t,n,r,e,a,u){if(!r&&r!==0)return u;let o=+r,i=t[0],c=P(t),l;c<i&&(l=i,i=c,c=l),l=Math.abs(n-i);let h=Math.abs(c-n);return l<h&&l<=o?e:h<=o?a:u}function Wr(t,n,r){let e=t.prototype=Object.create(n.prototype);return Object.defineProperty(e,"constructor",{value:t,writable:!0,enumerable:!0,configurable:!0}),z(e,r)}function Jr(t,n,r,e){let a=n[0],u=n[n.length-1],o;return a>u&&(o=a,a=u,u=o),r=r===void 0||r,e=e===void 0||e,(r?a<=t:a<t)&&(e?t<=u:t<u)}function qr(t){return typeof t=="boolean"}function un(t){return Object.prototype.toString.call(t)==="[object Date]"}function on(t){return t&&B(t[Symbol.iterator])}function sn(t){return typeof t=="number"}function Hr(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function pt(t){return typeof t=="string"}function Gr(t,n,r){t&&(t=n?R(t).map(i=>i.replace(/\\(.)/g,"$1")):R(t));let e=t&&t.length,a=r&&r.get||Qt,u=i=>a(n?[i]:wt(i)),o;if(!e)o=function(){return""};else if(e===1){let i=u(t[0]);o=function(c){return""+i(c)}}else{let i=t.map(u);o=function(c){let l=""+i[0](c),h=0;for(;++h<e;)l+="|"+i[h](c);return l}}return E(o,t,"key")}function Zr(t,n){let r=t[0],e=P(t),a=+n;return a?a===1?e:r+a*(e-r):r}var Vr=1e4;function Qr(t){t=+t||Vr;let n,r,e,a=()=>{n={},r={},e=0},u=(o,i)=>(++e>t&&(r=n,n={},e=1),n[o]=i);return a(),{clear:a,has:o=>N(n,o)||N(r,o),get:o=>N(n,o)?n[o]:N(r,o)?u(o,r[o]):void 0,set:(o,i)=>N(n,o)?n[o]=i:u(o,i)}}function Kr(t,n,r,e){let a=n.length,u=r.length;if(!u)return n;if(!a)return r;let o=e||new n.constructor(a+u),i=0,c=0,l=0;for(;i<a&&c<u;++l)o[l]=t(n[i],r[c])>0?r[c++]:n[i++];for(;i<a;++i,++l)o[l]=n[i];for(;c<u;++c,++l)o[l]=r[c];return o}function H(t,n){let r="";for(;--n>=0;)r+=t;return r}function Xr(t,n,r,e){let a=r||" ",u=t+"",o=n-u.length;return o<=0?u:e==="left"?H(a,o)+u:e==="center"?H(a,~~(o/2))+u+H(a,Math.ceil(o/2)):u+H(a,o)}function ln(t){return t&&P(t)-t[0]||0}function mt(t){return J(t)?`[${t.map(n=>n===null?"null":mt(n))}]`:$(t)||pt(t)?JSON.stringify(t).replaceAll("\u2028","\\u2028").replaceAll("\u2029","\\u2029"):t}function cn(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}var te=t=>sn(t)||un(t)?t:Date.parse(t);function fn(t,n){return n||(n=te),t==null||t===""?null:n(t)}function hn(t){return t==null||t===""?null:t+""}function gn(t){let n={},r=t.length;for(let e=0;e<r;++e)n[t[e]]=!0;return n}function ne(t,n,r,e){let a=e??"\u2026",u=t+"",o=u.length,i=Math.max(0,n-a.length);return o<=n?u:r==="left"?a+u.slice(o-i):r==="center"?u.slice(0,Math.ceil(i/2))+a+u.slice(o-~~(i/2)):u.slice(0,i)+a}function re(t,n,r){if(t)if(n){let e=t.length;for(let a=0;a<e;++a){let u=n(t[a]);u&&r(u,a,t)}}else t.forEach(r)}var pn={},kt={},Ot=34,G=10,Ut=13;function mn(t){return Function("d","return {"+t.map(function(n,r){return JSON.stringify(n)+": d["+r+'] || ""'}).join(",")+"}")}function ee(t,n){var r=mn(t);return function(e,a){return n(r(e),a,t)}}function dn(t){var n=Object.create(null),r=[];return t.forEach(function(e){for(var a in e)a in n||r.push(n[a]=a)}),r}function T(t,n){var r=t+"",e=r.length;return e<n?Array(n-e+1).join(0)+r:r}function ae(t){return t<0?"-"+T(-t,6):t>9999?"+"+T(t,6):T(t,4)}function ue(t){var n=t.getUTCHours(),r=t.getUTCMinutes(),e=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":ae(t.getUTCFullYear(),4)+"-"+T(t.getUTCMonth()+1,2)+"-"+T(t.getUTCDate(),2)+(a?"T"+T(n,2)+":"+T(r,2)+":"+T(e,2)+"."+T(a,3)+"Z":e?"T"+T(n,2)+":"+T(r,2)+":"+T(e,2)+"Z":r||n?"T"+T(n,2)+":"+T(r,2)+"Z":"")}function oe(t){var n=RegExp('["'+t+`
\r]`),r=t.charCodeAt(0);function e(s,f){var g,p,m=a(s,function(d,C){if(g)return g(d,C-1);p=d,g=f?ee(d,f):mn(d)});return m.columns=p||[],m}function a(s,f){var g=[],p=s.length,m=0,d=0,C,x=p<=0,j=!1;s.charCodeAt(p-1)===G&&--p,s.charCodeAt(p-1)===Ut&&--p;function y(){if(x)return kt;if(j)return j=!1,pn;var ut,ot=m,_;if(s.charCodeAt(ot)===Ot){for(;m++<p&&s.charCodeAt(m)!==Ot||s.charCodeAt(++m)===Ot;);return(ut=m)>=p?x=!0:(_=s.charCodeAt(m++))===G?j=!0:_===Ut&&(j=!0,s.charCodeAt(m)===G&&++m),s.slice(ot+1,ut-1).replace(/""/g,'"')}for(;m<p;){if((_=s.charCodeAt(ut=m++))===G)j=!0;else if(_===Ut)j=!0,s.charCodeAt(m)===G&&++m;else if(_!==r)continue;return s.slice(ot,ut)}return x=!0,s.slice(ot,p)}for(;(C=y())!==kt;){for(var at=[];C!==pn&&C!==kt;)at.push(C),C=y();f&&(at=f(at,d++))==null||g.push(at)}return g}function u(s,f){return s.map(function(g){return f.map(function(p){return h(g[p])}).join(t)})}function o(s,f){return f??(f=dn(s)),[f.map(h).join(t)].concat(u(s,f)).join(`
`)}function i(s,f){return f??(f=dn(s)),u(s,f).join(`
`)}function c(s){return s.map(l).join(`
`)}function l(s){return s.map(h).join(t)}function h(s){return s==null?"":s instanceof Date?ue(s):n.test(s+="")?'"'+s.replace(/"/g,'""')+'"':s}return{parse:e,parseRows:a,format:o,formatBody:i,formatRows:c,formatRow:l,formatValue:h}}function ie(t){return t}function se(t){if(t==null)return ie;var n,r,e=t.scale[0],a=t.scale[1],u=t.translate[0],o=t.translate[1];return function(i,c){c||(n=r=0);var l=2,h=i.length,s=Array(h);for(s[0]=(n+=i[0])*e+u,s[1]=(r+=i[1])*a+o;l<h;)s[l]=i[l],++l;return s}}function le(t,n){for(var r,e=t.length,a=e-n;a<--e;)r=t[a],t[a++]=t[e],t[e]=r}function ce(t,n){return typeof n=="string"&&(n=t.objects[n]),n.type==="GeometryCollection"?{type:"FeatureCollection",features:n.geometries.map(function(r){return yn(t,r)})}:yn(t,n)}function yn(t,n){var r=n.id,e=n.bbox,a=n.properties==null?{}:n.properties,u=vn(t,n);return r==null&&e==null?{type:"Feature",properties:a,geometry:u}:e==null?{type:"Feature",id:r,properties:a,geometry:u}:{type:"Feature",id:r,bbox:e,properties:a,geometry:u}}function vn(t,n){var r=se(t.transform),e=t.arcs;function a(h,s){s.length&&s.pop();for(var f=e[h<0?~h:h],g=0,p=f.length;g<p;++g)s.push(r(f[g],g));h<0&&le(s,p)}function u(h){return r(h)}function o(h){for(var s=[],f=0,g=h.length;f<g;++f)a(h[f],s);return s.length<2&&s.push(s[0]),s}function i(h){for(var s=o(h);s.length<4;)s.push(s[0]);return s}function c(h){return h.map(i)}function l(h){var s=h.type,f;switch(s){case"GeometryCollection":return{type:s,geometries:h.geometries.map(l)};case"Point":f=u(h.coordinates);break;case"MultiPoint":f=h.coordinates.map(u);break;case"LineString":f=o(h.arcs);break;case"MultiLineString":f=h.arcs.map(o);break;case"Polygon":f=c(h.arcs);break;case"MultiPolygon":f=h.arcs.map(c);break;default:return null}return{type:s,coordinates:f}}return l(n)}function fe(t,n){var r={},e={},a={},u=[],o=-1;n.forEach(function(l,h){var s=t.arcs[l<0?~l:l],f;s.length<3&&!s[1][0]&&!s[1][1]&&(f=n[++o],n[o]=l,n[h]=f)}),n.forEach(function(l){var h=i(l),s=h[0],f=h[1],g,p;if(g=a[s])if(delete a[g.end],g.push(l),g.end=f,p=e[f]){delete e[p.start];var m=p===g?g:g.concat(p);e[m.start=g.start]=a[m.end=p.end]=m}else e[g.start]=a[g.end]=g;else if(g=e[f])if(delete e[g.start],g.unshift(l),g.start=s,p=a[s]){delete a[p.end];var d=p===g?g:p.concat(g);e[d.start=p.start]=a[d.end=g.end]=d}else e[g.start]=a[g.end]=g;else g=[l],e[g.start=s]=a[g.end=f]=g});function i(l){var h=t.arcs[l<0?~l:l],s=h[0],f;return t.transform?(f=[0,0],h.forEach(function(g){f[0]+=g[0],f[1]+=g[1]})):f=h[h.length-1],l<0?[f,s]:[s,f]}function c(l,h){for(var s in l){var f=l[s];delete h[f.start],delete f.start,delete f.end,f.forEach(function(g){r[g<0?~g:g]=1}),u.push(f)}}return c(a,e),c(e,a),n.forEach(function(l){r[l<0?~l:l]||u.push([l])}),u}function he(t){return vn(t,ge.apply(this,arguments))}function ge(t,n,r){var e,a,u;if(arguments.length>1)e=pe(t,n,r);else for(a=0,e=Array(u=t.arcs.length);a<u;++a)e[a]=a;return{type:"MultiLineString",arcs:fe(t,e)}}function pe(t,n,r){var e=[],a=[],u;function o(s){var f=s<0?~s:s;(a[f]||(a[f]=[])).push({i:s,g:u})}function i(s){s.forEach(o)}function c(s){s.forEach(i)}function l(s){s.forEach(c)}function h(s){switch(u=s,s.type){case"GeometryCollection":s.geometries.forEach(h);break;case"LineString":i(s.arcs);break;case"MultiLineString":case"Polygon":c(s.arcs);break;case"MultiPolygon":l(s.arcs);break}}return h(n),a.forEach(r==null?function(s){e.push(s[0].i)}:function(s){r(s[0].g,s[s.length-1].g)&&e.push(s[0].i)}),e}var b="year",D="quarter",w="month",M="week",k="date",me="day",F="dayofyear",O="hours",U="minutes",A="seconds",S="milliseconds",bn=[b,D,w,M,k,"day",F,O,U,A,S],xt=bn.reduce((t,n,r)=>(t[n]=1+r,t),{});function Mn(t){let n=R(t).slice(),r={};return n.length||v("Missing time unit."),n.forEach(e=>{N(xt,e)?r[e]=1:v(`Invalid time unit: ${e}.`)}),(r.week||r.day?1:0)+(r.quarter||r.month||r.date?1:0)+(r.dayofyear?1:0)>1&&v(`Incompatible time units: ${t}`),n.sort((e,a)=>xt[e]-xt[a]),n}var de={[b]:"%Y ",[D]:"Q%q ",[w]:"%b ",[k]:"%d ",[M]:"W%U ",day:"%a ",[F]:"%j ",[O]:"%H:00",[U]:"00:%M",[A]:":%S",[S]:".%L",[`${b}-${w}`]:"%Y-%m ",[`${b}-${w}-${k}`]:"%Y-%m-%d ",[`${O}-${U}`]:"%H:%M"};function ye(t,n){let r=z({},de,n),e=Mn(t),a=e.length,u="",o=0,i,c;for(o=0;o<a;)for(i=e.length;i>o;--i)if(c=e.slice(o,i).join("-"),r[c]!=null){u+=r[c],o=i;break}return u.trim()}var Y=new Date;function Nt(t){return Y.setFullYear(t),Y.setMonth(0),Y.setDate(1),Y.setHours(0,0,0,0),Y}function ve(t){return Cn(new Date(t))}function be(t){return At(new Date(t))}function Cn(t){return st.count(Nt(t.getFullYear())-1,t)}function At(t){return Zt.count(Nt(t.getFullYear())-1,t)}function Et(t){return Nt(t).getDay()}function Me(t,n,r,e,a,u,o){if(0<=t&&t<100){let i=new Date(-1,n,r,e,a,u,o);return i.setFullYear(t),i}return new Date(t,n,r,e,a,u,o)}function Ce(t){return Tn(new Date(t))}function Te(t){return St(new Date(t))}function Tn(t){let n=Date.UTC(t.getUTCFullYear(),0,1);return it.count(n-1,t)}function St(t){let n=Date.UTC(t.getUTCFullYear(),0,1);return qt.count(n-1,t)}function Ft(t){return Y.setTime(Date.UTC(t,0,1)),Y.getUTCDay()}function we(t,n,r,e,a,u,o){if(0<=t&&t<100){let i=new Date(Date.UTC(-1,n,r,e,a,u,o));return i.setUTCFullYear(r.y),i}return new Date(Date.UTC(t,n,r,e,a,u,o))}function wn(t,n,r,e,a){let u=n||1,o=P(t),i=(C,x,j)=>(j||(j=C),je(r[j],e[j],C===o&&u,x)),c=new Date,l=gn(t),h=l.year?i(b):an(2012),s=l.month?i(w):l.quarter?i(D):I,f=l.week&&l.day?i("day",1,M+"day"):l.week?i(M,1):l.day?i("day",1):l.date?i(k,1):l.dayofyear?i(F,1):Kt,g=l.hours?i(O):I,p=l.minutes?i(U):I,m=l.seconds?i(A):I,d=l.milliseconds?i(S):I;return function(C){c.setTime(+C);let x=h(c);return a(x,s(c),f(c,x),g(c),p(c),m(c),d(c))}}function je(t,n,r,e){let a=r<=1?t:e?(u,o)=>e+r*Math.floor((t(u,o)-e)/r):(u,o)=>r*Math.floor(t(u,o)/r);return n?(u,o)=>n(a(u,o),o):a}function L(t,n,r){return n+t*7-(r+6)%7}var De={[b]:t=>t.getFullYear(),[D]:t=>Math.floor(t.getMonth()/3),[w]:t=>t.getMonth(),[k]:t=>t.getDate(),[O]:t=>t.getHours(),[U]:t=>t.getMinutes(),[A]:t=>t.getSeconds(),[S]:t=>t.getMilliseconds(),[F]:t=>Cn(t),[M]:t=>At(t),[M+"day"]:(t,n)=>L(At(t),t.getDay(),Et(n)),day:(t,n)=>L(1,t.getDay(),Et(n))},ke={[D]:t=>3*t,[M]:(t,n)=>L(t,0,Et(n))};function Oe(t,n){return wn(t,n||1,De,ke,Me)}var Ue={[b]:t=>t.getUTCFullYear(),[D]:t=>Math.floor(t.getUTCMonth()/3),[w]:t=>t.getUTCMonth(),[k]:t=>t.getUTCDate(),[O]:t=>t.getUTCHours(),[U]:t=>t.getUTCMinutes(),[A]:t=>t.getUTCSeconds(),[S]:t=>t.getUTCMilliseconds(),[F]:t=>Tn(t),[M]:t=>St(t),day:(t,n)=>L(1,t.getUTCDay(),Ft(n)),[M+"day"]:(t,n)=>L(St(t),t.getUTCDay(),Ft(n))},xe={[D]:t=>3*t,[M]:(t,n)=>L(t,0,Ft(n))};function Ne(t,n){return wn(t,n||1,Ue,xe,we)}var Ae={[b]:nr,[D]:Ht.every(3),[w]:Ht,[M]:Zt,[k]:st,day:st,[F]:st,[O]:or,[U]:Vn,[A]:Jt,[S]:Wt},Ee={[b]:er,[D]:Gt.every(3),[w]:Gt,[M]:qt,[k]:it,day:it,[F]:it,[O]:Qn,[U]:ur,[A]:Jt,[S]:Wt};function dt(t){return Ae[t]}function yt(t){return Ee[t]}function jn(t,n,r){return t?t.offset(n,r):void 0}function Se(t,n,r){return jn(dt(t),n,r)}function Fe(t,n,r){return jn(yt(t),n,r)}function Dn(t,n,r,e){return t?t.range(n,r,e):void 0}function Pe(t,n,r,e){return Dn(dt(t),n,r,e)}function ze(t,n,r,e){return Dn(yt(t),n,r,e)}var Z=1e3,V=Z*60,Q=V*60,vt=Q*24,Ye=vt*7,kn=vt*30,Pt=vt*365,On=[b,w,k,O,U,A,S],K=On.slice(0,-1),X=K.slice(0,-1),tt=X.slice(0,-1),Ie=tt.slice(0,-1),$e=[b,M],Un=[b,w],xn=[b],nt=[[K,1,Z],[K,5,5*Z],[K,15,15*Z],[K,30,30*Z],[X,1,V],[X,5,5*V],[X,15,15*V],[X,30,30*V],[tt,1,Q],[tt,3,3*Q],[tt,6,6*Q],[tt,12,12*Q],[Ie,1,vt],[$e,1,Ye],[Un,1,kn],[Un,3,3*kn],[xn,1,Pt]];function Re(t){let n=t.extent,r=t.maxbins||40,e=Math.abs(ln(n))/r,a=Jn(i=>i[2]).right(nt,e),u,o;return a===nt.length?(u=xn,o=Tt(n[0]/Pt,n[1]/Pt,r)):a?(a=nt[e/nt[a-1][2]<nt[a][2]/e?a-1:a],u=a[0],o=a[1]):(u=On,o=Math.max(Tt(n[0],n[1],r),1)),{units:u,step:o}}function rt(t){let n={};return r=>n[r]||(n[r]=t(r))}function Be(t,n){return r=>{let e=t(r),a=e.indexOf(n);if(a<0)return e;let u=Le(e,a),o=u<e.length?e.slice(u):"";for(;--u>a;)if(e[u]!=="0"){++u;break}return e.slice(0,u)+o}}function Le(t,n){let r=t.lastIndexOf("e"),e;if(r>0)return r;for(r=t.length;--r>n;)if(e=t.charCodeAt(r),e>=48&&e<=57)return r+1}function Nn(t){let n=rt(t.format),r=t.formatPrefix;return{format:n,formatPrefix:r,formatFloat(e){let a=_t(e||",");if(a.precision==null){switch(a.precision=12,a.type){case"%":a.precision-=2;break;case"e":--a.precision;break}return Be(n(a),n(".1f")(1)[1])}else return n(a)},formatSpan(e,a,u,o){o=_t(o??",f");let i=Tt(e,a,u),c=Math.max(Math.abs(e),Math.abs(a)),l;if(o.precision==null)switch(o.type){case"s":return isNaN(l=_n(i,c))||(o.precision=l),r(o,c);case"":case"e":case"g":case"p":case"r":isNaN(l=qn(i,c))||(o.precision=l-(o.type==="e"));break;case"f":case"%":isNaN(l=Wn(i))||(o.precision=l-(o.type==="%")*2);break}return n(o)}}}var zt;An();function An(){return zt=Nn({format:Zn,formatPrefix:Hn})}function En(t){return Nn(Gn(t))}function bt(t){return arguments.length?zt=En(t):zt}function Sn(t,n,r){r||(r={}),$(r)||v(`Invalid time multi-format specifier: ${r}`);let e=n(A),a=n(U),u=n(O),o=n(k),i=n(M),c=n(w),l=n(D),h=n(b),s=t(r.milliseconds||".%L"),f=t(r.seconds||":%S"),g=t(r.minutes||"%I:%M"),p=t(r.hours||"%I %p"),m=t(r.date||r.day||"%a %d"),d=t(r.week||"%b %d"),C=t(r.month||"%B"),x=t(r.quarter||"%B"),j=t(r.year||"%Y");return y=>(e(y)<y?s:a(y)<y?f:u(y)<y?g:o(y)<y?p:c(y)<y?i(y)<y?m:d:h(y)<y?l(y)<y?C:x:j)(y)}function Fn(t){let n=rt(t.format),r=rt(t.utcFormat);return{timeFormat:e=>pt(e)?n(e):Sn(n,dt,e),utcFormat:e=>pt(e)?r(e):Sn(r,yt,e),timeParse:rt(t.parse),utcParse:rt(t.utcParse)}}var Yt;Pn();function Pn(){return Yt=Fn({format:ar,parse:tr,utcFormat:rr,utcParse:Xn})}function zn(t){return Fn(Kn(t))}function et(t){return arguments.length?Yt=zn(t):Yt}var It=(t,n)=>z({},t,n);function _e(t,n){return It(t?En(t):bt(),n?zn(n):et())}function Yn(t,n){let r=arguments.length;return r&&r!==2&&v("defaultLocale expects either zero or two arguments."),r?It(bt(t),et(n)):It(bt(),et())}function We(){return An(),Pn(),Yn()}var Je=/^(data:|([A-Za-z]+:)?\/\/)/,qe=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,He=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Ge="file://";function Ze(t){return n=>({options:n||{},sanitize:Qe,load:Ve,fileAccess:!1,file:Ke(),http:ta})}async function Ve(t,n){let r=await this.sanitize(t,n),e=r.href;return r.localFile?this.file(e):this.http(e,n==null?void 0:n.http)}async function Qe(t,n){n=z({},this.options,n);let r=this.fileAccess,e={href:null},a,u,o,i=qe.test(t.replace(He,""));(t==null||typeof t!="string"||!i)&&v("Sanitize failure, invalid URI: "+mt(t));let c=Je.test(t);return(o=n.baseURL)&&!c&&(!t.startsWith("/")&&!o.endsWith("/")&&(t="/"+t),t=o+t),u=(a=t.startsWith(Ge))||n.mode==="file"||n.mode!=="http"&&!c&&r,a?t=t.slice(7):t.startsWith("//")&&(n.defaultProtocol==="file"?(t=t.slice(2),u=!0):t=(n.defaultProtocol||"http")+":"+t),Object.defineProperty(e,"localFile",{value:!!u}),e.href=t,n.target&&(e.target=n.target+""),n.rel&&(e.rel=n.rel+""),n.context==="image"&&n.crossOrigin&&(e.crossOrigin=n.crossOrigin+""),e}function Ke(t){return Xe}async function Xe(){v("No file system access.")}async function ta(t,n){let r=z({},this.options.http,n),e=n&&n.response,a=await fetch(t,r);return a.ok?B(a[e])?a[e]():a.text():v(a.status+""+a.statusText)}var na=t=>t!=null&&t===t,ra=t=>t==="true"||t==="false"||t===!0||t===!1,ea=t=>!Number.isNaN(Date.parse(t)),In=t=>!Number.isNaN(+t)&&!(t instanceof Date),aa=t=>In(t)&&Number.isInteger(+t),$t={boolean:cn,integer:q,number:q,date:fn,string:hn,unknown:W},Mt=[ra,aa,In,ea],ua=["boolean","integer","number","date"];function $n(t,n){if(!t||!t.length)return"unknown";let r=t.length,e=Mt.length,a=Mt.map((u,o)=>o+1);for(let u=0,o=0,i,c;u<r;++u)for(c=n?t[u][n]:t[u],i=0;i<e;++i)if(a[i]&&na(c)&&!Mt[i](c)&&(a[i]=0,++o,o===Mt.length))return"string";return ua[a.reduce((u,o)=>u===0?o:u,0)-1]}function Rn(t,n){return n.reduce((r,e)=>(r[e]=$n(t,e),r),{})}function Bn(t){let n=function(r,e){let a={delimiter:t};return Rt(r,e?z(e,a):a)};return n.responseType="text",n}function Rt(t,n){return n.header&&(t=n.header.map(mt).join(n.delimiter)+`
`+t),oe(n.delimiter).parse(t+"")}Rt.responseType="text";function oa(t){return typeof Buffer=="function"&&B(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function Bt(t,n){let r=n&&n.property?lt(n.property):W;return $(t)&&!oa(t)?ia(r(t),n):r(JSON.parse(t))}Bt.responseType="json";function ia(t,n){return!J(t)&&on(t)&&(t=[...t]),n&&n.copy?JSON.parse(JSON.stringify(t)):t}var sa={interior:(t,n)=>t!==n,exterior:(t,n)=>t===n};function Ln(t,n){let r,e,a,u;return t=Bt(t,n),n&&n.feature?(r=ce,a=n.feature):n&&n.mesh?(r=he,a=n.mesh,u=sa[n.filter]):v("Missing TopoJSON feature or mesh parameter."),e=(e=t.objects[a])?r(t,e,u):v("Invalid TopoJSON object: "+a),e&&e.features||[e]}Ln.responseType="json";var Ct={dsv:Rt,csv:Bn(","),tsv:Bn(" "),json:Bt,topojson:Ln};function Lt(t,n){return arguments.length>1?(Ct[t]=n,this):N(Ct,t)?Ct[t]:null}function la(t){let n=Lt(t);return n&&n.responseType||"text"}function ca(t,n,r,e){n||(n={});let a=Lt(n.type||"json");return a||v("Unknown data format type: "+n.type),t=a(t,n),n.parse&&fa(t,n.parse,r,e),N(t,"columns")&&delete t.columns,t}function fa(t,n,r,e){if(!t.length)return;let a=et();r||(r=a.timeParse),e||(e=a.utcParse);let u=t.columns||Object.keys(t[0]),o,i,c,l,h,s;n==="auto"&&(n=Rn(t,u)),u=Object.keys(n);let f=u.map(g=>{let p=n[g],m,d;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return m=p.split(/:(.+)?/,2),d=m[1],(d[0]==="'"&&d[d.length-1]==="'"||d[0]==='"'&&d[d.length-1]==='"')&&(d=d.slice(1,-1)),(m[0]==="utc"?e:r)(d);if(!$t[p])throw Error("Illegal format pattern: "+g+":"+p);return $t[p]});for(c=0,h=t.length,s=u.length;c<h;++c)for(o=t[c],l=0;l<s;++l)i=u[l],o[i]=f[l](o[i])}var ha=Ze();export{Sr as $,Or as $t,Se as A,Cr as At,be as B,ln as Bt,bn as C,Hr as Ct,ve as D,Mr as Dt,Re as E,Zr as Et,yt as F,Dr as Ft,vr as G,gn as Gt,br as H,cn as Ht,Fe as I,kr as It,E as J,fr as Jt,mr as K,hn as Kt,ze as L,P as Lt,ye as M,Xr as Mt,Mn as N,wr as Nt,Oe as O,Qr as Ot,Ne as P,jr as Pt,Dt as Q,I as Qt,Ce as R,Ar as Rt,A as S,$ as St,b as T,Gr as Tt,gr as U,fn as Ut,mt as V,wt as Vt,dr as W,q as Wt,ir as X,re as Xt,Vt as Y,Er as Yt,R as Z,jt as Zt,O as _,qr as _t,ha as a,Rr as at,w as b,on as bt,$t as c,Lr as ct,bt as d,N as dt,Ur as en,Pr as et,We as f,cr as ft,F as g,J as gt,me as h,Jr as ht,Rn as i,z as it,Pe as j,Kt as jt,dt as k,Kr as kt,Yn as l,lt,k as m,Wr as mt,Lt as n,Nr as nn,$r as nt,ca as o,Br as ot,et as p,W as pt,yr as q,ne as qt,$n as r,v as rt,la as s,hr as st,Ct as t,xr as tn,an as tt,_e as u,_r as ut,S as v,un as vt,M as w,pt as wt,D as x,sn as xt,U as y,B as yt,Te as z,H as zt};
import{t as o}from"./velocity-DRewaasJ.js";export{o as velocity};
function o(t){for(var e={},r=t.split(" "),n=0;n<r.length;++n)e[r[n]]=!0;return e}var f=o("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),i=o("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),c=o("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"),k=/[+\-*&%=<>!?:\/|]/;function s(t,e,r){return e.tokenize=r,r(t,e)}function l(t,e){var r=e.beforeParams;e.beforeParams=!1;var n=t.next();if(n=="'"&&!e.inString&&e.inParams)return e.lastTokenWasBuiltin=!1,s(t,e,m(n));if(n=='"'){if(e.lastTokenWasBuiltin=!1,e.inString)return e.inString=!1,"string";if(e.inParams)return s(t,e,m(n))}else{if(/[\[\]{}\(\),;\.]/.test(n))return n=="("&&r?e.inParams=!0:n==")"&&(e.inParams=!1,e.lastTokenWasBuiltin=!0),null;if(/\d/.test(n))return e.lastTokenWasBuiltin=!1,t.eatWhile(/[\w\.]/),"number";if(n=="#"&&t.eat("*"))return e.lastTokenWasBuiltin=!1,s(t,e,p);if(n=="#"&&t.match(/ *\[ *\[/))return e.lastTokenWasBuiltin=!1,s(t,e,h);if(n=="#"&&t.eat("#"))return e.lastTokenWasBuiltin=!1,t.skipToEnd(),"comment";if(n=="$")return t.eat("!"),t.eatWhile(/[\w\d\$_\.{}-]/),c&&c.propertyIsEnumerable(t.current())?"keyword":(e.lastTokenWasBuiltin=!0,e.beforeParams=!0,"builtin");if(k.test(n))return e.lastTokenWasBuiltin=!1,t.eatWhile(k),"operator";t.eatWhile(/[\w\$_{}@]/);var a=t.current();return f&&f.propertyIsEnumerable(a)?"keyword":i&&i.propertyIsEnumerable(a)||t.current().match(/^#@?[a-z0-9_]+ *$/i)&&t.peek()=="("&&!(i&&i.propertyIsEnumerable(a.toLowerCase()))?(e.beforeParams=!0,e.lastTokenWasBuiltin=!1,"keyword"):e.inString?(e.lastTokenWasBuiltin=!1,"string"):t.pos>a.length&&t.string.charAt(t.pos-a.length-1)=="."&&e.lastTokenWasBuiltin?"builtin":(e.lastTokenWasBuiltin=!1,null)}}function m(t){return function(e,r){for(var n=!1,a,u=!1;(a=e.next())!=null;){if(a==t&&!n){u=!0;break}if(t=='"'&&e.peek()=="$"&&!n){r.inString=!0,u=!0;break}n=!n&&a=="\\"}return u&&(r.tokenize=l),"string"}}function p(t,e){for(var r=!1,n;n=t.next();){if(n=="#"&&r){e.tokenize=l;break}r=n=="*"}return"comment"}function h(t,e){for(var r=0,n;n=t.next();){if(n=="#"&&r==2){e.tokenize=l;break}n=="]"?r++:n!=" "&&(r=0)}return"meta"}const b={name:"velocity",startState:function(){return{tokenize:l,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(t,e){return t.eatSpace()?null:e.tokenize(t,e)},languageData:{commentTokens:{line:"##",block:{open:"#*",close:"*#"}}}};export{b as t};
import{n as o,t as r}from"./verilog-DmcGbw8B.js";export{r as tlv,o as verilog};
function T(i){var r=i.statementIndentUnit,s=i.dontAlignCalls,c=i.noIndentKeywords||[],m=i.multiLineStrings,l=i.hooks||{};function v(e){for(var n={},t=e.split(" "),a=0;a<t.length;++a)n[t[a]]=!0;return n}var g=v("accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor"),b=/[\+\-\*\/!~&|^%=?:]/,h=/[\[\]{}()]/,k=/\d[0-9_]*/,_=/\d*\s*'s?d\s*\d[0-9_]*/i,S=/\d*\s*'s?b\s*[xz01][xz01_]*/i,M=/\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i,U=/\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i,$=/(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i,D=/^((\w+)|[)}\]])/,V=/[)}\]]/,u,p,K=v("case checker class clocking config function generate interface module package primitive program property specify sequence table task"),d={};for(var y in K)d[y]="end"+y;for(var P in d.begin="end",d.casex="endcase",d.casez="endcase",d.do="while",d.fork="join;join_any;join_none",d.covergroup="endgroup",c){var y=c[P];d[y]&&(d[y]=void 0)}var R=v("always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while");function x(e,n){var t=e.peek(),a;if(l[t]&&(a=l[t](e,n))!=0||l.tokenBase&&(a=l.tokenBase(e,n))!=0)return a;if(/[,;:\.]/.test(t))return u=e.next(),null;if(h.test(t))return u=e.next(),"bracket";if(t=="`")return e.next(),e.eatWhile(/[\w\$_]/)?"def":null;if(t=="$")return e.next(),e.eatWhile(/[\w\$_]/)?"meta":null;if(t=="#")return e.next(),e.eatWhile(/[\d_.]/),"def";if(t=='"')return e.next(),n.tokenize=F(t),n.tokenize(e,n);if(t=="/"){if(e.next(),e.eat("*"))return n.tokenize=A,A(e,n);if(e.eat("/"))return e.skipToEnd(),"comment";e.backUp(1)}if(e.match($)||e.match(_)||e.match(S)||e.match(M)||e.match(U)||e.match(k)||e.match($))return"number";if(e.eatWhile(b))return"meta";if(e.eatWhile(/[\w\$_]/)){var o=e.current();return g[o]?(d[o]&&(u="newblock"),R[o]&&(u="newstatement"),p=o,"keyword"):"variable"}return e.next(),null}function F(e){return function(n,t){for(var a=!1,o,w=!1;(o=n.next())!=null;){if(o==e&&!a){w=!0;break}a=!a&&o=="\\"}return(w||!(a||m))&&(t.tokenize=x),"string"}}function A(e,n){for(var t=!1,a;a=e.next();){if(a=="/"&&t){n.tokenize=x;break}t=a=="*"}return"comment"}function B(e,n,t,a,o){this.indented=e,this.column=n,this.type=t,this.align=a,this.prev=o}function f(e,n,t){var a=e.indented;return e.context=new B(a,n,t,null,e.context)}function j(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}function q(e,n){if(e==n)return!0;var t=n.split(";");for(var a in t)if(e==t[a])return!0;return!1}function G(){var e=[];for(var n in d)if(d[n]){var t=d[n].split(";");for(var a in t)e.push(t[a])}return RegExp("[{}()\\[\\]]|("+e.join("|")+")$")}return{name:"verilog",startState:function(e){var n={tokenize:null,context:new B(-e,0,"top",!1),indented:0,startOfLine:!0};return l.startState&&l.startState(n),n},token:function(e,n){var t=n.context;if(e.sol()&&(t.align??(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),l.token){var a=l.token(e,n);if(a!==void 0)return a}if(e.eatSpace())return null;u=null,p=null;var a=(n.tokenize||x)(e,n);if(a=="comment"||a=="meta"||a=="variable")return a;if(t.align??(t.align=!0),u==t.type)j(n);else if(u==";"&&t.type=="statement"||t.type&&q(p,t.type))for(t=j(n);t&&t.type=="statement";)t=j(n);else if(u=="{")f(n,e.column(),"}");else if(u=="[")f(n,e.column(),"]");else if(u=="(")f(n,e.column(),")");else if(t&&t.type=="endcase"&&u==":")f(n,e.column(),"statement");else if(u=="newstatement")f(n,e.column(),"statement");else if(u=="newblock"&&!(p=="function"&&t&&(t.type=="statement"||t.type=="endgroup"))&&!(p=="task"&&t&&t.type=="statement")){var o=d[p];f(n,e.column(),o)}return n.startOfLine=!1,a},indent:function(e,n,t){if(e.tokenize!=x&&e.tokenize!=null)return null;if(l.indent){var a=l.indent(e);if(a>=0)return a}var o=e.context,w=n&&n.charAt(0);o.type=="statement"&&w=="}"&&(o=o.prev);var I=!1,E=n.match(D);return E&&(I=q(E[0],o.type)),o.type=="statement"?o.indented+(w=="{"?0:r||t.unit):V.test(o.type)&&o.align&&!s?o.column+(I?0:1):o.type==")"&&!I?o.indented+(r||t.unit):o.indented+(I?0:t.unit)},languageData:{indentOnInput:G(),commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}}}const H=T({});var N={"|":"link",">":"property",$:"variable",$$:"variable","?$":"qualifier","?*":"qualifier","-":"contentSeparator","/":"property","/-":"property","@":"variableName.special","@-":"variableName.special","@++":"variableName.special","@+=":"variableName.special","@+=-":"variableName.special","@--":"variableName.special","@-=":"variableName.special","%+":"tag","%-":"tag","%":"tag",">>":"tag","<<":"tag","<>":"tag","#":"tag","^":"attribute","^^":"attribute","^!":"attribute","*":"variable","**":"variable","\\":"keyword",'"':"comment"},O={"/":"beh-hier",">":"beh-hier","-":"phys-hier","|":"pipe","?":"when","@":"stage","\\":"keyword"},z=3,C=!1,L=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,J=/^[! ] */,W=/^\/[\/\*]/;const Q=T({hooks:{electricInput:!1,token:function(i,r){var s=void 0,c;if(i.sol()&&!r.tlvInBlockComment){i.peek()=="\\"&&(s="def",i.skipToEnd(),i.string.match(/\\SV/)?r.tlvCodeActive=!1:i.string.match(/\\TLV/)&&(r.tlvCodeActive=!0)),r.tlvCodeActive&&i.pos==0&&r.indented==0&&(c=i.match(J,!1))&&(r.indented=c[0].length);var m=r.indented,l=m/z;if(l<=r.tlvIndentationStyle.length){var v=i.string.length==m,g=l*z;if(g<i.string.length){var b=i.string.slice(g),h=b[0];O[h]&&(c=b.match(L))&&N[c[1]]&&(m+=z,h=="\\"&&g>0||(r.tlvIndentationStyle[l]=O[h],C&&(r.statementComment=!1),l++))}if(!v)for(;r.tlvIndentationStyle.length>l;)r.tlvIndentationStyle.pop()}r.tlvNextIndent=m}if(r.tlvCodeActive){var k=!1;C&&(k=i.peek()!=" "&&s===void 0&&!r.tlvInBlockComment&&i.column()==r.tlvIndentationStyle.length*z,k&&(r.statementComment&&(k=!1),r.statementComment=i.match(W,!1)));var c;if(s===void 0)if(r.tlvInBlockComment)i.match(/^.*?\*\//)?(r.tlvInBlockComment=!1,C&&!i.eol()&&(r.statementComment=!1)):i.skipToEnd(),s="comment";else if((c=i.match(W))&&!r.tlvInBlockComment)c[0]=="//"?i.skipToEnd():r.tlvInBlockComment=!0,s="comment";else if(c=i.match(L)){var _=c[1],S=c[2];N.hasOwnProperty(_)&&(S.length>0||i.eol())?s=N[_]:i.backUp(i.current().length-1)}else i.match(/^\t+/)?s="invalid":i.match(/^[\[\]{}\(\);\:]+/)?s="meta":(c=i.match(/^[mM]4([\+_])?[\w\d_]*/))?s=c[1]=="+"?"keyword.special":"keyword":i.match(/^ +/)?i.eol()&&(s="error"):i.match(/^[\w\d_]+/)?s="number":i.next()}else i.match(/^[mM]4([\w\d_]*)/)&&(s="keyword");return s},indent:function(i){return i.tlvCodeActive==1?i.tlvNextIndent:-1},startState:function(i){i.tlvIndentationStyle=[],i.tlvCodeActive=!0,i.tlvNextIndent=-1,i.tlvInBlockComment=!1,C&&(i.statementComment=!1)}}});export{H as n,Q as t};
import{t as o}from"./vhdl-C6ktucee.js";export{o as vhdl};
function c(n){for(var t={},e=n.split(","),r=0;r<e.length;++r){var i=e[r].toUpperCase(),a=e[r].charAt(0).toUpperCase()+e[r].slice(1);t[e[r]]=!0,t[i]=!0,t[a]=!0}return t}function f(n){return n.eatWhile(/[\w\$_]/),"meta"}var g=c("null"),p={"`":f,$:f},d=!1,b=c("abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,end block,end case,end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for,function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage,literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map,postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor"),h=c("architecture,entity,begin,case,port,else,elsif,end,for,function,if"),m=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/,o;function l(n,t){var e=n.next();if(p[e]){var r=p[e](n,t);if(r!==!1)return r}if(e=='"')return t.tokenize=v(e),t.tokenize(n,t);if(e=="'")return t.tokenize=k(e),t.tokenize(n,t);if(/[\[\]{}\(\),;\:\.]/.test(e))return o=e,null;if(/[\d']/.test(e))return n.eatWhile(/[\w\.']/),"number";if(e=="-"&&n.eat("-"))return n.skipToEnd(),"comment";if(m.test(e))return n.eatWhile(m),"operator";n.eatWhile(/[\w\$_]/);var i=n.current();return b.propertyIsEnumerable(i.toLowerCase())?(h.propertyIsEnumerable(i)&&(o="newstatement"),"keyword"):g.propertyIsEnumerable(i)?"atom":"variable"}function k(n){return function(t,e){for(var r=!1,i,a=!1;(i=t.next())!=null;){if(i==n&&!r){a=!0;break}r=!r&&i=="--"}return(a||!(r||d))&&(e.tokenize=l),"string"}}function v(n){return function(t,e){for(var r=!1,i,a=!1;(i=t.next())!=null;){if(i==n&&!r){a=!0;break}r=!r&&i=="--"}return(a||!(r||d))&&(e.tokenize=l),"string.special"}}function y(n,t,e,r,i){this.indented=n,this.column=t,this.type=e,this.align=r,this.prev=i}function s(n,t,e){return n.context=new y(n.indented,t,e,null,n.context)}function u(n){var t=n.context.type;return(t==")"||t=="]"||t=="}")&&(n.indented=n.context.indented),n.context=n.context.prev}const x={name:"vhdl",startState:function(n){return{tokenize:null,context:new y(-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(n,t){var e=t.context;if(n.sol()&&(e.align??(e.align=!1),t.indented=n.indentation(),t.startOfLine=!0),n.eatSpace())return null;o=null;var r=(t.tokenize||l)(n,t);if(r=="comment"||r=="meta")return r;if(e.align??(e.align=!0),(o==";"||o==":")&&e.type=="statement")u(t);else if(o=="{")s(t,n.column(),"}");else if(o=="[")s(t,n.column(),"]");else if(o=="(")s(t,n.column(),")");else if(o=="}"){for(;e.type=="statement";)e=u(t);for(e.type=="}"&&(e=u(t));e.type=="statement";)e=u(t)}else o==e.type?u(t):(e.type=="}"||e.type=="top"||e.type=="statement"&&o=="newstatement")&&s(t,n.column(),"statement");return t.startOfLine=!1,r},indent:function(n,t,e){if(n.tokenize!=l&&n.tokenize!=null)return 0;var r=t&&t.charAt(0),i=n.context,a=r==i.type;return i.type=="statement"?i.indented+(r=="{"?0:e.unit):i.align?i.column+(a?0:1):i.indented+(a?0:e.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"--"}}};export{x as t};
var L,p,y,k,x,D=-1,m=function(n){addEventListener("pageshow",(function(e){e.persisted&&(D=e.timeStamp,n(e))}),!0)},F=function(){var n=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(n&&n.responseStart>0&&n.responseStart<performance.now())return n},S=function(){var n=F();return n&&n.activationStart||0},d=function(n,e){var t=F(),r="navigate";return D>=0?r="back-forward-cache":t&&(document.prerendering||S()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-"))),{name:n,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},h=function(n,e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(n)){var r=new PerformanceObserver((function(i){Promise.resolve().then((function(){e(i.getEntries())}))}));return r.observe(Object.assign({type:n,buffered:!0},t||{})),r}}catch{}},l=function(n,e,t,r){var i,a;return function(c){e.value>=0&&(c||r)&&((a=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=a,e.rating=(function(o,u){return o>u[1]?"poor":o>u[0]?"needs-improvement":"good"})(e.value,t),n(e))}},w=function(n){requestAnimationFrame((function(){return requestAnimationFrame((function(){return n()}))}))},E=function(n){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&n()}))},P=function(n){var e=!1;return function(){e||(e=(n(),!0))}},v=-1,R=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},T=function(n){document.visibilityState==="hidden"&&v>-1&&(v=n.type==="visibilitychange"?n.timeStamp:0,V())},q=function(){addEventListener("visibilitychange",T,!0),addEventListener("prerenderingchange",T,!0)},V=function(){removeEventListener("visibilitychange",T,!0),removeEventListener("prerenderingchange",T,!0)},H=function(){return v<0&&(v=R(),q(),m((function(){setTimeout((function(){v=R(),q()}),0)}))),{get firstHiddenTime(){return v}}},I=function(n){document.prerendering?addEventListener("prerenderingchange",(function(){return n()}),!0):n()},N=[1800,3e3],W=function(n,e){e||(e={}),I((function(){var t,r=H(),i=d("FCP"),a=h("paint",(function(c){c.forEach((function(o){o.name==="first-contentful-paint"&&(a.disconnect(),o.startTime<r.firstHiddenTime&&(i.value=Math.max(o.startTime-S(),0),i.entries.push(o),t(!0)))}))}));a&&(t=l(n,i,N,e.reportAllChanges),m((function(c){i=d("FCP"),t=l(n,i,N,e.reportAllChanges),w((function(){i.value=performance.now()-c.timeStamp,t(!0)}))})))}))},O=[.1,.25],Y=function(n,e){e||(e={}),W(P((function(){var t,r=d("CLS",0),i=0,a=[],c=function(u){u.forEach((function(f){if(!f.hadRecentInput){var K=a[0],U=a[a.length-1];i&&f.startTime-U.startTime<1e3&&f.startTime-K.startTime<5e3?(i+=f.value,a.push(f)):(i=f.value,a=[f])}})),i>r.value&&(r.value=i,r.entries=a,t())},o=h("layout-shift",c);o&&(t=l(n,r,O,e.reportAllChanges),E((function(){c(o.takeRecords()),t(!0)})),m((function(){i=0,r=d("CLS",0),t=l(n,r,O,e.reportAllChanges),w((function(){return t()}))})),setTimeout(t,0))})))},B=0,A=1/0,b=0,Q=function(n){n.forEach((function(e){e.interactionId&&(A=Math.min(A,e.interactionId),b=Math.max(b,e.interactionId),B=b?(b-A)/7+1:0)}))},j=function(){return L?B:performance.interactionCount||0},X=function(){"interactionCount"in performance||L||(L=h("event",Q,{type:"event",buffered:!0,durationThreshold:0}))},s=[],C=new Map,_=0,Z=function(){return s[Math.min(s.length-1,Math.floor((j()-_)/50))]},nn=[],en=function(n){if(nn.forEach((function(i){return i(n)})),n.interactionId||n.entryType==="first-input"){var e=s[s.length-1],t=C.get(n.interactionId);if(t||s.length<10||n.duration>e.latency){if(t)n.duration>t.latency?(t.entries=[n],t.latency=n.duration):n.duration===t.latency&&n.startTime===t.entries[0].startTime&&t.entries.push(n);else{var r={id:n.interactionId,latency:n.duration,entries:[n]};C.set(r.id,r),s.push(r)}s.sort((function(i,a){return a.latency-i.latency})),s.length>10&&s.splice(10).forEach((function(i){return C.delete(i.id)}))}}},$=function(n){var e=self.requestIdleCallback||self.setTimeout,t=-1;return n=P(n),document.visibilityState==="hidden"?n():(t=e(n),E(n)),t},z=[200,500],tn=function(n,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e||(e={}),I((function(){X();var t,r=d("INP"),i=function(c){$((function(){c.forEach(en);var o=Z();o&&o.latency!==r.value&&(r.value=o.latency,r.entries=o.entries,t())}))},a=h("event",i,{durationThreshold:e.durationThreshold??40});t=l(n,r,z,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),E((function(){i(a.takeRecords()),t(!0)})),m((function(){_=j(),s.length=0,C.clear(),r=d("INP"),t=l(n,r,z,e.reportAllChanges)})))})))},G=[2500,4e3],M={},rn=function(n,e){e||(e={}),I((function(){var t,r=H(),i=d("LCP"),a=function(u){e.reportAllChanges||(u=u.slice(-1)),u.forEach((function(f){f.startTime<r.firstHiddenTime&&(i.value=Math.max(f.startTime-S(),0),i.entries=[f],t())}))},c=h("largest-contentful-paint",a);if(c){t=l(n,i,G,e.reportAllChanges);var o=P((function(){M[i.id]||(a(c.takeRecords()),c.disconnect(),M[i.id]=!0,t(!0))}));["keydown","click"].forEach((function(u){addEventListener(u,(function(){return $(o)}),{once:!0,capture:!0})})),E(o),m((function(u){i=d("LCP"),t=l(n,i,G,e.reportAllChanges),w((function(){i.value=performance.now()-u.timeStamp,M[i.id]=!0,t(!0)}))}))}}))},g={passive:!0,capture:!0},an=new Date,J=function(n,e){p||(p=e,y=n,k=new Date,un(removeEventListener),on())},on=function(){if(y>=0&&y<k-an){var n={entryType:"first-input",name:p.type,target:p.target,cancelable:p.cancelable,startTime:p.timeStamp,processingStart:p.timeStamp+y};x.forEach((function(e){e(n)})),x=[]}},cn=function(n){if(n.cancelable){var e=(n.timeStamp>1e12?new Date:performance.now())-n.timeStamp;n.type=="pointerdown"?(function(t,r){var i=function(){J(t,r),c()},a=function(){c()},c=function(){removeEventListener("pointerup",i,g),removeEventListener("pointercancel",a,g)};addEventListener("pointerup",i,g),addEventListener("pointercancel",a,g)})(e,n):J(e,n)}},un=function(n){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return n(e,cn,g)}))};export{Y as onCLS,tn as onINP,rn as onLCP};
import{t as e}from"./webidl-DHu7cr9_.js";export{e as webIDL};
function a(t){return RegExp("^(("+t.join(")|(")+"))\\b")}var i=["Clamp","Constructor","EnforceRange","Exposed","ImplicitThis","Global","PrimaryGlobal","LegacyArrayClass","LegacyUnenumerableNamedProperties","LenientThis","NamedConstructor","NewObject","NoInterfaceObject","OverrideBuiltins","PutForwards","Replaceable","SameObject","TreatNonObjectAsNull","TreatNullAs","EmptyString","Unforgeable","Unscopeable"],s=a(i),o="unsigned.short.long.unrestricted.float.double.boolean.byte.octet.Promise.ArrayBuffer.DataView.Int8Array.Int16Array.Int32Array.Uint8Array.Uint16Array.Uint32Array.Uint8ClampedArray.Float32Array.Float64Array.ByteString.DOMString.USVString.sequence.object.RegExp.Error.DOMException.FrozenArray.any.void".split("."),u=a(o),c=["attribute","callback","const","deleter","dictionary","enum","getter","implements","inherit","interface","iterable","legacycaller","maplike","partial","required","serializer","setlike","setter","static","stringifier","typedef","optional","readonly","or"],f=a(c),l=["true","false","Infinity","NaN","null"],d=a(l),y=a(["callback","dictionary","enum","interface"]),p=a(["typedef"]),b=/^[:<=>?]/,h=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,g=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,m=/^_?[A-Za-z][0-9A-Z_a-z-]*/,A=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,D=/^"[^"]*"/,k=/^\/\*.*?\*\//,E=/^\/\*.*/,C=/^.*?\*\//;function N(t,e){if(t.eatSpace())return null;if(e.inComment)return t.match(C)?(e.inComment=!1,"comment"):(t.skipToEnd(),"comment");if(t.match("//"))return t.skipToEnd(),"comment";if(t.match(k))return"comment";if(t.match(E))return e.inComment=!0,"comment";if(t.match(/^-?[0-9\.]/,!1)&&(t.match(h)||t.match(g)))return"number";if(t.match(D))return"string";if(e.startDef&&t.match(m))return"def";if(e.endDef&&t.match(A))return e.endDef=!1,"def";if(t.match(f))return"keyword";if(t.match(u)){var r=e.lastToken,n=(t.match(/^\s*(.+?)\b/,!1)||[])[1];return r===":"||r==="implements"||n==="implements"||n==="="?"builtin":"type"}return t.match(s)?"builtin":t.match(d)?"atom":t.match(m)?"variable":t.match(b)?"operator":(t.next(),null)}const T={name:"webidl",startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(t,e){var r=N(t,e);if(r){var n=t.current();e.lastToken=n,r==="keyword"?(e.startDef=y.test(n),e.endDef=e.endDef||p.test(n)):e.startDef=!1}return r},languageData:{autocomplete:i.concat(o).concat(c).concat(l)}};export{T as t};

Sorry, the diff of this file is too big to display

import{t}from"./createLucideIcon-CnW3RofX.js";var e=t("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);export{e as t};
import{s as V}from"./chunk-LvLJmgfZ.js";import{t as B}from"./react-BGmjiNul.js";import{t as G}from"./compiler-runtime-DeeZ7FnK.js";import{t as H}from"./jsx-runtime-ZmTK25f3.js";import{t as W}from"./button-YC1gW_kJ.js";import{r as I}from"./requests-BsVD4CdD.js";import{c as J,i as O,n as Q,s as U,t as X}from"./select-V5IdpNiR.js";import{r as D}from"./input-pAun1m1X.js";import{t as E}from"./use-toast-rmUWldD_.js";import{a as Z,c as $,i as ee,n as te,r as re}from"./dialog-CxGKN4C_.js";import{t as ae}from"./links-DHZUhGz-.js";import{t as P}from"./label-Be1daUcS.js";import{r as L}from"./field-BEg1eC0P.js";var oe=G(),T=V(B(),1),t=V(H(),1);function ne(a){return a.sort((e,r)=>e.provider==="env"?1:r.provider==="env"?-1:0)}const le=a=>{let e=(0,oe.c)(43),{providerNames:r,onClose:A,onSuccess:F}=a,{writeSecret:Y}=I(),[o,M]=T.useState(""),[l,R]=T.useState(""),[n,z]=T.useState(r[0]),g;e[0]!==o||e[1]!==n||e[2]!==F||e[3]!==l||e[4]!==Y?(g=async s=>{if(s.preventDefault(),!n){E({title:"Error",description:"No location selected for the secret.",variant:"danger"});return}if(!o||!l||!n){E({title:"Error",description:"Please fill in all fields.",variant:"danger"});return}try{await Y({key:o,value:l,provider:"dotenv",name:n}),E({title:"Secret created",description:"The secret has been created successfully."}),F(o)}catch{E({title:"Error",description:"Failed to create secret. Please try again.",variant:"danger"})}},e[0]=o,e[1]=n,e[2]=F,e[3]=l,e[4]=Y,e[5]=g):g=e[5];let q=g,j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsxs)(Z,{children:[(0,t.jsx)($,{children:"Add Secret"}),(0,t.jsx)(re,{children:"Add a new secret to your environment variables."})]}),e[6]=j):j=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(P,{htmlFor:"key",children:"Key"}),e[7]=y):y=e[7];let S;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s=>{M(se(s.target.value))},e[8]=S):S=e[8];let i;e[9]===o?i=e[10]:(i=(0,t.jsxs)("div",{className:"grid gap-2",children:[y,(0,t.jsx)(D,{id:"key",value:o,onChange:S,placeholder:"MY_SECRET_KEY",required:!0})]}),e[9]=o,e[10]=i);let _;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(P,{htmlFor:"value",children:"Value"}),e[11]=_):_=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=s=>R(s.target.value),e[12]=b):b=e[12];let c;e[13]===l?c=e[14]:(c=(0,t.jsx)(D,{id:"value",type:"password",value:l,onChange:b,required:!0,autoComplete:"off"}),e[13]=l,e[14]=c);let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=ie()&&(0,t.jsx)(L,{children:"Note: You are sending this key over http."}),e[15]=C):C=e[15];let d;e[16]===c?d=e[17]:(d=(0,t.jsxs)("div",{className:"grid gap-2",children:[_,c,C]}),e[16]=c,e[17]=d);let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)(P,{htmlFor:"location",children:"Location"}),e[18]=N):N=e[18];let m;e[19]===r.length?m=e[20]:(m=r.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No dotenv locations configured."}),e[19]=r.length,e[20]=m);let h;e[21]!==n||e[22]!==r?(h=r.length>0&&(0,t.jsxs)(X,{value:n,onValueChange:s=>z(s),children:[(0,t.jsx)(U,{children:(0,t.jsx)(J,{placeholder:"Select a provider"})}),(0,t.jsx)(Q,{children:r.map(ce)})]}),e[21]=n,e[22]=r,e[23]=h):h=e[23];let k;e[24]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsxs)(L,{children:["You can configure the location by setting the"," ",(0,t.jsx)(ae,{href:"https://links.marimo.app/dotenv",children:"dotenv configuration"}),"."]}),e[24]=k):k=e[24];let p;e[25]!==m||e[26]!==h?(p=(0,t.jsxs)("div",{className:"grid gap-2",children:[N,m,h,k]}),e[25]=m,e[26]=h,e[27]=p):p=e[27];let u;e[28]!==d||e[29]!==p||e[30]!==i?(u=(0,t.jsxs)("div",{className:"grid gap-4 py-4",children:[i,d,p]}),e[28]=d,e[29]=p,e[30]=i,e[31]=u):u=e[31];let f;e[32]===A?f=e[33]:(f=(0,t.jsx)(W,{type:"button",variant:"outline",onClick:A,children:"Cancel"}),e[32]=A,e[33]=f);let K=!o||!l||!n,v;e[34]===K?v=e[35]:(v=(0,t.jsx)(W,{type:"submit",disabled:K,children:"Add Secret"}),e[34]=K,e[35]=v);let x;e[36]!==f||e[37]!==v?(x=(0,t.jsxs)(ee,{children:[f,v]}),e[36]=f,e[37]=v,e[38]=x):x=e[38];let w;return e[39]!==q||e[40]!==u||e[41]!==x?(w=(0,t.jsx)(te,{children:(0,t.jsxs)("form",{onSubmit:q,children:[j,u,x]})}),e[39]=q,e[40]=u,e[41]=x,e[42]=w):w=e[42],w};function se(a){return a.replaceAll(/\W/g,"_")}function ie(){return window.location.href.startsWith("http://")}function ce(a){return(0,t.jsx)(O,{value:a,children:a},a)}export{ne as n,le as t};
var p=Object.defineProperty;var y=(s,i,e)=>i in s?p(s,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[i]=e;var o=(s,i,e)=>y(s,typeof i!="symbol"?i+"":i,e);var m;(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
PartySocket requires a global 'EventTarget' class to be available!
You can polyfill this global by adding this to your code before any partysocket imports:
\`\`\`
import 'partysocket/event-target-polyfill';
\`\`\`
Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
`);var _=class extends Event{constructor(i,e){super("error",e);o(this,"message");o(this,"error");this.message=i.message,this.error=i}},d=class extends Event{constructor(i=1e3,e="",t){super("close",t);o(this,"code");o(this,"reason");o(this,"wasClean",!0);this.code=i,this.reason=e}},u={Event,ErrorEvent:_,CloseEvent:d};function w(s,i){if(!s)throw Error(i)}function b(s){return new s.constructor(s.type,s)}function E(s){return"data"in s?new MessageEvent(s.type,s):"code"in s||"reason"in s?new d(s.code||1999,s.reason||"unknown reason",s):"error"in s?new _(s.error,s):new Event(s.type,s)}var c=typeof process<"u"&&((m=process.versions)==null?void 0:m.node)!==void 0&&typeof document>"u"?E:b,h={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},g=!1,v=class a extends EventTarget{constructor(e,t,n={}){super();o(this,"_ws");o(this,"_retryCount",-1);o(this,"_uptimeTimeout");o(this,"_connectTimeout");o(this,"_shouldReconnect",!0);o(this,"_connectLock",!1);o(this,"_binaryType","blob");o(this,"_closeCalled",!1);o(this,"_messageQueue",[]);o(this,"_debugLogger",console.log.bind(console));o(this,"_url");o(this,"_protocols");o(this,"_options");o(this,"onclose",null);o(this,"onerror",null);o(this,"onmessage",null);o(this,"onopen",null);o(this,"_handleOpen",e=>{this._debug("open event");let{minUptime:t=h.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),t),w(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(n=>{var r;(r=this._ws)==null||r.send(n)}),this._messageQueue=[],this.onopen&&this.onopen(e),this.dispatchEvent(c(e))});o(this,"_handleMessage",e=>{this._debug("message event"),this.onmessage&&this.onmessage(e),this.dispatchEvent(c(e))});o(this,"_handleError",e=>{this._debug("error event",e.message),this._disconnect(void 0,e.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(e),this._debug("exec error listeners"),this.dispatchEvent(c(e)),this._connect()});o(this,"_handleClose",e=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(e),this.dispatchEvent(c(e))});this._url=e,this._protocols=t,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._options.debugLogger&&(this._debugLogger=this._options.debugLogger),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return a.CONNECTING}get OPEN(){return a.OPEN}get CLOSING(){return a.CLOSING}get CLOSED(){return a.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((e,t)=>(typeof t=="string"?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?a.CLOSED:a.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(e=1e3,t){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)}reconnect(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED||this._disconnect(e,t),this._connect()}send(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{let{maxEnqueuedMessages:t=h.maxEnqueuedMessages}=this._options;this._messageQueue.length<t&&(this._debug("enqueue",e),this._messageQueue.push(e))}}_debug(...e){this._options.debug&&this._debugLogger("RWS>",...e)}_getNextDelay(){let{reconnectionDelayGrowFactor:e=h.reconnectionDelayGrowFactor,minReconnectionDelay:t=h.minReconnectionDelay,maxReconnectionDelay:n=h.maxReconnectionDelay}=this._options,r=0;return this._retryCount>0&&(r=t*e**(this._retryCount-1),r>n&&(r=n)),this._debug("next delay",r),r}_wait(){return new Promise(e=>{setTimeout(e,this._getNextDelay())})}_getNextProtocols(e){if(!e)return Promise.resolve(null);if(typeof e=="string"||Array.isArray(e))return Promise.resolve(e);if(typeof e=="function"){let t=e();if(!t)return Promise.resolve(null);if(typeof t=="string"||Array.isArray(t))return Promise.resolve(t);if(t.then)return t}throw Error("Invalid protocols")}_getNextUrl(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){let t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;let{maxRetries:e=h.maxRetries,connectionTimeout:t=h.connectionTimeout}=this._options;if(this._retryCount>=e){this._debug("max retries reached",this._retryCount,">=",e);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([n,r])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!g&&(console.error(`\u203C\uFE0F No WebSocket implementation available. You should define options.WebSocket.
For example, if you're using node.js, run \`npm install ws\`, and then in your code:
import PartySocket from 'partysocket';
import WS from 'ws';
const partysocket = new PartySocket({
host: "127.0.0.1:1999",
room: "test-room",
WebSocket: WS
});
`),g=!0);let l=this._options.WebSocket||WebSocket;this._debug("connect",{url:n,protocols:r}),this._ws=r?new l(n,r):new l(n),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),t)}).catch(n=>{this._connectLock=!1,this._handleError(new u.ErrorEvent(Error(n.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new u.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(e=1e3,t){if(this._clearTimeouts(),this._ws){this._removeListeners();try{(this._ws.readyState===this.OPEN||this._ws.readyState===this.CONNECTING)&&this._ws.close(e,t),this._handleClose(new u.CloseEvent(e,t,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};export{v as t};
var x=(function(){function e(z){return{type:z,style:"keyword"}}for(var t=e("operator"),n={type:"atom",style:"atom"},r={type:"punctuation",style:null},s={type:"axis_specifier",style:"qualifier"},o={",":r},p="after.all.allowing.ancestor.ancestor-or-self.any.array.as.ascending.at.attribute.base-uri.before.boundary-space.by.case.cast.castable.catch.child.collation.comment.construction.contains.content.context.copy.copy-namespaces.count.decimal-format.declare.default.delete.descendant.descendant-or-self.descending.diacritics.different.distance.document.document-node.element.else.empty.empty-sequence.encoding.end.entire.every.exactly.except.external.first.following.following-sibling.for.from.ftand.ftnot.ft-option.ftor.function.fuzzy.greatest.group.if.import.in.inherit.insensitive.insert.instance.intersect.into.invoke.is.item.language.last.lax.least.let.levels.lowercase.map.modify.module.most.namespace.next.no.node.nodes.no-inherit.no-preserve.not.occurs.of.only.option.order.ordered.ordering.paragraph.paragraphs.parent.phrase.preceding.preceding-sibling.preserve.previous.processing-instruction.relationship.rename.replace.return.revalidation.same.satisfies.schema.schema-attribute.schema-element.score.self.sensitive.sentence.sentences.sequence.skip.sliding.some.stable.start.stemming.stop.strict.strip.switch.text.then.thesaurus.times.to.transform.treat.try.tumbling.type.typeswitch.union.unordered.update.updating.uppercase.using.validate.value.variable.version.weight.when.where.wildcards.window.with.without.word.words.xquery".split("."),a=0,i=p.length;a<i;a++)o[p[a]]=e(p[a]);for(var g="xs:anyAtomicType.xs:anySimpleType.xs:anyType.xs:anyURI.xs:base64Binary.xs:boolean.xs:byte.xs:date.xs:dateTime.xs:dateTimeStamp.xs:dayTimeDuration.xs:decimal.xs:double.xs:duration.xs:ENTITIES.xs:ENTITY.xs:float.xs:gDay.xs:gMonth.xs:gMonthDay.xs:gYear.xs:gYearMonth.xs:hexBinary.xs:ID.xs:IDREF.xs:IDREFS.xs:int.xs:integer.xs:item.xs:java.xs:language.xs:long.xs:Name.xs:NCName.xs:negativeInteger.xs:NMTOKEN.xs:NMTOKENS.xs:nonNegativeInteger.xs:nonPositiveInteger.xs:normalizedString.xs:NOTATION.xs:numeric.xs:positiveInteger.xs:precisionDecimal.xs:QName.xs:short.xs:string.xs:time.xs:token.xs:unsignedByte.xs:unsignedInt.xs:unsignedLong.xs:unsignedShort.xs:untyped.xs:untypedAtomic.xs:yearMonthDuration".split("."),a=0,i=g.length;a<i;a++)o[g[a]]=n;for(var f=["eq","ne","lt","le","gt","ge",":=","=",">",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"],a=0,i=f.length;a<i;a++)o[f[a]]=t;for(var v=["self::","attribute::","child::","descendant::","descendant-or-self::","parent::","ancestor::","ancestor-or-self::","following::","preceding::","following-sibling::","preceding-sibling::"],a=0,i=v.length;a<i;a++)o[v[a]]=s;return o})();function m(e,t,n){return t.tokenize=n,n(e,t)}function l(e,t){var n=e.next(),r=!1,s=q(e);if(n=="<"){if(e.match("!--",!0))return m(e,t,D);if(e.match("![CDATA",!1))return t.tokenize=E,"tag";if(e.match("?",!1))return m(e,t,_);var o=e.eat("/");e.eatSpace();for(var p="",a;a=e.eat(/[^\s\u00a0=<>\"\'\/?]/);)p+=a;return m(e,t,N(p,o))}else{if(n=="{")return u(t,{type:"codeblock"}),null;if(n=="}")return c(t),null;if(b(t))return n==">"?"tag":n=="/"&&e.eat(">")?(c(t),"tag"):"variable";if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if(n==="("&&e.eat(":"))return u(t,{type:"comment"}),m(e,t,w);if(!s&&(n==='"'||n==="'"))return k(e,t,n);if(n==="$")return m(e,t,T);if(n===":"&&e.eat("="))return"keyword";if(n==="(")return u(t,{type:"paren"}),null;if(n===")")return c(t),null;if(n==="[")return u(t,{type:"bracket"}),null;if(n==="]")return c(t),null;var i=x.propertyIsEnumerable(n)&&x[n];if(s&&n==='"')for(;e.next()!=='"';);if(s&&n==="'")for(;e.next()!=="'";);i||e.eatWhile(/[\w\$_-]/);var g=e.eat(":");!e.eat(":")&&g&&e.eatWhile(/[\w\$_-]/),e.match(/^[ \t]*\(/,!1)&&(r=!0);var f=e.current();return i=x.propertyIsEnumerable(f)&&x[f],r&&!i&&(i={type:"function_call",style:"def"}),A(t)?(c(t),"variable"):((f=="element"||f=="attribute"||i.type=="axis_specifier")&&u(t,{type:"xmlconstructor"}),i?i.style:"variable")}}function w(e,t){for(var n=!1,r=!1,s=0,o;o=e.next();){if(o==")"&&n)if(s>0)s--;else{c(t);break}else o==":"&&r&&s++;n=o==":",r=o=="("}return"comment"}function I(e,t){return function(n,r){for(var s;s=n.next();)if(s==e){c(r),t&&(r.tokenize=t);break}else if(n.match("{",!1)&&d(r))return u(r,{type:"codeblock"}),r.tokenize=l,"string";return"string"}}function k(e,t,n,r){let s=I(n,r);return u(t,{type:"string",name:n,tokenize:s}),m(e,t,s)}function T(e,t){var n=/[\w\$_-]/;if(e.eat('"')){for(;e.next()!=='"';);e.eat(":")}else e.eatWhile(n),e.match(":=",!1)||e.eat(":");return e.eatWhile(n),t.tokenize=l,"variable"}function N(e,t){return function(n,r){if(n.eatSpace(),t&&n.eat(">"))return c(r),r.tokenize=l,"tag";if(n.eat("/")||u(r,{type:"tag",name:e,tokenize:l}),n.eat(">"))r.tokenize=l;else return r.tokenize=y,"tag";return"tag"}}function y(e,t){var n=e.next();return n=="/"&&e.eat(">")?(d(t)&&c(t),b(t)&&c(t),"tag"):n==">"?(d(t)&&c(t),"tag"):n=="="?null:n=='"'||n=="'"?k(e,t,n,y):(d(t)||u(t,{type:"attribute",tokenize:y}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace(),(e.match(">",!1)||e.match("/",!1))&&(c(t),t.tokenize=l),"attribute")}function D(e,t){for(var n;n=e.next();)if(n=="-"&&e.match("->",!0))return t.tokenize=l,"comment"}function E(e,t){for(var n;n=e.next();)if(n=="]"&&e.match("]",!0))return t.tokenize=l,"comment"}function _(e,t){for(var n;n=e.next();)if(n=="?"&&e.match(">",!0))return t.tokenize=l,"processingInstruction"}function b(e){return h(e,"tag")}function d(e){return h(e,"attribute")}function A(e){return h(e,"xmlconstructor")}function q(e){return e.current()==='"'?e.match(/^[^\"]+\"\:/,!1):e.current()==="'"?e.match(/^[^\"]+\'\:/,!1):!1}function h(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function u(e,t){e.stack.push(t)}function c(e){e.stack.pop(),e.tokenize=e.stack.length&&e.stack[e.stack.length-1].tokenize||l}const M={name:"xquery",startState:function(){return{tokenize:l,cc:[],stack:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},languageData:{commentTokens:{block:{open:"(:",close:":)"}}}};export{M as t};
import{t as r}from"./xquery-BuvyHzVJ.js";export{r as xQuery};
var j,Q,K,Z,q,J,tt,it,et,st;import{t as zt}from"./linear-DjglEiG4.js";import{n as ui}from"./ordinal-DTOdb5Da.js";import{t as xi}from"./range-Bc7-zhbC.js";import"./defaultLocale-D_rSvXvJ.js";import"./purify.es-DNVQZNFu.js";import"./src-Cf4NnJCp.js";import{t as Ot}from"./line-BCZzhM6G.js";import{i as Wt}from"./chunk-S3R3BYOJ-DgPGJLrA.js";import{n as di}from"./init-AtRnKt23.js";import{n,r as Ft}from"./src-BKLwm2RN.js";import{B as pi,C as Xt,I as fi,T as mi,U as yi,_ as bi,a as Ai,c as Ci,d as wi,v as Si,y as mt,z as ki}from"./chunk-ABZYJK2D-t8l6Viza.js";import{t as _i}from"./chunk-EXTU4WIE-CyW9PraH.js";import"./dist-C04_12Dz.js";import{t as Ti}from"./chunk-JA3XYJ7Z-CaauVIYw.js";function yt(){var e=ui().unknown(void 0),t=e.domain,i=e.range,s=0,a=1,l,g,f=!1,p=0,_=0,L=.5;delete e.unknown;function w(){var b=t().length,v=a<s,D=v?a:s,P=v?s:a;l=(P-D)/Math.max(1,b-p+_*2),f&&(l=Math.floor(l)),D+=(P-D-l*(b-p))*L,g=l*(1-p),f&&(D=Math.round(D),g=Math.round(g));var E=xi(b).map(function(m){return D+l*m});return i(v?E.reverse():E)}return e.domain=function(b){return arguments.length?(t(b),w()):t()},e.range=function(b){return arguments.length?([s,a]=b,s=+s,a=+a,w()):[s,a]},e.rangeRound=function(b){return[s,a]=b,s=+s,a=+a,f=!0,w()},e.bandwidth=function(){return g},e.step=function(){return l},e.round=function(b){return arguments.length?(f=!!b,w()):f},e.padding=function(b){return arguments.length?(p=Math.min(1,_=+b),w()):p},e.paddingInner=function(b){return arguments.length?(p=Math.min(1,b),w()):p},e.paddingOuter=function(b){return arguments.length?(_=+b,w()):_},e.align=function(b){return arguments.length?(L=Math.max(0,Math.min(1,b)),w()):L},e.copy=function(){return yt(t(),[s,a]).round(f).paddingInner(p).paddingOuter(_).align(L)},di.apply(w(),arguments)}var bt=(function(){var e=n(function(h,A,x,u){for(x||(x={}),u=h.length;u--;x[h[u]]=A);return x},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],l=[1,6],g=[1,7],f=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],_=[1,26],L=[1,28],w=[1,29],b=[1,30],v=[1,31],D=[1,32],P=[1,33],E=[1,34],m=[1,35],T=[1,36],r=[1,37],z=[1,43],O=[1,42],V=[1,47],S=[1,50],c=[1,10,12,14,16,18,19,21,23,34,35,36],M=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],y=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],Y=[1,64],U={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,A,x,u,k,o,at){var d=o.length-1;switch(k){case 5:u.setOrientation(o[d]);break;case 9:u.setDiagramTitle(o[d].text.trim());break;case 12:u.setLineData({text:"",type:"text"},o[d]);break;case 13:u.setLineData(o[d-1],o[d]);break;case 14:u.setBarData({text:"",type:"text"},o[d]);break;case 15:u.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),u.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:this.$=[Number(o[d-2]),...o[d]];break;case 21:this.$=[Number(o[d])];break;case 22:u.setXAxisTitle(o[d]);break;case 23:u.setXAxisTitle(o[d-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(o[d]);break;case 26:u.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 27:this.$=o[d-1];break;case 28:this.$=[o[d-2],...o[d]];break;case 29:this.$=[o[d]];break;case 30:u.setYAxisTitle(o[d]);break;case 31:u.setYAxisTitle(o[d-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 37:this.$={text:o[d],type:"text"};break;case 38:this.$={text:o[d],type:"text"};break;case 39:this.$={text:o[d],type:"markdown"};break;case 40:this.$=o[d];break;case 41:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:a,35:l,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:a,35:l,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:l,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(f,[2,34]),e(f,[2,35]),e(f,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:a,35:l,36:g}),{1:[2,3]},e(f,[2,5]),e(t,[2,7],{4:22,34:a,35:l,36:g}),{11:23,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{11:39,13:38,24:z,27:O,29:40,30:41,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{11:45,15:44,27:V,33:46,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{11:49,17:48,24:S,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{11:52,17:51,24:S,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},{20:[1,53]},{22:[1,54]},e(c,[2,18]),{1:[2,2]},e(c,[2,8]),e(c,[2,9]),e(M,[2,37],{40:55,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r}),e(M,[2,38]),e(M,[2,39]),e(y,[2,40]),e(y,[2,42]),e(y,[2,43]),e(y,[2,44]),e(y,[2,45]),e(y,[2,46]),e(y,[2,47]),e(y,[2,48]),e(y,[2,49]),e(y,[2,50]),e(y,[2,51]),e(c,[2,10]),e(c,[2,22],{30:41,29:56,24:z,27:O}),e(c,[2,24]),e(c,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},e(c,[2,11]),e(c,[2,30],{33:60,27:V}),e(c,[2,32]),{31:[1,61]},e(c,[2,12]),{17:62,24:S},{25:63,27:Y},e(c,[2,14]),{17:65,24:S},e(c,[2,16]),e(c,[2,17]),e(y,[2,41]),e(c,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(c,[2,31]),{27:[1,69]},e(c,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(c,[2,15]),e(c,[2,26]),e(c,[2,27]),{11:59,32:72,37:24,38:p,39:_,40:27,41:L,42:w,43:b,44:v,45:D,46:P,47:E,48:m,49:T,50:r},e(c,[2,33]),e(c,[2,19]),{25:73,27:Y},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,A){if(A.recoverable)this.trace(h);else{var x=Error(h);throw x.hash=A,x}},"parseError"),parse:n(function(h){var A=this,x=[0],u=[],k=[null],o=[],at=this.table,d="",rt=0,vt=0,Et=0,ri=2,Mt=1,li=o.slice.call(arguments,1),R=Object.create(this.lexer),X={yy:{}};for(var xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xt)&&(X.yy[xt]=this.yy[xt]);R.setInput(h,X.yy),X.yy.lexer=R,X.yy.parser=this,R.yylloc===void 0&&(R.yylloc={});var dt=R.yylloc;o.push(dt);var ci=R.options&&R.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gi(B){x.length-=2*B,k.length-=B,o.length-=B}n(gi,"popStack");function It(){var B=u.pop()||R.lex()||Mt;return typeof B!="number"&&(B instanceof Array&&(u=B,B=u.pop()),B=A.symbols_[B]||B),B}n(It,"lex");for(var I,pt,N,$,ft,H={},lt,W,$t,ct;;){if(N=x[x.length-1],this.defaultActions[N]?$=this.defaultActions[N]:(I??(I=It()),$=at[N]&&at[N][I]),$===void 0||!$.length||!$[0]){var Bt="";for(lt in ct=[],at[N])this.terminals_[lt]&&lt>ri&&ct.push("'"+this.terminals_[lt]+"'");Bt=R.showPosition?"Parse error on line "+(rt+1)+`:
`+R.showPosition()+`
Expecting `+ct.join(", ")+", got '"+(this.terminals_[I]||I)+"'":"Parse error on line "+(rt+1)+": Unexpected "+(I==Mt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Bt,{text:R.match,token:this.terminals_[I]||I,line:R.yylineno,loc:dt,expected:ct})}if($[0]instanceof Array&&$.length>1)throw Error("Parse Error: multiple actions possible at state: "+N+", token: "+I);switch($[0]){case 1:x.push(I),k.push(R.yytext),o.push(R.yylloc),x.push($[1]),I=null,pt?(I=pt,pt=null):(vt=R.yyleng,d=R.yytext,rt=R.yylineno,dt=R.yylloc,Et>0&&Et--);break;case 2:if(W=this.productions_[$[1]][1],H.$=k[k.length-W],H._$={first_line:o[o.length-(W||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(W||1)].first_column,last_column:o[o.length-1].last_column},ci&&(H._$.range=[o[o.length-(W||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(H,[d,vt,rt,X.yy,$[1],k,o].concat(li)),ft!==void 0)return ft;W&&(x=x.slice(0,-1*W*2),k=k.slice(0,-1*W),o=o.slice(0,-1*W)),x.push(this.productions_[$[1]][0]),k.push(H.$),o.push(H._$),$t=at[x[x.length-2]][x[x.length-1]],x.push($t);break;case 3:return!0}}return!0},"parse")};U.lexer=(function(){return{EOF:1,parseError:n(function(h,A){if(this.yy.parser)this.yy.parser.parseError(h,A);else throw Error(h)},"parseError"),setInput:n(function(h,A){return this.yy=A||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:n(function(){var h=this._input[0];return this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h,h.match(/(?:\r\n?|\n).*/g)?(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:n(function(h){var A=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var u=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),x.length-1&&(this.yylineno-=x.length-1);var k=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:x?(x.length===u.length?this.yylloc.first_column:0)+u[u.length-x.length].length-x[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(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:n(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:n(function(){var h=this.pastInput(),A=Array(h.length+1).join("-");return h+this.upcomingInput()+`
`+A+"^"},"showPosition"),test_match:n(function(h,A){var x,u,k;if(this.options.backtrack_lexer&&(k={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&&(k.yylloc.range=this.yylloc.range.slice(0))),u=h[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.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],x=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var o in k)this[o]=k[o];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,A,x,u;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),o=0;o<k.length;o++)if(x=this._input.match(this.rules[k[o]]),x&&(!A||x[0].length>A[0].length)){if(A=x,u=o,this.options.backtrack_lexer){if(h=this.test_match(x,k[o]),h!==!1)return h;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(h=this.test_match(A,k[u]),h===!1?!1:h):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:n(function(){return this.next()||this.lex()},"lex"),begin:n(function(h){this.conditionStack.push(h)},"begin"),popState:n(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(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:n(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:n(function(h){this.begin(h)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(h,A,x,u){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function F(){this.yy={}}return n(F,"Parser"),F.prototype=U,U.Parser=F,new F})();bt.parser=bt;var Ri=bt;function At(e){return e.type==="bar"}n(At,"isBarPlot");function Ct(e){return e.type==="band"}n(Ct,"isBandAxisData");function G(e){return e.type==="linear"}n(G,"isLinearAxisData");var Nt=(j=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((l,g)=>Math.max(g.length,l),0)*i,height:i};let s={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let l of t){let g=Ti(a,1,l),f=g?g.width:l.length*i,p=g?g.height:i;s.width=Math.max(s.width,f),s.height=Math.max(s.height,p)}return a.remove(),s}},n(j,"TextDimensionCalculatorWithFont"),j),Vt=.7,Yt=.2,Ut=(Q=class{constructor(t,i,s,a){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Vt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Vt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let s=this.getLabelDimension(),a=Yt*t.width;this.outerPadding=Math.min(s.width/2,a);let l=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,l<=i&&(i-=l,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let s=this.getLabelDimension(),a=Yt*t.height;this.outerPadding=Math.min(s.height/2,a);let l=s.width+this.axisConfig.labelPadding*2;l<=i&&(i-=l,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},n(Q,"BaseAxis"),Q),Di=(K=class extends Ut{constructor(t,i,s,a,l){super(t,a,l,i),this.categories=s,this.scale=yt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=yt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Ft.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},n(K,"BandAxis"),K),Li=(Z=class extends Ut{constructor(t,i,s,a,l){super(t,a,l,i),this.domain=s,this.scale=zt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=zt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},n(Z,"LinearAxis"),Z);function wt(e,t,i,s){let a=new Nt(s);return Ct(e)?new Di(t,i,e.categories,e.title,a):new Li(t,i,[e.min,e.max],e.title,a)}n(wt,"getAxis");var Pi=(q=class{constructor(t,i,s,a){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),a=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},n(q,"ChartTitle"),q);function Ht(e,t,i,s){return new Pi(new Nt(s),e,t,i)}n(Ht,"getChartTitleComponent");var vi=(J=class{constructor(t,i,s,a,l){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=a,this.plotIndex=l}getDrawableElement(){let t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]),i;return i=this.orientation==="horizontal"?Ot().y(s=>s[0]).x(s=>s[1])(t):Ot().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},n(J,"LinePlot"),J),Ei=(tt=class{constructor(t,i,s,a,l,g){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=a,this.orientation=l,this.plotIndex=g}getDrawableElement(){let t=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,s=i/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(a=>({x:this.boundingRect.x,y:a[0]-s,height:i,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(a=>({x:a[0]-s,y:a[1],width:i,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},n(tt,"BarPlot"),tt),Mi=(it=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let a=new vi(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break;case"bar":{let a=new Ei(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break}return t}},n(it,"BasePlot"),it);function Gt(e,t,i){return new Mi(e,t,i)}n(Gt,"getPlotComponent");var Ii=(et=class{constructor(t,i,s,a){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ht(t,i,s,a),plot:Gt(t,i,s),xAxis:wt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},a),yAxis:wt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,a=0,l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:l,height:g});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),a=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,t>0&&(l+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:l,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.xAxis.setRange([s,s+l]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:a+g}),this.componentStore.yAxis.setRange([a,a+g]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(p=>At(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,a=0,l=0,g=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:g,height:f});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("left"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=p.width,a=p.width,this.componentStore.yAxis.setAxisPosition("top"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=p.height,l=s+p.height,t>0&&(g+=t,t=0),i>0&&(f+=i,i=0),this.componentStore.plot.calculateSpace({width:g,height:f}),this.componentStore.plot.setBoundingBoxXY({x:a,y:l}),this.componentStore.yAxis.setRange([a,a+g]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:s}),this.componentStore.xAxis.setRange([l,l+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:l}),this.chartData.plots.some(_=>At(_))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},n(et,"Orchestrator"),et),$i=(st=class{static build(t,i,s,a){return new Ii(t,i,s,a).getDrawableElement()}},n(st,"XYChartBuilder"),st),nt=0,jt,ht=Tt(),ot=_t(),C=Rt(),St=ot.plotColorPalette.split(",").map(e=>e.trim()),gt=!1,kt=!1;function _t(){let e=mi(),t=mt();return Wt(e.xyChart,t.themeVariables.xyChart)}n(_t,"getChartDefaultThemeConfig");function Tt(){let e=mt();return Wt(wi.xyChart,e.xyChart)}n(Tt,"getChartDefaultConfig");function Rt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n(Rt,"getChartDefaultData");function ut(e){let t=mt();return fi(e.trim(),t)}n(ut,"textSanitizer");function Qt(e){jt=e}n(Qt,"setTmpSVGG");function Kt(e){e==="horizontal"?ht.chartOrientation="horizontal":ht.chartOrientation="vertical"}n(Kt,"setOrientation");function Zt(e){C.xAxis.title=ut(e.text)}n(Zt,"setXAxisTitle");function Dt(e,t){C.xAxis={type:"linear",title:C.xAxis.title,min:e,max:t},gt=!0}n(Dt,"setXAxisRangeData");function qt(e){C.xAxis={type:"band",title:C.xAxis.title,categories:e.map(t=>ut(t.text))},gt=!0}n(qt,"setXAxisBand");function Jt(e){C.yAxis.title=ut(e.text)}n(Jt,"setYAxisTitle");function ti(e,t){C.yAxis={type:"linear",title:C.yAxis.title,min:e,max:t},kt=!0}n(ti,"setYAxisRangeData");function ii(e){let t=Math.min(...e),i=Math.max(...e),s=G(C.yAxis)?C.yAxis.min:1/0,a=G(C.yAxis)?C.yAxis.max:-1/0;C.yAxis={type:"linear",title:C.yAxis.title,min:Math.min(s,t),max:Math.max(a,i)}}n(ii,"setYAxisRangeFromPlotData");function Lt(e){let t=[];if(e.length===0)return t;if(!gt){let i=G(C.xAxis)?C.xAxis.min:1/0,s=G(C.xAxis)?C.xAxis.max:-1/0;Dt(Math.min(i,1),Math.max(s,e.length))}if(kt||ii(e),Ct(C.xAxis)&&(t=C.xAxis.categories.map((i,s)=>[i,e[s]])),G(C.xAxis)){let i=C.xAxis.min,s=C.xAxis.max,a=(s-i)/(e.length-1),l=[];for(let g=i;g<=s;g+=a)l.push(`${g}`);t=l.map((g,f)=>[g,e[f]])}return t}n(Lt,"transformDataWithoutCategory");function Pt(e){return St[e===0?0:e%St.length]}n(Pt,"getPlotColorFromPalette");function ei(e,t){let i=Lt(t);C.plots.push({type:"line",strokeFill:Pt(nt),strokeWidth:2,data:i}),nt++}n(ei,"setLineData");function si(e,t){let i=Lt(t);C.plots.push({type:"bar",fill:Pt(nt),data:i}),nt++}n(si,"setBarData");function ai(){if(C.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return C.title=Xt(),$i.build(ht,C,ot,jt)}n(ai,"getDrawableElem");function ni(){return ot}n(ni,"getChartThemeConfig");function hi(){return ht}n(hi,"getChartConfig");function oi(){return C}n(oi,"getXYChartData");var Bi={parser:Ri,db:{getDrawableElem:ai,clear:n(function(){Ai(),nt=0,ht=Tt(),C=Rt(),ot=_t(),St=ot.plotColorPalette.split(",").map(e=>e.trim()),gt=!1,kt=!1},"clear"),setAccTitle:pi,getAccTitle:Si,setDiagramTitle:yi,getDiagramTitle:Xt,getAccDescription:bi,setAccDescription:ki,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Dt,setXAxisBand:qt,setYAxisTitle:Jt,setYAxisRangeData:ti,setLineData:ei,setBarData:si,setTmpSVGG:Qt,getChartThemeConfig:ni,getChartConfig:hi,getXYChartData:oi},renderer:{draw:n((e,t,i,s)=>{let a=s.db,l=a.getChartThemeConfig(),g=a.getChartConfig(),f=a.getXYChartData().plots[0].data.map(m=>m[1]);function p(m){return m==="top"?"text-before-edge":"middle"}n(p,"getDominantBaseLine");function _(m){return m==="left"?"start":m==="right"?"end":"middle"}n(_,"getTextAnchor");function L(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}n(L,"getTextTransformation"),Ft.debug(`Rendering xychart chart
`+e);let w=_i(t),b=w.append("g").attr("class","main"),v=b.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");Ci(w,g.height,g.width,!0),w.attr("viewBox",`0 0 ${g.width} ${g.height}`),v.attr("fill",l.backgroundColor),a.setTmpSVGG(w.append("g").attr("class","mermaid-tmp-group"));let D=a.getDrawableElem(),P={};function E(m){let T=b,r="";for(let[z]of m.entries()){let O=b;z>0&&P[r]&&(O=P[r]),r+=m[z],T=P[r],T||(T=P[r]=O.append("g").attr("class",m[z]))}return T}n(E,"getGroup");for(let m of D){if(m.data.length===0)continue;let T=E(m.groupTexts);switch(m.type){case"rect":if(T.selectAll("rect").data(m.data).enter().append("rect").attr("x",r=>r.x).attr("y",r=>r.y).attr("width",r=>r.width).attr("height",r=>r.height).attr("fill",r=>r.fill).attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth),g.showDataLabel)if(g.chartOrientation==="horizontal"){let r=function(c,M){let{data:y,label:Y}=c;return M*Y.length*z<=y.width-10};n(r,"fitsHorizontally");let z=.7,O=m.data.map((c,M)=>({data:c,label:f[M].toString()})).filter(c=>c.data.width>0&&c.data.height>0),V=O.map(c=>{let{data:M}=c,y=M.height*.7;for(;!r(c,y)&&y>0;)--y;return y}),S=Math.floor(Math.min(...V));T.selectAll("text").data(O).enter().append("text").attr("x",c=>c.data.x+c.data.width-10).attr("y",c=>c.data.y+c.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${S}px`).text(c=>c.label)}else{let r=function(S,c,M){let{data:y,label:Y}=S,U=c*Y.length*.7,F=y.x+y.width/2,h=F-U/2,A=F+U/2,x=h>=y.x&&A<=y.x+y.width,u=y.y+M+c<=y.y+y.height;return x&&u};n(r,"fitsInBar");let z=m.data.map((S,c)=>({data:S,label:f[c].toString()})).filter(S=>S.data.width>0&&S.data.height>0),O=z.map(S=>{let{data:c,label:M}=S,y=c.width/(M.length*.7);for(;!r(S,y,10)&&y>0;)--y;return y}),V=Math.floor(Math.min(...O));T.selectAll("text").data(z).enter().append("text").attr("x",S=>S.data.x+S.data.width/2).attr("y",S=>S.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${V}px`).text(S=>S.label)}break;case"text":T.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",r=>r.fill).attr("font-size",r=>r.fontSize).attr("dominant-baseline",r=>p(r.verticalPos)).attr("text-anchor",r=>_(r.horizontalPos)).attr("transform",r=>L(r)).text(r=>r.text);break;case"path":T.selectAll("path").data(m.data).enter().append("path").attr("d",r=>r.path).attr("fill",r=>r.fill?r.fill:"none").attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break}}},"draw")}};export{Bi as diagram};
function u(e){for(var t={},r=e.split(" "),o=0;o<r.length;++o)t[r[o]]=!0;return t}var l=u("Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While"),s="(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)",a="(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)",p=new RegExp(s),f=new RegExp(a),m=RegExp(a+"?_"+a),k=RegExp(a+"\\s*\\(");function i(e,t){var r=e.next();if(r==='"')return t.tokenize=h,t.tokenize(e,t);if(r==="/"){if(e.eat("*"))return t.tokenize=d,t.tokenize(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}e.backUp(1);var o=e.match(/^(\w+)\s*\(/,!1);o!==null&&l.hasOwnProperty(o[1])&&t.scopes.push("bodied");var n=c(t);if(n==="bodied"&&r==="["&&t.scopes.pop(),(r==="["||r==="{"||r==="(")&&t.scopes.push(r),n=c(t),(n==="["&&r==="]"||n==="{"&&r==="}"||n==="("&&r===")")&&t.scopes.pop(),r===";")for(;n==="bodied";)t.scopes.pop(),n=c(t);return e.match(/\d+ *#/,!0,!1)?"qualifier":e.match(p,!0,!1)?"number":e.match(m,!0,!1)?"variableName.special":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(k,!0,!1)?(e.backUp(1),"variableName.function"):e.match(f,!0,!1)?"variable":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?"operator":"error"}function h(e,t){for(var r,o=!1,n=!1;(r=e.next())!=null;){if(r==='"'&&!n){o=!0;break}n=!n&&r==="\\"}return o&&!n&&(t.tokenize=i),"string"}function d(e,t){for(var r,o;(o=e.next())!=null;){if(r==="*"&&o==="/"){t.tokenize=i;break}r=o}return"comment"}function c(e){var t=null;return e.scopes.length>0&&(t=e.scopes[e.scopes.length-1]),t}const b={name:"yacas",startState:function(){return{tokenize:i,scopes:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},indent:function(e,t,r){if(e.tokenize!==i&&e.tokenize!==null)return null;var o=0;return(t==="]"||t==="];"||t==="}"||t==="};"||t===");")&&(o=-1),(e.scopes.length+o)*r.unit},languageData:{electricInput:/[{}\[\]()\;]/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{b as t};
import{t as a}from"./yacas-C_HpkPlV.js";export{a as yacas};
import{t as a}from"./createLucideIcon-CnW3RofX.js";var t=a("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),e=a("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),h=a("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]),p=a("youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);export{t as i,h as n,e as r,p as t};
function o(l){var i,n;l?(i=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,n=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(i=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,n=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var u=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,c=/^(n?[zc]|p[oe]?|m)\b/i,d=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,a=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{name:"z80",startState:function(){return{context:0}},token:function(e,t){if(e.column()||(t.context=0),e.eatSpace())return null;var r;if(e.eatWhile(/\w/))if(l&&e.eat(".")&&e.eatWhile(/\w/),r=e.current(),e.indentation()){if((t.context==1||t.context==4)&&u.test(r))return t.context=4,"variable";if(t.context==2&&c.test(r))return t.context=4,"variableName.special";if(i.test(r))return t.context=1,"keyword";if(n.test(r))return t.context=2,"keyword";if(t.context==4&&a.test(r))return"number";if(d.test(r))return"error"}else return e.match(a)?"number":null;else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(r=e.next())&&r!='"';)r=="\\"&&e.next();return"string"}else if(e.eat("'")){if(e.match(/\\?.'/))return"number"}else if(e.eat(".")||e.sol()&&e.eat("#")){if(t.context=5,e.eatWhile(/\w/))return"def"}else if(e.eat("$")){if(e.eatWhile(/[\da-f]/i))return"number"}else if(e.eat("%")){if(e.eatWhile(/[01]/))return"number"}else e.next()}return null}}}const f=o(!1),s=o(!0);export{f as n,s as t};
import{n as a,t as e}from"./z80-BDlRltlF.js";export{e as ez80,a as z80};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display